Commaaa2
This commit is contained in:
@@ -10,7 +10,6 @@ use PHPUnit\Framework\Constraint\FileExists;
|
||||
use PHPUnit\Framework\Constraint\LogicalNot;
|
||||
use PHPUnit\Framework\Constraint\RegularExpression;
|
||||
use PHPUnit\Framework\InvalidArgumentException;
|
||||
use PHPUnit\Util\InvalidArgumentHelper;
|
||||
|
||||
/**
|
||||
* @internal This class is not meant to be used or overwritten outside the framework itself.
|
||||
@@ -29,19 +28,11 @@ abstract class Assert extends PHPUnit
|
||||
public static function assertArraySubset($subset, $array, bool $checkForIdentity = false, string $msg = ''): void
|
||||
{
|
||||
if (! (is_array($subset) || $subset instanceof ArrayAccess)) {
|
||||
if (class_exists(InvalidArgumentException::class)) {
|
||||
throw InvalidArgumentException::create(1, 'array or ArrayAccess');
|
||||
} else {
|
||||
throw InvalidArgumentHelper::factory(1, 'array or ArrayAccess');
|
||||
}
|
||||
throw InvalidArgumentException::create(1, 'array or ArrayAccess');
|
||||
}
|
||||
|
||||
if (! (is_array($array) || $array instanceof ArrayAccess)) {
|
||||
if (class_exists(InvalidArgumentException::class)) {
|
||||
throw InvalidArgumentException::create(2, 'array or ArrayAccess');
|
||||
} else {
|
||||
throw InvalidArgumentHelper::factory(2, 'array or ArrayAccess');
|
||||
}
|
||||
throw InvalidArgumentException::create(2, 'array or ArrayAccess');
|
||||
}
|
||||
|
||||
$constraint = new ArraySubset($subset, $checkForIdentity);
|
||||
|
||||
Reference in New Issue
Block a user