Skip to content
Permalink
Browse files

Replaced simple and therefore pointless array_push function reference…

…s with the ordinary way of adding an array element. This will increase the performance and the code looks much cleaner this way IMHO
  • Loading branch information...
and-ers committed Jan 2, 2013
1 parent 83abced commit c72c612625588a17a0d4371688f4845699a683cd
@@ -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;
}
}
@@ -523,7 +523,7 @@ class_exists('Multibyte');
}
} else {
foreach ($droppedTags as $closingTag) {
array_push($openTags, $closingTag[1]);
$openTags[] = $closingTag[1];
}
}
}
@@ -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) {
@@ -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;
}

0 comments on commit c72c612

Please sign in to comment.
You can’t perform that action at this time.