Skip to content

Commit bf5983c

Browse files
committed
upstream Pico.php to php 8.1 compatibility
Signed-off-by: derMart <derMart@users.noreply.github.com>
1 parent f64ce68 commit bf5983c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/Pico.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function __construct($rootDir, $configDir, $pluginsDir, $themesDir, $enab
104104
* @throws NotFoundException
105105
* @throws NotPermittedException
106106
*/
107-
public function run()
107+
public function run() : string
108108
{
109109
return parent::run();
110110
}
@@ -141,7 +141,7 @@ public function setRequestUrl($requestUrl)
141141
*
142142
* @return void
143143
*/
144-
protected function evaluateRequestUrl()
144+
protected function evaluateRequestUrl() : void
145145
{
146146
// do nothing
147147
}
@@ -157,7 +157,7 @@ protected function evaluateRequestUrl()
157157
* @throws NotFoundException
158158
* @throws NotPermittedException
159159
*/
160-
public function loadFileContent($absolutePath)
160+
public function loadFileContent($absolutePath) : string
161161
{
162162
/** @var FolderInterface $folder */
163163
/** @var string $basePath */
@@ -177,7 +177,7 @@ public function loadFileContent($absolutePath)
177177
* @return array
178178
* @throws ParseException
179179
*/
180-
public function parseFileMeta($rawContent, array $headers)
180+
public function parseFileMeta($rawContent, array $headers) : array
181181
{
182182
$meta = parent::parseFileMeta($rawContent, $headers);
183183
return $this->purifyFileMeta($meta);
@@ -212,7 +212,7 @@ protected function purifyFileMeta(array $meta): array
212212
*
213213
* @return string
214214
*/
215-
public function parseFileContent($markdown, $singleLine = false)
215+
public function parseFileContent($markdown, $singleLine = false) : string
216216
{
217217
$content = parent::parseFileContent($markdown, $singleLine);
218218
return $this->purifyFileContent($content);
@@ -275,7 +275,7 @@ private function getHtmlPurifierConfig(): HTMLPurifier_Config
275275
* @throws WebsiteInvalidFilesystemException
276276
* @throws InvalidPathException
277277
*/
278-
public function getFiles($absolutePath, $fileExtension = '', $order = \Pico::SORT_ASC)
278+
public function getFiles($absolutePath, $fileExtension = '', $order = \Pico::SORT_ASC) : array
279279
{
280280
/** @var FolderInterface $folder */
281281
/** @var string $basePath */
@@ -327,7 +327,7 @@ public function getFiles($absolutePath, $fileExtension = '', $order = \Pico::SOR
327327
* @throws WebsiteInvalidFilesystemException
328328
* @throws InvalidPathException
329329
*/
330-
public function getFilesGlob($absolutePathPattern, $order = \Pico::SORT_ASC)
330+
public function getFilesGlob($absolutePathPattern, $order = \Pico::SORT_ASC) : array
331331
{
332332
/** @var FolderInterface $folder */
333333
/** @var string $basePath */

0 commit comments

Comments
 (0)