Skip to content

Commit

Permalink
Fix CS for easier 3.x/4.x comparison/merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 19, 2019
1 parent 68328c1 commit 44a7812
Show file tree
Hide file tree
Showing 422 changed files with 6,405 additions and 6,405 deletions.
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
*/
$versionFile = file(CORE_PATH . 'VERSION.txt');
return [
'Cake.version' => trim(array_pop($versionFile))
'Cake.version' => trim(array_pop($versionFile)),
];
6 changes: 3 additions & 3 deletions src/Auth/BaseAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ abstract class BaseAuthenticate implements EventListenerInterface
protected $_defaultConfig = [
'fields' => [
'username' => 'username',
'password' => 'password'
'password' => 'password',
],
'userModel' => 'Users',
'scope' => [],
'finder' => 'all',
'contain' => null,
'passwordHasher' => 'Default'
'passwordHasher' => 'Default',
];

/**
Expand Down Expand Up @@ -160,7 +160,7 @@ protected function _query($username)
$table = $this->getTableLocator()->get($config['userModel']);

$options = [
'conditions' => [$table->aliasField($config['fields']['username']) => $username]
'conditions' => [$table->aliasField($config['fields']['username']) => $username],
];

if (!empty($config['scope'])) {
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/BasicAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function loginHeaders(ServerRequest $request)
$realm = $this->getConfig('realm') ?: $request->getEnv('SERVER_NAME');

return [
'WWW-Authenticate' => sprintf('Basic realm="%s"', $realm)
'WWW-Authenticate' => sprintf('Basic realm="%s"', $realm),
];
}
}
2 changes: 1 addition & 1 deletion src/Auth/DefaultPasswordHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DefaultPasswordHasher extends AbstractPasswordHasher
*/
protected $_defaultConfig = [
'hashType' => PASSWORD_DEFAULT,
'hashOptions' => []
'hashOptions' => [],
];

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Auth/DigestAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function loginHeaders(ServerRequest $request)
'realm' => $realm,
'qop' => $this->_config['qop'],
'nonce' => $this->generateNonce(),
'opaque' => $this->_config['opaque'] ?: md5($realm)
'opaque' => $this->_config['opaque'] ?: md5($realm),
];

$digest = $this->_getDigest($request);
Expand All @@ -241,7 +241,7 @@ public function loginHeaders(ServerRequest $request)
}

return [
'WWW-Authenticate' => 'Digest ' . implode(',', $opts)
'WWW-Authenticate' => 'Digest ' . implode(',', $opts),
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Auth/FallbackPasswordHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FallbackPasswordHasher extends AbstractPasswordHasher
* @var array
*/
protected $_defaultConfig = [
'hashers' => []
'hashers' => [],
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/Storage/SessionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SessionStorage implements StorageInterface
*/
protected $_defaultConfig = [
'key' => 'Auth.User',
'redirect' => 'Auth.redirect'
'redirect' => 'Auth.redirect',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/WeakPasswordHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class WeakPasswordHasher extends AbstractPasswordHasher
* @var array
*/
protected $_defaultConfig = [
'hashType' => null
'hashType' => null,
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/Engine/FileEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class FileEngine extends CacheEngine
'path' => null,
'prefix' => 'cake_',
'probability' => 100,
'serialize' => true
'serialize' => true,
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/Engine/MemcachedEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function init(array $config = [])
$this->_serializers = [
'igbinary' => Memcached::SERIALIZER_IGBINARY,
'json' => Memcached::SERIALIZER_JSON,
'php' => Memcached::SERIALIZER_PHP
'php' => Memcached::SERIALIZER_PHP,
];
if (defined('Memcached::HAVE_MSGPACK') && Memcached::HAVE_MSGPACK) {
$this->_serializers['msgpack'] = Memcached::SERIALIZER_MSGPACK;
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/Engine/XcacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class XcacheEngine extends CacheEngine
'prefix' => null,
'probability' => 100,
'PHP_AUTH_USER' => 'user',
'PHP_AUTH_PW' => 'password'
'PHP_AUTH_PW' => 'password',
];

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Collection/CollectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ public function combine($keyPath, $valuePath, $groupPath = null)
$options = [
'keyPath' => $this->_propertyExtractor($keyPath),
'valuePath' => $this->_propertyExtractor($valuePath),
'groupPath' => $groupPath ? $this->_propertyExtractor($groupPath) : null
'groupPath' => $groupPath ? $this->_propertyExtractor($groupPath) : null,
];

$mapper = function ($value, $key, $mapReduce) use ($options) {
Expand Down Expand Up @@ -740,7 +740,7 @@ public function listNested($dir = 'desc', $nestingKey = 'children')
$modes = [
'desc' => TreeIterator::SELF_FIRST,
'asc' => TreeIterator::CHILD_FIRST,
'leaves' => TreeIterator::LEAVES_ONLY
'leaves' => TreeIterator::LEAVES_ONLY,
];

return new TreeIterator(
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/Iterator/BufferedIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function valid()
$this->_key = parent::key();
$this->_buffer->push([
'key' => $this->_key,
'value' => $this->_current
'value' => $this->_current,
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Command/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser)
'Get the list of available commands for this application.'
)->addOption('xml', [
'help' => 'Get the listing as XML.',
'boolean' => true
'boolean' => true,
]);

return $parser;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/CommandScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected function scanDir($path, $namespace, $prefix, array $hide)
'file' => $path . $file,
'fullName' => $prefix . $name,
'name' => $name,
'class' => $class
'class' => $class,
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/ConsoleIo.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ public function setLoggers($enable)
if ($enable !== static::QUIET) {
$stdout = new ConsoleLog([
'types' => $outLevels,
'stream' => $this->_out
'stream' => $this->_out,
]);
Log::setConfig('stdout', ['engine' => $stdout]);
}
Expand Down
18 changes: 9 additions & 9 deletions src/Console/ConsoleOptionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@ public function __construct($command = null, $defaultOptions = true)
$this->addOption('help', [
'short' => 'h',
'help' => 'Display this help.',
'boolean' => true
'boolean' => true,
]);

if ($defaultOptions) {
$this->addOption('verbose', [
'short' => 'v',
'help' => 'Enable verbose output.',
'boolean' => true
'boolean' => true,
])->addOption('quiet', [
'short' => 'q',
'help' => 'Enable quiet output.',
'boolean' => true
'boolean' => true,
]);
}
}
Expand Down Expand Up @@ -248,7 +248,7 @@ public function toArray()
'options' => $this->_options,
'subcommands' => $this->_subcommands,
'description' => $this->_description,
'epilog' => $this->_epilog
'epilog' => $this->_epilog,
];

return $result;
Expand Down Expand Up @@ -484,7 +484,7 @@ public function addOption($name, array $options = [])
'help' => '',
'default' => null,
'boolean' => false,
'choices' => []
'choices' => [],
];
$options += $defaults;
$option = new ConsoleInputOption($options);
Expand Down Expand Up @@ -541,7 +541,7 @@ public function addArgument($name, array $params = [])
'help' => '',
'index' => count($this->_args),
'required' => false,
'choices' => []
'choices' => [],
];
$options = $params + $defaults;
$index = $options['index'];
Expand Down Expand Up @@ -629,7 +629,7 @@ public function addSubcommand($name, array $options = [])
$defaults = [
'name' => $name,
'help' => '',
'parser' => null
'parser' => null,
];
$options += $defaults;

Expand Down Expand Up @@ -876,7 +876,7 @@ protected function getCommandError($command)
$this->rootName,
$rootCommand
),
''
'',
];

if ($bestGuess !== null) {
Expand Down Expand Up @@ -905,7 +905,7 @@ protected function getOptionError($option)
$bestGuess = $this->findClosestItem($option, $availableOptions);
$out = [
sprintf('Unknown option `%s`.', $option),
''
'',
];

if ($bestGuess !== null) {
Expand Down
6 changes: 3 additions & 3 deletions src/Console/ConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ConsoleOutput
'blue' => 34,
'magenta' => 35,
'cyan' => 36,
'white' => 37
'white' => 37,
];

/**
Expand All @@ -117,7 +117,7 @@ class ConsoleOutput
'blue' => 44,
'magenta' => 45,
'cyan' => 46,
'white' => 47
'white' => 47,
];

/**
Expand Down Expand Up @@ -149,7 +149,7 @@ class ConsoleOutput
'success' => ['text' => 'green'],
'comment' => ['text' => 'blue'],
'question' => ['text' => 'magenta'],
'notice' => ['text' => 'cyan']
'notice' => ['text' => 'cyan'],
];

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Console/HelpFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function text($width = 72)
$out[] = Text::wrapBlock($command->help($max), [
'width' => $width,
'indent' => str_repeat(' ', $max),
'indentAt' => 1
'indentAt' => 1,
]);
}
$out[] = '';
Expand All @@ -127,7 +127,7 @@ public function text($width = 72)
$out[] = Text::wrapBlock($option->help($max), [
'width' => $width,
'indent' => str_repeat(' ', $max),
'indentAt' => 1
'indentAt' => 1,
]);
}
$out[] = '';
Expand All @@ -142,7 +142,7 @@ public function text($width = 72)
$out[] = Text::wrapBlock($argument->help($max), [
'width' => $width,
'indent' => str_repeat(' ', $max),
'indentAt' => 1
'indentAt' => 1,
]);
}
$out[] = '';
Expand Down
2 changes: 1 addition & 1 deletion src/Console/HelperRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function _throwMissingClassError($class, $plugin)
{
throw new MissingHelperException([
'class' => $class,
'plugin' => $plugin
'plugin' => $plugin,
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/TaskRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function _throwMissingClassError($class, $plugin)
{
throw new MissingTaskException([
'class' => $class,
'plugin' => $plugin
'plugin' => $plugin,
]);
}

Expand Down
8 changes: 4 additions & 4 deletions src/Controller/Component/AuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class AuthComponent extends Component
'authError' => null,
'unauthorizedRedirect' => true,
'storage' => 'Session',
'checkAuthIn' => 'Controller.startup'
'checkAuthIn' => 'Controller.startup',
];

/**
Expand Down Expand Up @@ -488,15 +488,15 @@ protected function _setDefaults()
'flash' => [
'element' => 'error',
'key' => 'flash',
'params' => ['class' => 'error']
'params' => ['class' => 'error'],
],
'loginAction' => [
'controller' => 'Users',
'action' => 'login',
'plugin' => null
'plugin' => null,
],
'logoutRedirect' => $this->_config['loginAction'],
'authError' => __d('cake', 'You are not authorized to access that location.')
'authError' => __d('cake', 'You are not authorized to access that location.'),
];

$config = $this->getConfig();
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Component/FlashComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class FlashComponent extends Component
'element' => 'default',
'params' => [],
'clear' => false,
'duplicate' => true
'duplicate' => true,
];

/**
Expand Down Expand Up @@ -124,7 +124,7 @@ public function set($message, array $options = [])
'message' => $message,
'key' => $options['key'],
'element' => $options['element'],
'params' => $options['params']
'params' => $options['params'],
];

$this->getSession()->write('Flash.' . $options['key'], $messages);
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Component/PaginatorComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PaginatorComponent extends Component
'page' => 1,
'limit' => 20,
'maxLimit' => 100,
'whitelist' => ['limit', 'sort', 'page', 'direction']
'whitelist' => ['limit', 'sort', 'page', 'direction'],
];

/**
Expand Down
Loading

0 comments on commit 44a7812

Please sign in to comment.