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

Model::newCollection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
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