Passed
Push — master ( fda37d...9e2f6f )
by Septianata
03:15 queued 01:14
created

Model   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 4
b 0
f 0
dl 0
loc 22
ccs 0
cts 4
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A newCollection() 0 3 1
A newEloquentBuilder() 0 3 1
1
<?php
2
3
namespace Ianrizky\Illuminate\Database\Eloquent;
4
5
use Illuminate\Database\Eloquent\Model as BaseModel;
6
7
/**
8
 * @property int $id
9
 */
10
abstract class Model extends BaseModel
11
{
12
    use Concerns\HandleModel,
0 ignored issues
show
Bug introduced by
The trait Ianrizky\Illuminate\Data...nt\Concerns\HandleModel requires the property $morphName which is not provided by Ianrizky\Illuminate\Database\Eloquent\Model.
Loading history...
13
        Concerns\HasAttributes,
14
        Concerns\HasTimestamps,
15
        Concerns\Tappable,
16
        Docblock\EloquentBuilder;
17
18
    /**
19
     * {@inheritDoc}
20
     */
21
    public function newEloquentBuilder($query): Builder
22
    {
23
        return new Builder($query);
24
    }
25
26
    /**
27
     * {@inheritDoc}
28
     */
29
    public function newCollection(array $models = []): Collection
30
    {
31
        return new Collection($models);
32
    }
33
}
34