You could get rid of the local var `$lev` with 
```php
if (levenshtein($name, $commandName) <= strlen($name) / 3 || false !== strpos($commandName, $name))
```

Do our coding standards say something about the order of the arguments in a comparison ?