| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class ScriptAlreadyReviewedGuard extends Guard |
||
| 21 | { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The exception that will be thrown when the condition is met |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $exception = ScriptAlreadyReviewedException::class; |
||
| 29 | |||
| 30 | |||
| 31 | /** |
||
| 32 | * @var Script |
||
| 33 | */ |
||
| 34 | protected $script; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * ScriptAlreadyReviewedGuard constructor. |
||
| 38 | * @param $script |
||
| 39 | */ |
||
| 40 | public function __construct(Script $script) |
||
| 41 | { |
||
| 42 | $this->script = $script; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * The condition that needs to be satisfied in order to throw the exception. |
||
| 47 | * |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | public function condition(): bool |
||
| 57 | } |
||
| 58 | } |
||
| 59 |