@@ -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 | { |
@@ -63,7 +63,7 @@ |
||
63 | 63 | // Exception thrown when language not supported |
64 | 64 | catch (\DomainException $exception) |
65 | 65 | { |
66 | - trigger_error("An unsupported language (${langDef['language']}) was detected in a code block", E_USER_WARNING); |
|
66 | + trigger_error("An unsupported language (${langdef['language']}) was detected in a code block", E_USER_WARNING); |
|
67 | 67 | } |
68 | 68 | catch (\Exception $e) |
69 | 69 | { |
@@ -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 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | * |
93 | 93 | * @throws \Exception |
94 | 94 | * |
95 | - * @return true if the website built successfully |
|
95 | + * @return boolean if the website built successfully |
|
96 | 96 | */ |
97 | 97 | public function build() |
98 | 98 | { |
@@ -3,13 +3,17 @@ |
||
3 | 3 | require __DIR__ . "/../vendor/autoload.php"; |
4 | 4 | |
5 | 5 | // The only deprecation warnings we need to ignore/handle are in PHP 7.4 so far |
6 | -if (PHP_VERSION_ID >= 70400) { |
|
7 | - function customErrorHandler($errno, $errstr, $errfile, $errline) { |
|
6 | +if (PHP_VERSION_ID >= 70400) |
|
7 | +{ |
|
8 | + function customErrorHandler($errno, $errstr, $errfile, $errline) |
|
9 | + { |
|
8 | 10 | // We know about this deprecation warning exists and it's already been |
9 | 11 | // fixed in the 2.x branch. For BC reasons in the 1.x branch, we'll |
10 | 12 | // ignore this warning to let tests pass. |
11 | - if ($errno === E_DEPRECATED) { |
|
12 | - if ($errstr === "Function ReflectionType::__toString() is deprecated") { |
|
13 | + if ($errno === E_DEPRECATED) |
|
14 | + { |
|
15 | + if ($errstr === "Function ReflectionType::__toString() is deprecated") |
|
16 | + { |
|
13 | 17 | return true; |
14 | 18 | } |
15 | 19 | } |
@@ -157,7 +157,7 @@ |
||
157 | 157 | /** |
158 | 158 | * Update the contents of a specified file. |
159 | 159 | * |
160 | - * @param File|string $filePath The relative path of the file |
|
160 | + * @param File $filePath The relative path of the file |
|
161 | 161 | * |
162 | 162 | * @return mixed|null |
163 | 163 | */ |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $fsDiffer = new FilesystemDiff($website->getFolderDefinitions()); |
65 | 65 | |
66 | 66 | $loop = Factory::create(); |
67 | - $loop->addPeriodicTimer(1, function() use (&$lastModification, $website, $fsDiffer, $output) { |
|
67 | + $loop->addPeriodicTimer(1, function () use (&$lastModification, $website, $fsDiffer, $output) { |
|
68 | 68 | $changedFiles = $fsDiffer->modifiedAfter($lastModification); |
69 | 69 | $hasChanges = count($changedFiles) > 0; |
70 | 70 |
@@ -64,7 +64,8 @@ |
||
64 | 64 | $fsDiffer = new FilesystemDiff($website->getFolderDefinitions()); |
65 | 65 | |
66 | 66 | $loop = Factory::create(); |
67 | - $loop->addPeriodicTimer(1, function() use (&$lastModification, $website, $fsDiffer, $output) { |
|
67 | + $loop->addPeriodicTimer(1, function() use (&$lastModification, $website, $fsDiffer, $output) |
|
68 | + { |
|
68 | 69 | $changedFiles = $fsDiffer->modifiedAfter($lastModification); |
69 | 70 | $hasChanges = count($changedFiles) > 0; |
70 | 71 |