1 | <?php |
||
18 | class FileSystemStorage extends BaseObject implements StorageInterface |
||
19 | { |
||
20 | /** @var string|Filesystem */ |
||
21 | private $fileSystem; |
||
22 | |||
23 | /** @var string */ |
||
24 | private $path; |
||
25 | |||
26 | private $pageClasses = [ |
||
27 | '' => \hiqdev\yii2\modules\pages\models\OtherPage::class, |
||
28 | 'md' => \hiqdev\yii2\modules\pages\models\MarkdownPage::class, |
||
29 | 'php' => \hiqdev\yii2\modules\pages\models\PhpPage::class, |
||
30 | 'twig' => \hiqdev\yii2\modules\pages\models\TwigPage::class, |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @param string $page |
||
35 | * @return AbstractPage|null |
||
36 | * @throws \yii\base\InvalidConfigException |
||
37 | */ |
||
38 | public function getPage(string $page): ?AbstractPage |
||
58 | |||
59 | /** |
||
60 | * @param string $page |
||
61 | * @return bool|null |
||
62 | * @throws \yii\base\InvalidConfigException |
||
63 | */ |
||
64 | public function isDir(string $page): ?bool |
||
73 | |||
74 | /** |
||
75 | * @param $page |
||
76 | * @return array|false |
||
77 | * @throws \yii\base\InvalidConfigException |
||
78 | */ |
||
79 | public function getMetadata($page) |
||
83 | |||
84 | /** |
||
85 | * @param mixed $fileSystem |
||
86 | */ |
||
87 | public function setFileSystem($fileSystem): void |
||
91 | |||
92 | /** |
||
93 | * @param string $path |
||
94 | */ |
||
95 | public function setPath(string $path): void |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getPath(): string |
||
107 | |||
108 | /** |
||
109 | * @param string $path |
||
110 | * @return null|string |
||
111 | * @throws \yii\base\InvalidConfigException |
||
112 | */ |
||
113 | public function read(string $path): ?string |
||
117 | |||
118 | /** |
||
119 | * @param string $extension |
||
120 | * @return string |
||
121 | */ |
||
122 | public function findPageClass(string $extension): string |
||
130 | |||
131 | /** |
||
132 | * Reads given path as array of already rtrimmed lines. |
||
133 | * @param string $path |
||
134 | * @return false|string[] |
||
135 | */ |
||
136 | public function readArray(string $path) |
||
140 | |||
141 | /** |
||
142 | * @param $filePath |
||
143 | * @return string |
||
144 | */ |
||
145 | public function getLocalPath($filePath): string |
||
149 | |||
150 | /** |
||
151 | * @return Filesystem |
||
152 | * @throws \yii\base\InvalidConfigException |
||
153 | */ |
||
154 | private function getFileSystem(): Filesystem |
||
165 | } |
||
166 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.