Missing line break between the 2 logical blocks.
First logical block is a local variable assignment, second is a control structure.

Also, your success state should never be a branch of execution of your code. Please update it to:

```php
foreach ($accessors as $accessor) {
    $accessor .= $field;

    if ( ! method_exists($object, $accessor)) {
        continue;
    }

    return $object->$accessor();
}
}
```