Assert\Assert::that PHP Method

that() public static method

The invocation of this method starts an assertion chain that is happening on the passed value.
public static that ( mixed $value, string $defaultMessage = null, string $defaultPropertyPath = null ) : AssertionChain
$value mixed
$defaultMessage string
$defaultPropertyPath string
return AssertionChain
    public static function that($value, $defaultMessage = null, $defaultPropertyPath = null)
    {
        $assertionChain = new AssertionChain($value, $defaultMessage, $defaultPropertyPath);
        return $assertionChain->setAssertionClassName(static::$assertionClass);
    }

Usage Example

Beispiel #1
0
 public function that($value, $propertyPath, $defaultMessage = null)
 {
     $this->currentChainFailed = false;
     $this->thisChainTryAll = false;
     $this->currentChain = Assert::that($value, $defaultMessage, $propertyPath);
     return $this;
 }