@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is part of Symplify |
@@ -42,14 +42,14 @@ discard block |
||
| 42 | 42 | null, |
| 43 | 43 | InputOption::VALUE_REQUIRED, |
| 44 | 44 | 'Directory to load page FROM.', |
| 45 | - getcwd() . DIRECTORY_SEPARATOR . 'source' |
|
| 45 | + getcwd().DIRECTORY_SEPARATOR.'source' |
|
| 46 | 46 | ); |
| 47 | 47 | $this->addOption( |
| 48 | 48 | 'output', |
| 49 | 49 | null, |
| 50 | 50 | InputOption::VALUE_REQUIRED, |
| 51 | 51 | 'Directory to generate page TO.', |
| 52 | - getcwd() . DIRECTORY_SEPARATOR . 'output' |
|
| 52 | + getcwd().DIRECTORY_SEPARATOR.'output' |
|
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is part of Symplify |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | null, |
| 48 | 48 | InputOption::VALUE_REQUIRED, |
| 49 | 49 | 'Directory where was output saved TO.', |
| 50 | - getcwd() . DIRECTORY_SEPARATOR . 'output' |
|
| 50 | + getcwd().DIRECTORY_SEPARATOR.'output' |
|
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | private function ensureGithubRepositorySlugIsValid(string $repositorySlug) |
| 97 | 97 | { |
| 98 | - $repositoryUrl = 'https://github.com/' . $repositorySlug; |
|
| 99 | - if (! $this->doesUrlExist($repositoryUrl)) { |
|
| 98 | + $repositoryUrl = 'https://github.com/'.$repositorySlug; |
|
| 99 | + if (!$this->doesUrlExist($repositoryUrl)) { |
|
| 100 | 100 | throw new Exception(sprintf( |
| 101 | 101 | 'Repository "%s" is not accessible. Try fixing the "%s" slug.', |
| 102 | 102 | $repositoryUrl, |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | private function doesUrlExist(string $url) : bool |
| 109 | 109 | { |
| 110 | 110 | $fileHeaders = @get_headers($url); |
| 111 | - if (! $fileHeaders || $fileHeaders[0] === 'HTTP/1.1 404 Not Found') { |
|
| 111 | + if (!$fileHeaders || $fileHeaders[0] === 'HTTP/1.1 404 Not Found') { |
|
| 112 | 112 | return false; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is part of Symplify |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | return $this->getDate(); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - if (! isset($this->configuration[$offset])) { |
|
| 65 | + if (!isset($this->configuration[$offset])) { |
|
| 66 | 66 | throw new \Exception(sprintf( |
| 67 | 67 | 'Value "%s" was not found for "%s" object. Available values are "%s"', |
| 68 | 68 | $offset, |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | private function ensurePathStartsWithDate(SplFileInfo $fileInfo) |
| 93 | 93 | { |
| 94 | - if (! PathAnalyzer::startsWithDate($fileInfo)) { |
|
| 94 | + if (!PathAnalyzer::startsWithDate($fileInfo)) { |
|
| 95 | 95 | throw new Exception( |
| 96 | 96 | 'Post name has to start with a date in "Y-m-d" format. E.g. "2016-01-01-name.md".' |
| 97 | 97 | ); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is part of Symplify |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | private function prependLayoutToFileContent(AbstractFile $file) |
| 86 | 86 | { |
| 87 | - if (! $file->getLayout()) { |
|
| 87 | + if (!$file->getLayout()) { |
|
| 88 | 88 | return; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $layoutLine = sprintf('{layout "%s"}', $file->getLayout()); |
| 92 | - $file->changeContent($layoutLine . PHP_EOL . PHP_EOL . $file->getContent()); |
|
| 92 | + $file->changeContent($layoutLine.PHP_EOL.PHP_EOL.$file->getContent()); |
|
| 93 | 93 | } |
| 94 | 94 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is part of Symplify |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | private function extractPostRoute(array $options) : array |
| 108 | 108 | { |
| 109 | - if (! isset($options['configuration']['postRoute'])) { |
|
| 109 | + if (!isset($options['configuration']['postRoute'])) { |
|
| 110 | 110 | return $options; |
| 111 | 111 | } |
| 112 | 112 | |