Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.
There are several approaches to avoid long parameter lists:
1 | <?php namespace Nord\Lumen\FileManager\Doctrine; |
||
26 | public function createFile($id, $name, $extension, $path, $mimeType, $byteSize, $data, $disk, Carbon $savedAt) |
||
27 | { |
||
28 | $class = $this->getFileClass(); |
||
29 | return new $class($id, $name, $extension, $path, $mimeType, $byteSize, $data, $disk, $savedAt); |
||
30 | } |
||
31 | |||
48 |