Passed
Pull Request — dev (#313)
by Tristan
06:51
created

Relationship::micro_references()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:27 +0000.
6
 */
0 ignored issues
show
Coding Style introduced by
Missing @link tag in file comment
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
7
8
namespace App\Models\Lookup;
9
10
use App\Models\BaseModel;
11
12
/**
13
 * Class Relationship
14
 *
15
 * @property int $id
16
 * @property string $name
17
 * @property \Jenssegers\Date\Date $created_at
18
 * @property \Jenssegers\Date\Date $updated_at
19
 *
20
 * @property \Illuminate\Database\Eloquent\Collection $references
21
 * @property \Illuminate\Database\Eloquent\Collection $relationship_translations
22
 *
23
 * Localized Properties:
24
 * @property string $value
25
 */
0 ignored issues
show
Coding Style introduced by
Missing @link tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
26
class Relationship extends BaseModel {
0 ignored issues
show
Coding Style introduced by
Opening brace of a class must be on the line after the definition
Loading history...
27
28
    use \Dimsav\Translatable\Translatable;
0 ignored issues
show
introduced by
The trait Dimsav\Translatable\Translatable requires some properties which are not provided by App\Models\Lookup\Relationship: $translations, $useTranslationFallback, $translationModel, $localeKey, $translationForeignKey
Loading history...
29
30
    public $translatedAttributes = ['value'];
31
    protected $fillable = [];
32
33
    public function references() {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on a new line
Loading history...
Coding Style introduced by
Missing doc comment for function references()
Loading history...
34
        return $this->hasMany(\App\Models\References::class);
0 ignored issues
show
Bug introduced by
The type App\Models\References was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
35
    }
36
37
    public function relationship_translations() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function relationship_translations()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
Coding Style introduced by
Public method name "Relationship::relationship_translations" is not in camel caps format
Loading history...
38
        return $this->hasMany(\App\Models\Lookup\RelationshipTranslation::class);
39
    }
40
41
}
42