@@ -133,7 +133,7 @@ |
||
| 133 | 133 | /** |
| 134 | 134 | * set content of page |
| 135 | 135 | * |
| 136 | - * @param $content |
|
| 136 | + * @param string $content |
|
| 137 | 137 | */ |
| 138 | 138 | public function setContent($content) |
| 139 | 139 | { |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | /** |
| 80 | 80 | * wrapper to call the render engine |
| 81 | 81 | * |
| 82 | - * @param $engine |
|
| 82 | + * @param \Twig_Environment $engine |
|
| 83 | 83 | * @param $vars |
| 84 | 84 | * @return mixed |
| 85 | 85 | */ |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | spl_autoload_extensions(".php"); |
| 103 | 103 | // load phile core |
| 104 | 104 | spl_autoload_register( |
| 105 | - function ($className) { |
|
| 105 | + function($className) { |
|
| 106 | 106 | $fileName = LIB_DIR . str_replace("\\", DS, $className) . '.php'; |
| 107 | 107 | if (file_exists($fileName)) { |
| 108 | 108 | include_once $fileName; |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | public function offsetSet($offset, $value) |
| 77 | 77 | { |
| 78 | 78 | $this->load(); |
| 79 | - $this->pages[$offset] = $value; |
|
| 79 | + $this->pages[$offset] = $value; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | public function offsetUnset($offset) |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | class Plugin extends AbstractPlugin |
| 23 | 23 | { |
| 24 | - const HANDLER_ERROR_LOG = 'error_log'; |
|
| 25 | - const HANDLER_DEVELOPMENT = 'development'; |
|
| 24 | + const HANDLER_ERROR_LOG = 'error_log'; |
|
| 25 | + const HANDLER_DEVELOPMENT = 'development'; |
|
| 26 | 26 | |
| 27 | 27 | protected $events = ['plugins_loaded' => 'onPluginsLoaded']; |
| 28 | 28 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | /** |
| 56 | 56 | * resolve a file path by replace the mod: prefix |
| 57 | 57 | * |
| 58 | - * @param $path |
|
| 58 | + * @param string $path |
|
| 59 | 59 | * |
| 60 | 60 | * @return string|null the full filepath or null if file does not exists |
| 61 | 61 | */ |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | /** |
| 77 | 77 | * load files e.g. config files |
| 78 | 78 | * |
| 79 | - * @param $file |
|
| 79 | + * @param string|null $file |
|
| 80 | 80 | * |
| 81 | 81 | * @return mixed|null |
| 82 | 82 | */ |
@@ -202,6 +202,11 @@ discard block |
||
| 202 | 202 | * @return mixed |
| 203 | 203 | */ |
| 204 | 204 | // @codingStandardsIgnoreStart |
| 205 | + |
|
| 206 | + /** |
|
| 207 | + * @param integer $min |
|
| 208 | + * @param integer $max |
|
| 209 | + */ |
|
| 205 | 210 | public static function crypto_rand_secure($min, $max) |
| 206 | 211 | { |
| 207 | 212 | // @codingStandardsIgnoreEnd |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | */ |
| 116 | 116 | protected function slug($key) |
| 117 | 117 | { |
| 118 | - $psr16Forbidden = ['{', '}' , '(', ')', '/' , '\\' , '@', ':']; |
|
| 118 | + $psr16Forbidden = ['{', '}', '(', ')', '/', '\\', '@', ':']; |
|
| 119 | 119 | return str_replace($psr16Forbidden, self::SLUG, $key); |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | { |
| 95 | 95 | $folder = $folder ?: $this->settings['content_dir']; |
| 96 | 96 | return new PageCollection( |
| 97 | - function () use ($options, $folder) { |
|
| 97 | + function() use ($options, $folder) { |
|
| 98 | 98 | $options += $this->settings; |
| 99 | 99 | // ignore files with a leading '.' in its filename |
| 100 | 100 | $files = Utility::getFiles($folder, '\Phile\FilterIterator\ContentFileFilterIterator'); |