Skip to content

Commit

Permalink
Remove unneeded condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Stratadox committed Jun 25, 2018
1 parent af263df commit cbf289a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Condition/HaveTheDiscriminatorValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace Stratadox\Deserializer\Condition;

use function is_array;
use Stratadox\Specification\Contract\Specifies;
use Stratadox\Specification\Specifying;

Expand All @@ -27,8 +26,7 @@ public static function of(string $key, string $value): Specifies

public function isSatisfiedBy($input): bool
{
return is_array($input)
&& isset($input[$this->key])
return isset($input[$this->key])
&& (string) $input[$this->key] === $this->value;
}
}

0 comments on commit cbf289a

Please sign in to comment.