| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 3 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 20 | class MediaRecord extends Record |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @param \Nip\Records\AbstractModels\Record $model |
||
| 24 | */ |
||
| 25 | public function populateFromFile(File $file) |
||
| 26 | { |
||
| 27 | $this->file_name = $file->getName(); |
||
|
|
|||
| 28 | $this->path = $file->getPath(); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param \Nip\Records\AbstractModels\Record $model |
||
| 33 | */ |
||
| 34 | public function populateFromModel(Record $model) |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param Collection $collection |
||
| 42 | */ |
||
| 43 | public function populateFromCollection($collection) |
||
| 53 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.