Skip to content

Commit

Permalink
Merge pull request #288 from doctrine/analysis-q5ERdv
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
dbu committed Oct 31, 2017
2 parents 5290b92 + 6397391 commit 5d542a3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(DocumentManager $dm, $referencedClass, $key = self::
$this->dm = $dm;
$this->referencedClass = $referencedClass;

if (!($key === self::KEY_UUID || $key === self::KEY_PATH)) {
if (!(self::KEY_UUID === $key || self::KEY_PATH === $key)) {
throw new \InvalidArgumentException(sprintf(
'Key must be either KEY_UUID or KEY_PATH. Received "%s"',
$key
Expand All @@ -62,7 +62,7 @@ public function transform($collection)
$arr = array();

foreach ($collection as $item) {
$arr[] = ($this->key === self::KEY_UUID) ? $item->getNode()->getIdentifier() : $item->getPath();
$arr[] = (self::KEY_UUID === $this->key) ? $item->getNode()->getIdentifier() : $item->getPath();
}

return $arr;
Expand Down

0 comments on commit 5d542a3

Please sign in to comment.