Webmozart\Assert\Assert::isEmpty PHP Метод

isEmpty() публичный статический Метод

public static isEmpty ( $value, $message = '' )
    public static function isEmpty($value, $message = '')
    {
        if (!empty($value)) {
            static::reportInvalidArgument(sprintf($message ?: 'Expected an empty value. Got: %s', static::valueToString($value)));
        }
    }

Usage Example

Пример #1
0
 /**
  * @Given it should not belong to any other taxon
  */
 public function itShouldNotBelongToAnyOtherTaxon()
 {
     $parent = $this->updatePage->getParent();
     Assert::isEmpty($parent, sprintf('Current taxon should not belong to any other, but it does belong to "%s"', $parent));
 }