1 | <?php |
||
13 | class NativeFileInfo implements IFileInfo { |
||
14 | const MODE_FILE = 0100000; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $path; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $name; |
||
25 | |||
26 | /** |
||
27 | * @var NativeShare |
||
28 | */ |
||
29 | protected $share; |
||
30 | |||
31 | /** |
||
32 | * @var array|null |
||
33 | */ |
||
34 | protected $statCache = null; |
||
35 | |||
36 | /** @var callable|null */ |
||
37 | protected $statCallback = null; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | protected $modeCache; |
||
43 | |||
44 | /** |
||
45 | * @param NativeShare $share |
||
46 | * @param string $path |
||
47 | * @param string $name |
||
48 | * @param array|callable $stat |
||
49 | */ |
||
50 | 104 | public function __construct($share, $path, $name, $stat) { |
|
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | 101 | public function getPath() { |
|
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | 49 | public function getName() { |
|
77 | |||
78 | /** |
||
79 | * @return array |
||
80 | */ |
||
81 | 102 | protected function stat() { |
|
87 | |||
88 | /** |
||
89 | * @return int |
||
90 | */ |
||
91 | 29 | public function getSize() { |
|
95 | |||
96 | /** |
||
97 | * @return int |
||
98 | */ |
||
99 | 1 | public function getMTime() { |
|
103 | |||
104 | /** |
||
105 | * @return bool |
||
106 | */ |
||
107 | 101 | public function isDirectory() { |
|
111 | |||
112 | /** |
||
113 | * @return int |
||
114 | */ |
||
115 | 14 | protected function getMode() { |
|
128 | |||
129 | /** |
||
130 | * @return bool |
||
131 | */ |
||
132 | 9 | public function isReadOnly() { |
|
136 | |||
137 | /** |
||
138 | * @return bool |
||
139 | */ |
||
140 | 5 | public function isHidden() { |
|
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | public function isSystem() { |
||
152 | |||
153 | /** |
||
154 | * @return bool |
||
155 | */ |
||
156 | 8 | public function isArchived() { |
|
160 | |||
161 | /** |
||
162 | * @return ACL[] |
||
163 | */ |
||
164 | public function getAcls(): array { |
||
178 | } |
||
179 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.