Webmozart\Assert\Assert::notEq PHP Method

notEq() public static method

public static notEq ( $value, $value2, $message = '' )
    public static function notEq($value, $value2, $message = '')
    {
        if ($value2 == $value) {
            static::reportInvalidArgument(sprintf($message ?: 'Expected a different value than %s.', static::valueToString($value2)));
        }
    }

Usage Example

Esempio n. 1
0
 /**
  * @param array $setTuples
  * @param int $countTuples
  *
  * @return array
  *
  * @throws \InvalidArgumentException
  */
 private function validateTuples(array $setTuples, $countTuples)
 {
     Assert::notEq(0, $countTuples, 'The set builder requires a single array of one or more array sets.1');
     foreach ($setTuples as $tuple) {
         Assert::isArray($tuple, 'The set builder requires a single array of one or more array sets.');
     }
     return $setTuples;
 }
All Usage Examples Of Webmozart\Assert\Assert::notEq