Test Failed
Push — master ( b61af3...7b4275 )
by Ricardo
09:41
created

AbstractEntity::persist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Translation\Entities;
4
5
use Illuminate\Support\Collection;
6
use Illuminate\Contracts\Support\Arrayable;
7
use JsonSerializable;
8
9
/**
10
 * Class AbstractEntity.
11
 *
12
 * @package Core\Entities
13
 */
14
abstract class AbstractEntity implements Arrayable, JsonSerializable
15
{
16
    /**
17
     * @inheritdoc
18
     */
19
    public function toArray(): array
20
    {
21
        return [];
22
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public function jsonSerialize(): array
28
    {
29
        return $this->toArray();
30
    }
31
32
    /**
33
     * persist
34
     *
35
     * @return bool
36
     */
37
    private function persist()
0 ignored issues
show
Unused Code introduced by
The method persist() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
38
    {
39
        $this->model::create($this->toArray());
40
    }
41
42
}
43