Laravel version update
Laravel version update
This commit is contained in:
69
vendor/webmozart/assert/README.md
vendored
69
vendor/webmozart/assert/README.md
vendored
@@ -1,13 +1,13 @@
|
||||
Webmozart Assert
|
||||
================
|
||||
|
||||
[](https://travis-ci.org/webmozart/assert)
|
||||
[](https://travis-ci.org/webmozart/assert)
|
||||
[](https://ci.appveyor.com/project/webmozart/assert/branch/master)
|
||||
[](https://packagist.org/packages/webmozart/assert)
|
||||
[](https://packagist.org/packages/webmozart/assert)
|
||||
[](https://www.versioneye.com/php/webmozart:assert/1.1.0)
|
||||
[](https://www.versioneye.com/php/webmozart:assert/1.2.0)
|
||||
|
||||
Latest release: [1.1.0](https://packagist.org/packages/webmozart/assert#1.1.0)
|
||||
Latest release: [1.2.0](https://packagist.org/packages/webmozart/assert#1.2.0)
|
||||
|
||||
PHP >= 5.3.9
|
||||
|
||||
@@ -89,23 +89,28 @@ The [`Assert`] class provides the following assertions:
|
||||
|
||||
### Type Assertions
|
||||
|
||||
Method | Description
|
||||
----------------------------------------------- | --------------------------------------------------
|
||||
`string($value, $message = '')` | Check that a value is a string
|
||||
`stringNotEmpty($value, $message = '')` | Check that a value is a non-empty string
|
||||
`integer($value, $message = '')` | Check that a value is an integer
|
||||
`integerish($value, $message = '')` | Check that a value casts to an integer
|
||||
`float($value, $message = '')` | Check that a value is a float
|
||||
`numeric($value, $message = '')` | Check that a value is numeric
|
||||
`boolean($value, $message = '')` | Check that a value is a boolean
|
||||
`scalar($value, $message = '')` | Check that a value is a scalar
|
||||
`object($value, $message = '')` | Check that a value is an object
|
||||
`resource($value, $type = null, $message = '')` | Check that a value is a resource
|
||||
`isCallable($value, $message = '')` | Check that a value is a callable
|
||||
`isArray($value, $message = '')` | Check that a value is an array
|
||||
`isTraversable($value, $message = '')` | Check that a value is an array or a `\Traversable`
|
||||
`isInstanceOf($value, $class, $message = '')` | Check that a value is an `instanceof` a class
|
||||
`notInstanceOf($value, $class, $message = '')` | Check that a value is not an `instanceof` a class
|
||||
Method | Description
|
||||
-------------------------------------------------------- | --------------------------------------------------
|
||||
`string($value, $message = '')` | Check that a value is a string
|
||||
`stringNotEmpty($value, $message = '')` | Check that a value is a non-empty string
|
||||
`integer($value, $message = '')` | Check that a value is an integer
|
||||
`integerish($value, $message = '')` | Check that a value casts to an integer
|
||||
`float($value, $message = '')` | Check that a value is a float
|
||||
`numeric($value, $message = '')` | Check that a value is numeric
|
||||
`natural($value, $message= ''')` | Check that a value is a non-negative integer
|
||||
`boolean($value, $message = '')` | Check that a value is a boolean
|
||||
`scalar($value, $message = '')` | Check that a value is a scalar
|
||||
`object($value, $message = '')` | Check that a value is an object
|
||||
`resource($value, $type = null, $message = '')` | Check that a value is a resource
|
||||
`isCallable($value, $message = '')` | Check that a value is a callable
|
||||
`isArray($value, $message = '')` | Check that a value is an array
|
||||
`isTraversable($value, $message = '')` (deprecated) | Check that a value is an array or a `\Traversable`
|
||||
`isIterable($value, $message = '')` | Check that a value is an array or a `\Traversable`
|
||||
`isCountable($value, $message = '')` | Check that a value is an array or a `\Countable`
|
||||
`isInstanceOf($value, $class, $message = '')` | Check that a value is an `instanceof` a class
|
||||
`isInstanceOfAny($value, array $classes, $message = '')` | Check that a value is an `instanceof` a at least one class on the array of classes
|
||||
`notInstanceOf($value, $class, $message = '')` | Check that a value is not an `instanceof` a class
|
||||
`isArrayAccessible($value, $message = '')` | Check that a value can be accessed as an array
|
||||
|
||||
### Comparison Assertions
|
||||
|
||||
@@ -134,8 +139,9 @@ You should check that a value is a string with `Assert::string()` before making
|
||||
any of the following assertions.
|
||||
|
||||
Method | Description
|
||||
--------------------------------------------------- | --------------------------------------------------
|
||||
--------------------------------------------------- | -----------------------------------------------------------------
|
||||
`contains($value, $subString, $message = '')` | Check that a string contains a substring
|
||||
`notContains($value, $subString, $message = '')` | Check that a string does not contains a substring
|
||||
`startsWith($value, $prefix, $message = '')` | Check that a string has a prefix
|
||||
`startsWithLetter($value, $message = '')` | Check that a string starts with a letter
|
||||
`endsWith($value, $suffix, $message = '')` | Check that a string has a suffix
|
||||
@@ -150,6 +156,7 @@ Method | Description
|
||||
`maxLength($value, $max, $message = '')` | Check that a string has at most a certain number of characters
|
||||
`lengthBetween($value, $min, $max, $message = '')` | Check that a string has a length in the given range
|
||||
`uuid($value, $message = '')` | Check that a string is a valid UUID
|
||||
`notWhitespaceOnly($value, $message = '')` | Check that a string contains at least one non-whitespace character
|
||||
|
||||
### File Assertions
|
||||
|
||||
@@ -175,10 +182,20 @@ Method | Description
|
||||
|
||||
### Array Assertions
|
||||
|
||||
Method | Description
|
||||
-------------------------------------------------- | ------------------------------------------------------------------
|
||||
`keyExists($array, $key, $message = '')` | Check that a key exists in an array
|
||||
`keyNotExists($array, $key, $message = '')` | Check that a key does not exist in an array
|
||||
`count($array, $number, $message = '')` | Check that an array contains a specific number of elements
|
||||
`minCount($array, $min, $message = '')` | Check that an array contains at least a certain number of elements
|
||||
`maxCount($array, $max, $message = '')` | Check that an array contains at most a certain number of elements
|
||||
`countBetween($array, $min, $max, $message = '')` | Check that an array has a count in the given range
|
||||
|
||||
### Function Assertions
|
||||
|
||||
Method | Description
|
||||
------------------------------------------- | --------------------------------------------------
|
||||
`keyExists($array, $key, $message = '')` | Check that a key exists in an array
|
||||
`keyNotExists($array, $key, $message = '')` | Check that a key does not exist in an array
|
||||
------------------------------------------- | -----------------------------------------------------------------------------------------------------
|
||||
`throws($closure, $class, $message = '')` | Check that a function throws a certain exception. Subclasses of the exception class will be accepted.
|
||||
|
||||
### Collection Assertions
|
||||
|
||||
@@ -186,7 +203,7 @@ All of the above assertions can be prefixed with `all*()` to test the contents
|
||||
of an array or a `\Traversable`:
|
||||
|
||||
```php
|
||||
Assert::allIsInstanceOf('Acme\Employee', $employees);
|
||||
Assert::allIsInstanceOf($employees, 'Acme\Employee');
|
||||
```
|
||||
|
||||
### Nullable Assertions
|
||||
@@ -228,7 +245,7 @@ All contents of this package are licensed under the [MIT license].
|
||||
[Composer]: https://getcomposer.org
|
||||
[Bernhard Schussek]: http://webmozarts.com
|
||||
[The Community Contributors]: https://github.com/webmozart/assert/graphs/contributors
|
||||
[issue tracker]: https://github.com/webmozart/assert
|
||||
[issue tracker]: https://github.com/webmozart/assert/issues
|
||||
[Git repository]: https://github.com/webmozart/assert
|
||||
[@webmozart]: https://twitter.com/webmozart
|
||||
[MIT license]: LICENSE
|
||||
|
||||
Reference in New Issue
Block a user