Skip to content

Commit

Permalink
Merge pull request #17 from userfrosting/analysis-lZ5KyJ
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
lcharette authored Feb 23, 2024
2 parents e996113 + c4f377d commit 3104bd7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/Authorize/AccessConditionEvaluator.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ public function leaveNode(Node $node)
$value = $this->resolveParamPath($argString);
$currentArgInfo['type'] = 'parameter';
$currentArgInfo['resolved_value'] = $value;
// Resolve arrays
// Resolve arrays
} elseif ($arg->value instanceof \PhpParser\Node\Expr\Array_) {
$value = $this->resolveArray($arg->value);
$currentArgInfo['type'] = 'array';
$currentArgInfo['resolved_value'] = print_r($value, true);
// Resolve strings
// Resolve strings
} elseif ($arg->value instanceof \PhpParser\Node\Scalar\String_) {
$value = $arg->value->value;
$currentArgInfo['type'] = 'string';
$currentArgInfo['resolved_value'] = $value;
// Resolve numbers
// Resolve numbers
} elseif ($arg->value instanceof \PhpParser\Node\Scalar\DNumber) {
$value = $arg->value->value;
$currentArgInfo['type'] = 'float';
Expand All @@ -127,7 +127,7 @@ public function leaveNode(Node $node)
$value = $arg->value->value;
$currentArgInfo['type'] = 'integer';
$currentArgInfo['resolved_value'] = $value;
// Anything else is simply interpreted as its literal string value
// Anything else is simply interpreted as its literal string value
} else {
$value = $argString;
$currentArgInfo['type'] = 'unknown';
Expand Down Expand Up @@ -214,7 +214,7 @@ private function resolveParamPath($path)
if (is_array($value) && isset($value[$token])) {
$value = $value[$token];
continue;
// @phpstan-ignore-next-line Allow variable property for this use
// @phpstan-ignore-next-line Allow variable property for this use
} elseif (is_object($value) && isset($value->$token)) {
// @phpstan-ignore-next-line Allow variable property for this use
$value = $value->$token;
Expand Down

0 comments on commit 3104bd7

Please sign in to comment.