This snippet should do the same but is shorter:

```php
return implode(PHP_EOL, array_map($records, array($this, 'format')));
```