| 1 | <?php |
||
| 8 | class Exporter |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Grid |
||
| 12 | */ |
||
| 13 | protected $grid; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param Grid $grid |
||
| 17 | */ |
||
| 18 | public function __construct(Grid $grid) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Export csv file. |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public function export() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Remove indexed array. |
||
| 65 | * |
||
| 66 | * @param array $row |
||
| 67 | * @return array |
||
| 68 | */ |
||
| 69 | protected function sanitize(array $row) |
||
| 77 | } |
||
| 78 |
An exit expression should only be used in rare cases. For example, if you write a short command line script.
In most cases however, using an
exitexpression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.