@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | - * @return string|null |
|
| 65 | + * @return string |
|
| 66 | 66 | */ |
| 67 | 67 | public function guessMimeType() |
| 68 | 68 | { |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * @param $directory |
|
| 74 | - * @param null $name |
|
| 73 | + * @param string $directory |
|
| 74 | + * @param string|null $name |
|
| 75 | 75 | * |
| 76 | 76 | * @return File |
| 77 | 77 | * |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Common\File; |
| 7 | 7 | |
| 8 | 8 | use Dspbee\Bundle\Common\File\Exception\FileException; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * It is extracted from the request from which the file has been uploaded. |
| 37 | 37 | * Then it should not be considered as a safe value. |
| 38 | 38 | * |
| 39 | - * @return string|null The original name |
|
| 39 | + * @return string The original name |
|
| 40 | 40 | */ |
| 41 | 41 | public function nameUnsafe() |
| 42 | 42 | { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * The client mime type is extracted from the request from which the file |
| 63 | 63 | * was uploaded, so it should not be considered as a safe value. |
| 64 | 64 | * |
| 65 | - * @return string|null The mime type |
|
| 65 | + * @return string The mime type |
|
| 66 | 66 | */ |
| 67 | 67 | public function mimeTypeUnsafe() |
| 68 | 68 | { |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Common\File; |
| 7 | 7 | |
| 8 | 8 | use Dspbee\Bundle\Common\File\Exception\FileException; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | /** |
| 254 | 254 | * The query (GET) parameters. |
| 255 | 255 | * |
| 256 | - * @return GetBag|null |
|
| 256 | + * @return GetBag |
|
| 257 | 257 | */ |
| 258 | 258 | public function get(): GetBag |
| 259 | 259 | { |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | /** |
| 267 | 267 | * The query (POST) parameters. |
| 268 | 268 | * |
| 269 | - * @return PostBag|null |
|
| 269 | + * @return PostBag |
|
| 270 | 270 | */ |
| 271 | 271 | public function post(): PostBag |
| 272 | 272 | { |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | /** |
| 280 | 280 | * The query (COOKIE) parameters. |
| 281 | 281 | * |
| 282 | - * @return CookieBag|null |
|
| 282 | + * @return CookieBag |
|
| 283 | 283 | */ |
| 284 | 284 | public function cookie(): CookieBag |
| 285 | 285 | { |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | /** |
| 293 | 293 | * The (SERVER) parameters. |
| 294 | 294 | * |
| 295 | - * @return ServerBag|null |
|
| 295 | + * @return ServerBag |
|
| 296 | 296 | */ |
| 297 | 297 | public function server(): ServerBag |
| 298 | 298 | { |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | /** |
| 306 | 306 | * The (ENV) parameters. |
| 307 | 307 | * |
| 308 | - * @return EnvBag|null |
|
| 308 | + * @return EnvBag |
|
| 309 | 309 | */ |
| 310 | 310 | public function env(): EnvBag |
| 311 | 311 | { |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | /** |
| 319 | 319 | * Get session handler. |
| 320 | 320 | * |
| 321 | - * @return Session|null |
|
| 321 | + * @return Session |
|
| 322 | 322 | */ |
| 323 | 323 | public function session(): Session |
| 324 | 324 | { |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | /** |
| 332 | 332 | * The query (FILES) uploaded files. |
| 333 | 333 | * |
| 334 | - * @return FileBag|null |
|
| 334 | + * @return FileBag |
|
| 335 | 335 | */ |
| 336 | 336 | public function file(): FileBag |
| 337 | 337 | { |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | /** |
| 345 | 345 | * HTTP headers from the $_SERVER variable. |
| 346 | 346 | * |
| 347 | - * @return HeaderBag|null |
|
| 347 | + * @return HeaderBag |
|
| 348 | 348 | */ |
| 349 | 349 | public function header(): HeaderBag |
| 350 | 350 | { |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | /** |
| 358 | 358 | * Returns the request body content. |
| 359 | 359 | * |
| 360 | - * @return ValueBag|null |
|
| 360 | + * @return ValueBag |
|
| 361 | 361 | * |
| 362 | 362 | * @see http://php.net/manual/ru/wrappers.php.php#wrappers.php.input |
| 363 | 363 | */ |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Core; |
| 7 | 7 | |
| 8 | 8 | use Dspbee\Bundle\Common\Bag\CookieBag; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | public function __construct(array $languageList = [], array $packageList = [], $url = null) |
| 34 | 34 | { |
| 35 | 35 | if (null === $url) { |
| 36 | - $url = $_SERVER['REQUEST_URI'] ?? ''; |
|
| 36 | + $url = $_SERVER['REQUEST_URI'] ? ? ''; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | $this->method = 'GET'; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $this->languageCode = ''; |
| 43 | 43 | $this->languageName = ''; |
| 44 | 44 | $this->package = 'Original'; |
| 45 | - $this->packageRoute = $packageList['Original'] ?? false; |
|
| 45 | + $this->packageRoute = $packageList['Original'] ? ? false; |
|
| 46 | 46 | $this->route = 'index'; |
| 47 | 47 | |
| 48 | 48 | $this->get = null; |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | * Autoload without composer. |
| 4 | 4 | */ |
| 5 | 5 | $srcRoot = dirname(__FILE__); |
| 6 | -spl_autoload_register(function ($path) use ($srcRoot) { |
|
| 6 | +spl_autoload_register(function($path) use ($srcRoot) { |
|
| 7 | 7 | $srcRoot = rtrim($srcRoot, '/') . '/'; |
| 8 | 8 | $path = str_replace('Dspbee\\Test\\', '', $path); |
| 9 | 9 | $path = str_replace('Dspbee\\', '', $path); |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Database; |
| 7 | 7 | |
| 8 | 8 | /** |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Common\Bag; |
| 7 | 7 | |
| 8 | 8 | /** |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Common\Bag; |
| 7 | 7 | |
| 8 | 8 | /** |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function fetch($key, $default = null) |
| 58 | 58 | { |
| 59 | - return $_COOKIE[$key] ?? $default; |
|
| 59 | + return $_COOKIE[$key] ? ? $default; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Common\Bag; |
| 7 | 7 | |
| 8 | 8 | /** |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function fetch($key, $default = null) |
| 59 | 59 | { |
| 60 | - return $_GET[$key] ?? $default; |
|
| 60 | + return $_GET[$key] ? ? $default; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @license MIT |
|
| 4 | - * @author Igor Sorokin <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @license MIT |
|
| 4 | + * @author Igor Sorokin <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Dspbee\Bundle\Common\Bag; |
| 7 | 7 | |
| 8 | 8 | /** |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function fetch($key, $default = null) |
| 58 | 58 | { |
| 59 | - return $_ENV[$key] ?? $default; |
|
| 59 | + return $_ENV[$key] ? ? $default; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |