Commaaa2
This commit is contained in:
8
vendor/phpoption/phpoption/composer.json
vendored
8
vendor/phpoption/phpoption/composer.json
vendored
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
|
||||
"phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -41,12 +41,10 @@
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": true
|
||||
"forward-command": false
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9-dev"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,13 +62,13 @@ abstract class Option implements IteratorAggregate
|
||||
* @template S
|
||||
*
|
||||
* @param array<string|int,S>|ArrayAccess<string|int,S>|null $array A potential array or \ArrayAccess value.
|
||||
* @param string $key The key to check.
|
||||
* @param string|int|null $key The key to check.
|
||||
*
|
||||
* @return Option<S>
|
||||
*/
|
||||
public static function fromArraysValue($array, $key)
|
||||
{
|
||||
if (!(is_array($array) || $array instanceof ArrayAccess) || !isset($array[$key])) {
|
||||
if ($key === null || !(is_array($array) || $array instanceof ArrayAccess) || !isset($array[$key])) {
|
||||
return None::create();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user