Openidconnect/Specification/EqualsTo.php 1 location
|
@@ 7-21 (lines=15) @@
|
| 4 |
|
|
| 5 |
|
use Sludio\HelperBundle\Script\Specification\CompositeSpecification; |
| 6 |
|
|
| 7 |
|
class EqualsTo extends CompositeSpecification |
| 8 |
|
{ |
| 9 |
|
use SpecificationTrait; |
| 10 |
|
|
| 11 |
|
public function isSatisfiedBy($expectedValue, $actualValue) |
| 12 |
|
{ |
| 13 |
|
if ($expectedValue === $actualValue) { |
| 14 |
|
return true; |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
$this->message = sprintf("%s is invalid as it does not equal expected %s", $actualValue, $expectedValue); |
| 18 |
|
|
| 19 |
|
return false; |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
Openidconnect/Specification/GreaterOrEqualsTo.php 1 location
|
@@ 7-21 (lines=15) @@
|
| 4 |
|
|
| 5 |
|
use Sludio\HelperBundle\Script\Specification\CompositeSpecification; |
| 6 |
|
|
| 7 |
|
class GreaterOrEqualsTo extends CompositeSpecification |
| 8 |
|
{ |
| 9 |
|
use SpecificationTrait; |
| 10 |
|
|
| 11 |
|
public function isSatisfiedBy($expectedValue, $actualValue) |
| 12 |
|
{ |
| 13 |
|
if ($actualValue >= $expectedValue) { |
| 14 |
|
return true; |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
$this->message = sprintf("%s is invalid as it is not greater than %s", $actualValue, $expectedValue); |
| 18 |
|
|
| 19 |
|
return false; |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
Openidconnect/Specification/LesserOrEqualsTo.php 1 location
|
@@ 7-22 (lines=16) @@
|
| 4 |
|
|
| 5 |
|
use Sludio\HelperBundle\Script\Specification\CompositeSpecification; |
| 6 |
|
|
| 7 |
|
class LesserOrEqualsTo extends CompositeSpecification |
| 8 |
|
{ |
| 9 |
|
use SpecificationTrait; |
| 10 |
|
|
| 11 |
|
public function isSatisfiedBy($expectedValue, $actualValue) |
| 12 |
|
{ |
| 13 |
|
if ($actualValue <= $expectedValue) { |
| 14 |
|
return true; |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
$this->message = sprintf("%s is invalid as it is not less than %s", $actualValue, $expectedValue); |
| 18 |
|
|
| 19 |
|
return false; |
| 20 |
|
|
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|