From 58bbe6bd6cfb255e1a8b3ef6c2ad220ef33226e2 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sun, 27 Jul 2014 23:17:50 +0200 Subject: [PATCH] #6288 - removing useless checks --- library/Zend/Code/Generator/ClassGenerator.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/library/Zend/Code/Generator/ClassGenerator.php b/library/Zend/Code/Generator/ClassGenerator.php index b0e05e9faf0..a998130e952 100644 --- a/library/Zend/Code/Generator/ClassGenerator.php +++ b/library/Zend/Code/Generator/ClassGenerator.php @@ -591,7 +591,7 @@ public function addProperty($name, $defaultValue = null, $flags = PropertyGenera // backwards compatibility // @todo remove this on next major version - if($flags === PropertyGenerator::FLAG_CONSTANT) { + if ($flags === PropertyGenerator::FLAG_CONSTANT) { return $this->addConstant($name, $defaultValue); } @@ -618,7 +618,7 @@ public function addPropertyFromGenerator(PropertyGenerator $property) // backwards compatibility // @todo remove this on next major version - if($property->isConst()) { + if ($property->isConst()) { return $this->addConstantFromGenerator($property); } @@ -868,10 +868,9 @@ public function generate() $output .= self::LINE_FEED . '{' . self::LINE_FEED . self::LINE_FEED; $constants = $this->getConstants(); - if(!empty($constants)) { - foreach ($constants as $constant) { - $output .= $constant->generate() . self::LINE_FEED . self::LINE_FEED; - } + + foreach ($constants as $constant) { + $output .= $constant->generate() . self::LINE_FEED . self::LINE_FEED; } $properties = $this->getProperties();