We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 6 |
| Paths | 14 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public static function defaultResolveFn($source, $args, ResolveInfo $info) |
||
|
|
|||
| 12 | { |
||
| 13 | $fieldName = $info->fieldName; |
||
| 14 | $property = null; |
||
| 15 | |||
| 16 | $accessor = PropertyAccess::createPropertyAccessor(); |
||
| 17 | |||
| 18 | try { |
||
| 19 | if (is_array($source) || $source instanceof \ArrayAccess) { |
||
| 20 | $property = $accessor->getValue($source, sprintf('[%s]', $fieldName)); |
||
| 21 | } else if (is_object($source)) { |
||
| 22 | $property = $accessor->getValue($source, sprintf('%s', $fieldName)); |
||
| 23 | } |
||
| 24 | } catch(AccessException $e) { |
||
| 25 | } |
||
| 26 | |||
| 27 | return $property instanceof \Closure ? $property($source) : $property; |
||
| 28 | } |
||
| 29 | } |
||
| 31 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.