1 | <?php |
||
37 | trait BacksUpItems |
||
38 | { |
||
39 | |||
40 | use MutatesAttributes; |
||
41 | |||
42 | /** |
||
43 | * @var Collection |
||
44 | */ |
||
45 | protected $items; |
||
46 | |||
47 | /** |
||
48 | * @var Collection |
||
49 | */ |
||
50 | private $itemsBackup; |
||
51 | |||
52 | /** |
||
53 | * @var DeepCopy |
||
54 | */ |
||
55 | private $copier; |
||
56 | |||
57 | /** |
||
58 | * @ignore |
||
59 | * |
||
60 | * @param $name |
||
61 | * |
||
62 | * @return mixed |
||
63 | */ |
||
64 | final public function __get($name) |
||
72 | |||
73 | /** |
||
74 | * @ignore |
||
75 | * |
||
76 | * @param $name |
||
77 | * @param $value |
||
78 | */ |
||
79 | final public function __set($name, $value) |
||
83 | |||
84 | /** |
||
85 | * @param mixed[] ...$items |
||
86 | */ |
||
87 | final protected function inject(...$items) |
||
101 | |||
102 | final protected function backupItems() |
||
106 | |||
107 | final protected function restoreItems() |
||
112 | |||
113 | /** |
||
114 | * @return DeepCopy |
||
115 | */ |
||
116 | private function getCopier() : DeepCopy |
||
120 | } |
||
121 |
This check looks for functions that have already been defined in other files.
Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the
@ignore
annotation.See also the PhpDoc documentation for @ignore.