Browse Source

cs standard corrections for doc blocks

euromark 11 years ago
parent
commit
e2d79f186c

+ 1 - 1
src/Auth/AbstractPasswordHasher.php

@@ -69,7 +69,7 @@ abstract class AbstractPasswordHasher {
  * on is the one provided by default in php 5.5+ or any compatible library
  *
  * @param string $password The password to verify
- * @return boolean
+ * @return bool
  */
 	public function needsRehash($password) {
 		return password_needs_rehash($password, PASSWORD_DEFAULT);

+ 1 - 1
src/Auth/FallbackPasswordHasher.php

@@ -90,7 +90,7 @@ class FallbackPasswordHasher extends AbstractPasswordHasher {
  * in the list of hashers
  *
  * @param string $password The password to verify
- * @return boolean
+ * @return bool
  */
 	public function needsRehash($password) {
 		return $this->_hashers[0]->needsRehash($password);

+ 1 - 1
src/Auth/SimplePasswordHasher.php

@@ -59,7 +59,7 @@ class SimplePasswordHasher extends AbstractPasswordHasher {
  * created with anything else than the passwords generated by this class.
  *
  * @param string $password The password to verify
- * @return boolean
+ * @return bool
  */
 	public function needsRehash($password) {
 		return password_needs_rehash($password, $this->_config['hashType']);

+ 2 - 2
src/Cache/Engine/FileEngine.php

@@ -317,7 +317,7 @@ class FileEngine extends CacheEngine {
  * Not implemented
  *
  * @param string $key The key to decrement
- * @param integer $offset The number to offset
+ * @param int $offset The number to offset
  * @return void
  * @throws \Cake\Error\Exception
  */
@@ -329,7 +329,7 @@ class FileEngine extends CacheEngine {
  * Not implemented
  *
  * @param string $key The key to decrement
- * @param integer $offset The number to offset
+ * @param int $offset The number to offset
  * @return void
  * @throws \Cake\Error\Exception
  */

+ 2 - 2
src/Cache/Engine/XcacheEngine.php

@@ -145,10 +145,10 @@ class XcacheEngine extends CacheEngine {
 /**
  * Delete all keys from the cache
  *
- * @param boolean $check If true no deletes will occur and instead CakePHP will rely
+ * @param bool $check If true no deletes will occur and instead CakePHP will rely
  *   on key TTL values.
  *   Unused for Xcache engine.
- * @return boolean True if the cache was successfully cleared, false otherwise
+ * @return bool True if the cache was successfully cleared, false otherwise
  */
 	public function clear($check) {
 		$this->_auth();

+ 2 - 2
src/Console/Command/OrmCacheShell.php

@@ -33,7 +33,7 @@ class OrmCacheShell extends Shell {
  * Build metadata.
  *
  * @param $name string
- * @return boolean
+ * @return bool
  */
 	public function build($name = null) {
 		$schema = $this->_getSchema();
@@ -60,7 +60,7 @@ class OrmCacheShell extends Shell {
  * Clear metadata.
  *
  * @param $name string
- * @return boolean
+ * @return bool
  */
 	public function clear($name = null) {
 		$schema = $this->_getSchema();

+ 2 - 2
src/Console/Command/Task/ExtractTask.php

@@ -563,8 +563,8 @@ class ExtractTask extends Shell {
 /**
  * Get the strings from the position forward
  *
- * @param integer &$position Actual position on tokens array
- * @param integer $target Number of strings to extract
+ * @param int &$position Actual position on tokens array
+ * @param int $target Number of strings to extract
  * @return array Strings extracted
  */
 	protected function _getStrings(&$position, $target) {

+ 1 - 1
src/Console/Command/Task/FixtureTask.php

@@ -312,7 +312,7 @@ class FixtureTask extends BakeTask {
  * Generate String representation of Records
  *
  * @param array $tableInfo Table schema array
- * @param integer $recordCount The number of records to generate.
+ * @param int $recordCount The number of records to generate.
  * @return array Array of records to use in the fixture.
  */
 	protected function _generateRecords(Table $table, $recordCount = 1) {

+ 1 - 1
src/Console/Command/Task/ProjectTask.php

@@ -115,7 +115,7 @@ class ProjectTask extends BakeTask {
  * Search the $PATH for composer.
  *
  * @param array $path The paths to search.
- * @return string|boolean
+ * @return string|bool
  */
 	protected function _searchPath($path) {
 		$composer = ['composer.phar', 'composer'];

+ 1 - 1
src/Console/Shell.php

@@ -320,7 +320,7 @@ class Shell {
  * or methods on tasks.
  *
  * @param array $argv Array of arguments to run the shell with. This array should be missing the shell name.
- * @param boolean $autoMethod Set to true to allow any public method to be called even if it
+ * @param bool $autoMethod Set to true to allow any public method to be called even if it
  *   was not defined as a subcommand. This is used by ShellDispatcher to make building simple shells easy.
  * @return void
  * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::runCommand

+ 1 - 1
src/Console/ShellDispatcher.php

@@ -193,7 +193,7 @@ class ShellDispatcher {
  * Check if a shell class exists for the given name.
  *
  * @param string $shell The shell name to look for.
- * @return string|boolean Either the classname or false.
+ * @return string|bool Either the classname or false.
  */
 	protected function _shellExists($shell) {
 		$class = array_map('Cake\Utility\Inflector::camelize', explode('.', $shell));

+ 2 - 2
src/Database/Driver/Sqlserver.php

@@ -47,7 +47,7 @@ class Sqlserver extends \Cake\Database\Driver {
 /**
  * Establishes a connection to the database server
  *
- * @return boolean true on success
+ * @return bool true on success
  */
 	public function connect() {
 		if ($this->_connection) {
@@ -85,7 +85,7 @@ class Sqlserver extends \Cake\Database\Driver {
 /**
  * Returns whether PHP is able to use this driver for connecting to database
  *
- * @return boolean true if it is valid to use this driver
+ * @return bool true if it is valid to use this driver
  */
 	public function enabled() {
 		return in_array('sqlsrv', PDO::getAvailableDrivers());

+ 1 - 1
src/Database/Expression/FunctionExpression.php

@@ -83,7 +83,7 @@ class FunctionExpression extends QueryExpression {
  * If associative the key would be used as argument when value is 'literal'
  * @param array $types associative array of types to be associated with the
  * passed arguments
- * @param boolean $prepend Whehter to prepend or append to the list of arguments
+ * @param bool $prepend Whehter to prepend or append to the list of arguments
  * @see FunctionExpression::__construct() for more details.
  * @return FunctionExpression
  */

+ 1 - 1
src/Database/Type/DateTimeType.php

@@ -51,7 +51,7 @@ class DateTimeType extends \Cake\Database\Type {
 /**
  * Convert DateTime instance into strings.
  *
- * @param string|integer|DateTime $value The value to convert.
+ * @param string|int|\DateTime $value The value to convert.
  * @param Driver $driver The driver instance to convert with.
  * @return string
  */

+ 3 - 3
src/Network/Session.php

@@ -45,7 +45,7 @@ class Session {
 /**
  * Indicates whether the sessions has already started
  *
- * @var boolean
+ * @var bool
  */
 	protected $_started;
 
@@ -59,7 +59,7 @@ class Session {
 /**
  * Whehter this session is running under a CLI environment
  *
- * @var boolean
+ * @var bool
  */
 	protected $_isCli = false;
 
@@ -581,7 +581,7 @@ class Session {
  * Returns true if the session is no longer valid because the last time it was
  * accessed was after the configured timeout.
  *
- * @return boolean
+ * @return bool
  */
 	protected function _timedOut() {
 		$time = $this->read('Config.time');

+ 1 - 1
src/ORM/Table.php

@@ -1769,7 +1769,7 @@ class Table implements RepositoryInterface, EventListener {
  * @param mixed $value The value of column to be checked for uniqueness
  * @param array $options The options array, optionally containing the 'scope' key
  * @param array $context The validation context as provided by the validation routine
- * @return boolean true if the value is unique
+ * @return bool true if the value is unique
  */
 	public function validateUnique($value, array $options, array $context = []) {
 		if (empty($context)) {

+ 1 - 1
src/Routing/DispatcherFilter.php

@@ -143,7 +143,7 @@ class DispatcherFilter implements EventListener {
  * Check to see if the incoming request matches this filter's criteria.
  *
  * @param \Cake\Event\Event $event The event to match.
- * @return boolean
+ * @return bool
  */
 	public function matches(Event $event) {
 		$request = $event->data['request'];

+ 2 - 2
src/TestSuite/TestCase.php

@@ -240,7 +240,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
  * @param string $needle The string to search for.
  * @param string $haystack The string to search through.
  * @param string $message The message to display on failure.
- * @param boolean $ignoreCase Whether or not the search should be case-sensitive.
+ * @param bool $ignoreCase Whether or not the search should be case-sensitive.
  * @return void
  */
 	public function assertTextContains($needle, $haystack, $message = '', $ignoreCase = false) {
@@ -256,7 +256,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
  * @param string $needle The string to search for.
  * @param string $haystack The string to search through.
  * @param string $message The message to display on failure.
- * @param boolean $ignoreCase Whether or not the search should be case-sensitive.
+ * @param bool $ignoreCase Whether or not the search should be case-sensitive.
  * @return void
  */
 	public function assertTextNotContains($needle, $haystack, $message = '', $ignoreCase = false) {

+ 1 - 1
src/Utility/Number.php

@@ -241,7 +241,7 @@ class Number {
  * Alternative number_format() to accommodate multibyte decimals and thousands < PHP 5.4
  *
  * @param float $value Value to format.
- * @param integer $places Decimal places to use.
+ * @param int $places Decimal places to use.
  * @param string $decimals Decimal position string.
  * @param string $thousands Thousands separator string.
  * @return string

+ 3 - 3
src/Validation/Validation.php

@@ -107,9 +107,9 @@ class Validation {
  * Alias of Validator::lengthBetween() for backwards compatibility.
  *
  * @param string $check Value to check for length
- * @param integer $min Minimum value in range (inclusive)
- * @param integer $max Maximum value in range (inclusive)
- * @return boolean Success
+ * @param int $min Minimum value in range (inclusive)
+ * @param int $max Maximum value in range (inclusive)
+ * @return bool Success
  * @see Validator::lengthBetween()
  * @deprecated 2.6 Use Validator::lengthBetween() instead.
  */

+ 1 - 1
src/View/Helper/CacheHelper.php

@@ -284,7 +284,7 @@ class CacheHelper extends Helper {
  *
  * @param string $content view content to write to a cache file.
  * @param string $timestamp Duration to set for cache file.
- * @param boolean $useCallbacks Whether to include statements in cached file which
+ * @param bool $useCallbacks Whether to include statements in cached file which
  *   run callbacks.
  * @return bool success of caching view.
  */

+ 1 - 1
src/View/Helper/NumberHelper.php

@@ -98,7 +98,7 @@ class NumberHelper extends Helper {
 /**
  * Returns a formatted-for-humans file size.
  *
- * @param integer $size Size in bytes
+ * @param int $size Size in bytes
  * @return string Human readable size
  * @see \Cake\Utility\Number::toReadableSize()
  * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::toReadableSize

+ 1 - 1
src/View/Helper/TextHelper.php

@@ -309,7 +309,7 @@ class TextHelper extends Helper {
  * - `exact` If false, $text will not be cut mid-word
  *
  * @param string $text String to truncate.
- * @param integer $length Length of returned string, including ellipsis.
+ * @param int $length Length of returned string, including ellipsis.
  * @param array $options An array of html attributes and options.
  * @return string Trimmed string.
  * @see String::tail()

+ 1 - 1
src/View/JsonView.php

@@ -58,7 +58,7 @@ class JsonView extends View {
 /**
  * JSON layouts are located in the json sub directory of `Layouts/`
  *
- * @var string 
+ * @var string
  */
 	public $layoutPath = 'json';