Mark Scherer 9 年之前
父节点
当前提交
565f7a32b4

+ 2 - 2
src/Auth/AuthUserTrait.php

@@ -25,8 +25,8 @@ if (!defined('USER_RIGHT_KEY')) {
  * to be implemented in the using class.
  *
  * Expects the Role session infos to be either
- * 	- `Auth.User.role_id` (single) or
- * 	- `Auth.User.Role` (multi - flat array of roles, or array role data)
+ *     - `Auth.User.role_id` (single) or
+ *     - `Auth.User.Role` (multi - flat array of roles, or array role data)
  * and can be adjusted via constants and defined().
  * Same goes for Right data.
  *

+ 1 - 1
src/Mailer/Email.php

@@ -25,7 +25,7 @@ class Email extends CakeEmail {
 
 	/**
 	 * @param string|null $config
-     */
+	 */
 	public function __construct($config = null) {
 		if ($config === null) {
 			$config = 'default';

+ 16 - 16
src/Model/Behavior/SluggedBehavior.php

@@ -26,31 +26,31 @@ class SluggedBehavior extends Behavior {
 	 * Default config
 	 *
 	 * - label:
-	 * 	set to the name of a field to use for the slug, an array of fields to use as slugs or leave as null to rely
-	 * 	on the format returned by find('list') to determine the string to use for slugs
+	 *     set to the name of a field to use for the slug, an array of fields to use as slugs or leave as null to rely
+	 *     on the format returned by find('list') to determine the string to use for slugs
 	 * - field: The slug field name
 	 * - overwriteField: The boolean field to trigger overwriting if "overwrite" is false
 	 * - mode: has the following values
-	 * 	ascii - retuns an ascii slug generated using the core Inflector::slug() function
-	 * 	display - a dummy mode which returns a slug legal for display - removes illegal (not unprintable) characters
-	 * 	url - returns a slug appropriate to put in a URL
-	 * 	class - a dummy mode which returns a slug appropriate to put in a html class (there are no restrictions)
-	 * 	id - retuns a slug appropriate to use in a html id
+	 *     ascii - retuns an ascii slug generated using the core Inflector::slug() function
+	 *     display - a dummy mode which returns a slug legal for display - removes illegal (not unprintable) characters
+	 *     url - returns a slug appropriate to put in a URL
+	 *     class - a dummy mode which returns a slug appropriate to put in a html class (there are no restrictions)
+	 *     id - retuns a slug appropriate to use in a html id
 	 * - separator: The separator to use
 	 * - length:
 	 *  Set to 0 for no length. Will be auto-detected if possible via schema.
 	 * - overwrite: has 2 values
-	 * 	false - once the slug has been saved, do not change it (use if you are doing lookups based on slugs)
-	 * 	true - if the label field values change, regenerate the slug (use if you are the slug is just window-dressing)
+	 *     false - once the slug has been saved, do not change it (use if you are doing lookups based on slugs)
+	 *     true - if the label field values change, regenerate the slug (use if you are the slug is just window-dressing)
 	 * - unique: has 2 values
-	 * 	false - will not enforce a unique slug, whatever the label is is direclty slugged without checking for duplicates
-	 * 	true - use if you are doing lookups based on slugs (see overwrite)
+	 *     false - will not enforce a unique slug, whatever the label is is direclty slugged without checking for duplicates
+	 *     true - use if you are doing lookups based on slugs (see overwrite)
 	 * - case: has the following values
-	 * 	null - don't change the case of the slug
-	 * 	low - force lower case. E.g. "this-is-the-slug"
-	 * 	up - force upper case E.g. "THIS-IS-THE-SLUG"
-	 * 	title - force title case. E.g. "This-Is-The-Slug"
-	 * 	camel - force CamelCase. E.g. "ThisIsTheSlug"
+	 *     null - don't change the case of the slug
+	 *     low - force lower case. E.g. "this-is-the-slug"
+	 *     up - force upper case E.g. "THIS-IS-THE-SLUG"
+	 *     title - force title case. E.g. "This-Is-The-Slug"
+	 *     camel - force CamelCase. E.g. "ThisIsTheSlug"
 	 * - replace: custom replacements as array
 	 * - on: beforeSave or beforeRules
 	 * - scope: certain conditions to use as scope

+ 5 - 5
src/Model/Table/Table.php

@@ -38,7 +38,7 @@ class Table extends ShimTable {
  *
  * {{{
  * $validator->add('email', [
- *	'unique' => ['rule' => 'validateUnique', 'provider' => 'table']
+ *    'unique' => ['rule' => 'validateUnique', 'provider' => 'table']
  * ])
  * }}}
  *
@@ -46,10 +46,10 @@ class Table extends ShimTable {
  *
  * {{{
  * $validator->add('email', [
- *	'unique' => [
- *		'rule' => ['validateUnique', ['scope' => 'site_id']],
- *		'provider' => 'table'
- *	]
+ *    'unique' => [
+ *        'rule' => ['validateUnique', ['scope' => 'site_id']],
+ *        'provider' => 'table'
+ *    ]
  * ]);
  * }}}
  *

+ 1 - 1
src/Utility/Mime.php

@@ -8,7 +8,7 @@ use Cake\Network\Response;
  *
  * @version 1.0
  * @license MIT
- * @author	Mark Scherer
+ * @author Mark Scherer
  */
 class Mime extends Response {
 

+ 4 - 4
src/Utility/Text.php

@@ -269,11 +269,11 @@ class Text extends CakeText {
 	 * Limit the number of words in a string.
 	 *
 	 * <code>
-	 *		// Returns "This is a..."
-	 *		echo TextExt::maxWords('This is a sentence.', 3);
+	 *    // Returns "This is a..."
+	 *    echo TextExt::maxWords('This is a sentence.', 3);
 	 *
-	 *		// Limit the number of words and append a custom ending
-	 *		echo Str::words('This is a sentence.', 3, '---');
+	 *    // Limit the number of words and append a custom ending
+	 *    echo Str::words('This is a sentence.', 3, '---');
 	 * </code>
 	 *
 	 * @param string  $value

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

@@ -72,7 +72,7 @@ class QrCodeHelper extends Helper {
 	 * QrCodeHelper constructor.
 	 * @param \Cake\View\View $View
 	 * @param array $config
-     */
+	 */
 	public function __construct(View $View, array $config) {
 		parent::__construct($View, $config);
 

+ 20 - 20
src/View/Helper/TreeHelper.php

@@ -82,33 +82,33 @@ class TreeHelper extends Helper {
 	 * Tree generation method.
 	 *
 	 * Accepts the results of
-	 * 	find('all', array('fields' => array('lft', 'rght', 'whatever'), 'order' => 'lft ASC'));
-	 * 	children(); // if you have the tree behavior of course!
+	 *     find('all', array('fields' => array('lft', 'rght', 'whatever'), 'order' => 'lft ASC'));
+	 *     children(); // if you have the tree behavior of course!
 	 * or 	find('threaded'); and generates a tree structure of the data.
 	 *
 	 * Settings (2nd parameter):
-	 *	'model' => name of the model (key) to look for in the data array. defaults to the first model for the current
+	 *    'model' => name of the model (key) to look for in the data array. defaults to the first model for the current
 	 * controller. If set to false 2d arrays will be allowed/expected.
-	 *	'alias' => the array key to output for a simple ul (not used if element or callback is specified)
-	 *	'type' => type of output defaults to ul
-	 *	'itemType => type of item output default to li
-	 *	'id' => id for top level 'type'
-	 *	'class' => class for top level 'type'
-	 *	'element' => path to an element to render to get node contents.
-	 *	'callback' => callback to use to get node contents. e.g. array(&$anObject, 'methodName') or 'floatingMethod'
-	 *	'autoPath' => array($left, $right [$classToAdd = 'active']) if set any item in the path will have the class $classToAdd added. MPTT only.
+	 *    'alias' => the array key to output for a simple ul (not used if element or callback is specified)
+	 *    'type' => type of output defaults to ul
+	 *    'itemType => type of item output default to li
+	 *    'id' => id for top level 'type'
+	 *    'class' => class for top level 'type'
+	 *    'element' => path to an element to render to get node contents.
+	 *    'callback' => callback to use to get node contents. e.g. array(&$anObject, 'methodName') or 'floatingMethod'
+	 *    'autoPath' => array($left, $right [$classToAdd = 'active']) if set any item in the path will have the class $classToAdd added. MPTT only.
 	 *  'hideUnrelated' => if unrelated (not children, not siblings) should be hidden, needs 'treePath', true/false or array/string for callback
 	 *  'treePath' => treePath to insert into callback/element
-	 *	'left' => name of the 'lft' field if not lft. only applies to MPTT data
-	 *	'right' => name of the 'rght' field if not rght. only applies to MPTT data
-	 *	'depth' => used internally when running recursively, can be used to override the depth in either mode.
+	 *    'left' => name of the 'lft' field if not lft. only applies to MPTT data
+	 *    'right' => name of the 'rght' field if not rght. only applies to MPTT data
+	 *    'depth' => used internally when running recursively, can be used to override the depth in either mode.
 	 *  'maxDepth' => used to control the depth upto which to generate tree
-	 *	'firstChild' => used internally when running recursively.
-	 *	'splitDepth' => if multiple "parallel" types are required, instead of one big type, nominate the depth to do so here
-	 *		example: useful if you have 30 items to display, and you'd prefer they appeared in the source as 3 lists of 10 to be able to
-	 *		style/float them.
-	 *	'splitCount' => the number of "parallel" types. defaults to null (disabled) set the splitCount,
-	 *		and optionally set the splitDepth to get parallel lists
+	 *    'firstChild' => used internally when running recursively.
+	 *    'splitDepth' => if multiple "parallel" types are required, instead of one big type, nominate the depth to do so here
+	 *        example: useful if you have 30 items to display, and you'd prefer they appeared in the source as 3 lists of 10 to be able to
+	 *        style/float them.
+	 *    'splitCount' => the number of "parallel" types. defaults to null (disabled) set the splitCount,
+	 *        and optionally set the splitDepth to get parallel lists
 	 *
 	 * @param array|\Cake\Orm\Query $data Data to loop over
 	 * @param array $config Config