diff --git a/hwe/sammo/Command/BaseCommand.php b/hwe/sammo/Command/BaseCommand.php index 83cbdfeb..1c95c116 100644 --- a/hwe/sammo/Command/BaseCommand.php +++ b/hwe/sammo/Command/BaseCommand.php @@ -255,7 +255,7 @@ abstract class BaseCommand{ 'destNation'=>$this->destNation, ]; - $this->reasonNotReservable = Constraint::testAll($this->reservableConstraints??[], $constraintInput, $this->env); + [$this->reasonConstraint, $this->reasonNotReservable] = Constraint::testAll($this->reservableConstraints??[], $constraintInput, $this->env); $this->reservable = $this->reasonNotReservable === null; return $this->reasonNotReservable; } @@ -291,7 +291,7 @@ abstract class BaseCommand{ 'destNation'=>$this->destNation, ]; - $this->reasonNotRunnable = Constraint::testAll($this->runnableConstraints??[], $constraintInput, $this->env); + [$this->reasonConstraint, $this->reasonNotRunnable] = Constraint::testAll($this->runnableConstraints??[], $constraintInput, $this->env); $this->runnable = $this->reasonNotRunnable === null; return $this->reasonNotRunnable; diff --git a/hwe/sammo/Constraint/Constraint.php b/hwe/sammo/Constraint/Constraint.php index 8ef1c656..202fcb9b 100644 --- a/hwe/sammo/Constraint/Constraint.php +++ b/hwe/sammo/Constraint/Constraint.php @@ -209,7 +209,7 @@ abstract class Constraint{ if(!$constraint->test()){ - return $constraint->reason(); + return [\sammo\Util::getClassNameFromObj($constraint), $constraint->reason()]; } }