Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
#6288 - removing useless checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jul 27, 2014
1 parent 69f23be commit 251b5bd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions library/Zend/Code/Generator/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,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);
}

Expand All @@ -611,7 +611,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);
}

Expand Down Expand Up @@ -857,10 +857,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();
Expand Down

0 comments on commit 251b5bd

Please sign in to comment.