Commit cfb2af03 authored by catch's avatar catch

Issue #2901790 by mfernea: Fix 'PEAR.Functions.ValidDefaultValue' coding standard

parent 2e18fe93
......@@ -128,7 +128,7 @@ class Select extends Query implements SelectInterface {
* @param array $options
* Array of query options.
*/
public function __construct($table, $alias = NULL, Connection $connection, $options = []) {
public function __construct($table, $alias, Connection $connection, $options = []) {
$options['return'] = Database::RETURN_STATEMENT;
parent::__construct($connection, $options);
$conjunction = isset($options['conjunction']) ? $options['conjunction'] : 'AND';
......
......@@ -106,7 +106,7 @@ class ModuleHandler implements ModuleHandlerInterface {
* @see \Drupal\Core\DrupalKernel
* @see \Drupal\Core\CoreServiceProvider
*/
public function __construct($root, array $module_list = [], CacheBackendInterface $cache_backend) {
public function __construct($root, array $module_list, CacheBackendInterface $cache_backend) {
$this->root = $root;
$this->moduleList = [];
foreach ($module_list as $name => $module) {
......
......@@ -24,7 +24,7 @@ class FilesystemLoader extends \Twig_Loader_Filesystem {
* @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
* The theme handler service.
*/
public function __construct($paths = [], ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
public function __construct($paths, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
parent::__construct($paths);
// Add namespaced paths for modules and themes.
......
......@@ -72,15 +72,15 @@ public function createBook($edit = []) {
* @param $nodes
* Nodes that should be in outline.
* @param $previous
* (optional) Previous link node. Defaults to FALSE.
* Previous link node.
* @param $up
* (optional) Up link node. Defaults to FALSE.
* Up link node.
* @param $next
* (optional) Next link node. Defaults to FALSE.
* Next link node.
* @param array $breadcrumb
* The nodes that should be displayed in the breadcrumb.
*/
public function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = FALSE, $next = FALSE, array $breadcrumb) {
public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $next, array $breadcrumb) {
// $number does not use drupal_static as it should not be reset
// since it uniquely identifies each call to checkBookNode().
static $number = 0;
......
......@@ -152,6 +152,7 @@
<rule ref="PEAR.Files.IncludingFile.UseRequire">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.ValidDefaultValue"/>
<!-- PSR-2 sniffs -->
<rule ref="PSR2.Classes.PropertyDeclaration">
......
......@@ -50,7 +50,7 @@ public function providerTestFormatPlural() {
/**
* @dataProvider providerTestFormatPlural
*/
public function testFormatPlural($count, $singular, $plural, array $args = [], array $options = [], $expected) {
public function testFormatPlural($count, $singular, $plural, array $args, array $options, $expected) {
$langcode = empty($options['langcode']) ? 'fr' : $options['langcode'];
$translator = $this->getMock('\Drupal\Core\StringTranslation\Translator\TranslatorInterface');
$translator->expects($this->once())
......@@ -78,7 +78,7 @@ public function testFormatPlural($count, $singular, $plural, array $args = [], a
*
* @dataProvider providerTestTranslatePlaceholder
*/
public function testTranslatePlaceholder($string, array $args = [], $expected_string) {
public function testTranslatePlaceholder($string, array $args, $expected_string) {
$actual = $this->translationManager->translate($string, $args);
$this->assertInstanceOf(MarkupInterface::class, $actual);
$this->assertEquals($expected_string, (string) $actual);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment