Total Complexity | 10 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Coverage | 92.31% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | trait CanBootTraitsRecordsTrait |
||
12 | { |
||
13 | protected $bootTraits = null; |
||
14 | protected $bootedTraits = []; |
||
15 | |||
16 | /** |
||
17 | * Initialize any initializable traits on the model. |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | 31 | public function bootTraits() |
|
27 | } |
||
28 | 31 | } |
|
29 | |||
30 | /** |
||
31 | * @return null |
||
32 | */ |
||
33 | 33 | public function getBootTraits() |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param null $bootTraits |
||
43 | */ |
||
44 | 31 | public function setBootTraits($bootTraits): void |
|
45 | { |
||
46 | 31 | $this->bootTraits = $bootTraits; |
|
47 | 31 | } |
|
48 | |||
49 | /** |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function hasBootTraits() |
||
53 | { |
||
54 | return is_array($this->getBootTraits()); |
||
55 | } |
||
56 | |||
57 | 31 | protected function initBootTraits() |
|
60 | 31 | } |
|
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | 31 | protected function generateBootTraits() |
|
80 |