1 | <?php |
||
20 | class FileSystemStorage extends BaseObject implements StorageInterface |
||
21 | { |
||
22 | /** @var string|Filesystem */ |
||
23 | private $fileSystem; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $path; |
||
27 | |||
28 | private $pageClasses = [ |
||
29 | '' => \hiqdev\yii2\modules\pages\models\OtherPage::class, |
||
30 | 'md' => \hiqdev\yii2\modules\pages\models\MarkdownPage::class, |
||
31 | 'php' => \hiqdev\yii2\modules\pages\models\PhpPage::class, |
||
32 | 'twig' => \hiqdev\yii2\modules\pages\models\TwigPage::class, |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @param string $page |
||
37 | * @return AbstractPage|null |
||
38 | * @throws \yii\base\InvalidConfigException |
||
39 | */ |
||
40 | public function getPage(string $page): ?AbstractPage |
||
60 | |||
61 | public function getList(?string $path): ?PagesList |
||
69 | |||
70 | /** |
||
71 | * @param string $page |
||
72 | * @return bool|null |
||
73 | * @throws \yii\base\InvalidConfigException |
||
74 | */ |
||
75 | public function isDir(string $page): ?bool |
||
84 | |||
85 | /** |
||
86 | * @param $page |
||
87 | * @return array|false |
||
88 | * @throws \yii\base\InvalidConfigException |
||
89 | */ |
||
90 | public function getMetadata($page) |
||
94 | |||
95 | /** |
||
96 | * @param mixed $fileSystem |
||
97 | */ |
||
98 | public function setFileSystem($fileSystem): void |
||
102 | |||
103 | /** |
||
104 | * @param string $path |
||
105 | */ |
||
106 | public function setPath(string $path): void |
||
110 | |||
111 | /** |
||
112 | * @return string |
||
113 | */ |
||
114 | public function getPath(): string |
||
118 | |||
119 | /** |
||
120 | * @param string $path |
||
121 | * @return null|string |
||
122 | * @throws \yii\base\InvalidConfigException |
||
123 | */ |
||
124 | public function read(string $path): ?string |
||
128 | |||
129 | /** |
||
130 | * @param string $extension |
||
131 | * @return string |
||
132 | */ |
||
133 | public function findPageClass(string $extension): string |
||
141 | |||
142 | /** |
||
143 | * Reads given path as array of already rtrimmed lines. |
||
144 | * @param string $path |
||
145 | * @return false|string[] |
||
146 | */ |
||
147 | public function readArray(string $path) |
||
151 | |||
152 | /** |
||
153 | * @param $filePath |
||
154 | * @return string |
||
155 | */ |
||
156 | public function getLocalPath($filePath): string |
||
160 | |||
161 | /** |
||
162 | * @return Filesystem |
||
163 | * @throws \yii\base\InvalidConfigException |
||
164 | */ |
||
165 | public function getFileSystem(): Filesystem |
||
176 | } |
||
177 |
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.