Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

coding standards regarding whitespaces

  • Loading branch information...
commit 0f978195d6944d44fb4b0afcfba8b071a576da6a 1 parent 5324a8c
Mark S. dereuromark authored
2  lib/Cake/Model/Behavior/TranslateBehavior.php
View
@@ -129,7 +129,7 @@ public function beforeFind(Model $Model, $query) {
'conditions' => array(
$Model->escapeField() => $db->identifier($RuntimeModel->escapeField('foreign_key')),
$RuntimeModel->escapeField('model') => $Model->name,
- $RuntimeModel->escapeField('locale') => $locale
+ $RuntimeModel->escapeField('locale') => $locale
)
);
$conditionFields = $this->_checkConditions($Model, $query);
6 lib/Cake/Model/CakeSchema.php
View
@@ -418,12 +418,12 @@ public function generateTable($table, $fields) {
}
$col = "\t\t'{$field}' => array('type' => '" . $value['type'] . "', ";
unset($value['type']);
- $col .= implode(', ', $this->_values($value));
+ $col .= implode(', ', $this->_values($value));
} elseif ($field == 'indexes') {
$col = "\t\t'indexes' => array(\n\t\t\t";
$props = array();
foreach ((array)$value as $key => $index) {
- $props[] = "'{$key}' => array(" . implode(', ', $this->_values($index)) . ")";
+ $props[] = "'{$key}' => array(" . implode(', ', $this->_values($index)) . ")";
}
$col .= implode(",\n\t\t\t", $props) . "\n\t\t";
} elseif ($field == 'tableParameters') {
@@ -580,7 +580,7 @@ protected function _values($values) {
if (is_array($values)) {
foreach ($values as $key => $val) {
if (is_array($val)) {
- $vals[] = "'{$key}' => array('" . implode("', '", $val) . "')";
+ $vals[] = "'{$key}' => array('" . implode("', '", $val) . "')";
} elseif (!is_numeric($key)) {
$val = var_export($val, true);
if ($val === 'NULL') {
2  lib/Cake/Utility/ClassRegistry.php
View
@@ -303,7 +303,7 @@ public static function config($type, $param = array()) {
* @param string $class
* @return boolean
*/
- protected function &_duplicate($alias, $class) {
+ protected function &_duplicate($alias, $class) {
$duplicate = false;
if ($this->isKeySet($alias)) {
$model = $this->getObject($alias);
8 lib/Cake/Utility/Debugger.php
View
@@ -295,9 +295,9 @@ public static function trace($options = array()) {
$back = array();
$_trace = array(
- 'line' => '??',
- 'file' => '[internal]',
- 'class' => null,
+ 'line' => '??',
+ 'file' => '[internal]',
+ 'class' => null,
'function' => '[main]'
);
@@ -510,7 +510,7 @@ protected static function _export($var, $depth, $indent) {
protected static function _array(array $var, $depth, $indent) {
$secrets = array(
'password' => '*****',
- 'login' => '*****',
+ 'login' => '*****',
'host' => '*****',
'database' => '*****',
'port' => '*****',
34 lib/Cake/Utility/Validation.php
View
@@ -326,13 +326,13 @@ public static function date($check, $format = 'ymd', $regex = null) {
* Use a string or an array of the keys below. Arrays should be passed as array('dmy', 'mdy', etc)
* ## Keys:
*
- * - dmy 27-12-2006 or 27-12-06 separators can be a space, period, dash, forward slash
- * - mdy 12-27-2006 or 12-27-06 separators can be a space, period, dash, forward slash
- * - ymd 2006-12-27 or 06-12-27 separators can be a space, period, dash, forward slash
- * - dMy 27 December 2006 or 27 Dec 2006
- * - Mdy December 27, 2006 or Dec 27, 2006 comma is optional
- * - My December 2006 or Dec 2006
- * - my 12/2006 separators can be a space, period, dash, forward slash
+ * - dmy 27-12-2006 or 27-12-06 separators can be a space, period, dash, forward slash
+ * - mdy 12-27-2006 or 12-27-06 separators can be a space, period, dash, forward slash
+ * - ymd 2006-12-27 or 06-12-27 separators can be a space, period, dash, forward slash
+ * - dMy 27 December 2006 or 27 Dec 2006
+ * - Mdy December 27, 2006 or Dec 27, 2006 comma is optional
+ * - My December 2006 or Dec 2006
+ * - my 12/2006 separators can be a space, period, dash, forward slash
* @param string $regex Regex for the date part. If a custom regular expression is used this is the only validation that will occur.
* @return boolean True if the value is valid, false otherwise
* @see Validation::date
@@ -616,7 +616,7 @@ public static function phone($check, $regex = null, $country = 'all') {
case 'can':
// includes all NANPA members.
// see http://en.wikipedia.org/wiki/North_American_Numbering_Plan#List_of_NANPA_countries_and_territories
- $regex = '/^(?:\+?1)?[-. ]?\\(?[2-9][0-8][0-9]\\)?[-. ]?[2-9][0-9]{2}[-. ]?[0-9]{4}$/';
+ $regex = '/^(?:\+?1)?[-. ]?\\(?[2-9][0-8][0-9]\\)?[-. ]?[2-9][0-9]{2}[-. ]?[0-9]{4}$/';
break;
}
}
@@ -642,20 +642,20 @@ public static function postal($check, $regex = null, $country = 'us') {
if (is_null($regex)) {
switch ($country) {
case 'uk':
- $regex = '/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
+ $regex = '/\\A\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\b\\z/i';
break;
case 'ca':
- $regex = '/\\A\\b[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]\\b\\z/i';
+ $regex = '/\\A\\b[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]\\b\\z/i';
break;
case 'it':
case 'de':
- $regex = '/^[0-9]{5}$/i';
+ $regex = '/^[0-9]{5}$/i';
break;
case 'be':
- $regex = '/^[1-9]{1}[0-9]{3}$/i';
+ $regex = '/^[1-9]{1}[0-9]{3}$/i';
break;
case 'us':
- $regex = '/\\A\\b[0-9]{5}(?:-[0-9]{4})?\\b\\z/i';
+ $regex = '/\\A\\b[0-9]{5}(?:-[0-9]{4})?\\b\\z/i';
break;
}
}
@@ -701,13 +701,13 @@ public static function ssn($check, $regex = null, $country = null) {
if (is_null($regex)) {
switch ($country) {
case 'dk':
- $regex = '/\\A\\b[0-9]{6}-[0-9]{4}\\b\\z/i';
+ $regex = '/\\A\\b[0-9]{6}-[0-9]{4}\\b\\z/i';
break;
case 'nl':
- $regex = '/\\A\\b[0-9]{9}\\b\\z/i';
+ $regex = '/\\A\\b[0-9]{9}\\b\\z/i';
break;
case 'us':
- $regex = '/\\A\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b\\z/i';
+ $regex = '/\\A\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b\\z/i';
break;
}
}
@@ -943,7 +943,7 @@ public static function uploadError($check) {
*/
protected static function _populateIp() {
if (!isset(self::$_pattern['IPv6'])) {
- $pattern = '((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}';
+ $pattern = '((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}';
$pattern .= '(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})';
$pattern .= '|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})';
$pattern .= '(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)';
2  lib/Cake/Utility/Xml.php
View
@@ -110,7 +110,7 @@ public static function build($input, $options = array()) {
* Parse the input data and create either a SimpleXmlElement object or a DOMDocument.
*
* @param string $input The input to load.
- * @param array $options The options to use. See Xml::build()
+ * @param array $options The options to use. See Xml::build()
* @return SimpleXmlElement|DOMDocument.
*/
protected static function _loadXml($input, $options) {
2  lib/Cake/View/Helper/HtmlHelper.php
View
@@ -558,7 +558,7 @@ public function script($url, $options = array()) {
public function scriptBlock($script, $options = array()) {
$options += array('safe' => true, 'inline' => true);
if ($options['safe']) {
- $script = "\n" . '//<![CDATA[' . "\n" . $script . "\n" . '//]]>' . "\n";
+ $script = "\n" . '//<![CDATA[' . "\n" . $script . "\n" . '//]]>' . "\n";
}
if (!$options['inline'] && empty($options['block'])) {
$options['block'] = 'script';
2  lib/Cake/bootstrap.php
View
@@ -134,7 +134,7 @@
require CAKE . 'Error' . DS . 'exceptions.php';
/**
- * Full url prefix
+ * Full url prefix
*/
if (!defined('FULL_BASE_URL')) {
$s = null;
Please sign in to comment.
Something went wrong with that request. Please try again.