1 | <?php |
||
10 | class MaterializedPath extends TreeStrategy implements Buildable, Extension |
||
11 | { |
||
12 | use Queueable; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $path; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | 2 | private $hash; |
|
23 | |||
24 | 2 | /** |
|
25 | 2 | * @var string |
|
26 | */ |
||
27 | private $source; |
||
28 | |||
29 | /** |
||
30 | 1 | * @var string |
|
31 | */ |
||
32 | private $separator; |
||
33 | 1 | ||
34 | /** |
||
35 | 1 | * @var bool |
|
36 | 1 | */ |
|
37 | 1 | private $appendIds; |
|
38 | 1 | ||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | private $startsWithSeparator = false; |
||
43 | 1 | ||
44 | /** |
||
45 | 1 | * @var bool |
|
46 | */ |
||
47 | private $endsWithSeparator = true; |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public static function enable() |
||
58 | |||
59 | /** |
||
60 | * @param string $field |
||
61 | * @param string $separator |
||
62 | * @param callable|null $callback |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function path($field = 'path', $separator = '|', callable $callback = null) |
||
76 | |||
77 | /** |
||
78 | * @param string $hash |
||
79 | * |
||
80 | * @return $this |
||
81 | */ |
||
82 | public function pathHash($hash = 'pathHash') |
||
90 | |||
91 | /** |
||
92 | * @param string $field |
||
93 | * |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function pathSource($field = 'id') |
||
102 | |||
103 | /** |
||
104 | * Execute the build process |
||
105 | */ |
||
106 | public function build() |
||
118 | |||
119 | /** |
||
120 | * Add default values to all required fields. |
||
121 | * |
||
122 | * @return void |
||
123 | */ |
||
124 | private function defaults() |
||
138 | |||
139 | /** |
||
140 | * @return array |
||
141 | */ |
||
142 | protected function getValues() |
||
159 | } |
||
160 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..