@@ -13,11 +13,18 @@ discard block |
||
| 13 | 13 | protected static $runTimeStatus; |
| 14 | 14 | protected static $options; |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param string $key |
|
| 18 | + * @param string $value |
|
| 19 | + */ |
|
| 16 | 20 | public static function setOption($key, $value) |
| 17 | 21 | { |
| 18 | 22 | self::$options[$key] = $value; |
| 19 | 23 | } |
| 20 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $key |
|
| 27 | + */ |
|
| 21 | 28 | public static function getOption($key) |
| 22 | 29 | { |
| 23 | 30 | return isset(self::$options[$key]) ? self::$options[$key] : null; |
@@ -48,6 +55,9 @@ discard block |
||
| 48 | 55 | return self::$workingDirectory; |
| 49 | 56 | } |
| 50 | 57 | |
| 58 | + /** |
|
| 59 | + * @param \string|null $directory |
|
| 60 | + */ |
|
| 51 | 61 | public static function setWorkingDirectory($directory) |
| 52 | 62 | { |
| 53 | 63 | self::$workingDirectory = $directory; |
@@ -163,6 +163,9 @@ discard block |
||
| 163 | 163 | ); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | + /** |
|
| 167 | + * @param string $content |
|
| 168 | + */ |
|
| 166 | 169 | private function handleThemeImports(&$content) |
| 167 | 170 | { |
| 168 | 171 | if (($themeName = $this->configuration->getTheme())) |
@@ -172,6 +175,9 @@ discard block |
||
| 172 | 175 | } |
| 173 | 176 | } |
| 174 | 177 | |
| 178 | + /** |
|
| 179 | + * @return string |
|
| 180 | + */ |
|
| 175 | 181 | public static function stringToFormatter($format) |
| 176 | 182 | { |
| 177 | 183 | if ($format == 'nested') |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | * |
| 207 | 207 | * @param string $url |
| 208 | 208 | * |
| 209 | - * @return mixed |
|
| 209 | + * @return string |
|
| 210 | 210 | */ |
| 211 | 211 | public static function normalizeUrl($url) |
| 212 | 212 | { |
@@ -217,9 +217,9 @@ discard block |
||
| 217 | 217 | * Find a ContentItem from a Dynamic PageView or null if it doesn't exist. |
| 218 | 218 | * |
| 219 | 219 | * @param DynamicPageView $pageView |
| 220 | - * @param $permalink |
|
| 220 | + * @param string $permalink |
|
| 221 | 221 | * |
| 222 | - * @return CollectableItem|ReadableDocument|TemplateReadyDocument|null |
|
| 222 | + * @return CollectableItem|null |
|
| 223 | 223 | */ |
| 224 | 224 | private static function getContentItem(DynamicPageView $pageView, $permalink) |
| 225 | 225 | { |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | * Find the ExpandedValue from a Repeater PageView or null if it doesn't exist. |
| 241 | 241 | * |
| 242 | 242 | * @param RepeaterPageView $pageView |
| 243 | - * @param $permalink |
|
| 243 | + * @param string $permalink |
|
| 244 | 244 | * |
| 245 | 245 | * @return ExpandedValue|null |
| 246 | 246 | */ |
@@ -9,6 +9,9 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | abstract class HtmlUtils |
| 11 | 11 | { |
| 12 | + /** |
|
| 13 | + * @param string $xpathQuery |
|
| 14 | + */ |
|
| 12 | 15 | public static function htmlXPath(\DOMDocument &$DOMDocument, $html, $xpathQuery) |
| 13 | 16 | { |
| 14 | 17 | $html = self::normalizeHTML($html); |
@@ -38,6 +41,9 @@ discard block |
||
| 38 | 41 | return $xpath->query($xpathQuery); |
| 39 | 42 | } |
| 40 | 43 | |
| 44 | + /** |
|
| 45 | + * @return string |
|
| 46 | + */ |
|
| 41 | 47 | private static function normalizeHTML($html) |
| 42 | 48 | { |
| 43 | 49 | if (strpos($html, '<body>') === false || strpos($html, '</body>') === false) |
@@ -783,6 +783,9 @@ |
||
| 783 | 783 | 'zmm' => 'application/vnd.handheld-entertainment+xml', |
| 784 | 784 | ]; |
| 785 | 785 | |
| 786 | + /** |
|
| 787 | + * @return \allejo\stakx\Document\StaticPageView |
|
| 788 | + */ |
|
| 786 | 789 | public static function getMimeType($extension) |
| 787 | 790 | { |
| 788 | 791 | return isset(self::$mimes[$extension]) ? self::$mimes[$extension] : null; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | - * @return string |
|
| 30 | + * @return Folder |
|
| 31 | 31 | */ |
| 32 | 32 | public function getFolder() |
| 33 | 33 | { |
@@ -37,6 +37,9 @@ discard block |
||
| 37 | 37 | return $this->baseUrl; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string|null $baseUrl |
|
| 42 | + */ |
|
| 40 | 43 | public function setBaseUrl($baseUrl) |
| 41 | 44 | { |
| 42 | 45 | $this->baseUrl = $baseUrl; |
@@ -100,7 +103,7 @@ discard block |
||
| 100 | 103 | /** |
| 101 | 104 | * Retrieve all of the URL routes registered. |
| 102 | 105 | * |
| 103 | - * @return string[] |
|
| 106 | + * @return integer[] |
|
| 104 | 107 | */ |
| 105 | 108 | public function getRoutes() |
| 106 | 109 | { |