diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 09ce7d06..f508c806 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: operating-system: [ ubuntu-latest ] - php-versions: [ '7.4', '8.0', '8.1' ] + php-versions: [ '8.0', '8.1', '8.2' ] redis-version: [ 6 ] runs-on: ${{ matrix.operating-system }} @@ -67,4 +67,3 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - diff --git a/.gitignore b/.gitignore index 3b89caf4..831310ed 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ Thumbs.db # ========================= /tests/_root/shared/store/* /tests/_root/cron-tests/ +/tests/_root/cache/data/* +!/tests/_root/cache/data/.gitkeep /coverage/ *.log @@ -26,4 +28,4 @@ Thumbs.db /.php-cs-fixer.cache /.phpunit.result.cache /.phpunit.cache -/.cache/ \ No newline at end of file +/.cache/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 21865e01..9d3fb019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [3.0.3] - 2026-06-28 + +### Changed +- **BREAKING:** Raised the minimum supported PHP version from `7.4` to `8.0` (#532) +- Updated CI coverage to test PHP `8.0`, `8.1`, and `8.2` (#532) +- Raised the static analysis baseline to PHPStan level `8` with PHP `8.0` target settings (#532) +- Kept Rector aligned to the PHP 8 baseline and applied bounded PHP 8-safe modernization updates (#532) +- Simplified the standard framework file banner across core sources, templates, and affected tests (#532) + +### Notes +- OpenAPI metadata remains on Doctrine-style annotations for now because the currently used `swagger-php` attribute scanning path requires PHP `8.1+`; `doctrine/annotations` is intentionally retained on the PHP `8.0` baseline (#532) + ## [3.0.0] - 2026-05-28 Upgrade guide: https://github.com/softberg/quantum-php-docs/blob/master/v3.0/upgrade-guide.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1a4c34a..2b0d6a26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,13 @@ composer phpstan composer cs:check ``` -6. Commit and push your branch: +6. Run Rector dry-run + +```bash +composer rector:check +``` + +7. Commit and push your branch: ```bash git commit -m "[#123] Add SoftDeletes trait for models" @@ -105,13 +111,13 @@ Notes: ## Testing Quantum uses **PHPUnit** for tests. If you add new features, make sure they include unit tests — especially for database or HTTP-related components. For in-memory testing, use SQLite in-memory databases (for example, in tests using IdiormDbal). -All contributions must also pass **PHPStan** (static analysis) and **PHP-CS-Fixer** (code style) checks. +All contributions must also pass **PHPStan** (static analysis), **PHP-CS-Fixer** (code style), and **Rector** dry-run checks. --- ## Code Guidelines -- PHP 7.4+ compatibility is required. +- PHP 8.0+ compatibility is required. - Keep class responsibilities clear — avoid bloated classes. - Follow the existing directory structure - Always document public methods. diff --git a/composer.json b/composer.json index 70244c4c..424abeff 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,14 @@ { "name": "Arman Ag", "email": "arman@quantumphp.io" + }, + { + "name": "Contributors", + "homepage": "https://github.com/quantum-php/framework/contributors" } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-pdo": "*", "ext-curl": "*", "ext-json": "*", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 706c07c3..d0b99094 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,6 @@ parameters: - phpVersion: 70400 - level: 7 + phpVersion: 80000 + level: 8 paths: - src @@ -13,4 +13,4 @@ parameters: checkUninitializedProperties: true checkDynamicProperties: false - treatPhpDocTypesAsCertain: false \ No newline at end of file + treatPhpDocTypesAsCertain: false diff --git a/rector.php b/rector.php index 9a9ffea4..e5527495 100644 --- a/rector.php +++ b/rector.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; +use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; use Rector\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; @@ -20,6 +21,7 @@ DeclareStrictTypesRector::class, ]) ->withSkip([ + ClassPropertyAssignToConstructorPromotionRector::class, StrictStringParamConcatRector::class => [ __DIR__ . '/src/Database/Adapters/Idiorm/Statements/Criteria.php', ], diff --git a/src/App/Adapters/AppAdapter.php b/src/App/Adapters/AppAdapter.php index 597043d7..d7160304 100644 --- a/src/App/Adapters/AppAdapter.php +++ b/src/App/Adapters/AppAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Adapters; diff --git a/src/App/Adapters/ConsoleAppAdapter.php b/src/App/Adapters/ConsoleAppAdapter.php index 2a2b8730..8700ecdd 100644 --- a/src/App/Adapters/ConsoleAppAdapter.php +++ b/src/App/Adapters/ConsoleAppAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Adapters; diff --git a/src/App/Adapters/WebAppAdapter.php b/src/App/Adapters/WebAppAdapter.php index 7280233e..1f629231 100644 --- a/src/App/Adapters/WebAppAdapter.php +++ b/src/App/Adapters/WebAppAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Adapters; diff --git a/src/App/App.php b/src/App/App.php index aa4402cc..fde9b474 100644 --- a/src/App/App.php +++ b/src/App/App.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App; @@ -70,7 +64,7 @@ public function getAdapter(): AppInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw AppException::methodNotSupported($method, get_class($this->adapter)); + throw AppException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/App/AppContext.php b/src/App/AppContext.php index 9e588cbc..6e614d26 100644 --- a/src/App/AppContext.php +++ b/src/App/AppContext.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App; diff --git a/src/App/BootPipeline.php b/src/App/BootPipeline.php index 77310e15..89cfa493 100644 --- a/src/App/BootPipeline.php +++ b/src/App/BootPipeline.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App; diff --git a/src/App/Contracts/AppInterface.php b/src/App/Contracts/AppInterface.php index 9f456b0e..c87f8dd9 100644 --- a/src/App/Contracts/AppInterface.php +++ b/src/App/Contracts/AppInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Contracts; diff --git a/src/App/Contracts/BootStageInterface.php b/src/App/Contracts/BootStageInterface.php index 2fc19207..f4c13cdd 100644 --- a/src/App/Contracts/BootStageInterface.php +++ b/src/App/Contracts/BootStageInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Contracts; diff --git a/src/App/Enums/AppType.php b/src/App/Enums/AppType.php index 457fa844..2a4625ca 100644 --- a/src/App/Enums/AppType.php +++ b/src/App/Enums/AppType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Enums; diff --git a/src/App/Enums/ExceptionMessages.php b/src/App/Enums/ExceptionMessages.php index f913d061..f63f047e 100644 --- a/src/App/Enums/ExceptionMessages.php +++ b/src/App/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Enums; diff --git a/src/App/Enums/ExitCode.php b/src/App/Enums/ExitCode.php index 38fcea36..4f6432c7 100644 --- a/src/App/Enums/ExitCode.php +++ b/src/App/Enums/ExitCode.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Enums; diff --git a/src/App/Enums/ReservedKeys.php b/src/App/Enums/ReservedKeys.php index 976431c6..0ad3be29 100644 --- a/src/App/Enums/ReservedKeys.php +++ b/src/App/Enums/ReservedKeys.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Enums; diff --git a/src/App/Exceptions/AppException.php b/src/App/Exceptions/AppException.php index d6ac456e..d6bad4bf 100644 --- a/src/App/Exceptions/AppException.php +++ b/src/App/Exceptions/AppException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Exceptions; diff --git a/src/App/Exceptions/BaseException.php b/src/App/Exceptions/BaseException.php index bb43505c..e5b820ec 100644 --- a/src/App/Exceptions/BaseException.php +++ b/src/App/Exceptions/BaseException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Exceptions; diff --git a/src/App/Factories/AppFactory.php b/src/App/Factories/AppFactory.php index e83b2ac6..e9188cfe 100644 --- a/src/App/Factories/AppFactory.php +++ b/src/App/Factories/AppFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Factories; diff --git a/src/App/Helpers/app.php b/src/App/Helpers/app.php index c005e414..86da6006 100644 --- a/src/App/Helpers/app.php +++ b/src/App/Helpers/app.php @@ -2,12 +2,6 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ diff --git a/src/App/Helpers/dir.php b/src/App/Helpers/dir.php index e653e773..cdea4218 100644 --- a/src/App/Helpers/dir.php +++ b/src/App/Helpers/dir.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\App\App; diff --git a/src/App/Helpers/misc.php b/src/App/Helpers/misc.php index 2a09310c..bfa86c4f 100644 --- a/src/App/Helpers/misc.php +++ b/src/App/Helpers/misc.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Symfony\Component\VarExporter\Exception\ExceptionInterface; diff --git a/src/App/Helpers/uuid.php b/src/App/Helpers/uuid.php index b0d9e9d3..f9d45ab2 100644 --- a/src/App/Helpers/uuid.php +++ b/src/App/Helpers/uuid.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Ramsey\Uuid\Uuid; diff --git a/src/App/Stages/InitDebuggerStage.php b/src/App/Stages/InitDebuggerStage.php index 56c9a31b..80cdd3ef 100644 --- a/src/App/Stages/InitDebuggerStage.php +++ b/src/App/Stages/InitDebuggerStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Stages/InitHttpStage.php b/src/App/Stages/InitHttpStage.php index 693a8e88..0c77901f 100644 --- a/src/App/Stages/InitHttpStage.php +++ b/src/App/Stages/InitHttpStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Stages/LoadAppConfigStage.php b/src/App/Stages/LoadAppConfigStage.php index 663e1996..1e8e51a2 100644 --- a/src/App/Stages/LoadAppConfigStage.php +++ b/src/App/Stages/LoadAppConfigStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Stages/LoadEnvironmentStage.php b/src/App/Stages/LoadEnvironmentStage.php index 0abdbaf3..42d04171 100644 --- a/src/App/Stages/LoadEnvironmentStage.php +++ b/src/App/Stages/LoadEnvironmentStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Stages/LoadHelpersStage.php b/src/App/Stages/LoadHelpersStage.php index 91a5f551..6c9c64fd 100644 --- a/src/App/Stages/LoadHelpersStage.php +++ b/src/App/Stages/LoadHelpersStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Stages/LoadModulesStage.php b/src/App/Stages/LoadModulesStage.php index 31c60b1d..2baa9eb0 100644 --- a/src/App/Stages/LoadModulesStage.php +++ b/src/App/Stages/LoadModulesStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Stages/SetupErrorHandlerStage.php b/src/App/Stages/SetupErrorHandlerStage.php index 3fa71a16..cf565ee5 100644 --- a/src/App/Stages/SetupErrorHandlerStage.php +++ b/src/App/Stages/SetupErrorHandlerStage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Stages; diff --git a/src/App/Traits/ConsoleAppTrait.php b/src/App/Traits/ConsoleAppTrait.php index b3e42fca..ec28b459 100644 --- a/src/App/Traits/ConsoleAppTrait.php +++ b/src/App/Traits/ConsoleAppTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Traits; diff --git a/src/App/Traits/WebAppTrait.php b/src/App/Traits/WebAppTrait.php index 853db8ef..5bd97a0d 100644 --- a/src/App/Traits/WebAppTrait.php +++ b/src/App/Traits/WebAppTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\App\Traits; diff --git a/src/Archive/Adapters/PharAdapter.php b/src/Archive/Adapters/PharAdapter.php index a0a632b9..0fc5c763 100644 --- a/src/Archive/Adapters/PharAdapter.php +++ b/src/Archive/Adapters/PharAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Adapters; @@ -62,7 +56,7 @@ public function removeArchive(): bool try { $this->archive = null; return Phar::unlinkArchive($this->archiveName); - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -111,7 +105,7 @@ public function addFile(string $filePath, ?string $entryName = null): bool ? $this->archive->addFile($filePath, $entryName) : $this->archive->addFile($filePath); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -127,7 +121,7 @@ public function addFromString(string $entryName, string $content): bool try { $this->archive->addFromString($entryName, $content); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -144,7 +138,7 @@ public function addMultipleFiles(array $fileNames): bool foreach ($fileNames as $fileName => $filePath) { $this->archive->addFile($filePath, $fileName); } - } catch (Exception $e) { + } catch (Exception) { return false; } @@ -173,7 +167,7 @@ public function extractTo(string $pathToExtract, $files = null): bool try { $this->archive->extractTo($pathToExtract, $files); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -189,7 +183,7 @@ public function deleteFile(string $filename): bool try { $this->archive->delete($filename); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -208,7 +202,7 @@ public function deleteMultipleFiles(array $fileNames): bool } return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -237,7 +231,7 @@ private function openArchive(): void if ($this->archive === null) { try { $this->archive = new Phar($this->archiveName); - } catch (Exception $e) { + } catch (Exception) { throw ArchiveException::cantOpen($this->archiveName); } } diff --git a/src/Archive/Adapters/ZipAdapter.php b/src/Archive/Adapters/ZipAdapter.php index e07371d1..284a7cf1 100644 --- a/src/Archive/Adapters/ZipAdapter.php +++ b/src/Archive/Adapters/ZipAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Adapters; @@ -27,7 +21,7 @@ /** * Class ZipAdapter - * @package Quantum\Archive\Adapters + * @package Quantum\Archive */ class ZipAdapter implements ArchiveInterface { @@ -60,7 +54,7 @@ public function offsetExists(string $filename): bool { $this->ensureArchiveOpen(); - if (strpos($filename, '.') === false) { + if (!str_contains($filename, '.')) { $filename = rtrim($filename, '/') . '/'; } @@ -129,7 +123,7 @@ public function addMultipleFiles(array $fileNames): bool foreach ($fileNames as $entryName => $filePath) { $this->addFile($filePath, $entryName); } - } catch (Exception $e) { + } catch (Exception) { return false; } diff --git a/src/Archive/Archive.php b/src/Archive/Archive.php index c86cccc5..a236f3f7 100644 --- a/src/Archive/Archive.php +++ b/src/Archive/Archive.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive; @@ -56,7 +50,7 @@ public function getAdapter(): ArchiveInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw ArchiveException::methodNotSupported($method, get_class($this->adapter)); + throw ArchiveException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Archive/Contracts/ArchiveInterface.php b/src/Archive/Contracts/ArchiveInterface.php index 236c4721..da3fc234 100644 --- a/src/Archive/Contracts/ArchiveInterface.php +++ b/src/Archive/Contracts/ArchiveInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Contracts; diff --git a/src/Archive/Enums/ArchiveType.php b/src/Archive/Enums/ArchiveType.php index f1defd8b..74994b36 100644 --- a/src/Archive/Enums/ArchiveType.php +++ b/src/Archive/Enums/ArchiveType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Enums; diff --git a/src/Archive/Enums/ExceptionMessages.php b/src/Archive/Enums/ExceptionMessages.php index b953cc5e..427edbb1 100644 --- a/src/Archive/Enums/ExceptionMessages.php +++ b/src/Archive/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Enums; diff --git a/src/Archive/Exceptions/ArchiveException.php b/src/Archive/Exceptions/ArchiveException.php index 6eaaa729..ec1f21d1 100644 --- a/src/Archive/Exceptions/ArchiveException.php +++ b/src/Archive/Exceptions/ArchiveException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Exceptions; diff --git a/src/Archive/Factories/ArchiveFactory.php b/src/Archive/Factories/ArchiveFactory.php index 73242675..8595e904 100644 --- a/src/Archive/Factories/ArchiveFactory.php +++ b/src/Archive/Factories/ArchiveFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Archive\Factories; diff --git a/src/Asset/Asset.php b/src/Asset/Asset.php index 86eb20df..88bdfaf6 100644 --- a/src/Asset/Asset.php +++ b/src/Asset/Asset.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Asset; diff --git a/src/Asset/AssetManager.php b/src/Asset/AssetManager.php index 66a14e5f..b0da6789 100644 --- a/src/Asset/AssetManager.php +++ b/src/Asset/AssetManager.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Asset; diff --git a/src/Asset/Enums/ExceptionMessages.php b/src/Asset/Enums/ExceptionMessages.php index ba284ecf..583ffb82 100644 --- a/src/Asset/Enums/ExceptionMessages.php +++ b/src/Asset/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Asset\Enums; diff --git a/src/Asset/Exceptions/AssetException.php b/src/Asset/Exceptions/AssetException.php index 81a73160..e0dc8aa2 100644 --- a/src/Asset/Exceptions/AssetException.php +++ b/src/Asset/Exceptions/AssetException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Asset\Exceptions; diff --git a/src/Asset/Helpers/asset.php b/src/Asset/Helpers/asset.php index 83a9ad0f..363f0329 100644 --- a/src/Asset/Helpers/asset.php +++ b/src/Asset/Helpers/asset.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Asset\Exceptions\AssetException; diff --git a/src/Auth/Adapters/JwtAuthAdapter.php b/src/Auth/Adapters/JwtAuthAdapter.php index ba415cbf..434e9ab8 100644 --- a/src/Auth/Adapters/JwtAuthAdapter.php +++ b/src/Auth/Adapters/JwtAuthAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Adapters; @@ -57,9 +51,10 @@ public function __construct(AuthServiceInterface $authService, Mailer $mailer, H /** * @inheritDoc + * @return string|array * @throws AuthException|DiException|JwtException|ReflectionException|Exception */ - public function signin(string $username, string $password) + public function signin(string $username, string $password): string|array { $user = $this->getUser($username, $password); @@ -105,7 +100,7 @@ public function user(): ?User { try { return $this->getUserFromAccessToken(); - } catch (Exception $e) { + } catch (Exception) { return $this->getUserFromRefreshToken(); } } diff --git a/src/Auth/Adapters/SessionAuthAdapter.php b/src/Auth/Adapters/SessionAuthAdapter.php index 24a22055..3d676b64 100644 --- a/src/Auth/Adapters/SessionAuthAdapter.php +++ b/src/Auth/Adapters/SessionAuthAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Adapters; @@ -66,7 +60,7 @@ public function __construct(AuthServiceInterface $authService, Mailer $mailer, H * @throws SessionException * @throws Exception */ - public function signin(string $username, string $password, bool $remember = false) + public function signin(string $username, string $password, bool $remember = false): string|bool { $user = $this->getUser($username, $password); @@ -174,7 +168,7 @@ public function verifyOtp(int $otp, string $otpToken): bool * @return User|false * @throws BaseException */ - private function checkRememberToken() + private function checkRememberToken(): false|\Quantum\Auth\User { $user = $this->authService->get( $this->keyFields[AuthKeys::REMEMBER_TOKEN], diff --git a/src/Auth/Auth.php b/src/Auth/Auth.php index d09b96bd..4155e218 100644 --- a/src/Auth/Auth.php +++ b/src/Auth/Auth.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth; @@ -50,7 +44,7 @@ public function getAdapter(): AuthenticatableInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw AuthException::methodNotSupported($method, get_class($this->adapter)); + throw AuthException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Auth/Contracts/AuthServiceInterface.php b/src/Auth/Contracts/AuthServiceInterface.php index f582e179..c076277b 100644 --- a/src/Auth/Contracts/AuthServiceInterface.php +++ b/src/Auth/Contracts/AuthServiceInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Contracts; diff --git a/src/Auth/Contracts/AuthenticatableInterface.php b/src/Auth/Contracts/AuthenticatableInterface.php index 61096ba1..ec30c01c 100644 --- a/src/Auth/Contracts/AuthenticatableInterface.php +++ b/src/Auth/Contracts/AuthenticatableInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Contracts; diff --git a/src/Auth/Enums/AuthKeys.php b/src/Auth/Enums/AuthKeys.php index b2866493..3c6ee165 100644 --- a/src/Auth/Enums/AuthKeys.php +++ b/src/Auth/Enums/AuthKeys.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Enums; diff --git a/src/Auth/Enums/AuthType.php b/src/Auth/Enums/AuthType.php index 2339087b..4c78cad2 100644 --- a/src/Auth/Enums/AuthType.php +++ b/src/Auth/Enums/AuthType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Enums; diff --git a/src/Auth/Enums/ExceptionMessages.php b/src/Auth/Enums/ExceptionMessages.php index 0132e501..68c04ddb 100644 --- a/src/Auth/Enums/ExceptionMessages.php +++ b/src/Auth/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Enums; diff --git a/src/Auth/Exceptions/AuthException.php b/src/Auth/Exceptions/AuthException.php index 0e14861f..4e47405c 100644 --- a/src/Auth/Exceptions/AuthException.php +++ b/src/Auth/Exceptions/AuthException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Exceptions; @@ -21,7 +15,7 @@ /** * Class AuthException - * @package Quantum\Exceptions + * @package Quantum\Auth */ class AuthException extends BaseException { diff --git a/src/Auth/Factories/AuthFactory.php b/src/Auth/Factories/AuthFactory.php index 92c5d671..5dcca8b1 100644 --- a/src/Auth/Factories/AuthFactory.php +++ b/src/Auth/Factories/AuthFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Factories; diff --git a/src/Auth/Helpers/auth.php b/src/Auth/Helpers/auth.php index 0ddf5f5d..d27bca5a 100644 --- a/src/Auth/Helpers/auth.php +++ b/src/Auth/Helpers/auth.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Service\Exceptions\ServiceException; diff --git a/src/Auth/Traits/AuthTrait.php b/src/Auth/Traits/AuthTrait.php index 7364a074..7355222f 100644 --- a/src/Auth/Traits/AuthTrait.php +++ b/src/Auth/Traits/AuthTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth\Traits; diff --git a/src/Auth/User.php b/src/Auth/User.php index 41983f33..79ad2094 100644 --- a/src/Auth/User.php +++ b/src/Auth/User.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Auth; @@ -102,7 +96,7 @@ public function hasField(string $field): bool * Gets the user property * @return string|null */ - public function __get(string $property) + public function __get(string $property): mixed { return $this->getFieldValue($property); } diff --git a/src/Cache/Adapters/DatabaseAdapter.php b/src/Cache/Adapters/DatabaseAdapter.php index 4957b964..9da18651 100644 --- a/src/Cache/Adapters/DatabaseAdapter.php +++ b/src/Cache/Adapters/DatabaseAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Adapters; @@ -61,7 +55,7 @@ public function get($key, $default = null) try { return unserialize($cacheItem->prop('value')); - } catch (Exception $e) { + } catch (Exception) { $this->delete($key); return $default; } diff --git a/src/Cache/Adapters/FileAdapter.php b/src/Cache/Adapters/FileAdapter.php index b8677a9d..e949ece0 100644 --- a/src/Cache/Adapters/FileAdapter.php +++ b/src/Cache/Adapters/FileAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Adapters; @@ -26,6 +20,7 @@ use Quantum\Storage\FileSystem; use InvalidArgumentException; use ReflectionException; +use Exception; /** * Class FileAdapter @@ -71,7 +66,7 @@ public function get($key, $default = null) try { return unserialize($cacheItem); - } catch (\Exception $e) { + } catch (Exception) { $this->delete($key); return $default; } diff --git a/src/Cache/Adapters/MemcachedAdapter.php b/src/Cache/Adapters/MemcachedAdapter.php index 3be9dc57..68cd44c7 100644 --- a/src/Cache/Adapters/MemcachedAdapter.php +++ b/src/Cache/Adapters/MemcachedAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Adapters; @@ -62,7 +56,7 @@ public function get($key, $default = null) try { return unserialize($cacheItem); - } catch (Exception $e) { + } catch (Exception) { $this->delete($key); return $default; } diff --git a/src/Cache/Adapters/RedisAdapter.php b/src/Cache/Adapters/RedisAdapter.php index 818f8761..fc3d8430 100644 --- a/src/Cache/Adapters/RedisAdapter.php +++ b/src/Cache/Adapters/RedisAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Adapters; @@ -57,7 +51,7 @@ public function get($key, $default = null) try { return unserialize($cacheItem); - } catch (Exception $e) { + } catch (Exception) { $this->delete($key); return $default; } diff --git a/src/Cache/Cache.php b/src/Cache/Cache.php index f28157e3..992aa249 100644 --- a/src/Cache/Cache.php +++ b/src/Cache/Cache.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache; @@ -60,7 +54,7 @@ public function getAdapter(): CacheInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw CacheException::methodNotSupported($method, get_class($this->adapter)); + throw CacheException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Cache/Enums/CacheType.php b/src/Cache/Enums/CacheType.php index ae9eb7a1..ba1c0429 100644 --- a/src/Cache/Enums/CacheType.php +++ b/src/Cache/Enums/CacheType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Enums; diff --git a/src/Cache/Enums/ExceptionMessages.php b/src/Cache/Enums/ExceptionMessages.php index 5dc4f5bb..b76e3da9 100644 --- a/src/Cache/Enums/ExceptionMessages.php +++ b/src/Cache/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Enums; diff --git a/src/Cache/Exceptions/CacheException.php b/src/Cache/Exceptions/CacheException.php index 2a6c6f10..345f43d6 100644 --- a/src/Cache/Exceptions/CacheException.php +++ b/src/Cache/Exceptions/CacheException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Exceptions; diff --git a/src/Cache/Factories/CacheFactory.php b/src/Cache/Factories/CacheFactory.php index 2f12d2df..415d336d 100644 --- a/src/Cache/Factories/CacheFactory.php +++ b/src/Cache/Factories/CacheFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Factories; diff --git a/src/Cache/Helpers/cache.php b/src/Cache/Helpers/cache.php index 7c85510c..2c12b879 100644 --- a/src/Cache/Helpers/cache.php +++ b/src/Cache/Helpers/cache.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Exceptions\ConfigException; diff --git a/src/Cache/Traits/CacheTrait.php b/src/Cache/Traits/CacheTrait.php index 7a2bef12..9ed87706 100644 --- a/src/Cache/Traits/CacheTrait.php +++ b/src/Cache/Traits/CacheTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cache\Traits; @@ -21,7 +15,7 @@ /** * Trait CacheTrait - * @package Quantum\Cache\Traits + * @package Quantum\Cache */ trait CacheTrait { diff --git a/src/Captcha/Adapters/HcaptchaAdapter.php b/src/Captcha/Adapters/HcaptchaAdapter.php index 91cac29e..f4b7606d 100644 --- a/src/Captcha/Adapters/HcaptchaAdapter.php +++ b/src/Captcha/Adapters/HcaptchaAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Adapters; diff --git a/src/Captcha/Adapters/RecaptchaAdapter.php b/src/Captcha/Adapters/RecaptchaAdapter.php index 9e08c060..4d16e8a4 100644 --- a/src/Captcha/Adapters/RecaptchaAdapter.php +++ b/src/Captcha/Adapters/RecaptchaAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Adapters; diff --git a/src/Captcha/Captcha.php b/src/Captcha/Captcha.php index 38401a10..d344b088 100644 --- a/src/Captcha/Captcha.php +++ b/src/Captcha/Captcha.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha; @@ -52,7 +46,7 @@ public function getAdapter(): CaptchaInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw CaptchaException::methodNotSupported($method, get_class($this->adapter)); + throw CaptchaException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Captcha/Contracts/CaptchaInterface.php b/src/Captcha/Contracts/CaptchaInterface.php index e1e1ecc5..a2ca7578 100644 --- a/src/Captcha/Contracts/CaptchaInterface.php +++ b/src/Captcha/Contracts/CaptchaInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Contracts; diff --git a/src/Captcha/Enums/CaptchaType.php b/src/Captcha/Enums/CaptchaType.php index f5aa7301..ccea561c 100644 --- a/src/Captcha/Enums/CaptchaType.php +++ b/src/Captcha/Enums/CaptchaType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Enums; diff --git a/src/Captcha/Exceptions/CaptchaException.php b/src/Captcha/Exceptions/CaptchaException.php index 61630ff9..a50aecd1 100644 --- a/src/Captcha/Exceptions/CaptchaException.php +++ b/src/Captcha/Exceptions/CaptchaException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Exceptions; diff --git a/src/Captcha/Factories/CaptchaFactory.php b/src/Captcha/Factories/CaptchaFactory.php index 314160a2..d38951d9 100644 --- a/src/Captcha/Factories/CaptchaFactory.php +++ b/src/Captcha/Factories/CaptchaFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Factories; diff --git a/src/Captcha/Helpers/captcha.php b/src/Captcha/Helpers/captcha.php index 3e9a3a69..dbd18d81 100644 --- a/src/Captcha/Helpers/captcha.php +++ b/src/Captcha/Helpers/captcha.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Exceptions\ConfigException; diff --git a/src/Captcha/Traits/CaptchaTrait.php b/src/Captcha/Traits/CaptchaTrait.php index b8dc04e6..0b6ae4b8 100644 --- a/src/Captcha/Traits/CaptchaTrait.php +++ b/src/Captcha/Traits/CaptchaTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Captcha\Traits; diff --git a/src/Config/Config.php b/src/Config/Config.php index 8cd4c2df..02f89b4c 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Config; diff --git a/src/Config/Contracts/ConfigInterface.php b/src/Config/Contracts/ConfigInterface.php index e4889090..ad885d9f 100644 --- a/src/Config/Contracts/ConfigInterface.php +++ b/src/Config/Contracts/ConfigInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Config\Contracts; diff --git a/src/Config/Enums/ExceptionMessages.php b/src/Config/Enums/ExceptionMessages.php index a4bc8aa1..7672284e 100644 --- a/src/Config/Enums/ExceptionMessages.php +++ b/src/Config/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Config\Enums; diff --git a/src/Config/Exceptions/ConfigException.php b/src/Config/Exceptions/ConfigException.php index fdbafc31..15120edc 100644 --- a/src/Config/Exceptions/ConfigException.php +++ b/src/Config/Exceptions/ConfigException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Config\Exceptions; diff --git a/src/Config/Helpers/config.php b/src/Config/Helpers/config.php index 05161449..61bafcbb 100644 --- a/src/Config/Helpers/config.php +++ b/src/Config/Helpers/config.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Config; diff --git a/src/Console/CliCommand.php b/src/Console/CliCommand.php index a066a433..6a26cb5a 100644 --- a/src/Console/CliCommand.php +++ b/src/Console/CliCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console; diff --git a/src/Console/CommandDiscovery.php b/src/Console/CommandDiscovery.php index 27cb509c..d04a149b 100644 --- a/src/Console/CommandDiscovery.php +++ b/src/Console/CommandDiscovery.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console; diff --git a/src/Console/Commands/CronRunCommand.php b/src/Console/Commands/CronRunCommand.php index 5982c1eb..b97b131d 100644 --- a/src/Console/Commands/CronRunCommand.php +++ b/src/Console/Commands/CronRunCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/DebugBarCommand.php b/src/Console/Commands/DebugBarCommand.php index ae059517..19cc23a5 100644 --- a/src/Console/Commands/DebugBarCommand.php +++ b/src/Console/Commands/DebugBarCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/EnvCommand.php b/src/Console/Commands/EnvCommand.php index 0aedec53..4dfadf17 100644 --- a/src/Console/Commands/EnvCommand.php +++ b/src/Console/Commands/EnvCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/InstallToolkitCommand.php b/src/Console/Commands/InstallToolkitCommand.php index 75e14788..0c07aec5 100644 --- a/src/Console/Commands/InstallToolkitCommand.php +++ b/src/Console/Commands/InstallToolkitCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/KeyGenerateCommand.php b/src/Console/Commands/KeyGenerateCommand.php index f1e71d11..518d243d 100644 --- a/src/Console/Commands/KeyGenerateCommand.php +++ b/src/Console/Commands/KeyGenerateCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/MigrationGenerateCommand.php b/src/Console/Commands/MigrationGenerateCommand.php index 4d3165f4..df146a85 100644 --- a/src/Console/Commands/MigrationGenerateCommand.php +++ b/src/Console/Commands/MigrationGenerateCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/MigrationMigrateCommand.php b/src/Console/Commands/MigrationMigrateCommand.php index 7f4b074f..207276d0 100644 --- a/src/Console/Commands/MigrationMigrateCommand.php +++ b/src/Console/Commands/MigrationMigrateCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/ModuleGenerateCommand.php b/src/Console/Commands/ModuleGenerateCommand.php index e2be3ee9..3545548f 100644 --- a/src/Console/Commands/ModuleGenerateCommand.php +++ b/src/Console/Commands/ModuleGenerateCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; @@ -23,7 +17,7 @@ /** * Class ModuleGenerateCommand - * @package Quantum\Console\Commands + * @package Quantum\Console */ class ModuleGenerateCommand extends CliCommand { diff --git a/src/Console/Commands/OpenApiCommand.php b/src/Console/Commands/OpenApiCommand.php index 0f1f155f..7c8891d5 100644 --- a/src/Console/Commands/OpenApiCommand.php +++ b/src/Console/Commands/OpenApiCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; @@ -31,7 +25,7 @@ use Quantum\Di\Di; /** - * Class OpenApiUiAssetsCommand + * Class OpenApiCommand * @package Quantum\Console */ class OpenApiCommand extends CliCommand diff --git a/src/Console/Commands/ResourceCacheClearCommand.php b/src/Console/Commands/ResourceCacheClearCommand.php index 6229e02c..80a9a004 100644 --- a/src/Console/Commands/ResourceCacheClearCommand.php +++ b/src/Console/Commands/ResourceCacheClearCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/RouteListCommand.php b/src/Console/Commands/RouteListCommand.php index 7b45a56d..82694555 100644 --- a/src/Console/Commands/RouteListCommand.php +++ b/src/Console/Commands/RouteListCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Commands/ServeCommand.php b/src/Console/Commands/ServeCommand.php index 2c374a6c..44daf109 100644 --- a/src/Console/Commands/ServeCommand.php +++ b/src/Console/Commands/ServeCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; @@ -121,7 +115,7 @@ protected function startServerOnAvailablePort(string $host, int $startPort): arr 'port' => $port, 'url' => $url, ]; - } catch (Throwable $e) { + } catch (Throwable) { $this->cleanupProcess($process); } } @@ -214,7 +208,7 @@ protected function waitUntilServerIsReady(string $host, int $port, $process): vo while (true) { $status = proc_get_status($process); - if ($status === false || !$status['running']) { + if (!$status['running']) { throw new RuntimeException('PHP server process died unexpectedly.'); } @@ -238,7 +232,7 @@ protected function waitUntilServerIsReady(string $host, int $port, $process): vo */ protected function waitForProcess($process): void { - while (($status = proc_get_status($process)) !== false && $status['running']) { + while (($status = proc_get_status($process))['running']) { usleep(200_000); } @@ -281,16 +275,12 @@ protected function openBrowser(string $url): void */ protected function browserCommand(string $url): ?array { - switch (PHP_OS_FAMILY) { - case self::PLATFORM_WINDOWS: - return ['explorer.exe', $url]; - case self::PLATFORM_LINUX: - return ['xdg-open', $url]; - case self::PLATFORM_MAC: - return ['open', $url]; - default: - return null; - } + return match (PHP_OS_FAMILY) { + self::PLATFORM_WINDOWS => ['explorer.exe', $url], + self::PLATFORM_LINUX => ['xdg-open', $url], + self::PLATFORM_MAC => ['open', $url], + default => null, + }; } /** diff --git a/src/Console/Commands/VersionCommand.php b/src/Console/Commands/VersionCommand.php index 349348bd..2e745553 100644 --- a/src/Console/Commands/VersionCommand.php +++ b/src/Console/Commands/VersionCommand.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Commands; diff --git a/src/Console/Contracts/CommandInterface.php b/src/Console/Contracts/CommandInterface.php index 33d17d46..5aedc24b 100644 --- a/src/Console/Contracts/CommandInterface.php +++ b/src/Console/Contracts/CommandInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Console\Contracts; diff --git a/src/Cookie/Contracts/CookieStorageInterface.php b/src/Cookie/Contracts/CookieStorageInterface.php index a7d4a385..7728b80b 100644 --- a/src/Cookie/Contracts/CookieStorageInterface.php +++ b/src/Cookie/Contracts/CookieStorageInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cookie\Contracts; diff --git a/src/Cookie/Cookie.php b/src/Cookie/Cookie.php index d990e019..dab7037e 100644 --- a/src/Cookie/Cookie.php +++ b/src/Cookie/Cookie.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cookie; diff --git a/src/Cookie/Helpers/cookie.php b/src/Cookie/Helpers/cookie.php index a61fe772..4fd0876f 100644 --- a/src/Cookie/Helpers/cookie.php +++ b/src/Cookie/Helpers/cookie.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Di\Exceptions\DiException; diff --git a/src/Cron/Contracts/CronTaskInterface.php b/src/Cron/Contracts/CronTaskInterface.php index ea0feeb9..88d609e7 100644 --- a/src/Cron/Contracts/CronTaskInterface.php +++ b/src/Cron/Contracts/CronTaskInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cron\Contracts; diff --git a/src/Cron/CronManager.php b/src/Cron/CronManager.php index c6c9495a..bed7034e 100644 --- a/src/Cron/CronManager.php +++ b/src/Cron/CronManager.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cron; @@ -187,7 +181,7 @@ private function runTask(CronTaskInterface $task, bool $force = false): void } catch (Throwable $e) { $this->stats['failed']++; $this->log('error', "Task \"{$task->getName()}\" failed: " . $e->getMessage(), [ - 'exception' => get_class($e), + 'exception' => $e::class, 'file' => $e->getFile(), 'line' => $e->getLine(), ]); @@ -233,7 +227,7 @@ private function log(string $level, string $message, array $context = []): void try { $logger = LoggerFactory::get(LoggerType::SINGLE); $logger->log($level, '[CRON] ' . $message, $context); - } catch (Throwable $exception) { + } catch (Throwable) { error_log(sprintf('[CRON] [%s] %s', strtoupper($level), $message)); } } diff --git a/src/Cron/CronTask.php b/src/Cron/CronTask.php index 198a7b9a..4d788e90 100644 --- a/src/Cron/CronTask.php +++ b/src/Cron/CronTask.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cron; @@ -54,7 +48,7 @@ public function __construct(string $name, string $expression, callable $callback try { $this->cronExpression = new CronExpression($expression); - } catch (Exception $e) { + } catch (Exception) { throw CronException::invalidExpression($expression); } } diff --git a/src/Cron/Enums/ExceptionMessages.php b/src/Cron/Enums/ExceptionMessages.php index 0ba64695..4a034fdb 100644 --- a/src/Cron/Enums/ExceptionMessages.php +++ b/src/Cron/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cron\Enums; diff --git a/src/Cron/Exceptions/CronException.php b/src/Cron/Exceptions/CronException.php index 4902113e..f55282bf 100644 --- a/src/Cron/Exceptions/CronException.php +++ b/src/Cron/Exceptions/CronException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cron\Exceptions; diff --git a/src/Cron/Helpers/cron.php b/src/Cron/Helpers/cron.php index d4a0552f..76a9c35b 100644 --- a/src/Cron/Helpers/cron.php +++ b/src/Cron/Helpers/cron.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Cron\Exceptions\CronException; @@ -35,7 +29,7 @@ function cron_config(string $key, $default = null) if (!config()->has('cron')) { config()->import(new Setup('config', 'cron')); } - } catch (Throwable $exception) { + } catch (Throwable) { // Ignore missing cron config file and rely on defaults } diff --git a/src/Cron/Schedule.php b/src/Cron/Schedule.php index 8d28d7bc..965d6c7e 100644 --- a/src/Cron/Schedule.php +++ b/src/Cron/Schedule.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Cron; diff --git a/src/Csrf/Csrf.php b/src/Csrf/Csrf.php index ba0688c4..d5d19245 100644 --- a/src/Csrf/Csrf.php +++ b/src/Csrf/Csrf.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Csrf; diff --git a/src/Csrf/Enums/ExceptionMessages.php b/src/Csrf/Enums/ExceptionMessages.php index 036b2744..e4c1b826 100644 --- a/src/Csrf/Enums/ExceptionMessages.php +++ b/src/Csrf/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Csrf\Enums; diff --git a/src/Csrf/Exceptions/CsrfException.php b/src/Csrf/Exceptions/CsrfException.php index eb5feaf5..f1afada2 100644 --- a/src/Csrf/Exceptions/CsrfException.php +++ b/src/Csrf/Exceptions/CsrfException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Csrf\Exceptions; diff --git a/src/Csrf/Helpers/csrf.php b/src/Csrf/Helpers/csrf.php index d275e03e..631266d0 100644 --- a/src/Csrf/Helpers/csrf.php +++ b/src/Csrf/Helpers/csrf.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\App\Exceptions\BaseException; diff --git a/src/Database/Adapters/Idiorm/IdiormDbal.php b/src/Database/Adapters/Idiorm/IdiormDbal.php index e60a1681..0649c582 100644 --- a/src/Database/Adapters/Idiorm/IdiormDbal.php +++ b/src/Database/Adapters/Idiorm/IdiormDbal.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm; @@ -243,7 +237,7 @@ public function truncate(): bool try { $this->getOrmModel()->raw_execute("DELETE FROM {$this->table}"); return true; - } catch (\Exception $e) { + } catch (\Exception) { return false; } } diff --git a/src/Database/Adapters/Idiorm/IdiormPatch.php b/src/Database/Adapters/Idiorm/IdiormPatch.php index f8ee0ec1..3f9de7f4 100644 --- a/src/Database/Adapters/Idiorm/IdiormPatch.php +++ b/src/Database/Adapters/Idiorm/IdiormPatch.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm; diff --git a/src/Database/Adapters/Idiorm/Statements/Criteria.php b/src/Database/Adapters/Idiorm/Statements/Criteria.php index 537c9b3f..9630ee48 100644 --- a/src/Database/Adapters/Idiorm/Statements/Criteria.php +++ b/src/Database/Adapters/Idiorm/Statements/Criteria.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; diff --git a/src/Database/Adapters/Idiorm/Statements/Join.php b/src/Database/Adapters/Idiorm/Statements/Join.php index 8f001b5e..d0eff321 100644 --- a/src/Database/Adapters/Idiorm/Statements/Join.php +++ b/src/Database/Adapters/Idiorm/Statements/Join.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; @@ -83,22 +77,14 @@ public function joinTo(DbModel $relatedModel, bool $switch = true): DbalInterfac { $relation = $this->getValidatedRelation($relatedModel); - switch ($relation['type']) { - case Relation::HAS_ONE: - case Relation::HAS_MANY: - $this->applyHasRelation($relatedModel, $relation); - break; - - case Relation::BELONGS_TO: - $this->applyBelongsTo($relatedModel, $relation); - break; - - default: - throw ModelException::unsupportedRelationType($relation['type']); - } + match ($relation['type']) { + Relation::HAS_ONE, Relation::HAS_MANY => $this->applyHasRelation($relatedModel, $relation), + Relation::BELONGS_TO => $this->applyBelongsTo($relatedModel, $relation), + default => throw ModelException::unsupportedRelationType($relation['type']), + }; if ($switch) { - $this->modelName = get_class($relatedModel); + $this->modelName = $relatedModel::class; $this->table = $relatedModel->table; $this->idColumn = $relatedModel->idColumn; $this->foreignKeys = $relatedModel->relations(); @@ -146,7 +132,7 @@ protected function applyBelongsTo(DbModel $relatedModel, array $relation): void private function getValidatedRelation(DbModel $modelToJoin): array { $relations = $this->getForeignKeys(); - $relatedModelName = get_class($modelToJoin); + $relatedModelName = $modelToJoin::class; if (!isset($relations[$relatedModelName])) { throw ModelException::wrongRelation($this->getModelName(), $relatedModelName); diff --git a/src/Database/Adapters/Idiorm/Statements/Model.php b/src/Database/Adapters/Idiorm/Statements/Model.php index c52e7d3d..21528e9b 100644 --- a/src/Database/Adapters/Idiorm/Statements/Model.php +++ b/src/Database/Adapters/Idiorm/Statements/Model.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; diff --git a/src/Database/Adapters/Idiorm/Statements/Query.php b/src/Database/Adapters/Idiorm/Statements/Query.php index 248805d5..98f97513 100644 --- a/src/Database/Adapters/Idiorm/Statements/Query.php +++ b/src/Database/Adapters/Idiorm/Statements/Query.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; diff --git a/src/Database/Adapters/Idiorm/Statements/Reducer.php b/src/Database/Adapters/Idiorm/Statements/Reducer.php index 80a14271..e90afc15 100644 --- a/src/Database/Adapters/Idiorm/Statements/Reducer.php +++ b/src/Database/Adapters/Idiorm/Statements/Reducer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; @@ -63,14 +57,11 @@ public function groupBy(string $column): DbalInterface */ public function orderBy(string $column, string $direction): DbalInterface { - switch (strtolower($direction)) { - case 'asc': - $this->getOrmModel()->order_by_asc($column); - break; - case 'desc': - $this->getOrmModel()->order_by_desc($column); - break; - } + match (strtolower($direction)) { + 'asc' => $this->getOrmModel()->order_by_asc($column), + 'desc' => $this->getOrmModel()->order_by_desc($column), + default => $this, + }; return $this; } diff --git a/src/Database/Adapters/Idiorm/Statements/Result.php b/src/Database/Adapters/Idiorm/Statements/Result.php index d71a836e..fab56249 100644 --- a/src/Database/Adapters/Idiorm/Statements/Result.php +++ b/src/Database/Adapters/Idiorm/Statements/Result.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; diff --git a/src/Database/Adapters/Idiorm/Statements/Transaction.php b/src/Database/Adapters/Idiorm/Statements/Transaction.php index 5a77e734..42ac3baf 100644 --- a/src/Database/Adapters/Idiorm/Statements/Transaction.php +++ b/src/Database/Adapters/Idiorm/Statements/Transaction.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Idiorm\Statements; diff --git a/src/Database/Adapters/Sleekdb/SleekDbal.php b/src/Database/Adapters/Sleekdb/SleekDbal.php index 4a03cfdc..d0fa5aee 100644 --- a/src/Database/Adapters/Sleekdb/SleekDbal.php +++ b/src/Database/Adapters/Sleekdb/SleekDbal.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb; @@ -192,7 +186,7 @@ public function __construct( /** * @return mixed */ - public function __get(string $key) + public function __get(string $key): mixed { return $this->data[$key] ?? null; } @@ -295,7 +289,7 @@ public function truncate(): bool try { $this->getOrmModel()->deleteStore(); return true; - } catch (\Exception $e) { + } catch (\Exception) { return false; } } diff --git a/src/Database/Adapters/Sleekdb/Statements/Criteria.php b/src/Database/Adapters/Sleekdb/Statements/Criteria.php index cfa2cb83..a3c4ea26 100644 --- a/src/Database/Adapters/Sleekdb/Statements/Criteria.php +++ b/src/Database/Adapters/Sleekdb/Statements/Criteria.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb\Statements; @@ -131,7 +125,7 @@ protected function sanitizeValue($value) ]; if (is_array($value)) { - return array_map(fn ($v) => is_string($v) ? strtr($v, $escapeMap) : $v, $value); + return array_map(fn ($v): mixed => is_string($v) ? strtr($v, $escapeMap) : $v, $value); } return is_string($value) ? strtr($value, $escapeMap) : $value; diff --git a/src/Database/Adapters/Sleekdb/Statements/Join.php b/src/Database/Adapters/Sleekdb/Statements/Join.php index 5772eee4..1d879a6b 100644 --- a/src/Database/Adapters/Sleekdb/Statements/Join.php +++ b/src/Database/Adapters/Sleekdb/Statements/Join.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb\Statements; @@ -86,7 +80,7 @@ private function applyJoin( $sleekModel = new self( $modelToJoin->table, - get_class($modelToJoin), + $modelToJoin::class, $modelToJoin->idColumn, $modelToJoin->relations() ); @@ -135,19 +129,11 @@ private function applyJoinTo(QueryBuilder $queryBuilder, DbModel $relatedModel, { $relation = $this->getValidatedRelation($currentModel, $relatedModel); - switch ($relation['type']) { - case Relation::HAS_ONE: - case Relation::HAS_MANY: - $this->applyHasRelation($queryBuilder, $currentItem, $relation); - break; - - case Relation::BELONGS_TO: - $this->applyBelongsTo($queryBuilder, $currentItem, $relation, $currentModel); - break; - - default: - throw ModelException::unsupportedRelationType($relation['type']); - } + match ($relation['type']) { + Relation::HAS_ONE, Relation::HAS_MANY => $this->applyHasRelation($queryBuilder, $currentItem, $relation), + Relation::BELONGS_TO => $this->applyBelongsTo($queryBuilder, $currentItem, $relation, $currentModel), + default => throw ModelException::unsupportedRelationType($relation['type']), + }; } /** @@ -190,7 +176,7 @@ private function applyBelongsTo(QueryBuilder $queryBuilder, array $currentItem, private function getValidatedRelation(SleekDbal $currentModel, DbModel $relatedModel): array { $relations = $currentModel->getForeignKeys(); - $relatedModelName = get_class($relatedModel); + $relatedModelName = $relatedModel::class; if (!isset($relations[$relatedModelName])) { throw ModelException::wrongRelation($currentModel->getModelName(), $relatedModelName); diff --git a/src/Database/Adapters/Sleekdb/Statements/Model.php b/src/Database/Adapters/Sleekdb/Statements/Model.php index 6b63bd49..360c9fd8 100644 --- a/src/Database/Adapters/Sleekdb/Statements/Model.php +++ b/src/Database/Adapters/Sleekdb/Statements/Model.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb\Statements; diff --git a/src/Database/Adapters/Sleekdb/Statements/Reducer.php b/src/Database/Adapters/Sleekdb/Statements/Reducer.php index a6a3aa0c..b6ee16c8 100644 --- a/src/Database/Adapters/Sleekdb/Statements/Reducer.php +++ b/src/Database/Adapters/Sleekdb/Statements/Reducer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb\Statements; diff --git a/src/Database/Adapters/Sleekdb/Statements/RelatedCriteria.php b/src/Database/Adapters/Sleekdb/Statements/RelatedCriteria.php index 8e92ce81..7a329281 100644 --- a/src/Database/Adapters/Sleekdb/Statements/RelatedCriteria.php +++ b/src/Database/Adapters/Sleekdb/Statements/RelatedCriteria.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb\Statements; @@ -303,7 +297,7 @@ protected function selectReferencesRoot(array $selected, string $root): bool continue; } - if ($column === $root || strpos($column, $root . '.') === 0) { + if ($column === $root || str_starts_with($column, $root . '.')) { return true; } } diff --git a/src/Database/Adapters/Sleekdb/Statements/Result.php b/src/Database/Adapters/Sleekdb/Statements/Result.php index ee9f1740..d7bed515 100644 --- a/src/Database/Adapters/Sleekdb/Statements/Result.php +++ b/src/Database/Adapters/Sleekdb/Statements/Result.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Adapters\Sleekdb\Statements; diff --git a/src/Database/Contracts/DbalInterface.php b/src/Database/Contracts/DbalInterface.php index 8521d594..96ae3a44 100644 --- a/src/Database/Contracts/DbalInterface.php +++ b/src/Database/Contracts/DbalInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Contracts; diff --git a/src/Database/Contracts/RelationalInterface.php b/src/Database/Contracts/RelationalInterface.php index b0a94182..9a3546fd 100644 --- a/src/Database/Contracts/RelationalInterface.php +++ b/src/Database/Contracts/RelationalInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Contracts; diff --git a/src/Database/Database.php b/src/Database/Database.php index 5c972197..0fb73bfa 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database; diff --git a/src/Database/Enums/DatabaseType.php b/src/Database/Enums/DatabaseType.php index e34e26c0..48940940 100644 --- a/src/Database/Enums/DatabaseType.php +++ b/src/Database/Enums/DatabaseType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Enums; diff --git a/src/Database/Enums/ExceptionMessages.php b/src/Database/Enums/ExceptionMessages.php index 549423db..a5c1f656 100644 --- a/src/Database/Enums/ExceptionMessages.php +++ b/src/Database/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Enums; diff --git a/src/Database/Enums/Key.php b/src/Database/Enums/Key.php index 766d759e..9957155e 100644 --- a/src/Database/Enums/Key.php +++ b/src/Database/Enums/Key.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Enums; diff --git a/src/Database/Enums/Relation.php b/src/Database/Enums/Relation.php index 26cc460a..93d877e9 100644 --- a/src/Database/Enums/Relation.php +++ b/src/Database/Enums/Relation.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Enums; diff --git a/src/Database/Enums/Type.php b/src/Database/Enums/Type.php index 5786d2ef..bf24231e 100644 --- a/src/Database/Enums/Type.php +++ b/src/Database/Enums/Type.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Enums; diff --git a/src/Database/Exceptions/DatabaseException.php b/src/Database/Exceptions/DatabaseException.php index c0d2e783..5ba0bc90 100644 --- a/src/Database/Exceptions/DatabaseException.php +++ b/src/Database/Exceptions/DatabaseException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Exceptions; diff --git a/src/Database/Factories/TableFactory.php b/src/Database/Factories/TableFactory.php index db180dd5..d30290f0 100644 --- a/src/Database/Factories/TableFactory.php +++ b/src/Database/Factories/TableFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Factories; @@ -23,7 +17,7 @@ /** * Class TableFactory - * @package Quantum\Factory + * @package Quantum\Database */ class TableFactory { @@ -88,7 +82,7 @@ public function checkTableExists(string $name): bool { try { Database::query('SELECT 1 FROM ' . $name); - } catch (Exception $e) { + } catch (Exception) { return false; } diff --git a/src/Database/Helpers/db.php b/src/Database/Helpers/db.php index 7933962e..954b6698 100644 --- a/src/Database/Helpers/db.php +++ b/src/Database/Helpers/db.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Database\Database; diff --git a/src/Database/Schemas/Column.php b/src/Database/Schemas/Column.php index 9fe6d211..a92ac134 100644 --- a/src/Database/Schemas/Column.php +++ b/src/Database/Schemas/Column.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Schemas; diff --git a/src/Database/Schemas/Table.php b/src/Database/Schemas/Table.php index 47f2429f..01ad1337 100644 --- a/src/Database/Schemas/Table.php +++ b/src/Database/Schemas/Table.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Schemas; @@ -226,20 +220,13 @@ public function getSql(): string { $sql = ''; - switch ($this->action) { - case self::CREATE: - $sql = $this->createTableSql(); - break; - case self::ALTER: - $sql = $this->alterTableSql(); - break; - case self::RENAME: - $sql = $this->renameTableSql(); - break; - case self::DROP: - $sql = $this->dropTableSql(); - break; - } + $sql = match ($this->action) { + self::CREATE => $this->createTableSql(), + self::ALTER => $this->alterTableSql(), + self::RENAME => $this->renameTableSql(), + self::DROP => $this->dropTableSql(), + default => $sql, + }; return $sql; } diff --git a/src/Database/Traits/RelationalTrait.php b/src/Database/Traits/RelationalTrait.php index f06a2290..8817ee6f 100644 --- a/src/Database/Traits/RelationalTrait.php +++ b/src/Database/Traits/RelationalTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Traits; diff --git a/src/Database/Traits/TableTrait.php b/src/Database/Traits/TableTrait.php index e954209f..09c96b7a 100644 --- a/src/Database/Traits/TableTrait.php +++ b/src/Database/Traits/TableTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Traits; diff --git a/src/Database/Traits/TransactionTrait.php b/src/Database/Traits/TransactionTrait.php index f3fd3f51..8cea2229 100644 --- a/src/Database/Traits/TransactionTrait.php +++ b/src/Database/Traits/TransactionTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Database\Traits; diff --git a/src/Debugger/Contracts/DebuggerStoreInterface.php b/src/Debugger/Contracts/DebuggerStoreInterface.php index 6f860f13..962f8b03 100644 --- a/src/Debugger/Contracts/DebuggerStoreInterface.php +++ b/src/Debugger/Contracts/DebuggerStoreInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Debugger\Contracts; diff --git a/src/Debugger/Debugger.php b/src/Debugger/Debugger.php index dad00f0b..bdd0adc6 100644 --- a/src/Debugger/Debugger.php +++ b/src/Debugger/Debugger.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Debugger; diff --git a/src/Debugger/DebuggerStore.php b/src/Debugger/DebuggerStore.php index ea90829c..f35fb860 100644 --- a/src/Debugger/DebuggerStore.php +++ b/src/Debugger/DebuggerStore.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Debugger; diff --git a/src/Debugger/Helpers/debugger.php b/src/Debugger/Helpers/debugger.php index c17aa1ca..1a00575f 100644 --- a/src/Debugger/Helpers/debugger.php +++ b/src/Debugger/Helpers/debugger.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Debugger\Debugger; diff --git a/src/Di/Di.php b/src/Di/Di.php index d3bbc932..e5659829 100644 --- a/src/Di/Di.php +++ b/src/Di/Di.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Di; @@ -27,7 +21,7 @@ * owned by AppContext. Preserves the existing static API * for full backward compatibility. * - * @package Quantum/Di + * @package Quantum\Di * @method static void registerDependencies(array $dependencies) * @method static void register(string $concrete, ?string $abstract = null) * @method static bool isRegistered(string $abstract) diff --git a/src/Di/DiContainer.php b/src/Di/DiContainer.php index 81092d66..3b9324dc 100644 --- a/src/Di/DiContainer.php +++ b/src/Di/DiContainer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Di; @@ -30,7 +24,7 @@ * Instance-based dependency injection container. * Holds all dependency registrations and resolved instances for a single application execution. * - * @package Quantum/Di + * @package Quantum\Di */ class DiContainer { @@ -112,7 +106,7 @@ public function set(string $abstract, object $instance, bool $override = true): } if (!$this->registry->isRegistered($abstract)) { - $this->registry->register(get_class($instance), $abstract); + $this->registry->register($instance::class, $abstract); } $this->container[$abstract] = $instance; diff --git a/src/Di/DiRegistry.php b/src/Di/DiRegistry.php index 1070813a..757bc26c 100644 --- a/src/Di/DiRegistry.php +++ b/src/Di/DiRegistry.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Di; @@ -24,7 +18,7 @@ * * Stores dependency bindings for the container. * - * @package Quantum/Di + * @package Quantum\Di */ class DiRegistry { diff --git a/src/Di/Enums/ExceptionMessages.php b/src/Di/Enums/ExceptionMessages.php index dbdb6194..abf441dd 100644 --- a/src/Di/Enums/ExceptionMessages.php +++ b/src/Di/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Di\Enums; diff --git a/src/Di/Exceptions/DiException.php b/src/Di/Exceptions/DiException.php index 76ffdded..0483b915 100644 --- a/src/Di/Exceptions/DiException.php +++ b/src/Di/Exceptions/DiException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Di\Exceptions; diff --git a/src/Encryption/Adapters/AsymmetricEncryptionAdapter.php b/src/Encryption/Adapters/AsymmetricEncryptionAdapter.php index 58c7976c..9a7182c4 100644 --- a/src/Encryption/Adapters/AsymmetricEncryptionAdapter.php +++ b/src/Encryption/Adapters/AsymmetricEncryptionAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Adapters; diff --git a/src/Encryption/Adapters/SymmetricEncryptionAdapter.php b/src/Encryption/Adapters/SymmetricEncryptionAdapter.php index feffc117..9f08b906 100644 --- a/src/Encryption/Adapters/SymmetricEncryptionAdapter.php +++ b/src/Encryption/Adapters/SymmetricEncryptionAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Adapters; @@ -96,22 +90,13 @@ public function decrypt(string $encrypted): string /** * Generates initialization vector - * @throws CryptorException */ private function generateIV(): string { $length = openssl_cipher_iv_length(self::CIPHER_METHOD); - if ($length === false) { - throw CryptorException::invalidCipher(); - } - $bytes = openssl_random_pseudo_bytes($length); - if ($bytes === false) { - throw CryptorException::invalidCipher(); - } - return $bytes; } } diff --git a/src/Encryption/Contracts/EncryptionInterface.php b/src/Encryption/Contracts/EncryptionInterface.php index 8f5d85ef..f1ae5027 100644 --- a/src/Encryption/Contracts/EncryptionInterface.php +++ b/src/Encryption/Contracts/EncryptionInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Contracts; diff --git a/src/Encryption/Cryptor.php b/src/Encryption/Cryptor.php index 6291bebb..b38a01b7 100644 --- a/src/Encryption/Cryptor.php +++ b/src/Encryption/Cryptor.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption; @@ -54,7 +48,7 @@ public function isAsymmetric(): bool public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw CryptorException::methodNotSupported($method, get_class($this->adapter)); + throw CryptorException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Encryption/Enums/CryptorType.php b/src/Encryption/Enums/CryptorType.php index 3b6451b5..cf28ac4a 100644 --- a/src/Encryption/Enums/CryptorType.php +++ b/src/Encryption/Enums/CryptorType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Enums; diff --git a/src/Encryption/Enums/ExceptionMessages.php b/src/Encryption/Enums/ExceptionMessages.php index df7f91d2..3a8e2ca8 100644 --- a/src/Encryption/Enums/ExceptionMessages.php +++ b/src/Encryption/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Enums; diff --git a/src/Encryption/Exceptions/CryptorException.php b/src/Encryption/Exceptions/CryptorException.php index cf9b97de..d0c36a66 100644 --- a/src/Encryption/Exceptions/CryptorException.php +++ b/src/Encryption/Exceptions/CryptorException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Exceptions; diff --git a/src/Encryption/Factories/CryptorFactory.php b/src/Encryption/Factories/CryptorFactory.php index 2416ee85..2be43272 100644 --- a/src/Encryption/Factories/CryptorFactory.php +++ b/src/Encryption/Factories/CryptorFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Encryption\Factories; diff --git a/src/Encryption/Helpers/encryption.php b/src/Encryption/Helpers/encryption.php index c799800f..38c83fd2 100644 --- a/src/Encryption/Helpers/encryption.php +++ b/src/Encryption/Helpers/encryption.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Encryption\Factories\CryptorFactory; diff --git a/src/Environment/Enums/Env.php b/src/Environment/Enums/Env.php index 4bd72bf6..f6cb37f3 100644 --- a/src/Environment/Enums/Env.php +++ b/src/Environment/Enums/Env.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Environment\Enums; diff --git a/src/Environment/Enums/ExceptionMessages.php b/src/Environment/Enums/ExceptionMessages.php index 52758a45..a0abbcbb 100644 --- a/src/Environment/Enums/ExceptionMessages.php +++ b/src/Environment/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Environment\Enums; diff --git a/src/Environment/Environment.php b/src/Environment/Environment.php index b5002b76..d90a8aac 100644 --- a/src/Environment/Environment.php +++ b/src/Environment/Environment.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Environment; diff --git a/src/Environment/Exceptions/EnvException.php b/src/Environment/Exceptions/EnvException.php index 63776583..ae3e7089 100644 --- a/src/Environment/Exceptions/EnvException.php +++ b/src/Environment/Exceptions/EnvException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Environment\Exceptions; @@ -21,7 +15,7 @@ /** * Class EnvException - * @package Quantum\Exceptions + * @package Quantum\Environment */ class EnvException extends BaseException { diff --git a/src/Environment/Helpers/env.php b/src/Environment/Helpers/env.php index 1c04dccc..860cbe84 100644 --- a/src/Environment/Helpers/env.php +++ b/src/Environment/Helpers/env.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Environment\Exceptions\EnvException; diff --git a/src/Environment/Helpers/server.php b/src/Environment/Helpers/server.php index d615a4f6..c41b16ce 100644 --- a/src/Environment/Helpers/server.php +++ b/src/Environment/Helpers/server.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Di\Exceptions\DiException; diff --git a/src/Environment/Server.php b/src/Environment/Server.php index 119694f2..9540040f 100644 --- a/src/Environment/Server.php +++ b/src/Environment/Server.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Environment; @@ -114,7 +108,7 @@ public function contentType(bool $exact = false): ?string { $contentType = $this->get('CONTENT_TYPE'); - if ($exact && $contentType && strpos($contentType, ';') !== false) { + if ($exact && $contentType && str_contains($contentType, ';')) { return trim(explode(';', $contentType, 2)[0]); } @@ -150,7 +144,7 @@ public function getAllHeaders(): array } return array_reduce(array_keys($data), function (array $headers, $key) use ($data): array { - if (strpos($key, 'HTTP_') === 0) { + if (str_starts_with($key, 'HTTP_')) { $formattedKey = strtolower(str_replace('_', '-', substr($key, 5))); $headers[$formattedKey] = $data[$key]; } diff --git a/src/Hasher/Enums/ExceptionMessages.php b/src/Hasher/Enums/ExceptionMessages.php index 8e1b2aa4..1c12b24d 100644 --- a/src/Hasher/Enums/ExceptionMessages.php +++ b/src/Hasher/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Hasher\Enums; diff --git a/src/Hasher/Exceptions/HasherException.php b/src/Hasher/Exceptions/HasherException.php index 70ade083..6d1883ff 100644 --- a/src/Hasher/Exceptions/HasherException.php +++ b/src/Hasher/Exceptions/HasherException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Hasher\Exceptions; diff --git a/src/Hasher/Hasher.php b/src/Hasher/Hasher.php index 6e88c2dd..86131838 100644 --- a/src/Hasher/Hasher.php +++ b/src/Hasher/Hasher.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Hasher; diff --git a/src/Hook/Enums/ExceptionMessages.php b/src/Hook/Enums/ExceptionMessages.php index 4d15bab6..f7b3d674 100644 --- a/src/Hook/Enums/ExceptionMessages.php +++ b/src/Hook/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Hook\Enums; diff --git a/src/Hook/Exceptions/HookException.php b/src/Hook/Exceptions/HookException.php index 60dbdb5d..b1d2dc69 100644 --- a/src/Hook/Exceptions/HookException.php +++ b/src/Hook/Exceptions/HookException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Hook\Exceptions; @@ -21,7 +15,7 @@ /** * Class HookException - * @package Quantum\Exceptions + * @package Quantum\Hook */ class HookException extends BaseException { diff --git a/src/Hook/Helpers/hook.php b/src/Hook/Helpers/hook.php index 58a87b6f..5ed6499e 100644 --- a/src/Hook/Helpers/hook.php +++ b/src/Hook/Helpers/hook.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Di\Exceptions\DiException; diff --git a/src/Hook/HookManager.php b/src/Hook/HookManager.php index 2961c85d..b1d5c046 100644 --- a/src/Hook/HookManager.php +++ b/src/Hook/HookManager.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Hook; @@ -25,7 +19,7 @@ /** * Class HookManager - * @package Quantum\Hooks + * @package Quantum\Hook */ class HookManager { diff --git a/src/Http/Enums/ContentType.php b/src/Http/Enums/ContentType.php index d6e0e0b3..a21cd1a6 100644 --- a/src/Http/Enums/ContentType.php +++ b/src/Http/Enums/ContentType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Enums; diff --git a/src/Http/Enums/StatusCode.php b/src/Http/Enums/StatusCode.php index 63e37a5d..484c58fb 100644 --- a/src/Http/Enums/StatusCode.php +++ b/src/Http/Enums/StatusCode.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Enums; diff --git a/src/Http/Exceptions/HttpException.php b/src/Http/Exceptions/HttpException.php index 7164c48d..64ff6832 100644 --- a/src/Http/Exceptions/HttpException.php +++ b/src/Http/Exceptions/HttpException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Exceptions; diff --git a/src/Http/Helpers/http.php b/src/Http/Helpers/http.php index c2a38510..981f11f2 100644 --- a/src/Http/Helpers/http.php +++ b/src/Http/Helpers/http.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Exceptions\ConfigException; diff --git a/src/Http/Request.php b/src/Http/Request.php index 8593381c..c7ccc979 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http; diff --git a/src/Http/Response.php b/src/Http/Response.php index 881f75ab..c1311f32 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http; diff --git a/src/Http/Traits/Request/Body.php b/src/Http/Traits/Request/Body.php index 2043e0d4..01fef752 100644 --- a/src/Http/Traits/Request/Body.php +++ b/src/Http/Traits/Request/Body.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; @@ -21,7 +15,7 @@ /** * Trait Body - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Body { diff --git a/src/Http/Traits/Request/File.php b/src/Http/Traits/Request/File.php index 96085583..79e2ca9a 100644 --- a/src/Http/Traits/Request/File.php +++ b/src/Http/Traits/Request/File.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; @@ -22,7 +16,7 @@ /** * Trait File - * @package Quantum\Http\Request + * @package Quantum\Http */ trait File { diff --git a/src/Http/Traits/Request/Header.php b/src/Http/Traits/Request/Header.php index 48d796f4..b6c4c0c9 100644 --- a/src/Http/Traits/Request/Header.php +++ b/src/Http/Traits/Request/Header.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; /** * Trait Header - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Header { @@ -117,7 +111,7 @@ public function getBasicAuthCredentials(): ?array if (preg_match('/Basic\s(\S+)/', $authorization, $matches)) { $decoded = base64_decode($matches[1], true); - if ($decoded && strpos($decoded, ':') !== false) { + if ($decoded && str_contains($decoded, ':')) { [$username, $password] = explode(':', $decoded, 2); return ['username' => $username, 'password' => $password]; } diff --git a/src/Http/Traits/Request/Internal.php b/src/Http/Traits/Request/Internal.php index 0e421762..502ab59d 100644 --- a/src/Http/Traits/Request/Internal.php +++ b/src/Http/Traits/Request/Internal.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; @@ -25,7 +19,7 @@ /** * Trait Internal - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Internal { diff --git a/src/Http/Traits/Request/Params.php b/src/Http/Traits/Request/Params.php index 3e1bdd09..3318df17 100644 --- a/src/Http/Traits/Request/Params.php +++ b/src/Http/Traits/Request/Params.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; @@ -24,7 +18,7 @@ /** * Trait Params - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Params { diff --git a/src/Http/Traits/Request/Query.php b/src/Http/Traits/Request/Query.php index 90ace61f..d1b163ea 100644 --- a/src/Http/Traits/Request/Query.php +++ b/src/Http/Traits/Request/Query.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; /** * Trait Query - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Query { diff --git a/src/Http/Traits/Request/RawInput.php b/src/Http/Traits/Request/RawInput.php index 93fb8008..1d34d54e 100644 --- a/src/Http/Traits/Request/RawInput.php +++ b/src/Http/Traits/Request/RawInput.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; @@ -155,11 +149,11 @@ private function addFileToCollection(array &$files, string $nameParam, UploadedF */ private function detectBlockType(string $block): string { - if (strpos($block, 'filename') !== false) { + if (str_contains($block, 'filename')) { return 'file'; } - if (strpos($block, ContentType::OCTET_STREAM) !== false) { + if (str_contains($block, ContentType::OCTET_STREAM)) { return 'stream'; } @@ -294,9 +288,9 @@ private function parseHeaders(string $rawHeaders): array * Parses array-like parameter names * @return array|string */ - private function arrayParam(string $parameter) + private function arrayParam(string $parameter): array|string { - if (strpos($parameter, '[') !== false && preg_match('/^([^[]*)\[([^]]*)\](.*)$/', $parameter, $match)) { + if (str_contains($parameter, '[') && preg_match('/^([^[]*)\[([^]]*)\](.*)$/', $parameter, $match)) { return [$match[1], $match[2]]; } diff --git a/src/Http/Traits/Request/Route.php b/src/Http/Traits/Request/Route.php index ede02467..1767ea1d 100644 --- a/src/Http/Traits/Request/Route.php +++ b/src/Http/Traits/Request/Route.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; @@ -24,7 +18,7 @@ /** * Trait Route - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Route { diff --git a/src/Http/Traits/Request/Url.php b/src/Http/Traits/Request/Url.php index 89aa7f9f..8ca9490c 100644 --- a/src/Http/Traits/Request/Url.php +++ b/src/Http/Traits/Request/Url.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Request; /** * Trait Url - * @package Quantum\Http\Request + * @package Quantum\Http */ trait Url { diff --git a/src/Http/Traits/Response/Body.php b/src/Http/Traits/Response/Body.php index 73b1b2b5..c2294c46 100644 --- a/src/Http/Traits/Response/Body.php +++ b/src/Http/Traits/Response/Body.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Response; @@ -25,7 +19,7 @@ /** * Trait Body - * @package Quantum\Http\Response + * @package Quantum\Http */ trait Body { @@ -231,7 +225,7 @@ private function composeXML(array $arr, SimpleXMLElement &$simpleXML): void $tag = $key; $attributes = null; - if (strpos($key, '@') !== false) { + if (str_contains($key, '@')) { [$tag, $attributes] = explode('@', $key); $attributes = json_decode($attributes); } diff --git a/src/Http/Traits/Response/Header.php b/src/Http/Traits/Response/Header.php index 99e2b3d9..e0ae3105 100644 --- a/src/Http/Traits/Response/Header.php +++ b/src/Http/Traits/Response/Header.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Response; @@ -20,7 +14,7 @@ /** * Trait Header - * @package Quantum\Http\Response + * @package Quantum\Http */ trait Header { diff --git a/src/Http/Traits/Response/Status.php b/src/Http/Traits/Response/Status.php index 580c8808..a1b42a45 100644 --- a/src/Http/Traits/Response/Status.php +++ b/src/Http/Traits/Response/Status.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Http\Traits\Response; @@ -21,7 +15,7 @@ /** * Trait Status - * @package Quantum\Http\Response + * @package Quantum\Http */ trait Status { diff --git a/src/HttpClient/Enums/ExceptionMessages.php b/src/HttpClient/Enums/ExceptionMessages.php index 0a1493bc..113549f1 100644 --- a/src/HttpClient/Enums/ExceptionMessages.php +++ b/src/HttpClient/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\HttpClient\Enums; diff --git a/src/HttpClient/Exceptions/HttpClientException.php b/src/HttpClient/Exceptions/HttpClientException.php index 8ceae9bb..bf27f49f 100644 --- a/src/HttpClient/Exceptions/HttpClientException.php +++ b/src/HttpClient/Exceptions/HttpClientException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\HttpClient\Exceptions; @@ -21,7 +15,7 @@ /** * Class HasherException - * @package Quantum\Hasher + * @package Quantum\HttpClient */ class HttpClientException extends BaseException { diff --git a/src/HttpClient/HttpClient.php b/src/HttpClient/HttpClient.php index 2cc2278a..b864b3d2 100644 --- a/src/HttpClient/HttpClient.php +++ b/src/HttpClient/HttpClient.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\HttpClient; @@ -58,7 +52,7 @@ class HttpClient /** * @var MultiCurl|Curl */ - private $client; + private Curl|MultiCurl|null $client = null; private string $method = 'GET'; @@ -308,7 +302,7 @@ public function __call(string $method, array $arguments): HttpClient } if (!method_exists($this->client, $method)) { - throw HttpClientException::methodNotSupported($method, get_class($this->client)); + throw HttpClientException::methodNotSupported($method, $this->client::class); } $this->interceptCall($method, $arguments); diff --git a/src/Jwt/Enums/ExceptionMessages.php b/src/Jwt/Enums/ExceptionMessages.php index 650dc682..eadad9c2 100644 --- a/src/Jwt/Enums/ExceptionMessages.php +++ b/src/Jwt/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Jwt\Enums; diff --git a/src/Jwt/Exceptions/JwtException.php b/src/Jwt/Exceptions/JwtException.php index 39fddeb4..4a40c1bb 100644 --- a/src/Jwt/Exceptions/JwtException.php +++ b/src/Jwt/Exceptions/JwtException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Jwt\Exceptions; @@ -21,7 +15,7 @@ /** * Class JwtException - * @package Quantum\JwtToken + * @package Quantum\Jwt */ class JwtException extends BaseException { diff --git a/src/Jwt/JwtToken.php b/src/Jwt/JwtToken.php index 42d029e6..6bf8e2c1 100644 --- a/src/Jwt/JwtToken.php +++ b/src/Jwt/JwtToken.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Jwt; @@ -23,7 +17,7 @@ /** * Class JwtToken - * @package Quantum\JwtToken + * @package Quantum\Jwt * @uses JWT */ class JwtToken extends JWT diff --git a/src/Lang/Enums/ExceptionMessages.php b/src/Lang/Enums/ExceptionMessages.php index 634a1ba5..a3e456ca 100644 --- a/src/Lang/Enums/ExceptionMessages.php +++ b/src/Lang/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Lang\Enums; diff --git a/src/Lang/Exceptions/LangException.php b/src/Lang/Exceptions/LangException.php index fdacc87c..219ece40 100644 --- a/src/Lang/Exceptions/LangException.php +++ b/src/Lang/Exceptions/LangException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Lang\Exceptions; diff --git a/src/Lang/Factories/LangFactory.php b/src/Lang/Factories/LangFactory.php index 7e520902..7afd5c81 100644 --- a/src/Lang/Factories/LangFactory.php +++ b/src/Lang/Factories/LangFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Lang\Factories; diff --git a/src/Lang/Helpers/lang.php b/src/Lang/Helpers/lang.php index 06671848..9e79f89a 100644 --- a/src/Lang/Helpers/lang.php +++ b/src/Lang/Helpers/lang.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Exceptions\ConfigException; diff --git a/src/Lang/Lang.php b/src/Lang/Lang.php index c0c685fd..84b6df12 100644 --- a/src/Lang/Lang.php +++ b/src/Lang/Lang.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Lang; diff --git a/src/Lang/Translator.php b/src/Lang/Translator.php index f7b59a62..aef2dd5c 100644 --- a/src/Lang/Translator.php +++ b/src/Lang/Translator.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Lang; diff --git a/src/Loader/Exceptions/LoaderException.php b/src/Loader/Exceptions/LoaderException.php index 8951f489..1e91016d 100644 --- a/src/Loader/Exceptions/LoaderException.php +++ b/src/Loader/Exceptions/LoaderException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Loader\Exceptions; @@ -21,7 +15,7 @@ /** * DatabaseException class * - * @package Quantum + * @package Quantum\Loader * @category Exceptions * @codeCoverageIgnore */ diff --git a/src/Loader/Loader.php b/src/Loader/Loader.php index cc1bc96b..dc6fb597 100644 --- a/src/Loader/Loader.php +++ b/src/Loader/Loader.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Loader; diff --git a/src/Loader/Setup.php b/src/Loader/Setup.php index 03fbf05d..e3ef1b73 100644 --- a/src/Loader/Setup.php +++ b/src/Loader/Setup.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Loader; diff --git a/src/Logger/Adapters/DailyAdapter.php b/src/Logger/Adapters/DailyAdapter.php index 702317f5..723a3f30 100644 --- a/src/Logger/Adapters/DailyAdapter.php +++ b/src/Logger/Adapters/DailyAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Adapters; diff --git a/src/Logger/Adapters/MessageAdapter.php b/src/Logger/Adapters/MessageAdapter.php index 448ad1b6..53ca913c 100644 --- a/src/Logger/Adapters/MessageAdapter.php +++ b/src/Logger/Adapters/MessageAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Adapters; diff --git a/src/Logger/Adapters/SingleAdapter.php b/src/Logger/Adapters/SingleAdapter.php index abf1838a..9b2532b1 100644 --- a/src/Logger/Adapters/SingleAdapter.php +++ b/src/Logger/Adapters/SingleAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Adapters; diff --git a/src/Logger/Contracts/ReportableInterface.php b/src/Logger/Contracts/ReportableInterface.php index 8660d4df..a63661a2 100644 --- a/src/Logger/Contracts/ReportableInterface.php +++ b/src/Logger/Contracts/ReportableInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Contracts; diff --git a/src/Logger/Enums/ExceptionMessages.php b/src/Logger/Enums/ExceptionMessages.php index 40fa2e3a..dc6001ff 100644 --- a/src/Logger/Enums/ExceptionMessages.php +++ b/src/Logger/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Enums; diff --git a/src/Logger/Enums/LoggerType.php b/src/Logger/Enums/LoggerType.php index cf306212..57b06a54 100644 --- a/src/Logger/Enums/LoggerType.php +++ b/src/Logger/Enums/LoggerType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Enums; diff --git a/src/Logger/Exceptions/LoggerException.php b/src/Logger/Exceptions/LoggerException.php index de55d44a..ec703c92 100644 --- a/src/Logger/Exceptions/LoggerException.php +++ b/src/Logger/Exceptions/LoggerException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Exceptions; diff --git a/src/Logger/Factories/LoggerFactory.php b/src/Logger/Factories/LoggerFactory.php index b1bb39c6..a9d431c1 100644 --- a/src/Logger/Factories/LoggerFactory.php +++ b/src/Logger/Factories/LoggerFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Factories; diff --git a/src/Logger/Helpers/logger.php b/src/Logger/Helpers/logger.php index fb6bff68..e11618dd 100644 --- a/src/Logger/Helpers/logger.php +++ b/src/Logger/Helpers/logger.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Exceptions\ConfigException; diff --git a/src/Logger/Logger.php b/src/Logger/Logger.php index 0da6da95..deb91fdf 100644 --- a/src/Logger/Logger.php +++ b/src/Logger/Logger.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger; diff --git a/src/Logger/LoggerConfig.php b/src/Logger/LoggerConfig.php index ed1042da..000fb65f 100644 --- a/src/Logger/LoggerConfig.php +++ b/src/Logger/LoggerConfig.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger; diff --git a/src/Logger/Traits/LoggerTrait.php b/src/Logger/Traits/LoggerTrait.php index 88eff7c3..d69c0289 100644 --- a/src/Logger/Traits/LoggerTrait.php +++ b/src/Logger/Traits/LoggerTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Logger\Traits; diff --git a/src/Mailer/Adapters/MailgunAdapter.php b/src/Mailer/Adapters/MailgunAdapter.php index f875f2c6..6acafb42 100644 --- a/src/Mailer/Adapters/MailgunAdapter.php +++ b/src/Mailer/Adapters/MailgunAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Adapters; @@ -97,7 +91,7 @@ protected function sendEmail(): bool ->start(); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Mailer/Adapters/MandrillAdapter.php b/src/Mailer/Adapters/MandrillAdapter.php index 9a376c85..5d246218 100644 --- a/src/Mailer/Adapters/MandrillAdapter.php +++ b/src/Mailer/Adapters/MandrillAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Adapters; @@ -93,7 +87,7 @@ protected function sendEmail(): bool ->start(); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Mailer/Adapters/ResendAdapter.php b/src/Mailer/Adapters/ResendAdapter.php index 11605288..75f75fe3 100644 --- a/src/Mailer/Adapters/ResendAdapter.php +++ b/src/Mailer/Adapters/ResendAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Adapters; @@ -94,7 +88,7 @@ protected function sendEmail(): bool ->start(); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Mailer/Adapters/SendgridAdapter.php b/src/Mailer/Adapters/SendgridAdapter.php index a15b743d..40259af6 100644 --- a/src/Mailer/Adapters/SendgridAdapter.php +++ b/src/Mailer/Adapters/SendgridAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Adapters; @@ -98,7 +92,7 @@ protected function sendEmail(): bool ->start(); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Mailer/Adapters/SendinblueAdapter.php b/src/Mailer/Adapters/SendinblueAdapter.php index 1abfbd23..600d87a2 100644 --- a/src/Mailer/Adapters/SendinblueAdapter.php +++ b/src/Mailer/Adapters/SendinblueAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Adapters; @@ -91,7 +85,7 @@ protected function sendEmail(): bool ->start(); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Mailer/Adapters/SmtpAdapter.php b/src/Mailer/Adapters/SmtpAdapter.php index 76fb65c1..4f2c6dff 100644 --- a/src/Mailer/Adapters/SmtpAdapter.php +++ b/src/Mailer/Adapters/SmtpAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Adapters; diff --git a/src/Mailer/Contracts/MailerInterface.php b/src/Mailer/Contracts/MailerInterface.php index 76d172ff..e20caa91 100644 --- a/src/Mailer/Contracts/MailerInterface.php +++ b/src/Mailer/Contracts/MailerInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Contracts; diff --git a/src/Mailer/Enums/MailerType.php b/src/Mailer/Enums/MailerType.php index 4a8c3120..0fbf2276 100644 --- a/src/Mailer/Enums/MailerType.php +++ b/src/Mailer/Enums/MailerType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Enums; diff --git a/src/Mailer/Exceptions/MailerException.php b/src/Mailer/Exceptions/MailerException.php index facc443f..01cfd1a1 100644 --- a/src/Mailer/Exceptions/MailerException.php +++ b/src/Mailer/Exceptions/MailerException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Exceptions; diff --git a/src/Mailer/Factories/MailerFactory.php b/src/Mailer/Factories/MailerFactory.php index a503782f..6b1b1919 100644 --- a/src/Mailer/Factories/MailerFactory.php +++ b/src/Mailer/Factories/MailerFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Factories; diff --git a/src/Mailer/Helpers/mailer.php b/src/Mailer/Helpers/mailer.php index 81fb688c..b5158df3 100644 --- a/src/Mailer/Helpers/mailer.php +++ b/src/Mailer/Helpers/mailer.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Config\Exceptions\ConfigException; diff --git a/src/Mailer/MailTrap.php b/src/Mailer/MailTrap.php index 6e03ca8f..5bb8a9fc 100644 --- a/src/Mailer/MailTrap.php +++ b/src/Mailer/MailTrap.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer; diff --git a/src/Mailer/Mailer.php b/src/Mailer/Mailer.php index c050d7e7..a7372d66 100644 --- a/src/Mailer/Mailer.php +++ b/src/Mailer/Mailer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer; @@ -57,7 +51,7 @@ public function getAdapter(): MailerInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw MailerException::methodNotSupported($method, get_class($this->adapter)); + throw MailerException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Mailer/Traits/MailerTrait.php b/src/Mailer/Traits/MailerTrait.php index 74448f18..17a2b14b 100644 --- a/src/Mailer/Traits/MailerTrait.php +++ b/src/Mailer/Traits/MailerTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Mailer\Traits; @@ -280,11 +274,10 @@ private function saveEmail(): bool private function createFromTemplate(): string { ob_start(); - /** @phpstan-ignore argument.type */ - ob_implicit_flush(PHP_VERSION_ID >= 80000 ? false : 0); + ob_implicit_flush(false); if (is_array($this->message)) { - extract($this->message, EXTR_OVERWRITE); + extract($this->message); } require $this->templatePath . '.php'; diff --git a/src/Middleware/Enums/ExceptionMessages.php b/src/Middleware/Enums/ExceptionMessages.php index 4c4e366d..eb4b84fc 100644 --- a/src/Middleware/Enums/ExceptionMessages.php +++ b/src/Middleware/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Middleware\Enums; diff --git a/src/Middleware/Exceptions/MiddlewareException.php b/src/Middleware/Exceptions/MiddlewareException.php index 74e879cf..9367cd41 100644 --- a/src/Middleware/Exceptions/MiddlewareException.php +++ b/src/Middleware/Exceptions/MiddlewareException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Middleware\Exceptions; @@ -21,7 +15,7 @@ /** * Class MiddlewareException - * @package Quantum\Exceptions + * @package Quantum\Middleware */ class MiddlewareException extends BaseException { diff --git a/src/Middleware/Middleware.php b/src/Middleware/Middleware.php index a9f5b595..12983475 100644 --- a/src/Middleware/Middleware.php +++ b/src/Middleware/Middleware.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Middleware; diff --git a/src/Middleware/MiddlewareManager.php b/src/Middleware/MiddlewareManager.php index 6e5403fd..b57f2124 100644 --- a/src/Middleware/MiddlewareManager.php +++ b/src/Middleware/MiddlewareManager.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Middleware; diff --git a/src/Migration/Enums/ExceptionMessages.php b/src/Migration/Enums/ExceptionMessages.php index 56e78498..c2117585 100644 --- a/src/Migration/Enums/ExceptionMessages.php +++ b/src/Migration/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Migration\Enums; diff --git a/src/Migration/Exceptions/MigrationException.php b/src/Migration/Exceptions/MigrationException.php index 9ba4c38f..3103beef 100644 --- a/src/Migration/Exceptions/MigrationException.php +++ b/src/Migration/Exceptions/MigrationException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Migration\Exceptions; @@ -22,7 +16,7 @@ /** * MigrationException class * - * @package Quantum + * @package Quantum\Migration * @category Exceptions */ class MigrationException extends BaseException diff --git a/src/Migration/Migration.php b/src/Migration/Migration.php index 6da28420..93290552 100644 --- a/src/Migration/Migration.php +++ b/src/Migration/Migration.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Migration; diff --git a/src/Migration/MigrationManager.php b/src/Migration/MigrationManager.php index 9c4ca923..0221fc3d 100644 --- a/src/Migration/MigrationManager.php +++ b/src/Migration/MigrationManager.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Migration; @@ -119,16 +113,11 @@ public function applyMigrations(string $direction, ?int $step = null): ?int throw MigrationException::driverNotSupported($databaseDriver); } - switch ($direction) { - case self::UPGRADE: - $migrated = $this->upgrade(); - break; - case self::DOWNGRADE: - $migrated = $this->downgrade($step); - break; - default: - throw MigrationException::wrongDirection(); - } + $migrated = match ($direction) { + self::UPGRADE => $this->upgrade(), + self::DOWNGRADE => $this->downgrade($step), + default => throw MigrationException::wrongDirection(), + }; return $migrated; } diff --git a/src/Migration/MigrationTable.php b/src/Migration/MigrationTable.php index 82eee603..c0b5849c 100644 --- a/src/Migration/MigrationTable.php +++ b/src/Migration/MigrationTable.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Migration; diff --git a/src/Migration/Templates/MigrationTemplate.php b/src/Migration/Templates/MigrationTemplate.php index 2671f596..d385ef6f 100644 --- a/src/Migration/Templates/MigrationTemplate.php +++ b/src/Migration/Templates/MigrationTemplate.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Migration\Templates; diff --git a/src/Model/DbModel.php b/src/Model/DbModel.php index adeb6d71..06a4508d 100644 --- a/src/Model/DbModel.php +++ b/src/Model/DbModel.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model; @@ -223,7 +217,7 @@ public function __call(string $method, array $args = []) if (!method_exists($orm, $method)) { throw ModelException::methodNotSupported( $method, - get_class($orm) + $orm::class ); } diff --git a/src/Model/Enums/ExceptionMessages.php b/src/Model/Enums/ExceptionMessages.php index 23996ede..c8a43d03 100644 --- a/src/Model/Enums/ExceptionMessages.php +++ b/src/Model/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model\Enums; diff --git a/src/Model/Exceptions/ModelException.php b/src/Model/Exceptions/ModelException.php index 8cbaa802..4a6b5f67 100644 --- a/src/Model/Exceptions/ModelException.php +++ b/src/Model/Exceptions/ModelException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model\Exceptions; diff --git a/src/Model/Factories/ModelFactory.php b/src/Model/Factories/ModelFactory.php index 0e1fc395..8549ce94 100644 --- a/src/Model/Factories/ModelFactory.php +++ b/src/Model/Factories/ModelFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model\Factories; diff --git a/src/Model/Helpers/model.php b/src/Model/Helpers/model.php index f026b7d5..86cea7cb 100644 --- a/src/Model/Helpers/model.php +++ b/src/Model/Helpers/model.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Database\Contracts\DbalInterface; diff --git a/src/Model/Model.php b/src/Model/Model.php index 842b85d3..3c3d65f2 100644 --- a/src/Model/Model.php +++ b/src/Model/Model.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model; @@ -104,7 +98,7 @@ public function isEmpty(): bool * @param string $key * @return mixed */ - public function __get(string $key) + public function __get(string $key): mixed { return $this->prop($key); } @@ -113,7 +107,7 @@ public function __get(string $key) * @param string $key * @param mixed $value */ - public function __set(string $key, $value): void + public function __set(string $key, mixed $value): void { $this->prop($key, $value); } diff --git a/src/Model/ModelCollection.php b/src/Model/ModelCollection.php index 7db12f85..86581879 100644 --- a/src/Model/ModelCollection.php +++ b/src/Model/ModelCollection.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model; @@ -196,7 +190,7 @@ private function validateModel($model): void { if (!$model instanceof Model) { throw ModelException::notInstanceOf( - is_object($model) ? get_class($model) : gettype($model), + get_debug_type($model), Model::class ); } diff --git a/src/Model/Traits/HasTimestamps.php b/src/Model/Traits/HasTimestamps.php index 63e7ce82..f60b2a4b 100644 --- a/src/Model/Traits/HasTimestamps.php +++ b/src/Model/Traits/HasTimestamps.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model\Traits; @@ -54,7 +48,7 @@ protected function isNewRecord(): bool * Supports: datetime|unix * @return int|string */ - protected function nowTimestampValue() + protected function nowTimestampValue(): int|string { if ($this->getTimestampType() === 'unix') { return time(); diff --git a/src/Model/Traits/SoftDeletes.php b/src/Model/Traits/SoftDeletes.php index b842643b..7a33b48b 100644 --- a/src/Model/Traits/SoftDeletes.php +++ b/src/Model/Traits/SoftDeletes.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Model\Traits; diff --git a/src/Module/Enums/ExceptionMessages.php b/src/Module/Enums/ExceptionMessages.php index 8f1a4adb..95c69502 100644 --- a/src/Module/Enums/ExceptionMessages.php +++ b/src/Module/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Module\Enums; diff --git a/src/Module/Exceptions/ModuleException.php b/src/Module/Exceptions/ModuleException.php index 36d3cb59..1d5a9e33 100644 --- a/src/Module/Exceptions/ModuleException.php +++ b/src/Module/Exceptions/ModuleException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Module\Exceptions; diff --git a/src/Module/ModuleLoader.php b/src/Module/ModuleLoader.php index cf55cbfe..7a57b15e 100644 --- a/src/Module/ModuleLoader.php +++ b/src/Module/ModuleLoader.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Module; diff --git a/src/Module/ModuleManager.php b/src/Module/ModuleManager.php index fb48c314..28b6de81 100644 --- a/src/Module/ModuleManager.php +++ b/src/Module/ModuleManager.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Module; diff --git a/src/Module/Templates/DefaultApi/src/Controllers/MainController.php.tpl b/src/Module/Templates/DefaultApi/src/Controllers/MainController.php.tpl index 89f04960..772bfd54 100644 --- a/src/Module/Templates/DefaultApi/src/Controllers/MainController.php.tpl +++ b/src/Module/Templates/DefaultApi/src/Controllers/MainController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -48,3 +42,4 @@ class MainController ]); } } + diff --git a/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiController.php.tpl b/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiController.php.tpl index 30b63189..21478d04 100644 --- a/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiController.php.tpl +++ b/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -33,3 +27,4 @@ abstract class OpenApiController { } + diff --git a/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiMainController.php.tpl b/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiMainController.php.tpl index 970b4c02..29322da8 100644 --- a/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiMainController.php.tpl +++ b/src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiMainController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -43,3 +37,4 @@ abstract class OpenApiMainController extends OpenApiController abstract public function index(); } + diff --git a/src/Module/Templates/DefaultWeb/src/Controllers/MainController.php.tpl b/src/Module/Templates/DefaultWeb/src/Controllers/MainController.php.tpl index c7f8178d..78c0bf52 100644 --- a/src/Module/Templates/DefaultWeb/src/Controllers/MainController.php.tpl +++ b/src/Module/Templates/DefaultWeb/src/Controllers/MainController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -53,3 +47,4 @@ class MainController return response()->html($view->render('index')); } } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/AccountController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/AccountController.php.tpl index 48ebcc43..894fd5c4 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/AccountController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/AccountController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -90,3 +84,4 @@ class AccountController extends BaseController } } } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/AuthController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/AuthController.php.tpl index 62f8f020..03937600 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/AuthController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/AuthController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -173,3 +167,4 @@ class AuthController extends BaseController } } } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/BaseController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/BaseController.php.tpl index 99398163..0eb7fecf 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/BaseController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/BaseController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -36,3 +30,4 @@ abstract class BaseController */ public bool $csrfVerification = false; } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/CommentController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/CommentController.php.tpl index d7d1d2f0..c59c2042 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/CommentController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/CommentController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -61,3 +55,4 @@ class CommentController extends BaseController ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAccountController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAccountController.php.tpl index 85874f98..37182d82 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAccountController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAccountController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -95,3 +89,4 @@ abstract class OpenApiAccountController extends OpenApiController } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAuthController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAuthController.php.tpl index 29bba1f8..ffc99fd1 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAuthController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAuthController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -306,3 +300,4 @@ abstract class OpenApiAuthController extends OpenApiController } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiCommentController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiCommentController.php.tpl index d96a88dd..a70c1147 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiCommentController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiCommentController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -93,3 +87,4 @@ abstract class OpenApiCommentController extends OpenApiController + diff --git a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiController.php.tpl index a6bed844..c9473a6b 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.8 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -33,3 +27,4 @@ abstract class OpenApiController { } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiPostController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiPostController.php.tpl index dea31e5c..e2ca22dd 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiPostController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiPostController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; @@ -286,3 +280,4 @@ abstract class OpenApiPostController extends OpenApiController } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/PostController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/PostController.php.tpl index 9c995087..63e24bae 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/PostController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/PostController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -102,3 +96,4 @@ class PostController extends BaseController ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Controllers/PostManagementController.php.tpl b/src/Module/Templates/DemoApi/src/Controllers/PostManagementController.php.tpl index 3d1e2266..af921f4a 100644 --- a/src/Module/Templates/DemoApi/src/Controllers/PostManagementController.php.tpl +++ b/src/Module/Templates/DemoApi/src/Controllers/PostManagementController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -155,3 +149,4 @@ class PostManagementController extends BaseController ]); } } + diff --git a/src/Module/Templates/DemoApi/src/DTOs/CommentDTO.php.tpl b/src/Module/Templates/DemoApi/src/DTOs/CommentDTO.php.tpl index 72550e91..1d10ebf8 100644 --- a/src/Module/Templates/DemoApi/src/DTOs/CommentDTO.php.tpl +++ b/src/Module/Templates/DemoApi/src/DTOs/CommentDTO.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\DTOs; @@ -67,3 +61,4 @@ class CommentDTO ]; } } + diff --git a/src/Module/Templates/DemoApi/src/DTOs/PostDTO.php.tpl b/src/Module/Templates/DemoApi/src/DTOs/PostDTO.php.tpl index 0b84e9f2..a75027a3 100644 --- a/src/Module/Templates/DemoApi/src/DTOs/PostDTO.php.tpl +++ b/src/Module/Templates/DemoApi/src/DTOs/PostDTO.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\DTOs; @@ -84,3 +78,4 @@ class PostDTO }); } } + diff --git a/src/Module/Templates/DemoApi/src/DTOs/UserDTO.php.tpl b/src/Module/Templates/DemoApi/src/DTOs/UserDTO.php.tpl index 3b8b1feb..66ed5298 100644 --- a/src/Module/Templates/DemoApi/src/DTOs/UserDTO.php.tpl +++ b/src/Module/Templates/DemoApi/src/DTOs/UserDTO.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\DTOs; @@ -119,3 +113,4 @@ class UserDTO }); } } + diff --git a/src/Module/Templates/DemoApi/src/Enums/Role.php.tpl b/src/Module/Templates/DemoApi/src/Enums/Role.php.tpl index b14ef58e..db584019 100644 --- a/src/Module/Templates/DemoApi/src/Enums/Role.php.tpl +++ b/src/Module/Templates/DemoApi/src/Enums/Role.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.9 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Enums; @@ -24,3 +18,4 @@ class Role const EDITOR = 'editor'; } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Activate.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Activate.php.tpl index b85a5c86..2540b3e5 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Activate.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Activate.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -54,3 +48,4 @@ class Activate extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Auth.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Auth.php.tpl index 5243a0f1..342b7bc4 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Auth.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Auth.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -37,3 +31,4 @@ class Auth extends BaseMiddleware return $next($request); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/BaseMiddleware.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/BaseMiddleware.php.tpl index 84062ed3..9a072096 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/BaseMiddleware.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/BaseMiddleware.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -70,3 +64,4 @@ abstract class BaseMiddleware extends Middleware ], $status); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Comment.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Comment.php.tpl index 5bb49e4f..df064298 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Comment.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Comment.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -48,3 +42,4 @@ class Comment extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/CommentOwner.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/CommentOwner.php.tpl index a5d314e9..999ba9da 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/CommentOwner.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/CommentOwner.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -65,3 +59,4 @@ class CommentOwner extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Editor.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Editor.php.tpl index 36759cdf..91022914 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Editor.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Editor.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -88,3 +82,4 @@ class Editor extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Forget.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Forget.php.tpl index b71df15f..2e78ac35 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Forget.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Forget.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -51,3 +45,4 @@ class Forget extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Password.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Password.php.tpl index 9bc1fda8..a995890c 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Password.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Password.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -72,3 +66,4 @@ class Password extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/PostOwner.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/PostOwner.php.tpl index a384a766..5e155144 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/PostOwner.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/PostOwner.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -65,3 +59,4 @@ class PostOwner extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Resend.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Resend.php.tpl index 1aea2fcd..4e512a6b 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Resend.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Resend.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -50,3 +44,4 @@ class Resend extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Reset.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Reset.php.tpl index ea159af3..757103c4 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Reset.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Reset.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -63,3 +57,4 @@ class Reset extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Signout.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Signout.php.tpl index 8cb9d2f8..59fbbb10 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Signout.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Signout.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -35,3 +29,4 @@ class Signout extends BaseMiddleware return $next($request); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Signup.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Signup.php.tpl index 93c25100..59eba972 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Signup.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Signup.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -59,3 +53,4 @@ class Signup extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Update.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Update.php.tpl index 49d5fe9e..a8b528ce 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Update.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Update.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -51,3 +45,4 @@ class Update extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Middlewares/Verify.php.tpl b/src/Module/Templates/DemoApi/src/Middlewares/Verify.php.tpl index 8e918db3..b7191113 100644 --- a/src/Module/Templates/DemoApi/src/Middlewares/Verify.php.tpl +++ b/src/Module/Templates/DemoApi/src/Middlewares/Verify.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -52,3 +46,4 @@ class Verify extends BaseMiddleware ]); } } + diff --git a/src/Module/Templates/DemoApi/src/Models/Comment.php.tpl b/src/Module/Templates/DemoApi/src/Models/Comment.php.tpl index 59c8419f..cb79ddf7 100644 --- a/src/Module/Templates/DemoApi/src/Models/Comment.php.tpl +++ b/src/Module/Templates/DemoApi/src/Models/Comment.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Models; @@ -63,3 +57,4 @@ class Comment extends DbModel ]; } } + diff --git a/src/Module/Templates/DemoApi/src/Models/Post.php.tpl b/src/Module/Templates/DemoApi/src/Models/Post.php.tpl index 96f5355d..3e6fb550 100644 --- a/src/Module/Templates/DemoApi/src/Models/Post.php.tpl +++ b/src/Module/Templates/DemoApi/src/Models/Post.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Models; @@ -64,3 +58,4 @@ class Post extends DbModel ]; } } + diff --git a/src/Module/Templates/DemoApi/src/Models/User.php.tpl b/src/Module/Templates/DemoApi/src/Models/User.php.tpl index bfd63f87..45733492 100644 --- a/src/Module/Templates/DemoApi/src/Models/User.php.tpl +++ b/src/Module/Templates/DemoApi/src/Models/User.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Models; @@ -60,3 +54,4 @@ class User extends DbModel 'otp_token', ]; } + diff --git a/src/Module/Templates/DemoApi/src/Services/AuthService.php.tpl b/src/Module/Templates/DemoApi/src/Services/AuthService.php.tpl index bfb81ea4..fc9b8990 100644 --- a/src/Module/Templates/DemoApi/src/Services/AuthService.php.tpl +++ b/src/Module/Templates/DemoApi/src/Services/AuthService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Services; @@ -163,3 +157,4 @@ class AuthService extends Service implements AuthServiceInterface } } } + diff --git a/src/Module/Templates/DemoApi/src/Services/CommentService.php.tpl b/src/Module/Templates/DemoApi/src/Services/CommentService.php.tpl index a052c91d..cdae8b4d 100644 --- a/src/Module/Templates/DemoApi/src/Services/CommentService.php.tpl +++ b/src/Module/Templates/DemoApi/src/Services/CommentService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Services; @@ -115,3 +109,4 @@ class CommentService extends Service return transform($comments, $this->transformer); } } + diff --git a/src/Module/Templates/DemoApi/src/Services/PostService.php.tpl b/src/Module/Templates/DemoApi/src/Services/PostService.php.tpl index e91b7086..0863e2f4 100644 --- a/src/Module/Templates/DemoApi/src/Services/PostService.php.tpl +++ b/src/Module/Templates/DemoApi/src/Services/PostService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Services; @@ -219,3 +213,4 @@ class PostService extends Service return transform($posts, $this->transformer); } } + diff --git a/src/Module/Templates/DemoApi/src/Transformers/CommentTransformer.php.tpl b/src/Module/Templates/DemoApi/src/Transformers/CommentTransformer.php.tpl index aac04bb9..3a8804a6 100644 --- a/src/Module/Templates/DemoApi/src/Transformers/CommentTransformer.php.tpl +++ b/src/Module/Templates/DemoApi/src/Transformers/CommentTransformer.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.9 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Transformers; @@ -36,3 +30,4 @@ class CommentTransformer implements TransformerInterface ]; } } + diff --git a/src/Module/Templates/DemoApi/src/Transformers/PostTransformer.php.tpl b/src/Module/Templates/DemoApi/src/Transformers/PostTransformer.php.tpl index 9bd00090..2ad2e173 100644 --- a/src/Module/Templates/DemoApi/src/Transformers/PostTransformer.php.tpl +++ b/src/Module/Templates/DemoApi/src/Transformers/PostTransformer.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.8 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Transformers; @@ -37,3 +31,4 @@ class PostTransformer implements TransformerInterface ]; } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/AccountController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/AccountController.php.tpl index 6f81ed3a..0406b5b3 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/AccountController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/AccountController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -87,3 +81,4 @@ class AccountController extends BaseController return redirect(base_url(true) . '/' . current_lang() . '/account-settings#account_password'); } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/AuthController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/AuthController.php.tpl index 9fae0c52..4fdc9ac4 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/AuthController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/AuthController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -195,3 +189,4 @@ class AuthController extends BaseController } } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/BaseController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/BaseController.php.tpl index 8e050817..d2c52440 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/BaseController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/BaseController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -45,3 +39,4 @@ abstract class BaseController } } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/CommentController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/CommentController.php.tpl index 1d880bb4..e6705fa5 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/CommentController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/CommentController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -57,3 +51,4 @@ class CommentController extends BaseController return redirect(get_referrer() ?? base_url()); } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/PageController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/PageController.php.tpl index 32154222..926cf89e 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/PageController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/PageController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -55,3 +49,4 @@ class PageController extends BaseController return response()->html($this->view->render('pages/about', ['commands' => $commands])); } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/PostController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/PostController.php.tpl index 99a8406b..68cf9829 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/PostController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/PostController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -103,3 +97,4 @@ class PostController extends BaseController return response()->html($this->view->render('post/single')); } } + diff --git a/src/Module/Templates/DemoWeb/src/Controllers/PostManagementController.php.tpl b/src/Module/Templates/DemoWeb/src/Controllers/PostManagementController.php.tpl index 908a4161..c38f1848 100644 --- a/src/Module/Templates/DemoWeb/src/Controllers/PostManagementController.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Controllers/PostManagementController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Controllers; @@ -178,3 +172,4 @@ class PostManagementController extends BaseController return redirect(base_url(true) . '/' . current_lang() . '/my-posts'); } } + diff --git a/src/Module/Templates/DemoWeb/src/DTOs/CommentDTO.php.tpl b/src/Module/Templates/DemoWeb/src/DTOs/CommentDTO.php.tpl index 72550e91..1d10ebf8 100644 --- a/src/Module/Templates/DemoWeb/src/DTOs/CommentDTO.php.tpl +++ b/src/Module/Templates/DemoWeb/src/DTOs/CommentDTO.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\DTOs; @@ -67,3 +61,4 @@ class CommentDTO ]; } } + diff --git a/src/Module/Templates/DemoWeb/src/DTOs/PostDTO.php.tpl b/src/Module/Templates/DemoWeb/src/DTOs/PostDTO.php.tpl index 0b84e9f2..a75027a3 100644 --- a/src/Module/Templates/DemoWeb/src/DTOs/PostDTO.php.tpl +++ b/src/Module/Templates/DemoWeb/src/DTOs/PostDTO.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\DTOs; @@ -84,3 +78,4 @@ class PostDTO }); } } + diff --git a/src/Module/Templates/DemoWeb/src/DTOs/UserDTO.php.tpl b/src/Module/Templates/DemoWeb/src/DTOs/UserDTO.php.tpl index 3b8b1feb..66ed5298 100644 --- a/src/Module/Templates/DemoWeb/src/DTOs/UserDTO.php.tpl +++ b/src/Module/Templates/DemoWeb/src/DTOs/UserDTO.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\DTOs; @@ -119,3 +113,4 @@ class UserDTO }); } } + diff --git a/src/Module/Templates/DemoWeb/src/Enums/Role.php.tpl b/src/Module/Templates/DemoWeb/src/Enums/Role.php.tpl index b14ef58e..db584019 100644 --- a/src/Module/Templates/DemoWeb/src/Enums/Role.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Enums/Role.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.9 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Enums; @@ -24,3 +18,4 @@ class Role const EDITOR = 'editor'; } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Activate.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Activate.php.tpl index ba0eb249..1d919b1a 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Activate.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Activate.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -63,3 +57,4 @@ class Activate extends BaseMiddleware return response()->html(partial('errors/404'), StatusCode::NOT_FOUND); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Auth.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Auth.php.tpl index 1c9926a6..df9b9273 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Auth.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Auth.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -34,3 +28,4 @@ class Auth extends Middleware return $next($request); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/BaseMiddleware.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/BaseMiddleware.php.tpl index 19f4dd36..14e9b103 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/BaseMiddleware.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/BaseMiddleware.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -63,3 +57,4 @@ abstract class BaseMiddleware extends Middleware return response(); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Comment.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Comment.php.tpl index d4e87a24..41df81cf 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Comment.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Comment.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -61,3 +55,4 @@ class Comment extends BaseMiddleware return redirectWith(get_referrer() ?? base_url(), $data); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/CommentOwner.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/CommentOwner.php.tpl index a5d314e9..999ba9da 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/CommentOwner.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/CommentOwner.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -65,3 +59,4 @@ class CommentOwner extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Editor.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Editor.php.tpl index 474ce5bd..3aab61bc 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Editor.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Editor.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -97,3 +91,4 @@ class Editor extends BaseMiddleware return redirectWith(get_referrer() ?? base_url(), $data); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Forget.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Forget.php.tpl index ddccd9c9..3e95159f 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Forget.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Forget.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -64,3 +58,4 @@ class Forget extends BaseMiddleware return redirectWith(base_url(true) . '/' . current_lang() . '/forget', $data); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Guest.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Guest.php.tpl index d546c837..26ba7f2c 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Guest.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Guest.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -34,3 +28,4 @@ class Guest extends Middleware return $next($request); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Password.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Password.php.tpl index 304a4350..6ca23613 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Password.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Password.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -81,3 +75,4 @@ class Password extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/PostOwner.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/PostOwner.php.tpl index 3539ede7..03170b56 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/PostOwner.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/PostOwner.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -74,3 +68,4 @@ class PostOwner extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Resend.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Resend.php.tpl index 72b98563..2ac3866c 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Resend.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Resend.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -59,3 +53,4 @@ class Resend extends BaseMiddleware return redirect(base_url(true) . '/' . current_lang() . '/signin'); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Reset.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Reset.php.tpl index 9cce1a17..e943c500 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Reset.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Reset.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -82,3 +76,4 @@ class Reset extends BaseMiddleware return redirect(get_referrer() ?? base_url()); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Signup.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Signup.php.tpl index 421b7e59..842a9783 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Signup.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Signup.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -83,3 +77,4 @@ class Signup extends BaseMiddleware return redirectWith(base_url(true) . '/' . current_lang() . '/signup', $request->all()); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Update.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Update.php.tpl index 16016755..65a35c19 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Update.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Update.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -60,3 +54,4 @@ class Update extends BaseMiddleware return redirectWith(base_url(true) . '/' . current_lang() . '/account-settings#account_profile', $request->all()); } } + diff --git a/src/Module/Templates/DemoWeb/src/Middlewares/Verify.php.tpl b/src/Module/Templates/DemoWeb/src/Middlewares/Verify.php.tpl index 6092ec4d..69b64f11 100644 --- a/src/Module/Templates/DemoWeb/src/Middlewares/Verify.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Middlewares/Verify.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Middlewares; @@ -69,3 +63,4 @@ class Verify extends BaseMiddleware return redirectWith(base_url(true) . '/' . current_lang() . '/verify', $request->all()); } } + diff --git a/src/Module/Templates/DemoWeb/src/Models/Comment.php.tpl b/src/Module/Templates/DemoWeb/src/Models/Comment.php.tpl index 08c1277f..c6656433 100644 --- a/src/Module/Templates/DemoWeb/src/Models/Comment.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Models/Comment.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Models; @@ -63,3 +57,4 @@ class Comment extends DbModel ]; } } + diff --git a/src/Module/Templates/DemoWeb/src/Models/Post.php.tpl b/src/Module/Templates/DemoWeb/src/Models/Post.php.tpl index b8ad4490..408478c5 100644 --- a/src/Module/Templates/DemoWeb/src/Models/Post.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Models/Post.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Models; @@ -64,3 +58,4 @@ class Post extends DbModel ]; } } + diff --git a/src/Module/Templates/DemoWeb/src/Models/User.php.tpl b/src/Module/Templates/DemoWeb/src/Models/User.php.tpl index bfd63f87..45733492 100644 --- a/src/Module/Templates/DemoWeb/src/Models/User.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Models/User.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Models; @@ -60,3 +54,4 @@ class User extends DbModel 'otp_token', ]; } + diff --git a/src/Module/Templates/DemoWeb/src/Services/AuthService.php.tpl b/src/Module/Templates/DemoWeb/src/Services/AuthService.php.tpl index bfb81ea4..fc9b8990 100644 --- a/src/Module/Templates/DemoWeb/src/Services/AuthService.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Services/AuthService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Services; @@ -163,3 +157,4 @@ class AuthService extends Service implements AuthServiceInterface } } } + diff --git a/src/Module/Templates/DemoWeb/src/Services/CommandService.php.tpl b/src/Module/Templates/DemoWeb/src/Services/CommandService.php.tpl index a17a8356..40ec6c18 100644 --- a/src/Module/Templates/DemoWeb/src/Services/CommandService.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Services/CommandService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.9 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ @@ -44,3 +38,4 @@ class CommandService extends Service return array_merge($coreCommands, $appCommands); } } + diff --git a/src/Module/Templates/DemoWeb/src/Services/CommentService.php.tpl b/src/Module/Templates/DemoWeb/src/Services/CommentService.php.tpl index 212714cc..be47cde6 100644 --- a/src/Module/Templates/DemoWeb/src/Services/CommentService.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Services/CommentService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Services; @@ -116,3 +110,4 @@ class CommentService extends Service return transform($comments, $this->transformer); } } + diff --git a/src/Module/Templates/DemoWeb/src/Services/PostService.php.tpl b/src/Module/Templates/DemoWeb/src/Services/PostService.php.tpl index 5d0d9d45..49f4b0cb 100644 --- a/src/Module/Templates/DemoWeb/src/Services/PostService.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Services/PostService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Services; @@ -217,3 +211,4 @@ class PostService extends Service return transform($posts, $this->transformer); } } + diff --git a/src/Module/Templates/DemoWeb/src/Transformers/CommentTransformer.php.tpl b/src/Module/Templates/DemoWeb/src/Transformers/CommentTransformer.php.tpl index aac04bb9..3a8804a6 100644 --- a/src/Module/Templates/DemoWeb/src/Transformers/CommentTransformer.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Transformers/CommentTransformer.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.9 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Transformers; @@ -36,3 +30,4 @@ class CommentTransformer implements TransformerInterface ]; } } + diff --git a/src/Module/Templates/DemoWeb/src/Transformers/PostTransformer.php.tpl b/src/Module/Templates/DemoWeb/src/Transformers/PostTransformer.php.tpl index 11986029..2ad2e173 100644 --- a/src/Module/Templates/DemoWeb/src/Transformers/PostTransformer.php.tpl +++ b/src/Module/Templates/DemoWeb/src/Transformers/PostTransformer.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace {{MODULE_NAMESPACE}}\Transformers; @@ -37,3 +31,4 @@ class PostTransformer implements TransformerInterface ]; } } + diff --git a/src/Module/Templates/Toolkit/src/Controllers/BaseController.php.tpl b/src/Module/Templates/Toolkit/src/Controllers/BaseController.php.tpl index 48395a41..e11b39e9 100644 --- a/src/Module/Templates/Toolkit/src/Controllers/BaseController.php.tpl +++ b/src/Module/Templates/Toolkit/src/Controllers/BaseController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Controllers; @@ -54,3 +48,4 @@ class BaseController ]); } } + diff --git a/src/Module/Templates/Toolkit/src/Controllers/DashboardController.php.tpl b/src/Module/Templates/Toolkit/src/Controllers/DashboardController.php.tpl index 63f67601..82818752 100644 --- a/src/Module/Templates/Toolkit/src/Controllers/DashboardController.php.tpl +++ b/src/Module/Templates/Toolkit/src/Controllers/DashboardController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Controllers; @@ -46,3 +40,4 @@ class DashboardController extends BaseController return response()->html($this->view->render('pages/dashboard/index')); } } + diff --git a/src/Module/Templates/Toolkit/src/Controllers/DatabaseController.php.tpl b/src/Module/Templates/Toolkit/src/Controllers/DatabaseController.php.tpl index e07c4a25..3ca40002 100644 --- a/src/Module/Templates/Toolkit/src/Controllers/DatabaseController.php.tpl +++ b/src/Module/Templates/Toolkit/src/Controllers/DatabaseController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Controllers; @@ -105,3 +99,4 @@ class DatabaseController extends BaseController return redirect(base_url(true) . '/database/view?table=' . $tableName); } } + diff --git a/src/Module/Templates/Toolkit/src/Controllers/EmailsController.php.tpl b/src/Module/Templates/Toolkit/src/Controllers/EmailsController.php.tpl index 75aaa72c..0c75da0d 100644 --- a/src/Module/Templates/Toolkit/src/Controllers/EmailsController.php.tpl +++ b/src/Module/Templates/Toolkit/src/Controllers/EmailsController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Controllers; @@ -67,3 +61,4 @@ class EmailsController extends BaseController return redirect(base_url(true) . '/emails'); } } + diff --git a/src/Module/Templates/Toolkit/src/Controllers/LogsController.php.tpl b/src/Module/Templates/Toolkit/src/Controllers/LogsController.php.tpl index 8657c936..a5424e49 100644 --- a/src/Module/Templates/Toolkit/src/Controllers/LogsController.php.tpl +++ b/src/Module/Templates/Toolkit/src/Controllers/LogsController.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Controllers; @@ -68,3 +62,4 @@ class LogsController extends BaseController return response()->html($this->view->render('pages/logs/log')); } } + diff --git a/src/Module/Templates/Toolkit/src/Middlewares/BaseMiddleware.php.tpl b/src/Module/Templates/Toolkit/src/Middlewares/BaseMiddleware.php.tpl index 0741c778..39f0a0d3 100644 --- a/src/Module/Templates/Toolkit/src/Middlewares/BaseMiddleware.php.tpl +++ b/src/Module/Templates/Toolkit/src/Middlewares/BaseMiddleware.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Middlewares; @@ -59,3 +53,4 @@ abstract class BaseMiddleware extends Middleware */ abstract protected function respondWithError(Request $request, $message): Response; } + diff --git a/src/Module/Templates/Toolkit/src/Middlewares/BasicAuth.php.tpl b/src/Module/Templates/Toolkit/src/Middlewares/BasicAuth.php.tpl index 9c08e799..f94202a8 100644 --- a/src/Module/Templates/Toolkit/src/Middlewares/BasicAuth.php.tpl +++ b/src/Module/Templates/Toolkit/src/Middlewares/BasicAuth.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Middlewares; @@ -56,3 +50,4 @@ class BasicAuth extends Middleware ->html(partial('errors' . DS . '401'), 401); } } + diff --git a/src/Module/Templates/Toolkit/src/Middlewares/CreateTable.php.tpl b/src/Module/Templates/Toolkit/src/Middlewares/CreateTable.php.tpl index 8e49e419..ff7e0636 100644 --- a/src/Module/Templates/Toolkit/src/Middlewares/CreateTable.php.tpl +++ b/src/Module/Templates/Toolkit/src/Middlewares/CreateTable.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Middlewares; @@ -83,3 +77,4 @@ class CreateTable extends BaseMiddleware }); } } + diff --git a/src/Module/Templates/Toolkit/src/Services/DashboardService.php.tpl b/src/Module/Templates/Toolkit/src/Services/DashboardService.php.tpl index 58c8c648..8064e250 100644 --- a/src/Module/Templates/Toolkit/src/Services/DashboardService.php.tpl +++ b/src/Module/Templates/Toolkit/src/Services/DashboardService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Services; @@ -26,3 +20,4 @@ class DashboardService extends Service { } } + diff --git a/src/Module/Templates/Toolkit/src/Services/DatabaseService.php.tpl b/src/Module/Templates/Toolkit/src/Services/DatabaseService.php.tpl index f75dbd81..2b796c0a 100644 --- a/src/Module/Templates/Toolkit/src/Services/DatabaseService.php.tpl +++ b/src/Module/Templates/Toolkit/src/Services/DatabaseService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Services; @@ -157,3 +151,4 @@ class DatabaseService extends Service return $columns; } } + diff --git a/src/Module/Templates/Toolkit/src/Services/EmailService.php.tpl b/src/Module/Templates/Toolkit/src/Services/EmailService.php.tpl index b1c3d07a..033c0e9d 100644 --- a/src/Module/Templates/Toolkit/src/Services/EmailService.php.tpl +++ b/src/Module/Templates/Toolkit/src/Services/EmailService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Services; @@ -113,3 +107,4 @@ class EmailService extends Service ]); } } + diff --git a/src/Module/Templates/Toolkit/src/Services/LogsService.php.tpl b/src/Module/Templates/Toolkit/src/Services/LogsService.php.tpl index 47679c06..33ccc52b 100644 --- a/src/Module/Templates/Toolkit/src/Services/LogsService.php.tpl +++ b/src/Module/Templates/Toolkit/src/Services/LogsService.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Modules\Toolkit\Services; @@ -96,3 +90,4 @@ class LogsService extends Service ]); } } + diff --git a/src/Module/Templates/Toolkit/src/helpers/toolkit.php.tpl b/src/Module/Templates/Toolkit/src/helpers/toolkit.php.tpl index 31990c6e..257e9dd3 100644 --- a/src/Module/Templates/Toolkit/src/helpers/toolkit.php.tpl +++ b/src/Module/Templates/Toolkit/src/helpers/toolkit.php.tpl @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 2.9.8 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ const LEVEL_ATTRIBUTES = [ @@ -56,3 +50,4 @@ function getLevelClass(string $level): string { return LEVEL_ATTRIBUTES[strtolower($level)]['class']; } + diff --git a/src/Paginator/Adapters/ArrayPaginator.php b/src/Paginator/Adapters/ArrayPaginator.php index a7360733..e54f3894 100644 --- a/src/Paginator/Adapters/ArrayPaginator.php +++ b/src/Paginator/Adapters/ArrayPaginator.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Adapters; diff --git a/src/Paginator/Adapters/ModelPaginator.php b/src/Paginator/Adapters/ModelPaginator.php index 8008d8d6..54fb4a1c 100644 --- a/src/Paginator/Adapters/ModelPaginator.php +++ b/src/Paginator/Adapters/ModelPaginator.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Adapters; diff --git a/src/Paginator/Contracts/PaginatorInterface.php b/src/Paginator/Contracts/PaginatorInterface.php index 089b120a..a0edd948 100644 --- a/src/Paginator/Contracts/PaginatorInterface.php +++ b/src/Paginator/Contracts/PaginatorInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Contracts; diff --git a/src/Paginator/Enums/ExceptionMessages.php b/src/Paginator/Enums/ExceptionMessages.php index dea73c0c..99bb971a 100644 --- a/src/Paginator/Enums/ExceptionMessages.php +++ b/src/Paginator/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Enums; diff --git a/src/Paginator/Enums/Pagination.php b/src/Paginator/Enums/Pagination.php index 77b33edf..b20faa17 100644 --- a/src/Paginator/Enums/Pagination.php +++ b/src/Paginator/Enums/Pagination.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Enums; diff --git a/src/Paginator/Enums/PaginatorType.php b/src/Paginator/Enums/PaginatorType.php index 7ba7b28d..afdeeb5c 100644 --- a/src/Paginator/Enums/PaginatorType.php +++ b/src/Paginator/Enums/PaginatorType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Enums; diff --git a/src/Paginator/Exceptions/PaginatorException.php b/src/Paginator/Exceptions/PaginatorException.php index 6d48d7d5..6c7b7532 100644 --- a/src/Paginator/Exceptions/PaginatorException.php +++ b/src/Paginator/Exceptions/PaginatorException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Exceptions; diff --git a/src/Paginator/Factories/PaginatorFactory.php b/src/Paginator/Factories/PaginatorFactory.php index 6ffc6803..03ff0401 100644 --- a/src/Paginator/Factories/PaginatorFactory.php +++ b/src/Paginator/Factories/PaginatorFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Factories; diff --git a/src/Paginator/Paginator.php b/src/Paginator/Paginator.php index 49e25570..50a51ab7 100644 --- a/src/Paginator/Paginator.php +++ b/src/Paginator/Paginator.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator; @@ -65,7 +59,7 @@ public function getAdapter(): PaginatorInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw PaginatorException::methodNotSupported($method, get_class($this->adapter)); + throw PaginatorException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Paginator/Traits/PaginatorTrait.php b/src/Paginator/Traits/PaginatorTrait.php index d6c0e85f..5bd25856 100644 --- a/src/Paginator/Traits/PaginatorTrait.php +++ b/src/Paginator/Traits/PaginatorTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Paginator\Traits; @@ -227,7 +221,7 @@ protected function getUri(bool $withBaseUrl = false): string $url = $this->baseUrl . $routeUrl; } - $delimiter = strpos($url ?? '', '?') !== false ? '&' : '?'; + $delimiter = str_contains($url ?? '', '?') ? '&' : '?'; return $url . $delimiter; } diff --git a/src/RateLimit/Adapters/FileRateLimitAdapter.php b/src/RateLimit/Adapters/FileRateLimitAdapter.php index 0c3bfb33..766892ac 100644 --- a/src/RateLimit/Adapters/FileRateLimitAdapter.php +++ b/src/RateLimit/Adapters/FileRateLimitAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Adapters; diff --git a/src/RateLimit/Adapters/RedisRateLimitAdapter.php b/src/RateLimit/Adapters/RedisRateLimitAdapter.php index fd917f15..7796ee45 100644 --- a/src/RateLimit/Adapters/RedisRateLimitAdapter.php +++ b/src/RateLimit/Adapters/RedisRateLimitAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Adapters; diff --git a/src/RateLimit/Contracts/RateLimitAdapterInterface.php b/src/RateLimit/Contracts/RateLimitAdapterInterface.php index 8278f8e6..0890d263 100644 --- a/src/RateLimit/Contracts/RateLimitAdapterInterface.php +++ b/src/RateLimit/Contracts/RateLimitAdapterInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Contracts; diff --git a/src/RateLimit/Enums/ExceptionMessages.php b/src/RateLimit/Enums/ExceptionMessages.php index 2eab711d..d94f95a8 100644 --- a/src/RateLimit/Enums/ExceptionMessages.php +++ b/src/RateLimit/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Enums; diff --git a/src/RateLimit/Enums/RateLimitType.php b/src/RateLimit/Enums/RateLimitType.php index 44a2ecea..26fe60be 100644 --- a/src/RateLimit/Enums/RateLimitType.php +++ b/src/RateLimit/Enums/RateLimitType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Enums; diff --git a/src/RateLimit/Exceptions/RateLimitException.php b/src/RateLimit/Exceptions/RateLimitException.php index 2a9afe70..8680084f 100644 --- a/src/RateLimit/Exceptions/RateLimitException.php +++ b/src/RateLimit/Exceptions/RateLimitException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Exceptions; diff --git a/src/RateLimit/Factories/RateLimiterFactory.php b/src/RateLimit/Factories/RateLimiterFactory.php index f414a7bd..92b61e10 100644 --- a/src/RateLimit/Factories/RateLimiterFactory.php +++ b/src/RateLimit/Factories/RateLimiterFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit\Factories; diff --git a/src/RateLimit/RateLimitMiddleware.php b/src/RateLimit/RateLimitMiddleware.php index 8f19611a..b4d30c14 100644 --- a/src/RateLimit/RateLimitMiddleware.php +++ b/src/RateLimit/RateLimitMiddleware.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit; diff --git a/src/RateLimit/RateLimiter.php b/src/RateLimit/RateLimiter.php index 122344cd..3c593077 100644 --- a/src/RateLimit/RateLimiter.php +++ b/src/RateLimit/RateLimiter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\RateLimit; diff --git a/src/Renderer/Adapters/HtmlAdapter.php b/src/Renderer/Adapters/HtmlAdapter.php index 329a8bec..4a98f4db 100644 --- a/src/Renderer/Adapters/HtmlAdapter.php +++ b/src/Renderer/Adapters/HtmlAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer\Adapters; @@ -63,8 +57,7 @@ public function render(string $view, array $params = []): string } ob_start(); - /** @phpstan-ignore argument.type */ - ob_implicit_flush(PHP_VERSION_ID >= 80000 ? false : 0); + ob_implicit_flush(false); if ($params !== []) { extract($params); diff --git a/src/Renderer/Adapters/TwigAdapter.php b/src/Renderer/Adapters/TwigAdapter.php index c1b40938..ee2a46f0 100644 --- a/src/Renderer/Adapters/TwigAdapter.php +++ b/src/Renderer/Adapters/TwigAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer\Adapters; diff --git a/src/Renderer/Contracts/TemplateRendererInterface.php b/src/Renderer/Contracts/TemplateRendererInterface.php index b794997f..9698e2c6 100644 --- a/src/Renderer/Contracts/TemplateRendererInterface.php +++ b/src/Renderer/Contracts/TemplateRendererInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer\Contracts; diff --git a/src/Renderer/Enums/RendererType.php b/src/Renderer/Enums/RendererType.php index 5f68da54..f6ff6a54 100644 --- a/src/Renderer/Enums/RendererType.php +++ b/src/Renderer/Enums/RendererType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer\Enums; diff --git a/src/Renderer/Exceptions/RendererException.php b/src/Renderer/Exceptions/RendererException.php index d3a567a4..2f8b06e2 100644 --- a/src/Renderer/Exceptions/RendererException.php +++ b/src/Renderer/Exceptions/RendererException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer\Exceptions; diff --git a/src/Renderer/Factories/RendererFactory.php b/src/Renderer/Factories/RendererFactory.php index ae63f01e..5c1e86ee 100644 --- a/src/Renderer/Factories/RendererFactory.php +++ b/src/Renderer/Factories/RendererFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer\Factories; diff --git a/src/Renderer/Renderer.php b/src/Renderer/Renderer.php index 6df6dc0b..bf5e5040 100644 --- a/src/Renderer/Renderer.php +++ b/src/Renderer/Renderer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Renderer; @@ -47,7 +41,7 @@ public function getAdapter(): TemplateRendererInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw RendererException::methodNotSupported($method, get_class($this->adapter)); + throw RendererException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/ResourceCache/Exceptions/ResourceCacheException.php b/src/ResourceCache/Exceptions/ResourceCacheException.php index 0f83d718..3be27021 100644 --- a/src/ResourceCache/Exceptions/ResourceCacheException.php +++ b/src/ResourceCache/Exceptions/ResourceCacheException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\ResourceCache\Exceptions; diff --git a/src/ResourceCache/ViewCache.php b/src/ResourceCache/ViewCache.php index 3a24bbf3..2267ad96 100644 --- a/src/ResourceCache/ViewCache.php +++ b/src/ResourceCache/ViewCache.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\ResourceCache; diff --git a/src/Router/Enums/ExceptionMessages.php b/src/Router/Enums/ExceptionMessages.php index 6f1fb287..2dff1542 100644 --- a/src/Router/Enums/ExceptionMessages.php +++ b/src/Router/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router\Enums; diff --git a/src/Router/Exceptions/RouteException.php b/src/Router/Exceptions/RouteException.php index b036902f..f366b137 100644 --- a/src/Router/Exceptions/RouteException.php +++ b/src/Router/Exceptions/RouteException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router\Exceptions; @@ -21,7 +15,7 @@ /** * Class RouteException - * @package Quantum\Exceptions + * @package Quantum\Router */ class RouteException extends BaseException { diff --git a/src/Router/Helpers/router.php b/src/Router/Helpers/router.php index bea6e9aa..4641832a 100644 --- a/src/Router/Helpers/router.php +++ b/src/Router/Helpers/router.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Di\Exceptions\DiException; diff --git a/src/Router/MatchedRoute.php b/src/Router/MatchedRoute.php index bf3309a4..47cdd9c7 100644 --- a/src/Router/MatchedRoute.php +++ b/src/Router/MatchedRoute.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; diff --git a/src/Router/PatternCompiler.php b/src/Router/PatternCompiler.php index a029ae5c..59992bca 100644 --- a/src/Router/PatternCompiler.php +++ b/src/Router/PatternCompiler.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; diff --git a/src/Router/Route.php b/src/Router/Route.php index 4e9b99db..1c4d7fed 100644 --- a/src/Router/Route.php +++ b/src/Router/Route.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; diff --git a/src/Router/RouteBuilder.php b/src/Router/RouteBuilder.php index f9354b21..cb127e6d 100644 --- a/src/Router/RouteBuilder.php +++ b/src/Router/RouteBuilder.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; @@ -338,7 +332,7 @@ private function addRoute( throw RouteException::incompleteControllerRoute(); } - if (strpos($handler, '\\') === false) { + if (!str_contains($handler, '\\')) { if ($this->currentModule === null) { throw RouteException::controllerWithoutModule(); } diff --git a/src/Router/RouteCollection.php b/src/Router/RouteCollection.php index a37f09bd..f0f7f74d 100644 --- a/src/Router/RouteCollection.php +++ b/src/Router/RouteCollection.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; diff --git a/src/Router/RouteDispatcher.php b/src/Router/RouteDispatcher.php index e2554b74..7b3e3cb7 100644 --- a/src/Router/RouteDispatcher.php +++ b/src/Router/RouteDispatcher.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; @@ -96,13 +90,17 @@ private function resolveControllerCallable(Route $route): array /** * Invoke a callable with parameters resolved via DI autowiring. - * @param callable|array{0: object, 1: string} $callable + * @param Closure|array{0: object, 1: string} $callable * @param array $params * @return mixed + * @throws DiException */ - private function invoke($callable, array $params) + private function invoke(Closure|array $callable, array $params) { - /** @var callable $callable */ + if (!is_callable($callable)) { + throw DiException::invalidCallable(); + } + $closure = Closure::fromCallable($callable); return $closure(...Di::autowire($closure, $params)); diff --git a/src/Router/RouteFinder.php b/src/Router/RouteFinder.php index 3f97aca4..f9b1fad3 100644 --- a/src/Router/RouteFinder.php +++ b/src/Router/RouteFinder.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Router; diff --git a/src/Service/Exceptions/ServiceException.php b/src/Service/Exceptions/ServiceException.php index 937c3dda..2ff7b795 100644 --- a/src/Service/Exceptions/ServiceException.php +++ b/src/Service/Exceptions/ServiceException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Service\Exceptions; diff --git a/src/Service/Factories/ServiceFactory.php b/src/Service/Factories/ServiceFactory.php index 1eaae47e..bde03d47 100644 --- a/src/Service/Factories/ServiceFactory.php +++ b/src/Service/Factories/ServiceFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Service\Factories; diff --git a/src/Service/Helpers/service.php b/src/Service/Helpers/service.php index 73b91bc7..a8085bf2 100644 --- a/src/Service/Helpers/service.php +++ b/src/Service/Helpers/service.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Service\Exceptions\ServiceException; diff --git a/src/Service/Service.php b/src/Service/Service.php index 22ab517a..d5281d26 100644 --- a/src/Service/Service.php +++ b/src/Service/Service.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Service; diff --git a/src/Session/Adapters/Database/DatabaseHandler.php b/src/Session/Adapters/Database/DatabaseHandler.php index 52e8e03d..32549aaf 100644 --- a/src/Session/Adapters/Database/DatabaseHandler.php +++ b/src/Session/Adapters/Database/DatabaseHandler.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Adapters\Database; diff --git a/src/Session/Adapters/Database/DatabaseSessionAdapter.php b/src/Session/Adapters/Database/DatabaseSessionAdapter.php index 1f57ec4b..7d479c04 100644 --- a/src/Session/Adapters/Database/DatabaseSessionAdapter.php +++ b/src/Session/Adapters/Database/DatabaseSessionAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Adapters\Database; diff --git a/src/Session/Adapters/Native/NativeSessionAdapter.php b/src/Session/Adapters/Native/NativeSessionAdapter.php index 9a0bff71..963f9def 100644 --- a/src/Session/Adapters/Native/NativeSessionAdapter.php +++ b/src/Session/Adapters/Native/NativeSessionAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Adapters\Native; diff --git a/src/Session/Contracts/SessionStorageInterface.php b/src/Session/Contracts/SessionStorageInterface.php index 6d42167c..e3de2734 100644 --- a/src/Session/Contracts/SessionStorageInterface.php +++ b/src/Session/Contracts/SessionStorageInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Contracts; diff --git a/src/Session/Enums/ExceptionMessages.php b/src/Session/Enums/ExceptionMessages.php index 12edf59f..ac1e4530 100644 --- a/src/Session/Enums/ExceptionMessages.php +++ b/src/Session/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Enums; diff --git a/src/Session/Enums/SessionType.php b/src/Session/Enums/SessionType.php index 84a47b09..fc4b5ede 100644 --- a/src/Session/Enums/SessionType.php +++ b/src/Session/Enums/SessionType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Enums; diff --git a/src/Session/Exceptions/SessionException.php b/src/Session/Exceptions/SessionException.php index 18282c82..0cb86469 100644 --- a/src/Session/Exceptions/SessionException.php +++ b/src/Session/Exceptions/SessionException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Exceptions; diff --git a/src/Session/Factories/SessionFactory.php b/src/Session/Factories/SessionFactory.php index d2460aa2..4bbcb8b4 100644 --- a/src/Session/Factories/SessionFactory.php +++ b/src/Session/Factories/SessionFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Factories; diff --git a/src/Session/Helpers/session.php b/src/Session/Helpers/session.php index 0b90323a..b33e083b 100644 --- a/src/Session/Helpers/session.php +++ b/src/Session/Helpers/session.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Session\Factories\SessionFactory; diff --git a/src/Session/Session.php b/src/Session/Session.php index 8fae5802..7ef55f45 100644 --- a/src/Session/Session.php +++ b/src/Session/Session.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session; @@ -56,7 +50,7 @@ public function getAdapter(): SessionStorageInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw SessionException::methodNotSupported($method, get_class($this->adapter)); + throw SessionException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Session/Traits/SessionTrait.php b/src/Session/Traits/SessionTrait.php index d00ce5c2..31f58429 100644 --- a/src/Session/Traits/SessionTrait.php +++ b/src/Session/Traits/SessionTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Session\Traits; diff --git a/src/Storage/Adapters/Dropbox/DropboxApp.php b/src/Storage/Adapters/Dropbox/DropboxApp.php index 04ed483e..771a2f56 100644 --- a/src/Storage/Adapters/Dropbox/DropboxApp.php +++ b/src/Storage/Adapters/Dropbox/DropboxApp.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Adapters\Dropbox; diff --git a/src/Storage/Adapters/Dropbox/DropboxFileSystemAdapter.php b/src/Storage/Adapters/Dropbox/DropboxFileSystemAdapter.php index 13d6dca3..a6827bdf 100644 --- a/src/Storage/Adapters/Dropbox/DropboxFileSystemAdapter.php +++ b/src/Storage/Adapters/Dropbox/DropboxFileSystemAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Adapters\Dropbox; @@ -40,7 +34,7 @@ public function makeDirectory(string $dirname, ?string $parentId = null): bool try { $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_CREATE_FOLDER, $this->dropboxApp->path($dirname)); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -53,7 +47,7 @@ public function removeDirectory(string $dirname): bool try { $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_DELETE_FILE, $this->dropboxApp->path($dirname)); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -61,11 +55,11 @@ public function removeDirectory(string $dirname): bool /** * @inheritDoc */ - public function get(string $filename) + public function get(string $filename): string|false { try { return (string) $this->dropboxApp->contentRequest(DropboxApp::ENDPOINT_DOWNLOAD_FILE, $this->dropboxApp->path($filename)); - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -84,7 +78,7 @@ public function put(string $filename, $content, ?string $parentId = null) return $response->size; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -111,7 +105,7 @@ public function rename(string $oldName, string $newName): bool ]); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -128,7 +122,7 @@ public function copy(string $source, string $dest): bool ]); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -149,7 +143,7 @@ public function size(string $filename) try { $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); return $meta['size']; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -157,12 +151,12 @@ public function size(string $filename) /** * @inheritDoc */ - public function lastModified(string $filename) + public function lastModified(string $filename): int|false { try { $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); return isset($meta['server_modified']) ? strtotime($meta['server_modified']) : false; - } catch (Exception $e) { + } catch (Exception) { return false; } @@ -176,7 +170,7 @@ public function remove(string $filename): bool try { $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_DELETE_FILE, $this->dropboxApp->path($filename)); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } @@ -190,7 +184,7 @@ public function isFile(string $filename): bool try { $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); return $meta['.tag'] == 'file'; - } catch (Exception $e) { + } catch (Exception) { return false; } @@ -204,7 +198,7 @@ public function isDirectory(string $dirname): bool try { $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($dirname)); return $meta['.tag'] == 'folder'; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -217,7 +211,7 @@ public function listDirectory(string $dirname) try { $response = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_LIST_FOLDER, $this->dropboxApp->path($dirname)); return $response['entries']; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Storage/Adapters/GoogleDrive/GoogleDriveApp.php b/src/Storage/Adapters/GoogleDrive/GoogleDriveApp.php index 05a5f247..20a27455 100644 --- a/src/Storage/Adapters/GoogleDrive/GoogleDriveApp.php +++ b/src/Storage/Adapters/GoogleDrive/GoogleDriveApp.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Adapters\GoogleDrive; diff --git a/src/Storage/Adapters/GoogleDrive/GoogleDriveFileSystemAdapter.php b/src/Storage/Adapters/GoogleDrive/GoogleDriveFileSystemAdapter.php index be8c4806..a9f6f97e 100644 --- a/src/Storage/Adapters/GoogleDrive/GoogleDriveFileSystemAdapter.php +++ b/src/Storage/Adapters/GoogleDrive/GoogleDriveFileSystemAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Adapters\GoogleDrive; @@ -46,7 +40,7 @@ public function makeDirectory(string $dirname, ?string $parentId = null): bool $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL, $data); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -62,11 +56,11 @@ public function removeDirectory(string $dirname): bool /** * @inheritDoc */ - public function get(string $filename) + public function get(string $filename): string|false { try { return (string) $this->googleDriveApp->getFileInfo($filename, true); - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -104,7 +98,7 @@ public function put(string $filename, $content, ?string $parentId = null) 'application/octet-stream' ); - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -131,7 +125,7 @@ public function rename(string $oldName, string $newName): bool $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '/' . $oldName, $data, 'PATCH'); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -148,7 +142,7 @@ public function copy(string $source, string $dest = 'root'): bool $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '/' . $source . '/copy', $data); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -169,7 +163,7 @@ public function size(string $filename) try { $meta = (array) $this->googleDriveApp->getFileInfo($filename); return $meta['size']; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -177,12 +171,12 @@ public function size(string $filename) /** * @inheritDoc */ - public function lastModified(string $filename) + public function lastModified(string $filename): int|false { try { $meta = (array) $this->googleDriveApp->getFileInfo($filename); return empty($meta['modifiedTime']) ? false : strtotime($meta['modifiedTime']); - } catch (Exception $e) { + } catch (Exception) { return false; } @@ -196,7 +190,7 @@ public function remove(string $filename): bool try { $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '/' . $filename, [], 'DELETE'); return true; - } catch (Exception $e) { + } catch (Exception) { return false; } @@ -211,7 +205,7 @@ public function isFile(string $filename): bool $meta = (array) $this->googleDriveApp->getFileInfo($filename); return $meta['kind'] === GoogleDriveApp::DRIVE_FILE_KIND && $meta['mimeType'] != GoogleDriveApp::FOLDER_MIMETYPE; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -225,7 +219,7 @@ public function isDirectory(string $dirname): bool $meta = (array) $this->googleDriveApp->getFileInfo($dirname); return $meta['kind'] === GoogleDriveApp::DRIVE_FILE_KIND && $meta['mimeType'] === GoogleDriveApp::FOLDER_MIMETYPE; - } catch (Exception $e) { + } catch (Exception) { return false; } } @@ -242,7 +236,7 @@ public function listDirectory(string $dirname) ]; $response = (array) $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '?' . http_build_query($params), [], 'GET'); return $response['files']; - } catch (Exception $e) { + } catch (Exception) { return false; } } diff --git a/src/Storage/Adapters/Local/LocalFileSystemAdapter.php b/src/Storage/Adapters/Local/LocalFileSystemAdapter.php index 5af4dea0..bea98c9d 100644 --- a/src/Storage/Adapters/Local/LocalFileSystemAdapter.php +++ b/src/Storage/Adapters/Local/LocalFileSystemAdapter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Adapters\Local; @@ -48,7 +42,7 @@ public function removeDirectory(string $dirname): bool /** * @inheritDoc */ - public function get(string $filename) + public function get(string $filename): string|false { return file_get_contents($filename); } @@ -73,7 +67,7 @@ public function getJson(string $filename) /** * @inheritDoc */ - public function put(string $filename, $content, ?string $parentId = null) + public function put(string $filename, $content, ?string $parentId = null): int|false { return file_put_contents($filename, $content, LOCK_EX); } @@ -81,7 +75,7 @@ public function put(string $filename, $content, ?string $parentId = null) /** * @inheritDoc */ - public function append(string $filename, $content) + public function append(string $filename, $content): int|false { return file_put_contents($filename, $content, FILE_APPEND | LOCK_EX); } @@ -113,7 +107,7 @@ public function exists(string $filename): bool /** * @inheritDoc */ - public function size(string $filename) + public function size(string $filename): int|false { return filesize($filename); } @@ -121,7 +115,7 @@ public function size(string $filename) /** * @inheritDoc */ - public function lastModified(string $filename) + public function lastModified(string $filename): int|false { return filemtime($filename); } @@ -153,7 +147,7 @@ public function isDirectory(string $dirname): bool /** * @inheritDoc */ - public function listDirectory(string $dirname) + public function listDirectory(string $dirname): array|false { $entries = []; @@ -170,7 +164,7 @@ public function listDirectory(string $dirname) return $entries; - } catch (Throwable $e) { + } catch (Throwable) { return false; } } diff --git a/src/Storage/Contracts/CloudAppInterface.php b/src/Storage/Contracts/CloudAppInterface.php index 2a513d3b..ca624a9d 100644 --- a/src/Storage/Contracts/CloudAppInterface.php +++ b/src/Storage/Contracts/CloudAppInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Contracts; diff --git a/src/Storage/Contracts/FilesystemAdapterInterface.php b/src/Storage/Contracts/FilesystemAdapterInterface.php index 8442245b..8c50ac86 100644 --- a/src/Storage/Contracts/FilesystemAdapterInterface.php +++ b/src/Storage/Contracts/FilesystemAdapterInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Contracts; diff --git a/src/Storage/Contracts/LocalFilesystemAdapterInterface.php b/src/Storage/Contracts/LocalFilesystemAdapterInterface.php index 8a4016ae..901bf026 100644 --- a/src/Storage/Contracts/LocalFilesystemAdapterInterface.php +++ b/src/Storage/Contracts/LocalFilesystemAdapterInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Contracts; diff --git a/src/Storage/Contracts/TokenServiceInterface.php b/src/Storage/Contracts/TokenServiceInterface.php index 57533b28..0c95a9d2 100644 --- a/src/Storage/Contracts/TokenServiceInterface.php +++ b/src/Storage/Contracts/TokenServiceInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Contracts; diff --git a/src/Storage/Enums/ExceptionMessages.php b/src/Storage/Enums/ExceptionMessages.php index d4c3aa26..086efbc6 100644 --- a/src/Storage/Enums/ExceptionMessages.php +++ b/src/Storage/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Enums; @@ -20,7 +14,7 @@ /** * Class ExceptionMessages - * @package Quantum\Session + * @package Quantum\Storage */ final class ExceptionMessages extends BaseExceptionMessages { diff --git a/src/Storage/Enums/FileSystemType.php b/src/Storage/Enums/FileSystemType.php index fb99cd18..9c1fabfa 100644 --- a/src/Storage/Enums/FileSystemType.php +++ b/src/Storage/Enums/FileSystemType.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Enums; diff --git a/src/Storage/Exceptions/FileSystemException.php b/src/Storage/Exceptions/FileSystemException.php index 18ff24f9..9573dbe6 100644 --- a/src/Storage/Exceptions/FileSystemException.php +++ b/src/Storage/Exceptions/FileSystemException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Exceptions; diff --git a/src/Storage/Exceptions/FileUploadException.php b/src/Storage/Exceptions/FileUploadException.php index 4f748b68..bdc3975d 100644 --- a/src/Storage/Exceptions/FileUploadException.php +++ b/src/Storage/Exceptions/FileUploadException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Exceptions; diff --git a/src/Storage/Factories/FileSystemFactory.php b/src/Storage/Factories/FileSystemFactory.php index d05dda6f..f6652871 100644 --- a/src/Storage/Factories/FileSystemFactory.php +++ b/src/Storage/Factories/FileSystemFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Factories; diff --git a/src/Storage/FileSystem.php b/src/Storage/FileSystem.php index 0f3ee8ee..b177b83d 100644 --- a/src/Storage/FileSystem.php +++ b/src/Storage/FileSystem.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage; @@ -68,7 +62,7 @@ public function getAdapter(): FilesystemAdapterInterface public function __call(string $method, ?array $arguments) { if (!method_exists($this->adapter, $method)) { - throw FileSystemException::methodNotSupported($method, get_class($this->adapter)); + throw FileSystemException::methodNotSupported($method, $this->adapter::class); } return $this->adapter->$method(...$arguments); diff --git a/src/Storage/Helpers/fs.php b/src/Storage/Helpers/fs.php index cf9c2f59..e96469ba 100644 --- a/src/Storage/Helpers/fs.php +++ b/src/Storage/Helpers/fs.php @@ -2,14 +2,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Storage\Factories\FileSystemFactory; diff --git a/src/Storage/Traits/CloudAppTrait.php b/src/Storage/Traits/CloudAppTrait.php index 7b520d8f..e270938f 100644 --- a/src/Storage/Traits/CloudAppTrait.php +++ b/src/Storage/Traits/CloudAppTrait.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Traits; diff --git a/src/Storage/UploadedFile.php b/src/Storage/UploadedFile.php index c6614840..ac42d606 100644 --- a/src/Storage/UploadedFile.php +++ b/src/Storage/UploadedFile.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage; @@ -383,7 +377,7 @@ private function getLocalFileSystem(): LocalFilesystemAdapterInterface if (!$adapter instanceof LocalFilesystemAdapterInterface) { throw FileSystemException::notInstanceOf( - get_class($adapter), + $adapter::class, LocalFilesystemAdapterInterface::class ); } diff --git a/src/Storage/Uploads/UploadConfigProvider.php b/src/Storage/Uploads/UploadConfigProvider.php index d3e43787..1ff1ab78 100644 --- a/src/Storage/Uploads/UploadConfigProvider.php +++ b/src/Storage/Uploads/UploadConfigProvider.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Uploads; diff --git a/src/Storage/Uploads/UploadPolicy.php b/src/Storage/Uploads/UploadPolicy.php index 59c81f6e..ec4567a3 100644 --- a/src/Storage/Uploads/UploadPolicy.php +++ b/src/Storage/Uploads/UploadPolicy.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Uploads; diff --git a/src/Storage/Uploads/UploadStorage.php b/src/Storage/Uploads/UploadStorage.php index bac52b2f..851037aa 100644 --- a/src/Storage/Uploads/UploadStorage.php +++ b/src/Storage/Uploads/UploadStorage.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Storage\Uploads; diff --git a/src/Tracer/ErrorHandler.php b/src/Tracer/ErrorHandler.php index c5fee7ef..b1b39263 100644 --- a/src/Tracer/ErrorHandler.php +++ b/src/Tracer/ErrorHandler.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Tracer; @@ -101,7 +95,7 @@ private function handleCliException(Throwable $throwable): void return; } - $output->writeln('' . get_class($throwable) . ': ' . $throwable->getMessage() . ''); + $output->writeln('' . $throwable::class . ': ' . $throwable->getMessage() . ''); $output->writeln('In ' . $throwable->getFile() . ':' . $throwable->getLine()); $output->writeln($throwable->getTraceAsString()); } @@ -121,7 +115,7 @@ private function handleWebException(Throwable $throwable): void $errorPage = $this->webExceptionRenderer->render($throwable, $errorType); response()->html($errorPage, StatusCode::INTERNAL_SERVER_ERROR); response()->send(); - } catch (Throwable $e) { + } catch (Throwable) { response()->html('Internal Server Error', StatusCode::INTERNAL_SERVER_ERROR); response()->send(); } diff --git a/src/Tracer/ExceptionSeverityResolver.php b/src/Tracer/ExceptionSeverityResolver.php index 4bdb98d1..187d8767 100644 --- a/src/Tracer/ExceptionSeverityResolver.php +++ b/src/Tracer/ExceptionSeverityResolver.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Tracer; diff --git a/src/Tracer/StackTraceFormatter.php b/src/Tracer/StackTraceFormatter.php index 85e38ffa..10730a3b 100644 --- a/src/Tracer/StackTraceFormatter.php +++ b/src/Tracer/StackTraceFormatter.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Tracer; diff --git a/src/Tracer/WebExceptionRenderer.php b/src/Tracer/WebExceptionRenderer.php index 4148fdaf..fa0dec68 100644 --- a/src/Tracer/WebExceptionRenderer.php +++ b/src/Tracer/WebExceptionRenderer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Tracer; diff --git a/src/Transformer/Contracts/TransformerInterface.php b/src/Transformer/Contracts/TransformerInterface.php index c114b402..38a066be 100644 --- a/src/Transformer/Contracts/TransformerInterface.php +++ b/src/Transformer/Contracts/TransformerInterface.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Transformer\Contracts; diff --git a/src/Transformer/Helpers/transformer.php b/src/Transformer/Helpers/transformer.php index 216387f5..51efa26e 100644 --- a/src/Transformer/Helpers/transformer.php +++ b/src/Transformer/Helpers/transformer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use Quantum\Transformer\Contracts\TransformerInterface; diff --git a/src/Transformer/Transformer.php b/src/Transformer/Transformer.php index b7188cc3..3f6ade08 100644 --- a/src/Transformer/Transformer.php +++ b/src/Transformer/Transformer.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Transformer; diff --git a/src/Validation/Rule.php b/src/Validation/Rule.php index 6ac141f8..263815d9 100644 --- a/src/Validation/Rule.php +++ b/src/Validation/Rule.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation; /** * Rule class - * @package Quantum + * @package Quantum\Validation * @category Libraries * @method static bool required() * @method static bool email() diff --git a/src/Validation/Traits/File.php b/src/Validation/Traits/File.php index ec62db8b..2a56954a 100644 --- a/src/Validation/Traits/File.php +++ b/src/Validation/Traits/File.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation\Traits; @@ -21,7 +15,7 @@ /** * Trait File - * @package Quantum\Validation\Rules + * @package Quantum\Validation */ trait File { diff --git a/src/Validation/Traits/General.php b/src/Validation/Traits/General.php index 06b321d8..5bb885bc 100644 --- a/src/Validation/Traits/General.php +++ b/src/Validation/Traits/General.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation\Traits; @@ -176,7 +170,7 @@ protected function date($value, ?string $format = null): bool */ protected function starts($value, ?string $text = null): bool { - return strpos((string) $value, (string) $text) === 0; + return str_starts_with((string) $value, (string) $text); } /** diff --git a/src/Validation/Traits/Length.php b/src/Validation/Traits/Length.php index dfdfd758..a1297146 100644 --- a/src/Validation/Traits/Length.php +++ b/src/Validation/Traits/Length.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation\Traits; /** * Trait Length - * @package Quantum\Validation\Rules + * @package Quantum\Validation */ trait Length { diff --git a/src/Validation/Traits/Lists.php b/src/Validation/Traits/Lists.php index e0e48c80..495165e9 100644 --- a/src/Validation/Traits/Lists.php +++ b/src/Validation/Traits/Lists.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation\Traits; /** * Trait Lists - * @package Quantum\Validation\Rules + * @package Quantum\Validation */ trait Lists { @@ -30,7 +24,7 @@ protected function contains(string $value, string $haystack): bool $value = trim(strtolower($value)); $haystack = trim(strtolower($haystack)); - return strpos($haystack, $value) !== false; + return str_contains($haystack, $value); } /** diff --git a/src/Validation/Traits/Resource.php b/src/Validation/Traits/Resource.php index f69d1caa..e3243bc5 100644 --- a/src/Validation/Traits/Resource.php +++ b/src/Validation/Traits/Resource.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation\Traits; /** * Trait Resource - * @package Quantum\Validation\Rules + * @package Quantum\Validation */ trait Resource { diff --git a/src/Validation/Traits/Type.php b/src/Validation/Traits/Type.php index 1ca2e873..42de1ca8 100644 --- a/src/Validation/Traits/Type.php +++ b/src/Validation/Traits/Type.php @@ -4,21 +4,15 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation\Traits; /** * Trait Type - * @package Quantum\Validation\Rules + * @package Quantum\Validation */ trait Type { diff --git a/src/Validation/Validator.php b/src/Validation/Validator.php index 9cc5af96..eb0269ce 100644 --- a/src/Validation/Validator.php +++ b/src/Validation/Validator.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\Validation; diff --git a/src/View/Enums/ExceptionMessages.php b/src/View/Enums/ExceptionMessages.php index fd4a96d7..88e5548b 100644 --- a/src/View/Enums/ExceptionMessages.php +++ b/src/View/Enums/ExceptionMessages.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\View\Enums; diff --git a/src/View/Exceptions/ViewException.php b/src/View/Exceptions/ViewException.php index f8a4ed61..e796b61e 100644 --- a/src/View/Exceptions/ViewException.php +++ b/src/View/Exceptions/ViewException.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\View\Exceptions; diff --git a/src/View/Factories/ViewFactory.php b/src/View/Factories/ViewFactory.php index 2d064b9f..b154a7c4 100644 --- a/src/View/Factories/ViewFactory.php +++ b/src/View/Factories/ViewFactory.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\View\Factories; diff --git a/src/View/Helpers/view.php b/src/View/Helpers/view.php index 829b8df7..955b03f9 100644 --- a/src/View/Helpers/view.php +++ b/src/View/Helpers/view.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ use League\CommonMark\Exception\CommonMarkException; diff --git a/src/View/RawParam.php b/src/View/RawParam.php index 5a1be9c6..9335acc4 100644 --- a/src/View/RawParam.php +++ b/src/View/RawParam.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\View; diff --git a/src/View/View.php b/src/View/View.php index 94399cda..bf160dd2 100644 --- a/src/View/View.php +++ b/src/View/View.php @@ -4,14 +4,8 @@ /** * Quantum PHP Framework - * - * An open source software development framework for PHP - * - * @package Quantum - * @author Arman Ag. - * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) - * @link https://quantumphp.io/ - * @since 3.0.0 + * An open-source software development framework for PHP + * @link https://quantumphp.io */ namespace Quantum\View; diff --git a/tests/Unit/Console/Commands/CronRunCommandTest.php b/tests/Unit/Console/Commands/CronRunCommandTest.php index 97c95727..4d427cce 100644 --- a/tests/Unit/Console/Commands/CronRunCommandTest.php +++ b/tests/Unit/Console/Commands/CronRunCommandTest.php @@ -9,7 +9,6 @@ /** * Class CronRunCommandTest - * @package Quantum\Tests\Unit\Console\Commands */ class CronRunCommandTest extends AppTestCase { diff --git a/tests/Unit/Cron/CronLockTest.php b/tests/Unit/Cron/CronLockTest.php index 3d8a56d0..414922b5 100644 --- a/tests/Unit/Cron/CronLockTest.php +++ b/tests/Unit/Cron/CronLockTest.php @@ -8,7 +8,6 @@ /** * Class CronLockTest - * @package Quantum\Tests\Unit\Cron */ class CronLockTest extends AppTestCase { diff --git a/tests/Unit/Cron/CronManagerTest.php b/tests/Unit/Cron/CronManagerTest.php index fe179597..45bfe8c1 100644 --- a/tests/Unit/Cron/CronManagerTest.php +++ b/tests/Unit/Cron/CronManagerTest.php @@ -8,7 +8,6 @@ /** * Class CronManagerTest - * @package Quantum\Tests\Unit\Cron */ class CronManagerTest extends AppTestCase { diff --git a/tests/Unit/Cron/CronTaskTest.php b/tests/Unit/Cron/CronTaskTest.php index 80e5f8b6..1ba02527 100644 --- a/tests/Unit/Cron/CronTaskTest.php +++ b/tests/Unit/Cron/CronTaskTest.php @@ -8,7 +8,6 @@ /** * Class CronTaskTest - * @package Quantum\Tests\Unit\Cron */ class CronTaskTest extends AppTestCase {