Skip to content

Commit

Permalink
Merge branch '0.11' into 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
mcg-web committed Jun 28, 2020
2 parents d3497c1 + b23825f commit f9eb148
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"scripts": {
"test": "bin/phpunit --color=always -v --debug",
"static-analysis": [
"@composer req --ansi --dev 'phpstan/phpstan:^0.10.3' 'phpstan/phpstan-phpunit:^0.10.0'",
"@composer req --ansi --dev --no-update 'phpstan/phpstan:^0.11' 'phpstan/phpstan-phpunit:*'",
"@composer update --ansi",
"phpstan analyse --ansi",
"@composer rem --ansi --dev phpstan/phpstan phpstan/phpstan-phpunit"
],
Expand Down
2 changes: 1 addition & 1 deletion src/Definition/ConfigProcessor/AclConfigProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function acl(array $fields, AccessResolver $accessResolver, callab
throw new UserWarning('Access denied to this field.');
};
foreach ($fields as &$field) {
if (isset($field['access']) && true !== $field['access']) {
if (\is_array($field) && isset($field['access']) && true !== $field['access']) {
$accessChecker = $field['access'];
if (false === $accessChecker) {
$field['resolve'] = $deniedAccess;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function filter(array $fields)
function ($field, $fieldName) {
$exposed = true;

if (isset($field['public']) && \is_callable($field['public'])) {
if (\is_array($field) && isset($field['public']) && \is_callable($field['public'])) {
$exposed = (bool) \call_user_func($field['public'], $fieldName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function process(LazyConfig $lazyConfig): LazyConfig
private function wrapFieldsArgument(array $fields)
{
foreach ($fields as &$field) {
if (isset($field['resolve']) && \is_callable($field['resolve'])) {
if (\is_array($field) && isset($field['resolve']) && \is_callable($field['resolve'])) {
$field['resolve'] = $this->argumentFactory->wrapResolverArgs($field['resolve']);
}
}
Expand Down

0 comments on commit f9eb148

Please sign in to comment.