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

Commit

Permalink
zendframework/zendframework#6523 - cs fixes, minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jan 1, 2015
1 parent 33067be commit 8420083
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/Hydrator/Strategy/BooleanStrategy.php
Expand Up @@ -21,12 +21,12 @@ class BooleanStrategy implements StrategyInterface
/**
* @var int|string
*/
protected $trueValue;
private $trueValue;

/**
* @var int|string
*/
protected $falseValue;
private $falseValue;

/**
* @param int|string $trueValue
Expand All @@ -49,7 +49,7 @@ public function __construct($trueValue, $falseValue)
));
}

$this->trueValue = $trueValue;
$this->trueValue = $trueValue;
$this->falseValue = $falseValue;
}

Expand All @@ -69,11 +69,7 @@ public function extract($value)
));
}

if ($value === true) {
return $this->trueValue;
}

return $this->falseValue;
return $value === true ? $this->trueValue : $this->falseValue;
}

/**
Expand Down Expand Up @@ -107,5 +103,4 @@ public function hydrate($value)
$this->falseValue
));
}

}

0 comments on commit 8420083

Please sign in to comment.