@@ -18,7 +18,7 @@ |
||
| 18 | 18 | class Meta implements MetaInterface |
| 19 | 19 | { |
| 20 | 20 | /** |
| 21 | - * @var array $config the configuration for this parser |
|
| 21 | + * @var array $config the configuration for this parser |
|
| 22 | 22 | */ |
| 23 | 23 | private $config; |
| 24 | 24 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | class AbstractModel implements \ArrayAccess |
| 16 | 16 | { |
| 17 | 17 | /** |
| 18 | - * @var array the storage |
|
| 18 | + * @var array the storage |
|
| 19 | 19 | */ |
| 20 | 20 | protected $data = array(); |
| 21 | 21 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | class Markdown implements ParserInterface |
| 19 | 19 | { |
| 20 | 20 | /** |
| 21 | - * @var mixed the configuration |
|
| 21 | + * @var mixed the configuration |
|
| 22 | 22 | */ |
| 23 | 23 | private $config; |
| 24 | 24 | |
@@ -20,17 +20,17 @@ |
||
| 20 | 20 | { |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * @var global Phile config |
|
| 23 | + * @var global Phile config |
|
| 24 | 24 | */ |
| 25 | 25 | protected $config; |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | - * @var bool Phile installation needs setup |
|
| 28 | + * @var bool Phile installation needs setup |
|
| 29 | 29 | */ |
| 30 | 30 | protected $needsSetup = true; |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @var array event subscription |
|
| 33 | + * @var array event subscription |
|
| 34 | 34 | */ |
| 35 | 35 | protected $events = [ |
| 36 | 36 | 'config_loaded' => 'onConfigLoaded', |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | { |
| 90 | 90 | $content = $page->getRawContent(); |
| 91 | 91 | foreach ($vars as $key => $value) { |
| 92 | - $regex = '/\{\{(\s*?)' . $key . '(\s*?)\}\}/'; |
|
| 92 | + $regex = '/\{\{(\s*?)'.$key.'(\s*?)\}\}/'; |
|
| 93 | 93 | $content = preg_replace($regex, $value, $content); |
| 94 | 94 | } |
| 95 | 95 | $page->setContent($content); |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $result = array(); |
| 129 | 129 | foreach ($files as $file) { |
| 130 | 130 | /** |
| 131 | - * @var \SplFileInfo $file |
|
| 131 | + * @var \SplFileInfo $file |
|
| 132 | 132 | */ |
| 133 | 133 | $result[] = $file->getPathname(); |
| 134 | 134 | } |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | { |
| 160 | 160 | $config = Registry::get('Phile_Settings'); |
| 161 | 161 | |
| 162 | - return md5($config['encryptionKey'] . $value); |
|
| 162 | + return md5($config['encryptionKey'].$value); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -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 | */ |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | /** |
| 111 | 111 | * static method to get files by directory and file filter |
| 112 | 112 | * |
| 113 | - * @param $directory |
|
| 113 | + * @param string $directory |
|
| 114 | 114 | * @param string $filter |
| 115 | 115 | * |
| 116 | 116 | * @return array |
@@ -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 |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | class Session |
| 16 | 16 | { |
| 17 | 17 | /** |
| 18 | - * @var bool mark if session is started |
|
| 18 | + * @var bool mark if session is started |
|
| 19 | 19 | */ |
| 20 | 20 | static public $isStarted = false; |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * @var string the session id |
|
| 23 | + * @var string the session id |
|
| 24 | 24 | */ |
| 25 | 25 | static public $sessionId = ''; |
| 26 | 26 | |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | public function send() |
| 120 | 120 | { |
| 121 | 121 | if (!isset($this->headers['Content-Type'])) { |
| 122 | - $this->setHeader('Content-Type', 'text/html; charset=' . $this->charset); |
|
| 122 | + $this->setHeader('Content-Type', 'text/html; charset='.$this->charset); |
|
| 123 | 123 | } |
| 124 | 124 | $this->outputHeader(); |
| 125 | 125 | http_response_code($this->statusCode); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | if (isset($this->server['HTTP_HOST'])) { |
| 84 | 84 | $host = $this->server['HTTP_HOST']; |
| 85 | 85 | $protocol = $this->getProtocol(); |
| 86 | - $url = $protocol . '://' . $host . $url; |
|
| 86 | + $url = $protocol.'://'.$host.$url; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $url = rtrim($url, '/'); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | public function url($url) |
| 120 | 120 | { |
| 121 | - return $this->getBaseUrl() . '/' . ltrim($url, '/'); |
|
| 121 | + return $this->getBaseUrl().'/'.ltrim($url, '/'); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @package Phile |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -require_once __DIR__ . '/lib/Phile/Bootstrap.php'; |
|
| 9 | +require_once __DIR__.'/lib/Phile/Bootstrap.php'; |
|
| 10 | 10 | |
| 11 | 11 | ob_start(); |
| 12 | 12 | |