Skip to content
Permalink
Browse files

fix coding standard against code sniffer 2.5.0

  • Loading branch information...
antograssiot committed Dec 15, 2015
1 parent c5394e5 commit 55140a955b5c0048c43b2e559361a2399fed3a83
@@ -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
@@ -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);
@@ -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])
) {
@@ -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,
],
@@ -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']);
@@ -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');
}
}
@@ -29,4 +29,4 @@ public function getOptionParser()
]);
return $parser;
}
}
}

0 comments on commit 55140a9

Please sign in to comment.
You can’t perform that action at this time.