Merge pull request #1400 from dereuromark/master

Coding standards whitespace
This commit is contained in:
Mark Story 2013-07-05 06:29:08 -07:00
commit 6dd24cc1bd
33 changed files with 57 additions and 56 deletions

View file

@ -542,7 +542,7 @@ class Shell extends Object {
*
* There are 3 built-in output level. Shell::QUIET, Shell::NORMAL, Shell::VERBOSE.
* The verbose and quiet output levels, map to the `verbose` and `quiet` output switches
* present in most shells. Using Shell::QUIET for a message means it will always display.
* present in most shells. Using Shell::QUIET for a message means it will always display.
* While using Shell::VERBOSE means it will only display when verbose output is toggled.
*
* @param string|array $message A string or a an array of strings to output

View file

@ -18,7 +18,7 @@
*/
?>
<div class="<?php echo $pluralVar; ?> view">
<h2><?php echo "<?php echo __('{$singularHumanName}'); ?>"; ?></h2>
<h2><?php echo "<?php echo __('{$singularHumanName}'); ?>"; ?></h2>
<dl>
<?php
foreach ($fields as $field) {

View file

@ -28,15 +28,15 @@ App::uses('FormAuthenticate', 'Controller/Component/Auth');
* )
* }}}
*
* When configuring BlowfishAuthenticate you can pass in settings to which fields, model and additional conditions
* When configuring BlowfishAuthenticate you can pass in settings to which fields, model and additional conditions
* are used. See FormAuthenticate::$settings for more information.
*
* For initial password hashing/creation see Security::hash(). Other than how the password is initially hashed,
* BlowfishAuthenticate works exactly the same way as FormAuthenticate.
*
* @package Cake.Controller.Component.Auth
* @since CakePHP(tm) v 2.3
* @see AuthComponent::$authenticate
* @package Cake.Controller.Component.Auth
* @since CakePHP(tm) v 2.3
* @see AuthComponent::$authenticate
*/
class BlowfishAuthenticate extends FormAuthenticate {

View file

@ -24,7 +24,7 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth');
* password using `DigestAuthenticate::password()`. If you wish to use digest authentication alongside other
* authentication methods, its recommended that you store the digest authentication separately.
*
* Clients using Digest Authentication must support cookies. Since AuthComponent identifies users based
* Clients using Digest Authentication must support cookies. Since AuthComponent identifies users based
* on Session contents, clients without support for cookies will not function properly.
*
* ### Using Digest auth

View file

@ -62,7 +62,7 @@ class CookieComponent extends Component {
* $this->Cookie->path = '/';
*
* The path on the server in which the cookie will be available on.
* If public $cookiePath is set to '/foo/', the cookie will only be available
* If public $cookiePath is set to '/foo/', the cookie will only be available
* within the /foo/ directory and all sub-directories such as /foo/bar/ of domain.
* The default value is the entire domain.
*

View file

@ -110,9 +110,9 @@ class Object {
* Calls a method on this object with the given parameters. Provides an OO wrapper
* for `call_user_func_array`
*
* @param string $method Name of the method to call
* @param array $params Parameter list to use when calling $method
* @return mixed Returns the result of the method call
* @param string $method Name of the method to call
* @param array $params Parameter list to use when calling $method
* @return mixed Returns the result of the method call
*/
public function dispatchMethod($method, $params = array()) {
switch (count($params)) {

View file

@ -32,7 +32,7 @@ App::uses('Router', 'Routing');
*
* ### Uncaught exceptions
*
* When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown
* When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown
* and it is a type that ErrorHandler does not know about it will be treated as a 500 error.
*
* ### Implementing application specific exception handling

View file

@ -30,7 +30,7 @@ App::uses('Controller', 'Controller');
* Exception Renderer.
*
* Captures and handles all unhandled exceptions. Displays helpful framework errors when debug > 1.
* When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown
* When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown
* and it is a type that ExceptionHandler does not know about it will be treated as a 500 error.
*
* ### Implementing application specific exception rendering

View file

@ -88,7 +88,7 @@ class ContainableBehavior extends ModelBehavior {
* )));
* }}}
*
* @param Model $Model Model using the behavior
* @param Model $Model Model using the behavior
* @param array $query Query parameters as set by cake
* @return array
*/

View file

@ -105,7 +105,7 @@ class TreeBehavior extends ModelBehavior {
/**
* Runs before a find() operation
*
* @param Model $Model Model using the behavior
* @param Model $Model Model using the behavior
* @param array $query Query parameters as set by cake
* @return array
*/

View file

@ -173,7 +173,7 @@ class DataSource extends Object {
/**
* Converts column types to basic types
*
* @param string $real Real column type (i.e. "varchar(255)")
* @param string $real Real column type (i.e. "varchar(255)")
* @return string Abstract column type (i.e. "string")
*/
public function column($real) {

View file

@ -328,7 +328,7 @@ class Postgres extends DboSource {
* @param string|Model $table A string or model class representing the table to be truncated
* @param boolean $reset true for resetting the sequence, false to leave it as is.
* and if 1, sequences are not modified
* @return boolean SQL TRUNCATE TABLE statement, false if not applicable.
* @return boolean SQL TRUNCATE TABLE statement, false if not applicable.
*/
public function truncate($table, $reset = false) {
$table = $this->fullTableName($table, false, false);

View file

@ -227,7 +227,7 @@ class Sqlite extends DboSource {
* primary key, where applicable.
*
* @param string|Model $table A string or model class representing the table to be truncated
* @return boolean SQL TRUNCATE TABLE statement, false if not applicable.
* @return boolean SQL TRUNCATE TABLE statement, false if not applicable.
*/
public function truncate($table) {
$this->_execute('DELETE FROM sqlite_sequence where name=' . $this->startQuote . $this->fullTableName($table, false, false) . $this->endQuote);

View file

@ -2031,7 +2031,7 @@ class DboSource extends DataSource {
* primary key, where applicable.
*
* @param Model|string $table A string or model class representing the table to be truncated
* @return boolean SQL TRUNCATE TABLE statement, false if not applicable.
* @return boolean SQL TRUNCATE TABLE statement, false if not applicable.
*/
public function truncate($table) {
return $this->execute('TRUNCATE TABLE ' . $this->fullTableName($table));

View file

@ -948,7 +948,7 @@ class Model extends Object implements CakeEventListener {
* unbound models that are not made permanent will reset with the next call to Model::find()
*
* @param array $params Set of bindings to unbind (indexed by binding type)
* @param boolean $reset Set to false to make the unbinding permanent
* @param boolean $reset Set to false to make the unbinding permanent
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#creating-and-destroying-associations-on-the-fly
*/

View file

@ -559,7 +559,7 @@ class CakeRequest implements ArrayAccess {
* e.g `addDetector('post', array('param' => 'requested', 'value' => 1)`
*
* @param string $name The name of the detector.
* @param array $options The options for the detector definition. See above.
* @param array $options The options for the detector definition. See above.
* @return void
*/
public function addDetector($name, $options) {

View file

@ -778,9 +778,9 @@ class CakeResponse {
* This method controls the `public` or `private` directive in the Cache-Control
* header
*
* @param boolean $public if set to true, the Cache-Control header will be set as public
* if set to false, the response will be set to private
* if no value is provided, it will return whether the response is sharable or not
* @param boolean $public If set to true, the Cache-Control header will be set as public
* if set to false, the response will be set to private
* if no value is provided, it will return whether the response is sharable or not
* @param integer $time time in seconds after which the response should no longer be considered fresh
* @return boolean
*/
@ -858,7 +858,7 @@ class CakeResponse {
* If called with no parameters, this function will return whether must-revalidate is present.
*
* @param integer $seconds if null, the method will return the current
* must-revalidate value
* must-revalidate value
* @return boolean
*/
public function mustRevalidate($enable = null) {
@ -968,7 +968,7 @@ class CakeResponse {
* value is returned
*
* @param string|array $cacheVariances a single Vary string or a array
* containing the list for variances.
* containing the list for variances.
* @return array
*/
public function vary($cacheVariances = null) {
@ -1000,7 +1000,7 @@ class CakeResponse {
*
* @param string $hash the unique has that identifies this response
* @param boolean $weak whether the response is semantically the same as
* other with the same hash or not
* other with the same hash or not
* @return string
*/
public function etag($tag = null, $weak = false) {

View file

@ -578,7 +578,7 @@ class PaginatorComponentTest extends CakeTestCase {
}
/**
* test paginate() and model default order
* test paginate() and model default order
*
* @return void
*/

View file

@ -813,7 +813,7 @@ class AppTest extends CakeTestCase {
}
/**
* Tests that App::location() returns the defined path for a class
* Tests that App::location() returns the defined path for a class
*
* @return void
*/

View file

@ -738,7 +738,7 @@ class PostgresTest extends CakeTestCase {
}
/**
* Test the alterSchema RENAME statements
* Test the alterSchema RENAME statements
*
* @return void
*/

View file

@ -861,7 +861,7 @@ class DboSourceTest extends CakeTestCase {
$Comment->find('all', array('recursive' => 2)); // ensure Model descriptions are saved
$this->db->getLog();
// case: Comment belongsTo User and Article
// case: Comment belongsTo User and Article
$Comment->unbindModel(array(
'hasOne' => array('Attachment')
));

View file

@ -4573,7 +4573,7 @@ class ModelWriteTest extends BaseModelTest {
$result = $model->saveAll(array(
'Article' => array(
'title' => 'Post with Author',
'body' => 'This post will be saved author'
'body' => 'This post will be saved author'
),
'Comment' => array(
array('comment' => 'First new comment'),
@ -5977,7 +5977,7 @@ class ModelWriteTest extends BaseModelTest {
$result = $model->saveAssociated(array(
'Article' => array(
'title' => 'Post with Author',
'body' => 'This post will be saved author'
'body' => 'This post will be saved author'
),
'Comment' => array(
array('comment' => 'First new comment'),

View file

@ -73,7 +73,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
* If no TestResult object is passed a new one will be created.
* This method is run for each test method in this class
*
* @param PHPUnit_Framework_TestResult $result
* @param PHPUnit_Framework_TestResult $result
* @return PHPUnit_Framework_TestResult
* @throws InvalidArgumentException
*/

View file

@ -372,7 +372,8 @@ class CakeHtmlReporter extends CakeBaseReporter {
/**
* A test suite started.
*
* @param PHPUnit_Framework_TestSuite $suite
* @param PHPUnit_Framework_TestSuite $suite
* @return void
*/
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
if (!$this->_headerSent) {

View file

@ -371,7 +371,7 @@ class CakeNumber {
/**
* Getter/setter for default currency
*
* @param string $currency Default currency string used by currency() if $currency argument is not provided
* @param string $currency Default currency string used by currency() if $currency argument is not provided
* @return string Currency
*/
public static function defaultCurrency($currency = null) {

View file

@ -203,8 +203,8 @@ class ClassRegistry {
/**
* Add $object to the registry, associating it with the name $key.
*
* @param string $key Key for the object in registry
* @param object $object Object to store
* @param string $key Key for the object in registry
* @param object $object Object to store
* @return boolean True if the object was written, false if $key already exists
*/
public static function addObject($key, $object) {
@ -220,7 +220,7 @@ class ClassRegistry {
/**
* Remove object which corresponds to given key.
*
* @param string $key Key of object to remove from registry
* @param string $key Key of object to remove from registry
* @return void
*/
public static function removeObject($key) {

View file

@ -701,7 +701,7 @@ class Debugger {
* straight HTML output, or 'txt' for unformatted text.
* @param array $strings Template strings to be used for the output format.
* @return string
* @deprecated Use Debugger::outputAs() and Debugger::addFormat(). Will be removed
* @deprecated Use Debugger::outputAs() and Debugger::addFormat(). Will be removed
* in 3.0
*/
public function output($format = null, $strings = array()) {

View file

@ -457,7 +457,7 @@ class Set {
* This function can be used to see if a single item or a given xpath match certain conditions.
*
* @param string|array $conditions An array of condition strings or an XPath expression
* @param array $data An array of data to execute the match on
* @param array $data An array of data to execute the match on
* @param integer $i Optional: The 'nth'-number of the item being matched.
* @param integer $length
* @return boolean

View file

@ -247,7 +247,7 @@ class Helper extends Object {
* an array of url parameters. Using an array for URLs will allow you to leverage
* the reverse routing features of CakePHP.
* @param boolean $full If true, the full base URL will be prepended to the result
* @return string Full translated URL with base path.
* @return string Full translated URL with base path.
* @link http://book.cakephp.org/2.0/en/views/helpers.html
*/
public function url($url = null, $full = false) {

View file

@ -649,14 +649,14 @@ class FormHelper extends AppHelper {
*
* ### Options:
*
* - `escape` bool Whether or not to html escape the contents of the error.
* - `wrap` mixed Whether or not the error message should be wrapped in a div. If a
* - `escape` bool - Whether or not to html escape the contents of the error.
* - `wrap` mixed - Whether or not the error message should be wrapped in a div. If a
* string, will be used as the HTML tag to use.
* - `class` string The classname for the error message
* - `class` string - The classname for the error message
*
* @param string $field A field name, like "Modelname.fieldname"
* @param string|array $text Error message as string or array of messages.
* If array contains `attributes` key it will be used as options for error container
* If array contains `attributes` key it will be used as options for error container
* @param array $options Rendering options for <div /> wrapper tag
* @return string If there are errors this method returns an error message, otherwise null.
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::error

View file

@ -76,7 +76,7 @@ class NumberHelper extends AppHelper {
/**
* @see CakeNumber::precision()
*
* @param float $number A floating point number.
* @param float $number A floating point number.
* @param integer $precision The precision of the returned number.
* @return float Formatted float.
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::precision

View file

@ -583,7 +583,7 @@ class View extends Object {
*
* @param string $var The view var you want the contents of.
* @return mixed The content of the named var if its set, otherwise null.
* @deprecated Will be removed in 3.0 Use View::get() instead.
* @deprecated Will be removed in 3.0. Use View::get() instead.
*/
public function getVar($var) {
return $this->get($var);

View file

@ -127,7 +127,7 @@ if (!function_exists('sortByKey')) {
*
* @param array $array Array to sort
* @param string $sortby Sort by this key
* @param string $order Sort order asc/desc (ascending or descending).
* @param string $order Sort order asc/desc (ascending or descending).
* @param integer $type Type of sorting to perform
* @return mixed Sorted array
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#sortByKey
@ -233,7 +233,7 @@ if (!function_exists('pr')) {
* Print_r convenience function, which prints out <PRE> tags around
* the output of given array. Similar to debug().
*
* @see debug()
* @see debug()
* @param array $var Variable to print out
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#pr
*/
@ -281,7 +281,7 @@ if (!function_exists('env')) {
* IIS, or SCRIPT_NAME in CGI mode). Also exposes some additional custom
* environment information.
*
* @param string $key Environment variable name.
* @param string $key Environment variable name.
* @return string Environment variable setting.
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#env
*/
@ -382,11 +382,11 @@ if (!function_exists('cache')) {
/**
* Reads/writes temporary data to cache files or session.
*
* @param string $path File path within /tmp to save the file.
* @param mixed $data The data to save to the temporary file.
* @param mixed $expires A valid strtotime string when the data expires.
* @param string $target The target of the cached data; either 'cache' or 'public'.
* @return mixed The contents of the temporary file.
* @param string $path File path within /tmp to save the file.
* @param mixed $data The data to save to the temporary file.
* @param mixed $expires A valid strtotime string when the data expires.
* @param string $target The target of the cached data; either 'cache' or 'public'.
* @return mixed The contents of the temporary file.
* @deprecated Please use Cache::write() instead
*/
function cache($path, $data = null, $expires = '+1 day', $target = 'cache') {