@@ -175,7 +175,6 @@ discard block |
||
| 175 | 175 | * @see http://twig.sensiolabs.org/doc/advanced.html#tests Twig documentation. |
| 176 | 176 | * |
| 177 | 177 | * @param string $name Name of test |
| 178 | - * @param callable $function Test implementation |
|
| 179 | 178 | * @param array $options |
| 180 | 179 | */ |
| 181 | 180 | public function addTwigTest($name, callable $test, array $options = []) |
@@ -207,6 +206,9 @@ discard block |
||
| 207 | 206 | return '@layout/'.$name; |
| 208 | 207 | } |
| 209 | 208 | |
| 209 | + /** |
|
| 210 | + * @param string $layoutName |
|
| 211 | + */ |
|
| 210 | 212 | protected function getLayoutWithExtension($layoutName, $contentName) |
| 211 | 213 | { |
| 212 | 214 | foreach ($this->layoutExtension as $extension) { |
@@ -111,6 +111,7 @@ |
||
| 111 | 111 | /** |
| 112 | 112 | * Gets a data source. |
| 113 | 113 | * |
| 114 | + * @param string $name |
|
| 114 | 115 | * @return \Yosymfony\Spress\Core\DataSource\AbstractDataSource |
| 115 | 116 | * |
| 116 | 117 | * @throws \RuntimeException If data source not found. |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | use Yosymfony\Spress\Core\DataSource\DataSourceManagerBuilder; |
| 29 | 29 | use Yosymfony\Spress\Core\DataWriter\FilesystemDataWriter; |
| 30 | 30 | use Yosymfony\Spress\Core\IO\NullIO; |
| 31 | -use Yosymfony\Spress\Core\Plugin\PluginManager; |
|
| 32 | 31 | use Yosymfony\Spress\Core\Plugin\PluginManagerBuilder; |
| 33 | 32 | |
| 34 | 33 | /** |
@@ -113,7 +113,6 @@ |
||
| 113 | 113 | /** |
| 114 | 114 | * Sets the license of the plugin. MIT by default. |
| 115 | 115 | * |
| 116 | - * @param string $value |
|
| 117 | 116 | */ |
| 118 | 117 | public function setLicense($name) |
| 119 | 118 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | /** |
| 28 | 28 | * Constructor. |
| 29 | 29 | * |
| 30 | - * @param Symfony\Component\HttpFoundation\Request $request |
|
| 30 | + * @param Request $request |
|
| 31 | 31 | * @param string $documentroot |
| 32 | 32 | */ |
| 33 | 33 | public function __construct(Request $request, $documentroot) |
@@ -36,7 +36,6 @@ discard block |
||
| 36 | 36 | * Constructor. |
| 37 | 37 | * |
| 38 | 38 | * @param IOInterface $io |
| 39 | - * @param TwigFactory $twigFactory |
|
| 40 | 39 | * @param string $serverroot |
| 41 | 40 | * @param string $documentroot |
| 42 | 41 | * @param int $port |
@@ -160,6 +159,11 @@ discard block |
||
| 160 | 159 | return $finalResponse; |
| 161 | 160 | } |
| 162 | 161 | |
| 162 | + /** |
|
| 163 | + * @param string $ip |
|
| 164 | + * @param string $path |
|
| 165 | + * @param integer $statusCode |
|
| 166 | + */ |
|
| 163 | 167 | private function logRequest($ip, $path, $statusCode) |
| 164 | 168 | { |
| 165 | 169 | $date = new \Datetime(); |
@@ -176,6 +180,9 @@ discard block |
||
| 176 | 180 | $this->io->write($data); |
| 177 | 181 | } |
| 178 | 182 | |
| 183 | + /** |
|
| 184 | + * @param string $templateDir |
|
| 185 | + */ |
|
| 179 | 186 | private function buildTwig($templateDir) |
| 180 | 187 | { |
| 181 | 188 | $options = [ |
@@ -189,6 +196,10 @@ discard block |
||
| 189 | 196 | $this->twig = new \Twig_Environment($loader, $options); |
| 190 | 197 | } |
| 191 | 198 | |
| 199 | + /** |
|
| 200 | + * @param integer $statusCode |
|
| 201 | + * @param string $data |
|
| 202 | + */ |
|
| 192 | 203 | private function getErrorModel($statusCode, $data) |
| 193 | 204 | { |
| 194 | 205 | switch ($statusCode) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * Constructor. |
| 34 | 34 | * |
| 35 | - * @param Symfony\Component\Filesystem\Filesystem $filesystem |
|
| 35 | + * @param Filesystem $filesystem |
|
| 36 | 36 | * @param string $outputDir The output folder. e.g: "build". |
| 37 | 37 | */ |
| 38 | 38 | public function __construct(Filesystem $filesystem, $outputDir) |
@@ -97,6 +97,9 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param string $relativePath |
|
| 102 | + */ |
|
| 100 | 103 | protected function composeOutputPath($relativePath) |
| 101 | 104 | { |
| 102 | 105 | $path = $this->outputDir.'/'.$relativePath; |
@@ -214,6 +214,9 @@ |
||
| 214 | 214 | return false; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | + /** |
|
| 218 | + * @param string $template |
|
| 219 | + */ |
|
| 217 | 220 | private function templateNeedsDate($template) |
| 218 | 221 | { |
| 219 | 222 | return strpos($template, ':year') !== false |
@@ -100,6 +100,9 @@ discard block |
||
| 100 | 100 | return $result; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | + /** |
|
| 104 | + * @param string $sitePath |
|
| 105 | + */ |
|
| 103 | 106 | private function loadEnvironmentConfiguration($sitePath, $env) |
| 104 | 107 | { |
| 105 | 108 | $filename = $this->getConfigEnvFilename($env); |
@@ -133,6 +136,9 @@ discard block |
||
| 133 | 136 | return $filename; |
| 134 | 137 | } |
| 135 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $sitePath |
|
| 141 | + */ |
|
| 136 | 142 | private function isSpressSite($sitePath) |
| 137 | 143 | { |
| 138 | 144 | return file_exists($sitePath.'/'.$this->configFilename); |