diff --git a/src/Database/Query.php b/src/Database/Query.php index 1625a8ec676..ebdca65b4fe 100644 --- a/src/Database/Query.php +++ b/src/Database/Query.php @@ -313,7 +313,7 @@ public function select($fields = [], $overwrite = false) * $query->distinct('name', true); * ``` * - * @param array|ExpressionInterface|string|boolean $on Enable/disable distinct class + * @param array|ExpressionInterface|string|bool $on Enable/disable distinct class * or list of fields to be filtered on * @param bool $overwrite whether to reset fields with passed list or not * @return $this diff --git a/src/Routing/Route/DashedRoute.php b/src/Routing/Route/DashedRoute.php index a72d7d9070c..dd2f90a4e98 100644 --- a/src/Routing/Route/DashedRoute.php +++ b/src/Routing/Route/DashedRoute.php @@ -40,7 +40,8 @@ class DashedRoute extends Route * @param string $plugin Plugin name * @return string */ - protected function _camelizePlugin($plugin) { + protected function _camelizePlugin($plugin) + { $plugin = str_replace('-', '_', $plugin); if (strpos($plugin, '/') === false) { return Inflector::camelize($plugin); diff --git a/src/Shell/Task/CommandTask.php b/src/Shell/Task/CommandTask.php index 916284b02d1..ccf011f531f 100644 --- a/src/Shell/Task/CommandTask.php +++ b/src/Shell/Task/CommandTask.php @@ -118,8 +118,7 @@ public function commands() foreach ($shellList as $type => $commands) { foreach ($commands as $shell) { $prefix = ''; - if ( - !in_array(strtolower($type), ['app', 'core']) && + if (!in_array(strtolower($type), ['app', 'core']) && isset($duplicates[$type]) && in_array($shell, $duplicates[$type]) ) { diff --git a/tests/TestCase/ORM/Association/HasManyTest.php b/tests/TestCase/ORM/Association/HasManyTest.php index 12fe5653c11..bea4b919c9d 100644 --- a/tests/TestCase/ORM/Association/HasManyTest.php +++ b/tests/TestCase/ORM/Association/HasManyTest.php @@ -277,7 +277,8 @@ public function testEagerLoaderWithOverrides() ]; $this->assertSelectClause($expected, $query); - $expected = new QueryExpression([ + $expected = new QueryExpression( + [ 'Articles.published' => 'Y', 'Articles.id !=' => 3, 'Articles.author_id IN' => $keys @@ -359,7 +360,8 @@ public function testEagerLoaderWithQueryBuilder() ]; $this->assertJoin($expected, $query); - $expected = new QueryExpression([ + $expected = new QueryExpression( + [ 'Articles.author_id IN' => $keys, 'comments.id' => 1, ], diff --git a/tests/TestCase/Routing/Route/DashedRouteTest.php b/tests/TestCase/Routing/Route/DashedRouteTest.php index 389c54c18fd..bbb51bcff5a 100644 --- a/tests/TestCase/Routing/Route/DashedRouteTest.php +++ b/tests/TestCase/Routing/Route/DashedRouteTest.php @@ -206,9 +206,9 @@ public function testMatchThenParse() 'controller' => 'ControllerName', 'action' => 'actionName' ]); - $expected_url = '/plugin/controller-name/action-name'; - $this->assertEquals($expected_url, $url); - $result = $route->parse($expected_url); + $expectedUrl = '/plugin/controller-name/action-name'; + $this->assertEquals($expectedUrl, $url); + $result = $route->parse($expectedUrl); $this->assertEquals('ControllerName', $result['controller']); $this->assertEquals('actionName', $result['action']); $this->assertEquals('Vendor/PluginName', $result['plugin']); diff --git a/tests/test_app/Plugin/TestPluginTwo/src/Shell/ExampleShell.php b/tests/test_app/Plugin/TestPluginTwo/src/Shell/ExampleShell.php index 058495dca86..b76d0cd998f 100644 --- a/tests/test_app/Plugin/TestPluginTwo/src/Shell/ExampleShell.php +++ b/tests/test_app/Plugin/TestPluginTwo/src/Shell/ExampleShell.php @@ -41,6 +41,6 @@ public function main() */ public function say_hello() { - $this->out('Hello from the TestPluginTwo.ExampleShell'); + $this->out('Hello from the TestPluginTwo.ExampleShell'); } } diff --git a/tests/test_app/TestApp/Shell/Task/SampleTask.php b/tests/test_app/TestApp/Shell/Task/SampleTask.php index d35fa52a0ae..87088374c33 100644 --- a/tests/test_app/TestApp/Shell/Task/SampleTask.php +++ b/tests/test_app/TestApp/Shell/Task/SampleTask.php @@ -29,4 +29,4 @@ public function getOptionParser() ]); return $parser; } -} \ No newline at end of file +}