| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function saved($model) |
||
| 20 | { |
||
| 21 | $translationRepository = \App::make(TranslationRepository::class); |
||
| 22 | $cacheRepository = \App::make('translation.cache.repository'); |
||
| 23 | foreach ($model->translatableAttributes() as $attribute) { |
||
| 24 | // If the value of the translatable attribute has changed: |
||
| 25 | if ($model->isDirty($attribute)) { |
||
| 26 | $translationRepository->updateDefaultByCode($model->translationCodeFor($attribute), $model->getRawAttribute($attribute)); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | $cacheRepository->flush(\Illuminate\Support\Facades\Config::get('app.locale'), 'translatable', '*'); |
||
| 30 | } |
||
| 46 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths