@@ -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 | } |
@@ -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 | } |
@@ -55,14 +55,20 @@ |
||
| 55 | 55 | |
| 56 | 56 | $headingID = $heading->attributes->getNamedItem('id'); |
| 57 | 57 | |
| 58 | - if ($curr > $last) // If the current level is greater than the last level indent one level |
|
| 58 | + if ($curr > $last) |
|
| 59 | + { |
|
| 60 | + // If the current level is greater than the last level indent one level |
|
| 59 | 61 | { |
| 60 | 62 | $toc .= '<ul>'; |
| 61 | 63 | } |
| 62 | - elseif ($curr < $last) // If the current level is less than the last level go up appropriate amount. |
|
| 64 | + } |
|
| 65 | + elseif ($curr < $last) |
|
| 66 | + { |
|
| 67 | + // If the current level is less than the last level go up appropriate amount. |
|
| 63 | 68 | { |
| 64 | 69 | $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>'; |
| 65 | 70 | } |
| 71 | + } |
|
| 66 | 72 | else // If the current level is equal to the last. |
| 67 | 73 | { |
| 68 | 74 | $toc .= '</li>'; |
@@ -105,7 +105,8 @@ |
||
| 105 | 105 | */ |
| 106 | 106 | public function getJailedCollections() |
| 107 | 107 | { |
| 108 | - return self::getJailedTrackedItems($this->trackedItemsFlattened, function ($contentItem) { |
|
| 108 | + return self::getJailedTrackedItems($this->trackedItemsFlattened, function ($contentItem) |
|
| 109 | + { |
|
| 109 | 110 | return $contentItem['basename']; |
| 110 | 111 | }); |
| 111 | 112 | } |
@@ -45,7 +45,8 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | private function staticPageViewAction(StaticPageView $pageView, Compiler $compiler) |
| 47 | 47 | { |
| 48 | - return function () use ($pageView, $compiler) { |
|
| 48 | + return function () use ($pageView, $compiler) |
|
| 49 | + { |
|
| 49 | 50 | Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath()); |
| 50 | 51 | |
| 51 | 52 | $compiler->getTemplateBridge()->clearTemplateCache(); |
@@ -75,7 +76,8 @@ discard block |
||
| 75 | 76 | */ |
| 76 | 77 | private function dynamicPageViewAction(DynamicPageView $pageView, Compiler $compiler) |
| 77 | 78 | { |
| 78 | - return function (ServerRequestInterface $request) use ($pageView, $compiler) { |
|
| 79 | + return function (ServerRequestInterface $request) use ($pageView, $compiler) |
|
| 80 | + { |
|
| 79 | 81 | Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath()); |
| 80 | 82 | |
| 81 | 83 | $compiler->getTemplateBridge()->clearTemplateCache(); |
@@ -111,7 +113,8 @@ discard block |
||
| 111 | 113 | */ |
| 112 | 114 | private function repeaterPageViewAction(RepeaterPageView $pageView, Compiler $compiler) |
| 113 | 115 | { |
| 114 | - return function (ServerRequestInterface $request) use ($pageView, $compiler) { |
|
| 116 | + return function (ServerRequestInterface $request) use ($pageView, $compiler) |
|
| 117 | + { |
|
| 115 | 118 | Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath()); |
| 116 | 119 | |
| 117 | 120 | $compiler->getTemplateBridge()->clearTemplateCache(); |
@@ -154,7 +157,8 @@ discard block |
||
| 154 | 157 | return $this->repeaterPageViewAction($pageView, $compiler); |
| 155 | 158 | |
| 156 | 159 | default: |
| 157 | - return function () { |
|
| 160 | + return function () |
|
| 161 | + { |
|
| 158 | 162 | $errMsg = 'This URL type has not yet been implemented.'; |
| 159 | 163 | |
| 160 | 164 | return new Response(501, ['Content-Type' => 'text/plain'], $errMsg); |
@@ -171,7 +175,8 @@ discard block |
||
| 171 | 175 | */ |
| 172 | 176 | private function createRedirectAction($to) |
| 173 | 177 | { |
| 174 | - return function () use ($to) { |
|
| 178 | + return function () use ($to) |
|
| 179 | + { |
|
| 175 | 180 | return new Response(302, [ |
| 176 | 181 | 'Location' => $to, |
| 177 | 182 | ]); |
@@ -19,7 +19,8 @@ |
||
| 19 | 19 | return $array; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - usort($array, function ($a, $b) use ($key, $order, $case_insensitive) { |
|
| 22 | + usort($array, function ($a, $b) use ($key, $order, $case_insensitive) |
|
| 23 | + { |
|
| 23 | 24 | $aValue = __::get($a, $key); |
| 24 | 25 | $bValue = __::get($b, $key); |
| 25 | 26 | |
@@ -62,7 +62,8 @@ |
||
| 62 | 62 | { |
| 63 | 63 | $routes = Controller::create($routeMapper, $compiler); |
| 64 | 64 | |
| 65 | - return new Server(function (ServerRequestInterface $request) use ($routes, $compiler, $assetManager) { |
|
| 65 | + return new Server(function (ServerRequestInterface $request) use ($routes, $compiler, $assetManager) |
|
| 66 | + { |
|
| 66 | 67 | $httpMethod = $request->getMethod(); |
| 67 | 68 | $urlPath = Controller::normalizeUrl($request->getUri()->getPath()); |
| 68 | 69 | |
@@ -20,10 +20,12 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public static function modifiedAfter(\DateTime $time) |
| 22 | 22 | { |
| 23 | - return function ($file) use ($time) { |
|
| 23 | + return function ($file) use ($time) |
|
| 24 | + { |
|
| 24 | 25 | /** @var File|Folder $file */ |
| 25 | 26 | |
| 26 | - if ($file instanceof Folder) { |
|
| 27 | + if ($file instanceof Folder) |
|
| 28 | + { |
|
| 27 | 29 | return true; |
| 28 | 30 | } |
| 29 | 31 | |
@@ -164,7 +164,8 @@ |
||
| 164 | 164 | |
| 165 | 165 | Service::setRuntimeFlag(RuntimeStatus::USING_HIGHLIGHTER); |
| 166 | 166 | |
| 167 | - if ($this->getConfiguration()->isHighlighterUsingLineNumbers()) { |
|
| 167 | + if ($this->getConfiguration()->isHighlighterUsingLineNumbers()) |
|
| 168 | + { |
|
| 168 | 169 | Service::setRuntimeFlag(RuntimeStatus::USING_LINE_NUMBERS); |
| 169 | 170 | } |
| 170 | 171 | |