and that could easily be turned into a ternary operator for better readability:

```php
return $fullPath ? $filepath : $filename;
```