Files
core/hwe/sammo/Constraint/AlwaysFail.php
T
2019-04-21 16:57:05 +09:00

25 lines
581 B
PHP

<?php
namespace sammo\Constraint;
//일일히 클래스를 만들기 싫을 때 간단히 끝내는 Constraint
class AlwaysFail extends Constraint{
const REQ_VALUES = Constraint::REQ_STRING_ARG;
public function checkInputValues(bool $throwExeception=true):bool{
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
return false;
}
return true;
}
public function test():bool{
$this->checkInputValues();
$this->tested = true;
$this->reason = $this->arg;
return false;
}
}