1 | <?php |
||||
2 | |||||
3 | namespace Translation\Models; |
||||
4 | |||||
5 | use Illuminate\Database\Eloquent\Model; |
||||
6 | use Translation\Traits\HasTranslationsTrait; |
||||
0 ignored issues
–
show
|
|||||
7 | |||||
8 | class ModelTranslation extends Model |
||||
9 | { |
||||
10 | public $table = 'model_translations'; |
||||
11 | |||||
12 | public $primaryKey = 'id'; |
||||
13 | |||||
14 | protected $guarded = []; |
||||
15 | |||||
16 | public $rules = []; |
||||
17 | |||||
18 | protected $fillable = [ |
||||
19 | // 'item', |
||||
20 | // 'group', |
||||
21 | // 'text', |
||||
22 | // 'locale', |
||||
23 | |||||
24 | 'entity_id', |
||||
25 | 'entity_type', |
||||
26 | 'entity_data', |
||||
27 | 'country_code', |
||||
28 | 'language_code', |
||||
29 | ]; |
||||
30 | |||||
31 | public function getDataAttribute() |
||||
32 | { |
||||
33 | $object = app($this->entity_type); |
||||
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
34 | |||||
35 | $attributes = (array) json_decode($this->text); |
||||
0 ignored issues
–
show
|
|||||
36 | $object->attributes = array_merge( |
||||
37 | $attributes, [ |
||||
38 | $object->getKey() => $this->item, |
||||
0 ignored issues
–
show
|
|||||
39 | ] |
||||
40 | ); |
||||
41 | |||||
42 | return $object; |
||||
43 | } |
||||
44 | } |
||||
45 |
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