ソースを参照

Merge pull request #7850 from cakephp/phpcs

3.1 fix CS
ADmad 10 年 前
コミット
606dbf95d0

+ 0 - 1
.travis.yml

@@ -38,7 +38,6 @@ matrix:
 
   allow_failures:
     - env: COVERALLS=1 DEFAULT=0
-    - env: PHPCS=1 DEFAULT=0
 
     - php: hhvm
 

+ 1 - 1
src/Database/Query.php

@@ -313,7 +313,7 @@ class Query implements ExpressionInterface, IteratorAggregate
      * $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

+ 2 - 1
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);

+ 1 - 2
src/Shell/Task/CommandTask.php

@@ -118,8 +118,7 @@ class CommandTask extends Shell
         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])
                 ) {

+ 4 - 2
tests/TestCase/ORM/Association/HasManyTest.php

@@ -277,7 +277,8 @@ class HasManyTest extends TestCase
         ];
         $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 @@ class HasManyTest extends TestCase
         ];
         $this->assertJoin($expected, $query);
 
-        $expected = new QueryExpression([
+        $expected = new QueryExpression(
+            [
                 'Articles.author_id IN' => $keys,
                 'comments.id' => 1,
             ],

+ 3 - 3
tests/TestCase/Routing/Route/DashedRouteTest.php

@@ -206,9 +206,9 @@ class DashedRouteTest extends TestCase
             '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']);

+ 1 - 1
tests/test_app/Plugin/TestPluginTwo/src/Shell/ExampleShell.php

@@ -41,6 +41,6 @@ class ExampleShell extends Shell
      */
     public function say_hello()
     {
-    	$this->out('Hello from the TestPluginTwo.ExampleShell');
+        $this->out('Hello from the TestPluginTwo.ExampleShell');
     }
 }

+ 1 - 1
tests/test_app/TestApp/Shell/Task/SampleTask.php

@@ -29,4 +29,4 @@ class SampleTask extends Shell
         ]);
         return $parser;
     }
-}
+}