Fix type issue.
This var is temporarily int so add it to phpdoc.
Fix issue where string $encoded is overwritten by the empty array of preg_match.
Check if it's not false, might satisfy.
Add check for failure.
Use instanceof Traversable, satisfies scrutinizer better.
Change this one too.
Wrong variable name.