@@ -68,6 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * {@inheritdoc} |
| 71 | + * @param string $filePath |
|
| 71 | 72 | */ |
| 72 | 73 | public function refreshItem($filePath) |
| 73 | 74 | { |
@@ -86,6 +87,7 @@ discard block |
||
| 86 | 87 | |
| 87 | 88 | /** |
| 88 | 89 | * {@inheritdoc} |
| 90 | + * @param string $filePath |
|
| 89 | 91 | */ |
| 90 | 92 | public function createNewItem($filePath) |
| 91 | 93 | { |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | { |
| 15 | 15 | private $container; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @return \Symfony\Component\DependencyInjection\ContainerInterface |
|
| 19 | + */ |
|
| 17 | 20 | public function getContainer() |
| 18 | 21 | { |
| 19 | 22 | if ($this->container === null) |
@@ -110,6 +110,9 @@ discard block |
||
| 110 | 110 | // Twig parent templates |
| 111 | 111 | /// |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $filePath |
|
| 115 | + */ |
|
| 113 | 116 | public function isImportDependency($filePath) |
| 114 | 117 | { |
| 115 | 118 | return isset($this->importDependencies[$filePath]); |
@@ -162,6 +165,9 @@ discard block |
||
| 162 | 165 | } |
| 163 | 166 | } |
| 164 | 167 | |
| 168 | + /** |
|
| 169 | + * @param string $filePath |
|
| 170 | + */ |
|
| 165 | 171 | public function compileImportDependencies($filePath) |
| 166 | 172 | { |
| 167 | 173 | foreach ($this->importDependencies[$filePath] as &$dependent) |
@@ -203,7 +203,8 @@ |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | if (strpos($haystack, $query, $offset) !== false) |
| 206 | - { // stop on first true result |
|
| 206 | + { |
|
| 207 | +// stop on first true result |
|
| 207 | 208 | return true; |
| 208 | 209 | } |
| 209 | 210 | } |
@@ -20,7 +20,8 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public static function array_safe_get(array $array, $key, $default = null) |
| 22 | 22 | { |
| 23 | - if (isset($array[$key])) { |
|
| 23 | + if (isset($array[$key])) |
|
| 24 | + { |
|
| 24 | 25 | return $array[$key]; |
| 25 | 26 | } |
| 26 | 27 | |
@@ -26,6 +26,9 @@ |
||
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @param string $extension |
|
| 31 | + */ |
|
| 29 | 32 | public function getTransformer($extension) |
| 30 | 33 | { |
| 31 | 34 | if (isset($this->transformers[$extension])) |
@@ -16,7 +16,8 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $data = json_decode($content, true); |
| 18 | 18 | |
| 19 | - if ($data === null) { |
|
| 19 | + if ($data === null) |
|
| 20 | + { |
|
| 20 | 21 | return []; |
| 21 | 22 | } |
| 22 | 23 | |
@@ -63,7 +63,8 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | public function getJailedDataItems() |
| 65 | 65 | { |
| 66 | - return self::getJailedTrackedItems($this->trackedItemsFlattened, function (DataItem $dataItem) { |
|
| 66 | + return self::getJailedTrackedItems($this->trackedItemsFlattened, function (DataItem $dataItem) |
|
| 67 | + { |
|
| 67 | 68 | return $dataItem->getBasename(); |
| 68 | 69 | }); |
| 69 | 70 | } |
@@ -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) |