ReadOnlyRepositoryTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 20
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A delete() 0 4 1
A create() 0 4 1
A update() 0 4 1
1
<?php
2
3
namespace Guillermoandrae\Repositories;
4
5
use Guillermoandrae\Models\ModelInterface;
6
7
trait ReadOnlyRepositoryTrait
8
{
9
    use UnsupportedMethodRepositoryTrait;
10
11
    final public function create(array $options): ?ModelInterface
12
    {
13
        unset($options);
14
        return $this->callUnsupportedMethod('create');
15
    }
16
17
    final public function update($id, array $options): ?ModelInterface
18
    {
19
        unset($id, $options);
20
        return $this->callUnsupportedMethod('update');
21
    }
22
23
    final public function delete($id): bool
24
    {
25
        unset($id);
26
        return $this->callUnsupportedMethod('delete');
27
    }
28
}
29