Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1055 from and-ers/master

Optimize and switch array_push() for [] =
  • Loading branch information...
commit a9499882088d6c83ab1a85647ef23e96edf7bd4e 2 parents 83abced + c72c612
@markstory markstory authored
View
4 lib/Cake/Console/ConsoleOptionParser.php
@@ -627,7 +627,7 @@ protected function _optionExists($name) {
*/
protected function _parseArg($argument, $args) {
if (empty($this->_args)) {
- array_push($args, $argument);
+ $args[] = $argument;
return $args;
}
$next = count($args);
@@ -636,7 +636,7 @@ protected function _parseArg($argument, $args) {
}
if ($this->_args[$next]->validChoice($argument)) {
- array_push($args, $argument);
+ $args[] = $argument;
return $args;
}
}
View
2  lib/Cake/Utility/String.php
@@ -523,7 +523,7 @@ class_exists('Multibyte');
}
} else {
foreach ($droppedTags as $closingTag) {
- array_push($openTags, $closingTag[1]);
+ $openTags[] = $closingTag[1];
}
}
}
View
2  lib/Cake/View/ScaffoldView.php
@@ -69,7 +69,7 @@ protected function _getViewFileName($name = null) {
$paths = $this->_paths($this->plugin);
$exts = array($this->ext);
if ($this->ext !== '.ctp') {
- array_push($exts, '.ctp');
+ $exts[] = '.ctp';
}
foreach ($exts as $ext) {
foreach ($paths as $path) {
View
2  lib/Cake/View/View.php
@@ -1058,7 +1058,7 @@ protected function _getLayoutFileName($name = null) {
protected function _getExtensions() {
$exts = array($this->ext);
if ($this->ext !== '.ctp') {
- array_push($exts, '.ctp');
+ $exts[] = '.ctp';
}
return $exts;
}
Please sign in to comment.
Something went wrong with that request. Please try again.