1 | <?php |
||
21 | class FileSystemStorage extends BaseObject implements StorageInterface |
||
22 | { |
||
23 | /** @var string|Filesystem */ |
||
24 | private $fileSystem; |
||
25 | |||
26 | /** @var string */ |
||
27 | private $path; |
||
28 | |||
29 | private $pageClasses = [ |
||
30 | '' => \hiqdev\yii2\modules\pages\models\OtherPage::class, |
||
31 | 'md' => \hiqdev\yii2\modules\pages\models\MarkdownPage::class, |
||
32 | 'php' => \hiqdev\yii2\modules\pages\models\PhpPage::class, |
||
33 | 'twig' => \hiqdev\yii2\modules\pages\models\TwigPage::class, |
||
34 | 'feature' => \hiqdev\yii2\modules\pages\models\BehatPage::class, |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * @param string $page |
||
39 | * @return AbstractPage|null |
||
40 | * @throws \yii\base\InvalidConfigException |
||
41 | */ |
||
42 | public function getPage(string $page): ?PageInterface |
||
62 | |||
63 | public function getList(string $path = null): ?PagesList |
||
71 | |||
72 | /** |
||
73 | * @param string $page |
||
74 | * @return bool|null |
||
75 | * @throws \yii\base\InvalidConfigException |
||
76 | */ |
||
77 | public function isDir(string $page): ?bool |
||
86 | |||
87 | /** |
||
88 | * @param $page |
||
89 | * @return array|false |
||
90 | * @throws \yii\base\InvalidConfigException |
||
91 | */ |
||
92 | public function getMetadata($page) |
||
96 | |||
97 | /** |
||
98 | * @param mixed $fileSystem |
||
99 | */ |
||
100 | public function setFileSystem($fileSystem): void |
||
104 | |||
105 | /** |
||
106 | * @param string $path |
||
107 | */ |
||
108 | public function setPath(string $path): void |
||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getPath(): string |
||
120 | |||
121 | /** |
||
122 | * @param string $path |
||
123 | * @return null|string |
||
124 | * @throws \yii\base\InvalidConfigException |
||
125 | */ |
||
126 | public function read(string $path): ?string |
||
130 | |||
131 | /** |
||
132 | * @param string $extension |
||
133 | * @return string |
||
134 | */ |
||
135 | public function findPageClass(string $extension): string |
||
143 | |||
144 | /** |
||
145 | * Reads given path as array of already rtrimmed lines. |
||
146 | * @param string $path |
||
147 | * @return false|string[] |
||
148 | */ |
||
149 | public function readArray(string $path) |
||
153 | |||
154 | /** |
||
155 | * @param $filePath |
||
156 | * @return string |
||
157 | */ |
||
158 | public function getLocalPath($filePath): string |
||
162 | |||
163 | /** |
||
164 | * @return Filesystem |
||
165 | * @throws \yii\base\InvalidConfigException |
||
166 | */ |
||
167 | public function getFileSystem(): Filesystem |
||
178 | } |
||
179 |
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.