What do you think about rewrite this part with this?

```
if (is_array($currentCallback)) {
    $currentCallback = array_shift($currentCallback);
}

if (!is_object($currentCallback) {
    continue;
}
```