| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function updated(Media $media) |
||
| 26 | { |
||
| 27 | if (is_null($media->getOriginal('model_id'))) { |
||
| 28 | return; |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($media->manipulations !== json_decode($media->getOriginal('manipulations'), true)) { |
||
| 32 | $eventDispatcher = Media::getEventDispatcher(); |
||
| 33 | Media::unsetEventDispatcher(); |
||
| 34 | |||
| 35 | app(FileManipulator::class)->createDerivedFiles($media); |
||
| 36 | |||
| 37 | Media::setEventDispatcher($eventDispatcher); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 52 |