Skip to content

Commit

Permalink
fix coding standard against code sniffer 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Dec 15, 2015
1 parent c5394e5 commit 55140a9
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Database/Query.php
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/Routing/Route/DashedRoute.php
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/Shell/Task/CommandTask.php
Expand Up @@ -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])
) {
Expand Down
6 changes: 4 additions & 2 deletions tests/TestCase/ORM/Association/HasManyTest.php
Expand Up @@ -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
Expand Down Expand Up @@ -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,
],
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Routing/Route/DashedRouteTest.php
Expand Up @@ -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']);
Expand Down
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion tests/test_app/TestApp/Shell/Task/SampleTask.php
Expand Up @@ -29,4 +29,4 @@ public function getOptionParser()
]);
return $parser;
}
}
}

0 comments on commit 55140a9

Please sign in to comment.