diff --git a/.build/composer.json b/.build/composer.json new file mode 100644 index 000000000..094de2fc0 --- /dev/null +++ b/.build/composer.json @@ -0,0 +1,27 @@ +{ + "description": "tools", + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "narrowspark/coding-standard": "^4.0.0", + "wikimedia/composer-merge-plugin": "^1.4.1" + }, + "extra": { + "merge-plugin": { + "include": [ + "../composer.json" + ], + "merge-extra": false, + "merge-scripts": false + } + }, + "scripts": { + "changelog": "changelog-generator generate --config=\"./../.changelog\" --file --prepend", + "cs": "php-cs-fixer fix --config=\"./../.php_cs\"", + "cs:check": "php-cs-fixer fix --config=\"./../.php_cs\" --dry-run", + "phpstan": "phpstan analyse -c ./../phpstan.neon", + "psalm": "psalm --threads=$(nproc)", + "psalm:fix": "psalm --alter --issues=all --threads=$(nproc)", + "infection": "infection --configuration=\"./../infection.json\" -j$(nproc)" + } +} diff --git a/.build/travis/configure_php.sh b/.build/travis/configure_php.sh new file mode 100644 index 000000000..217cd6002 --- /dev/null +++ b/.build/travis/configure_php.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +if [[ "$REMOVE_XDEBUG" = true ]]; then + phpenv config-rm xdebug.ini; +fi + +echo date.timezone = Europe/Berlin >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini diff --git a/.build/update-mirror-classes.php b/.build/update-mirror-classes.php new file mode 100644 index 000000000..3d96a0db7 --- /dev/null +++ b/.build/update-mirror-classes.php @@ -0,0 +1,79 @@ +#!/usr/bin/env php +remove($rootDir . \DIRECTORY_SEPARATOR . $outputSettings['path']); + + foreach ($list['mirror_list'] as $path => $settings) { + $preparedOutputPath = \str_replace("/{$settings['path']}/", '/' . $outputSettings['path'].$settings['path'] . '/', $path); + + $fs->copy($path, $preparedOutputPath, true); + + $content = \file_get_contents($preparedOutputPath); + $content = \str_replace(["\nclass", "\nabstract class", "\ninterface"], ["\n{$comment}\nclass", "\n{$comment}\nabstract class", "\n{$comment}\ninterface"], $content); + + $mirrorContent = \str_replace($settings['namespace'], $outputSettings['namespace'], $content); + + \preg_match($regex, $content, $matches, \PREG_OFFSET_CAPTURE, 0); + \preg_match($regex, $mirrorContent, $mirrorMatches, \PREG_OFFSET_CAPTURE, 0); + \preg_match('/(abstract class |final class |class |interface |trait )([A-z]*)/s', $content, $classMatches, \PREG_OFFSET_CAPTURE, 0); + + if (! array_key_exists($outputSettings['path'], $aliasList)) { + $aliasList[$outputSettings['path']] = []; + } + + $aliasList[$outputSettings['path']][] = '\class_alias(' . $mirrorMatches[1][0] . '\\' . $classMatches[2][0] . '::class, ' . $matches[1][0] . '\\' . $classMatches[2][0] . '::class);' . "\n"; + + $fs->dumpFile($preparedOutputPath, $mirrorContent); + + echo "Dumped {$preparedOutputPath}.\n"; + + $mirrorContent = $content = $matches = $mirrorMatches = null; + } +} + +echo "\n"; + +$header = <<<'EOF' +/** + * This file is part of Narrowspark Framework. + * + * (c) Daniel Bannert + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ +EOF; + +foreach ($aliasList as $output => $aliases) { + $preparedOutputPath = 'src/'.rtrim($output, '/').'/alias.php'; + + $fs->dumpFile($rootDir . DIRECTORY_SEPARATOR . $preparedOutputPath, " +declare(strict_types=1); -This source file is subject to the MIT license that is bundled -with this source code in the file LICENSE. -EOF; +use Ergebnis\License; +use Narrowspark\CS\Config\Config; -$config = new Config($header, [ +$license = static function ($path) { + return License\Type\MIT::markdown( + $path . '/LICENSE.md', + License\Range::since( + License\Year::fromString('2018'), + new \DateTimeZone('UTC') + ), + License\Holder::fromString('Daniel Bannert'), + License\Url::fromString('https://github.com/narrowspark/automatic') + ); +}; + +$mainLicense = $license(__DIR__); +$mainLicense->save(); + +$config = new Config($mainLicense->header(), [ 'native_function_invocation' => [ 'exclude' => [ 'fread', @@ -25,19 +35,18 @@ $config = new Config($header, [ 'glob', ], ], + 'static_lambda' => false, + 'final_public_method_for_abstract_class' => false, + 'final_class' => false, + 'phpdoc_to_return_type' => false, + // both are needed + 'date_time_immutable' => false, + // @todo waiting for php-cs-fixer 2.16.2 'global_namespace_import' => [ 'import_classes' => true, 'import_constants' => false, 'import_functions' => false, - ], - 'static_lambda' => false, - 'final_class' => false, - 'heredoc_indentation' => false, - 'PhpCsFixerCustomFixers/no_commented_out_code' => false, - 'PhpCsFixerCustomFixers/phpdoc_no_superfluous_param' => false, - 'phpdoc_to_return_type' => false, - 'php_unit_ordered_covers' => true, - 'ordered_class_elements' => true, + ] ]); $config->getFinder() diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ca70139ee..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Narrowspark - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..b101c4b50 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,16 @@ +# The MIT License (MIT) + +Copyright (c) 2018-2020 Daniel Bannert + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the _Software_), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED **AS IS**, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/benchmark/src/Container/ContainerBenchCase.php b/benchmark/src/Container/ContainerBenchCase.php index 8b84ffbc2..07182ec2d 100644 --- a/benchmark/src/Container/ContainerBenchCase.php +++ b/benchmark/src/Container/ContainerBenchCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container; diff --git a/benchmark/src/Container/Fixture/EmptyFactory.php b/benchmark/src/Container/Fixture/EmptyFactory.php index d629e73c1..908c6960d 100644 --- a/benchmark/src/Container/Fixture/EmptyFactory.php +++ b/benchmark/src/Container/Fixture/EmptyFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container\Fixture; diff --git a/benchmark/src/Container/IlluminateContainerBench.php b/benchmark/src/Container/IlluminateContainerBench.php index 552a18f60..3911aa1c6 100644 --- a/benchmark/src/Container/IlluminateContainerBench.php +++ b/benchmark/src/Container/IlluminateContainerBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container; diff --git a/benchmark/src/Container/PhpDiContainerBench.php b/benchmark/src/Container/PhpDiContainerBench.php index 9cd255d9d..4750be7f3 100644 --- a/benchmark/src/Container/PhpDiContainerBench.php +++ b/benchmark/src/Container/PhpDiContainerBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container; diff --git a/benchmark/src/Container/SymfonyDiContainerBench.php b/benchmark/src/Container/SymfonyDiContainerBench.php index bdf78674e..c9e2912c1 100644 --- a/benchmark/src/Container/SymfonyDiContainerBench.php +++ b/benchmark/src/Container/SymfonyDiContainerBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container; diff --git a/benchmark/src/Container/ViserioClosureContainerBench.php b/benchmark/src/Container/ViserioClosureContainerBench.php index bfbd8d727..815af58f1 100644 --- a/benchmark/src/Container/ViserioClosureContainerBench.php +++ b/benchmark/src/Container/ViserioClosureContainerBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container; diff --git a/benchmark/src/Container/ViserioContainerBench.php b/benchmark/src/Container/ViserioContainerBench.php index 1160faea5..12525ea60 100644 --- a/benchmark/src/Container/ViserioContainerBench.php +++ b/benchmark/src/Container/ViserioContainerBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Container; diff --git a/benchmark/src/Http/AbstractHttpResponseBenchCase.php b/benchmark/src/Http/AbstractHttpResponseBenchCase.php index 765b816fd..4568eebd4 100644 --- a/benchmark/src/Http/AbstractHttpResponseBenchCase.php +++ b/benchmark/src/Http/AbstractHttpResponseBenchCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Http; diff --git a/benchmark/src/Http/GuzzleHttpResponseBench.php b/benchmark/src/Http/GuzzleHttpResponseBench.php index 7f172fe7b..ea1444d14 100644 --- a/benchmark/src/Http/GuzzleHttpResponseBench.php +++ b/benchmark/src/Http/GuzzleHttpResponseBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Http; diff --git a/benchmark/src/Http/NyholmHttpResponseBench.php b/benchmark/src/Http/NyholmHttpResponseBench.php index 830f34094..a7226057c 100644 --- a/benchmark/src/Http/NyholmHttpResponseBench.php +++ b/benchmark/src/Http/NyholmHttpResponseBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Http; diff --git a/benchmark/src/Http/SlimHttpResponseBench.php b/benchmark/src/Http/SlimHttpResponseBench.php index ede23d8e8..9e92f395e 100644 --- a/benchmark/src/Http/SlimHttpResponseBench.php +++ b/benchmark/src/Http/SlimHttpResponseBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Http; diff --git a/benchmark/src/Http/ViserioHttpResponseBench.php b/benchmark/src/Http/ViserioHttpResponseBench.php index d9c156333..6f59b73cf 100644 --- a/benchmark/src/Http/ViserioHttpResponseBench.php +++ b/benchmark/src/Http/ViserioHttpResponseBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Http; diff --git a/benchmark/src/Http/ZendHttpResponseBench.php b/benchmark/src/Http/ZendHttpResponseBench.php index 16342e713..5feb842fd 100644 --- a/benchmark/src/Http/ZendHttpResponseBench.php +++ b/benchmark/src/Http/ZendHttpResponseBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\Http; diff --git a/benchmark/src/HttpFactory/AbstractHttpFactoryBenchCase.php b/benchmark/src/HttpFactory/AbstractHttpFactoryBenchCase.php index 275b39fd8..8bee136a9 100644 --- a/benchmark/src/HttpFactory/AbstractHttpFactoryBenchCase.php +++ b/benchmark/src/HttpFactory/AbstractHttpFactoryBenchCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\HttpFactory; diff --git a/benchmark/src/HttpFactory/NyholmHttpFactoryBench.php b/benchmark/src/HttpFactory/NyholmHttpFactoryBench.php index 5be8eae91..efc47ecb3 100644 --- a/benchmark/src/HttpFactory/NyholmHttpFactoryBench.php +++ b/benchmark/src/HttpFactory/NyholmHttpFactoryBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\HttpFactory; diff --git a/benchmark/src/HttpFactory/SlimHttpFactoryBench.php b/benchmark/src/HttpFactory/SlimHttpFactoryBench.php index 1f467d0dc..79af1bb17 100644 --- a/benchmark/src/HttpFactory/SlimHttpFactoryBench.php +++ b/benchmark/src/HttpFactory/SlimHttpFactoryBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\HttpFactory; diff --git a/benchmark/src/HttpFactory/ViserioHttpFactoryBench.php b/benchmark/src/HttpFactory/ViserioHttpFactoryBench.php index 957b397ad..c7448515a 100644 --- a/benchmark/src/HttpFactory/ViserioHttpFactoryBench.php +++ b/benchmark/src/HttpFactory/ViserioHttpFactoryBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\HttpFactory; diff --git a/benchmark/src/HttpFactory/ZendHttpFactoryBench.php b/benchmark/src/HttpFactory/ZendHttpFactoryBench.php index c810e6f1e..2931e8352 100644 --- a/benchmark/src/HttpFactory/ZendHttpFactoryBench.php +++ b/benchmark/src/HttpFactory/ZendHttpFactoryBench.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Narrowspark\Benchmark\HttpFactory; diff --git a/composer.json b/composer.json index b40a7ff84..f84b99270 100644 --- a/composer.json +++ b/composer.json @@ -152,7 +152,7 @@ "mockery/mockery": "^1.2.4", "mouf/picotainer": "^1.1.0", "narrowspark/automatic-common": "^0.7.0", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "nikic/php-parser": "^4.2.1", "nyholm/nsa": "^1.1.0", @@ -160,7 +160,6 @@ "opis/closure": "^3.0", "php-http/psr7-integration-tests": "^1.0", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "symfony/yaml": "^4.3.8 || ^5.0.0", "voku/stringy": "^5.2.0", "yosymfony/toml": "^1.0.3" diff --git a/phpunit.xml.dist b/phpunit.xml similarity index 90% rename from phpunit.xml.dist rename to phpunit.xml index 8ff789ff6..0e5c0ad22 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml @@ -1,20 +1,30 @@ - diff --git a/psalm-baseline.xml b/psalm-baseline.xml new file mode 100644 index 000000000..2c0de9db7 --- /dev/null +++ b/psalm-baseline.xml @@ -0,0 +1,2 @@ + + diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 000000000..22d51a67e --- /dev/null +++ b/psalm.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Viserio/Bridge/Monolog/.gitignore b/src/Viserio/Bridge/Monolog/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Bridge/Monolog/.gitignore +++ b/src/Viserio/Bridge/Monolog/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Bridge/Monolog/Formatter/ConsoleFormatter.php b/src/Viserio/Bridge/Monolog/Formatter/ConsoleFormatter.php index fdff6c0f8..75321d720 100644 --- a/src/Viserio/Bridge/Monolog/Formatter/ConsoleFormatter.php +++ b/src/Viserio/Bridge/Monolog/Formatter/ConsoleFormatter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Formatter; @@ -68,8 +68,6 @@ class ConsoleFormatter implements FormatterInterface /** * Stream data. - * - * @var mixed */ private $outputBuffer; @@ -95,8 +93,6 @@ class ConsoleFormatter implements FormatterInterface * * date_format: The format of the outputted date string; * * colors: If true, the log string contains ANSI code to add color; * * multiline: If false, "context" and "extra" are dumped on one line. - * - * @param array $options */ public function __construct(array $options = []) { @@ -169,12 +165,6 @@ public function format(array $record) /** * @internal - * - * @param mixed $line - * @param mixed $depth - * @param mixed $indentPad - * - * @return void */ public function echoLine($line, $depth, $indentPad): void { @@ -186,8 +176,6 @@ public function echoLine($line, $depth, $indentPad): void /** * Return a anonymous class with a castObject function. * - * @return object - * * @codeCoverageIgnore */ private function castObjectClass(): object @@ -205,14 +193,6 @@ public function __construct(array $options) $this->options = $options; } - /** - * @param mixed $value - * @param array $array - * @param \Symfony\Component\VarDumper\Cloner\Stub $stub - * @param mixed $isNested - * - * @return array - */ public function castObject($value, array $array, Stub $stub, $isNested): array { if ((bool) $this->options['multiline']) { @@ -231,10 +211,6 @@ public function castObject($value, array $array, Stub $stub, $isNested): array /** * Replace message and context place holder. - * - * @param array $record - * - * @return array */ private function replacePlaceHolder(array $record): array { @@ -262,11 +238,6 @@ private function replacePlaceHolder(array $record): array /** * Dump console data. - * - * @param mixed $data - * @param null|bool $colors - * - * @return string */ private function dumpData($data, ?bool $colors = null): string { diff --git a/src/Viserio/Bridge/Monolog/Formatter/VarDumperFormatter.php b/src/Viserio/Bridge/Monolog/Formatter/VarDumperFormatter.php index 0b2995bcb..729c92c71 100644 --- a/src/Viserio/Bridge/Monolog/Formatter/VarDumperFormatter.php +++ b/src/Viserio/Bridge/Monolog/Formatter/VarDumperFormatter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Formatter; @@ -27,8 +27,6 @@ class VarDumperFormatter implements FormatterInterface /** * Create a new var dump formatter instance. - * - * @param \Symfony\Component\VarDumper\Cloner\VarCloner $cloner */ public function __construct(VarCloner $cloner) { diff --git a/src/Viserio/Bridge/Monolog/Handler/ConsoleHandler.php b/src/Viserio/Bridge/Monolog/Handler/ConsoleHandler.php index bf72d409b..dbfe3d0d1 100644 --- a/src/Viserio/Bridge/Monolog/Handler/ConsoleHandler.php +++ b/src/Viserio/Bridge/Monolog/Handler/ConsoleHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Handler; @@ -134,10 +134,6 @@ public function close(): void /** * Register needed events to event manager. - * - * @param \Viserio\Contract\Events\EventManager $eventManager - * - * @return void */ public function registerEvents(EventManagerContract $eventManager): void { diff --git a/src/Viserio/Bridge/Monolog/Processor/DebugProcessor.php b/src/Viserio/Bridge/Monolog/Processor/DebugProcessor.php index 21b9f55d1..19ac46301 100644 --- a/src/Viserio/Bridge/Monolog/Processor/DebugProcessor.php +++ b/src/Viserio/Bridge/Monolog/Processor/DebugProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Processor; @@ -33,10 +33,6 @@ class DebugProcessor /** * Invoke the debug processor. - * - * @param array $record - * - * @return array */ public function __invoke(array $record): array { @@ -66,8 +62,6 @@ public function __invoke(array $record): array * A log is an array with the following mandatory keys: * timestamp, message, priority, and priorityName. * It can also have an optional context key containing an array. - * - * @return array */ public function getLogs(): array { @@ -76,8 +70,6 @@ public function getLogs(): array /** * Returns the number of errors. - * - * @return int */ public function countErrors(): int { @@ -86,8 +78,6 @@ public function countErrors(): int /** * Removes all log records. - * - * @return void */ public function reset(): void { diff --git a/src/Viserio/Bridge/Monolog/Tests/DataCollector/MonologLoggerDataCollectorTest.php b/src/Viserio/Bridge/Monolog/Tests/DataCollector/MonologLoggerDataCollectorTest.php index a331db18e..0d4323735 100644 --- a/src/Viserio/Bridge/Monolog/Tests/DataCollector/MonologLoggerDataCollectorTest.php +++ b/src/Viserio/Bridge/Monolog/Tests/DataCollector/MonologLoggerDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Tests\DataCollector; diff --git a/src/Viserio/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php b/src/Viserio/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php index b2efa723c..9bf9ff264 100644 --- a/src/Viserio/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php +++ b/src/Viserio/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleFormatterTest extends TestCase { @@ -52,11 +53,6 @@ public function testFormatBatch(): void } /** - * @param mixed $level - * @param mixed $message - * @param array $context - * @param array $extra - * * @return array Record */ protected function getRecord( @@ -76,12 +72,6 @@ protected function getRecord( ]; } - /** - * @param array $context - * @param array $extra - * - * @return array - */ protected function getMultipleRecords(array $context = [], array $extra = []): array { return [ diff --git a/src/Viserio/Bridge/Monolog/Tests/Formatter/VarDumperFormatterTest.php b/src/Viserio/Bridge/Monolog/Tests/Formatter/VarDumperFormatterTest.php index 683bc19ec..87c1abca0 100644 --- a/src/Viserio/Bridge/Monolog/Tests/Formatter/VarDumperFormatterTest.php +++ b/src/Viserio/Bridge/Monolog/Tests/Formatter/VarDumperFormatterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class VarDumperFormatterTest extends TestCase { @@ -48,11 +49,6 @@ public function testFormatBatch(): void } /** - * @param mixed $level - * @param mixed $message - * @param mixed $context - * @param mixed $extra - * * @return array Record */ protected function getRecord($level = Logger::WARNING, $message = 'test', $context = [], $extra = []): array @@ -68,12 +64,6 @@ protected function getRecord($level = Logger::WARNING, $message = 'test', $conte ]; } - /** - * @param mixed $context - * @param mixed $extra - * - * @return array - */ protected function getMultipleRecords($context = [], $extra = []): array { return [ diff --git a/src/Viserio/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php b/src/Viserio/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php index 924f89c64..46b92092e 100644 --- a/src/Viserio/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php +++ b/src/Viserio/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Tests\Handler; @@ -39,6 +39,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleHandlerTest extends MockeryTestCase { @@ -76,14 +77,7 @@ public function testIsHandling(): void /** * @dataProvider provideVerbosityMappingCases * - * @param int $verbosity - * @param int $level - * @param bool $isHandling - * @param array $map - * * @throws Exception - * - * @return void */ public function testVerbosityMapping(int $verbosity, int $level, bool $isHandling, array $map = []): void { diff --git a/src/Viserio/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php b/src/Viserio/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php index 9dd8eadd4..d7b4c5945 100644 --- a/src/Viserio/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php +++ b/src/Viserio/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Monolog\Tests\Processor; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class DebugProcessorTest extends TestCase { @@ -90,10 +91,6 @@ public function testFlush(): void /** * Returns a DebugProcessor instance if one is registered with this logger. - * - * @param null|\Monolog\Logger $logger - * - * @return \Viserio\Bridge\Monolog\Processor\DebugProcessor */ private function getDebugLogger(?Logger $logger = null): DebugProcessor { diff --git a/src/Viserio/Bridge/Monolog/composer.json b/src/Viserio/Bridge/Monolog/composer.json index c726f8f93..0d3047bda 100644 --- a/src/Viserio/Bridge/Monolog/composer.json +++ b/src/Viserio/Bridge/Monolog/composer.json @@ -35,10 +35,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "symfony/var-dumper": "^4.3.8 || ^5.0.0", "viserio/console": "^1.0@dev", "viserio/events": "^1.0@dev" diff --git a/src/Viserio/Bridge/Monolog/phpstan.neon b/src/Viserio/Bridge/Monolog/phpstan.neon index 2077f7649..e5b286655 100644 --- a/src/Viserio/Bridge/Monolog/phpstan.neon +++ b/src/Viserio/Bridge/Monolog/phpstan.neon @@ -1,26 +1,16 @@ includes: -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture ignoreErrors: - '#Parameter \#1 \$casters of method Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner::addCasters\(\) expects array\\, array\\> given#' diff --git a/src/Viserio/Bridge/Monolog/phpunit.xml b/src/Viserio/Bridge/Monolog/phpunit.xml new file mode 100644 index 000000000..e5a504e44 --- /dev/null +++ b/src/Viserio/Bridge/Monolog/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Bridge/Monolog/phpunit.xml.dist b/src/Viserio/Bridge/Monolog/phpunit.xml.dist deleted file mode 100644 index b69812b3d..000000000 --- a/src/Viserio/Bridge/Monolog/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Bridge/Phpstan/.gitignore b/src/Viserio/Bridge/Phpstan/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Bridge/Phpstan/.gitignore +++ b/src/Viserio/Bridge/Phpstan/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Bridge/Phpstan/Tests/Fixture/Foo.php b/src/Viserio/Bridge/Phpstan/Tests/Fixture/Foo.php index 1c8f6cf0d..463b2c824 100644 --- a/src/Viserio/Bridge/Phpstan/Tests/Fixture/Foo.php +++ b/src/Viserio/Bridge/Phpstan/Tests/Fixture/Foo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Phpstan\Tests\Fixture; diff --git a/src/Viserio/Bridge/Phpstan/Tests/Fixture/ServiceProvider.php b/src/Viserio/Bridge/Phpstan/Tests/Fixture/ServiceProvider.php index 0e0755f8d..d2a4721ac 100644 --- a/src/Viserio/Bridge/Phpstan/Tests/Fixture/ServiceProvider.php +++ b/src/Viserio/Bridge/Phpstan/Tests/Fixture/ServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Phpstan\Tests\Fixture; diff --git a/src/Viserio/Bridge/Phpstan/Tests/Type/AbstractExtensionTestCase.php b/src/Viserio/Bridge/Phpstan/Tests/Type/AbstractExtensionTestCase.php index bdc9c48ca..b0b5b1cac 100644 --- a/src/Viserio/Bridge/Phpstan/Tests/Type/AbstractExtensionTestCase.php +++ b/src/Viserio/Bridge/Phpstan/Tests/Type/AbstractExtensionTestCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Phpstan\Tests\Type; diff --git a/src/Viserio/Bridge/Phpstan/Tests/Type/Viserio/Container/DynamicReturnTypeExtensionTest.php b/src/Viserio/Bridge/Phpstan/Tests/Type/Viserio/Container/DynamicReturnTypeExtensionTest.php index 2981c8747..44254cfe3 100644 --- a/src/Viserio/Bridge/Phpstan/Tests/Type/Viserio/Container/DynamicReturnTypeExtensionTest.php +++ b/src/Viserio/Bridge/Phpstan/Tests/Type/Viserio/Container/DynamicReturnTypeExtensionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Phpstan\Tests\Type\Viserio\Container; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class DynamicReturnTypeExtensionTest extends AbstractExtensionTestCase { @@ -79,9 +80,6 @@ public function testIsMethodSupported(): void /** * @dataProvider provideGetTypeFromMethodCallCases - * - * @param string $expression - * @param string $type */ public function testGetTypeFromMethodCall(string $expression, string $type): void { diff --git a/src/Viserio/Bridge/Phpstan/Type/Viserio/Container/DynamicReturnTypeExtension.php b/src/Viserio/Bridge/Phpstan/Type/Viserio/Container/DynamicReturnTypeExtension.php index a4d1c7a99..1e74fddcd 100644 --- a/src/Viserio/Bridge/Phpstan/Type/Viserio/Container/DynamicReturnTypeExtension.php +++ b/src/Viserio/Bridge/Phpstan/Type/Viserio/Container/DynamicReturnTypeExtension.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Phpstan\Type\Viserio\Container; @@ -106,10 +106,6 @@ public function getTypeFromMethodCall( /** * Get the correct Definition Interface out of given class. - * - * @param string $class - * - * @return string */ private function resolveClassDefinition(string $class): string { diff --git a/src/Viserio/Bridge/Phpstan/composer.json b/src/Viserio/Bridge/Phpstan/composer.json index 883514f7a..261f73f1d 100644 --- a/src/Viserio/Bridge/Phpstan/composer.json +++ b/src/Viserio/Bridge/Phpstan/composer.json @@ -29,10 +29,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev" }, "extra": { diff --git a/src/Viserio/Bridge/Phpstan/phpunit.xml b/src/Viserio/Bridge/Phpstan/phpunit.xml new file mode 100644 index 000000000..12af8528d --- /dev/null +++ b/src/Viserio/Bridge/Phpstan/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Bridge/Phpstan/phpunit.xml.dist b/src/Viserio/Bridge/Phpstan/phpunit.xml.dist deleted file mode 100644 index b8cb01b8c..000000000 --- a/src/Viserio/Bridge/Phpstan/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Bridge/Twig/.gitignore b/src/Viserio/Bridge/Twig/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Bridge/Twig/.gitignore +++ b/src/Viserio/Bridge/Twig/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Bridge/Twig/Command/DebugCommand.php b/src/Viserio/Bridge/Twig/Command/DebugCommand.php index f21fd63ca..a291f591f 100644 --- a/src/Viserio/Bridge/Twig/Command/DebugCommand.php +++ b/src/Viserio/Bridge/Twig/Command/DebugCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Command; @@ -59,8 +59,6 @@ class DebugCommand extends AbstractCommand /** * Create a DebugCommand instance. - * - * @param \Twig\Environment $environment */ public function __construct(Environment $environment) { @@ -124,13 +122,10 @@ public function handle(): int /** * Get twig metadata. * - * @param string $type * @param \Twig\Extension\GlobalsInterface|\Twig\TwigFilter|\Twig\TwigFunction|\Twig\TwigTest $entity * * @throws UnexpectedValueException * @throws ReflectionException - * - * @return mixed */ private function getMetadata(string $type, $entity) { @@ -199,10 +194,7 @@ private function getMetadata(string $type, $entity) /** * Transform metadata. * - * @param string $type * @param \Twig\Extension\GlobalsInterface|\Twig\TwigFilter|\Twig\TwigFunction|\Twig\TwigTest $entity - * - * @return string */ private function getPrettyMetadata(string $type, $entity): string { @@ -241,10 +233,6 @@ private function getPrettyMetadata(string $type, $entity): string /** * Get the loader paths. - * - * @param \Twig\Environment $twig - * - * @return array */ private function getLoaderPaths(Environment $twig): array { @@ -274,10 +262,6 @@ private function getLoaderPaths(Environment $twig): array /** * Build configured path table. - * - * @param array $loaderPaths - * - * @return array */ private function buildTableRows(array $loaderPaths): array { diff --git a/src/Viserio/Bridge/Twig/Command/LintCommand.php b/src/Viserio/Bridge/Twig/Command/LintCommand.php index f85c2b6d1..fa121a2fc 100644 --- a/src/Viserio/Bridge/Twig/Command/LintCommand.php +++ b/src/Viserio/Bridge/Twig/Command/LintCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Command; @@ -57,8 +57,6 @@ class LintCommand extends AbstractCommand /** * Create a DebugCommand instance. - * - * @param \Twig\Environment $environment */ public function __construct(Environment $environment) { @@ -117,8 +115,6 @@ public function handle(): int * * @param array $files array of files to check * @param array $directories array of directories to get the files from - * - * @return array */ protected function getFiles(array $files, array $directories): array { @@ -140,8 +136,6 @@ protected function getFiles(array $files, array $directories): array * Get a finder instance of Twig files in the specified directories. * * @param array $paths paths to search for files in - * - * @return iterable */ protected function getFinder(array $paths): iterable { @@ -165,10 +159,7 @@ protected function getFinder(array $paths): iterable * Validate the template. * * @param string $template twig template - * @param string $file * @param bool $showDeprecations - * - * @return array */ protected function validate(string $template, string $file, $showDeprecations): array { @@ -213,8 +204,6 @@ protected function validate(string $template, string $file, $showDeprecations): * @param string $format Format to output the results in. Supports txt or json. * * @throws InvalidArgumentException thrown for an unknown format - * - * @return int */ protected function display(array $details, string $format = 'txt'): int { @@ -235,9 +224,6 @@ protected function display(array $details, string $format = 'txt'): int * Output the results as text. * * @param array $details validation results from all linted files - * @param bool $verbose - * - * @return int */ protected function displayText(array $details, bool $verbose = false): int { @@ -274,8 +260,6 @@ protected function displayText(array $details, bool $verbose = false): int * Output the results as json. * * @param array $details validation results from all linted files - * - * @return int */ protected function displayJson(array $details): int { @@ -307,8 +291,6 @@ static function (array &$info) use (&$errors): void { * Output the error to the console. * * @param array $info details for the file that failed to be linted - * - * @return void */ protected function renderException(array $info): void { @@ -341,8 +323,6 @@ protected function renderException(array $info): void * @param string $template contents of Twig template * @param int $line line where the exception occurred * @param int $context number of lines around the line where the exception occurred - * - * @return array */ protected function getContext(string $template, $line, int $context = 3): array { @@ -362,12 +342,7 @@ protected function getContext(string $template, $line, int $context = 3): array /** * Undocumented function. * - * @param string $dir - * @param array $foundFiles - * * @throws \RuntimeException - * - * @return void */ private function findTwigFiles(string $dir, array &$foundFiles): void { diff --git a/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeDataCollectorsServiceProvider.php b/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeDataCollectorsServiceProvider.php index 508b376b1..fb626bdbe 100644 --- a/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeDataCollectorsServiceProvider.php +++ b/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeDataCollectorsServiceProvider.php @@ -3,124 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Twig\Environment as TwigEnvironment; -// use Twig\Extension\ProfilerExtension; -// use Twig\Profiler\Profile; -// use Viserio\Bridge\Twig\DataCollector\TwigDataCollector; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// // class TwigBridgeDataCollectorsServiceProvider implements // ServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return [ -// Profile::class => static function (): Profile { -// return new Profile(); -// }, -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// TwigEnvironment::class => [self::class, 'extendTwigEnvironment'], -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'twig' => false, -// ], -// ]; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['twig'] === true) { -// $profiler->addCollector(new TwigDataCollector( -// $container->get(Profile::class), -// $container->get(TwigEnvironment::class) -// )); -// } -// } -// -// return $profiler; -// } -// -// /** -// * Wrap Twig Environment. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Twig\Environment $twig -// * -// * @return null|\Twig\Environment -// */ -// public static function extendTwigEnvironment( -// ContainerInterface $container, -// ?TwigEnvironment $twig = null -// ): ?TwigEnvironment { -// if ($twig !== null) { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['twig'] === true) { -// $twig->addExtension(new ProfilerExtension( -// $container->get(Profile::class) -// )); -// } -// } -// -// return $twig; -// } -// } diff --git a/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeServiceProvider.php b/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeServiceProvider.php index e03aec4f7..b95bd16ee 100644 --- a/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeServiceProvider.php +++ b/src/Viserio/Bridge/Twig/Container/Provider/TwigBridgeServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Container\Provider; diff --git a/src/Viserio/Bridge/Twig/DataCollector/TwigDataCollector.php b/src/Viserio/Bridge/Twig/DataCollector/TwigDataCollector.php index b1d2c8f24..cb020c031 100644 --- a/src/Viserio/Bridge/Twig/DataCollector/TwigDataCollector.php +++ b/src/Viserio/Bridge/Twig/DataCollector/TwigDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\DataCollector; @@ -51,9 +51,6 @@ class TwigDataCollector extends AbstractDataCollector implements AssetAwareContr /** * Create new twig collector instance. - * - * @param \Twig\Profiler\Profile $profile - * @param \Twig\Environment $twigEnvironment */ public function __construct(Profile $profile, Environment $twigEnvironment) { @@ -63,8 +60,6 @@ public function __construct(Profile $profile, Environment $twigEnvironment) /** * Get twig profile. - * - * @return \Twig\Profiler\Profile */ public function getProfile(): Profile { @@ -93,8 +88,6 @@ public function collect(ServerRequestInterface $serverRequest, ResponseInterface /** * Get duration time. - * - * @return float */ public function getTime(): float { @@ -103,8 +96,6 @@ public function getTime(): float /** * Get counted templates. - * - * @return int */ public function getTemplateCount(): int { @@ -113,8 +104,6 @@ public function getTemplateCount(): int /** * Get counted templates. - * - * @return array */ public function getTemplates(): array { @@ -123,8 +112,6 @@ public function getTemplates(): array /** * Get counted blocks. - * - * @return int */ public function getBlockCount(): int { @@ -133,8 +120,6 @@ public function getBlockCount(): int /** * Get counted macros. - * - * @return int */ public function getMacroCount(): int { @@ -143,8 +128,6 @@ public function getMacroCount(): int /** * List of twig file paths. - * - * @return array */ public function getTemplatePaths(): array { @@ -154,8 +137,6 @@ public function getTemplatePaths(): array /** * Get a html call graph. * - * @return \Twig\Markup - * * @codeCoverageIgnore */ public function getHtmlCallGraph(): Markup @@ -270,10 +251,6 @@ public function reset(): void /** * Get computed data. - * - * @param string $index - * - * @return mixed */ private function getComputedData(string $index) { @@ -286,10 +263,6 @@ private function getComputedData(string $index) /** * Generate Compute data. - * - * @param \Twig\Profiler\Profile $profile - * - * @return array */ private function generateComputeData(Profile $profile): array { diff --git a/src/Viserio/Bridge/Twig/Exception/RuntimeException.php b/src/Viserio/Bridge/Twig/Exception/RuntimeException.php index 1a068312e..510f7205e 100644 --- a/src/Viserio/Bridge/Twig/Exception/RuntimeException.php +++ b/src/Viserio/Bridge/Twig/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Exception; diff --git a/src/Viserio/Bridge/Twig/Extension/DumpExtension.php b/src/Viserio/Bridge/Twig/Extension/DumpExtension.php index 30f0464b5..f4186b461 100644 --- a/src/Viserio/Bridge/Twig/Extension/DumpExtension.php +++ b/src/Viserio/Bridge/Twig/Extension/DumpExtension.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Extension; @@ -50,9 +50,6 @@ class DumpExtension extends AbstractExtension /** * DumpExtension constructor. - * - * @param ClonerInterface $cloner - * @param HtmlDumper $dumper */ public function __construct(ClonerInterface $cloner, HtmlDumper $dumper) { @@ -91,12 +88,6 @@ public function getName(): string return 'Viserio_Bridge_Twig_Extension_Dump'; } - /** - * @param \Twig\Environment $env - * @param array $context - * - * @return string - */ public function dump(Environment $env, array $context): string { if (! $env->isDebug()) { diff --git a/src/Viserio/Bridge/Twig/Extension/SessionExtension.php b/src/Viserio/Bridge/Twig/Extension/SessionExtension.php index 91581e843..fea9bb5e3 100644 --- a/src/Viserio/Bridge/Twig/Extension/SessionExtension.php +++ b/src/Viserio/Bridge/Twig/Extension/SessionExtension.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Extension; @@ -28,8 +28,6 @@ class SessionExtension extends AbstractExtension /** * Create a new session extension. - * - * @param \Viserio\Contract\Session\Store $session */ public function __construct(StoreContract $session) { @@ -60,8 +58,6 @@ public function getFunctions(): array /** * Return a hidden csrf filed. - * - * @return string */ public function getCsrfField(): string { diff --git a/src/Viserio/Bridge/Twig/Extension/StrExtension.php b/src/Viserio/Bridge/Twig/Extension/StrExtension.php index 7a8388ed7..e7bf065e7 100644 --- a/src/Viserio/Bridge/Twig/Extension/StrExtension.php +++ b/src/Viserio/Bridge/Twig/Extension/StrExtension.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Extension; @@ -25,8 +25,6 @@ class StrExtension extends AbstractExtension /** * Return the string object callback. - * - * @return string */ public function getStaticClassName(): string { @@ -37,8 +35,6 @@ public function getStaticClassName(): string * Set a new string callback. * * @param string $staticClassName - * - * @return void */ public function setStaticClassName($staticClassName): void { diff --git a/src/Viserio/Bridge/Twig/Extension/TranslatorExtension.php b/src/Viserio/Bridge/Twig/Extension/TranslatorExtension.php index d19cb9dd5..c6df35045 100644 --- a/src/Viserio/Bridge/Twig/Extension/TranslatorExtension.php +++ b/src/Viserio/Bridge/Twig/Extension/TranslatorExtension.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Extension; @@ -45,7 +45,6 @@ class TranslatorExtension extends AbstractExtension /** * Create a new translator extension. * - * @param \Viserio\Contract\Translation\TranslationManager $translationManager * @param null|\Twig\NodeVisitor\NodeVisitorInterface|\Viserio\Bridge\Twig\NodeVisitor\TranslationNodeVisitor $translationNodeVisitor */ public function __construct( @@ -136,11 +135,7 @@ public function getNodeVisitors(): array /** * Get a language translator instance. * - * @param null|string $locale - * * @throws RuntimeException - * - * @return \Viserio\Contract\Translation\Translator */ public function getTranslator(?string $locale = null): TranslatorContract { diff --git a/src/Viserio/Bridge/Twig/Extractor/TwigExtractor.php b/src/Viserio/Bridge/Twig/Extractor/TwigExtractor.php index 08bc4db00..67a9ef623 100644 --- a/src/Viserio/Bridge/Twig/Extractor/TwigExtractor.php +++ b/src/Viserio/Bridge/Twig/Extractor/TwigExtractor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Extractor; @@ -74,11 +74,7 @@ public function extract($resource): array /** * Extract translations from template string. * - * @param string $template - * * @throws \Twig\Error\SyntaxError - * - * @return array */ protected function extractTemplate(string $template): array { @@ -135,10 +131,6 @@ protected function extractFromDirectory($directories): array /** * Check if file is a php file. - * - * @param string $file - * - * @return bool */ private function isTwigFile(string $file): bool { diff --git a/src/Viserio/Bridge/Twig/Node/DumpNode.php b/src/Viserio/Bridge/Twig/Node/DumpNode.php index 90d5d184f..c82bb2a7b 100644 --- a/src/Viserio/Bridge/Twig/Node/DumpNode.php +++ b/src/Viserio/Bridge/Twig/Node/DumpNode.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Node; @@ -28,11 +28,6 @@ class DumpNode extends Node /** * Create a new dump node instance. - * - * @param string $varPrefix - * @param null|\Twig\Node\Node $values - * @param int $lineno - * @param null|string $tag */ public function __construct(string $varPrefix, ?Node $values = null, int $lineno = 0, ?string $tag = null) { diff --git a/src/Viserio/Bridge/Twig/Node/TransDefaultDomainNode.php b/src/Viserio/Bridge/Twig/Node/TransDefaultDomainNode.php index 5f963fb70..44f72c957 100644 --- a/src/Viserio/Bridge/Twig/Node/TransDefaultDomainNode.php +++ b/src/Viserio/Bridge/Twig/Node/TransDefaultDomainNode.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Node; diff --git a/src/Viserio/Bridge/Twig/Node/TransNode.php b/src/Viserio/Bridge/Twig/Node/TransNode.php index 6926f31e1..3a37d5bb6 100644 --- a/src/Viserio/Bridge/Twig/Node/TransNode.php +++ b/src/Viserio/Bridge/Twig/Node/TransNode.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Node; @@ -30,12 +30,7 @@ class TransNode extends Node /** * Create a new trans node instance. * - * @param \Twig\Node\Node $body - * @param \Twig\Node\Node $domain - * @param null|\Twig\Node\Expression\AbstractExpression $vars - * @param null|\Twig\Node\Expression\AbstractExpression $locale - * @param int $lineNumber - * @param null|string $tag + * @param \Twig\Node\Node $domain */ public function __construct( Node $body, @@ -124,12 +119,6 @@ public function compile(Compiler $compiler): void /** * Compile string with given variables. - * - * @param \Twig\Node\Node $body - * @param \Twig\Node\Expression\ArrayExpression $vars - * @param bool $ignoreStrictCheck - * - * @return array */ protected function compileString(Node $body, ArrayExpression $vars, bool $ignoreStrictCheck = false): array { diff --git a/src/Viserio/Bridge/Twig/NodeVisitor/Scope.php b/src/Viserio/Bridge/Twig/NodeVisitor/Scope.php index 9ef84c00f..c686942ef 100644 --- a/src/Viserio/Bridge/Twig/NodeVisitor/Scope.php +++ b/src/Viserio/Bridge/Twig/NodeVisitor/Scope.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\NodeVisitor; @@ -31,8 +31,6 @@ class Scope /** * Create a new Scope instance. - * - * @param null|self $parent */ public function __construct(?self $parent = null) { @@ -41,8 +39,6 @@ public function __construct(?self $parent = null) /** * Opens a new child scope. - * - * @return self */ public function enter(): self { @@ -51,8 +47,6 @@ public function enter(): self /** * Closes current scope and returns parent one. - * - * @return null|self */ public function leave(): ?self { @@ -64,9 +58,6 @@ public function leave(): ?self /** * Stores data into current scope. * - * @param string $key - * @param mixed $value - * * @throws LogicException * * @return $this @@ -84,10 +75,6 @@ public function set(string $key, $value) /** * Tests if a data is visible from current scope. - * - * @param string $key - * - * @return bool */ public function has(string $key): bool { @@ -104,11 +91,6 @@ public function has(string $key): bool /** * Returns data visible from current scope. - * - * @param string $key - * @param mixed $default - * - * @return mixed */ public function get(string $key, $default = null) { diff --git a/src/Viserio/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Viserio/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index ee6f8f831..f6d416a6d 100644 --- a/src/Viserio/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Viserio/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\NodeVisitor; @@ -120,11 +120,6 @@ protected function doLeaveNode(Node $node, Environment $env) return $node; } - /** - * @param mixed $arguments - * - * @return bool - */ private function isNamedArguments($arguments): bool { foreach ($arguments as $name => $node) { @@ -136,9 +131,6 @@ private function isNamedArguments($arguments): bool return false; } - /** - * @return string - */ private function getVarName(): string { return \sprintf('__internal_%s', \hash('sha256', \uniqid((string) \mt_rand(), true), false)); diff --git a/src/Viserio/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Viserio/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index a9940d52d..f8b6d1b30 100644 --- a/src/Viserio/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Viserio/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\NodeVisitor; @@ -47,8 +47,6 @@ class TranslationNodeVisitor extends AbstractNodeVisitor /** * Get a list of messages. - * - * @return array */ public function getMessages(): array { @@ -57,8 +55,6 @@ public function getMessages(): array /** * Enable node and clear messages. - * - * @return void */ public function enable(): void { @@ -68,8 +64,6 @@ public function enable(): void /** * Disable node and clear messages. - * - * @return void */ public function disable(): void { @@ -124,11 +118,6 @@ protected function doLeaveNode(Node $node, Environment $env): Node /** * Read the translation domain from given arguments. - * - * @param \Twig\Node\Node $arguments - * @param string $index - * - * @return null|string */ private function getReadDomainFromArguments(Node $arguments, string $index): ?string { @@ -145,10 +134,6 @@ private function getReadDomainFromArguments(Node $arguments, string $index): ?st /** * Check if node has a domain value, else return undefined. - * - * @param \Twig\Node\Node $node - * - * @return null|string */ private function getReadDomainFromNode(Node $node): ?string { diff --git a/src/Viserio/Bridge/Twig/Tests/Command/DebugCommandTest.php b/src/Viserio/Bridge/Twig/Tests/Command/DebugCommandTest.php index 35691fa1d..a25755d1a 100644 --- a/src/Viserio/Bridge/Twig/Tests/Command/DebugCommandTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Command/DebugCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Command; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class DebugCommandTest extends MockeryTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Viserio/Bridge/Twig/Tests/Command/LintCommandTest.php index 026ccc5ff..687a7174e 100644 --- a/src/Viserio/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Command; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class LintCommandTest extends MockeryTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeDataCollectorsServiceProviderTest.php b/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeDataCollectorsServiceProviderTest.php index 94964256a..8f48c0060 100644 --- a/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeDataCollectorsServiceProviderTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeDataCollectorsServiceProviderTest.php @@ -3,98 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Twig\Environment; -// use Twig\Loader\ArrayLoader; -// use Twig\Profiler\Profile; -// use Viserio\Bridge\Twig\Provider\TwigBridgeDataCollectorsServiceProvider; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Filesystem\Provider\FilesystemServiceProvider; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// use Viserio\Component\View\Provider\ViewServiceProvider; -// ///** // * @internal // */ // final class TwigBridgeDataCollectorsServiceProviderTest extends MockeryTestCase // { -// public function testGetServices(): void -// { -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new FilesystemServiceProvider()); -// $container->register(new ViewServiceProvider()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new TwigBridgeDataCollectorsServiceProvider()); -// -// $container->bind(Environment::class, new Environment(new ArrayLoader([]))); -// -// $container->bind('config', [ -// 'viserio' => [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'twig' => true, -// ], -// ], -// 'view' => [ -// 'paths' => [ -// \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR, -// __DIR__, -// ], -// 'engines' => [ -// 'twig' => [ -// 'options' => [ -// 'debug' => true, -// ], -// 'file_extension' => 'html', -// 'templates' => [ -// 'test.html' => 'tests', -// ], -// ], -// ], -// ], -// ], -// ]); -// -// $profiler = $container->get(ProfilerContract::class); -// -// $this->assertInstanceOf(ProfilerContract::class, $profiler); -// -// $this->assertArrayHasKey('time-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('memory-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('twig-data-collector', $profiler->getCollectors()); -// -// $this->assertInstanceOf(Profile::class, $container->get(Profile::class)); -// $this->assertInstanceOf(Environment::class, $container->get(Environment::class)); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeServiceProviderTest.php b/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeServiceProviderTest.php index b989122f8..1623e2439 100644 --- a/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeServiceProviderTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Container/Provider/TwigBridgeServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Provider; @@ -34,6 +34,7 @@ * @internal * * @small + * @coversNothing */ final class TwigBridgeServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/DataCollector/TwigDataCollectorTest.php b/src/Viserio/Bridge/Twig/Tests/DataCollector/TwigDataCollectorTest.php index 43951d18a..5817160d5 100644 --- a/src/Viserio/Bridge/Twig/Tests/DataCollector/TwigDataCollectorTest.php +++ b/src/Viserio/Bridge/Twig/Tests/DataCollector/TwigDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\DataCollector; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class TwigDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/Extension/DumpExtensionTest.php b/src/Viserio/Bridge/Twig/Tests/Extension/DumpExtensionTest.php index baccea3c3..3e54527a6 100644 --- a/src/Viserio/Bridge/Twig/Tests/Extension/DumpExtensionTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Extension/DumpExtensionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Extension; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class DumpExtensionTest extends MockeryTestCase { @@ -47,14 +48,7 @@ protected function setUp(): void /** * @dataProvider provideDumpTagCases * - * @param string $template - * @param bool $debug - * @param string $expectedOutput - * @param null|array $expectedDumped - * * @throws Throwable - * - * @return void */ public function testDumpTag(string $template, bool $debug, string $expectedOutput, ?array $expectedDumped): void { @@ -96,13 +90,6 @@ public static function provideDumpTagCases(): iterable /** * @dataProvider provideDumpCases - * - * @param array $context - * @param array $args - * @param string $expectedOutput - * @param bool $debug - * - * @return void */ public function testDump(array $context, array $args, string $expectedOutput, bool $debug = true): void { diff --git a/src/Viserio/Bridge/Twig/Tests/Extension/ExtensionsIntegrationTest.php b/src/Viserio/Bridge/Twig/Tests/Extension/ExtensionsIntegrationTest.php index 4531a1e7c..92673d07d 100644 --- a/src/Viserio/Bridge/Twig/Tests/Extension/ExtensionsIntegrationTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Extension/ExtensionsIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Extension; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class ExtensionsIntegrationTest extends IntegrationTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/Extension/SessionExtensionTest.php b/src/Viserio/Bridge/Twig/Tests/Extension/SessionExtensionTest.php index 8bda6f529..d46e93bae 100644 --- a/src/Viserio/Bridge/Twig/Tests/Extension/SessionExtensionTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Extension/SessionExtensionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Extension; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class SessionExtensionTest extends MockeryTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/Extension/StrExtensionTest.php b/src/Viserio/Bridge/Twig/Tests/Extension/StrExtensionTest.php index 5729a4e4c..2f53f9d58 100644 --- a/src/Viserio/Bridge/Twig/Tests/Extension/StrExtensionTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Extension/StrExtensionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Extension; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class StrExtensionTest extends MockeryTestCase { @@ -114,9 +115,6 @@ protected function allowMockingNonExistentMethods($allow = false): void parent::allowMockingNonExistentMethods(true); } - /** - * @return StrExtension - */ protected function getString(): StrExtension { return new StrExtension(); diff --git a/src/Viserio/Bridge/Twig/Tests/Extension/TranslatorExtensionTest.php b/src/Viserio/Bridge/Twig/Tests/Extension/TranslatorExtensionTest.php index 3a79ad70a..d6f9c3014 100644 --- a/src/Viserio/Bridge/Twig/Tests/Extension/TranslatorExtensionTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Extension/TranslatorExtensionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Extension; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class TranslatorExtensionTest extends MockeryTestCase { @@ -73,10 +74,6 @@ public function testTransComplexBody(): void /** * @dataProvider provideTransCases - * - * @param mixed $template - * @param mixed $expected - * @param array $variables */ public function testTrans($template, $expected, array $variables = []): void { @@ -197,10 +194,7 @@ public function testDefaultTranslationDomainWithNamedArguments(): void } /** - * @param array|string $template - * @param null|\Viserio\Component\Translation\TranslationManager $translator - * - * @return TemplateWrapper + * @param array|string $template */ private function getTemplate($template, ?TranslationManager $translator = null): TemplateWrapper { @@ -220,9 +214,6 @@ private function getTemplate($template, ?TranslationManager $translator = null): return $twig->load('index'); } - /** - * @return \Viserio\Component\Translation\TranslationManager - */ private function getTranslationManager(): TranslationManager { $translator = new TranslationManager(new IntlMessageFormatter()); diff --git a/src/Viserio/Bridge/Twig/Tests/Extractor/TwigExtractorTest.php b/src/Viserio/Bridge/Twig/Tests/Extractor/TwigExtractorTest.php index cf84f0c56..d9f43235a 100644 --- a/src/Viserio/Bridge/Twig/Tests/Extractor/TwigExtractorTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Extractor/TwigExtractorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Extractor; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class TwigExtractorTest extends MockeryTestCase { @@ -48,9 +49,6 @@ protected function setUp(): void /** * @dataProvider provideExtractCases - * - * @param mixed $template - * @param mixed $messages */ public function testExtract($template, $messages): void { @@ -103,9 +101,6 @@ public static function provideExtractCases(): iterable /** * @dataProvider provideExtractSyntaxErrorCases - * - * @param mixed $resources - * @param string $dir */ public function testExtractSyntaxError($resources, string $dir): void { @@ -135,8 +130,6 @@ public static function provideExtractSyntaxErrorCases(): iterable /** * @dataProvider provideExtractWithFilesCases - * - * @param mixed $resource */ public function testExtractWithFiles($resource): void { @@ -171,9 +164,6 @@ public static function provideExtractWithFilesCases(): iterable ]; } - /** - * @return TwigExtractor - */ private function getTwigExtractor(): TwigExtractor { $twig = new Environment(Mockery::mock(LoaderInterface::class)); diff --git a/src/Viserio/Bridge/Twig/Tests/Node/DumpNodeTest.php b/src/Viserio/Bridge/Twig/Tests/Node/DumpNodeTest.php index b654f0410..1722d50f5 100644 --- a/src/Viserio/Bridge/Twig/Tests/Node/DumpNodeTest.php +++ b/src/Viserio/Bridge/Twig/Tests/Node/DumpNodeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\Tests\Node; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class DumpNodeTest extends MockeryTestCase { diff --git a/src/Viserio/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php b/src/Viserio/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php index e7aea61dd..d645443fd 100644 --- a/src/Viserio/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php +++ b/src/Viserio/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Tests\NodeVisitor; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class TranslationNodeVisitorTest extends MockeryTestCase { @@ -48,9 +49,6 @@ protected function setUp(): void /** * @dataProvider provideMessagesExtractionCases - * - * @param \Twig\Node\Node $node - * @param array $expectedMessages */ public function testMessagesExtraction(Node $node, array $expectedMessages): void { @@ -92,13 +90,6 @@ public static function provideMessagesExtractionCases(): iterable ]; } - /** - * @param string $message - * @param null|string $domain - * @param null|array $arguments - * - * @return \Twig\Node\Expression\FilterExpression - */ private static function getTransFilter( string $message, ?string $domain = null, @@ -119,12 +110,6 @@ private static function getTransFilter( ); } - /** - * @param string $message - * @param null|string $domain - * - * @return \Viserio\Bridge\Twig\Node\TransNode - */ private static function getTransTag(string $message, ?string $domain = null): TransNode { return new TransNode( diff --git a/src/Viserio/Bridge/Twig/TokenParser/DumpTokenParser.php b/src/Viserio/Bridge/Twig/TokenParser/DumpTokenParser.php index d8d4c29d5..edc355558 100644 --- a/src/Viserio/Bridge/Twig/TokenParser/DumpTokenParser.php +++ b/src/Viserio/Bridge/Twig/TokenParser/DumpTokenParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\TokenParser; diff --git a/src/Viserio/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php b/src/Viserio/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php index 19a400912..781e5e7fd 100644 --- a/src/Viserio/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php +++ b/src/Viserio/Bridge/Twig/TokenParser/TransDefaultDomainTokenParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\TokenParser; @@ -27,10 +27,6 @@ class TransDefaultDomainTokenParser extends AbstractTokenParser { /** * Parses a token and returns a node. - * - * @param Token $token - * - * @return Node */ public function parse(Token $token): Node { diff --git a/src/Viserio/Bridge/Twig/TokenParser/TransTokenParser.php b/src/Viserio/Bridge/Twig/TokenParser/TransTokenParser.php index 787c39364..f97afea6d 100644 --- a/src/Viserio/Bridge/Twig/TokenParser/TransTokenParser.php +++ b/src/Viserio/Bridge/Twig/TokenParser/TransTokenParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Bridge\Twig\TokenParser; @@ -33,11 +33,7 @@ class TransTokenParser extends AbstractTokenParser /** * Parses a token and returns a node. * - * @param \Twig\Token $token - * * @throws \Twig\Error\SyntaxError - * - * @return \Twig\Node\Node */ public function parse(Token $token): Node { diff --git a/src/Viserio/Bridge/Twig/composer.json b/src/Viserio/Bridge/Twig/composer.json index d2e0f514e..38d39de3f 100644 --- a/src/Viserio/Bridge/Twig/composer.json +++ b/src/Viserio/Bridge/Twig/composer.json @@ -29,10 +29,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Bridge/Twig/phpstan.neon b/src/Viserio/Bridge/Twig/phpstan.neon index 109d8f8bb..063792890 100644 --- a/src/Viserio/Bridge/Twig/phpstan.neon +++ b/src/Viserio/Bridge/Twig/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Bridge/Twig/phpunit.xml b/src/Viserio/Bridge/Twig/phpunit.xml new file mode 100644 index 000000000..90f94273d --- /dev/null +++ b/src/Viserio/Bridge/Twig/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Bridge/Twig/phpunit.xml.dist b/src/Viserio/Bridge/Twig/phpunit.xml.dist deleted file mode 100644 index 3fdb6ce3f..000000000 --- a/src/Viserio/Bridge/Twig/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Bus/.gitignore b/src/Viserio/Component/Bus/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Bus/.gitignore +++ b/src/Viserio/Component/Bus/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Bus/Container/Provider/BusServiceProvider.php b/src/Viserio/Component/Bus/Container/Provider/BusServiceProvider.php index b84b77ce4..3e12f3b43 100644 --- a/src/Viserio/Component/Bus/Container/Provider/BusServiceProvider.php +++ b/src/Viserio/Component/Bus/Container/Provider/BusServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Container\Provider; diff --git a/src/Viserio/Component/Bus/Dispatcher.php b/src/Viserio/Component/Bus/Dispatcher.php index b17761978..bf6b300fb 100644 --- a/src/Viserio/Component/Bus/Dispatcher.php +++ b/src/Viserio/Component/Bus/Dispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus; @@ -31,22 +31,16 @@ class Dispatcher implements DispatcherContract /** * The pipes to send commands through before dispatching. - * - * @var array */ protected array $pipes = []; /** * All of the command-to-handler mappings. - * - * @var array */ protected array $mappings = []; /** * The method to call on handler. - * - * @var string */ protected string $method = 'handle'; @@ -59,8 +53,6 @@ class Dispatcher implements DispatcherContract /** * Create a new command dispatcher instance. - * - * @param \Psr\Container\ContainerInterface $container */ public function __construct(ContainerInterface $container) { @@ -167,12 +159,7 @@ public function pipeThrough(array $pipes): DispatcherContract /** * Get the given handler segment for the given command. * - * @param object $command - * @param int $segment - * * @throws \Viserio\Contract\Bus\Exception\InvalidArgumentException - * - * @return string */ protected function inflectSegment(object $command, int $segment): string { diff --git a/src/Viserio/Component/Bus/QueueingDispatcher.php b/src/Viserio/Component/Bus/QueueingDispatcher.php index 349d35d44..4d47f8e5a 100644 --- a/src/Viserio/Component/Bus/QueueingDispatcher.php +++ b/src/Viserio/Component/Bus/QueueingDispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus; @@ -32,9 +32,6 @@ class QueueingDispatcher extends Dispatcher implements QueueingDispatcherContrac /** * Create a new queue command dispatcher instance. - * - * @param \Psr\Container\ContainerInterface $container - * @param null|Closure $queueResolver */ public function __construct(ContainerInterface $container, ?Closure $queueResolver = null) { @@ -80,11 +77,6 @@ public function dispatchToQueue($command) /** * Push the command onto the given queue instance. - * - * @param \Viserio\Contract\Queue\QueueConnector $queue - * @param mixed $command - * - * @return mixed */ protected function pushCommandToQueue(QueueContract $queue, $command) { @@ -105,10 +97,6 @@ protected function pushCommandToQueue(QueueContract $queue, $command) /** * Determine if the given command should be queued. - * - * @param mixed $command - * - * @return bool */ protected function commandShouldBeQueued($command): bool { diff --git a/src/Viserio/Component/Bus/Tests/AbstractDispatcherTest.php b/src/Viserio/Component/Bus/Tests/AbstractDispatcherTest.php index 0b4b317f1..2905ccf8c 100644 --- a/src/Viserio/Component/Bus/Tests/AbstractDispatcherTest.php +++ b/src/Viserio/Component/Bus/Tests/AbstractDispatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests; diff --git a/src/Viserio/Component/Bus/Tests/Container/Provider/BusServiceProviderTest.php b/src/Viserio/Component/Bus/Tests/Container/Provider/BusServiceProviderTest.php index 97f5a8e3c..65c7a0f5a 100644 --- a/src/Viserio/Component/Bus/Tests/Container/Provider/BusServiceProviderTest.php +++ b/src/Viserio/Component/Bus/Tests/Container/Provider/BusServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Container\Provider; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class BusServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Bus/Tests/DispatcherTest.php b/src/Viserio/Component/Bus/Tests/DispatcherTest.php index 05ff2532e..5ec9cddb2 100644 --- a/src/Viserio/Component/Bus/Tests/DispatcherTest.php +++ b/src/Viserio/Component/Bus/Tests/DispatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class DispatcherTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherBasicCommand.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherBasicCommand.php index 33e1c1956..bec29e44e 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherBasicCommand.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherBasicCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherCustomQueueCommand.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherCustomQueueCommand.php index 12a8ff220..71a24c3a8 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherCustomQueueCommand.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherCustomQueueCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherQueuedHandler.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherQueuedHandler.php index a4101d3df..74e12df58 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherQueuedHandler.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherQueuedHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSetCommand.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSetCommand.php index 49923e252..61de8d544 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSetCommand.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSetCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificDelayCommand.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificDelayCommand.php index c5220e5b1..a09d578b3 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificDelayCommand.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificDelayCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueAndDelayCommand.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueAndDelayCommand.php index 1b8ba1c89..0a3e5588b 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueAndDelayCommand.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueAndDelayCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueCommand.php b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueCommand.php index c0c78fddb..44f9b7108 100644 --- a/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueCommand.php +++ b/src/Viserio/Component/Bus/Tests/Fixture/BusDispatcherSpecificQueueCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests\Fixture; diff --git a/src/Viserio/Component/Bus/Tests/QueueingDispatcherTest.php b/src/Viserio/Component/Bus/Tests/QueueingDispatcherTest.php index c80600613..0fe4f690e 100644 --- a/src/Viserio/Component/Bus/Tests/QueueingDispatcherTest.php +++ b/src/Viserio/Component/Bus/Tests/QueueingDispatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Bus\Tests; @@ -33,6 +33,7 @@ * @internal * * @small + * @coversNothing */ final class QueueingDispatcherTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Bus/composer.json b/src/Viserio/Component/Bus/composer.json index e75a592cc..7b109de6f 100644 --- a/src/Viserio/Component/Bus/composer.json +++ b/src/Viserio/Component/Bus/composer.json @@ -37,10 +37,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" }, diff --git a/src/Viserio/Component/Bus/phpstan.neon b/src/Viserio/Component/Bus/phpstan.neon index 16c8b5052..61515b892 100644 --- a/src/Viserio/Component/Bus/phpstan.neon +++ b/src/Viserio/Component/Bus/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Bus/phpunit.xml b/src/Viserio/Component/Bus/phpunit.xml new file mode 100644 index 000000000..50fbbc3cd --- /dev/null +++ b/src/Viserio/Component/Bus/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Bus/phpunit.xml.dist b/src/Viserio/Component/Bus/phpunit.xml.dist deleted file mode 100644 index 98ca8b063..000000000 --- a/src/Viserio/Component/Bus/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Cache/.gitignore b/src/Viserio/Component/Cache/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Cache/.gitignore +++ b/src/Viserio/Component/Cache/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Cache/CacheManager.php b/src/Viserio/Component/Cache/CacheManager.php index e30aa2b30..57646675d 100644 --- a/src/Viserio/Component/Cache/CacheManager.php +++ b/src/Viserio/Component/Cache/CacheManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cache; @@ -89,10 +89,6 @@ public function createDriver(array $config) /** * Create an instance of the Array cache driver. - * - * @param array $config - * - * @return \Cache\Adapter\PHPArray\ArrayCachePool */ protected function createArrayDriver(array $config): ArrayCachePool { @@ -102,13 +98,9 @@ protected function createArrayDriver(array $config): ArrayCachePool /** * Create an instance of the MongoDB cache driver. * - * @param array $config - * * @throws \MongoDB\Driver\Exception\RuntimeException * @throws \MongoDB\Driver\Exception\InvalidArgumentException * - * @return \Cache\Adapter\MongoDB\MongoDBCachePool - * * @codeCoverageIgnore */ protected function createMongodbDriver(array $config): MongoDBCachePool @@ -137,10 +129,6 @@ protected function createMongodbDriver(array $config): MongoDBCachePool /** * Create an instance of the Redis cache driver. * - * @param array $config - * - * @return \Cache\Adapter\Redis\RedisCachePool - * * @codeCoverageIgnore */ protected function createRedisDriver(array $config): RedisCachePool @@ -154,10 +142,6 @@ protected function createRedisDriver(array $config): RedisCachePool /** * Create an instance of the Predis cache driver. * - * @param array $config - * - * @return \Cache\Adapter\Predis\PredisCachePool - * * @codeCoverageIgnore */ protected function createPredisDriver(array $config): PredisCachePool @@ -169,10 +153,6 @@ protected function createPredisDriver(array $config): PredisCachePool /** * Create an instance of the Flysystem cache driver. - * - * @param array $config - * - * @return \Cache\Adapter\Filesystem\FilesystemCachePool */ protected function createFilesystemDriver(array $config): FilesystemCachePool { @@ -184,10 +164,6 @@ protected function createFilesystemDriver(array $config): FilesystemCachePool /** * Create an instance of the Memcached cache driver. * - * @param array $config - * - * @return \Cache\Adapter\Memcached\MemcachedCachePool - * * @codeCoverageIgnore */ protected function createMemcachedDriver(array $config): MemcachedCachePool @@ -201,10 +177,6 @@ protected function createMemcachedDriver(array $config): MemcachedCachePool /** * Create an instance of the Memcache cache driver. * - * @param array $config - * - * @return \Cache\Adapter\Memcache\MemcacheCachePool - * * @codeCoverageIgnore */ protected function createMemcacheDriver(array $config): MemcacheCachePool @@ -217,10 +189,6 @@ protected function createMemcacheDriver(array $config): MemcacheCachePool /** * Create an instance of the Void cache driver. - * - * @param array $config - * - * @return \Cache\Adapter\Void\VoidCachePool */ protected function createNullDriver(array $config): VoidCachePool { @@ -229,11 +197,6 @@ protected function createNullDriver(array $config): VoidCachePool /** * Create a prefixed cache pool with a namespace. - * - * @param \Cache\Hierarchy\HierarchicalPoolInterface $hierarchyPool - * @param string $namespace - * - * @return \Cache\Namespaced\NamespacedCachePool */ protected function getNamespacedPool( HierarchicalPoolInterface $hierarchyPool, diff --git a/src/Viserio/Component/Cache/Container/Provider/CacheServiceProvider.php b/src/Viserio/Component/Cache/Container/Provider/CacheServiceProvider.php index 798409ec6..6855c1864 100644 --- a/src/Viserio/Component/Cache/Container/Provider/CacheServiceProvider.php +++ b/src/Viserio/Component/Cache/Container/Provider/CacheServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cache\Container\Provider; diff --git a/src/Viserio/Component/Cache/Tests/CacheManagerTest.php b/src/Viserio/Component/Cache/Tests/CacheManagerTest.php index e6e94d51b..ded8e85cc 100644 --- a/src/Viserio/Component/Cache/Tests/CacheManagerTest.php +++ b/src/Viserio/Component/Cache/Tests/CacheManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cache\Tests; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class CacheManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Cache/Tests/Container/Provider/CacheServiceProviderTest.php b/src/Viserio/Component/Cache/Tests/Container/Provider/CacheServiceProviderTest.php index d00719876..005cdf9d0 100644 --- a/src/Viserio/Component/Cache/Tests/Container/Provider/CacheServiceProviderTest.php +++ b/src/Viserio/Component/Cache/Tests/Container/Provider/CacheServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cache\Tests\Container\Provider; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class CacheServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Cache/composer.json b/src/Viserio/Component/Cache/composer.json index 849f1b6ec..2581f8391 100644 --- a/src/Viserio/Component/Cache/composer.json +++ b/src/Viserio/Component/Cache/composer.json @@ -54,10 +54,9 @@ "cache/filesystem-adapter": "^1.0.0", "cache/namespaced-cache": "^1.0.0", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" }, diff --git a/src/Viserio/Component/Cache/phpstan.neon b/src/Viserio/Component/Cache/phpstan.neon index ca38f49f6..5550aecaf 100644 --- a/src/Viserio/Component/Cache/phpstan.neon +++ b/src/Viserio/Component/Cache/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled # Classes of php-cache are used diff --git a/src/Viserio/Component/Cache/phpunit.xml b/src/Viserio/Component/Cache/phpunit.xml new file mode 100644 index 000000000..387f44533 --- /dev/null +++ b/src/Viserio/Component/Cache/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Cache/phpunit.xml.dist b/src/Viserio/Component/Cache/phpunit.xml.dist deleted file mode 100644 index 75bc0f647..000000000 --- a/src/Viserio/Component/Cache/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Config/.changelog b/src/Viserio/Component/Config/.changelog index 66acb3069..2dfcf57ad 100644 --- a/src/Viserio/Component/Config/.changelog +++ b/src/Viserio/Component/Config/.changelog @@ -8,6 +8,6 @@ return [ 'narrowspark', 'framework', 'v' . \Viserio\Component\Foundation\AbstractKernel::VERSION, - ['Component: Options Resolver'] + ['Component: Config'] ) ]; diff --git a/src/Viserio/Component/Config/.gitignore b/src/Viserio/Component/Config/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Config/.gitignore +++ b/src/Viserio/Component/Config/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Config/Command/ConfigDumpCommand.php b/src/Viserio/Component/Config/Command/ConfigDumpCommand.php index b8a9af0b5..116fe82a0 100644 --- a/src/Viserio/Component/Config/Command/ConfigDumpCommand.php +++ b/src/Viserio/Component/Config/Command/ConfigDumpCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Command; @@ -104,12 +104,6 @@ public function handle(): int /** * Put the created content to file. - * - * @param string $file - * @param string $content - * @param string $key - * - * @return void */ private function putContentToFile(string $file, string $content, string $key): void { @@ -154,26 +148,20 @@ public function __construct(ConfigDumpCommand $command) } /** - * Read the mandatory options and ask for the value. - * - * @param string $className - * @param array $dimensions - * @param array $mandatoryOptions - * - * @return array + * Read the mandatory config and ask for the value. */ - protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryOptions): array + protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryConfig): array { - $options = []; + $config = []; - foreach ($mandatoryOptions as $key => $mandatoryOption) { + foreach ($mandatoryConfig as $key => $mandatoryOption) { if (! \is_scalar($mandatoryOption)) { - $options[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryOptions[$key]); + $config[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryConfig[$key]); continue; } - $options[$mandatoryOption] = $this->command->ask( + $config[$mandatoryOption] = $this->command->ask( \sprintf( '%s: Please enter the following mandatory value for [%s]', $className, @@ -182,7 +170,7 @@ protected function readMandatoryOption(string $className, array $dimensions, arr ); } - return $options; + return $config; } }; } @@ -192,10 +180,6 @@ protected function readMandatoryOption(string $className, array $dimensions, arr * Scope isolated include. * * Prevents access to $this/self from included files. - * - * @param string $file - * - * @return array */ function includeFile(string $file): array { diff --git a/src/Viserio/Component/Config/Command/ConfigReader.php b/src/Viserio/Component/Config/Command/ConfigReader.php index 3d41cb440..cbcf85015 100644 --- a/src/Viserio/Component/Config/Command/ConfigReader.php +++ b/src/Viserio/Component/Config/Command/ConfigReader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Command; @@ -21,18 +21,13 @@ class ConfigReader { - /** - * @param ReflectionClass $reflectionClass - * - * @return array - */ public function readConfig(ReflectionClass $reflectionClass): array { $interfaces = \array_flip($reflectionClass->getInterfaceNames()); if (isset($interfaces[RequiresConfigContract::class])) { $dimensions = []; - $defaultOptions = []; + $defaultConfig = []; $key = null; $class = $reflectionClass->getName(); @@ -42,16 +37,16 @@ public function readConfig(ReflectionClass $reflectionClass): array } if (isset($interfaces[ProvidesDefaultConfigContract::class])) { - $defaultOptions = $class::getDefaultConfig(); + $defaultConfig = $class::getDefaultConfig(); } if (isset($interfaces[RequiresMandatoryConfigContract::class])) { $config = \array_merge_recursive( - $defaultOptions, + $defaultConfig, $this->readMandatoryOption($class, $dimensions, $class::getMandatoryConfig()) ); } else { - $config = $defaultOptions; + $config = $defaultConfig; } if (\count($dimensions) !== 0) { @@ -69,38 +64,27 @@ public function readConfig(ReflectionClass $reflectionClass): array } /** - * Read the mandatory options. - * - * @param string $className - * @param array $dimensions - * @param array $mandatoryOptions - * - * @return array + * Read the mandatory config. */ - protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryOptions): array + protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryConfig): array { - $options = []; + $config = []; - foreach ($mandatoryOptions as $key => $mandatoryOption) { + foreach ($mandatoryConfig as $key => $mandatoryOption) { if (! \is_scalar($mandatoryOption)) { - $options[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryOptions[$key]); + $config[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryConfig[$key]); continue; } - $options[$mandatoryOption] = null; + $config[$mandatoryOption] = null; } - return $options; + return $config; } /** * Builds a multidimensional config array. - * - * @param array $dimensions - * @param mixed $value - * - * @return array */ private function buildMultidimensionalArray(array $dimensions, $value): array { diff --git a/src/Viserio/Component/Config/Command/ConfigReaderCommand.php b/src/Viserio/Component/Config/Command/ConfigReaderCommand.php index e838b9091..4d314d80a 100644 --- a/src/Viserio/Component/Config/Command/ConfigReaderCommand.php +++ b/src/Viserio/Component/Config/Command/ConfigReaderCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Command; @@ -35,7 +35,7 @@ class ConfigReaderCommand extends AbstractCommand /** * {@inheritdoc} */ - protected $description = 'Reads the provided configuration file and displays options for the provided class name.'; + protected $description = 'Reads the provided configuration file and displays config for the provided class name.'; /** * {@inheritdoc} diff --git a/src/Viserio/Component/Config/ConfigurationDefaultIterator.php b/src/Viserio/Component/Config/ConfigurationDefaultIterator.php index 17d310611..d72abe771 100644 --- a/src/Viserio/Component/Config/ConfigurationDefaultIterator.php +++ b/src/Viserio/Component/Config/ConfigurationDefaultIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config; @@ -22,9 +22,6 @@ class ConfigurationDefaultIterator extends IteratorIterator { /** * Create a new ConfigurationDefaultIterator instance. - * - * @param string $class - * @param Traversable $iterator */ public function __construct(string $class, Traversable $iterator) { diff --git a/src/Viserio/Component/Config/ConfigurationDeprecatedIterator.php b/src/Viserio/Component/Config/ConfigurationDeprecatedIterator.php index 59edf017a..d2dc7294b 100644 --- a/src/Viserio/Component/Config/ConfigurationDeprecatedIterator.php +++ b/src/Viserio/Component/Config/ConfigurationDeprecatedIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config; @@ -22,9 +22,6 @@ class ConfigurationDeprecatedIterator extends IteratorIterator { /** * Create a new ConfigurationDeprecatedIterator instance. - * - * @param string $class - * @param Traversable $iterator */ public function __construct(string $class, Traversable $iterator) { @@ -41,11 +38,7 @@ public function __construct(string $class, Traversable $iterator) /** * Check if deprecated keys can be found. * - * @param string $class - * @param array $deprecatedConfigs * @param array|Traversable $config - * - * @return void */ private function validateDeprecatedKeys(string $class, array $deprecatedConfigs, $config): void { diff --git a/src/Viserio/Component/Config/ConfigurationDimensionsIterator.php b/src/Viserio/Component/Config/ConfigurationDimensionsIterator.php index 45b1c539a..3762da0d9 100644 --- a/src/Viserio/Component/Config/ConfigurationDimensionsIterator.php +++ b/src/Viserio/Component/Config/ConfigurationDimensionsIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config; @@ -37,10 +37,6 @@ final class ConfigurationDimensionsIterator extends IteratorIterator /** * Create a new ConfigurationDimensionsIterator instance. - * - * @param string $class - * @param Traversable $iterator - * @param null|string $id */ public function __construct(string $class, Traversable $iterator, ?string $id = null) { @@ -84,9 +80,6 @@ public function __construct(string $class, Traversable $iterator, ?string $id = parent::__construct(new ArrayIterator($array)); } - /** - * @return array - */ public function getDimensions(): array { return $this->dimensions; diff --git a/src/Viserio/Component/Config/ConfigurationIterator.php b/src/Viserio/Component/Config/ConfigurationIterator.php index 357b44247..cfbf2c338 100644 --- a/src/Viserio/Component/Config/ConfigurationIterator.php +++ b/src/Viserio/Component/Config/ConfigurationIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config; @@ -27,9 +27,7 @@ class ConfigurationIterator extends IteratorIterator /** * Create a new ConfigurationIterator instance. * - * @param string $class * @param iterable|Traversable $iterator - * @param null|string $id */ public function __construct(string $class, $iterator, ?string $id = null) { diff --git a/src/Viserio/Component/Config/ConfigurationMandatoryIterator.php b/src/Viserio/Component/Config/ConfigurationMandatoryIterator.php index 4a939d056..9a1b0e355 100644 --- a/src/Viserio/Component/Config/ConfigurationMandatoryIterator.php +++ b/src/Viserio/Component/Config/ConfigurationMandatoryIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config; @@ -23,9 +23,6 @@ class ConfigurationMandatoryIterator extends IteratorIterator { /** * Create a new ConfigurationMandatoryIterator instance. - * - * @param string $class - * @param Traversable $iterator */ public function __construct(string $class, Traversable $iterator) { @@ -49,13 +46,9 @@ public function __construct(string $class, Traversable $iterator) /** * Validate if config needs mandatory config. * - * @param array|\Traversable $iterator - * @param iterable $dimensions - * @param iterable $mandatory + * @param array|Traversable $iterator * * @throws \Viserio\Contract\Config\Exception\MandatoryConfigNotFoundException - * - * @return void */ private function validateMandatoryConfig($iterator, iterable $dimensions, iterable $mandatory): void { diff --git a/src/Viserio/Component/Config/ConfigurationValidatorIterator.php b/src/Viserio/Component/Config/ConfigurationValidatorIterator.php index c09d6c9e3..e5945f117 100644 --- a/src/Viserio/Component/Config/ConfigurationValidatorIterator.php +++ b/src/Viserio/Component/Config/ConfigurationValidatorIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config; @@ -42,9 +42,6 @@ class ConfigurationValidatorIterator extends IteratorIterator /** * Create a new ConfigurationMandatoryIterator instance. - * - * @param string $class - * @param Traversable $iterator */ public function __construct(string $class, Traversable $iterator) { @@ -59,13 +56,10 @@ public function __construct(string $class, Traversable $iterator) /** * Run a validator against given config. * - * @param string $class * @param array|callback|string> $validators * @param iterable|Traversable $config * * @throws \Viserio\Contract\Config\Exception\InvalidValidatorException - * - * @return void */ private function validateConfig(string $class, array $validators, $config): void { diff --git a/src/Viserio/Component/Config/Container/Definition/ConfigDefinition.php b/src/Viserio/Component/Config/Container/Definition/ConfigDefinition.php index 4c1888d76..15fde0d50 100644 --- a/src/Viserio/Component/Config/Container/Definition/ConfigDefinition.php +++ b/src/Viserio/Component/Config/Container/Definition/ConfigDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Container\Definition; @@ -17,8 +17,6 @@ final class ConfigDefinition { /** * Name of the config aware class. - * - * @var string */ private string $class; @@ -29,9 +27,6 @@ final class ConfigDefinition /** * Create a new ConfigDefinition instance. - * - * @param string $configClass - * @param null|string $configId */ public function __construct(string $configClass, ?string $configId = null) { @@ -41,8 +36,6 @@ public function __construct(string $configClass, ?string $configId = null) /** * Return the config aware class. - * - * @return string */ public function getClass(): string { @@ -59,17 +52,12 @@ public function getId(): ?string return $this->id; } - /** - * @return null|string - */ public function getKey(): ?string { return $this->key; } /** - * @param null|string $key - * * @return $this */ public function setKey(?string $key): self diff --git a/src/Viserio/Component/Config/Container/Pipeline/ConfigBag.php b/src/Viserio/Component/Config/Container/Pipeline/ConfigBag.php index ddd717840..81a6e97e6 100644 --- a/src/Viserio/Component/Config/Container/Pipeline/ConfigBag.php +++ b/src/Viserio/Component/Config/Container/Pipeline/ConfigBag.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Container\Pipeline; diff --git a/src/Viserio/Component/Config/Container/Pipeline/ResolveConfigDefinitionPipe.php b/src/Viserio/Component/Config/Container/Pipeline/ResolveConfigDefinitionPipe.php index ae47e9650..d956d496f 100644 --- a/src/Viserio/Component/Config/Container/Pipeline/ResolveConfigDefinitionPipe.php +++ b/src/Viserio/Component/Config/Container/Pipeline/ResolveConfigDefinitionPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Container\Pipeline; diff --git a/src/Viserio/Component/Config/Container/Provider/ConfigServiceProvider.php b/src/Viserio/Component/Config/Container/Provider/ConfigServiceProvider.php index a3c767fad..9b6d160ae 100644 --- a/src/Viserio/Component/Config/Container/Provider/ConfigServiceProvider.php +++ b/src/Viserio/Component/Config/Container/Provider/ConfigServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Container\Provider; diff --git a/src/Viserio/Component/Config/README.md b/src/Viserio/Component/Config/README.md index 870f80b1f..e4b200118 100644 --- a/src/Viserio/Component/Config/README.md +++ b/src/Viserio/Component/Config/README.md @@ -1,4 +1,4 @@ -

Viserio Options Resolver Component

+

Viserio Config Component

diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentConfiguration.php index 9873cefc3..a4c1c97bf 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentContainerIdConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentContainerIdConfiguration.php index 437e8e117..19f3396a8 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentContainerIdConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentContainerIdConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigConfiguration.php index 849a35c7b..c2e212ac0 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration.php index 36fb6841a..15381c12a 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdWithDeprecationKeyConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdWithDeprecationKeyConfiguration.php index 6aa054d3f..e88998eab 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdWithDeprecationKeyConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigMandatoryContainedIdWithDeprecationKeyConfiguration.php @@ -3,22 +3,22 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; use Viserio\Contract\Config\RequiresComponentConfigId as RequiresComponentConfigIdContract; use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; -class ConnectionComponentDefaultConfigMandatoryContainedIdWithDeprecationKeyConfiguration implements DeprecatedOptionsContract, ProvidesDefaultConfigContract, RequiresComponentConfigIdContract, RequiresMandatoryConfigContract +class ConnectionComponentDefaultConfigMandatoryContainedIdWithDeprecationKeyConfiguration implements DeprecatedConfigContract, ProvidesDefaultConfigContract, RequiresComponentConfigIdContract, RequiresMandatoryConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndEmptyMessageConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndEmptyMessageConfiguration.php index 947caf117..0f992b88c 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndEmptyMessageConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndEmptyMessageConfiguration.php @@ -3,21 +3,21 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -class ConnectionComponentDefaultConfigWithDeprecationKeyAndEmptyMessageConfiguration implements DeprecatedOptionsContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract +class ConnectionComponentDefaultConfigWithDeprecationKeyAndEmptyMessageConfiguration implements DeprecatedConfigContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndInvalidMessageConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndInvalidMessageConfiguration.php index 57c515b37..207f4df5e 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndInvalidMessageConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndInvalidMessageConfiguration.php @@ -3,21 +3,21 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -class ConnectionComponentDefaultConfigWithDeprecationKeyAndInvalidMessageConfiguration implements DeprecatedOptionsContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract +class ConnectionComponentDefaultConfigWithDeprecationKeyAndInvalidMessageConfiguration implements DeprecatedConfigContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndMessageConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndMessageConfiguration.php index 4e7e96571..79be63c14 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndMessageConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyAndMessageConfiguration.php @@ -3,21 +3,21 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -class ConnectionComponentDefaultConfigWithDeprecationKeyAndMessageConfiguration implements DeprecatedOptionsContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract +class ConnectionComponentDefaultConfigWithDeprecationKeyAndMessageConfiguration implements DeprecatedConfigContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyConfiguration.php index a0ee532cb..fede2bb5e 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithDeprecationKeyConfiguration.php @@ -3,21 +3,21 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -class ConnectionComponentDefaultConfigWithDeprecationKeyConfiguration implements DeprecatedOptionsContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract +class ConnectionComponentDefaultConfigWithDeprecationKeyConfiguration implements DeprecatedConfigContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator.php similarity index 77% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator.php index 6fd64776d..e56a66e12 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -18,7 +18,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator implements ProvidesDefaultConfigContract, +class ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator implements ProvidesDefaultConfigContract, RequiresComponentConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMultiDimensionalDeprecationKeyConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMultiDimensionalDeprecationKeyConfiguration.php index b2b275ec3..06fd34c8e 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMultiDimensionalDeprecationKeyConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentDefaultConfigWithMultiDimensionalDeprecationKeyConfiguration.php @@ -3,21 +3,21 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -class ConnectionComponentDefaultConfigWithMultiDimensionalDeprecationKeyConfiguration implements DeprecatedOptionsContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract +class ConnectionComponentDefaultConfigWithMultiDimensionalDeprecationKeyConfiguration implements DeprecatedConfigContract, ProvidesDefaultConfigContract, RequiresComponentConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryConfiguration.php index 51161c616..05aafcb58 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryContainerIdConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryContainerIdConfiguration.php index 96d4d2917..ac1b97e8c 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryContainerIdConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryContainerIdConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveArrayContainerIdConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveArrayContainerIdConfiguration.php index 15b9ba7aa..046989fdd 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveArrayContainerIdConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveArrayContainerIdConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveContainerIdConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveContainerIdConfiguration.php index db057c033..a3ece8a12 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveContainerIdConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentMandatoryRecursiveContainerIdConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentWithNotFoundDeprecationKeyConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentWithNotFoundDeprecationKeyConfiguration.php index 9a94f967d..e7ae7bbf1 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentWithNotFoundDeprecationKeyConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionComponentWithNotFoundDeprecationKeyConfiguration.php @@ -3,20 +3,20 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; -use Viserio\Contract\Config\DeprecatedConfig as DeprecatedOptionsContract; +use Viserio\Contract\Config\DeprecatedConfig as DeprecatedConfigContract; use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -class ConnectionComponentWithNotFoundDeprecationKeyConfiguration implements DeprecatedOptionsContract, RequiresComponentConfigContract +class ConnectionComponentWithNotFoundDeprecationKeyConfiguration implements DeprecatedConfigContract, RequiresComponentConfigContract { /** * {@inheritdoc}. diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigConfiguration.php index 18a975613..902147d57 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfiguration.php index 030ac8fd2..2d82e5fb3 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator.php similarity index 74% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator.php index ff5d1c466..3db39b68d 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -18,7 +18,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator implements ProvidesDefaultConfigContract, +class ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator implements ProvidesDefaultConfigContract, RequiresConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator.php similarity index 82% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator.php index 9200e677b..577d809e3 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -19,7 +19,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator implements ProvidesDefaultConfigContract, +class ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator implements ProvidesDefaultConfigContract, RequiresConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator.php similarity index 79% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator.php index c483647b7..73e6c3e0d 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -19,7 +19,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator implements ProvidesDefaultConfigContract, +class ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator implements ProvidesDefaultConfigContract, RequiresConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoValidator.php similarity index 80% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoValidator.php index 012c09821..badaa7f06 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndTwoValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -19,7 +19,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoValidator implements ProvidesDefaultConfigContract, +class ConnectionDefaultConfigWithMandatoryConfigurationAndTwoValidator implements ProvidesDefaultConfigContract, RequiresConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndValidator.php similarity index 78% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndValidator.php index 64f3914fe..a5b1afba1 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryConfigurationAndValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryConfigurationAndValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -19,7 +19,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionDefaultOptionsWithMandatoryConfigurationAndValidator implements ProvidesDefaultConfigContract, +class ConnectionDefaultConfigWithMandatoryConfigurationAndValidator implements ProvidesDefaultConfigContract, RequiresConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator.php similarity index 66% rename from src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator.php rename to src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator.php index 532fcef47..38350ff3c 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -17,7 +17,7 @@ use Viserio\Contract\Config\RequiresMandatoryConfig as RequiresMandatoryConfigContract; use Viserio\Contract\Config\RequiresValidatedConfig as RequiresValidatedConfigContract; -class ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator implements RequiresConfigContract, +class ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator implements RequiresConfigContract, RequiresMandatoryConfigContract, RequiresValidatedConfigContract { diff --git a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMoreThanOneMandatoryConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMoreThanOneMandatoryConfiguration.php index e98445ab6..e9f1f1c22 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMoreThanOneMandatoryConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ConnectionDefaultConfigWithMoreThanOneMandatoryConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/DontValidatedDefaultConfigurationFixture.php b/src/Viserio/Component/Config/Tests/Fixture/DontValidatedDefaultConfigurationFixture.php index 195810056..98c4654ee 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/DontValidatedDefaultConfigurationFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/DontValidatedDefaultConfigurationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/FlexibleComponentConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/FlexibleComponentConfiguration.php index 2c7d11b5a..ca38764ba 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/FlexibleComponentConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/FlexibleComponentConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/InvalidValidatedComponentConfigurationFixture.php b/src/Viserio/Component/Config/Tests/Fixture/InvalidValidatedComponentConfigurationFixture.php index 2017d98ea..212cf9f66 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/InvalidValidatedComponentConfigurationFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/InvalidValidatedComponentConfigurationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/Options/ConfigurationFixture.php b/src/Viserio/Component/Config/Tests/Fixture/Options/ConfigurationFixture.php index 4cc2ad608..7ea50d53e 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/Options/ConfigurationFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/Options/ConfigurationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture\Options; diff --git a/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultAndMandatoryConfigComponentConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultAndMandatoryConfigComponentConfiguration.php index 224dc2dfc..e3eeda61c 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultAndMandatoryConfigComponentConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultAndMandatoryConfigComponentConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultConfigComponentConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultConfigComponentConfiguration.php index 3cc35d4a5..2f2c49ef1 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultConfigComponentConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/PackageDefaultConfigComponentConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/PlainComponentConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/PlainComponentConfiguration.php index 58a0b8407..ba9fdea5f 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/PlainComponentConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/PlainComponentConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/UniversalContainerIdComponentConfiguration.php b/src/Viserio/Component/Config/Tests/Fixture/UniversalContainerIdComponentConfiguration.php index 36540f29f..4c0e14761 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/UniversalContainerIdComponentConfiguration.php +++ b/src/Viserio/Component/Config/Tests/Fixture/UniversalContainerIdComponentConfiguration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; @@ -26,13 +26,13 @@ class UniversalContainerIdComponentConfiguration implements ProvidesDefaultConfi ]; /** @var array */ - private static $getMandatoryOptions = [ + private static $getMandatoryConfig = [ 'params' => ['user', 'dbname'], 'driverClass', ]; /** @var array */ - private static $getDefaultOptions = [ + private static $getDefaultConfig = [ 'params' => [ 'host' => 'awesomehost', 'port' => '4444', @@ -46,12 +46,12 @@ public static function getDimensions(): iterable public static function getMandatoryConfig(): iterable { - return self::getData('getMandatoryOptions'); + return self::getData('getMandatoryConfig'); } public static function getDefaultConfig(): iterable { - return self::getData('getDefaultOptions'); + return self::getData('getDefaultConfig'); } private static function getData($name) diff --git a/src/Viserio/Component/Config/Tests/Fixture/ValidateDefaultValueOnOverwriteComponentFixture.php b/src/Viserio/Component/Config/Tests/Fixture/ValidateDefaultValueOnOverwriteComponentFixture.php index a0b8a087c..9162c62ac 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ValidateDefaultValueOnOverwriteComponentFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ValidateDefaultValueOnOverwriteComponentFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentConfigurationFixture.php b/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentConfigurationFixture.php index 995f4c803..82ed6dfb8 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentConfigurationFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentConfigurationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentWithArrayValidatorConfigurationFixture.php b/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentWithArrayValidatorConfigurationFixture.php index 94f9b5f35..bfcfcd145 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentWithArrayValidatorConfigurationFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ValidatedComponentWithArrayValidatorConfigurationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/ValidatedDimensionalComponentConfigurationFixture.php b/src/Viserio/Component/Config/Tests/Fixture/ValidatedDimensionalComponentConfigurationFixture.php index 99f3cbd87..4fe3e43d9 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/ValidatedDimensionalComponentConfigurationFixture.php +++ b/src/Viserio/Component/Config/Tests/Fixture/ValidatedDimensionalComponentConfigurationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Fixture; diff --git a/src/Viserio/Component/Config/Tests/Fixture/testing.config.php b/src/Viserio/Component/Config/Tests/Fixture/testing.config.php index 890ed36b3..39f816872 100644 --- a/src/Viserio/Component/Config/Tests/Fixture/testing.config.php +++ b/src/Viserio/Component/Config/Tests/Fixture/testing.config.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use Doctrine\DBAL\Driver\PDOMySql\Driver; diff --git a/src/Viserio/Component/Config/Tests/Integration/Container/Pipeline/ResolveConfigDefinitionPipeTest.php b/src/Viserio/Component/Config/Tests/Integration/Container/Pipeline/ResolveConfigDefinitionPipeTest.php index ac2f16208..e4c3a6522 100644 --- a/src/Viserio/Component/Config/Tests/Integration/Container/Pipeline/ResolveConfigDefinitionPipeTest.php +++ b/src/Viserio/Component/Config/Tests/Integration/Container/Pipeline/ResolveConfigDefinitionPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Integration\Container\Pipeline\Integration; diff --git a/src/Viserio/Component/Config/Tests/Integration/Container/Provider/ConfigServiceProviderTest.php b/src/Viserio/Component/Config/Tests/Integration/Container/Provider/ConfigServiceProviderTest.php index 75ec88f41..fdf7681bb 100644 --- a/src/Viserio/Component/Config/Tests/Integration/Container/Provider/ConfigServiceProviderTest.php +++ b/src/Viserio/Component/Config/Tests/Integration/Container/Provider/ConfigServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Integration\Provider; diff --git a/src/Viserio/Component/Config/Tests/Unit/Command/ConfigDumpCommandTest.php b/src/Viserio/Component/Config/Tests/Unit/Command/ConfigDumpCommandTest.php index f733c0b55..f0415df20 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Command/ConfigDumpCommandTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/Command/ConfigDumpCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Command; diff --git a/src/Viserio/Component/Config/Tests/Unit/Command/ConfigReaderCommandTest.php b/src/Viserio/Component/Config/Tests/Unit/Command/ConfigReaderCommandTest.php index 2b7dc4d62..1ce9c1919 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Command/ConfigReaderCommandTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/Command/ConfigReaderCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Command; @@ -19,7 +19,7 @@ use Viserio\Component\Config\Tests\Fixture\ConnectionComponentDefaultConfigConfiguration; use Viserio\Component\Config\Tests\Fixture\ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration; use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigConfiguration; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator; use Viserio\Component\Console\Tester\CommandTestCase; /** @@ -33,11 +33,6 @@ final class ConfigReaderCommandTest extends CommandTestCase { /** * @dataProvider provideReadCases - * - * @param string $class - * @param array $output - * - * @return void */ public function testRead(string $class, array $output): void { @@ -101,7 +96,7 @@ public static function provideReadCases(): iterable [], ], [ - ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator::class, + ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator::class, [ 'params' => [ 'host' => 'awesomehost', diff --git a/src/Viserio/Component/Config/Tests/Unit/ConfigurationDefaultIteratorTest.php b/src/Viserio/Component/Config/Tests/Unit/ConfigurationDefaultIteratorTest.php index 6ffbe10c9..373b517cd 100644 --- a/src/Viserio/Component/Config/Tests/Unit/ConfigurationDefaultIteratorTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/ConfigurationDefaultIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit; diff --git a/src/Viserio/Component/Config/Tests/Unit/ConfigurationDeprecatedIteratorTest.php b/src/Viserio/Component/Config/Tests/Unit/ConfigurationDeprecatedIteratorTest.php index 2a051a326..a8df03207 100644 --- a/src/Viserio/Component/Config/Tests/Unit/ConfigurationDeprecatedIteratorTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/ConfigurationDeprecatedIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit; diff --git a/src/Viserio/Component/Config/Tests/Unit/ConfigurationDimensionsIteratorTest.php b/src/Viserio/Component/Config/Tests/Unit/ConfigurationDimensionsIteratorTest.php index 436905549..1bac5908d 100644 --- a/src/Viserio/Component/Config/Tests/Unit/ConfigurationDimensionsIteratorTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/ConfigurationDimensionsIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit; @@ -48,11 +48,7 @@ public function testDimensionsResolvingShouldThrowAExceptionIfMandatoryConfigWit } /** - * @param string $class * @param ArrayIterator $iterator - * @param null|string $id - * - * @return IteratorIterator */ protected function getConfigurationIterator(string $class, $iterator, ?string $id = null): IteratorIterator { diff --git a/src/Viserio/Component/Config/Tests/Unit/ConfigurationIteratorTest.php b/src/Viserio/Component/Config/Tests/Unit/ConfigurationIteratorTest.php index d2e8a61a6..e4fa08c38 100644 --- a/src/Viserio/Component/Config/Tests/Unit/ConfigurationIteratorTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/ConfigurationIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit; @@ -73,11 +73,7 @@ public function testTransformArrayToIterator(): void } /** - * @param string $class * @param ArrayIterator $iterator - * @param null|string $id - * - * @return IteratorIterator */ protected function getConfigurationIterator(string $class, $iterator, ?string $id = null): IteratorIterator { diff --git a/src/Viserio/Component/Config/Tests/Unit/ConfigurationMandatoryIteratorTest.php b/src/Viserio/Component/Config/Tests/Unit/ConfigurationMandatoryIteratorTest.php index 4941af352..c67403277 100644 --- a/src/Viserio/Component/Config/Tests/Unit/ConfigurationMandatoryIteratorTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/ConfigurationMandatoryIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit; @@ -34,13 +34,6 @@ final class ConfigurationMandatoryIteratorTest extends TestCase { use ConfigurationMandatoryIteratorTestTrait; - /** - * @param string $class - * @param ArrayIterator $iterator - * @param null|string $id - * - * @return IteratorIterator - */ protected function getConfigurationIterator( string $class, ArrayIterator $iterator, diff --git a/src/Viserio/Component/Config/Tests/Unit/ConfigurationValidatorIteratorTest.php b/src/Viserio/Component/Config/Tests/Unit/ConfigurationValidatorIteratorTest.php index f1d93444b..eb1ce12dc 100644 --- a/src/Viserio/Component/Config/Tests/Unit/ConfigurationValidatorIteratorTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/ConfigurationValidatorIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit; @@ -36,13 +36,6 @@ final class ConfigurationValidatorIteratorTest extends TestCase { use ConfigurationValidatorIteratorTestTrait; - /** - * @param string $class - * @param ArrayIterator $iterator - * @param null|string $id - * - * @return IteratorIterator - */ protected function getConfigurationIterator( string $class, ArrayIterator $iterator, diff --git a/src/Viserio/Component/Config/Tests/Unit/Container/Definition/ConfigDefinitionTest.php b/src/Viserio/Component/Config/Tests/Unit/Container/Definition/ConfigDefinitionTest.php index 55c90ebf8..cb12eb6a8 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Container/Definition/ConfigDefinitionTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/Container/Definition/ConfigDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Unit\Container\Definition; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ConfigDefinitionTest extends TestCase { diff --git a/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ConfigBagTest.php b/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ConfigBagTest.php index e708c3796..08b2c6ac0 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ConfigBagTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ConfigBagTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Unit\Container\Pipeline; diff --git a/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ResolveOptionDefinitionTest.php b/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ResolveOptionDefinitionTest.php index 094ff64be..1e41a6c56 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ResolveOptionDefinitionTest.php +++ b/src/Viserio/Component/Config/Tests/Unit/Container/Pipeline/ResolveOptionDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Unit\Container\Pipeline; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ResolveOptionDefinitionTest extends TestCase { @@ -52,38 +53,12 @@ public function testProcess(): void self::assertSame(ConnectionComponentDefaultConfigConfiguration::getDefaultConfig(), $arguments[0]); } -// -// public function testDimensionsProcess(): void -// { -// $container = new ContainerBuilder(); -// $container->bind('config', [ -// 'doctrine' => [ -// 'connection' => [ -// 'foo' => 'test', -// ], -// ], -// ]); -// $container->singleton('foo', stdClass::class) -// ->addArgument(new DimensionsConfigDefinition(ConnectionComponentConfiguration::class)); -// -// $this->process($container); -// -// /** @var ObjectDefinition $definition */ -// $definition = $container->getDefinition('foo'); -// -// self::assertSame(['foo' => 'test'], $definition->getArgument(0)); -// } -// -// public function testProcessThrowException(): void -// { -// $this->expectException(NotFoundException::class); -// -// $this->process(new ContainerBuilder()); -// } - /** - * @param ContainerBuilder $container + * + * public function testDimensionsProcess(): void + * { */ + private function process(ContainerBuilder $container): void { $pipe = new ResolveConfigDefinitionPipe(); diff --git a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDefaultIteratorTestTrait.php b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDefaultIteratorTestTrait.php index c856bafc2..7a667992a 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDefaultIteratorTestTrait.php +++ b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDefaultIteratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Traits; diff --git a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDeprecatedIteratorTestTrait.php b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDeprecatedIteratorTestTrait.php index 789d1e71d..b351ed515 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDeprecatedIteratorTestTrait.php +++ b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDeprecatedIteratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Traits; @@ -62,10 +62,8 @@ public function testDeprecatedMessageResolvingShouldThrowExceptionOnNullDeprecat /** * @dataProvider provideDeprecationMessageResolvingCases * - * @param string $class - * @param null|array $expectedError - * @param array $config - * @param string $id + * @param array $config + * @param string $id */ public function testDeprecatedMessageResolving( string $class, diff --git a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDimensionsIteratorTestTrait.php b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDimensionsIteratorTestTrait.php index be3cf531d..fa7128360 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDimensionsIteratorTestTrait.php +++ b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationDimensionsIteratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Traits; @@ -61,8 +61,6 @@ public static function getDimensions(): iterable /** * @dataProvider provideConfigurationDimensionsIteratorConfigCases - * - * @param mixed $config */ public function testDimensionsResolvingShouldReturnConfigurationWithContainerId($config): void { @@ -80,8 +78,6 @@ public function testDimensionsResolvingShouldReturnConfigurationWithContainerId( /** * @dataProvider provideConfigurationDimensionsIteratorConfigCases - * - * @param mixed $config */ public function testDimensionsResolvingShouldReturnConfiguration($config): void { @@ -113,8 +109,6 @@ public function testDimensionsResolvingShouldThrowAInvalidArgumentExceptionIfCon /** * @dataProvider provideConfigurationDimensionsIteratorConfigCases - * - * @param mixed $config */ public function testDimensionsResolvingShouldThrowADimensionNotFoundExceptionIfConfigIdIsMissingWithRequiresConfigId( $config @@ -178,8 +172,6 @@ public function testDimensionsResolvingShouldThrowAUnexpectedValueExceptionIfRet /** * @dataProvider provideConfigurationDimensionsIteratorConfigCases - * - * @param mixed $config */ public function testDimensionsResolvingReturnsDataWithFlexibleDimensions($config): void { @@ -196,8 +188,6 @@ public function testDimensionsResolvingReturnsDataWithFlexibleDimensions($config /** * @dataProvider provideConfigurationDimensionsIteratorConfigCases - * - * @param mixed $config */ public function testDimensionsResolvingReturnsDataWithNoDimensions($config): void { diff --git a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationMandatoryIteratorTestTrait.php b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationMandatoryIteratorTestTrait.php index f78c14c4a..e1e4774a0 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationMandatoryIteratorTestTrait.php +++ b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationMandatoryIteratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Traits; @@ -30,8 +30,6 @@ trait ConfigurationMandatoryIteratorTestTrait { /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryResolving($config): void { @@ -48,8 +46,6 @@ public function testMandatoryResolving($config): void /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryResolvingShouldResolveWithId($config): void { @@ -68,8 +64,6 @@ public function testMandatoryResolvingShouldResolveWithId($config): void /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryResolvingShouldThrowAMandatoryConfigNotFoundExceptionIfMandatoryConfigurationIsMissing( $config @@ -88,8 +82,6 @@ public function testMandatoryResolvingShouldThrowAMandatoryConfigNotFoundExcepti /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryResolvingShouldThrowAMandatoryConfigNotFoundExceptionIfRecursiveMandatoryConfigurationIsMissing( $config @@ -108,8 +100,6 @@ public function testMandatoryResolvingShouldThrowAMandatoryConfigNotFoundExcepti /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryResolvingShouldResolveRecursiveMandatoryConfiguration($config): void { @@ -163,12 +153,10 @@ public function testMandatoryConfigResolvingShouldSupportMoreThanOneMandatoryCon /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryConfigResolvingShouldReturnDataWithProvidedDefaultConfigPart1($config): void { - $defaultOptions = ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration::getDefaultConfig(); + $defaultConfig = ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration::getDefaultConfig(); unset($config['doctrine']['connection']['orm_default']['params']['host'], $config['doctrine']['connection']['orm_default']['params']['port']); @@ -182,8 +170,8 @@ public function testMandatoryConfigResolvingShouldReturnDataWithProvidedDefaultC self::assertCount(2, $array); self::assertArrayHasKey('params', $array); - self::assertSame($array['params']['host'], $defaultOptions['params']['host']); - self::assertSame($array['params']['port'], $defaultOptions['params']['port']); + self::assertSame($array['params']['host'], $defaultConfig['params']['host']); + self::assertSame($array['params']['port'], $defaultConfig['params']['port']); self::assertSame( $array['params']['user'], $config['doctrine']['connection']['orm_default']['params']['user'] @@ -192,12 +180,10 @@ public function testMandatoryConfigResolvingShouldReturnDataWithProvidedDefaultC /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryConfigResolvingShouldReturnDataWithProvidedDefaultConfigPart2($config): void { - $defaultOptions = ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration::getDefaultConfig(); + $defaultConfig = ConnectionComponentDefaultConfigMandatoryContainedIdConfiguration::getDefaultConfig(); // remove main index key unset($config['doctrine']['connection']['orm_default']['params']); @@ -212,14 +198,12 @@ public function testMandatoryConfigResolvingShouldReturnDataWithProvidedDefaultC self::assertCount(2, $array); self::assertArrayHasKey('params', $array); - self::assertSame($array['params']['host'], $defaultOptions['params']['host']); - self::assertSame($array['params']['port'], $defaultOptions['params']['port']); + self::assertSame($array['params']['host'], $defaultConfig['params']['host']); + self::assertSame($array['params']['port'], $defaultConfig['params']['port']); } /** * @dataProvider provideConfigurationMandatoryIteratorConfigCases - * - * @param mixed $config */ public function testMandatoryConfigResolvingShouldNotOverwriteProvidedConfig($config): void { diff --git a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationValidatorIteratorTestTrait.php b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationValidatorIteratorTestTrait.php index 7ba74cb81..0bf7a4a1b 100644 --- a/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationValidatorIteratorTestTrait.php +++ b/src/Viserio/Component/Config/Tests/Unit/Traits/ConfigurationValidatorIteratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Config\Tests\Unit\Traits; @@ -17,13 +17,13 @@ use Exception; use IteratorIterator; use RuntimeException; -use Viserio\Component\Config\Tests\Fixture\ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoValidator; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryConfigurationAndValidator; -use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryConfigurationAndTwoValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryConfigurationAndValidator; +use Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator; use Viserio\Component\Config\Tests\Fixture\DontValidatedDefaultConfigurationFixture; use Viserio\Component\Config\Tests\Fixture\InvalidValidatedComponentConfigurationFixture; use Viserio\Component\Config\Tests\Fixture\ValidatedComponentConfigurationFixture; @@ -64,7 +64,7 @@ public function testValidatorResolvingShouldCallGivenValidator(): void $this->expectExceptionMessage('need to be a string'); $this->getConfigurationIterator( - ConnectionDefaultOptionsWithMandatoryConfigurationAndValidator::class, + ConnectionDefaultConfigWithMandatoryConfigurationAndValidator::class, new ArrayIterator(['driverClass' => 1]) ); } @@ -75,7 +75,7 @@ public function testValidatorResolvingShouldSupportMoreThanOneValidator(): void $this->expectExceptionMessage('need to be a string'); $this->getConfigurationIterator( - ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoValidator::class, + ConnectionDefaultConfigWithMandatoryConfigurationAndTwoValidator::class, new ArrayIterator(['driverClass' => 'foo', 'test1' => 9000]) ); } @@ -86,7 +86,7 @@ public function testValidatorResolvingShouldSupportNestedArrayValidating(): void $this->expectExceptionMessage('need to be a string'); $this->getConfigurationIterator( - ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayValidator::class, + ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayValidator::class, new ArrayIterator(['driverClass' => ['connection' => 1]]) ); } @@ -97,7 +97,7 @@ public function testValidatorResolvingShouldSupportNestedArrayValidatingWithMore $this->expectExceptionMessage('need to be a string'); $this->getConfigurationIterator( - ConnectionDefaultOptionsWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator::class, + ConnectionDefaultConfigWithMandatoryConfigurationAndTwoLevelArrayAndTwoValidator::class, new ArrayIterator([ 'driverClass' => [ 'connection' => 'foo', @@ -112,10 +112,10 @@ public function testValidatorResolvingShouldSupportNestedArrayValidatingWithMore public function testValidatorResolvingShouldCallDefaultStringValidator(): void { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Invalid configuration value provided for [driverClass]; Expected [string], but got [integer], in [' . ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator::class . '].'); + $this->expectExceptionMessage('Invalid configuration value provided for [driverClass]; Expected [string], but got [integer], in [' . ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator::class . '].'); $this->getConfigurationIterator( - ConnectionDefaultOptionsWithMandatoryConfigurationAndStringValidator::class, + ConnectionDefaultConfigWithMandatoryConfigurationAndStringValidator::class, new ArrayIterator(['driverClass' => 1]) ); } @@ -140,10 +140,10 @@ public function testValidatorResolvingShouldSkipValidationOnDefaultConfiguration public function testValidatorResolvingShouldCallStringValidatorWithSupportedDefaultConfigurationAndMandatoryConfiguration(): void { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Invalid configuration value provided for [driverClass]; Expected [string], but got [integer], in [Viserio\Component\Config\Tests\Fixture\ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator].'); + $this->expectExceptionMessage('Invalid configuration value provided for [driverClass]; Expected [string], but got [integer], in [Viserio\Component\Config\Tests\Fixture\ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator].'); $this->getConfigurationIterator( - ConnectionComponentDefaultOptionsWithMandatoryConfigurationAndStringValidator::class, + ConnectionComponentDefaultConfigWithMandatoryConfigurationAndStringValidator::class, new ArrayIterator([ 'vendor' => [ 'package' => [ @@ -289,10 +289,10 @@ public function testValidatorResolvingShouldThrowValidationExceptionOnOverwritte public function testValidatorResolvingShouldThrowExceptionOnNullValueIfStringIsRequired(): void { $this->expectException(Exception::class); - $this->expectExceptionMessage('Invalid configuration value provided for [driverClass]; Expected [string], but got [NULL], in [Viserio\Component\Config\Tests\Fixture\ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator].'); + $this->expectExceptionMessage('Invalid configuration value provided for [driverClass]; Expected [string], but got [NULL], in [Viserio\Component\Config\Tests\Fixture\ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator].'); $this->getConfigurationIterator( - ConnectionDefaultOptionsWithMandatoryNullValueConfigurationAndStringValidator::class, + ConnectionDefaultConfigWithMandatoryNullValueConfigurationAndStringValidator::class, new ArrayIterator([ 'driverClass' => null, ]) diff --git a/src/Viserio/Component/Config/composer.json b/src/Viserio/Component/Config/composer.json index 7e330af6d..4ed2bcc8e 100644 --- a/src/Viserio/Component/Config/composer.json +++ b/src/Viserio/Component/Config/composer.json @@ -1,12 +1,11 @@ { "name": "viserio/config", "type": "library", - "description": "The Viserio Options Resolver package.", + "description": "The Viserio Config package.", "keywords": [ "narrowspark", "viserio", - "options", - "option", + "config", "component", "resolver", "configuration" @@ -36,10 +35,9 @@ "require-dev": { "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "symfony/var-exporter": "^4.3.8 || ^5.0.0", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/Config/phpstan.neon b/src/Viserio/Component/Config/phpstan.neon index e76a76f23..3819ba2be 100644 --- a/src/Viserio/Component/Config/phpstan.neon +++ b/src/Viserio/Component/Config/phpstan.neon @@ -1,29 +1,20 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: - + # ignore vfs errors, @todo fix returns in vfs + - '#Call to an undefined method org\\bovigo\\vfs#' diff --git a/src/Viserio/Component/Config/phpunit.xml b/src/Viserio/Component/Config/phpunit.xml new file mode 100644 index 000000000..690c608ab --- /dev/null +++ b/src/Viserio/Component/Config/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Config/phpunit.xml.dist b/src/Viserio/Component/Config/phpunit.xml.dist deleted file mode 100644 index 642b45072..000000000 --- a/src/Viserio/Component/Config/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Console/.gitignore b/src/Viserio/Component/Console/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Console/.gitignore +++ b/src/Viserio/Component/Console/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Console/Application.php b/src/Viserio/Component/Console/Application.php index d18deb32a..0bd46d2d8 100644 --- a/src/Viserio/Component/Console/Application.php +++ b/src/Viserio/Component/Console/Application.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console; @@ -120,8 +120,6 @@ public function __construct(string $version = 'UNKNOWN', string $name = 'UNKNOWN /** * Get the output for the last run command. - * - * @return string */ public function getLastOutput(): string { @@ -135,8 +133,6 @@ public function getLastOutput(): string /** * Add a command to the console. * - * @param \Symfony\Component\Console\Command\Command $command - * * @return null|\Symfony\Component\Console\Command\Command|\Viserio\Component\Console\Command\AbstractCommand */ public function add(SymfonyCommand $command): ?SymfonyCommand @@ -162,8 +158,6 @@ public function add(SymfonyCommand $command): ?SymfonyCommand * @param array $aliases an array of aliases for the command * * @throws \Viserio\Contract\Console\Exception\InvocationException - * - * @return \Viserio\Component\Console\Command\StringCommand */ public function command(string $expression, $callable, array $aliases = []): StringCommand { @@ -178,13 +172,7 @@ public function command(string $expression, $callable, array $aliases = []): Str /** * Run an console command by name. * - * @param string $command - * @param array $parameters - * @param null|\Symfony\Component\Console\Output\OutputInterface $outputBuffer - * * @throws Throwable - * - * @return int */ public function call(string $command, array $parameters = [], ?OutputInterface $outputBuffer = null): int { @@ -225,8 +213,6 @@ public function call(string $command, array $parameters = [], ?OutputInterface $ * * @param string $commandName name of the command * @param array $argumentDefaults default argument values - * - * @return void */ public function defaults(string $commandName, array $argumentDefaults = []): void { @@ -241,10 +227,6 @@ public function defaults(string $commandName, array $argumentDefaults = []): voi /** * Register an application starting bootstrapper. - * - * @param Closure $callback - * - * @return void */ public static function starting(Closure $callback): void { @@ -253,8 +235,6 @@ public static function starting(Closure $callback): void /** * Clear the console application bootstrappers. - * - * @return void */ public static function clearBootstrappers(): void { @@ -263,8 +243,6 @@ public static function clearBootstrappers(): void /** * The PHP executable. - * - * @return string */ public static function phpBinary(): string { @@ -275,8 +253,6 @@ public static function phpBinary(): string /** * The Cerebro executable. - * - * @return string */ public static function cerebroBinary(): string { @@ -287,10 +263,6 @@ public static function cerebroBinary(): string /** * Format the given command as a fully-qualified executable command. - * - * @param string $string - * - * @return string */ public static function formatCommandString(string $string): string { @@ -301,8 +273,6 @@ public static function formatCommandString(string $string): string * Get the container instance. * * @throws \Viserio\Contract\Console\Exception\LogicException - * - * @return \Psr\Container\ContainerInterface */ public function getContainer(): ContainerInterface { @@ -428,10 +398,6 @@ public function run(?InputInterface $input = null, ?OutputInterface $output = nu * If an event dispatcher has been attached to the application, * events are also dispatched during the life-cycle of the command. * - * @param \Symfony\Component\Console\Command\Command $command - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output - * * @throws Throwable * * @return int 0 if everything went fine, or an error code @@ -491,8 +457,6 @@ protected function doRunCommand(SymfonyCommand $command, InputInterface $input, * Get the default input definitions for the applications. * * This is used to add the --env option to every available command. - * - * @return \Symfony\Component\Console\Input\InputDefinition */ protected function getDefaultInputDefinition(): InputDefinition { @@ -519,8 +483,6 @@ protected function getDefaultCommands(): array * Get the global environment option for the definition. * * @throws \Symfony\Component\Console\Exception\InvalidArgumentException - * - * @return \Viserio\Component\Console\Input\InputOption */ private function getEnvironmentOption(): InputOption { diff --git a/src/Viserio/Component/Console/Automatic/CerebroScriptExtender.php b/src/Viserio/Component/Console/Automatic/CerebroScriptExtender.php index 6a8b8dc82..a8f9ad9c8 100644 --- a/src/Viserio/Component/Console/Automatic/CerebroScriptExtender.php +++ b/src/Viserio/Component/Console/Automatic/CerebroScriptExtender.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Automatic; diff --git a/src/Viserio/Component/Console/Command/AbstractCommand.php b/src/Viserio/Component/Console/Command/AbstractCommand.php index 5df461bfe..644566de1 100644 --- a/src/Viserio/Component/Console/Command/AbstractCommand.php +++ b/src/Viserio/Component/Console/Command/AbstractCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; @@ -124,8 +124,6 @@ public function __construct() /** * Get the output implementation. * - * @return \Symfony\Component\Console\Style\SymfonyStyle - * * @codeCoverageIgnore */ public function getOutput(): SymfonyStyle @@ -137,8 +135,6 @@ public function getOutput(): SymfonyStyle * Get the verbosity level in terms of Symfony's OutputInterface level. * * @param null|int|string $level - * - * @return int */ public function getVerbosity($level = null): int { @@ -157,8 +153,6 @@ public function getVerbosity($level = null): int * Set the verbosity level. * * @param int|string $level - * - * @return void */ public function setVerbosity($level): void { @@ -167,10 +161,6 @@ public function setVerbosity($level): void /** * Set a Invoker instance. - * - * @param \Invoker\InvokerInterface $invoker - * - * @return void */ public function setInvoker(InvokerInterface $invoker): void { @@ -179,8 +169,6 @@ public function setInvoker(InvokerInterface $invoker): void /** * Gets the application instance for this command. - * - * @return null|\Viserio\Component\Console\Application */ public function getApplication(): ?Application { @@ -189,11 +177,6 @@ public function getApplication(): ?Application /** * Run the console command. - * - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return int */ public function run(InputInterface $input, OutputInterface $output): int { @@ -208,11 +191,6 @@ public function run(InputInterface $input, OutputInterface $output): int /** * Call another console command. - * - * @param string $command - * @param array $arguments - * - * @return int */ public function call(string $command, array $arguments = []): int { @@ -221,11 +199,6 @@ public function call(string $command, array $arguments = []): int /** * Call another console command silently. - * - * @param string $command - * @param array $arguments - * - * @return int */ public function callSilent(string $command, array $arguments = []): int { @@ -235,8 +208,6 @@ public function callSilent(string $command, array $arguments = []): int /** * Get the value of a command argument. * - * @param null|string $key - * * @return null|array|string */ public function argument(?string $key = null) @@ -251,8 +222,6 @@ public function argument(?string $key = null) /** * Get the value of a command option. * - * @param null|string $key - * * @return null|array|string */ public function option(?string $key = null) @@ -266,11 +235,6 @@ public function option(?string $key = null) /** * Check if a command option is set. - * - * @param string $key - * @param bool $checkShortName - * - * @return bool */ public function hasOption(string $key, bool $checkShortName = true): bool { @@ -290,9 +254,6 @@ public function hasOption(string $key, bool $checkShortName = true): bool /** * Confirm a question with the user. * - * @param string $question - * @param bool $default - * * @return bool|string */ public function confirm(string $question, bool $default = false) @@ -302,11 +263,6 @@ public function confirm(string $question, bool $default = false) /** * Prompt the user for input. - * - * @param string $question - * @param null|string $default - * - * @return null|string */ public function ask(string $question, ?string $default = null): ?string { @@ -316,11 +272,7 @@ public function ask(string $question, ?string $default = null): ?string /** * Prompt the user for input with auto completion. * - * @param string $question - * @param array $choices * @param string $default - * - * @return null|string */ public function anticipate(string $question, array $choices, ?string $default = null): ?string { @@ -329,12 +281,6 @@ public function anticipate(string $question, array $choices, ?string $default = /** * Prompt the user for input with auto completion. - * - * @param string $question - * @param array $choices - * @param null|string $default - * - * @return null|string */ public function askWithCompletion(string $question, array $choices, ?string $default = null): ?string { @@ -347,11 +293,6 @@ public function askWithCompletion(string $question, array $choices, ?string $def /** * Prompt the user for input but hide the answer from the console. - * - * @param string $question - * @param bool $fallback - * - * @return string */ public function secret(string $question, bool $fallback = true): string { @@ -364,14 +305,6 @@ public function secret(string $question, bool $fallback = true): string /** * Give the user a single choice from an array of answers. - * - * @param string $question - * @param array $choices - * @param null|string $default - * @param mixed $attempts - * @param bool $multiple - * - * @return null|string */ public function choice( string $question, @@ -390,12 +323,7 @@ public function choice( /** * Format input to textual table. * - * @param array $headers * @param array|\Viserio\Contract\Support\Arrayable $rows - * @param string $style - * @param array $columnStyles - * - * @return void */ public function table(array $headers, $rows, string $style = 'default', array $columnStyles = []): void { @@ -417,11 +345,8 @@ public function table(array $headers, $rows, string $style = 'default', array $c /** * Write a string as standard output. * - * @param string $string * @param null|string $style The output style of the string * @param null|int|string $verbosityLevel - * - * @return void */ public function line(string $string, ?string $style = null, $verbosityLevel = null): void { @@ -432,10 +357,7 @@ public function line(string $string, ?string $style = null, $verbosityLevel = nu /** * Write a string as information output. * - * @param string $string * @param null|int|string $verbosityLevel - * - * @return void */ public function info(string $string, $verbosityLevel = null): void { @@ -445,10 +367,7 @@ public function info(string $string, $verbosityLevel = null): void /** * Write a string as comment output. * - * @param string $string * @param null|int|string $verbosityLevel - * - * @return void */ public function comment(string $string, $verbosityLevel = null): void { @@ -458,10 +377,7 @@ public function comment(string $string, $verbosityLevel = null): void /** * Write a string as question output. * - * @param string $string * @param null|int|string $verbosityLevel - * - * @return void */ public function question(string $string, $verbosityLevel = null): void { @@ -471,10 +387,7 @@ public function question(string $string, $verbosityLevel = null): void /** * Write a string as error output. * - * @param string $string * @param null|int|string $verbosityLevel - * - * @return void */ public function error(string $string, $verbosityLevel = null): void { @@ -484,10 +397,7 @@ public function error(string $string, $verbosityLevel = null): void /** * Write a string as warning output. * - * @param string $string * @param null|int|string $verbosityLevel - * - * @return void */ public function warn(string $string, $verbosityLevel = null): void { @@ -501,10 +411,6 @@ public function warn(string $string, $verbosityLevel = null): void /** * Write a string in an alert box. - * - * @param string $string - * - * @return void */ public function alert(string $string): void { @@ -520,10 +426,7 @@ public function alert(string $string): void /** * Write a string as task output. * - * @param string $string - * @param callable $callable - * - * @return void + * @param string $string */ public function task($string, callable $callable): void { @@ -538,8 +441,6 @@ public function task($string, callable $callable): void * @param string $href * @param null|string $string * @param null|int|string $verbosity - * - * @return void */ public function hyperlink($href, $string = null, $verbosity = null): void { @@ -548,11 +449,6 @@ public function hyperlink($href, $string = null, $verbosity = null): void /** * Format a string as a hyperlink. - * - * @param string $href - * @param null|string $string - * - * @return string */ protected function getHyperlink(string $href, ?string $string = null): string { @@ -563,8 +459,6 @@ protected function getHyperlink(string $href, ?string $string = null): string * Get the container instance. * * @throws \Viserio\Contract\Console\Exception\LogicException - * - * @return \Psr\Container\ContainerInterface */ protected function getContainer(): ContainerInterface { @@ -592,8 +486,6 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int /** * Get the console command arguments. - * - * @return array */ protected function getArguments(): array { @@ -602,8 +494,6 @@ protected function getArguments(): array /** * Get the console command options. - * - * @return array */ protected function getOptions(): array { @@ -615,8 +505,6 @@ protected function getOptions(): array * * @throws \Symfony\Component\Console\Exception\LogicException * @throws \Viserio\Contract\Console\Exception\InvalidCommandExpression - * - * @return void */ private function configureUsingFluentDefinition(): void { @@ -635,8 +523,6 @@ private function configureUsingFluentDefinition(): void /** * Specify the arguments and options on the command. - * - * @return void */ private function specifyParameters(): void { diff --git a/src/Viserio/Component/Console/Command/ClosureCommand.php b/src/Viserio/Component/Console/Command/ClosureCommand.php index c759a79ab..307cc5a46 100644 --- a/src/Viserio/Component/Console/Command/ClosureCommand.php +++ b/src/Viserio/Component/Console/Command/ClosureCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; @@ -31,9 +31,6 @@ class ClosureCommand extends AbstractCommand /** * Create a new command instance. * - * @param string $signature - * @param Closure $callback - * * @throws \Symfony\Component\Console\Exception\LogicException */ public function __construct(string $signature, Closure $callback) @@ -47,9 +44,6 @@ public function __construct(string $signature, Closure $callback) /** * Execute the console command. * - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output - * * @throws ReflectionException * @throws \Invoker\Exception\InvocationException * @throws \Invoker\Exception\NotEnoughParametersException diff --git a/src/Viserio/Component/Console/Command/CommandResolver.php b/src/Viserio/Component/Console/Command/CommandResolver.php index 08bd363a7..346773f74 100644 --- a/src/Viserio/Component/Console/Command/CommandResolver.php +++ b/src/Viserio/Component/Console/Command/CommandResolver.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; @@ -56,9 +56,6 @@ final class CommandResolver /** * Create a new command resolver instance. - * - * @param \Viserio\Component\Support\Invoker $invoker - * @param \Viserio\Component\Console\Application $console */ public function __construct(Invoker $invoker, Application $console) { @@ -122,9 +119,6 @@ public function resolve(string $expression, $callable, array $aliases = []): Str /** * Create a new command. * - * @param string $expression - * @param callable $callable - * * @throws \Symfony\Component\Console\Exception\LogicException * @throws \Symfony\Component\Console\Exception\InvalidArgumentException * @throws \Viserio\Contract\Console\Exception\InvalidCommandExpression @@ -150,8 +144,6 @@ private static function createCommand(string $expression, callable $callable): S * @param callable|string $callable * * @throws \Invoker\Exception\NotCallableException - * - * @return array */ private function defaultsViaReflection(StringCommand $command, $callable): array { @@ -188,12 +180,8 @@ private function defaultsViaReflection(StringCommand $command, $callable): array /** * Check if callable is valid. * - * @param mixed $callable - * * @throws ReflectionException * @throws \Viserio\Contract\Console\Exception\InvalidArgumentException - * - * @return void */ private function assertCallableIsValid($callable): void { @@ -214,11 +202,7 @@ private function assertCallableIsValid($callable): void /** * Check if the callable represents a static call to a non-static method. * - * @param mixed $callable - * * @throws ReflectionException - * - * @return bool */ private function isStaticCallToNonStaticMethod($callable): bool { diff --git a/src/Viserio/Component/Console/Command/ExpressionParser.php b/src/Viserio/Component/Console/Command/ExpressionParser.php index cd352e946..0d6bd9cfc 100644 --- a/src/Viserio/Component/Console/Command/ExpressionParser.php +++ b/src/Viserio/Component/Console/Command/ExpressionParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; @@ -22,11 +22,7 @@ final class ExpressionParser /** * Parse given command string. * - * @param string $expression - * * @throws \Viserio\Contract\Console\Exception\InvalidCommandExpression - * - * @return array */ public static function parse(string $expression): array { @@ -62,10 +58,6 @@ public static function parse(string $expression): array /** * Check if token is a option. - * - * @param string $token - * - * @return bool */ private static function isOption(string $token): bool { @@ -75,11 +67,7 @@ private static function isOption(string $token): bool /** * Parse arguments. * - * @param string $token - * * @throws \Symfony\Component\Console\Exception\InvalidArgumentException - * - * @return \Viserio\Component\Console\Input\InputArgument */ private static function parseArgument(string $token): InputArgument { @@ -119,11 +107,7 @@ private static function parseArgument(string $token): InputArgument /** * Parse options. * - * @param string $token - * * @throws \Symfony\Component\Console\Exception\InvalidArgumentException - * - * @return \Viserio\Component\Console\Input\InputOption */ private static function parseOption(string $token): InputOption { @@ -160,10 +144,6 @@ private static function parseOption(string $token): InputOption /** * Parse the token into its token and description segments. - * - * @param string $token - * - * @return array */ private static function extractDescription(string $token): array { @@ -174,11 +154,6 @@ private static function extractDescription(string $token): array /** * Determine if a given string starts with a given substring. - * - * @param string $haystack - * @param string $needle - * - * @return bool */ private static function startsWith(string $haystack, string $needle): bool { @@ -187,11 +162,6 @@ private static function startsWith(string $haystack, string $needle): bool /** * Determine if a given string ends with a given substring. - * - * @param string $haystack - * @param string $needle - * - * @return bool */ private static function endsWith(string $haystack, string $needle): bool { diff --git a/src/Viserio/Component/Console/Command/HyphenatedInputResolver.php b/src/Viserio/Component/Console/Command/HyphenatedInputResolver.php index c694a790c..cdd18dc1d 100644 --- a/src/Viserio/Component/Console/Command/HyphenatedInputResolver.php +++ b/src/Viserio/Component/Console/Command/HyphenatedInputResolver.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; @@ -32,12 +32,6 @@ class HyphenatedInputResolver implements ParameterResolver * * E.g. `->call($callable, ['dry-run' => true])` will inject the boolean `true` * for a parameter named either `$dryrun` or `$dryRun`. - * - * @param ReflectionFunctionAbstract $reflection - * @param array $providedParameters - * @param array $resolvedParameters - * - * @return array */ public function getParameters( ReflectionFunctionAbstract $reflection, diff --git a/src/Viserio/Component/Console/Command/ListCommand.php b/src/Viserio/Component/Console/Command/ListCommand.php index dd262232d..aa21b0f3d 100644 --- a/src/Viserio/Component/Console/Command/ListCommand.php +++ b/src/Viserio/Component/Console/Command/ListCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; diff --git a/src/Viserio/Component/Console/Command/StringCommand.php b/src/Viserio/Component/Console/Command/StringCommand.php index 4c575bfbf..250836d60 100644 --- a/src/Viserio/Component/Console/Command/StringCommand.php +++ b/src/Viserio/Component/Console/Command/StringCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Command; diff --git a/src/Viserio/Component/Console/CommandLoader/IteratorCommandLoader.php b/src/Viserio/Component/Console/CommandLoader/IteratorCommandLoader.php index cfd98204c..9b785c888 100644 --- a/src/Viserio/Component/Console/CommandLoader/IteratorCommandLoader.php +++ b/src/Viserio/Component/Console/CommandLoader/IteratorCommandLoader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\CommandLoader; diff --git a/src/Viserio/Component/Console/ConsoleEvents.php b/src/Viserio/Component/Console/ConsoleEvents.php index 2fa6b28e3..1ee685372 100644 --- a/src/Viserio/Component/Console/ConsoleEvents.php +++ b/src/Viserio/Component/Console/ConsoleEvents.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console; diff --git a/src/Viserio/Component/Console/Container/Pipeline/AddConsoleCommandPipe.php b/src/Viserio/Component/Console/Container/Pipeline/AddConsoleCommandPipe.php index 60d831712..b2972440c 100644 --- a/src/Viserio/Component/Console/Container/Pipeline/AddConsoleCommandPipe.php +++ b/src/Viserio/Component/Console/Container/Pipeline/AddConsoleCommandPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Container\Pipeline; @@ -36,9 +36,6 @@ final class AddConsoleCommandPipe implements PipeContract /** * Create a new AddConsoleCommandPipe instance. - * - * @param string $commandLoaderServiceId - * @param string $commandTag */ public function __construct( string $commandLoaderServiceId = CommandLoaderInterface::class, diff --git a/src/Viserio/Component/Console/Container/Provider/ConsoleServiceProvider.php b/src/Viserio/Component/Console/Container/Provider/ConsoleServiceProvider.php index 1fdc659d5..310c6c6a4 100644 --- a/src/Viserio/Component/Console/Container/Provider/ConsoleServiceProvider.php +++ b/src/Viserio/Component/Console/Container/Provider/ConsoleServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Container\Provider; diff --git a/src/Viserio/Component/Console/Event/ConsoleCommandEvent.php b/src/Viserio/Component/Console/Event/ConsoleCommandEvent.php index 4148c0239..ce48c3be6 100644 --- a/src/Viserio/Component/Console/Event/ConsoleCommandEvent.php +++ b/src/Viserio/Component/Console/Event/ConsoleCommandEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Event; @@ -34,10 +34,6 @@ class ConsoleCommandEvent extends ConsoleEvent /** * Create a new command event. - * - * @param \Symfony\Component\Console\Command\Command $command - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output */ public function __construct(Command $command, InputInterface $input, OutputInterface $output) { @@ -48,8 +44,6 @@ public function __construct(Command $command, InputInterface $input, OutputInter /** * Returns true if the command is runnable, false otherwise. - * - * @return bool */ public function commandShouldRun(): bool { @@ -58,8 +52,6 @@ public function commandShouldRun(): bool /** * Disables the command, so it won't be run. - * - * @return bool */ public function disableCommand(): bool { @@ -68,8 +60,6 @@ public function disableCommand(): bool /** * Enables the command. - * - * @return bool */ public function enableCommand(): bool { diff --git a/src/Viserio/Component/Console/Event/ConsoleErrorEvent.php b/src/Viserio/Component/Console/Event/ConsoleErrorEvent.php index fa3ffc236..7b3daadf3 100644 --- a/src/Viserio/Component/Console/Event/ConsoleErrorEvent.php +++ b/src/Viserio/Component/Console/Event/ConsoleErrorEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Event; @@ -25,11 +25,6 @@ final class ConsoleErrorEvent extends ConsoleEvent { /** * Create a new console error event. - * - * @param null|\Symfony\Component\Console\Command\Command $command - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output - * @param Throwable $error */ public function __construct(?Command $command, InputInterface $input, OutputInterface $output, Throwable $error) { @@ -57,10 +52,6 @@ public function getError(): Throwable * Replaces the thrown exception. * * This exception will be thrown if no response is set in the event. - * - * @param Throwable $error - * - * @return void */ public function setError(Throwable $error): void { @@ -74,8 +65,6 @@ public function setError(Throwable $error): void * @param int $exitCode The command exit code * * @throws ReflectionException - * - * @return void */ public function setExitCode(int $exitCode): void { diff --git a/src/Viserio/Component/Console/Event/ConsoleEvent.php b/src/Viserio/Component/Console/Event/ConsoleEvent.php index 30f3366dd..b13f2fd07 100644 --- a/src/Viserio/Component/Console/Event/ConsoleEvent.php +++ b/src/Viserio/Component/Console/Event/ConsoleEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Event; @@ -25,8 +25,6 @@ abstract class ConsoleEvent implements EventContract /** * Gets the command that is executed. - * - * @return null|\Symfony\Component\Console\Command\Command */ public function getCommand(): ?Command { diff --git a/src/Viserio/Component/Console/Event/ConsoleTerminateEvent.php b/src/Viserio/Component/Console/Event/ConsoleTerminateEvent.php index 4cf65562e..424f0452d 100644 --- a/src/Viserio/Component/Console/Event/ConsoleTerminateEvent.php +++ b/src/Viserio/Component/Console/Event/ConsoleTerminateEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Event; @@ -22,11 +22,6 @@ class ConsoleTerminateEvent extends ConsoleEvent { /** * Create a new console terminate event. - * - * @param null|\Symfony\Component\Console\Command\Command $command - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output - * @param int $exitCode */ public function __construct(?Command $command, InputInterface $input, OutputInterface $output, int $exitCode) { @@ -43,8 +38,6 @@ public function __construct(?Command $command, InputInterface $input, OutputInte * Sets the exit code. * * @param int $exitCode The command exit code - * - * @return void */ public function setExitCode(int $exitCode): void { diff --git a/src/Viserio/Component/Console/Helper/DescriptorHelper.php b/src/Viserio/Component/Console/Helper/DescriptorHelper.php index a3cd3e023..ee2fdaf77 100644 --- a/src/Viserio/Component/Console/Helper/DescriptorHelper.php +++ b/src/Viserio/Component/Console/Helper/DescriptorHelper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Helper; diff --git a/src/Viserio/Component/Console/Helper/TextDescriptor.php b/src/Viserio/Component/Console/Helper/TextDescriptor.php index 575aa9f31..d12807c55 100644 --- a/src/Viserio/Component/Console/Helper/TextDescriptor.php +++ b/src/Viserio/Component/Console/Helper/TextDescriptor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Helper; @@ -27,11 +27,7 @@ class TextDescriptor implements DescriptorInterface /** * Describes an object if supported. * - * @param \Symfony\Component\Console\Output\OutputInterface $output * @param object|\Viserio\Component\Console\Command\AbstractCommand $object - * @param array $options - * - * @return void */ public function describe(OutputInterface $output, $object, array $options = []): void { @@ -59,9 +55,6 @@ public function describe(OutputInterface $output, $object, array $options = []): /** * Describes the application title. - * - * @param \Viserio\Component\Console\Application $application - * @param \Symfony\Component\Console\Output\OutputInterface $output */ private function describeTitle(Application $application, OutputInterface $output): void { @@ -88,10 +81,6 @@ private function describeTitle(Application $application, OutputInterface $output /** * Describes the application title. - * - * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return void */ private function describeUsage(OutputInterface $output): void { @@ -103,12 +92,6 @@ private function describeUsage(OutputInterface $output): void /** * Describes the application commands. - * - * @param \Viserio\Component\Console\Application $application - * @param \Viserio\Component\Console\Command\AbstractCommand $command - * @param array $options - * - * @return void */ private function describeCommands(Application $application, AbstractCommand $command, array $options): void { @@ -148,10 +131,6 @@ private function describeCommands(Application $application, AbstractCommand $com /** * Sort all application commands on namespace. - * - * @param array $commands - * - * @return array */ private function getNamespaceSortedCommandInfos(array $commands): array { @@ -178,9 +157,6 @@ private function getNamespaceSortedCommandInfos(array $commands): array return $namespaceSortedInfos; } - /** - * @return TableStyle - */ private static function getZeroBorderStyle(): TableStyle { $style = new TableStyle(); diff --git a/src/Viserio/Component/Console/Input/InputArgument.php b/src/Viserio/Component/Console/Input/InputArgument.php index fd8d00726..c23ccac99 100644 --- a/src/Viserio/Component/Console/Input/InputArgument.php +++ b/src/Viserio/Component/Console/Input/InputArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Input; @@ -42,10 +42,6 @@ public function getDescription(): string /** * Set the input argument description. - * - * @param string $description - * - * @return void */ public function setDescription(string $description): void { diff --git a/src/Viserio/Component/Console/Input/InputOption.php b/src/Viserio/Component/Console/Input/InputOption.php index 0be261cd5..dfe695b87 100644 --- a/src/Viserio/Component/Console/Input/InputOption.php +++ b/src/Viserio/Component/Console/Input/InputOption.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Input; @@ -42,10 +42,6 @@ public function getDescription(): string /** * Set the input option description. - * - * @param string $description - * - * @return void */ public function setDescription(string $description): void { diff --git a/src/Viserio/Component/Console/Output/SpyOutput.php b/src/Viserio/Component/Console/Output/SpyOutput.php index ed1c25607..2d5c384b3 100644 --- a/src/Viserio/Component/Console/Output/SpyOutput.php +++ b/src/Viserio/Component/Console/Output/SpyOutput.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Output; diff --git a/src/Viserio/Component/Console/Tester/CommandTestCase.php b/src/Viserio/Component/Console/Tester/CommandTestCase.php index 3debcea87..32c0c8d04 100644 --- a/src/Viserio/Component/Console/Tester/CommandTestCase.php +++ b/src/Viserio/Component/Console/Tester/CommandTestCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tester; @@ -41,13 +41,6 @@ protected function setUp(): void $this->application = new Application(); } - /** - * @param \Symfony\Component\Console\Command\Command $command - * @param array $input - * @param array $options - * - * @return \Symfony\Component\Console\Tester\CommandTester - */ protected function executeCommand(Command $command, array $input = [], array $options = []): CommandTester { $this->application->add($command); diff --git a/src/Viserio/Component/Console/Tests/ApplicationTest.php b/src/Viserio/Component/Console/Tests/ApplicationTest.php index 4b54610fa..3789c3204 100644 --- a/src/Viserio/Component/Console/Tests/ApplicationTest.php +++ b/src/Viserio/Component/Console/Tests/ApplicationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests; @@ -57,6 +57,7 @@ * @internal * * @small + * @coversNothing */ final class ApplicationTest extends MockeryTestCase { @@ -876,8 +877,6 @@ public function testArtisanWithHyperlink(): void /** * Fixture method. - * - * @param OutputInterface $output */ public function foo(OutputInterface $output): void { @@ -892,11 +891,6 @@ protected function allowMockingNonExistentMethods(bool $allow = false): void parent::allowMockingNonExistentMethods(true); } - /** - * @param bool $skipCommand - * - * @return \Viserio\Contract\Events\EventManager - */ private function getDispatcher(bool $skipCommand = false): EventManagerContract { $dispatcher = new EventManager(); @@ -930,8 +924,6 @@ private function getDispatcher(bool $skipCommand = false): EventManagerContract * @param int|string $expected * * @throws Exception - * - * @return void */ private function assertOutputIs($command, $expected): void { diff --git a/src/Viserio/Component/Console/Tests/Automatic/CerebroScriptExtenderTest.php b/src/Viserio/Component/Console/Tests/Automatic/CerebroScriptExtenderTest.php index be2e93b09..771120e15 100644 --- a/src/Viserio/Component/Console/Tests/Automatic/CerebroScriptExtenderTest.php +++ b/src/Viserio/Component/Console/Tests/Automatic/CerebroScriptExtenderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Automatic; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class CerebroScriptExtenderTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Console/Tests/Command/ClosureCommandTest.php b/src/Viserio/Component/Console/Tests/Command/ClosureCommandTest.php index 89b65be6c..568697c7e 100644 --- a/src/Viserio/Component/Console/Tests/Command/ClosureCommandTest.php +++ b/src/Viserio/Component/Console/Tests/Command/ClosureCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Command; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class ClosureCommandTest extends TestCase { diff --git a/src/Viserio/Component/Console/Tests/Command/CommandTest.php b/src/Viserio/Component/Console/Tests/Command/CommandTest.php index ad2bbceab..c78f363c5 100644 --- a/src/Viserio/Component/Console/Tests/Command/CommandTest.php +++ b/src/Viserio/Component/Console/Tests/Command/CommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Command; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class CommandTest extends TestCase { @@ -131,9 +132,6 @@ public function testTask(): void ', $output->output); } - /** - * @return \Viserio\Component\Console\Tests\Fixture\ViserioSecCommand - */ private function arrangeCommand(): ViserioSecCommand { $command = new ViserioSecCommand(); diff --git a/src/Viserio/Component/Console/Tests/Command/ExpressionParserTest.php b/src/Viserio/Component/Console/Tests/Command/ExpressionParserTest.php index e7c0f2af2..7315b756b 100644 --- a/src/Viserio/Component/Console/Tests/Command/ExpressionParserTest.php +++ b/src/Viserio/Component/Console/Tests/Command/ExpressionParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Command; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ExpressionParserTest extends TestCase { @@ -223,10 +224,6 @@ public function testProvidesAnErrorMessageOnEmpty(): void ExpressionParser::parse(''); } - /** - * @param string $expression - * @param array $expected - */ protected static function assertParsesTo(string $expression, array $expected = []): void { self::assertEquals($expected, ExpressionParser::parse($expression)); diff --git a/src/Viserio/Component/Console/Tests/Command/ListCommandTest.php b/src/Viserio/Component/Console/Tests/Command/ListCommandTest.php index 47cd2c4a2..869f53da3 100644 --- a/src/Viserio/Component/Console/Tests/Command/ListCommandTest.php +++ b/src/Viserio/Component/Console/Tests/Command/ListCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Command; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ListCommandTest extends TestCase { diff --git a/src/Viserio/Component/Console/Tests/Command/StringCommandTest.php b/src/Viserio/Component/Console/Tests/Command/StringCommandTest.php index c9e75fe44..e66a1e1a9 100644 --- a/src/Viserio/Component/Console/Tests/Command/StringCommandTest.php +++ b/src/Viserio/Component/Console/Tests/Command/StringCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Command; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class StringCommandTest extends TestCase { diff --git a/src/Viserio/Component/Console/Tests/CommandLoader/IteratorCommandLoaderTest.php b/src/Viserio/Component/Console/Tests/CommandLoader/IteratorCommandLoaderTest.php index b84f20de4..88cfbe0a8 100644 --- a/src/Viserio/Component/Console/Tests/CommandLoader/IteratorCommandLoaderTest.php +++ b/src/Viserio/Component/Console/Tests/CommandLoader/IteratorCommandLoaderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Command; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class IteratorCommandLoaderTest extends TestCase { diff --git a/src/Viserio/Component/Console/Tests/Container/Pipeline/AddConsoleCommandPipeTest.php b/src/Viserio/Component/Console/Tests/Container/Pipeline/AddConsoleCommandPipeTest.php index 07186b0b3..709f65cba 100644 --- a/src/Viserio/Component/Console/Tests/Container/Pipeline/AddConsoleCommandPipeTest.php +++ b/src/Viserio/Component/Console/Tests/Container/Pipeline/AddConsoleCommandPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Container\Pipeline; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class AddConsoleCommandPipeTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Console/Tests/Container/Pipeline/Compiled/AddConsoleCommandPipeContainerTestProcess.php b/src/Viserio/Component/Console/Tests/Container/Pipeline/Compiled/AddConsoleCommandPipeContainerTestProcess.php index 6e87f3147..47bc68e69 100644 --- a/src/Viserio/Component/Console/Tests/Container/Pipeline/Compiled/AddConsoleCommandPipeContainerTestProcess.php +++ b/src/Viserio/Component/Console/Tests/Container/Pipeline/Compiled/AddConsoleCommandPipeContainerTestProcess.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Container\Pipeline\Compiled; @@ -54,8 +54,6 @@ public function getRemovedIds(): array /** * Returns the public Symfony\Component\Console\CommandLoader\CommandLoaderInterface shared service. - * - * @return \Viserio\Component\Console\CommandLoader\IteratorCommandLoader */ protected function getce817e8bdc75399a693ba45b876c457a0f7fd422258f7d4eabc553987c2fbd31(): \Viserio\Component\Console\CommandLoader\IteratorCommandLoader { @@ -68,8 +66,6 @@ protected function getce817e8bdc75399a693ba45b876c457a0f7fd422258f7d4eabc553987c /** * Returns the public Viserio\Component\Console\Application shared service. - * - * @return \Viserio\Component\Console\Application */ protected function get206058a713a7172158e11c9d996f6a067c294ab0356ae6697060f162e057445a(): \Viserio\Component\Console\Application { @@ -86,8 +82,6 @@ protected function get206058a713a7172158e11c9d996f6a067c294ab0356ae6697060f162e0 /** * Returns the public Viserio\Component\Console\Tests\Fixture\GoodbyeCommand shared service. - * - * @return \Viserio\Component\Console\Tests\Fixture\GoodbyeCommand */ protected function gete6d96f60dc8eecd0ddc5d0637aa311884d82fd79d6e6c399780330b9c32ec6ee(): \Viserio\Component\Console\Tests\Fixture\GoodbyeCommand { @@ -100,8 +94,6 @@ protected function gete6d96f60dc8eecd0ddc5d0637aa311884d82fd79d6e6c399780330b9c3 /** * Returns the public Viserio\Component\Console\Tests\Fixture\HelloCommand shared service. - * - * @return \Viserio\Component\Console\Tests\Fixture\HelloCommand */ protected function getfc4803a678ce90c6fc6f0e95d290dfc6611678e8fba62563a448e7693b5f92d8(): \Viserio\Component\Console\Tests\Fixture\HelloCommand { @@ -114,8 +106,6 @@ protected function getfc4803a678ce90c6fc6f0e95d290dfc6611678e8fba62563a448e7693b /** * Returns the public Viserio\Component\Console\Tests\Fixture\LazyWhiner shared service. - * - * @return \Viserio\Component\Console\Tests\Fixture\LazyWhiner */ protected function geta24ae0504e8b69758f9ed0f3c6dab87df4b462bbae555494e87c372521f25a31(): \Viserio\Component\Console\Tests\Fixture\LazyWhiner { @@ -124,8 +114,6 @@ protected function geta24ae0504e8b69758f9ed0f3c6dab87df4b462bbae555494e87c372521 /** * Returns the public console.command.ids service. - * - * @return array */ protected function getdbce155f9c0e95dbd4bfbfaadab27eb79915789fa80c6c65068ccf60c9ef9e18(): array { diff --git a/src/Viserio/Component/Console/Tests/Container/Provider/ConsoleServiceProviderTest.php b/src/Viserio/Component/Console/Tests/Container/Provider/ConsoleServiceProviderTest.php index 1af9c4174..ecfcb1e7e 100644 --- a/src/Viserio/Component/Console/Tests/Container/Provider/ConsoleServiceProviderTest.php +++ b/src/Viserio/Component/Console/Tests/Container/Provider/ConsoleServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Container\Provider; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Console/Tests/Fixture/FooCommand.php b/src/Viserio/Component/Console/Tests/Fixture/FooCommand.php index 0c5240316..42dc6410c 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/FooCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/FooCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/GoodbyeCommand.php b/src/Viserio/Component/Console/Tests/Fixture/GoodbyeCommand.php index b848cb6fb..17c7c8b5f 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/GoodbyeCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/GoodbyeCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/GreetCommand.php b/src/Viserio/Component/Console/Tests/Fixture/GreetCommand.php index 07533315c..546c27424 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/GreetCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/GreetCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/HelloCommand.php b/src/Viserio/Component/Console/Tests/Fixture/HelloCommand.php index ec75709fc..c6ba597e9 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/HelloCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/HelloCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/HyperlinkCommand.php b/src/Viserio/Component/Console/Tests/Fixture/HyperlinkCommand.php index d0ec1cced..2a05eaa35 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/HyperlinkCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/HyperlinkCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/LazyWhiner.php b/src/Viserio/Component/Console/Tests/Fixture/LazyWhiner.php index c2dde63e4..9092ac281 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/LazyWhiner.php +++ b/src/Viserio/Component/Console/Tests/Fixture/LazyWhiner.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; @@ -21,9 +21,6 @@ class LazyWhiner /** @var \Symfony\Component\Console\Output\OutputInterface */ private static $output; - /** - * @param ContainerInterface $instantiator - */ public function __construct(ContainerInterface $instantiator) { $instantiatorName = \get_class($instantiator); @@ -31,27 +28,16 @@ public function __construct(ContainerInterface $instantiator) self::$output->write("LazyWhiner says:\n{$instantiatorName} woke me up! :-(\n\n"); } - /** - * @return string - */ public static function getOutput(): string { return self::$output->output; } - /** - * @param \Symfony\Component\Console\Output\OutputInterface $output - */ public static function setOutput(OutputInterface $output): void { self::$output = $output; } - /** - * @param object $runner - * - * @return void - */ public function whine(object $runner): void { $runnerName = \get_class($runner); diff --git a/src/Viserio/Component/Console/Tests/Fixture/OutputCommand.php b/src/Viserio/Component/Console/Tests/Fixture/OutputCommand.php index 37076cf3c..dbb31782e 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/OutputCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/OutputCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/SymfonyCommand.php b/src/Viserio/Component/Console/Tests/Fixture/SymfonyCommand.php index 0513eb294..497b9756d 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/SymfonyCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/SymfonyCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/ViserioCommand.php b/src/Viserio/Component/Console/Tests/Fixture/ViserioCommand.php index 4b0cbe57a..cb446a9ee 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/ViserioCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/ViserioCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableFalseCommand.php b/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableFalseCommand.php index 43e984d10..c4364a3a8 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableFalseCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableFalseCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableTrueCommand.php b/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableTrueCommand.php index ecf43ec6e..4c1e4fc46 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableTrueCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/ViserioConfirmableTrueCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/ViserioLongCommandName.php b/src/Viserio/Component/Console/Tests/Fixture/ViserioLongCommandName.php index bc1558ad6..2d9f89ccb 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/ViserioLongCommandName.php +++ b/src/Viserio/Component/Console/Tests/Fixture/ViserioLongCommandName.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Fixture/ViserioSecCommand.php b/src/Viserio/Component/Console/Tests/Fixture/ViserioSecCommand.php index e6eab714a..c8e870c39 100644 --- a/src/Viserio/Component/Console/Tests/Fixture/ViserioSecCommand.php +++ b/src/Viserio/Component/Console/Tests/Fixture/ViserioSecCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Fixture; diff --git a/src/Viserio/Component/Console/Tests/Tester/CommandTestCaseTest.php b/src/Viserio/Component/Console/Tests/Tester/CommandTestCaseTest.php index 1719e0798..1815564dc 100644 --- a/src/Viserio/Component/Console/Tests/Tester/CommandTestCaseTest.php +++ b/src/Viserio/Component/Console/Tests/Tester/CommandTestCaseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Tester; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class CommandTestCaseTest extends CommandTestCase { diff --git a/src/Viserio/Component/Console/Tests/Traits/ConfirmableTraitTest.php b/src/Viserio/Component/Console/Tests/Traits/ConfirmableTraitTest.php index 064daeab7..943a65ca8 100644 --- a/src/Viserio/Component/Console/Tests/Traits/ConfirmableTraitTest.php +++ b/src/Viserio/Component/Console/Tests/Traits/ConfirmableTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Tests\Traits; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ConfirmableTraitTest extends TestCase { @@ -96,7 +97,6 @@ public function testConfirmableCommandWithFalseAndForce(): void } /** - * @param string $command * @param null|string $expected */ private function assertOutputIs(string $command, $expected): void diff --git a/src/Viserio/Component/Console/Traits/ConfirmableTrait.php b/src/Viserio/Component/Console/Traits/ConfirmableTrait.php index 7d9c7607b..80e1cbcde 100644 --- a/src/Viserio/Component/Console/Traits/ConfirmableTrait.php +++ b/src/Viserio/Component/Console/Traits/ConfirmableTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Console\Traits; @@ -25,10 +25,7 @@ trait ConfirmableTrait /** * Confirm before proceeding with the action. * - * @param string $warning * @param null|bool|Closure $callback - * - * @return bool */ public function confirmToProceed(string $warning = 'Application is in Production mode!', $callback = null): bool { @@ -60,17 +57,12 @@ public function confirmToProceed(string $warning = 'Application is in Production /** * Confirm a question with the user. * - * @param string $question - * @param bool $default - * * @return bool|string */ abstract public function confirm(string $question, bool $default = false); /** * Get the default confirmation callback. - * - * @return Closure */ protected function getDefaultConfirmCallback(): Closure { diff --git a/src/Viserio/Component/Console/composer.json b/src/Viserio/Component/Console/composer.json index 87cda4a2e..7cf437cf4 100644 --- a/src/Viserio/Component/Console/composer.json +++ b/src/Viserio/Component/Console/composer.json @@ -41,10 +41,9 @@ "require-dev": { "mockery/mockery": "^1.2.4", "narrowspark/automatic-common": "^0.7.0", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/events": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" diff --git a/src/Viserio/Component/Console/phpstan.neon b/src/Viserio/Component/Console/phpstan.neon index 0b7506dff..2d024ddc2 100644 --- a/src/Viserio/Component/Console/phpstan.neon +++ b/src/Viserio/Component/Console/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Console/phpunit.xml b/src/Viserio/Component/Console/phpunit.xml new file mode 100644 index 000000000..4667a3ff0 --- /dev/null +++ b/src/Viserio/Component/Console/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Console/phpunit.xml.dist b/src/Viserio/Component/Console/phpunit.xml.dist deleted file mode 100644 index 4cb979979..000000000 --- a/src/Viserio/Component/Console/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Container/.gitignore b/src/Viserio/Component/Container/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Container/.gitignore +++ b/src/Viserio/Component/Container/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Container/AbstractCompiledContainer.php b/src/Viserio/Component/Container/AbstractCompiledContainer.php index 0a19cb8c6..4012843b4 100644 --- a/src/Viserio/Component/Container/AbstractCompiledContainer.php +++ b/src/Viserio/Component/Container/AbstractCompiledContainer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -171,8 +171,6 @@ public function getParameters(): array /** * Set a custom invoker. * - * @param InvokerInterface $invoker - * * @return static */ public function setInvoker(InvokerInterface $invoker) @@ -194,8 +192,6 @@ public function setDelegates(array $delegates): self /** * Gets service ids that existed at compile time. - * - * @return array */ public function getRemovedIds(): array { @@ -453,10 +449,6 @@ protected function getClassReflector(string $abstract, bool $throw = true): ?Ref /** * Attempt to get a service from the stack of delegated backup containers. - * - * @param string $abstract - * - * @return mixed */ protected function getFromDelegate(string $abstract) { @@ -472,13 +464,9 @@ protected function getFromDelegate(string $abstract) /** * As a separate method to allow "get()" to use the really fast `??` operator. * - * @param string $id - * *@throws \Viserio\Contract\Container\Exception\NotFoundException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException * @throws Throwable - * - * @return mixed */ protected function doGet(string $id) { @@ -550,8 +538,6 @@ protected function doGet(string $id) * * @codeCoverageIgnore * - * @param string $file - * * @return object The service created by the file */ protected function load(string $file): object @@ -596,12 +582,8 @@ protected function populateAvailableTypes(): void * As a separate method to allow "getParameter()" to use the really fast `??` operator. * And a helper function to extend getParameter with dynamic parameter loading if needed. * - * @param string $id - * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return mixed */ protected function doGetParameter(string $id) { @@ -654,8 +636,6 @@ static function (array $value, $key) { /** * Configured invoker. - * - * @return \Invoker\InvokerInterface */ private function getInvoker(): InvokerInterface { @@ -676,9 +656,7 @@ private function getInvoker(): InvokerInterface /** * Autowires the constructor or a method. * - * @param ReflectionFunctionAbstract $reflectionMethod - * @param array $arguments - * @param null|string $currentId + * @param null|string $currentId * * @throws \Viserio\Contract\Container\Exception\UnresolvableDependencyException * @throws ReflectionException diff --git a/src/Viserio/Component/Container/Argument/ArrayArgument.php b/src/Viserio/Component/Container/Argument/ArrayArgument.php index c9f18a8d8..f4f8b0087 100644 --- a/src/Viserio/Component/Container/Argument/ArrayArgument.php +++ b/src/Viserio/Component/Container/Argument/ArrayArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Argument; diff --git a/src/Viserio/Component/Container/Argument/ClosureArgument.php b/src/Viserio/Component/Container/Argument/ClosureArgument.php index 2ed2f5dfa..896ae2e51 100644 --- a/src/Viserio/Component/Container/Argument/ClosureArgument.php +++ b/src/Viserio/Component/Container/Argument/ClosureArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Argument; @@ -24,8 +24,6 @@ final class ClosureArgument implements ArgumentContract /** * Create a new ClosureArgument instance. - * - * @param \Viserio\Contract\Container\Definition\ReferenceDefinition $reference */ public function __construct(ReferenceDefinitionContract $reference) { @@ -46,8 +44,6 @@ public function getValue(): array * @param mixed[]|\Viserio\Contract\Container\Definition\ReferenceDefinition[] $values * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException - * - * @return void */ public function setValue(array $values): void { diff --git a/src/Viserio/Component/Container/Argument/ConditionArgument.php b/src/Viserio/Component/Container/Argument/ConditionArgument.php index e360b7e3b..7064c3274 100644 --- a/src/Viserio/Component/Container/Argument/ConditionArgument.php +++ b/src/Viserio/Component/Container/Argument/ConditionArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Argument; @@ -29,7 +29,6 @@ final class ConditionArgument implements ConditionArgumentContract * Create a new ConditionArgument instance. * * @param array $values - * @param callable $callback */ public function __construct(array $values, callable $callback) { @@ -59,8 +58,6 @@ public function getValue(): array * The service references to put in the set. * * @param mixed[] $values - * - * @return void */ public function setValue(array $values): void { diff --git a/src/Viserio/Component/Container/Argument/IteratorArgument.php b/src/Viserio/Component/Container/Argument/IteratorArgument.php index 0827c454f..62abc390f 100644 --- a/src/Viserio/Component/Container/Argument/IteratorArgument.php +++ b/src/Viserio/Component/Container/Argument/IteratorArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Argument; diff --git a/src/Viserio/Component/Container/Argument/ParameterArgument.php b/src/Viserio/Component/Container/Argument/ParameterArgument.php index 60bd18659..c33e4b8f5 100644 --- a/src/Viserio/Component/Container/Argument/ParameterArgument.php +++ b/src/Viserio/Component/Container/Argument/ParameterArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Argument; @@ -23,9 +23,6 @@ final class ParameterArgument implements ArgumentContract /** * Create a new ParameterArgument instance. - * - * @param string $parameter - * @param mixed $default */ public function __construct(string $parameter, $default) { @@ -52,8 +49,6 @@ public function getValue(): array * @param mixed[] $values * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException - * - * @return void */ public function setValue(array $values): void { diff --git a/src/Viserio/Component/Container/Argument/Traits/ReferenceSetArgumentTrait.php b/src/Viserio/Component/Container/Argument/Traits/ReferenceSetArgumentTrait.php index 940daa0ac..c7d14b207 100644 --- a/src/Viserio/Component/Container/Argument/Traits/ReferenceSetArgumentTrait.php +++ b/src/Viserio/Component/Container/Argument/Traits/ReferenceSetArgumentTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Argument\Traits; @@ -43,8 +43,6 @@ public function getValue(): array * The service references to put in the set. * * @param \Viserio\Contract\Container\Definition\ReferenceDefinition[] $values - * - * @return void */ public function setValue(array $values): void { diff --git a/src/Viserio/Component/Container/ClassHelper.php b/src/Viserio/Component/Container/ClassHelper.php index 0d6abcd23..4842068ca 100644 --- a/src/Viserio/Component/Container/ClassHelper.php +++ b/src/Viserio/Component/Container/ClassHelper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -39,11 +39,7 @@ private function __construct() /** * Check if class, trait or interface is loaded. * - * @param string $class - * * @throws ReflectionException when a parent class/interface/trait is not found - * - * @return bool */ public static function isClassLoaded(string $class): bool { @@ -77,8 +73,6 @@ public static function isClassLoaded(string $class): bool /** * @internal * - * @param mixed $class - * * @throws ReflectionException When $class is not found and is required */ public static function throwOnRequiredClass($class): void diff --git a/src/Viserio/Component/Container/ContainerBuilder.php b/src/Viserio/Component/Container/ContainerBuilder.php index c9cc1e8bf..22a41bf64 100644 --- a/src/Viserio/Component/Container/ContainerBuilder.php +++ b/src/Viserio/Component/Container/ContainerBuilder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -73,36 +73,26 @@ final class ContainerBuilder implements ContainerBuilderContract /** * The container's parameters. - * - * @var array */ private array $parameters = []; /** * All of the used tags. - * - * @var array */ private array $usedTags = []; /** * The extension closures for services. - * - * @var array */ private array $extenders = []; /** * Whether the container has already been built. - * - * @var bool */ private bool $locked = false; /** * Removed definition ids. - * - * @var array */ private array $removedIds = []; @@ -229,8 +219,6 @@ public function getPipelineConfig(): PipelineConfig * Returns the log. * * @internal - * - * @return array */ public function getLogs(): array { @@ -265,10 +253,6 @@ public function setDefinition(string $id, DefinitionContract $definition): void * Get a hash from the given value. * * @internal - * - * @param string $name - * - * @return string */ public static function getHash(string $name): string { @@ -308,8 +292,6 @@ public static function getServiceConditionals($value): array /** * Returns the initialized conditionals. * - * @param mixed $value - * * @return array An array of uninitialized conditionals * * @internal @@ -331,8 +313,6 @@ public static function getInitializedConditionals($value): array /** * Clear the container of all services and resolved instances. - * - * @return void */ public function reset(): void { @@ -634,8 +614,6 @@ public function hasAlias(string $id): bool * Compiles the container. * * @throws \LogicException - * - * @return void */ public function compile(): void { @@ -737,11 +715,6 @@ public function log(PipeContract $pass, string $message): void * * @internal * - * @param string $name - * @param mixed $value - * @param int $type - * @param bool $throw - * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException * * @return ClosureDefinition|FactoryDefinition|IteratorDefinition|ObjectDefinition|UndefinedDefinition @@ -790,9 +763,6 @@ public static function createDefinition(string $name, $value, int $type, bool $t /** * Check if the given name is not empty. * - * @param string $abstract - * @param string $type - * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException */ private function checkName(string $abstract, string $type = 'service'): void diff --git a/src/Viserio/Component/Container/Definition/AbstractDefinition.php b/src/Viserio/Component/Container/Definition/AbstractDefinition.php index 93b622730..268c2dd79 100644 --- a/src/Viserio/Component/Container/Definition/AbstractDefinition.php +++ b/src/Viserio/Component/Container/Definition/AbstractDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -31,79 +31,56 @@ abstract class AbstractDefinition implements DefinitionContract, TagAwareDefinit /** * The service name. - * - * @var string */ protected string $name; /** * The hash of this definition. - * - * @var string */ protected string $hash; /** * The service value. - * - * @var mixed */ protected $value; /** * Check if the service is lazy. - * - * @var bool */ protected bool $isLazy = false; /** * Check if the service is public. - * - * @var bool */ protected bool $isPublic = false; /** * Check if the service is a internal php class or function. - * - * @var bool */ protected bool $isInternal = false; /** * The service type. - * - * @var int */ protected int $type; /** * Check if the value is added on runtime. - * - * @var bool */ protected bool $synthetic = false; /** * Returns the list of tags. - * - * @var array */ protected array $tags = []; /** * List of definition conditions. - * - * @var array */ protected array $conditions = []; /** * Extend this class to create new Definitions. - * - * @param string $name - * @param int $type */ public function __construct(string $name, int $type) { @@ -132,8 +109,6 @@ public function setName(string $id) /** * Get the definition hash. - * - * @return string */ public function getHash(): string { @@ -178,8 +153,6 @@ public function isPublic(): bool * Check if the service is is a internal php class or function. * * @internal - * - * @return bool */ public function isInternal(): bool { @@ -275,8 +248,6 @@ public function setConditions(array $conditions) * * @internal * - * @param bool $bool - * * @return static */ public function setInternal(bool $bool) diff --git a/src/Viserio/Component/Container/Definition/AliasDefinition.php b/src/Viserio/Component/Container/Definition/AliasDefinition.php index 5a9c12165..4dd506e0a 100644 --- a/src/Viserio/Component/Container/Definition/AliasDefinition.php +++ b/src/Viserio/Component/Container/Definition/AliasDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -58,9 +58,6 @@ final class AliasDefinition implements AliasDefinitionContract /** * Create a new AliasDefinition instance. - * - * @param string $original - * @param string $alias */ public function __construct(string $original, string $alias) { diff --git a/src/Viserio/Component/Container/Definition/ClosureDefinition.php b/src/Viserio/Component/Container/Definition/ClosureDefinition.php index ba776c171..eba7c4c81 100644 --- a/src/Viserio/Component/Container/Definition/ClosureDefinition.php +++ b/src/Viserio/Component/Container/Definition/ClosureDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -40,9 +40,7 @@ final class ClosureDefinition extends AbstractDefinition implements ClosureDefin /** * Create a new Closure Definition instance. * - * @param string $name * @param callable $value - * @param int $type * * @throws \Viserio\Contract\Support\Exception\MissingPackageException */ diff --git a/src/Viserio/Component/Container/Definition/ConditionDefinition.php b/src/Viserio/Component/Container/Definition/ConditionDefinition.php index b60830ca8..3070e5462 100644 --- a/src/Viserio/Component/Container/Definition/ConditionDefinition.php +++ b/src/Viserio/Component/Container/Definition/ConditionDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; diff --git a/src/Viserio/Component/Container/Definition/FactoryDefinition.php b/src/Viserio/Component/Container/Definition/FactoryDefinition.php index 8ac00cd59..d402f49f2 100644 --- a/src/Viserio/Component/Container/Definition/FactoryDefinition.php +++ b/src/Viserio/Component/Container/Definition/FactoryDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -48,9 +48,7 @@ final class FactoryDefinition extends AbstractDefinition implements FactoryDefin /** * Create a new Method Definition instance. * - * @param string $name * @param array|string $value - * @param int $type * * @throws \Viserio\Contract\Container\Exception\BindingResolutionException */ @@ -86,8 +84,6 @@ public function setValue($value): DefinitionContract * * @param array|string $method The formatting for the string looks like Class@Method or Class::Method * and for the array [[Class, 'Method'] or [new Class, 'Method']] - * - * @return array */ public static function splitFactory($method): array { diff --git a/src/Viserio/Component/Container/Definition/IteratorDefinition.php b/src/Viserio/Component/Container/Definition/IteratorDefinition.php index b9a60171c..dd0d9813e 100644 --- a/src/Viserio/Component/Container/Definition/IteratorDefinition.php +++ b/src/Viserio/Component/Container/Definition/IteratorDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -35,9 +35,7 @@ final class IteratorDefinition extends AbstractDefinition implements IteratorDef /** * Create a new Iterator Definition instance. * - * @param string $name * @param string|Traversable $value - * @param int $type */ public function __construct(string $name, $value, int $type) { diff --git a/src/Viserio/Component/Container/Definition/ObjectDefinition.php b/src/Viserio/Component/Container/Definition/ObjectDefinition.php index e242f0fd9..c0ba812cb 100644 --- a/src/Viserio/Component/Container/Definition/ObjectDefinition.php +++ b/src/Viserio/Component/Container/Definition/ObjectDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -43,9 +43,7 @@ final class ObjectDefinition extends AbstractDefinition implements ObjectDefinit /** * Create a new Object Definition instance. * - * @param string $name * @param object|string $value - * @param int $type * * @throws \Viserio\Contract\Support\Exception\MissingPackageException */ diff --git a/src/Viserio/Component/Container/Definition/ParameterDefinition.php b/src/Viserio/Component/Container/Definition/ParameterDefinition.php index d5a90615e..70fadf43a 100644 --- a/src/Viserio/Component/Container/Definition/ParameterDefinition.php +++ b/src/Viserio/Component/Container/Definition/ParameterDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -28,9 +28,6 @@ final class ParameterDefinition extends AbstractDefinition /** * Create a new parameter definition instance. - * - * @param string $name - * @param mixed $value */ public function __construct(string $name, $value) { @@ -93,8 +90,6 @@ public function isShared(): bool /** * Check if correct value is given. - * - * @param mixed $value */ private function checkValue($value): void { diff --git a/src/Viserio/Component/Container/Definition/ReferenceDefinition.php b/src/Viserio/Component/Container/Definition/ReferenceDefinition.php index 1c90e1493..43b2482ad 100644 --- a/src/Viserio/Component/Container/Definition/ReferenceDefinition.php +++ b/src/Viserio/Component/Container/Definition/ReferenceDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; diff --git a/src/Viserio/Component/Container/Definition/Traits/ArgumentAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/ArgumentAwareTrait.php index 5a5ef0ec0..630e148ad 100644 --- a/src/Viserio/Component/Container/Definition/Traits/ArgumentAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/ArgumentAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; @@ -24,8 +24,6 @@ trait ArgumentAwareTrait { /** * List of parameter to pass when calling the class. - * - * @var array */ protected array $arguments = []; diff --git a/src/Viserio/Component/Container/Definition/Traits/AutowiredAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/AutowiredAwareTrait.php index 3f362480c..9cec1a96c 100644 --- a/src/Viserio/Component/Container/Definition/Traits/AutowiredAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/AutowiredAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/ChangesAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/ChangesAwareTrait.php index 102114629..f95679106 100644 --- a/src/Viserio/Component/Container/Definition/Traits/ChangesAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/ChangesAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/ClassAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/ClassAwareTrait.php index 58f15e05f..1757a398b 100644 --- a/src/Viserio/Component/Container/Definition/Traits/ClassAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/ClassAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/DecoratorAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/DecoratorAwareTrait.php index 43a081815..a0f14f694 100644 --- a/src/Viserio/Component/Container/Definition/Traits/DecoratorAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/DecoratorAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/DeprecationTrait.php b/src/Viserio/Component/Container/Definition/Traits/DeprecationTrait.php index 8bea91bb7..d5afd728b 100644 --- a/src/Viserio/Component/Container/Definition/Traits/DeprecationTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/DeprecationTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/FactoryAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/FactoryAwareTrait.php index 1dd4f4174..dbe58ed6e 100644 --- a/src/Viserio/Component/Container/Definition/Traits/FactoryAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/FactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; @@ -74,8 +74,6 @@ public function getMethod(): string /** * Check if the method is static. - * - * @return bool */ public function isStatic(): bool { @@ -85,8 +83,6 @@ public function isStatic(): bool /** * Set true if the method is static or false if not. * - * @param bool $static - * * @return static */ public function setStatic(bool $static) diff --git a/src/Viserio/Component/Container/Definition/Traits/MethodCallsAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/MethodCallsAwareTrait.php index df1a8c413..671291c7b 100644 --- a/src/Viserio/Component/Container/Definition/Traits/MethodCallsAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/MethodCallsAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/PropertiesAwareTrait.php b/src/Viserio/Component/Container/Definition/Traits/PropertiesAwareTrait.php index 5add62fe1..527eff538 100644 --- a/src/Viserio/Component/Container/Definition/Traits/PropertiesAwareTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/PropertiesAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/Traits/ReturnTypeTrait.php b/src/Viserio/Component/Container/Definition/Traits/ReturnTypeTrait.php index c9a4e3b95..25e388835 100644 --- a/src/Viserio/Component/Container/Definition/Traits/ReturnTypeTrait.php +++ b/src/Viserio/Component/Container/Definition/Traits/ReturnTypeTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition\Traits; diff --git a/src/Viserio/Component/Container/Definition/UndefinedDefinition.php b/src/Viserio/Component/Container/Definition/UndefinedDefinition.php index c8dee2a2c..c3e523a4d 100644 --- a/src/Viserio/Component/Container/Definition/UndefinedDefinition.php +++ b/src/Viserio/Component/Container/Definition/UndefinedDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Definition; @@ -44,9 +44,7 @@ final class UndefinedDefinition extends AbstractDefinition implements UndefinedD /** * Create a new Undefined Definition instance. * - * @param string $name * @param object|string $value - * @param int $type * * @throws \Viserio\Contract\Support\Exception\MissingPackageException */ diff --git a/src/Viserio/Component/Container/Dumper/PhpDumper.php b/src/Viserio/Component/Container/Dumper/PhpDumper.php index 2a5433266..dda49ebfd 100644 --- a/src/Viserio/Component/Container/Dumper/PhpDumper.php +++ b/src/Viserio/Component/Container/Dumper/PhpDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Dumper; @@ -101,8 +101,6 @@ final class PhpDumper implements DumperContract /** * Cache for preload tag check. - * - * @var array */ private static array $preloadCache = []; @@ -132,29 +130,21 @@ final class PhpDumper implements DumperContract /** * List of preload classes. - * - * @var array */ private array $preloadClasses = []; /** * Counted variable. - * - * @var int */ private int $variableCount = 0; /** * Array space counter for multidimensional arrays. - * - * @var int */ private int $arraySpaceCount = 2; /** * A check if the container should be a file container. - * - * @var bool */ private bool $asFiles = false; @@ -175,8 +165,6 @@ final class PhpDumper implements DumperContract /** * List of uninitialized references. - * - * @var array */ private array $uninitializedServices = []; @@ -191,8 +179,6 @@ final class PhpDumper implements DumperContract /** * Check if container should be dump in debug mode. - * - * @var bool */ private bool $debug = false; @@ -221,8 +207,6 @@ final class PhpDumper implements DumperContract /** * Tag that identifies the services that are always needed. - * - * @var string */ private string $preloadTag; @@ -234,10 +218,6 @@ final class PhpDumper implements DumperContract /** * Create a new PhpDumper instance. - * - * @param \Viserio\Contract\Container\ContainerBuilder $container - * @param null|\PhpParser\Parser $phpParser - * @param null|\PhpParser\PrettyPrinter\Standard $printer */ public function __construct( ContainerBuilderContract $container, @@ -255,10 +235,6 @@ public function __construct( /** * Sets the dumper to be used when dumping proxies in the generated container. - * - * @param \Viserio\Contract\Container\LazyProxy\Dumper $proxyDumper - * - * @return \Viserio\Contract\Container\Dumper\Dumper */ public function setProxyDumper(LazyProxyContract $proxyDumper): DumperContract { @@ -269,11 +245,6 @@ public function setProxyDumper(LazyProxyContract $proxyDumper): DumperContract /** * Helps to write generated container code to file. - * - * @param string $fileName - * @param string $fileContent - * - * @return bool */ public static function dumpCodeToFile(string $fileName, string $fileContent): bool { @@ -474,8 +445,6 @@ public function dump(array $options = []) * Remove any elements where the value is empty. * * @param array $array the array to walk - * - * @return array */ private function removeEmptyValues(array &$array): array { @@ -494,8 +463,6 @@ private function removeEmptyValues(array &$array): array /** * Compiling the parameters to a protected parameter variable for the container. - * - * @return string */ private function addParameters(): string { @@ -517,8 +484,6 @@ private function addParameters(): string /** * Compiling the dynamic parameters to a protected dynamic parameter variables for the container. - * - * @return string */ private function addDynamicParameters(): string { @@ -537,8 +502,6 @@ private function addDynamicParameters(): string * Check if value is a dynamic value. * * @param bool|float|int|string $value - * - * @return bool */ private function isRuntimeParameterValue($value): bool { @@ -551,8 +514,6 @@ private function isRuntimeParameterValue($value): bool * @throws ReflectionException * @throws \Viserio\Contract\Container\Exception\NotFoundException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return string */ private function addServices(): string { @@ -599,8 +560,6 @@ private function addServices(): string /** * Compiling the deprecated aliases. - * - * @return string */ private function addDeprecatedAliases(): string { @@ -630,14 +589,11 @@ private function addDeprecatedAliases(): string /** * Dump method with doc header and inline services. * - * @param string $id * @param ClosureDefinitionContract|DefinitionContract|FactoryDefinitionContract|ObjectDefinitionContract|UndefinedDefinitionContract $definition * *@throws \Viserio\Contract\Container\Exception\CircularDependencyException * @throws \Viserio\Contract\Container\Exception\NotFoundException * @throws ReflectionException - * - * @return array */ private function addService(string $id, $definition): array { @@ -737,14 +693,9 @@ private function addService(string $id, $definition): array } /** - * @param \Viserio\Contract\Container\Definition\Definition $definition - * @param bool $isProxy - * *@throws \Viserio\Contract\Container\Exception\NotFoundException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException * @throws ReflectionException - * - * @return string */ private function addServiceInclude(DefinitionContract $definition, bool $isProxy): string { @@ -797,14 +748,9 @@ private function addServiceInclude(DefinitionContract $definition, bool $isProxy /** * Add a inline service to the code. * - * @param \Viserio\Contract\Container\Definition\Definition $definition * @param null|\Viserio\Component\Container\Definition\ReferenceDefinition|\Viserio\Contract\Container\Definition\Definition $inlineDef - * @param bool $forConstructor - * @param bool $isProxy * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function addInlineService( DefinitionContract $definition, @@ -911,15 +857,9 @@ private function addInlineService( /** * Add a new service instance to the code. * - * @param \Viserio\Contract\Container\Definition\Definition $definition - * @param bool $isSimpleInstance - * @param bool $isProxy - * *@throws \Viserio\Contract\Container\Exception\NotFoundException * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException * @throws \Viserio\Contract\Container\Exception\RuntimeException - * - * @return string */ private function addServiceInstance( DefinitionContract $definition, @@ -974,11 +914,8 @@ private function addServiceInstance( /** * @param object|string $class - * @param array $lineage * * @throws ReflectionException - * - * @return void */ private function collectLineage($class, array &$lineage): void { @@ -1017,8 +954,6 @@ private function collectLineage($class, array &$lineage): void /** * Add removed ids to the container. - * - * @return string */ private function addRemovedIds(): string { @@ -1057,8 +992,6 @@ private function addRemovedIds(): string /** * Add dynamic processing of parameters to the container. - * - * @return string */ private function addDynamicParameterMethods(): string { @@ -1108,11 +1041,6 @@ private function addDynamicParameterMethods(): string ); } - /** - * @param string $directory - * - * @return void - */ private static function createCompilationDirectory(string $directory): void { if (! \is_dir($directory) && ! \mkdir($directory, 0777, true) && ! \is_dir($directory)) { @@ -1126,15 +1054,6 @@ private static function createCompilationDirectory(string $directory): void /** * Generate a container method. - * - * @param string $uniqueMethodName - * @param string $content - * @param null|string $return - * @param array $parameters - * @param null|string $visibility - * @param bool $static - * - * @return string */ private function generateMethod( string $uniqueMethodName, @@ -1168,13 +1087,7 @@ private function generateMethod( /** * Returns the start of the class. * - * @param string $class - * @param string $parentClass - * @param null|string $namespace - * * @throws ReflectionException - * - * @return string */ private function getClassStartForCompiledClass(string $class, string $parentClass, ?string $namespace): string { @@ -1225,9 +1138,6 @@ private function getClassStartForCompiledClass(string $class, string $parentClas return $code . "{$eol} }"; } - /** - * @return string - */ private function addMethodMap(): string { $definitions = $this->containerBuilder->getDefinitions(); @@ -1260,9 +1170,6 @@ private function addMethodMap(): string return \sprintf("{$eol} \$this->methodMapping = [{$eol}%s ];", \implode('', $methods)); } - /** - * @return string - */ private function addFileMap(): string { $definitions = $this->containerBuilder->getDefinitions(); @@ -1287,8 +1194,6 @@ private function addFileMap(): string /** * Create the alias property for the container. - * - * @return string */ private function addAliases(): string { @@ -1316,8 +1221,6 @@ private function addAliases(): string /** * Create the uninitialized services list for the container. - * - * @return string */ private function addUninitializedServices(): string { @@ -1341,8 +1244,6 @@ private function addUninitializedServices(): string /** * Adds synthetic ids to the compiled container. - * - * @return string */ private function addSyntheticIds(): string { @@ -1377,8 +1278,6 @@ private function addSyntheticIds(): string * @throws \Viserio\Contract\Container\Exception\CircularDependencyException * @throws ReflectionException * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function addInlineRequires(): string { @@ -1418,10 +1317,6 @@ private function addInlineRequires(): string /** * Return the end of the class. - * - * @param null|string $namespace - * - * @return string */ private function getClassEndForCompiledClass(?string $namespace): string { @@ -1466,14 +1361,7 @@ private function getClassEndForCompiledClass(?string $namespace): string } /** - * @param \Viserio\Contract\Container\Definition\Definition $definition - * @param array $arguments - * @param bool $forConstructor - * @param bool $isProxy - * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function addInlineVariables( DefinitionContract $definition, @@ -1500,14 +1388,7 @@ private function addInlineVariables( /** * Add inline reference code. * - * @param \Viserio\Contract\Container\Definition\Definition $definition - * @param string $targetId - * @param bool $forConstructor - * @param bool $isProxy - * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function addInlineReference( DefinitionContract $definition, @@ -1573,9 +1454,6 @@ private function addInlineReference( /** * @param string $sourceId * @param \Viserio\Contract\Container\ServiceReferenceGraphEdge[] $edges - * @param array $checkedNodes - * @param array $currentPath - * @param bool $byConstructor */ private function analyzeCircularReferences( $sourceId, @@ -1605,12 +1483,6 @@ private function analyzeCircularReferences( unset($currentPath[$sourceId]); } - /** - * @param string $sourceId - * @param array $currentPath - * @param mixed $byConstructor - * @param array $subPath - */ private function connectCircularReferences( string $sourceId, array &$currentPath, @@ -1630,13 +1502,6 @@ private function connectCircularReferences( unset($currentPath[$sourceId], $subPath[$sourceId]); } - /** - * @param string $id - * @param array $currentPath - * @param bool $byConstructor - * - * @return void - */ private function addCircularReferences(string $id, array $currentPath, bool $byConstructor): void { $currentPath[$id] = $byConstructor; @@ -1664,12 +1529,7 @@ private function addCircularReferences(string $id, array $currentPath, bool $byC } /** - * @param array $arguments - * @param null|SplObjectStorage $definitions - * @param array $calls - * @param bool $byConstructor - * - * @return SplObjectStorage + * @param bool $byConstructor */ private function getDefinitionsFromArguments( array $arguments, @@ -1738,14 +1598,7 @@ private function getDefinitionsFromArguments( } /** - * @param array $options - * @param array $proxyClasses - * @param string $code - * @param string $classEndCode - * * @throws ReflectionException - * - * @return array */ private function generateFileContainer( array $options, @@ -1844,8 +1697,6 @@ private function generateFileContainer( * Generate proxy classes. * * @throws ReflectionException - * - * @return array */ private function generateProxyClasses(): array { @@ -1905,8 +1756,6 @@ private function generateProxyClasses(): array } /** - * @param array $services - * * @return null|Generator */ private function generateServiceFiles(array $services): Generator @@ -1941,11 +1790,6 @@ private function generateServiceFiles(array $services): Generator /** * Compile know values to executable php code for the compiled container. - * - * @param mixed $value - * @param bool $interpolate - * - * @return string */ private function compileValue($value, bool $interpolate = true): string { @@ -2137,10 +1981,6 @@ function ($match) { * Compile class properties. * * @param \Viserio\Component\Container\Definition\ConditionDefinition|\Viserio\Contract\Container\Definition\FactoryDefinition|\Viserio\Contract\Container\Definition\ObjectDefinition|\Viserio\Contract\Container\Definition\UndefinedDefinition $definition - * @param string $variableName - * @param bool $isProxy - * - * @return string */ private function addServiceProperties($definition, string $variableName = 'instance', bool $isProxy = false): string { @@ -2178,13 +2018,8 @@ private function addServiceProperties($definition, string $variableName = 'insta * Compile object method calls to php code. * * @param \Viserio\Contract\Container\Definition\Definition&\Viserio\Contract\Container\Definition\MethodCallsAwareDefinition $definition - * @param string $variableName - * @param null|string $sharedNonLazyId - * @param bool $isProxy * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function addServiceMethodCalls( $definition, @@ -2241,10 +2076,6 @@ private function addServiceMethodCalls( /** * Dumps a string to a literal (aka PHP Code) class value. - * - * @param string $class - * - * @return string */ private function generateLiteralClass(string $class): string { @@ -2255,12 +2086,6 @@ private function generateLiteralClass(string $class): string /** * Insert string before specified position. - * - * @param string $string - * @param string $insertStr - * @param int $position - * - * @return string */ private function doInsertStringBeforePosition(string $string, string $insertStr, int $position): string { @@ -2269,10 +2094,6 @@ private function doInsertStringBeforePosition(string $string, string $insertStr, /** * Analyze a closure. - * - * @param Closure $closure - * - * @return string */ private function compileClosure(Closure $closure): string { @@ -2376,11 +2197,7 @@ private function compileClosure(Closure $closure): string /** * Analyze a closure. * - * @param string $className - * * @throws ReflectionException - * - * @return array */ private function compileAnonymousObject(string $className): array { @@ -2469,9 +2286,6 @@ private function compileAnonymousObject(string $className): array * Applies missing namespaces to used classes. * * @param \PhpParser\Node\Expr\New_|\PhpParser\Node\Name|\PhpParser\Node\Stmt|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\TraitUse $node - * @param \Viserio\Component\Container\PhpParser\NodeVisitor\UsesCollectorNodeVisitor $usesCollectorNodeVisitor - * - * @return void */ private function applyNamespaceToClass($node, UsesCollectorNodeVisitor $usesCollectorNodeVisitor): void { @@ -2512,11 +2326,8 @@ private function applyNamespaceToClass($node, UsesCollectorNodeVisitor $usesColl * Compile Iterator to a php string code. * * @param array|Traversable $values - * @param bool $interpolate * * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function compileIterator($values, bool $interpolate = true): string { @@ -2561,11 +2372,6 @@ private function compileIterator($values, bool $interpolate = true): string /** * Compile Factroy Definition to a php string code. - * - * @param \Viserio\Contract\Container\Definition\FactoryDefinition $value - * @param bool $interpolate - * - * @return string */ private function compileFactoryDefinition(FactoryDefinitionContract $value, bool $interpolate = true): string { @@ -2627,12 +2433,7 @@ private function compileFactoryDefinition(FactoryDefinitionContract $value, bool /** * Compile Reference Definition to a php string code. * - * @param \Viserio\Contract\Container\Definition\ReferenceDefinition $reference - * @param bool $interpolate - * * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function compileReferenceDefinition( ReferenceDefinitionContract $reference, @@ -2694,10 +2495,6 @@ private function compileReferenceDefinition( /** * Check if the node is used only once. - * - * @param \Viserio\Contract\Container\ServiceReferenceGraphNode $node - * - * @return bool */ private function isSingleUsePrivateNode(ServiceReferenceGraphNodeContract $node): bool { @@ -2728,8 +2525,6 @@ private function isSingleUsePrivateNode(ServiceReferenceGraphNodeContract $node) /** * Returns the next available variable name to use. - * - * @return string */ private function getNextVariableName(): string { @@ -2767,14 +2562,9 @@ private function getNextVariableName(): string /** * Returns the service wrapped in a if condition. * - * @param mixed $value - * @param string $code - * @param bool $isGenerator * @param null|ClosureDefinition|ConditionDefinition|DefinitionContract|FactoryDefinition|IteratorDefinition|ObjectDefinition|UndefinedDefinition $definition * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function wrapServiceConditionals( $value, @@ -2800,11 +2590,7 @@ private function wrapServiceConditionals( /** * Returns the condition for the if wrap. * - * @param mixed $value - * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function getServiceConditionals($value): string { @@ -2835,12 +2621,6 @@ private function getServiceConditionals($value): string /** * Compile a array to php code. - * - * @param array $values - * @param bool $skip - * @param bool $interpolate - * - * @return string */ private function compileArray(array $values, bool $skip = false, bool $interpolate = true): string { @@ -2875,11 +2655,6 @@ private function compileArray(array $values, bool $skip = false, bool $interpola return \sprintf('[' . $eol . '%s' . $eol . \str_repeat(' ', $this->arraySpaceCount) . ']', \implode('' . $eol, $code)); } - /** - * @param string $name - * - * @return string - */ private function compileParameter(string $name): string { if ($this->containerBuilder->hasParameter($name)) { @@ -2901,11 +2676,6 @@ private function compileParameter(string $name): string /** * Compile parameters array to php code. - * - * @param array $values - * @param string $path - * - * @return string */ private function compileParameters(array $values, string $path = ''): string { @@ -2945,11 +2715,6 @@ private function compileParameters(array $values, string $path = ''): string return \sprintf('[' . $eol . '%s' . $eol . \str_repeat(' ', $this->arraySpaceCount) . ']', \implode('' . $eol, $code)); } - /** - * @param mixed $value - * - * @return string - */ private function export($value): string { if (\is_int($value) || \is_float($value)) { @@ -3057,11 +2822,7 @@ private function getPreparedRemovedIds(): array /** * Wrap a code in a if condition. * - * @param string $code - * @param string $condition * @param null|ClosureDefinition|ConditionDefinition|DefinitionContract|FactoryDefinition|IteratorDefinition|ObjectDefinition|UndefinedDefinition $definition - * - * @return string */ private function wrapInConditional(string $code, string $condition, $definition = null): string { @@ -3086,13 +2847,8 @@ private function wrapInConditional(string $code, string $condition, $definition /** * @param \Viserio\Contract\Container\Definition\Definition $inlineDef - * @param string $name - * @param bool $isProxy - * @param null|string $sharedNonLazyId * *@throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function addDefinitionCondition($inlineDef, string $name, bool $isProxy, ?string $sharedNonLazyId): string { @@ -3118,9 +2874,6 @@ private function addDefinitionCondition($inlineDef, string $name, bool $isProxy, */ private $isPublic; - /** - * @param bool $isPublic - */ public function __construct(bool $isPublic) { $this->isPublic = $isPublic; @@ -3164,8 +2917,6 @@ public function isPublic(): bool * *@throws \Viserio\Contract\Container\Exception\NotFoundException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return bool */ private function isTrivialInstance($definition): bool { @@ -3220,10 +2971,6 @@ private function isTrivialInstance($definition): bool /** * Validate the given dumper options. - * - * @param array $options - * - * @return void */ private function validateDumperOptions(array $options): void { @@ -3267,8 +3014,6 @@ private function validateDumperOptions(array $options): void * *@throws \Viserio\Contract\Container\Exception\NotFoundException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return string */ private function getCorrectLineageClass($definition): string { @@ -3300,8 +3045,6 @@ private function getCorrectLineageClass($definition): string * @param string $path * * @throws \LogicException - * - * @return string */ private static function normalizePath($path): string { @@ -3316,8 +3059,6 @@ private static function normalizePath($path): string * Returns the found autoload file path or null if not. * * @throws ReflectionException - * - * @return null|string */ private function getAutoloadFile(): ?string { @@ -3355,14 +3096,7 @@ private function getAutoloadFile(): ?string /** * Generates a preload.php file for PHP 7.4. * - * @param array $code - * @param null|string $autoloadFile - * @param string $hash - * @param string $class - * * @throws ReflectionException - * - * @return array */ private function generatePreloadFile(array $code, ?string $autoloadFile, string $hash, string $class): array { @@ -3400,13 +3134,6 @@ private function generatePreloadFile(array $code, ?string $autoloadFile, string /** * Process parameters to find runtime parameters. - * - * @param mixed $value - * @param null|array $runtimeParameters - * @param null|array $dynamicParameterMapper - * @param bool $isDynamic - * - * @return void */ private function processRuntimeParameters( $value, @@ -3442,10 +3169,6 @@ private function processRuntimeParameters( /** * Check if the definition is a preload one. - * - * @param mixed $definition - * - * @return bool */ private function isPreload($definition): bool { diff --git a/src/Viserio/Component/Container/Dumper/Preloader.php b/src/Viserio/Component/Container/Dumper/Preloader.php index e4dc76ebc..f0171d152 100644 --- a/src/Viserio/Component/Container/Dumper/Preloader.php +++ b/src/Viserio/Component/Container/Dumper/Preloader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Dumper; @@ -24,11 +24,6 @@ */ final class Preloader { - /** - * @param array $classes - * - * @return void - */ public static function preload(array $classes): void { \set_error_handler(function ($t, $m, $f, $l): void { @@ -61,12 +56,6 @@ public static function preload(array $classes): void } } - /** - * @param string $class - * @param array $preloaded - * - * @return void - */ private static function doPreload(string $class, array &$preloaded): void { if (isset($preloaded[$class]) || \in_array($class, ['self', 'static', 'parent'], true)) { diff --git a/src/Viserio/Component/Container/Dumper/Util.php b/src/Viserio/Component/Container/Dumper/Util.php index 3d477ffa7..5aa767ea0 100644 --- a/src/Viserio/Component/Container/Dumper/Util.php +++ b/src/Viserio/Component/Container/Dumper/Util.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Dumper; @@ -84,11 +84,7 @@ public static function stripComments($source): string /** * Check if file exist or is empty. * - * @param string $filename - * * @throws \Viserio\Contract\Container\Exception\RuntimeException - * - * @return void */ public static function checkFile(string $filename): void { diff --git a/src/Viserio/Component/Container/Helper/Reflection.php b/src/Viserio/Component/Container/Helper/Reflection.php index 53bc5dac8..9ccc52377 100644 --- a/src/Viserio/Component/Container/Helper/Reflection.php +++ b/src/Viserio/Component/Container/Helper/Reflection.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Helper; @@ -38,9 +38,6 @@ public function __construct() /** * Expands class name into full name. * - * @param string $name - * @param ReflectionClass $rc - * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException */ public static function expandClassName(string $name, ReflectionClass $rc): string @@ -80,8 +77,6 @@ public static function expandClassName(string $name, ReflectionClass $rc): strin } /** - * @param ReflectionClass $class - * * @return array of [alias => class] */ public static function getUseStatements(ReflectionClass $class): array @@ -106,11 +101,6 @@ public static function getUseStatements(ReflectionClass $class): array /** * Parses PHP code to [class => [alias => class, ...]]. - * - * @param string $code - * @param null|string $forClass - * - * @return array */ private static function parseUseStatements(string $code, ?string $forClass = null): array { @@ -133,7 +123,6 @@ private static function parseUseStatements(string $code, ?string $forClass = nul $uses = []; break; - case \T_CLASS: case \T_INTERFACE: case \T_TRAIT: @@ -148,7 +137,6 @@ private static function parseUseStatements(string $code, ?string $forClass = nul } break; - case \T_USE: while (! $class && ($name = self::fetch($tokens, [\T_STRING, \T_NS_SEPARATOR]))) { $name = \ltrim($name, '\\'); @@ -179,14 +167,12 @@ private static function parseUseStatements(string $code, ?string $forClass = nul } break; - case \T_CURLY_OPEN: case \T_DOLLAR_OPEN_CURLY_BRACES: case '{': $level++; break; - case '}': if ($level === $classLevel) { $class = $classLevel = null; @@ -199,10 +185,7 @@ private static function parseUseStatements(string $code, ?string $forClass = nul } /** - * @param array $tokens * @param string|string[] $take - * - * @return null|string */ private static function fetch(array &$tokens, $take): ?string { diff --git a/src/Viserio/Component/Container/LazyProxy/LazyLoadingValueHolderGenerator.php b/src/Viserio/Component/Container/LazyProxy/LazyLoadingValueHolderGenerator.php index 0c403ac50..f64d4d749 100644 --- a/src/Viserio/Component/Container/LazyProxy/LazyLoadingValueHolderGenerator.php +++ b/src/Viserio/Component/Container/LazyProxy/LazyLoadingValueHolderGenerator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\LazyProxy; @@ -35,11 +35,6 @@ final class LazyLoadingValueHolderGenerator extends BaseGenerator /** @var bool */ private $fluentSafe = false; - /** - * @param bool $fluentSafe - * - * @return void - */ public function setFluentSafe(bool $fluentSafe): void { $this->fluentSafe = $fluentSafe; @@ -132,10 +127,6 @@ public function generate(ReflectionClass $originalClass, ClassGenerator $classGe /** * Get proxified class FQN. - * - * @param \Viserio\Contract\Container\Definition\ObjectDefinition $definition - * - * @return null|string */ public function getProxifiedClass(ObjectDefinitionContract $definition): ?string { diff --git a/src/Viserio/Component/Container/LazyProxy/ProxyDumper.php b/src/Viserio/Component/Container/LazyProxy/ProxyDumper.php index 8006be0d1..1c6682a78 100644 --- a/src/Viserio/Component/Container/LazyProxy/ProxyDumper.php +++ b/src/Viserio/Component/Container/LazyProxy/ProxyDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\LazyProxy; @@ -113,11 +113,6 @@ public function getProxyFactoryCode(ObjectDefinitionContract $definition, string return " {$instantiation} \$this->createProxy('{$proxyClass}', {$static}function () {{$eol} return {$proxyClass}::staticProxyConstructor({$static}function (&\$wrappedInstance, \\ProxyManager\\Proxy\\LazyLoadingInterface \$proxy) {{$eol}{$factoryCode}{$eol} \$proxy->setProxyInitializer(null);{$eol}{$eol} return true;{$eol} });{$eol} });"; } - /** - * @param \Viserio\Contract\Container\Definition\ObjectDefinition $definition - * - * @return \Zend\Code\Generator\ClassGenerator - */ private function generateProxyClass(ObjectDefinitionContract $definition): ClassGenerator { $generatedClass = new ClassGenerator($this->getProxyClassName($definition)); @@ -130,9 +125,6 @@ private function generateProxyClass(ObjectDefinitionContract $definition): Class return $generatedClass; } - /** - * @return string - */ private static function getProxyManagerVersion(): string { return \defined(Version::class . '::VERSION') ? Version::VERSION : Version::getVersion(); @@ -140,10 +132,6 @@ private static function getProxyManagerVersion(): string /** * Produces the proxy class name for the given definition. - * - * @param \Viserio\Contract\Container\Definition\ObjectDefinition $definition - * - * @return string */ private function getProxyClassName(ObjectDefinitionContract $definition): string { @@ -152,11 +140,6 @@ private function getProxyClassName(ObjectDefinitionContract $definition): string return \preg_replace('/^.*\\\\/', '', $class) . '_' . $this->getIdentifierSuffix($definition); } - /** - * @param \Viserio\Contract\Container\Definition\ObjectDefinition $definition - * - * @return string - */ private function getIdentifierSuffix(ObjectDefinitionContract $definition): string { return ContainerBuilder::getHash($this->proxyGenerator->getProxifiedClass($definition)); diff --git a/src/Viserio/Component/Container/PhpParser/MemoizingParser.php b/src/Viserio/Component/Container/PhpParser/MemoizingParser.php index f3cff3867..ff6c448f6 100644 --- a/src/Viserio/Component/Container/PhpParser/MemoizingParser.php +++ b/src/Viserio/Component/Container/PhpParser/MemoizingParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser; @@ -39,8 +39,6 @@ final class MemoizingParser implements Parser /** * Create a new MemoizingParser instance. - * - * @param \PhpParser\Parser $wrappedParser */ public function __construct(Parser $wrappedParser) { diff --git a/src/Viserio/Component/Container/PhpParser/NodeVisitor/AnonymousClassLocatorVisitor.php b/src/Viserio/Component/Container/PhpParser/NodeVisitor/AnonymousClassLocatorVisitor.php index 1dcac81bb..55035bfa4 100644 --- a/src/Viserio/Component/Container/PhpParser/NodeVisitor/AnonymousClassLocatorVisitor.php +++ b/src/Viserio/Component/Container/PhpParser/NodeVisitor/AnonymousClassLocatorVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser\NodeVisitor; @@ -41,8 +41,6 @@ final class AnonymousClassLocatorVisitor extends NodeVisitorAbstract /** * Create a new AnonymousClassLocatorVisitor instance. - * - * @param ReflectionClass $reflection */ public function __construct(ReflectionClass $reflection) { diff --git a/src/Viserio/Component/Container/PhpParser/NodeVisitor/ClosureLocatorVisitor.php b/src/Viserio/Component/Container/PhpParser/NodeVisitor/ClosureLocatorVisitor.php index 55bd6d84e..3c794f924 100644 --- a/src/Viserio/Component/Container/PhpParser/NodeVisitor/ClosureLocatorVisitor.php +++ b/src/Viserio/Component/Container/PhpParser/NodeVisitor/ClosureLocatorVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser\NodeVisitor; @@ -46,8 +46,6 @@ final class ClosureLocatorVisitor extends NodeVisitorAbstract /** * Create a new ClosureNodeVisitor instance. - * - * @param ReflectionFunction $reflection */ public function __construct(ReflectionFunction $reflection) { diff --git a/src/Viserio/Component/Container/PhpParser/NodeVisitor/MagicConstantVisitor.php b/src/Viserio/Component/Container/PhpParser/NodeVisitor/MagicConstantVisitor.php index bf2cdfc8d..8e17ce00b 100644 --- a/src/Viserio/Component/Container/PhpParser/NodeVisitor/MagicConstantVisitor.php +++ b/src/Viserio/Component/Container/PhpParser/NodeVisitor/MagicConstantVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser\NodeVisitor; @@ -31,8 +31,6 @@ final class MagicConstantVisitor extends NodeVisitor /** * Create a new MagicConstantVisitor instance. - * - * @param array $location */ public function __construct(array $location) { diff --git a/src/Viserio/Component/Container/PhpParser/NodeVisitor/ThisDetectorVisitor.php b/src/Viserio/Component/Container/PhpParser/NodeVisitor/ThisDetectorVisitor.php index 298f346b7..7c92cb62a 100644 --- a/src/Viserio/Component/Container/PhpParser/NodeVisitor/ThisDetectorVisitor.php +++ b/src/Viserio/Component/Container/PhpParser/NodeVisitor/ThisDetectorVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser\NodeVisitor; diff --git a/src/Viserio/Component/Container/PhpParser/NodeVisitor/UsesCollectorNodeVisitor.php b/src/Viserio/Component/Container/PhpParser/NodeVisitor/UsesCollectorNodeVisitor.php index 9dec62dbb..c5f2201d2 100644 --- a/src/Viserio/Component/Container/PhpParser/NodeVisitor/UsesCollectorNodeVisitor.php +++ b/src/Viserio/Component/Container/PhpParser/NodeVisitor/UsesCollectorNodeVisitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser\NodeVisitor; @@ -28,9 +28,6 @@ class UsesCollectorNodeVisitor extends NodeVisitorAbstract /** @var null|Namespace_ */ private $currentNamespace; - /** - * @return array - */ public function getUses(): array { if ($this->currentNamespace === null) { diff --git a/src/Viserio/Component/Container/PhpParser/PrettyPrinter.php b/src/Viserio/Component/Container/PhpParser/PrettyPrinter.php index c196bfeb0..fecf429c3 100644 --- a/src/Viserio/Component/Container/PhpParser/PrettyPrinter.php +++ b/src/Viserio/Component/Container/PhpParser/PrettyPrinter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser; @@ -62,8 +62,6 @@ public function __construct(array $options = []) /** * @param null|\PhpParser\Node|\PhpParser\Node[] $node - * - * @return string */ public function prettyPrint($node): string { @@ -90,10 +88,6 @@ public function prettyPrint($node): string * - or the end of the string * * Prevents `Vendor\Class` => `Vendor\\Class`. - * - * @param string $string - * - * @return string */ protected function pSingleQuotedString(string $string): string { @@ -102,10 +96,6 @@ protected function pSingleQuotedString(string $string): string /** * Add space after "use (". - * - * @param \PhpParser\Node\Expr\Closure $node - * - * @return string */ protected function pExpr_Closure(Closure $node): string { @@ -117,10 +107,6 @@ protected function pExpr_Closure(Closure $node): string * * Before: return [['item']]; * After: yield ['item']; - * - * @param \PhpParser\Node\Expr\Yield_ $node - * - * @return string */ protected function pExpr_Yield(Yield_ $node): string { @@ -143,10 +129,6 @@ protected function pExpr_Yield(Yield_ $node): string /** * Print arrays in short [] by default, * to prevent manual explicit array shortening. - * - * @param \PhpParser\Node\Expr\Array_ $node - * - * @return string */ protected function pExpr_Array(Array_ $node): string { @@ -161,10 +143,6 @@ protected function pExpr_Array(Array_ $node): string * Allows PHP 7.3 trailing comma in multiline args. * * @see printArgs() bellow - * - * @param \PhpParser\Node\Expr\FuncCall $node - * - * @return string */ protected function pExpr_FuncCall(FuncCall $node): string { @@ -175,10 +153,6 @@ protected function pExpr_FuncCall(FuncCall $node): string * Allows PHP 7.3 trailing comma in multiline args. * * @see printArgs() bellow - * - * @param \PhpParser\Node\Expr\MethodCall $node - * - * @return string */ protected function pExpr_MethodCall(MethodCall $node): string { @@ -194,10 +168,6 @@ protected function pExpr_MethodCall(MethodCall $node): string * Allows PHP 7.3 trailing comma in multiline args. * * @see printArgs() bellow - * - * @param \PhpParser\Node\Expr\StaticCall $node - * - * @return string */ protected function pExpr_StaticCall(StaticCall $node): string { @@ -213,11 +183,7 @@ protected function pExpr_StaticCall(StaticCall $node): string /** * Fixes escaping of regular patterns. * - * @param \PhpParser\Node\Scalar\String_ $node - * * @throws Exception - * - * @return string */ protected function pScalar_String(String_ $node): string { @@ -234,10 +200,6 @@ protected function pScalar_String(String_ $node): string * "...$params) : ReturnType" * ↓ * "...$params): ReturnType". - * - * @param \PhpParser\Node\Stmt\ClassMethod $node - * - * @return string */ protected function pStmt_ClassMethod(ClassMethod $node): string { @@ -262,8 +224,6 @@ protected function pStmt_ClassMethod(ClassMethod $node): string * changes) adds 4 spaces onto that. This is why we don't * also need to handle indent levels of 5, 9, etc: these * do not occur (at least in the code we generate); - * - * @param int $level */ protected function setIndentLevel(int $level): void { @@ -280,8 +240,6 @@ protected function setIndentLevel(int $level): void * @param \PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall $node * * @throws ReflectionException - * - * @return string */ private function printArgs($node): string { diff --git a/src/Viserio/Component/Container/PhpParser/Reflection/PrivatesCaller.php b/src/Viserio/Component/Container/PhpParser/Reflection/PrivatesCaller.php index 37ba44a3d..a55b4c873 100644 --- a/src/Viserio/Component/Container/PhpParser/Reflection/PrivatesCaller.php +++ b/src/Viserio/Component/Container/PhpParser/Reflection/PrivatesCaller.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\PhpParser\Reflection; @@ -23,12 +23,9 @@ final class PrivatesCaller * Call a private method from a class. * * @param object|string $object - * @param string $methodName * @param array $arguments * * @throws ReflectionException - * - * @return mixed */ public static function callPrivateMethod($object, string $methodName, ...$arguments) { @@ -45,12 +42,8 @@ public static function callPrivateMethod($object, string $methodName, ...$argume * Call a private method with a reference from a class. * * @param object|string $object - * @param string $methodName - * @param mixed $argument * * @throws ReflectionException - * - * @return mixed */ public static function callPrivateMethodWithReference($object, string $methodName, $argument) { @@ -66,11 +59,8 @@ public static function callPrivateMethodWithReference($object, string $methodNam /** * @param object|string $object - * @param string $methodName * * @throws ReflectionException - * - * @return ReflectionMethod */ private static function createAccessibleMethodReflection($object, string $methodName): ReflectionMethod { diff --git a/src/Viserio/Component/Container/Pipeline/AbstractRecursivePipe.php b/src/Viserio/Component/Container/Pipeline/AbstractRecursivePipe.php index 6a7b1af35..14913473d 100644 --- a/src/Viserio/Component/Container/Pipeline/AbstractRecursivePipe.php +++ b/src/Viserio/Component/Container/Pipeline/AbstractRecursivePipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -58,9 +58,6 @@ public function process(ContainerBuilderContract $containerBuilder): void /** * Processes a value found in a definition tree. * - * @param mixed $value - * @param bool $isRoot - * * @return mixed The processed value */ protected function processValue($value, bool $isRoot = false) diff --git a/src/Viserio/Component/Container/Pipeline/AnalyzeServiceDependenciesPipe.php b/src/Viserio/Component/Container/Pipeline/AnalyzeServiceDependenciesPipe.php index 638b961c9..775249208 100644 --- a/src/Viserio/Component/Container/Pipeline/AnalyzeServiceDependenciesPipe.php +++ b/src/Viserio/Component/Container/Pipeline/AnalyzeServiceDependenciesPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -36,29 +36,21 @@ final class AnalyzeServiceDependenciesPipe extends AbstractRecursivePipe { /** * Check if properties and methods parameter should be analyzed. - * - * @var bool */ private bool $onlyConstructorArguments; /** * Check if proxy dumper is used. - * - * @var bool */ private bool $hasProxyDumper; /** * Check if value is lazy. - * - * @var bool */ private bool $lazy; /** * Check if it was run by constructor parameters. - * - * @var bool */ private bool $byConstructor; @@ -92,9 +84,6 @@ final class AnalyzeServiceDependenciesPipe extends AbstractRecursivePipe /** * Create a new analyze service dependencies instance. - * - * @param bool $onlyConstructorArguments - * @param bool $hasProxyDumper */ public function __construct(bool $onlyConstructorArguments = false, bool $hasProxyDumper = true) { @@ -260,8 +249,6 @@ protected function processValue($value, $isRoot = false) * Find definition id. * * @param \Viserio\Contract\Container\Definition\AliasDefinition|\Viserio\Contract\Container\Definition\Definition|\Viserio\Contract\Container\Definition\ReferenceDefinition $definition - * - * @return null|string */ private function getDefinitionId($definition): ?string { diff --git a/src/Viserio/Component/Container/Pipeline/AutowireArgumentArrayPipe.php b/src/Viserio/Component/Container/Pipeline/AutowireArgumentArrayPipe.php index b8d3cd5f0..a75293460 100644 --- a/src/Viserio/Component/Container/Pipeline/AutowireArgumentArrayPipe.php +++ b/src/Viserio/Component/Container/Pipeline/AutowireArgumentArrayPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -88,12 +88,6 @@ public function process(ContainerBuilderContract $containerBuilder): void } } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $containerBuilder - * @param \Viserio\Contract\Container\Definition\Definition $definition - * - * @return bool - */ private function shouldSkipDefinition( ContainerBuilderContract $containerBuilder, DefinitionContract $definition @@ -138,11 +132,7 @@ private function shouldSkipDefinition( } /** - * @param \Viserio\Contract\Container\ContainerBuilder $containerBuilder - * @param ReflectionMethod $reflectionMethod * @param \Viserio\Contract\Container\Definition\FactoryDefinition|\Viserio\Contract\Container\Definition\ObjectDefinition $definition - * - * @return void */ private function processParameters( ContainerBuilderContract $containerBuilder, @@ -162,11 +152,7 @@ private function processParameters( } /** - * @param ReflectionMethod $reflectionMethod * @param \Viserio\Contract\Container\Definition\FactoryDefinition|\Viserio\Contract\Container\Definition\ObjectDefinition $definition - * @param ReflectionParameter $reflectionParameter - * - * @return bool */ private function shouldSkipParameter( ReflectionMethod $reflectionMethod, @@ -208,12 +194,6 @@ private function shouldSkipParameter( return false; } - /** - * @param string $parameterName - * @param ReflectionMethod $reflectionMethod - * - * @return null|string - */ private function resolveParameterType(string $parameterName, ReflectionMethod $reflectionMethod): ?string { $parameterDocTypeRegex = '#@param[ \t]+(?[\w\\\\]+)\[\][ \t]+\$' . $parameterName . '#'; @@ -249,9 +229,6 @@ private function createReferencesFromDefinitions(array $definitions): array } /** - * @param \Viserio\Contract\Container\ContainerBuilder $containerBuilder - * @param string $type - * * @return \Viserio\Contract\Container\Definition\Definition[] */ private function findAllByType(ContainerBuilderContract $containerBuilder, string $type): array diff --git a/src/Viserio/Component/Container/Pipeline/AutowirePipe.php b/src/Viserio/Component/Container/Pipeline/AutowirePipe.php index ca8f901e7..701c8fdd5 100644 --- a/src/Viserio/Component/Container/Pipeline/AutowirePipe.php +++ b/src/Viserio/Component/Container/Pipeline/AutowirePipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -241,15 +241,10 @@ protected function getServicesAndAliases(): array /** * Resolve methods calls. * - * @param ReflectionClass $reflectionClass - * @param bool $isRoot - * * @throws ReflectionException * @throws \Viserio\Contract\Container\Exception\UnresolvableDependencyException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return void */ private function autowireCalls(ReflectionClass $reflectionClass, bool $isRoot): void { @@ -294,9 +289,6 @@ private function autowireCalls(ReflectionClass $reflectionClass, bool $isRoot): /** * Autowires the constructor or a method. * - * @param ReflectionFunctionAbstract $reflectionMethod - * @param array $arguments - * * @throws \Viserio\Contract\Container\Exception\UnresolvableDependencyException * @throws ReflectionException * @@ -412,12 +404,8 @@ private function autowireMethod(ReflectionFunctionAbstract $reflectionMethod, ar /** * Returns a service to the matching the given type, if any exist. * - * @param \Viserio\Contract\Container\Definition\ReferenceDefinition $reference - * * @throws \Viserio\Contract\Container\Exception\CircularDependencyException * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return null|\Viserio\Contract\Container\Definition\ReferenceDefinition */ private function getAutowiredReference(ReferenceDefinitionContract $reference): ?ReferenceDefinitionContract { diff --git a/src/Viserio/Component/Container/Pipeline/CheckArgumentsValidityPipe.php b/src/Viserio/Component/Container/Pipeline/CheckArgumentsValidityPipe.php index 2a87ff4cf..5ef3c8540 100644 --- a/src/Viserio/Component/Container/Pipeline/CheckArgumentsValidityPipe.php +++ b/src/Viserio/Component/Container/Pipeline/CheckArgumentsValidityPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/CheckCircularReferencesPipe.php b/src/Viserio/Component/Container/Pipeline/CheckCircularReferencesPipe.php index 540fbb45c..7054cdca5 100644 --- a/src/Viserio/Component/Container/Pipeline/CheckCircularReferencesPipe.php +++ b/src/Viserio/Component/Container/Pipeline/CheckCircularReferencesPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -48,8 +48,6 @@ public function process(ContainerBuilderContract $containerBuilder): void * @param \Viserio\Contract\Container\ServiceReferenceGraphEdge[] $edges An array of Edges * * @throws \Viserio\Contract\Container\Exception\CircularDependencyException when a circular reference is found - * - * @return void */ private function checkOutEdges(array $edges): void { diff --git a/src/Viserio/Component/Container/Pipeline/CheckDefinitionConditionsPipe.php b/src/Viserio/Component/Container/Pipeline/CheckDefinitionConditionsPipe.php index a9448c465..4f39e31aa 100644 --- a/src/Viserio/Component/Container/Pipeline/CheckDefinitionConditionsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/CheckDefinitionConditionsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -21,11 +21,6 @@ class CheckDefinitionConditionsPipe implements PipeContract { - /** - * @param ContainerBuilder $containerBuilder - * - * @return void - */ public function process(ContainerBuilder $containerBuilder): void { foreach ($containerBuilder->getDefinitions() as $id => $definition) { diff --git a/src/Viserio/Component/Container/Pipeline/DecoratorServicePipe.php b/src/Viserio/Component/Container/Pipeline/DecoratorServicePipe.php index ccf28c576..bd40ae54c 100644 --- a/src/Viserio/Component/Container/Pipeline/DecoratorServicePipe.php +++ b/src/Viserio/Component/Container/Pipeline/DecoratorServicePipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/ExtendedDefinitionPipe.php b/src/Viserio/Component/Container/Pipeline/ExtendedDefinitionPipe.php index 9813269a7..13f853c65 100644 --- a/src/Viserio/Component/Container/Pipeline/ExtendedDefinitionPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ExtendedDefinitionPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/InlineServiceDefinitionsPipe.php b/src/Viserio/Component/Container/Pipeline/InlineServiceDefinitionsPipe.php index c61129836..cc78ed74a 100644 --- a/src/Viserio/Component/Container/Pipeline/InlineServiceDefinitionsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/InlineServiceDefinitionsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -202,9 +202,6 @@ protected function processValue($value, bool $isRoot = false) /** * Checks if the definition is inlineable. * - * @param string $id - * @param \Viserio\Contract\Container\Definition\Definition $definition - * * @throws \Viserio\Contract\Container\Exception\NotFoundException * * @return bool If the definition is inlineable diff --git a/src/Viserio/Component/Container/Pipeline/RegisterParameterProcessorsPipe.php b/src/Viserio/Component/Container/Pipeline/RegisterParameterProcessorsPipe.php index 3d51445d6..308ea02b1 100644 --- a/src/Viserio/Component/Container/Pipeline/RegisterParameterProcessorsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/RegisterParameterProcessorsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -50,8 +50,6 @@ final class RegisterParameterProcessorsPipe implements PipeContract /** * Create a new RegisterParameterProcessorsPipe instance. - * - * @param string $tag */ public function __construct(string $tag = self::TAG) { diff --git a/src/Viserio/Component/Container/Pipeline/RemovePrivateAliasesPipe.php b/src/Viserio/Component/Container/Pipeline/RemovePrivateAliasesPipe.php index 88fca35fa..ae77ff1d4 100644 --- a/src/Viserio/Component/Container/Pipeline/RemovePrivateAliasesPipe.php +++ b/src/Viserio/Component/Container/Pipeline/RemovePrivateAliasesPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/RemoveUninitializedReferencesInMethodCallsPipe.php b/src/Viserio/Component/Container/Pipeline/RemoveUninitializedReferencesInMethodCallsPipe.php index b4e9419eb..3a8765e4c 100644 --- a/src/Viserio/Component/Container/Pipeline/RemoveUninitializedReferencesInMethodCallsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/RemoveUninitializedReferencesInMethodCallsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/RemoveUnusedDefinitionsPipe.php b/src/Viserio/Component/Container/Pipeline/RemoveUnusedDefinitionsPipe.php index 47e91b5ba..a9f807be4 100644 --- a/src/Viserio/Component/Container/Pipeline/RemoveUnusedDefinitionsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/RemoveUnusedDefinitionsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/ReplaceAliasByActualDefinitionPipe.php b/src/Viserio/Component/Container/Pipeline/ReplaceAliasByActualDefinitionPipe.php index e5b02cb2d..2ef93b3b2 100644 --- a/src/Viserio/Component/Container/Pipeline/ReplaceAliasByActualDefinitionPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ReplaceAliasByActualDefinitionPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipe.php b/src/Viserio/Component/Container/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipe.php index f3a60ccba..e247a39b0 100644 --- a/src/Viserio/Component/Container/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/ResolveFactoryClassPipe.php b/src/Viserio/Component/Container/Pipeline/ResolveFactoryClassPipe.php index 3e17739c8..834cd06dc 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolveFactoryClassPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolveFactoryClassPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/ResolveInvalidReferencesPipe.php b/src/Viserio/Component/Container/Pipeline/ResolveInvalidReferencesPipe.php index e1462940e..0ff19d309 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolveInvalidReferencesPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolveInvalidReferencesPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -64,14 +64,8 @@ public function process(ContainerBuilderContract $containerBuilder): void /** * Processes arguments to determine invalid references. * - * @param mixed $value - * @param int $rootLevel - * @param int $level - * *@throws \Viserio\Contract\Container\Exception\NotFoundException When a service is not found * @throws \Viserio\Contract\Container\Exception\RuntimeException When an invalid reference is found - * - * @return mixed */ private function processValue($value, int $rootLevel = 0, int $level = 0) { diff --git a/src/Viserio/Component/Container/Pipeline/ResolveParameterPlaceHolderPipe.php b/src/Viserio/Component/Container/Pipeline/ResolveParameterPlaceHolderPipe.php index d7e13d8f6..095653c9c 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolveParameterPlaceHolderPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolveParameterPlaceHolderPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -32,8 +32,6 @@ final class ResolveParameterPlaceHolderPipe extends AbstractRecursivePipe { /** * Check if the param resolver should throw a exception on missing placeholder value. - * - * @var bool */ private bool $throwOnResolveException; @@ -185,7 +183,6 @@ protected function processValue($value, $isRoot = false) /** * Replaces parameter placeholders ({name}) by their values. * - * @param mixed $value * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) * * @throws \Viserio\Contract\Container\Exception\CircularParameterException if a circular reference if detected @@ -215,13 +212,10 @@ private function resolveValue($value, array $resolving = []) /** * Resolve a string expression. * - * @param string $expression - * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) + * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) * * @throws \Viserio\Contract\Container\Exception\CircularParameterException if a circular reference if detected * @throws \Viserio\Contract\Container\Exception\RuntimeException when a given parameter has a type problem - * - * @return mixed */ private function resolveString(string $expression, array $resolving = []) { diff --git a/src/Viserio/Component/Container/Pipeline/ResolveParameterProcessorPlaceHolderPipe.php b/src/Viserio/Component/Container/Pipeline/ResolveParameterProcessorPlaceHolderPipe.php index 97fa2a44d..3a6e9a4a2 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolveParameterProcessorPlaceHolderPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolveParameterProcessorPlaceHolderPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -136,9 +136,6 @@ protected function processValue($value, bool $isRoot = false) /** * Replaces process parameter placeholders ({name|process}) by their values. * - * @param mixed $value - * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) - * * @throws \Viserio\Contract\Container\Exception\CircularParameterException if a circular reference if detected * @throws \Viserio\Contract\Container\Exception\RuntimeException when a given parameter has a type problem * diff --git a/src/Viserio/Component/Container/Pipeline/ResolvePreloadPipe.php b/src/Viserio/Component/Container/Pipeline/ResolvePreloadPipe.php index 43f38f248..d0f735c50 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolvePreloadPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolvePreloadPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -30,8 +30,6 @@ class ResolvePreloadPipe extends AbstractRecursivePipe /** * Create a new ResolvePreloadPipe instance. - * - * @param string $tagName */ public function __construct(string $tagName = self::TAG) { diff --git a/src/Viserio/Component/Container/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipe.php b/src/Viserio/Component/Container/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipe.php index fc1df07f6..890fb775d 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -59,12 +59,7 @@ protected function processValue($value, $isRoot = false) /** * Get definition id. * - * @param string $id - * @param \Viserio\Contract\Container\ContainerBuilder $container - * * @throws \Viserio\Contract\Container\Exception\NotFoundException - * - * @return string */ private function getDefinitionId(string $id, ContainerBuilderContract $container): string { diff --git a/src/Viserio/Component/Container/Pipeline/ResolveUndefinedDefinitionPipe.php b/src/Viserio/Component/Container/Pipeline/ResolveUndefinedDefinitionPipe.php index c1c871a3e..259f015c6 100644 --- a/src/Viserio/Component/Container/Pipeline/ResolveUndefinedDefinitionPipe.php +++ b/src/Viserio/Component/Container/Pipeline/ResolveUndefinedDefinitionPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; diff --git a/src/Viserio/Component/Container/Pipeline/UnusedTagsPipe.php b/src/Viserio/Component/Container/Pipeline/UnusedTagsPipe.php index aef1c1002..5e0580023 100644 --- a/src/Viserio/Component/Container/Pipeline/UnusedTagsPipe.php +++ b/src/Viserio/Component/Container/Pipeline/UnusedTagsPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Pipeline; @@ -27,8 +27,6 @@ class UnusedTagsPipe implements PipeContract /** * Create a new UnusedTagsPipe instance. - * - * @param array $whitelist */ public function __construct(array $whitelist) { diff --git a/src/Viserio/Component/Container/PipelineConfig.php b/src/Viserio/Component/Container/PipelineConfig.php index 8de55ef8c..6f198aaae 100644 --- a/src/Viserio/Component/Container/PipelineConfig.php +++ b/src/Viserio/Component/Container/PipelineConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -57,36 +57,26 @@ final class PipelineConfig /** * List of the after removing pipelines. - * - * @var array */ private array $afterRemovingPipelines = []; /** * List of the before optimization pipelines. - * - * @var array */ private array $beforeOptimizationPipelines = []; /** * List of the before removing pipelines. - * - * @var array */ private array $beforeRemovingPipelines = []; /** * List of the optimization pipelines. - * - * @var array */ private array $optimizationPipelines = []; /** * List of the removing pipelines. - * - * @var array */ private array $removingPipelines = []; @@ -146,8 +136,6 @@ public function getAfterRemovingPipelines(): array * Sets the AfterRemoving pipelines. * * @param \Viserio\Contract\Container\Pipe[] $pipelines - * - * @return void */ public function setAfterRemovingPipelines(array $pipelines): void { @@ -168,8 +156,6 @@ public function getBeforeOptimizationPipelines(): array * Sets the BeforeOptimization pipelines. * * @param \Viserio\Contract\Container\Pipe[] $pipelines - * - * @return void */ public function setBeforeOptimizationPipelines(array $pipelines): void { @@ -190,8 +176,6 @@ public function getBeforeRemovingPipelines(): array * Sets the BeforeRemoving pipelines. * * @param \Viserio\Contract\Container\Pipe[] $pipelines - * - * @return void */ public function setBeforeRemovingPipelines(array $pipelines): void { @@ -212,8 +196,6 @@ public function getOptimizationPipelines(): array * Sets the Optimization pipelines. * * @param \Viserio\Contract\Container\Pipe[] $pipelines - * - * @return void */ public function setOptimizationPipelines(array $pipelines): void { @@ -234,8 +216,6 @@ public function getRemovingPipelines(): array * Sets the Removing pipelines. * * @param \Viserio\Contract\Container\Pipe[] $pipelines - * - * @return void */ public function setRemovingPipelines(array $pipelines): void { @@ -250,8 +230,6 @@ public function setRemovingPipelines(array $pipelines): void * @param int $priority Used to sort the pipelines * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException when a pipeline type doesn't exist - * - * @return void */ public function addPipe( PipeContract $pipeline, @@ -300,8 +278,6 @@ public function getPipelines(): array /** * Sort pipelines by priority. * - * @param array $pipelines - * * @return \Viserio\Contract\Container\Pipe[] */ private function sortPipelines(array $pipelines): array diff --git a/src/Viserio/Component/Container/Processor/AbstractParameterProcessor.php b/src/Viserio/Component/Container/Processor/AbstractParameterProcessor.php index 115ab7360..a6c8893c2 100644 --- a/src/Viserio/Component/Container/Processor/AbstractParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/AbstractParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; @@ -36,8 +36,6 @@ public function supports(string $parameter): bool /** * Returns key name, the process that should be used and a replace string. * - * @param string $parameter - * * @return array */ protected function getData(string $parameter): array diff --git a/src/Viserio/Component/Container/Processor/Base64ParameterProcessor.php b/src/Viserio/Component/Container/Processor/Base64ParameterProcessor.php index e600dbda5..0455b7024 100644 --- a/src/Viserio/Component/Container/Processor/Base64ParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/Base64ParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/ConstantProcessor.php b/src/Viserio/Component/Container/Processor/ConstantProcessor.php index d59b343d8..87500fb63 100644 --- a/src/Viserio/Component/Container/Processor/ConstantProcessor.php +++ b/src/Viserio/Component/Container/Processor/ConstantProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/CsvParameterProcessor.php b/src/Viserio/Component/Container/Processor/CsvParameterProcessor.php index c6dee76ff..2f397b542 100644 --- a/src/Viserio/Component/Container/Processor/CsvParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/CsvParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/EnvParameterProcessor.php b/src/Viserio/Component/Container/Processor/EnvParameterProcessor.php index 85dbc6479..757562fd6 100644 --- a/src/Viserio/Component/Container/Processor/EnvParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/EnvParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/FileParameterProcessor.php b/src/Viserio/Component/Container/Processor/FileParameterProcessor.php index ace3b38b3..50cbd92bb 100644 --- a/src/Viserio/Component/Container/Processor/FileParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/FileParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/JsonParameterProcessor.php b/src/Viserio/Component/Container/Processor/JsonParameterProcessor.php index fe4811429..9933d6110 100644 --- a/src/Viserio/Component/Container/Processor/JsonParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/JsonParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/PhpTypeParameterProcessor.php b/src/Viserio/Component/Container/Processor/PhpTypeParameterProcessor.php index 70ab2be4b..da1370dcf 100644 --- a/src/Viserio/Component/Container/Processor/PhpTypeParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/PhpTypeParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/Processor/ResolveRuntimeParameterProcessor.php b/src/Viserio/Component/Container/Processor/ResolveRuntimeParameterProcessor.php index e8fbe7283..00aa8cc87 100644 --- a/src/Viserio/Component/Container/Processor/ResolveRuntimeParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/ResolveRuntimeParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; @@ -30,8 +30,6 @@ class ResolveRuntimeParameterProcessor extends AbstractParameterProcessor /** * Create a new ResolveRuntimeParameterProcessor instance. * - * @param \Viserio\Contract\Container\CompiledContainer $container - * * @return static */ public function __construct(CompiledContainerContract $container) diff --git a/src/Viserio/Component/Container/Processor/UrlParameterProcessor.php b/src/Viserio/Component/Container/Processor/UrlParameterProcessor.php index e1e80734c..09e1095c2 100644 --- a/src/Viserio/Component/Container/Processor/UrlParameterProcessor.php +++ b/src/Viserio/Component/Container/Processor/UrlParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Processor; diff --git a/src/Viserio/Component/Container/RewindableGenerator.php b/src/Viserio/Component/Container/RewindableGenerator.php index 9b2961235..c75250ba5 100644 --- a/src/Viserio/Component/Container/RewindableGenerator.php +++ b/src/Viserio/Component/Container/RewindableGenerator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -36,7 +36,6 @@ class RewindableGenerator implements Countable, IteratorAggregate /** * Create a new generator instance. * - * @param callable $generator * @param callable|int $count * * @return void @@ -49,8 +48,6 @@ public function __construct(callable $generator, $count) /** * Get the total number of tagged services. - * - * @return int */ public function count(): int { @@ -65,8 +62,6 @@ public function count(): int /** * Get an iterator from the generator. - * - * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Viserio/Component/Container/ServiceReferenceGraph.php b/src/Viserio/Component/Container/ServiceReferenceGraph.php index 00c541b4f..814136925 100644 --- a/src/Viserio/Component/Container/ServiceReferenceGraph.php +++ b/src/Viserio/Component/Container/ServiceReferenceGraph.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -96,9 +96,6 @@ public function connect( * Create a new node if the value is not the same. * * @param int|string $id - * @param mixed $value - * - * @return \Viserio\Contract\Container\ServiceReferenceGraphNode */ private function createNode($id, $value): ServiceReferenceGraphNodeContract { diff --git a/src/Viserio/Component/Container/ServiceReferenceGraphEdge.php b/src/Viserio/Component/Container/ServiceReferenceGraphEdge.php index 0a6a311ee..6da6b07da 100644 --- a/src/Viserio/Component/Container/ServiceReferenceGraphEdge.php +++ b/src/Viserio/Component/Container/ServiceReferenceGraphEdge.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -34,8 +34,6 @@ final class ServiceReferenceGraphEdge implements ServiceReferenceGraphEdgeContra /** * The value of the edge. - * - * @var mixed */ private $value; @@ -54,13 +52,6 @@ final class ServiceReferenceGraphEdge implements ServiceReferenceGraphEdgeContra /** * Create a new DependencyGraphEdge instance. - * - * @param \Viserio\Contract\Container\ServiceReferenceGraphNode $sourceNode - * @param \Viserio\Contract\Container\ServiceReferenceGraphNode $destNode - * @param mixed $value - * @param bool $lazy - * @param bool $weak - * @param bool $byConstructor */ public function __construct( ServiceReferenceGraphNodeContract $sourceNode, diff --git a/src/Viserio/Component/Container/ServiceReferenceGraphNode.php b/src/Viserio/Component/Container/ServiceReferenceGraphNode.php index 996aee4bd..8a29ca1b0 100644 --- a/src/Viserio/Component/Container/ServiceReferenceGraphNode.php +++ b/src/Viserio/Component/Container/ServiceReferenceGraphNode.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -43,8 +43,6 @@ final class ServiceReferenceGraphNode implements ServiceReferenceGraphNodeContra /** * The value of the node. - * - * @var mixed */ private $value; @@ -52,7 +50,6 @@ final class ServiceReferenceGraphNode implements ServiceReferenceGraphNodeContra * Create a new ServiceReferenceGraphNode instance. * * @param int|string $id - * @param mixed $value */ public function __construct($id, $value) { diff --git a/src/Viserio/Component/Container/Test/Pipeline/TestContainerPipe.php b/src/Viserio/Component/Container/Test/Pipeline/TestContainerPipe.php index ebf82d25e..bd2b4cc10 100644 --- a/src/Viserio/Component/Container/Test/Pipeline/TestContainerPipe.php +++ b/src/Viserio/Component/Container/Test/Pipeline/TestContainerPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Test\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Alias/AliasEnvFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Alias/AliasEnvFixture.php index ae3945035..ce8239f31 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Alias/AliasEnvFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Alias/AliasEnvFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Alias; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Alias/Alias_EnvFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Alias/Alias_EnvFixture.php index cb00db523..d8cf33210 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Alias/Alias_EnvFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Alias/Alias_EnvFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use Viserio\Component\Container\Tests\Fixture\Alias\AliasEnvFixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Alias/SomeAliasFactory.php b/src/Viserio/Component/Container/Tests/Fixture/Alias/SomeAliasFactory.php index eb5213f89..92286407c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Alias/SomeAliasFactory.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Alias/SomeAliasFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Alias; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/A.php b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/A.php index 036469d3e..51cd10634 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/A.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/A.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ArrayAutowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/B.php b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/B.php index 0caa75bf4..643fe95d5 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/B.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/B.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ArrayAutowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Bar.php b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Bar.php index 170533e76..967eb9e3e 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Bar.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Bar.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ArrayAutowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Foo.php b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Foo.php index 54fc6ca4a..296617e21 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Foo.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/Foo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ArrayAutowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/ServiceInterface.php b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/ServiceInterface.php index e96be0573..e1315d196 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/ServiceInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ArrayAutowire/ServiceInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ArrayAutowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/A.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/A.php index 0522b6cfe..737281ba9 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/A.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/A.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/AInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/AInterface.php index aa4a95468..0fa5bb971 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/AInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/AInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/B.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/B.php index 8b9a0c359..ef9f7c4c7 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/B.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/B.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadParentTypeHintedArgument.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadParentTypeHintedArgument.php index 60b1434e9..1380fc222 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadParentTypeHintedArgument.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadParentTypeHintedArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadTypeHintedArgument.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadTypeHintedArgument.php index 71910fa01..cc8e218ee 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadTypeHintedArgument.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/BadTypeHintedArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/C.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/C.php index c9568b0d3..3d50a72fb 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/C.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/C.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowired.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowired.php index 9b90eb416..8083d7ca4 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowired.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowired.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredForwardOrder.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredForwardOrder.php index 95a30de1c..9da8be9dd 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredForwardOrder.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredForwardOrder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredReverseOrder.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredReverseOrder.php index b5606abc6..178cd1475 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredReverseOrder.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CannotBeAutowiredReverseOrder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionA.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionA.php index e551b9db6..2a56db616 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionA.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionA.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionB.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionB.php index bbcd2b000..a63342044 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionB.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionB.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionInterface.php index f9d124c63..60361c16f 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/CollisionInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/D.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/D.php index 70edfc4f0..8de27598f 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/D.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/D.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DInterface.php index 351a9bf9b..4b1dedf0b 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorated.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorated.php index a4e856442..7d95fa410 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorated.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorated.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratedDecorator.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratedDecorator.php index 20bbe25c5..49ce89ffe 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratedDecorator.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratedDecorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorator.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorator.php index 6d264d79b..a10405ddb 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorator.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/Decorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratorInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratorInterface.php index c22923016..36925eba1 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratorInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DecoratorInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DefaultParameter.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DefaultParameter.php index 0ed033387..48bbcfcd2 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DefaultParameter.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DefaultParameter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DependentOnEmptyClass.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DependentOnEmptyClass.php index e16a12c7c..e7818088f 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DependentOnEmptyClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DependentOnEmptyClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DocsController.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DocsController.php index a153c5735..770e4242d 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/DocsController.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/DocsController.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/Documentation.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/Documentation.php index d27e18ed2..8f8acee36 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/Documentation.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/Documentation.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/E.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/E.php index e2e155b3d..5089b7af4 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/E.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/E.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/EInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/EInterface.php index 65687dd89..b6b991168 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/EInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/EInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/F.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/F.php index 85d76a0b3..408710bcd 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/F.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/F.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/G.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/G.php index 4ee2095b0..b08bc9091 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/G.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/G.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/H.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/H.php index 17ba756ac..c3389a13a 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/H.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/H.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/I.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/I.php index 693b3f780..d06ba59b9 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/I.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/I.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/IInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/IInterface.php index 200025cff..53bd62e61 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/IInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/IInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/J.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/J.php index b9137b86d..57d04af5c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/J.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/J.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/K.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/K.php index c531dd17b..f090e7474 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/K.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/K.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalar.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalar.php index 4a4621a67..90b393cf8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalar.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalar.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarLast.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarLast.php index d588c60cc..1973293a8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarLast.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarLast.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarNotReallyOptional.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarNotReallyOptional.php index 629ab1f94..9f5d06d97 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarNotReallyOptional.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/MultipleArgumentsOptionalScalarNotReallyOptional.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotFoundParam.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotFoundParam.php index 9602aad2e..b65c84cf8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotFoundParam.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotFoundParam.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgument.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgument.php index 3b455673b..bf8df729f 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgument.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgumentForSubclass.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgumentForSubclass.php index 20d89e727..2cb01d46c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgumentForSubclass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotGuessableArgumentForSubclass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotWireable.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotWireable.php index 33dde0a89..fdd5d1c34 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotWireable.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/NotWireable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalClass.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalClass.php index 26f5f85b2..8b7a3c883 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalParameter.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalParameter.php index 5daefe8fe..8f289ef7b 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalParameter.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/OptionalParameter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/PrivateConstructor.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/PrivateConstructor.php index bc7a22d08..9930f2ebb 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/PrivateConstructor.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/PrivateConstructor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjection.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjection.php index 4169f25e1..241f268bb 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjection.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjection.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; @@ -17,9 +17,6 @@ class SetterInjection extends SetterInjectionParent { - /** - * @param EmptyClass $emptyClass - */ public function setEmpty(EmptyClass $emptyClass): void { // should be called diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjectionParent.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjectionParent.php index 402ca3a84..465c8a7b9 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjectionParent.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/SetterInjectionParent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Autowire/VariadicClass.php b/src/Viserio/Component/Container/Tests/Fixture/Autowire/VariadicClass.php index 9436b5c73..456000880 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Autowire/VariadicClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Autowire/VariadicClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Autowire; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/BarCircular.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/BarCircular.php index 23b342d7b..aec71c642 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/BarCircular.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/BarCircular.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/DummyFoobarCircular.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/DummyFoobarCircular.php index 777332989..e04bbcd43 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/DummyFoobarCircular.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/DummyFoobarCircular.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/FactoryReferenceStub.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/FactoryReferenceStub.php index 78663896f..218d67084 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/FactoryReferenceStub.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/FactoryReferenceStub.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/FooCircular.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/FooCircular.php index 90aa5d73f..b9ac4cf10 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/FooCircular.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/FooCircular.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/FooForCircularWithAddCalls.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/FooForCircularWithAddCalls.php index 27d04d9e3..5c16ec1f8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/FooForCircularWithAddCalls.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/FooForCircularWithAddCalls.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircular.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircular.php index 808231679..73eb90e85 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircular.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircular.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircularInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircularInterface.php index 73b454312..afc87e1e5 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircularInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/FoobarCircularInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubA.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubA.php index 9d4dfc4c5..262032952 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubA.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubA.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubB.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubB.php index 24fc94a8d..2e323da28 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubB.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubB.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubC.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubC.php index 439c1db88..403cee615 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubC.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubC.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubD.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubD.php index 2fb213fd5..e618d1c2e 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubD.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubD.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubE.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubE.php index 1ca518f12..c5c0a7b5c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubE.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubE.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubF.php b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubF.php index 41cc2e49a..809741681 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubF.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Circular/ReferenceStubF.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Circular; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndConstructor.php b/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndConstructor.php index bd80594ca..cf8024855 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndConstructor.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndConstructor.php @@ -35,9 +35,6 @@ public function __construct(string $text) { $this->text = $text; } - /** - * @return string - */ public function getText(): string { return $this->text; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndDefaultConstructor.php b/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndDefaultConstructor.php index e2fc0934c..a7016bdfe 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndDefaultConstructor.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Compiled/PhpDumperContainerTestContainerCanBeDumpedWithAnonymousClassAndDefaultConstructor.php @@ -35,9 +35,6 @@ public function __construct(?string $text = 'test') { $this->text = $text; } - /** - * @return null|string - */ public function getText(): ?string { return $this->text; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ConstructValueClass.php b/src/Viserio/Component/Container/Tests/Fixture/ConstructValueClass.php index 902b2225f..f7f4a1277 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ConstructValueClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ConstructValueClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; @@ -22,9 +22,6 @@ public function __construct($value) $this->value = $value; } - /** - * @return mixed - */ public function getValue() { return $this->value; diff --git a/src/Viserio/Component/Container/Tests/Fixture/CustomParentContainer.php b/src/Viserio/Component/Container/Tests/Fixture/CustomParentContainer.php index 5d09dc75b..0be21a446 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/CustomParentContainer.php +++ b/src/Viserio/Component/Container/Tests/Fixture/CustomParentContainer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Bar.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Bar.php index a5afeb749..bbff2cc3e 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Bar.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Bar.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz.php index 9ed5eaf32..c4d2bd785 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz2.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz2.php index 01cd3b532..af26305c5 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz2.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Baz2.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Foo.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Foo.php index 8402563c3..cd13c1732 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Foo.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Foo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/FooInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/FooInterface.php index 564892087..a3271cb2f 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/FooInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/FooInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux.php index 7b485c1f3..867c0f268 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux2.php b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux2.php index c9ae9c8cd..7ec5cd2cf 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux2.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Decorator/Qux2.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Decorator; diff --git a/src/Viserio/Component/Container/Tests/Fixture/DeprecatedClass.php b/src/Viserio/Component/Container/Tests/Fixture/DeprecatedClass.php index 3586e93e0..074526eca 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/DeprecatedClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/DeprecatedClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/EmptyClass.php b/src/Viserio/Component/Container/Tests/Fixture/EmptyClass.php index 941a22aa3..457458ed8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/EmptyClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/EmptyClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/FactoryClass.php b/src/Viserio/Component/Container/Tests/Fixture/FactoryClass.php index 8d190e9d6..eb7f14dba 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/FactoryClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/FactoryClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/File/Bar.php b/src/Viserio/Component/Container/Tests/Fixture/File/Bar.php index a596b424c..2bb6734dc 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/File/Bar.php +++ b/src/Viserio/Component/Container/Tests/Fixture/File/Bar.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\File; diff --git a/src/Viserio/Component/Container/Tests/Fixture/File/BarClass.php b/src/Viserio/Component/Container/Tests/Fixture/File/BarClass.php index 167410662..683631986 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/File/BarClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/File/BarClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\File; diff --git a/src/Viserio/Component/Container/Tests/Fixture/File/Baz.php b/src/Viserio/Component/Container/Tests/Fixture/File/Baz.php index 81a833aa1..98539ff1b 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/File/Baz.php +++ b/src/Viserio/Component/Container/Tests/Fixture/File/Baz.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\File; diff --git a/src/Viserio/Component/Container/Tests/Fixture/File/BazClass.php b/src/Viserio/Component/Container/Tests/Fixture/File/BazClass.php index 224091a8d..2839031a7 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/File/BazClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/File/BazClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\File; diff --git a/src/Viserio/Component/Container/Tests/Fixture/File/Foo.php b/src/Viserio/Component/Container/Tests/Fixture/File/Foo.php index f212552b8..3915ba592 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/File/Foo.php +++ b/src/Viserio/Component/Container/Tests/Fixture/File/Foo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\File; diff --git a/src/Viserio/Component/Container/Tests/Fixture/File/LazyContext.php b/src/Viserio/Component/Container/Tests/Fixture/File/LazyContext.php index 1d21f1977..3ab18dabd 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/File/LazyContext.php +++ b/src/Viserio/Component/Container/Tests/Fixture/File/LazyContext.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\File; diff --git a/src/Viserio/Component/Container/Tests/Fixture/FooClass.php b/src/Viserio/Component/Container/Tests/Fixture/FooClass.php index ad248b019..bad558d1a 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/FooClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/FooClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/FooLazyClass.php b/src/Viserio/Component/Container/Tests/Fixture/FooLazyClass.php index 9b291bfb2..af6554dc8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/FooLazyClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/FooLazyClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class1.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class1.php index 41abb030d..55fb9b9b1 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class1.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class10.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class10.php index c387a0343..151c11fa5 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class10.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class10.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class11.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class11.php index 12a69e3fb..304ca07f7 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class11.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class11.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class12.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class12.php index 53736df13..68e128022 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class12.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class12.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class13.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class13.php index dd171f066..a5c65c775 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class13.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class13.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class14.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class14.php index 2b0cd4045..dae1b0edd 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class14.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class14.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class15.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class15.php index e4738e9bc..80c579f9c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class15.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class15.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class16.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class16.php index 0d2a2f21b..1b3386dbc 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class16.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class16.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class17.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class17.php index dcc66492a..7dd4cfcc4 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class17.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class17.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class18.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class18.php index ae37ee6ad..4e1d75d33 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class18.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class18.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class19.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class19.php index 1488fd8a8..4033e517c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class19.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class19.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class2.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class2.php index 942344e0a..fbdcce909 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class2.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class2.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class20.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class20.php index ec5ceea92..b79c1d0e2 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class20.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class20.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class3.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class3.php index 9ed04effc..c71481501 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class3.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class3.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class4.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class4.php index e51200acd..ecd357834 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class4.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class4.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class5.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class5.php index 7dc9cec4d..10c76e101 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class5.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class5.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class6.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class6.php index f71efa2af..9c3c058df 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class6.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class6.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class7.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class7.php index 985e0481a..b67318428 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class7.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class7.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class8.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class8.php index 53fbe8e5b..f19338b24 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class8.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class8.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class9.php b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class9.php index 94ccdf6a7..3b5091be3 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Inline/Class9.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Inline/Class9.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Inline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeCallableClass.php b/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeCallableClass.php index 13e12003a..8eaba2dde 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeCallableClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeCallableClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Invoke; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeParameterAndConstructorParameterClass.php b/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeParameterAndConstructorParameterClass.php index bcac05c6c..e16d4aacf 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeParameterAndConstructorParameterClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeParameterAndConstructorParameterClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Invoke; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeWithConstructorParameterClass.php b/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeWithConstructorParameterClass.php index 44eb7e1e2..41f800764 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeWithConstructorParameterClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Invoke/InvokeWithConstructorParameterClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Invoke; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Make/ContractFixtureInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Make/ContractFixtureInterface.php index 1e02b0b42..3e348159a 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Make/ContractFixtureInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Make/ContractFixtureInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Make; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Make/DefaultValue.php b/src/Viserio/Component/Container/Tests/Fixture/Make/DefaultValue.php index 5ca72c9ac..5829ea1c8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Make/DefaultValue.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Make/DefaultValue.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Make; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Make/DependentFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Make/DependentFixture.php index 6e770a48a..98375bee0 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Make/DependentFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Make/DependentFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Make; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Make/ImplementationFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Make/ImplementationFixture.php index 3f0509b02..c5ff2b9f5 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Make/ImplementationFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Make/ImplementationFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Make; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Make/MixedPrimitiveFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Make/MixedPrimitiveFixture.php index 5ce5ec5c6..f00f29904 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Make/MixedPrimitiveFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Make/MixedPrimitiveFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Make; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Make/NestedDependentFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Make/NestedDependentFixture.php index fb5928386..9634a1f20 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Make/NestedDependentFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Make/NestedDependentFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Make; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Method/CallFixture.php b/src/Viserio/Component/Container/Tests/Fixture/Method/CallFixture.php index b03c85fcf..d3a25842f 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Method/CallFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Method/CallFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Method; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Method/ClassWithMethods.php b/src/Viserio/Component/Container/Tests/Fixture/Method/ClassWithMethods.php index 120d49212..ae9f6e7a7 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Method/ClassWithMethods.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Method/ClassWithMethods.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Method; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/A.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/A.php index e74b759a7..f01a110ae 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/A.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/A.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/AliasA.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/AliasA.php index edccc5112..59d446c2b 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/AliasA.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/AliasA.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/B.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/B.php index 2017d9da5..50ab81367 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/B.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/B.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/C.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/C.php index 9d81a94ab..916057c30 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/C.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/C.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassA.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassA.php index 356e4ce24..51b4654fd 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassA.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassA.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassB.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassB.php index d958b71a3..878194619 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassB.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/ClassB.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/D.php b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/D.php index 98455d6cb..5253354da 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Pipeline/D.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Pipeline/D.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Preload/C1.php b/src/Viserio/Component/Container/Tests/Fixture/Preload/C1.php index 003c9e7bf..db672e428 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Preload/C1.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Preload/C1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Preload; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Preload/C2.php b/src/Viserio/Component/Container/Tests/Fixture/Preload/C2.php index bb86dcd63..2f56303bc 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Preload/C2.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Preload/C2.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Preload; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Preload/C3.php b/src/Viserio/Component/Container/Tests/Fixture/Preload/C3.php index 63b4edcd6..94b156f02 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Preload/C3.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Preload/C3.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Preload; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Preload/I1.php b/src/Viserio/Component/Container/Tests/Fixture/Preload/I1.php index 8dd71a094..b444afd57 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Preload/I1.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Preload/I1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Preload; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Preload/P1.php b/src/Viserio/Component/Container/Tests/Fixture/Preload/P1.php index c2601072c..6ec0ec5aa 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Preload/P1.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Preload/P1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Preload; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Preload/T1.php b/src/Viserio/Component/Container/Tests/Fixture/Preload/T1.php index bcce1cecf..7c35c9174 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Preload/T1.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Preload/T1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Preload; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Processor/BadProcessor.php b/src/Viserio/Component/Container/Tests/Fixture/Processor/BadProcessor.php index 51e0287be..e444877cd 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Processor/BadProcessor.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Processor/BadProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Processor; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Processor/FooParameterProcessor.php b/src/Viserio/Component/Container/Tests/Fixture/Processor/FooParameterProcessor.php index 82f0675ef..ea8a82dad 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Processor/FooParameterProcessor.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Processor/FooParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Processor; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Proxy/ClassToProxy.php b/src/Viserio/Component/Container/Tests/Fixture/Proxy/ClassToProxy.php index 3a405df5e..07a46bdfa 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Proxy/ClassToProxy.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Proxy/ClassToProxy.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Proxy; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Proxy/DummyInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Proxy/DummyInterface.php index 3660f6a01..d5a63ebc7 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Proxy/DummyInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Proxy/DummyInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Proxy; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Proxy/FinalDummyClass.php b/src/Viserio/Component/Container/Tests/Fixture/Proxy/FinalDummyClass.php index e960efed1..51fa457da 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Proxy/FinalDummyClass.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Proxy/FinalDummyClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Proxy; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Proxy/SunnyInterface.php b/src/Viserio/Component/Container/Tests/Fixture/Proxy/SunnyInterface.php index 7690f5673..336ddef4d 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Proxy/SunnyInterface.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Proxy/SunnyInterface.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Proxy; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Reflection/AbstractPrivateProperty.php b/src/Viserio/Component/Container/Tests/Fixture/Reflection/AbstractPrivateProperty.php index 7568512c5..4f3d29721 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Reflection/AbstractPrivateProperty.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Reflection/AbstractPrivateProperty.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Reflection; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateMethods.php b/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateMethods.php index d1397312f..6d1bdd7d6 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateMethods.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateMethods.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Reflection; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateProperty.php b/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateProperty.php index 0b888bb55..1bf07ff3c 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateProperty.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Reflection/SomeClassWithPrivateProperty.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\Reflection; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ScalarFactory.php b/src/Viserio/Component/Container/Tests/Fixture/ScalarFactory.php index 113b5065a..815f7568e 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ScalarFactory.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ScalarFactory.php @@ -3,21 +3,18 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; final class ScalarFactory { - /** - * @return string - */ public static function getSomeValue(): string { return 'some value'; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ExtendingFixtureServiceProvider.php b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ExtendingFixtureServiceProvider.php index aaa1983c0..46417a11e 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ExtendingFixtureServiceProvider.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ExtendingFixtureServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ServiceProvider; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/MethodCallsServiceProvider.php b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/MethodCallsServiceProvider.php index fffedca36..ce6ceb8a8 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/MethodCallsServiceProvider.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/MethodCallsServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ServiceProvider; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ServiceFixture.php b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ServiceFixture.php index 100586078..ef96cf6d4 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ServiceFixture.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/ServiceFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ServiceProvider; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleFixtureServiceProvider.php b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleFixtureServiceProvider.php index c2dd4853d..a4abcfa0b 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleFixtureServiceProvider.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleFixtureServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ServiceProvider; diff --git a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleTaggedServiceProvider.php b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleTaggedServiceProvider.php index d3986c546..c48de0ead 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleTaggedServiceProvider.php +++ b/src/Viserio/Component/Container/Tests/Fixture/ServiceProvider/SimpleTaggedServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture\ServiceProvider; diff --git a/src/Viserio/Component/Container/Tests/Fixture/Wither.php b/src/Viserio/Component/Container/Tests/Fixture/Wither.php index 463e1b0a0..57025a595 100644 --- a/src/Viserio/Component/Container/Tests/Fixture/Wither.php +++ b/src/Viserio/Component/Container/Tests/Fixture/Wither.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Fixture; @@ -22,8 +22,6 @@ public function setEmptyClass(EmptyClass $foo): void } /** - * @param EmptyClass $foo - * * @return static */ public function withEmptyClass1(EmptyClass $foo): self @@ -32,8 +30,6 @@ public function withEmptyClass1(EmptyClass $foo): self } /** - * @param EmptyClass $foo - * * @return static */ public function withEmptyClass2(EmptyClass $foo): self diff --git a/src/Viserio/Component/Container/Tests/Integration/BaseContainerTest.php b/src/Viserio/Component/Container/Tests/Integration/BaseContainerTest.php index ee4191861..5eed035db 100644 --- a/src/Viserio/Component/Container/Tests/Integration/BaseContainerTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/BaseContainerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; @@ -42,11 +42,7 @@ protected function setUp(): void } /** - * @param string $className - * * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return void */ protected function assertDumpedContainer(string $className): void { diff --git a/src/Viserio/Component/Container/Tests/Integration/BuildContainerHasDefinitionTest.php b/src/Viserio/Component/Container/Tests/Integration/BuildContainerHasDefinitionTest.php index fd02f2e58..aca2582d7 100644 --- a/src/Viserio/Component/Container/Tests/Integration/BuildContainerHasDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/BuildContainerHasDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerBuilderTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerBuilderTest.php index 244d0185a..5577d13c3 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerBuilderTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerBuilderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerCallTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerCallTest.php index 5cde6ccbe..5b9928b3c 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerCallTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerCallTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; @@ -301,12 +301,7 @@ public function testNotACallable(): void } /** - * @param string $className - * @param null|callable $callback - * * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return \Viserio\Component\Container\AbstractCompiledContainer */ private function getCompiledContainer(string $className, ?callable $callback = null): AbstractCompiledContainer { diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerDelegateTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerDelegateTest.php index 92a5999da..5ea415e75 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerDelegateTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerDelegateTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerLazyObjectTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerLazyObjectTest.php index 8e1eebd8a..7257aa658 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerLazyObjectTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerLazyObjectTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerMakeTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerMakeTest.php index 673695591..77a96a1ab 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerMakeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerMakeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerServiceProviderTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerServiceProviderTest.php index 4cafafc0d..9e7d664e8 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerServiceProviderTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/ContainerTest.php b/src/Viserio/Component/Container/Tests/Integration/ContainerTest.php index 37bdb5010..aa2940e34 100644 --- a/src/Viserio/Component/Container/Tests/Integration/ContainerTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/ContainerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration; diff --git a/src/Viserio/Component/Container/Tests/Integration/Dumper/PhpDumperTest.php b/src/Viserio/Component/Container/Tests/Integration/Dumper/PhpDumperTest.php index 99b174baa..9bc88038f 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Dumper/PhpDumperTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Dumper/PhpDumperTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Dumper; @@ -411,9 +411,6 @@ public function __construct(?string $text = 'test') $this->text = $text; } - /** - * @return null|string - */ public function getText(): ?string { return $this->text; @@ -442,9 +439,6 @@ public function __construct(string $text) $this->text = $text; } - /** - * @return string - */ public function getText(): string { return $this->text; @@ -1298,8 +1292,6 @@ public function testPrivateWithIgnoreOnInvalidReference(): void * @dataProvider provideAlmostCircularCases * @runInSeparateProcess * @preserveGlobalState disabled - * - * @param mixed $visibility */ public function testAlmostCircular($visibility): void { @@ -2161,9 +2153,6 @@ protected function assertDumpedContainer(?string $functionName): void parent::assertDumpedContainer($functionName); } - /** - * @param \Viserio\Component\Container\ContainerBuilder $builder1 - */ private function arrangeContainerEntries(ContainerBuilder $builder1): void { $builder1->bind('factory_class', function () { diff --git a/src/Viserio/Component/Container/Tests/Integration/LazyProxy/ProxyDumperTest.php b/src/Viserio/Component/Container/Tests/Integration/LazyProxy/ProxyDumperTest.php index 15c8de439..a78bd42ba 100644 --- a/src/Viserio/Component/Container/Tests/Integration/LazyProxy/ProxyDumperTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/LazyProxy/ProxyDumperTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\LazyProxy; @@ -55,9 +55,6 @@ protected function setUp(): void /** * @dataProvider provideIsProxyCandidateCases - * - * @param \Viserio\Contract\Container\Definition\Definition $definition - * @param bool $expected */ public function testIsProxyCandidate(DefinitionContract $definition, bool $expected): void { @@ -102,9 +99,6 @@ public function testGetProxyFactoryCode(): void /** * @dataProvider provideCorrectAssigningCases - * - * @param \Viserio\Component\Container\Definition\ObjectDefinition $definition - * @param mixed $access */ public function testCorrectAssigning(ObjectDefinition $definition, $access): void { diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/AnalyzeServiceDependenciesPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/AnalyzeServiceDependenciesPipeTest.php index 8c36c2882..906883c22 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/AnalyzeServiceDependenciesPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/AnalyzeServiceDependenciesPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -215,10 +215,6 @@ public function testProcessDetectsFactoryReferences(): void self::assertCount(1, $graph->getNode('foo')->getInEdges()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - * @param bool $onlyConstructorArguments - */ private function process(ContainerBuilderContract $container, bool $onlyConstructorArguments = false): void { $pipes = [ diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowireArgumentArrayPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowireArgumentArrayPipeTest.php index b1a5b875f..8b585fa1c 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowireArgumentArrayPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowireArgumentArrayPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -63,9 +63,6 @@ public function testProcessWithUnknownServices(): void self::assertCount(0, $definition->getArguments()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new AutowireArgumentArrayPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowirePipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowirePipeTest.php index 5a90f9860..f6510a72e 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowirePipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/AutowirePipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -639,10 +639,6 @@ public function testExplicitMethodInjection(): void /** * @dataProvider provideNotWireableCallsCases - * - * @param null|string $method - * @param string $expectedException - * @param string $expectedMsg */ public function testNotWireableCalls(?string $method, string $expectedException, string $expectedMsg): void { @@ -696,9 +692,6 @@ public function testProcessNotExisintActionParam(): void $this->process($container); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new AutowirePipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckArgumentsValidityPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckArgumentsValidityPipeTest.php index 4900b032e..56781dbb8 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckArgumentsValidityPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckArgumentsValidityPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -55,10 +55,6 @@ public function testProcess(): void /** * @dataProvider provideExceptionCases - * - * @param array $arguments - * @param array $methodCalls - * @param string $message */ public function testException(array $arguments, array $methodCalls, string $message): void { @@ -97,9 +93,6 @@ public static function provideExceptionCases(): iterable ]; } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new CheckArgumentsValidityPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckCircularDependenciesPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckCircularDependenciesPipeTest.php index 846070b8f..c002f1dfd 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckCircularDependenciesPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckCircularDependenciesPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -147,9 +147,6 @@ public function testProcessDetectsIndirectCircularReferenceWithFactory(): void $this->process($container); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipes = [ diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckDefinitionConditionsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckDefinitionConditionsPipeTest.php index edc67b2fc..34b8eb789 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckDefinitionConditionsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/CheckDefinitionConditionsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -73,9 +73,6 @@ static function () { self::assertStringContainsString('Removed condition from [closure]; reason: Definition is missing implementation of [Viserio\Contract\Container\Definition\MethodCallsAwareDefinition] or [Viserio\Contract\Container\Definition\PropertiesAwareDefinition] interface.', $container->getLogs()[0]); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new CheckDefinitionConditionsPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/DecoratorServicePipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/DecoratorServicePipeTest.php index 21f9475b0..0d0be1812 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/DecoratorServicePipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/DecoratorServicePipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -324,9 +324,6 @@ public function testProcessWithInvalidDecoratedAndWrongBehavior(): void $this->process($container); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { foreach ([new DecoratorServicePipe(), new AutowirePipe()] as $pipe) { diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ExtendedDefinitionValuePipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ExtendedDefinitionValuePipeTest.php index 5bc84b025..ee8268ab9 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ExtendedDefinitionValuePipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ExtendedDefinitionValuePipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -108,9 +108,6 @@ public function testExtendBeforeDefinitionBinding(): void ); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new ExtendedDefinitionPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/InlineServiceDefinitionsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/InlineServiceDefinitionsPipeTest.php index a0fbd0037..76c99afe1 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/InlineServiceDefinitionsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/InlineServiceDefinitionsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -340,10 +340,6 @@ public function testProcessDoesNotSetLazyArgumentValuesAfterInlining(): void self::assertSame('inline', $values[0]->getName()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - * @param bool $autowire - */ private function process(ContainerBuilderContract $container, bool $autowire = false): void { $pipes = []; diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RegisterParameterProcessorsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RegisterParameterProcessorsPipeTest.php index 2a34cd382..fdc0e7a22 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RegisterParameterProcessorsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RegisterParameterProcessorsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -78,9 +78,6 @@ public function testBadProcessor(): void $this->process($container); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new RegisterParameterProcessorsPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemovePrivateAliasesPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemovePrivateAliasesPipeTest.php index a0558f1e9..73499436e 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemovePrivateAliasesPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemovePrivateAliasesPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -42,9 +42,6 @@ public function testProcess(): void self::assertCount(1, $container->getAliases()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new RemovePrivateAliasesPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUninitializedReferencesInMethodCallsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUninitializedReferencesInMethodCallsPipeTest.php index 00bfd1bd8..0f39fd944 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUninitializedReferencesInMethodCallsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUninitializedReferencesInMethodCallsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -49,9 +49,6 @@ public function testProcess(): void self::assertCount(1, $definition->getMethodCalls()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new RemoveUninitializedReferencesInMethodCallsPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUnusedDefinitionsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUnusedDefinitionsPipeTest.php index 3a3b3747b..71acc71f5 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUnusedDefinitionsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/RemoveUnusedDefinitionsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -89,9 +89,6 @@ public function testProcessDoesNotErrorOnServicesThatDoNotHaveDefinitions(): voi self::assertFalse($container->hasDefinition('not.defined')); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipes = [ diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceAliasByActualDefinitionPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceAliasByActualDefinitionPipeTest.php index f82ef26d9..c6d897e71 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceAliasByActualDefinitionPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceAliasByActualDefinitionPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -63,9 +63,6 @@ public function testProcessWithInvalidAlias(): void $this->process($container); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new ReplaceAliasByActualDefinitionPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipeTest.php index 0101cfa90..b6659fde3 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ReplaceDefinitionTypeToPrivateIfReferenceExistsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -43,9 +43,6 @@ public function testProcess(): void self::assertSame(Definition::SINGLETON + Definition::PRIVATE, $container->getDefinition(stdClass::class)->getType()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new ReplaceDefinitionTypeToPrivateIfReferenceExistsPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveFactoryClassPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveFactoryClassPipeTest.php index f4e48f212..6ef8fea1e 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveFactoryClassPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveFactoryClassPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -74,9 +74,6 @@ public function testProcessWithFactoryObjectAndNotFoundEntry(): void self::assertSame('create', $definition->getValue()[1]); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new ResolveFactoryClassPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveInvalidReferencesPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveInvalidReferencesPipeTest.php index 73d54550d..f71c9672a 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveInvalidReferencesPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveInvalidReferencesPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -192,9 +192,6 @@ public function testProcessSetOnlyDecoratedAsNullOnInvalid(): void self::assertEquals($unknownArgument, $arguments[1]); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pass = new ResolveInvalidReferencesPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveParameterPlaceHolderPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveParameterPlaceHolderPipeTest.php index 25a0376ad..916ef25be 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveParameterPlaceHolderPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveParameterPlaceHolderPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -38,10 +38,6 @@ final class ResolveParameterPlaceHolderPipeTest extends TestCase { /** * @dataProvider provideProcessCases - * - * @param array $asserts - * @param array $parameters - * @param array $services */ public function testProcess(array $asserts, array $parameters = [], array $services = []): void { @@ -92,7 +88,6 @@ public static function provideProcessCases(): iterable ], [ [ - 'foo' => ['getValue', FooClass::class], ], [ @@ -288,12 +283,6 @@ public function testResolveExpressionWithAliases(): void /** * @dataProvider provideProcessThrowsExceptionIfStrictModeIsActiveCases - * - * @param callable $callback - * @param string $key - * @param string $type - * - * @return void */ public function testProcessThrowsExceptionIfStrictModeIsActive(callable $callback, string $key, string $type): void { @@ -358,10 +347,6 @@ public function testParameterNotFoundExceptionsIsNotThrown(): void self::assertSame('{non_existent_param}', $container->getDefinition($key)->getArgument(0)); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - * @param bool $throwException - */ private function process(ContainerBuilderContract $container, bool $throwException = true): void { $pipe = new ResolveParameterPlaceHolderPipe(true, $throwException); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolvePreloadPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolvePreloadPipeTest.php index e77c9922e..f4cc477ff 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolvePreloadPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolvePreloadPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -83,9 +83,6 @@ public function testProcess(): void self::assertFalse($definition6->hasTag(ResolvePreloadPipe::TAG)); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipe = new ResolvePreloadPipe(); diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipeTest.php index 5e1bb459f..2c358c618 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/ResolveReferenceAliasesToDependencyReferencesPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; @@ -94,9 +94,6 @@ public function testDeprecationNoticeWhenReferencedByDefinition(): void self::assertSame(ClassA::class, $parameters[0]->getName()); } - /** - * @param \Viserio\Contract\Container\ContainerBuilder $container - */ private function process(ContainerBuilderContract $container): void { $pipes = [ diff --git a/src/Viserio/Component/Container/Tests/Integration/Pipeline/UnusedTagsPipeTest.php b/src/Viserio/Component/Container/Tests/Integration/Pipeline/UnusedTagsPipeTest.php index f384245d5..71335a6f9 100644 --- a/src/Viserio/Component/Container/Tests/Integration/Pipeline/UnusedTagsPipeTest.php +++ b/src/Viserio/Component/Container/Tests/Integration/Pipeline/UnusedTagsPipeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Integration\Pipeline; diff --git a/src/Viserio/Component/Container/Tests/OverwritePhpFunctions.php b/src/Viserio/Component/Container/Tests/OverwritePhpFunctions.php index 83d9bf62f..849bfe5d7 100644 --- a/src/Viserio/Component/Container/Tests/OverwritePhpFunctions.php +++ b/src/Viserio/Component/Container/Tests/OverwritePhpFunctions.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Dumper; diff --git a/src/Viserio/Component/Container/Tests/Unit/Argument/ClosureArgumentTest.php b/src/Viserio/Component/Container/Tests/Unit/Argument/ClosureArgumentTest.php index 65152b183..c3b924610 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Argument/ClosureArgumentTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Argument/ClosureArgumentTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Argument; @@ -42,9 +42,6 @@ protected function setUp(): void /** * @dataProvider provideSetValueCases - * - * @param array $value - * @param bool $error */ public function testSetValue(array $value, bool $error): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Argument/ConditionArgumentTest.php b/src/Viserio/Component/Container/Tests/Unit/Argument/ConditionArgumentTest.php index cf6886b0a..9f8aa9498 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Argument/ConditionArgumentTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Argument/ConditionArgumentTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Argument; @@ -48,9 +48,6 @@ public function testGetCallback(): void /** * @dataProvider provideSetAndGetValueCases - * - * @param array $value - * @param bool $error */ public function testSetAndGetValue(array $value, bool $error): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Argument/ParameterArgumentTest.php b/src/Viserio/Component/Container/Tests/Unit/Argument/ParameterArgumentTest.php index 4a60113d5..29e495c95 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Argument/ParameterArgumentTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Argument/ParameterArgumentTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Argument; @@ -49,9 +49,6 @@ public function testParameterValueCantBeEmptyOnConstructor(): void /** * @dataProvider provideSetAndGetValueCases - * - * @param array $value - * @param int $error */ public function testSetAndGetValue(array $value, int $error = 0): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Argument/Traits/ReferenceSetArgumentTraitTest.php b/src/Viserio/Component/Container/Tests/Unit/Argument/Traits/ReferenceSetArgumentTraitTest.php index d87bac8ee..760aab8c5 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Argument/Traits/ReferenceSetArgumentTraitTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Argument/Traits/ReferenceSetArgumentTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Argumen\Traits; @@ -33,10 +33,6 @@ final class ReferenceSetArgumentTraitTest extends TestCase { /** * @dataProvider provideSetValueCases - * - * @param \Viserio\Contract\Container\Argument\Argument $object - * @param array $value - * @param bool $error */ public function testSetValue(ArgumentContract $object, array $value, bool $error): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/ClassHelperTest.php b/src/Viserio/Component/Container/Tests/Unit/ClassHelperTest.php index ae7d14ecb..2f0e8a4c0 100644 --- a/src/Viserio/Component/Container/Tests/Unit/ClassHelperTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/ClassHelperTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit; diff --git a/src/Viserio/Component/Container/Tests/Unit/ContainerBuilderTest.php b/src/Viserio/Component/Container/Tests/Unit/ContainerBuilderTest.php index f415593e6..59f332063 100644 --- a/src/Viserio/Component/Container/Tests/Unit/ContainerBuilderTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/ContainerBuilderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit; @@ -48,9 +48,6 @@ protected function setUp(): void } /** - * @param mixed $class - * @param mixed $expected - * * @dataProvider provideGetClassReflectorCases */ public function testGetClassReflector($class, $expected): void @@ -78,10 +75,6 @@ public function testGetClassReflectorThrowsBindingResolutionExceptionOnNotFoundC } /** - * @param mixed $method - * @param mixed $expectedClass - * @param mixed $expectedMethod - * * @dataProvider provideGetMethodReflectorCases */ public function testGetMethodReflector($method, $expectedClass, $expectedMethod): void @@ -120,10 +113,6 @@ public function testGetMethodReflectorThrowsExceptionIfMethodIsNotFoundInClass() } /** - * @param mixed $function - * @param mixed $expectedFunction - * @param mixed $expectedReflectionClass - * * @dataProvider provideGetFunctionReflectorCases */ public function testGetFunctionReflector($function, $expectedFunction, $expectedReflectionClass): void diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/AbstractDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/AbstractDefinitionTest.php index c77406922..afc81b82d 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/AbstractDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/AbstractDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; @@ -191,9 +191,6 @@ public function testSetIsSynthetic(): void */ abstract protected function getDefinition(); - /** - * @return mixed - */ abstract protected function getValue(); abstract protected function getDefinitionName(): string; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/AliasDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/AliasDefinitionTest.php index e46c023c8..4b1c0e18e 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/AliasDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/AliasDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/ClosureDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/ClosureDefinitionTest.php index fc93c80dd..d9b8ed6ab 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/ClosureDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/ClosureDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/FactoryDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/FactoryDefinitionTest.php index 087cbf34a..abb886fa0 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/FactoryDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/FactoryDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; @@ -73,7 +73,6 @@ public function testGetClassParameterThrowException(): void * @dataProvider provideSplitFactoryCases * * @param array|string $value - * @param array $expected */ public function testSplitFactory($value, array $expected): void { @@ -139,8 +138,6 @@ public function testConstructorThrowsException(): void /** * @dataProvider provideInvalidFactoriesCases - * - * @param mixed $factory */ public function testInvalidFactories($factory): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/IteratorDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/IteratorDefinitionTest.php index 2e97390d6..1d4a3a981 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/IteratorDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/IteratorDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/ObjectDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/ObjectDefinitionTest.php index 829353515..27b00deb8 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/ObjectDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/ObjectDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/ParameterDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/ParameterDefinitionTest.php index b23a2f91b..b5d17154f 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/ParameterDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/ParameterDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/ReferenceDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/ReferenceDefinitionTest.php index 83b1ea465..10c9a3d80 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/ReferenceDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/ReferenceDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ArgumentsTestTrait.php b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ArgumentsTestTrait.php index c9e5c79e7..334da2d86 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ArgumentsTestTrait.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ArgumentsTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition\Traits; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/AutowireTestTrait.php b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/AutowireTestTrait.php index 9d93379d7..9ca01c958 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/AutowireTestTrait.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/AutowireTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition\Traits; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ChangesTestTrait.php b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ChangesTestTrait.php index e0776efb9..b6a519d45 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ChangesTestTrait.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ChangesTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition\Traits; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ClassTestTrait.php b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ClassTestTrait.php index 878bbed93..d78da8b46 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ClassTestTrait.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/ClassTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition\Traits; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/DecoratedServiceTestTrait.php b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/DecoratedServiceTestTrait.php index 9e119552f..9505943cd 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/DecoratedServiceTestTrait.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/DecoratedServiceTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition\Traits; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/MethodCallsTestTrait.php b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/MethodCallsTestTrait.php index 13edafc3d..0bd3ccc7b 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/MethodCallsTestTrait.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/Traits/MethodCallsTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition\Traits; diff --git a/src/Viserio/Component/Container/Tests/Unit/Definition/UndefinedDefinitionTest.php b/src/Viserio/Component/Container/Tests/Unit/Definition/UndefinedDefinitionTest.php index 20e0ef324..41c53cf1e 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Definition/UndefinedDefinitionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Definition/UndefinedDefinitionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Definition; diff --git a/src/Viserio/Component/Container/Tests/Unit/Dumper/UtilTest.php b/src/Viserio/Component/Container/Tests/Unit/Dumper/UtilTest.php index 3cc7e7d84..06bb4369f 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Dumper/UtilTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Dumper/UtilTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Dumper; @@ -109,9 +109,6 @@ public function doStuff() /** * @dataProvider provideCheckFileCases - * - * @param string $file - * @param string $message */ public function testCheckFile(string $file, string $message): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Helper/ReflectionTest.php b/src/Viserio/Component/Container/Tests/Unit/Helper/ReflectionTest.php index 22f5ed8ec..bfa6963a3 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Helper/ReflectionTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Helper/ReflectionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Helper; @@ -57,10 +57,10 @@ protected function setUp(): void { parent::setUp(); - $this->rcTest = new \ReflectionClass(Test::class); - $this->rcBTest = new \ReflectionClass(BTest::class); - $this->rcFoo = new \ReflectionClass(\Test\Space\Foo::class); - $this->rcBar = new \ReflectionClass(\Test\Space\Bar::class); + $this->rcTest = new ReflectionClass(Test::class); + $this->rcBTest = new ReflectionClass(BTest::class); + $this->rcFoo = new ReflectionClass(\Test\Space\Foo::class); + $this->rcBar = new ReflectionClass(\Test\Space\Bar::class); } public function testThrowExceptionOnNewInstance(): void @@ -81,8 +81,6 @@ public function testExpandClassNameThrowExceptionOnEmptyClassName(): void /** * @dataProvider provideBuildinTypes - * - * @param string $type */ public function testExpandClassNameWithBuiltInTypes(string $type): void { @@ -126,10 +124,6 @@ public function testExpandClassWithClassAndNamespace(): void /** * @dataProvider provideExpandClassWithAliasClassesCases - * - * @param string $alias - * @param string $expected1 - * @param string $expected2 */ public function testExpandClassWithAliasClasses(string $alias, string $expected1, string $expected2): void { @@ -137,9 +131,6 @@ public function testExpandClassWithAliasClasses(string $alias, string $expected1 self::assertSame($expected2, Reflection::expandClassName($alias, $this->rcBar)); } - /** - * @return iterable - */ public static function provideExpandClassWithAliasClassesCases(): iterable { return [ diff --git a/src/Viserio/Component/Container/Tests/Unit/HelperTest.php b/src/Viserio/Component/Container/Tests/Unit/HelperTest.php index f1e52ec23..2f7c49803 100644 --- a/src/Viserio/Component/Container/Tests/Unit/HelperTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/HelperTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class HelperTest extends TestCase { diff --git a/src/Viserio/Component/Container/Tests/Unit/PhpParser/MemoizingParserTest.php b/src/Viserio/Component/Container/Tests/Unit/PhpParser/MemoizingParserTest.php index d8b57b9fb..55e50737c 100644 --- a/src/Viserio/Component/Container/Tests/Unit/PhpParser/MemoizingParserTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/PhpParser/MemoizingParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\PhpParser; diff --git a/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/MagicConstantVisitorTest.php b/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/MagicConstantVisitorTest.php index a21bca926..ca113f0d6 100644 --- a/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/MagicConstantVisitorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/MagicConstantVisitorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\PhpParser\NodeVisitor; @@ -43,9 +43,6 @@ public static function provideDataFromClosureLocationGetsUsedCases(): iterable /** * @dataProvider provideDataFromClosureLocationGetsUsedCases - * - * @param string $original - * @param string $result */ public function testDataFromClosureLocationGetsUsed(string $original, string $result): void { @@ -68,10 +65,6 @@ public function testDataFromClosureLocationGetsUsed(string $original, string $re } /** - * @param string $class - * @param null|string $type - * @param null|string $attribute - * * @return \Mockery\MockInterface|\PhpParser\Node\Scalar\MagicConst */ public function getMockParserNode(string $class, ?string $type = null, ?string $attribute = null) diff --git a/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/ThisDetectorVisitorTest.php b/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/ThisDetectorVisitorTest.php index 454e59728..5a02c1389 100644 --- a/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/ThisDetectorVisitorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/PhpParser/NodeVisitor/ThisDetectorVisitorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\PhpParser\NodeVisitor; diff --git a/src/Viserio/Component/Container/Tests/Unit/PhpParser/PrettyPrinterTest.php b/src/Viserio/Component/Container/Tests/Unit/PhpParser/PrettyPrinterTest.php index 929ee36fa..e65158e1c 100644 --- a/src/Viserio/Component/Container/Tests/Unit/PhpParser/PrettyPrinterTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/PhpParser/PrettyPrinterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\PhpParser; @@ -41,9 +41,6 @@ protected function setUp(): void } /** - * @param string $content - * @param string $expectedOutput - * * @dataProvider provideDoubleSlashEscapingCases() */ public function testDoubleSlashEscaping(string $content, string $expectedOutput): void diff --git a/src/Viserio/Component/Container/Tests/Unit/PhpParser/Reflection/PrivatesCallerTest.php b/src/Viserio/Component/Container/Tests/Unit/PhpParser/Reflection/PrivatesCallerTest.php index 9e0091864..c819867bf 100644 --- a/src/Viserio/Component/Container/Tests/Unit/PhpParser/Reflection/PrivatesCallerTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/PhpParser/Reflection/PrivatesCallerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\PhpParser\Reflection; diff --git a/src/Viserio/Component/Container/Tests/Unit/PipelineConfigTest.php b/src/Viserio/Component/Container/Tests/Unit/PipelineConfigTest.php index 56cf36120..7910c0957 100644 --- a/src/Viserio/Component/Container/Tests/Unit/PipelineConfigTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/PipelineConfigTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit; @@ -41,8 +41,6 @@ protected function setUp(): void } /** - * @param string $setterAndGetterName - * * @dataProvider provideSetterAndGetterCases */ public function testSetterAndGetter(string $setterAndGetterName): void diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/Base64ParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/Base64ParameterProcessorTest.php index e80e75080..6e28caa15 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/Base64ParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/Base64ParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -58,9 +58,6 @@ public function testGetProvidedTypes(): void * @dataProvider provideProcessCases * * @param string $value - * @param string $parameter - * - * @return void */ public function testProcess($value, string $parameter): void { @@ -80,11 +77,6 @@ public static function provideProcessCases(): iterable /** * @dataProvider provideProcessWithInvalidCases - * - * @param string $key - * @param string $parameter - * - * @return void */ public function testProcessWithInvalid(string $key, string $parameter): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/ConstantProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/ConstantProcessorTest.php index e3ce4ebef..d177bc4ff 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/ConstantProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/ConstantProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -56,11 +56,6 @@ public function testGetProvidedTypes(): void /** * @dataProvider provideProcessCases - * - * @param string $constantString - * @param mixed $constantValue - * - * @return void */ public function testProcess(string $constantString, $constantValue): void { @@ -86,10 +81,6 @@ public static function provideProcessCases(): iterable /** * @dataProvider provideProcessWithInvalidConstantsCases - * - * @param string $parameter - * - * @return void */ public function testProcessWithInvalidConstants(string $parameter): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/CsvParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/CsvParameterProcessorTest.php index 24c1ca44e..1ff5b31e4 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/CsvParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/CsvParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -56,8 +56,6 @@ public function testGetProvidedTypes(): void * * @param string $parameter * @param string $value - * - * @return void */ public function testProcess($parameter, $value): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/EnvParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/EnvParameterProcessorTest.php index 8993bb794..f7d998edf 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/EnvParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/EnvParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -52,11 +52,6 @@ public function testGetProvidedTypes(): void /** * @dataProvider provideProcessCases - * - * @param string $expected - * @param string $key - * - * @return void */ public function testProcess(string $expected, string $key): void { @@ -80,7 +75,7 @@ public function testProcess(string $expected, string $key): void if ($type === '_ENV') { unset($_ENV[$key]); } elseif ($type === '_SERVER') { - unset($_ENV[$key]); + unset($_SERVER[$key]); } elseif ($type === 'putenv') { \putenv(\sprintf('%s=', $key)); \putenv($key); diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/FileParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/FileParameterProcessorTest.php index 45939cbd0..9bebd226d 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/FileParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/FileParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -53,11 +53,6 @@ public function testGetProvidedTypes(): void /** * @dataProvider provideProcessCases - * - * @param string $parameter - * @param mixed $value - * - * @return void */ public function testProcess(string $parameter, $value): void { @@ -79,10 +74,6 @@ public static function provideProcessCases(): iterable /** * @dataProvider provideProcessWithMissingFileCases - * - * @param string $parameter - * - * @return void */ public function testProcessWithMissingFile(string $parameter): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/JsonParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/JsonParameterProcessorTest.php index 7231b6232..2ee2e02f1 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/JsonParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/JsonParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -54,11 +54,6 @@ public function testGetProvidedTypes(): void /** * @dataProvider provideProcessCases - * - * @param string $parameter - * @param mixed $value - * - * @return void */ public function testProcess(string $parameter, $value): void { @@ -81,11 +76,6 @@ public static function provideProcessCases(): iterable /** * @dataProvider provideProcessWithInvalidJsonCases - * - * @param string $parameter - * @param mixed $json - * - * @return void */ public function testProcessWithInvalidJson(string $parameter, $json): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/PhpTypeParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/PhpTypeParameterProcessorTest.php index d4f526ff5..20f20ce0b 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/PhpTypeParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/PhpTypeParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -63,11 +63,6 @@ public function testGetProvidedTypes(): void /** * @dataProvider provideProcessCases - * - * @param string $parameter - * @param mixed $value - * - * @return void */ public function testProcess(string $parameter, $value): void { @@ -107,10 +102,6 @@ public static function provideProcessCases(): iterable /** * @dataProvider provideProcessWithInvalidCases - * - * @param string $parameter - * - * @return void */ public function testProcessWithInvalid(string $parameter): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/ResolveRuntimeParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/ResolveRuntimeParameterProcessorTest.php index 010cd50d3..96e983a16 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/ResolveRuntimeParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/ResolveRuntimeParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit\Processor; diff --git a/src/Viserio/Component/Container/Tests/Unit/Processor/UrlParameterProcessorTest.php b/src/Viserio/Component/Container/Tests/Unit/Processor/UrlParameterProcessorTest.php index 1a652af70..f634969ea 100644 --- a/src/Viserio/Component/Container/Tests/Unit/Processor/UrlParameterProcessorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/Processor/UrlParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Processor; @@ -54,11 +54,6 @@ public function testGetProvidedTypes(): void /** * @dataProvider provideProcessCases - * - * @param string $parameter - * @param mixed $value - * - * @return void */ public function testProcess(string $parameter, $value): void { @@ -108,11 +103,6 @@ public static function provideProcessCases(): iterable /** * @dataProvider provideProcessWithMissingFileCases - * - * @param string $parameter - * @param string $message - * - * @return void */ public function testProcessWithMissingFile(string $parameter, string $message): void { diff --git a/src/Viserio/Component/Container/Tests/Unit/RewindableGeneratorTest.php b/src/Viserio/Component/Container/Tests/Unit/RewindableGeneratorTest.php index 6d51a1b08..e85e9c59c 100644 --- a/src/Viserio/Component/Container/Tests/Unit/RewindableGeneratorTest.php +++ b/src/Viserio/Component/Container/Tests/Unit/RewindableGeneratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Tests\Unit; diff --git a/src/Viserio/Component/Container/Traits/ClassMatchingTrait.php b/src/Viserio/Component/Container/Traits/ClassMatchingTrait.php index 062f80133..66b4da18c 100644 --- a/src/Viserio/Component/Container/Traits/ClassMatchingTrait.php +++ b/src/Viserio/Component/Container/Traits/ClassMatchingTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Traits; @@ -24,8 +24,6 @@ trait ClassMatchingTrait * * @param array $patterns The class patterns to expand * @param array $classes The existing classes to match against the patterns - * - * @return array */ private function expandClasses(array $patterns, array $classes): array { @@ -55,8 +53,6 @@ private function expandClasses(array $patterns, array $classes): array /** * Returns all found classes in the composer class map. - * - * @return array */ private function getClassesInComposerClassMaps(): array { @@ -81,10 +77,6 @@ private function getClassesInComposerClassMaps(): array /** * Transform class patterns to regexps. - * - * @param array $patterns - * - * @return array */ private function patternsToRegexps(array $patterns): array { @@ -110,11 +102,6 @@ private function patternsToRegexps(array $patterns): array /** * Check if the given class match a regexps. - * - * @param string $class - * @param array $regexps - * - * @return bool */ private function matchAnyRegexps(string $class, array $regexps): bool { diff --git a/src/Viserio/Component/Container/Traits/ParameterProcessResolvingTrait.php b/src/Viserio/Component/Container/Traits/ParameterProcessResolvingTrait.php index ea6f4ec3d..874dd4be2 100644 --- a/src/Viserio/Component/Container/Traits/ParameterProcessResolvingTrait.php +++ b/src/Viserio/Component/Container/Traits/ParameterProcessResolvingTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Traits; @@ -26,17 +26,11 @@ trait ParameterProcessResolvingTrait protected array $cache = []; - /** - * @return iterable - */ abstract protected function getProcessors(): iterable; /** * Resolves parameters inside a string. * - * @param string $expression - * @param string $value - * * @throws \Viserio\Contract\Container\Exception\CircularParameterException if a circular reference if detected * @throws \Viserio\Contract\Container\Exception\RuntimeException when a given parameter has a type problem * diff --git a/src/Viserio/Component/Container/Traits/ReflectorHelpersTrait.php b/src/Viserio/Component/Container/Traits/ReflectorHelpersTrait.php index cdcd28be8..e7c50e6b7 100644 --- a/src/Viserio/Component/Container/Traits/ReflectorHelpersTrait.php +++ b/src/Viserio/Component/Container/Traits/ReflectorHelpersTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Traits; @@ -25,10 +25,6 @@ trait ReflectorHelpersTrait /** * Returns the type of a reflector. * - * @param ReflectionFunctionAbstract $reflectionFunction - * @param null|ReflectionParameter $reflectionParameter - * @param bool $noBuiltin - * * @return null|string The FQCN or builtin name of the type hint, or null when the type hint references an invalid self|parent context */ protected function getTypeHint( @@ -80,9 +76,6 @@ protected function getTypeHint( * Get the reflection arguments. * * @param ReflectionClass|ReflectionObject $reflection - * @param string $errorMessage - * - * @return null|ReflectionFunctionAbstract */ protected function getConstructor(ReflectionClass $reflection, string $errorMessage): ?ReflectionFunctionAbstract { diff --git a/src/Viserio/Component/Container/Traits/ReflectorTrait.php b/src/Viserio/Component/Container/Traits/ReflectorTrait.php index c7dba3143..93f7969b6 100644 --- a/src/Viserio/Component/Container/Traits/ReflectorTrait.php +++ b/src/Viserio/Component/Container/Traits/ReflectorTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Traits; @@ -42,12 +42,7 @@ trait ReflectorTrait /** * Get the reflection object for the object or class name. * - * @param string $class - * @param bool $throw - * * @throws ReflectionException - * - * @return null|ReflectionClass */ protected function getClassReflector(string $class, bool $throw = true): ?ReflectionClass { @@ -75,12 +70,7 @@ protected function getClassReflector(string $class, bool $throw = true): ?Reflec /** * Get the reflection object for a method. * - * @param ReflectionClass $classReflector - * @param string $method - * * @throws \Viserio\Contract\Container\Exception\BindingResolutionException - * - * @return ReflectionFunctionAbstract */ protected function getMethodReflector(ReflectionClass $classReflector, string $method): ReflectionFunctionAbstract { @@ -113,8 +103,6 @@ protected function getMethodReflector(ReflectionClass $classReflector, string $m * @param Closure|string $function * * @throws \Viserio\Contract\Container\Exception\BindingResolutionException - * - * @return ReflectionFunction */ protected function getFunctionReflector($function): ReflectionFunction { diff --git a/src/Viserio/Component/Container/Traits/TypeNotFoundMessageCreatorTrait.php b/src/Viserio/Component/Container/Traits/TypeNotFoundMessageCreatorTrait.php index 7b14ab635..76da736f1 100644 --- a/src/Viserio/Component/Container/Traits/TypeNotFoundMessageCreatorTrait.php +++ b/src/Viserio/Component/Container/Traits/TypeNotFoundMessageCreatorTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container\Traits; @@ -27,18 +27,11 @@ trait TypeNotFoundMessageCreatorTrait /** * Populates the list of available types. - * - * @return void */ abstract protected function populateAvailableTypes(): void; /** * Populates the list of available types for a given definition. - * - * @param string $id - * @param string $value - * - * @return void */ protected function populateAvailableType(string $id, string $value): void { @@ -60,18 +53,10 @@ protected function populateAvailableType(string $id, string $value): void /** * Get the reflection object for the object or class name. * - * @param string $class - * @param bool $throw - * * @throws ReflectionException - * - * @return null|ReflectionClass */ abstract protected function getClassReflector(string $class, bool $throw = true): ?ReflectionClass; - /** - * @return array - */ abstract protected function getServicesAndAliases(): array; /** @@ -79,21 +64,13 @@ abstract protected function getServicesAndAliases(): array; * Returns false otherwise. * * @param string $id identifier of the entry to look for - * - * @return bool */ abstract protected function has(string $id): bool; /** * Generate a error message for not found classes or interfaces. * - * @param string $type - * @param string $label - * @param string $currentId - * * @throws ReflectionException - * - * @return string */ private function createTypeNotFoundMessage(string $type, string $label, string $currentId): string { @@ -122,11 +99,6 @@ private function createTypeNotFoundMessage(string $type, string $label, string $ return \sprintf('Cannot autowire service [%s]: %s %s', $currentId, $label, $message); } - /** - * @param string $type - * - * @return null|string - */ private function createTypeAlternatives(string $type): ?string { // try suggesting available aliases first @@ -155,12 +127,6 @@ private function createTypeAlternatives(string $type): ?string return \sprintf(' You should maybe alias this %s to %s.', \class_exists($type, false) ? 'class' : 'interface', $message); } - /** - * @param string $type - * @param null|string $extraContext - * - * @return null|string - */ private function getAliasesSuggestionForType(string $type, ?string $extraContext = null): ?string { $aliases = []; @@ -194,11 +160,6 @@ private function getAliasesSuggestionForType(string $type, ?string $extraContext /** * Associates a type and a service id if applicable. - * - * @param string $type - * @param string $id - * - * @return void */ private function setType(string $type, string $id): void { diff --git a/src/Viserio/Component/Container/Variable.php b/src/Viserio/Component/Container/Variable.php index 6f551d700..b247f4501 100644 --- a/src/Viserio/Component/Container/Variable.php +++ b/src/Viserio/Component/Container/Variable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Container; @@ -19,8 +19,6 @@ class Variable /** * Create a new variable instance. - * - * @param string $name */ public function __construct(string $name) { @@ -29,8 +27,6 @@ public function __construct(string $name) /** * Get variable name. - * - * @return string */ public function __toString(): string { diff --git a/src/Viserio/Component/Container/composer.json b/src/Viserio/Component/Container/composer.json index 3fa28044c..e75e58ddc 100644 --- a/src/Viserio/Component/Container/composer.json +++ b/src/Viserio/Component/Container/composer.json @@ -40,13 +40,13 @@ "require-dev": { "mockery/mockery": "^1.2.4", "mouf/picotainer": "^1.1.0", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "nikic/php-parser": "^4.2.1", "nyholm/nsa": "^1.1.0", "ocramius/proxy-manager": "^2.6.0", + "phpstan/phpstan-php-parser": "^0.12.1", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/filesystem": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" }, diff --git a/src/Viserio/Component/Container/helper.php b/src/Viserio/Component/Container/helper.php index 0a842422e..b239fcac8 100644 --- a/src/Viserio/Component/Container/helper.php +++ b/src/Viserio/Component/Container/helper.php @@ -3,21 +3,17 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ if (! \function_exists('is_class')) { /** * Verify that the contents of a variable is a class. - * - * @param mixed $value - * - * @return bool */ function is_class($value): bool { @@ -28,10 +24,6 @@ function is_class($value): bool if (! \function_exists('is_anonymous_class')) { /** * Verify that the contents of a variable is a class. - * - * @param mixed $value - * - * @return bool */ function is_anonymous_class($value): bool { @@ -42,10 +34,6 @@ function is_anonymous_class($value): bool if (! \function_exists('is_invokable')) { /** * Verify that the contents of a variable can be called as a function. - * - * @param mixed $value - * - * @return bool */ function is_invokable($value): bool { @@ -58,8 +46,6 @@ function is_invokable($value): bool * Verify that the contents of a variable is a class method. * * @param array|string $value - * - * @return bool */ function is_method($value): bool { @@ -70,10 +56,6 @@ function is_method($value): bool if (! \function_exists('is_static_method')) { /** * Verify that the contents of a variable is a class static method. - * - * @param mixed $value - * - * @return bool */ function is_static_method($value): bool { @@ -84,10 +66,6 @@ function is_static_method($value): bool if (! \function_exists('is_function')) { /** * Verify that the contents of a variable is a function. - * - * @param mixed $value - * - * @return bool */ function is_function($value): bool { diff --git a/src/Viserio/Component/Container/phpstan.neon b/src/Viserio/Component/Container/phpstan.neon index b0a8a875a..d88d97d84 100644 --- a/src/Viserio/Component/Container/phpstan.neon +++ b/src/Viserio/Component/Container/phpstan.neon @@ -1,29 +1,19 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan-php-parser/extension.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon + - vendor/phpstan/phpstan-php-parser/extension.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled - Tests/Integration/ContainerLazyObjectTest.php diff --git a/src/Viserio/Component/Container/phpunit.xml b/src/Viserio/Component/Container/phpunit.xml new file mode 100644 index 000000000..0a5035022 --- /dev/null +++ b/src/Viserio/Component/Container/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Container/phpunit.xml.dist b/src/Viserio/Component/Container/phpunit.xml.dist deleted file mode 100644 index 8c8087626..000000000 --- a/src/Viserio/Component/Container/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Cookie/.gitignore b/src/Viserio/Component/Cookie/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Cookie/.gitignore +++ b/src/Viserio/Component/Cookie/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Cookie/AbstractCookie.php b/src/Viserio/Component/Cookie/AbstractCookie.php index 97c3cb913..a3e7bad2a 100644 --- a/src/Viserio/Component/Cookie/AbstractCookie.php +++ b/src/Viserio/Component/Cookie/AbstractCookie.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; @@ -310,8 +310,6 @@ protected function validateSameSite($sameSite) * @param null|DateTimeInterface|int|string $expiration * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException - * - * @return int */ protected function normalizeExpires($expiration = null): int { @@ -342,10 +340,6 @@ protected function normalizeExpires($expiration = null): int /** * Remove the leading '.' and lowercase the domain as per spec in RFC 6265. * - * @param null|string $domain - * - * @return null|string - * * @see http://tools.ietf.org/html/rfc6265#section-4.1.2.3 * @see http://tools.ietf.org/html/rfc6265#section-5.1.3 * @see http://tools.ietf.org/html/rfc6265#section-5.2.3 @@ -362,10 +356,6 @@ protected function normalizeDomain(?string $domain = null): ?string /** * Processes path as per spec in RFC 6265. * - * @param string $path - * - * @return string - * * @see http://tools.ietf.org/html/rfc6265#section-5.1.4 * @see http://tools.ietf.org/html/rfc6265#section-5.2.4 */ @@ -380,11 +370,6 @@ protected function normalizePath(string $path): string return $path; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedNameAndValuePartIfSet(array $cookieStringParts): array { $name = \urlencode($this->name) . '='; @@ -404,11 +389,6 @@ protected function appendFormattedNameAndValuePartIfSet(array $cookieStringParts return $cookieStringParts; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedDomainPartIfSet(array $cookieStringParts): array { if ($this->domain !== null) { @@ -418,11 +398,6 @@ protected function appendFormattedDomainPartIfSet(array $cookieStringParts): arr return $cookieStringParts; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedPathPartIfSet(array $cookieStringParts): array { if ($this->path !== null) { @@ -432,11 +407,6 @@ protected function appendFormattedPathPartIfSet(array $cookieStringParts): array return $cookieStringParts; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedMaxAgePartIfSet(array $cookieStringParts): array { if ($this->maxAge) { @@ -446,11 +416,6 @@ protected function appendFormattedMaxAgePartIfSet(array $cookieStringParts): arr return $cookieStringParts; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedSecurePartIfSet(array $cookieStringParts): array { if ($this->secure) { @@ -460,11 +425,6 @@ protected function appendFormattedSecurePartIfSet(array $cookieStringParts): arr return $cookieStringParts; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedHttpOnlyPartIfSet(array $cookieStringParts): array { if ($this->httpOnly) { @@ -474,11 +434,6 @@ protected function appendFormattedHttpOnlyPartIfSet(array $cookieStringParts): a return $cookieStringParts; } - /** - * @param array $cookieStringParts - * - * @return array - */ protected function appendFormattedSameSitePartIfSet(array $cookieStringParts): array { if ($this->sameSite) { @@ -492,8 +447,6 @@ protected function appendFormattedSameSitePartIfSet(array $cookieStringParts): a * Check if the string / int is a unix timestamp. * * @param int|string $timestamp - * - * @return bool */ protected function isValidTimeStamp($timestamp): bool { @@ -504,8 +457,6 @@ protected function isValidTimeStamp($timestamp): bool * Get timestamp as cookie string format. * * @param null|DateTimeInterface|int|string $expiration - * - * @return null|string */ protected function getTimestamp($expiration): ?string { diff --git a/src/Viserio/Component/Cookie/AbstractCookieCollector.php b/src/Viserio/Component/Cookie/AbstractCookieCollector.php index d9a7d89ee..38a50730c 100644 --- a/src/Viserio/Component/Cookie/AbstractCookieCollector.php +++ b/src/Viserio/Component/Cookie/AbstractCookieCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; @@ -26,10 +26,6 @@ abstract class AbstractCookieCollector /** * Checking if request cookie exist. - * - * @param string $name - * - * @return bool */ public function has(string $name): bool { @@ -39,8 +35,6 @@ public function has(string $name): bool /** * Get a request cookie. * - * @param string $name - * * @return null|\Viserio\Component\Cookie\Cookie|\Viserio\Contract\Cookie\Cookie */ public function get(string $name) @@ -54,8 +48,6 @@ public function get(string $name) /** * Get all request cookies. - * - * @return array */ public function getAll(): array { @@ -86,8 +78,6 @@ public function add($cookie): self /** * Remove a request cookie. * - * @param string $name - * * @return $this */ public function remove(string $name): self @@ -105,10 +95,6 @@ public function remove(string $name): self /** * Split string on attributes delimiter to array. - * - * @param string $string - * - * @return array */ protected static function splitOnAttributeDelimiter(string $string): array { @@ -117,10 +103,6 @@ protected static function splitOnAttributeDelimiter(string $string): array /** * Split a string to array. - * - * @param string $string - * - * @return array */ protected static function splitCookiePair(string $string): array { diff --git a/src/Viserio/Component/Cookie/Container/Provider/CookieServiceProvider.php b/src/Viserio/Component/Cookie/Container/Provider/CookieServiceProvider.php index a62e00551..bababc3b0 100644 --- a/src/Viserio/Component/Cookie/Container/Provider/CookieServiceProvider.php +++ b/src/Viserio/Component/Cookie/Container/Provider/CookieServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Container\Provider; diff --git a/src/Viserio/Component/Cookie/Cookie.php b/src/Viserio/Component/Cookie/Cookie.php index c69084fd6..8f138bfad 100644 --- a/src/Viserio/Component/Cookie/Cookie.php +++ b/src/Viserio/Component/Cookie/Cookie.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; @@ -58,8 +58,6 @@ public function __toString(): string /** * Returns the name. - * - * @return string */ public function getName(): string { @@ -68,8 +66,6 @@ public function getName(): string /** * Returns the value. - * - * @return string */ public function getValue(): string { @@ -79,8 +75,6 @@ public function getValue(): string /** * Sets the value. * - * @param null|string $value - * * @return $this */ public function withValue(?string $value = null): Cookie diff --git a/src/Viserio/Component/Cookie/CookieJar.php b/src/Viserio/Component/Cookie/CookieJar.php index 1f328c4b9..e9d96ec7f 100644 --- a/src/Viserio/Component/Cookie/CookieJar.php +++ b/src/Viserio/Component/Cookie/CookieJar.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; @@ -128,10 +128,6 @@ public function unqueue(string $name): void /** * Set the default path and domain for the jar. * - * @param string $path - * @param string $domain - * @param bool $secure - * * @return $this */ public function setDefaultPathAndDomain(string $path, string $domain, bool $secure = false): self @@ -151,12 +147,6 @@ public function getQueuedCookies(): array /** * Get the path and domain, or the default values. - * - * @param null|string $path - * @param null|string $domain - * @param bool $secure - * - * @return array */ protected function getPathAndDomain(?string $path, ?string $domain, bool $secure = false): array { diff --git a/src/Viserio/Component/Cookie/Middleware/AddQueuedCookiesToResponseMiddleware.php b/src/Viserio/Component/Cookie/Middleware/AddQueuedCookiesToResponseMiddleware.php index 251013528..a79d45232 100644 --- a/src/Viserio/Component/Cookie/Middleware/AddQueuedCookiesToResponseMiddleware.php +++ b/src/Viserio/Component/Cookie/Middleware/AddQueuedCookiesToResponseMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Middleware; @@ -31,8 +31,6 @@ class AddQueuedCookiesToResponseMiddleware implements MiddlewareInterface /** * Create a new CookieQueue instance. - * - * @param \Viserio\Contract\Cookie\QueueingFactory $cookies */ public function __construct(CookieJar $cookies) { diff --git a/src/Viserio/Component/Cookie/Middleware/EncryptedCookiesMiddleware.php b/src/Viserio/Component/Cookie/Middleware/EncryptedCookiesMiddleware.php index 499b005cc..49ee68a27 100644 --- a/src/Viserio/Component/Cookie/Middleware/EncryptedCookiesMiddleware.php +++ b/src/Viserio/Component/Cookie/Middleware/EncryptedCookiesMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Middleware; @@ -45,8 +45,6 @@ class EncryptedCookiesMiddleware implements MiddlewareInterface /** * Create a new encrypt Cookies instance. - * - * @param \ParagonIE\Halite\Symmetric\EncryptionKey $key */ public function __construct(EncryptionKey $key) { @@ -55,8 +53,6 @@ public function __construct(EncryptionKey $key) /** * Hide this from var_dump(), etc. - * - * @return array */ public function __debugInfo(): array { @@ -79,10 +75,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface /** * Decrypt the cookies on the request. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Psr\Http\Message\ServerRequestInterface */ protected function decrypt(ServerRequestInterface $request): ServerRequestInterface { @@ -112,10 +104,6 @@ protected function decrypt(ServerRequestInterface $request): ServerRequestInterf /** * Encrypt the cookies on an outgoing response. - * - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return \Psr\Http\Message\ResponseInterface */ protected function encrypt(ResponseInterface $response): ResponseInterface { @@ -148,11 +136,6 @@ protected function encrypt(ResponseInterface $response): ResponseInterface /** * Duplicate a cookie with a new value. - * - * @param \Viserio\Contract\Cookie\Cookie $cookie - * @param string $value - * - * @return \Viserio\Contract\Cookie\Cookie */ protected function duplicate(CookieContract $cookie, string $value): CookieContract { @@ -169,10 +152,6 @@ protected function duplicate(CookieContract $cookie, string $value): CookieContr /** * Determine whether encryption has been disabled for the given cookie. - * - * @param string $name - * - * @return bool */ protected function isDisabled(string $name): bool { diff --git a/src/Viserio/Component/Cookie/RequestCookies.php b/src/Viserio/Component/Cookie/RequestCookies.php index 969d9546f..00147b56e 100644 --- a/src/Viserio/Component/Cookie/RequestCookies.php +++ b/src/Viserio/Component/Cookie/RequestCookies.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; @@ -21,8 +21,6 @@ final class RequestCookies extends AbstractCookieCollector /** * Create a new cookie collection instance. * - * @param array $cookies - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException */ public function __construct(array $cookies = []) @@ -39,11 +37,7 @@ public function __construct(array $cookies = []) /** * Creates a Cookie instance from a Set-Cookie header value. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException - * - * @return self */ public static function fromRequest(ServerRequestInterface $request): self { @@ -52,10 +46,6 @@ public static function fromRequest(ServerRequestInterface $request): self /** * Render Cookies into a Request. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Psr\Http\Message\ServerRequestInterface */ public function renderIntoCookieHeader(ServerRequestInterface $request): ServerRequestInterface { @@ -66,10 +56,6 @@ public function renderIntoCookieHeader(ServerRequestInterface $request): ServerR /** * Create a list of Cookies from a Cookie header value string. - * - * @param string $string - * - * @return array */ protected static function listFromCookieString(string $string): array { @@ -83,8 +69,6 @@ protected static function listFromCookieString(string $string): array /** * Create one Cookie from a cookie key/value header value string. * - * @param string $string - * * @return \Viserio\Component\Cookie\Cookie */ protected static function oneFromCookiePair(string $string): Cookie diff --git a/src/Viserio/Component/Cookie/ResponseCookies.php b/src/Viserio/Component/Cookie/ResponseCookies.php index 9c6908707..2635f365d 100644 --- a/src/Viserio/Component/Cookie/ResponseCookies.php +++ b/src/Viserio/Component/Cookie/ResponseCookies.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; @@ -23,8 +23,6 @@ final class ResponseCookies extends AbstractCookieCollector /** * Create a new cookie collection instance. * - * @param array $cookies - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException */ public function __construct(array $cookies = []) @@ -41,11 +39,7 @@ public function __construct(array $cookies = []) /** * Creates a Cookie instance from a Set-Cookie header value. * - * @param \Psr\Http\Message\ResponseInterface $response - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException - * - * @return self */ public static function fromResponse(ResponseInterface $response): self { @@ -56,10 +50,6 @@ public static function fromResponse(ResponseInterface $response): self /** * Render Cookies into a response. - * - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return \Psr\Http\Message\ResponseInterface */ public function renderIntoSetCookieHeader(ResponseInterface $response): ResponseInterface { @@ -74,10 +64,6 @@ public function renderIntoSetCookieHeader(ResponseInterface $response): Response /** * Creates a Cookie instance from a Set-Cookie header value. - * - * @param string $string - * - * @return \Viserio\Contract\Cookie\Cookie */ protected static function fromStringCookie(string $string): CookieContract { diff --git a/src/Viserio/Component/Cookie/SetCookie.php b/src/Viserio/Component/Cookie/SetCookie.php index d429fb843..da1ae1095 100644 --- a/src/Viserio/Component/Cookie/SetCookie.php +++ b/src/Viserio/Component/Cookie/SetCookie.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie; diff --git a/src/Viserio/Component/Cookie/Tests/Container/Provider/CookieServiceProviderTest.php b/src/Viserio/Component/Cookie/Tests/Container/Provider/CookieServiceProviderTest.php index 81abc473c..de50a76dd 100644 --- a/src/Viserio/Component/Cookie/Tests/Container/Provider/CookieServiceProviderTest.php +++ b/src/Viserio/Component/Cookie/Tests/Container/Provider/CookieServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests\Container\Provider; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class CookieServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Cookie/Tests/CookieJarTest.php b/src/Viserio/Component/Cookie/Tests/CookieJarTest.php index 77bfa20e7..a9085a980 100644 --- a/src/Viserio/Component/Cookie/Tests/CookieJarTest.php +++ b/src/Viserio/Component/Cookie/Tests/CookieJarTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class CookieJarTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Cookie/Tests/CookieTest.php b/src/Viserio/Component/Cookie/Tests/CookieTest.php index 192d51a7c..43077d689 100644 --- a/src/Viserio/Component/Cookie/Tests/CookieTest.php +++ b/src/Viserio/Component/Cookie/Tests/CookieTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class CookieTest extends TestCase { @@ -50,8 +51,6 @@ public function testInstantiationThrowsExceptionIfCookieNameIsEmpty(): void /** * @dataProvider provideInstantiationThrowsExceptionIfCookieNameContainsInvalidCharactersCases - * - * @param mixed $name */ public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidCharacters($name): void { @@ -77,8 +76,6 @@ public static function provideInstantiationThrowsExceptionIfCookieValueContainsI /** * @dataProvider provideInstantiationThrowsExceptionIfCookieValueContainsInvalidCharactersCases - * - * @param mixed $value */ public function testInstantiationThrowsExceptionIfCookieValueContainsInvalidCharacters($value): void { diff --git a/src/Viserio/Component/Cookie/Tests/Middleware/AddQueuedCookiesToResponseMiddlewareTest.php b/src/Viserio/Component/Cookie/Tests/Middleware/AddQueuedCookiesToResponseMiddlewareTest.php index 8fc776646..a53227dbc 100644 --- a/src/Viserio/Component/Cookie/Tests/Middleware/AddQueuedCookiesToResponseMiddlewareTest.php +++ b/src/Viserio/Component/Cookie/Tests/Middleware/AddQueuedCookiesToResponseMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests\Middleware; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class AddQueuedCookiesToResponseMiddlewareTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Cookie/Tests/Middleware/EncryptedCookiesMiddlewareTest.php b/src/Viserio/Component/Cookie/Tests/Middleware/EncryptedCookiesMiddlewareTest.php index ceef02ce4..d24e7c33d 100644 --- a/src/Viserio/Component/Cookie/Tests/Middleware/EncryptedCookiesMiddlewareTest.php +++ b/src/Viserio/Component/Cookie/Tests/Middleware/EncryptedCookiesMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests\Middleware; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class EncryptedCookiesMiddlewareTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Cookie/Tests/RequestCookiesTest.php b/src/Viserio/Component/Cookie/Tests/RequestCookiesTest.php index ee7238aa0..3db7bfe94 100644 --- a/src/Viserio/Component/Cookie/Tests/RequestCookiesTest.php +++ b/src/Viserio/Component/Cookie/Tests/RequestCookiesTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests; @@ -64,9 +64,6 @@ public function testAddCookieToHeaderAndBack(): void * @dataProvider provideParsesFromCookieStringWithoutExpireData * * Cant test with automatic expires, test are one sec to slow. - * - * @param mixed $cookieString - * @param array $expectedCookies */ public function testFromCookieHeaderWithoutExpire($cookieString, array $expectedCookies): void { @@ -86,10 +83,6 @@ public function testFromCookieHeaderWithoutExpire($cookieString, array $expected /** * @dataProvider provideItGetsCookieByNameCases - * - * @param string $cookieString - * @param string $cookieName - * @param Cookie $expectedCookie */ public function testItGetsCookieByName(string $cookieString, string $cookieName, Cookie $expectedCookie): void { @@ -106,9 +99,6 @@ public function testItGetsCookieByName(string $cookieString, string $cookieName, /** * @dataProvider provideParsesFromCookieStringWithoutExpireData - * - * @param string $setCookieStrings - * @param array $expectedSetCookies */ public function testItKnowsWhichCookiesAreAvailable(string $setCookieStrings, array $expectedSetCookies): void { diff --git a/src/Viserio/Component/Cookie/Tests/ResponseCookiesTest.php b/src/Viserio/Component/Cookie/Tests/ResponseCookiesTest.php index 4f83e567d..1dd2bb230 100644 --- a/src/Viserio/Component/Cookie/Tests/ResponseCookiesTest.php +++ b/src/Viserio/Component/Cookie/Tests/ResponseCookiesTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests; @@ -43,9 +43,6 @@ public function testRequestCookiesToThrowException(): void /** * @dataProvider provideFromSetCookieHeaderCases - * - * @param array $cookieStrings - * @param array $expectedCookies */ public function testFromSetCookieHeader(array $cookieStrings, array $expectedCookies): void { @@ -63,9 +60,6 @@ public function testFromSetCookieHeader(array $cookieStrings, array $expectedCoo * @dataProvider provideFromSetCookieHeaderWithoutExpireCases * * Cant test with automatic expires, test are one sec to slow. - * - * @param array $cookieStrings - * @param array $expectedCookies */ public function testFromSetCookieHeaderWithoutExpire(array $cookieStrings, array $expectedCookies): void { diff --git a/src/Viserio/Component/Cookie/Tests/SetCookieTest.php b/src/Viserio/Component/Cookie/Tests/SetCookieTest.php index eaaad2d82..bd9431b61 100644 --- a/src/Viserio/Component/Cookie/Tests/SetCookieTest.php +++ b/src/Viserio/Component/Cookie/Tests/SetCookieTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Tests; @@ -46,8 +46,6 @@ public static function provideInstantiationThrowsExceptionIfCookieNameContainsIn /** * @dataProvider provideInstantiationThrowsExceptionIfCookieNameContainsInvalidCharactersCases - * - * @param mixed $name */ public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidCharacters($name): void { @@ -72,8 +70,6 @@ public static function provideInstantiationThrowsExceptionIfCookieValueContainsI /** * @dataProvider provideInstantiationThrowsExceptionIfCookieValueContainsInvalidCharactersCases - * - * @param mixed $value */ public function testInstantiationThrowsExceptionIfCookieValueContainsInvalidCharacters($value): void { @@ -377,6 +373,7 @@ public function testToString(): void { $time = new DateTime('Fri, 20-May-2011 15:25:52 GMT'); $cookie = new SetCookie('foo', 'bar', $time, '/', '.myfoodomain.com', true, true, SetCookie::SAMESITE_STRICT); + self::assertEquals( 'foo=bar; Expires=' . (new Chronos(\gmdate('D, d-M-Y H:i:s', $time->getTimestamp())))->toCookieString() . '; Path=/; Domain=myfoodomain.com; Secure; HttpOnly; SameSite=strict', $cookie->__toString(), @@ -384,16 +381,18 @@ public function testToString(): void ); $cookie = new SetCookie('foo', null, 1, '/admin/', '.myfoodomain.com', false, true); + self::assertEquals( 'foo=deleted; Expires=' . (new Chronos(\gmdate( 'D, d-M-Y H:i:s T', Chronos::now()->getTimestamp() - 31536001 - )))->toCookieString() . '; Path=/admin; Domain=myfoodomain.com; Max-Age=1; HttpOnly', + )))->setTimezone('UTC')->toCookieString() . '; Path=/admin; Domain=myfoodomain.com; Max-Age=1; HttpOnly', $cookie->__toString(), '->__toString() returns string representation of a cleared cookie if value is NULL' ); $cookie = new SetCookie('foo'); + self::assertEquals( 'foo=deleted; Expires=' . (new Chronos(\gmdate( 'D, d-M-Y H:i:s T', diff --git a/src/Viserio/Component/Cookie/Traits/CookieValidatorTrait.php b/src/Viserio/Component/Cookie/Traits/CookieValidatorTrait.php index efd38c150..02486801c 100644 --- a/src/Viserio/Component/Cookie/Traits/CookieValidatorTrait.php +++ b/src/Viserio/Component/Cookie/Traits/CookieValidatorTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cookie\Traits; @@ -20,13 +20,9 @@ trait CookieValidatorTrait /** * Validates the name attribute. * - * @param string $name - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException * * @see http://tools.ietf.org/search/rfc2616#section-2.2 - * - * @return void */ protected function validateName(string $name): void { @@ -43,13 +39,9 @@ protected function validateName(string $name): void /** * Validates a value. * - * @param null|string $value - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException * * @see http://tools.ietf.org/html/rfc6265#section-4.1.1 - * - * @return void */ protected function validateValue(?string $value = null): void { diff --git a/src/Viserio/Component/Cookie/composer.json b/src/Viserio/Component/Cookie/composer.json index de9d5057d..473c60575 100644 --- a/src/Viserio/Component/Cookie/composer.json +++ b/src/Viserio/Component/Cookie/composer.json @@ -36,12 +36,11 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "paragonie/halite": "^4.6.0", "phpunit/phpunit": "8.2.*", "psr/http-server-middleware": "^1.0.0", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/Cookie/phpstan.neon b/src/Viserio/Component/Cookie/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Cookie/phpstan.neon +++ b/src/Viserio/Component/Cookie/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Cookie/phpunit.xml b/src/Viserio/Component/Cookie/phpunit.xml new file mode 100644 index 000000000..a6ef4eb57 --- /dev/null +++ b/src/Viserio/Component/Cookie/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Cookie/phpunit.xml.dist b/src/Viserio/Component/Cookie/phpunit.xml.dist deleted file mode 100644 index 64fc71c19..000000000 --- a/src/Viserio/Component/Cookie/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Cron/.gitignore b/src/Viserio/Component/Cron/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Cron/.gitignore +++ b/src/Viserio/Component/Cron/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Cron/Bootstrap/CronSchedulingLoaderBootstrap.php b/src/Viserio/Component/Cron/Bootstrap/CronSchedulingLoaderBootstrap.php index b562d578c..9a4c15177 100644 --- a/src/Viserio/Component/Cron/Bootstrap/CronSchedulingLoaderBootstrap.php +++ b/src/Viserio/Component/Cron/Bootstrap/CronSchedulingLoaderBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Bootstrap; diff --git a/src/Viserio/Component/Cron/CallbackCron.php b/src/Viserio/Component/Cron/CallbackCron.php index 8ea73142d..da451a58a 100644 --- a/src/Viserio/Component/Cron/CallbackCron.php +++ b/src/Viserio/Component/Cron/CallbackCron.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron; @@ -37,7 +37,6 @@ class CallbackCron extends Cron * Create a new callback cron instance. * * @param callable|string $callback - * @param array $parameters * * @throws \Viserio\Contract\Cron\Exception\InvalidArgumentException */ @@ -55,8 +54,6 @@ public function __construct($callback, array $parameters = []) /** * Run the given cron job. - * - * @return mixed */ public function run() { @@ -87,8 +84,6 @@ public function run() * Do not allow the cron job to overlap each other. * * @throws \Viserio\Contract\Cron\Exception\LogicException - * - * @return \Viserio\Contract\Cron\Cron */ public function withoutOverlapping(): CronContract { @@ -103,8 +98,6 @@ public function withoutOverlapping(): CronContract /** * Get the summary of the event for display. - * - * @return string */ public function getSummaryForDisplay(): string { @@ -117,8 +110,6 @@ public function getSummaryForDisplay(): string /** * Get the mutex name for the scheduled command. - * - * @return string */ protected function getMutexName(): string { diff --git a/src/Viserio/Component/Cron/Command/CronListCommand.php b/src/Viserio/Component/Cron/Command/CronListCommand.php index 52438703d..52ddef621 100644 --- a/src/Viserio/Component/Cron/Command/CronListCommand.php +++ b/src/Viserio/Component/Cron/Command/CronListCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Command; @@ -32,8 +32,6 @@ class CronListCommand extends AbstractCommand /** * {@inheritdoc} - * - * @param \Viserio\Component\Cron\Schedule $schedule */ public function handle(Schedule $schedule): int { diff --git a/src/Viserio/Component/Cron/Command/ScheduleRunCommand.php b/src/Viserio/Component/Cron/Command/ScheduleRunCommand.php index a7328a09b..a44ecbdfb 100644 --- a/src/Viserio/Component/Cron/Command/ScheduleRunCommand.php +++ b/src/Viserio/Component/Cron/Command/ScheduleRunCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Command; @@ -48,8 +48,6 @@ public function __construct(string $env, bool $maintenance) /** * {@inheritdoc} - * - * @param \Viserio\Component\Cron\Schedule $schedule */ public function handle(Schedule $schedule): int { diff --git a/src/Viserio/Component/Cron/Container/Provider/CronServiceProvider.php b/src/Viserio/Component/Cron/Container/Provider/CronServiceProvider.php index 265062eed..d26de96ba 100644 --- a/src/Viserio/Component/Cron/Container/Provider/CronServiceProvider.php +++ b/src/Viserio/Component/Cron/Container/Provider/CronServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Container\Provider; diff --git a/src/Viserio/Component/Cron/Cron.php b/src/Viserio/Component/Cron/Cron.php index bc6d5a862..b25ca7fb6 100644 --- a/src/Viserio/Component/Cron/Cron.php +++ b/src/Viserio/Component/Cron/Cron.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron; @@ -142,8 +142,6 @@ class Cron implements CronContract /** * Create a new cron instance. - * - * @param string $command */ public function __construct(string $command) { @@ -199,8 +197,6 @@ public function setEnvironments($environments): CronContract /** * Get the working directory. - * - * @return string */ public function getPath(): string { @@ -210,8 +206,6 @@ public function getPath(): string /** * Set working directory. * - * @param string $path - * * @return $this */ public function setPath(string $path): self @@ -279,8 +273,6 @@ public function withoutOverlapping(): CronContract /** * Determine if the cron job runs in maintenance mode. - * - * @return bool */ public function runsInMaintenanceMode(): bool { @@ -742,8 +734,6 @@ public function filtersPass(): bool /** * Check if os is windows. - * - * @return bool */ protected function isWindows(): bool { @@ -752,10 +742,6 @@ protected function isWindows(): bool /** * Finalize the event's command syntax with the correct user. - * - * @param string $command - * - * @return string */ protected function ensureCorrectUser(string $command): string { @@ -763,11 +749,9 @@ protected function ensureCorrectUser(string $command): string return 'sudo -u ' . $this->user . ' -- sh -c \'' . $command . '\''; } - // http://de2.php.net/manual/en/function.exec.php#56599 // The "start" command will start a detached process, a similar effect to &. The "/B" option prevents // start from opening a new terminal window if the program you are running is a console application. if ($this->user && $this->isWindows()) { - // https://superuser.com/questions/42537/is-there-any-sudo-command-for-windows // Options for runas : [{/profile|/noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] /user:UserAccountName return 'runas ' . $this->user . 'start /B ' . $command; @@ -783,7 +767,6 @@ protected function ensureCorrectUser(string $command): string /** * Splice the given value into the given position of the expression. * - * @param int $position * @param int|string $value * * @return static @@ -798,8 +781,6 @@ protected function spliceIntoPosition(int $position, $value) /** * Get the default output depending on the OS. - * - * @return string */ protected function getDefaultOutput(): string { @@ -808,8 +789,6 @@ protected function getDefaultOutput(): string /** * Determine if the Cron expression passes. - * - * @return bool */ protected function expressionPasses(): bool { @@ -866,8 +845,6 @@ protected function runCommandInBackground(): int /** * Call all of the "before" callbacks for the cron job. - * - * @return void */ protected function callBeforeCallbacks(): void { @@ -878,8 +855,6 @@ protected function callBeforeCallbacks(): void /** * Call all of the "after" callbacks for the cron job. - * - * @return void */ protected function callAfterCallbacks(): void { @@ -890,8 +865,6 @@ protected function callAfterCallbacks(): void /** * Get the mutex name for the scheduled command. - * - * @return string */ protected function getMutexName(): string { @@ -900,11 +873,6 @@ protected function getMutexName(): string /** * Schedule the cron job to run between start and end time. - * - * @param string $startTime - * @param string $endTime - * - * @return Closure */ protected function inTimeInterval(string $startTime, string $endTime): Closure { @@ -922,11 +890,6 @@ protected function inTimeInterval(string $startTime, string $endTime): Closure /** * Check if startTime and endTime are before and after midnight. - * - * @param string $startTime - * @param string $endTime - * - * @return bool */ private function isMidnightBetween(string $startTime, string $endTime): bool { diff --git a/src/Viserio/Component/Cron/Resource/cron.php b/src/Viserio/Component/Cron/Resource/cron.php index dbfa581a5..5d57661a2 100644 --- a/src/Viserio/Component/Cron/Resource/cron.php +++ b/src/Viserio/Component/Cron/Resource/cron.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return []; diff --git a/src/Viserio/Component/Cron/Schedule.php b/src/Viserio/Component/Cron/Schedule.php index 43827253f..ebaacfb05 100644 --- a/src/Viserio/Component/Cron/Schedule.php +++ b/src/Viserio/Component/Cron/Schedule.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron; @@ -50,8 +50,7 @@ class Schedule implements ScheduleContract /** * Create a new Schedule instance. * - * @param string $path path for the working directory - * @param null|string $consoleName + * @param string $path path for the working directory */ public function __construct(string $path, ?string $consoleName = null) { @@ -150,10 +149,6 @@ public function dueCronJobs(string $environment, bool $isMaintenance = false): a /** * Compile parameters for a command. - * - * @param array $parameters - * - * @return string */ protected function compileParameters(array $parameters): string { diff --git a/src/Viserio/Component/Cron/Tests/Bootstrap/CronSchedulingLoaderBootstrapTest.php b/src/Viserio/Component/Cron/Tests/Bootstrap/CronSchedulingLoaderBootstrapTest.php index a118071cd..be1d3161d 100644 --- a/src/Viserio/Component/Cron/Tests/Bootstrap/CronSchedulingLoaderBootstrapTest.php +++ b/src/Viserio/Component/Cron/Tests/Bootstrap/CronSchedulingLoaderBootstrapTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests\Bootstrap; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class CronSchedulingLoaderBootstrapTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Cron/Tests/CallbackCronTest.php b/src/Viserio/Component/Cron/Tests/CallbackCronTest.php index 862d6f284..e922f97d6 100644 --- a/src/Viserio/Component/Cron/Tests/CallbackCronTest.php +++ b/src/Viserio/Component/Cron/Tests/CallbackCronTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests; diff --git a/src/Viserio/Component/Cron/Tests/Command/CronListCommandTest.php b/src/Viserio/Component/Cron/Tests/Command/CronListCommandTest.php index 6df9378fa..7dbfbd87f 100644 --- a/src/Viserio/Component/Cron/Tests/Command/CronListCommandTest.php +++ b/src/Viserio/Component/Cron/Tests/Command/CronListCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests\Command; diff --git a/src/Viserio/Component/Cron/Tests/Command/ScheduleRunCommandTest.php b/src/Viserio/Component/Cron/Tests/Command/ScheduleRunCommandTest.php index 35955e628..e1f3e172c 100644 --- a/src/Viserio/Component/Cron/Tests/Command/ScheduleRunCommandTest.php +++ b/src/Viserio/Component/Cron/Tests/Command/ScheduleRunCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests\Command; @@ -116,9 +116,6 @@ public function testCommandWithFalseFilter(): void self::assertEquals("No scheduled commands are ready to run.\n", $output); } - /** - * @param \Psr\Container\ContainerInterface $container - */ private function arrangeInvoker(ContainerInterface $container): void { $this->invoker->setContainer($container) diff --git a/src/Viserio/Component/Cron/Tests/Container/Provider/CronServiceProviderTest.php b/src/Viserio/Component/Cron/Tests/Container/Provider/CronServiceProviderTest.php index a1e8e4aa9..69c285d77 100644 --- a/src/Viserio/Component/Cron/Tests/Container/Provider/CronServiceProviderTest.php +++ b/src/Viserio/Component/Cron/Tests/Container/Provider/CronServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests\Container\Provider; diff --git a/src/Viserio/Component/Cron/Tests/CronTest.php b/src/Viserio/Component/Cron/Tests/CronTest.php index 6f3a76279..31199af2a 100644 --- a/src/Viserio/Component/Cron/Tests/CronTest.php +++ b/src/Viserio/Component/Cron/Tests/CronTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests; diff --git a/src/Viserio/Component/Cron/Tests/Fixture/ConsoleCerebroCommandFixture.php b/src/Viserio/Component/Cron/Tests/Fixture/ConsoleCerebroCommandFixture.php index 54d583557..5563d4c72 100644 --- a/src/Viserio/Component/Cron/Tests/Fixture/ConsoleCerebroCommandFixture.php +++ b/src/Viserio/Component/Cron/Tests/Fixture/ConsoleCerebroCommandFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests\Fixture; diff --git a/src/Viserio/Component/Cron/Tests/Fixture/DummyClassFixture.php b/src/Viserio/Component/Cron/Tests/Fixture/DummyClassFixture.php index 6764b81ab..7f9b2afdd 100644 --- a/src/Viserio/Component/Cron/Tests/Fixture/DummyClassFixture.php +++ b/src/Viserio/Component/Cron/Tests/Fixture/DummyClassFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests\Fixture; diff --git a/src/Viserio/Component/Cron/Tests/Fixture/cron_jobs.php b/src/Viserio/Component/Cron/Tests/Fixture/cron_jobs.php index d2afb738b..06796a8cc 100644 --- a/src/Viserio/Component/Cron/Tests/Fixture/cron_jobs.php +++ b/src/Viserio/Component/Cron/Tests/Fixture/cron_jobs.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use PHPUnit\Framework\Assert; diff --git a/src/Viserio/Component/Cron/Tests/ScheduleTest.php b/src/Viserio/Component/Cron/Tests/ScheduleTest.php index 407636a6d..c91b5c0f6 100644 --- a/src/Viserio/Component/Cron/Tests/ScheduleTest.php +++ b/src/Viserio/Component/Cron/Tests/ScheduleTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Cron\Tests; @@ -98,6 +98,10 @@ public function testCommandCreatesNewCerebroCommand(): void self::assertEquals($binary . " {$escape}cerebro{$escape} clear:view --tries=3", $cronJobs[2]->getCommand()); } + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ public function testCommandThrowException(): void { $this->expectException(LogicException::class); @@ -174,9 +178,6 @@ public function testCreateNewCerebroCommandUsingCallBack(): void self::assertSame('Closure', $cronJobs[0]->getSummaryForDisplay()); } - /** - * @param \Viserio\Component\Cron\Schedule $schedule - */ private function arrangeScheduleClearViewCommand(Schedule $schedule): void { $schedule->command('clear:view'); diff --git a/src/Viserio/Component/Cron/composer.json b/src/Viserio/Component/Cron/composer.json index 741d4fae7..80e66d425 100644 --- a/src/Viserio/Component/Cron/composer.json +++ b/src/Viserio/Component/Cron/composer.json @@ -30,16 +30,16 @@ "psr/container": "^1.0.0", "symfony/polyfill-mbstring": "^1.8.0", "symfony/process": "^4.3.8 || ^5.0.0", + "viserio/cache-contract": "^1.0@dev", "viserio/container-contract": "^1.0@dev", "viserio/cron-contract": "^1.0@dev", "viserio/support": "^1.0@dev" }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/Cron/phpstan.neon b/src/Viserio/Component/Cron/phpstan.neon index b1816ce85..ece515ccd 100644 --- a/src/Viserio/Component/Cron/phpstan.neon +++ b/src/Viserio/Component/Cron/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Cron/phpunit.xml b/src/Viserio/Component/Cron/phpunit.xml new file mode 100644 index 000000000..ff419da2f --- /dev/null +++ b/src/Viserio/Component/Cron/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Cron/phpunit.xml.dist b/src/Viserio/Component/Cron/phpunit.xml.dist deleted file mode 100644 index b7ea18c52..000000000 --- a/src/Viserio/Component/Cron/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Events/.gitignore b/src/Viserio/Component/Events/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Events/.gitignore +++ b/src/Viserio/Component/Events/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Events/Container/Provider/EventsDataCollectorServiceProvider.php b/src/Viserio/Component/Events/Container/Provider/EventsDataCollectorServiceProvider.php index 424c26070..1e35edaf3 100644 --- a/src/Viserio/Component/Events/Container/Provider/EventsDataCollectorServiceProvider.php +++ b/src/Viserio/Component/Events/Container/Provider/EventsDataCollectorServiceProvider.php @@ -3,87 +3,17 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// namespace Viserio\Component\Events\Container\Provider; -// -// use Psr\Container\ContainerInterface; -// use Psr\Log\LoggerInterface; -// use Viserio\Component\Container\Definition\ReferenceDefinition; -// use Viserio\Contract\Container\ObjectDefinition as ObjectDefinitionContract; -// use Viserio\Contract\Container\ServiceProvider\ContainerBuilder as ContainerBuilderContract; -// use Viserio\Contract\Container\ServiceProvider\ExtendServiceProvider as ExtendServiceProviderContract; -// use Viserio\Contract\Container\ServiceProvider\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Events\DataCollector\TraceableEventManager; -// use Viserio\Component\Events\DataCollector\ViserioEventsDataCollector; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// // class EventsDataCollectorServiceProvider implements // ServiceProviderContract, // ExtendServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function build(ContainerBuilderContract $container): void -// { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['events']) { -// $container->singleton(TraceableEventManager::class) -// ->addMethodCall('setLogger', [new ReferenceDefinition(LoggerInterface::class, ReferenceDefinition::IGNORE_ON_INVALID_REFERENCE)]); -// $container->singleton(ViserioEventsDataCollector::class); -// } -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// ProfilerContract::class => static function (ObjectDefinitionContract $definition, ContainerInterface $container): ObjectDefinitionContract { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['events']) { -// $definition->addMethodCall('addCollector', [new ReferenceDefinition(ViserioEventsDataCollector::class)]); -// } -// -// return $definition; -// }, -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'events' => false, -// ], -// ]; -// } -// } diff --git a/src/Viserio/Component/Events/Container/Provider/EventsServiceProvider.php b/src/Viserio/Component/Events/Container/Provider/EventsServiceProvider.php index 34034b523..582cd59ca 100644 --- a/src/Viserio/Component/Events/Container/Provider/EventsServiceProvider.php +++ b/src/Viserio/Component/Events/Container/Provider/EventsServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Container\Provider; diff --git a/src/Viserio/Component/Events/DataCollector/TraceableEventManager.php b/src/Viserio/Component/Events/DataCollector/TraceableEventManager.php index 5ae8502fb..c33628e50 100644 --- a/src/Viserio/Component/Events/DataCollector/TraceableEventManager.php +++ b/src/Viserio/Component/Events/DataCollector/TraceableEventManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\DataCollector; @@ -64,7 +64,6 @@ class TraceableEventManager implements EventManagerContract, LoggerAwareInterfac * Create a new TraceableEventManager instance. * * @param null|\Viserio\Component\Events\EventManager $eventManager - * @param \Symfony\Component\Stopwatch\Stopwatch $stopwatch * * @throws \Viserio\Contract\Events\Exception\RuntimeException */ @@ -77,11 +76,6 @@ public function __construct(EventManager $eventManager, Stopwatch $stopwatch) /** * Proxy all method calls to the original event manager. - * - * @param string $method - * @param array $parameters - * - * @return mixed */ public function __call(string $method, array $parameters) { @@ -232,8 +226,6 @@ public function getNotCalledListeners(): array /** * Resets this to its initial state. - * - * @return void */ public function reset(): void { @@ -268,11 +260,6 @@ public function getListenerPriority(string $eventName, $listener): ?int return $this->eventManager->getListenerPriority($eventName, $listener); } - /** - * @param string $eventName - * - * @return void - */ private function preProcess(string $eventName): void { if (\count($this->eventManager->getListeners($eventName)) === 0) { @@ -290,9 +277,6 @@ private function preProcess(string $eventName): void } } - /** - * @param string $eventName - */ private function postProcess(string $eventName): void { unset($this->wrappedListeners[$eventName]); @@ -334,12 +318,6 @@ private function postProcess(string $eventName): void } } - /** - * @param array $a - * @param array $b - * - * @return int - */ private function sortListenersByPriority(array $a, array $b): int { if (\is_int($a['priority']) && ! \is_int($b['priority'])) { diff --git a/src/Viserio/Component/Events/DataCollector/ViserioEventsDataCollector.php b/src/Viserio/Component/Events/DataCollector/ViserioEventsDataCollector.php index ecdb8026a..477a29e4a 100644 --- a/src/Viserio/Component/Events/DataCollector/ViserioEventsDataCollector.php +++ b/src/Viserio/Component/Events/DataCollector/ViserioEventsDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\DataCollector; diff --git a/src/Viserio/Component/Events/DataCollector/WrappedListener.php b/src/Viserio/Component/Events/DataCollector/WrappedListener.php index a215ee645..0fffdc80b 100644 --- a/src/Viserio/Component/Events/DataCollector/WrappedListener.php +++ b/src/Viserio/Component/Events/DataCollector/WrappedListener.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\DataCollector; @@ -37,7 +37,7 @@ class WrappedListener /** * Given event listener. * - * @var array|\Closure|string + * @var array|Closure|string */ private $listener; @@ -75,9 +75,7 @@ class WrappedListener /** * Create a new WrappedListener instance. * - * @param array|\Closure|string $listener - * @param null|string $name - * @param \Symfony\Component\Stopwatch\Stopwatch $stopwatch + * @param array|Closure|string $listener * @param null|\Viserio\Component\Events\DataCollector\TraceableEventManager $eventManager */ public function __construct( @@ -101,11 +99,6 @@ public function __construct( } } - /** - * @param \Viserio\Contract\Events\Event $event - * - * @return void - */ public function __invoke(EventContract $event): void { $this->called = true; @@ -125,8 +118,6 @@ public function __invoke(EventContract $event): void /** * Get a pretty info string about the called event. - * - * @return string */ public function getPretty(): string { @@ -145,8 +136,6 @@ public function getWrappedListener() /** * Was the event called? - * - * @return bool */ public function wasCalled(): bool { @@ -155,10 +144,6 @@ public function wasCalled(): bool /** * Get information's about given event. - * - * @param string $eventName - * - * @return array */ public function getInfo(string $eventName): array { @@ -174,9 +159,7 @@ public function getInfo(string $eventName): array } /** - * @param array|\Closure|string $listener - * - * @return void + * @param array|Closure|string $listener */ private function analyzeListener($listener): void { diff --git a/src/Viserio/Component/Events/Event.php b/src/Viserio/Component/Events/Event.php index 48d16220f..5be3ac92a 100644 --- a/src/Viserio/Component/Events/Event.php +++ b/src/Viserio/Component/Events/Event.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events; diff --git a/src/Viserio/Component/Events/EventManager.php b/src/Viserio/Component/Events/EventManager.php index 2e6f2fd0a..47a5a339d 100644 --- a/src/Viserio/Component/Events/EventManager.php +++ b/src/Viserio/Component/Events/EventManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events; @@ -56,10 +56,6 @@ class EventManager implements EventManagerContract * The list is returned as an array, and the list of events are sorted by * their priority. * - * @param null|string $eventName - * - * @return array - * * @internal */ public function getListeners(?string $eventName = null): array @@ -235,10 +231,6 @@ public function clearListeners(string $eventName): void /** * Sort the listeners for a given event by priority. - * - * @param string $eventName - * - * @return void */ protected function sortListeners(string $eventName): void { @@ -265,10 +257,6 @@ protected function sortListeners(string $eventName): void /** * Binds all patterns that match the specified event name. - * - * @param string $eventName - * - * @return void */ protected function bindPatterns(string $eventName): void { @@ -294,11 +282,6 @@ protected function bindPatterns(string $eventName): void * * This method cannot be used to remove a listener from a pattern that was * never registered. - * - * @param string $eventPattern - * @param mixed $listener - * - * @return void */ protected function removeListenerPattern(string $eventPattern, $listener): void { @@ -318,10 +301,6 @@ protected function removeListenerPattern(string $eventPattern, $listener): void /** * Checks whether a string contains any wildcard characters. - * - * @param string $subject - * - * @return bool */ private function hasWildcards(string $subject): bool { @@ -335,8 +314,6 @@ private function hasWildcards(string $subject): bool * dispatched. * * @param \Viserio\Component\Events\ListenerPattern $pattern - * - * @return void */ private function addListenerPattern(ListenerPattern $pattern): void { diff --git a/src/Viserio/Component/Events/ListenerPattern.php b/src/Viserio/Component/Events/ListenerPattern.php index f8bbd6268..9e400b9de 100644 --- a/src/Viserio/Component/Events/ListenerPattern.php +++ b/src/Viserio/Component/Events/ListenerPattern.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events; @@ -34,15 +34,11 @@ class ListenerPattern /** * The event. - * - * @var mixed */ protected $listener; /** * The listener provider. - * - * @var mixed */ protected $provider; @@ -80,10 +76,6 @@ class ListenerPattern /** * Create a new listener pattern instance. - * - * @param string $eventPattern - * @param mixed $listener - * @param int $priority */ public function __construct(string $eventPattern, $listener, int $priority = 0) { @@ -106,8 +98,6 @@ public function __construct(string $eventPattern, $listener, int $priority = 0) /** * Get the listener. - * - * @return mixed */ public function getListener() { @@ -121,8 +111,6 @@ public function getListener() /** * Get the event pattern. - * - * @return string */ public function getEventPattern(): string { @@ -131,11 +119,6 @@ public function getEventPattern(): string /** * Adds this pattern's listener to an event. - * - * @param \Viserio\Contract\Events\EventManager $dispatcher - * @param string $eventName - * - * @return void */ public function bind(EventManagerContract $dispatcher, string $eventName): void { @@ -150,10 +133,6 @@ public function bind(EventManagerContract $dispatcher, string $eventName): void /** * Removes this pattern's listener from all events to which it was * previously added. - * - * @param \Viserio\Contract\Events\EventManager $dispatcher - * - * @return void */ public function unbind(EventManagerContract $dispatcher): void { @@ -166,10 +145,6 @@ public function unbind(EventManagerContract $dispatcher): void /** * Tests if this pattern matches and event name. - * - * @param string $eventName - * - * @return bool */ final public function test(string $eventName): bool { @@ -178,10 +153,6 @@ final public function test(string $eventName): bool /** * Transforms an event pattern into a regular expression. - * - * @param string $eventPattern - * - * @return string */ private function createRegex(string $eventPattern): string { diff --git a/src/Viserio/Component/Events/Tests/Container/Provider/EventsDataCollectorServiceProviderTest.php b/src/Viserio/Component/Events/Tests/Container/Provider/EventsDataCollectorServiceProviderTest.php index 8d413732e..eaed8cd99 100644 --- a/src/Viserio/Component/Events/Tests/Container/Provider/EventsDataCollectorServiceProviderTest.php +++ b/src/Viserio/Component/Events/Tests/Container/Provider/EventsDataCollectorServiceProviderTest.php @@ -3,75 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// namespace Viserio\Component\Events\Tests\Container\Provider; -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Events\Provider\EventsDataCollectorServiceProvider; -// use Viserio\Component\Events\Provider\EventsServiceProvider; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// ///** // * @internal // */ // final class EventsDataCollectorServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new EventsServiceProvider()); -// $container->register(new EventsDataCollectorServiceProvider()); -// -// $container->bind( -// 'config', -// [ -// 'viserio' => [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'events' => true, -// ], -// ], -// ], -// ] -// ); -// -// $profiler = $container->get(ProfilerContract::class); -// -// $this->assertInstanceOf(ProfilerContract::class, $profiler); -// -// $this->assertArrayHasKey('time-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('memory-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('viserio-events-data-collector', $profiler->getCollectors()); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Events/Tests/Container/Provider/EventsServiceProviderTest.php b/src/Viserio/Component/Events/Tests/Container/Provider/EventsServiceProviderTest.php index 2eb97262d..14ea1c294 100644 --- a/src/Viserio/Component/Events/Tests/Container/Provider/EventsServiceProviderTest.php +++ b/src/Viserio/Component/Events/Tests/Container/Provider/EventsServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests\Provider; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class EventsServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Events/Tests/DataCollector/TraceableEventManagerTest.php b/src/Viserio/Component/Events/Tests/DataCollector/TraceableEventManagerTest.php index fcf26648a..798a2c99e 100644 --- a/src/Viserio/Component/Events/Tests/DataCollector/TraceableEventManagerTest.php +++ b/src/Viserio/Component/Events/Tests/DataCollector/TraceableEventManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests\DataCollector; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class TraceableEventManagerTest extends MockeryTestCase { @@ -47,10 +48,6 @@ protected function setup(): void $this->dispatcher = new class() extends EventManager { /** * Determine if a given event has listeners. - * - * @param string $eventName - * - * @return bool */ public function hasListeners(string $eventName): bool { diff --git a/src/Viserio/Component/Events/Tests/DataCollector/WrappedListenerTest.php b/src/Viserio/Component/Events/Tests/DataCollector/WrappedListenerTest.php index e77ca1b4b..c5fb00fa0 100644 --- a/src/Viserio/Component/Events/Tests/DataCollector/WrappedListenerTest.php +++ b/src/Viserio/Component/Events/Tests/DataCollector/WrappedListenerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests\DataCollector; @@ -22,14 +22,12 @@ * @internal * * @small + * @coversNothing */ final class WrappedListenerTest extends MockeryTestCase { /** * @dataProvider provideStubCases - * - * @param mixed $listener - * @param mixed $pretty */ public function testGetPretty($listener, $pretty): void { @@ -40,10 +38,6 @@ public function testGetPretty($listener, $pretty): void /** * @dataProvider provideStubCases - * - * @param mixed $listener - * @param string $pretty - * @param string $stub */ public function testStub($listener, string $pretty, string $stub): void { diff --git a/src/Viserio/Component/Events/Tests/EventManagerTest.php b/src/Viserio/Component/Events/Tests/EventManagerTest.php index 983906291..51d3abd78 100644 --- a/src/Viserio/Component/Events/Tests/EventManagerTest.php +++ b/src/Viserio/Component/Events/Tests/EventManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class EventManagerTest extends TestCase { @@ -474,11 +475,6 @@ public function testGetLazyListeners(): void /** * Asserts the number of listeners added for a specific event or all events * in total. - * - * @param int $expected - * @param string $eventName - * - * @return void */ private function assertNumberListenersAdded(int $expected, string $eventName): void { diff --git a/src/Viserio/Component/Events/Tests/EventTest.php b/src/Viserio/Component/Events/Tests/EventTest.php index 235bf9ce3..c45b1fca3 100644 --- a/src/Viserio/Component/Events/Tests/EventTest.php +++ b/src/Viserio/Component/Events/Tests/EventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class EventTest extends TestCase { diff --git a/src/Viserio/Component/Events/Tests/Fixture/EventListener.php b/src/Viserio/Component/Events/Tests/Fixture/EventListener.php index ab30490f3..f12f9e0d1 100644 --- a/src/Viserio/Component/Events/Tests/Fixture/EventListener.php +++ b/src/Viserio/Component/Events/Tests/Fixture/EventListener.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests\Fixture; diff --git a/src/Viserio/Component/Events/Tests/Fixture/ExtendedEventManger.php b/src/Viserio/Component/Events/Tests/Fixture/ExtendedEventManger.php index e967319ba..213aa6ca1 100644 --- a/src/Viserio/Component/Events/Tests/Fixture/ExtendedEventManger.php +++ b/src/Viserio/Component/Events/Tests/Fixture/ExtendedEventManger.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests\Fixture; @@ -19,10 +19,6 @@ class ExtendedEventManger extends EventManager { /** * Determine if a given event has listeners. - * - * @param string $eventName - * - * @return bool */ public function hasListeners(string $eventName): bool { diff --git a/src/Viserio/Component/Events/Tests/ListenerPatternTest.php b/src/Viserio/Component/Events/Tests/ListenerPatternTest.php index 68db36f39..f26647bf0 100644 --- a/src/Viserio/Component/Events/Tests/ListenerPatternTest.php +++ b/src/Viserio/Component/Events/Tests/ListenerPatternTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Tests; @@ -22,15 +22,12 @@ * @internal * * @small + * @coversNothing */ final class ListenerPatternTest extends MockeryTestCase { /** * @dataProvider providePatternMatchingCases - * - * @param mixed $eventPattern - * @param array $expectedMatches - * @param array $expectedMisses */ public function testPatternMatching($eventPattern, array $expectedMatches, array $expectedMisses): void { diff --git a/src/Viserio/Component/Events/Traits/EventTrait.php b/src/Viserio/Component/Events/Traits/EventTrait.php index ded971c8f..968c15450 100644 --- a/src/Viserio/Component/Events/Traits/EventTrait.php +++ b/src/Viserio/Component/Events/Traits/EventTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Traits; @@ -45,8 +45,6 @@ trait EventTrait /** * Get event name. - * - * @return string */ public function getName(): string { @@ -65,8 +63,6 @@ public function getTarget() /** * Has this event indicated event propagation should stop? - * - * @return bool */ public function isPropagationStopped(): bool { @@ -75,8 +71,6 @@ public function isPropagationStopped(): bool /** * Get parameters passed to the event. - * - * @return array */ public function getParams(): array { diff --git a/src/Viserio/Component/Events/Traits/ValidateNameTrait.php b/src/Viserio/Component/Events/Traits/ValidateNameTrait.php index d1c6aadd0..bcd5f15b1 100644 --- a/src/Viserio/Component/Events/Traits/ValidateNameTrait.php +++ b/src/Viserio/Component/Events/Traits/ValidateNameTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Events\Traits; @@ -20,11 +20,7 @@ trait ValidateNameTrait /** * The event name must only contain the characters A-Z, a-z, 0-9, _, and '.'. * - * @param string $eventName - * * @throws \Viserio\Contract\Events\Exception\InvalidArgumentException - * - * @return void */ protected function validateEventName(string $eventName): void { diff --git a/src/Viserio/Component/Events/composer.json b/src/Viserio/Component/Events/composer.json index 7b86d927a..8a5dbad18 100644 --- a/src/Viserio/Component/Events/composer.json +++ b/src/Viserio/Component/Events/composer.json @@ -34,12 +34,11 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "nyholm/nsa": "^1.1.0", "phpunit/phpunit": "8.2.*", "psr/log": "^1.1.0", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/http-factory": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev", diff --git a/src/Viserio/Component/Events/phpstan.neon b/src/Viserio/Component/Events/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Events/phpstan.neon +++ b/src/Viserio/Component/Events/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Events/phpunit.xml b/src/Viserio/Component/Events/phpunit.xml new file mode 100644 index 000000000..ea92dac64 --- /dev/null +++ b/src/Viserio/Component/Events/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Events/phpunit.xml.dist b/src/Viserio/Component/Events/phpunit.xml.dist deleted file mode 100644 index 01593d21a..000000000 --- a/src/Viserio/Component/Events/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Exception/.gitignore b/src/Viserio/Component/Exception/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Exception/.gitignore +++ b/src/Viserio/Component/Exception/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Exception/Bootstrap/ConsoleHandleExceptionsBootstrap.php b/src/Viserio/Component/Exception/Bootstrap/ConsoleHandleExceptionsBootstrap.php index 44d17964f..60662ca2b 100644 --- a/src/Viserio/Component/Exception/Bootstrap/ConsoleHandleExceptionsBootstrap.php +++ b/src/Viserio/Component/Exception/Bootstrap/ConsoleHandleExceptionsBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Bootstrap; diff --git a/src/Viserio/Component/Exception/Bootstrap/HttpHandleExceptionsBootstrap.php b/src/Viserio/Component/Exception/Bootstrap/HttpHandleExceptionsBootstrap.php index 30fef9022..1d095d911 100644 --- a/src/Viserio/Component/Exception/Bootstrap/HttpHandleExceptionsBootstrap.php +++ b/src/Viserio/Component/Exception/Bootstrap/HttpHandleExceptionsBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Bootstrap; diff --git a/src/Viserio/Component/Exception/Console/Handler.php b/src/Viserio/Component/Exception/Console/Handler.php index b563081ee..3ee6f5e9a 100644 --- a/src/Viserio/Component/Exception/Console/Handler.php +++ b/src/Viserio/Component/Exception/Console/Handler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Console; @@ -36,11 +36,6 @@ class Handler extends ErrorHandler implements ConsoleHandler /** * Render an exception to the console. - * - * @param \Viserio\Contract\Exception\ConsoleOutput $output - * @param Throwable $exception - * - * @return void */ public function render(ConsoleOutputContract $output, Throwable $exception): void { @@ -62,11 +57,6 @@ public function render(ConsoleOutputContract $output, Throwable $exception): voi /** * Renders the editor containing the code that was the * origin of the exception. - * - * @param \Viserio\Contract\Exception\ConsoleOutput $output - * @param Throwable $exception - * - * @return void */ private function renderEditor(ConsoleOutputContract $output, Throwable $exception): void { @@ -93,11 +83,6 @@ private function renderEditor(ConsoleOutputContract $output, Throwable $exceptio /** * Renders the trace of the exception. - * - * @param \Viserio\Contract\Exception\ConsoleOutput $output - * @param Throwable $exception - * - * @return void */ private function renderTrace(ConsoleOutputContract $output, Throwable $exception): void { @@ -151,10 +136,6 @@ private function renderTrace(ConsoleOutputContract $output, Throwable $exception * Gets the backtrace from an exception. * * If xdebug is installed - * - * @param Throwable $exception - * - * @return array */ private function getTrace(Throwable $exception): array { @@ -183,10 +164,6 @@ private function getTrace(Throwable $exception): array /** * Returns an iterator for the inspected exception's * frames. - * - * @param Throwable $exception - * - * @return array */ private function getFrames(Throwable $exception): array { @@ -238,10 +215,6 @@ private function getFrames(Throwable $exception): array /** * Given an exception, generates an array in the format * generated by Exception::getTrace(). - * - * @param Throwable $exception - * - * @return array */ private function getFrameFromException(Throwable $exception): array { @@ -259,10 +232,6 @@ private function getFrameFromException(Throwable $exception): array /** * Determine if the frame can be used to fill in previous frame's missing info * happens for call_user_func and call_user_func_array usages (PHP Bug #44428). - * - * @param array $frame - * - * @return bool */ private function isValidNextFrame(array $frame): bool { @@ -279,11 +248,6 @@ private function isValidNextFrame(array $frame): bool /** * Format the given function args to a string. - * - * @param array $arguments - * @param bool $recursive - * - * @return string */ private static function formatsArgs(array $arguments, bool $recursive = true): string { @@ -318,10 +282,6 @@ private static function formatsArgs(array $arguments, bool $recursive = true): s * Returns the contents of the file for this frame as an * array of lines, and optionally as a clamped range of lines. * - * @param string $filePath - * @param int $start - * @param int $length - * * @return null|string[] */ private static function getFileLines(string $filePath, int $start, int $length): ?array @@ -340,10 +300,6 @@ private static function getFileLines(string $filePath, int $start, int $length): /** * Returns the full contents of the file for this frame, * if it's known. - * - * @param string $filePath - * - * @return null|string */ private static function getFileContents(string $filePath): ?string { diff --git a/src/Viserio/Component/Exception/Console/SymfonyConsoleOutput.php b/src/Viserio/Component/Exception/Console/SymfonyConsoleOutput.php index f1d388e51..4e0c9d079 100644 --- a/src/Viserio/Component/Exception/Console/SymfonyConsoleOutput.php +++ b/src/Viserio/Component/Exception/Console/SymfonyConsoleOutput.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Console; @@ -27,8 +27,6 @@ final class SymfonyConsoleOutput implements ConsoleOutputContract /** * Create a new symfony console output wrapper instance. - * - * @param \Symfony\Component\Console\Output\OutputInterface $output */ public function __construct(OutputInterface $output) { @@ -53,8 +51,6 @@ public function getVerbosity(): int /** * Get the symfony output instance. - * - * @return \Symfony\Component\Console\Output\OutputInterface */ public function getSymfonyConsoleOutput(): OutputInterface { diff --git a/src/Viserio/Component/Exception/Container/Provider/ConsoleExceptionServiceProvider.php b/src/Viserio/Component/Exception/Container/Provider/ConsoleExceptionServiceProvider.php index 5f9c20b27..8e6a3f299 100644 --- a/src/Viserio/Component/Exception/Container/Provider/ConsoleExceptionServiceProvider.php +++ b/src/Viserio/Component/Exception/Container/Provider/ConsoleExceptionServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Container\Provider; diff --git a/src/Viserio/Component/Exception/Container/Provider/HttpExceptionServiceProvider.php b/src/Viserio/Component/Exception/Container/Provider/HttpExceptionServiceProvider.php index 9cd5c62a3..43e93815b 100644 --- a/src/Viserio/Component/Exception/Container/Provider/HttpExceptionServiceProvider.php +++ b/src/Viserio/Component/Exception/Container/Provider/HttpExceptionServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Container\Provider; diff --git a/src/Viserio/Component/Exception/Displayer/AbstractWhoopsDisplayer.php b/src/Viserio/Component/Exception/Displayer/AbstractWhoopsDisplayer.php index f8d89f18a..84f59f21f 100644 --- a/src/Viserio/Component/Exception/Displayer/AbstractWhoopsDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/AbstractWhoopsDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -27,8 +27,6 @@ abstract class AbstractWhoopsDisplayer implements DisplayerContract /** * Create a new whoops displayer instance. - * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory */ public function __construct(ResponseFactoryInterface $responseFactory) { @@ -63,15 +61,11 @@ public function canDisplay(Throwable $original, Throwable $transformed, int $cod /** * Get the Whoops handler. - * - * @return \Whoops\Handler\Handler */ abstract protected function getHandler(): Handler; /** * Returns the whoops instance. - * - * @return Whoops */ private function getWhoops(): Whoops { diff --git a/src/Viserio/Component/Exception/Displayer/HtmlDisplayer.php b/src/Viserio/Component/Exception/Displayer/HtmlDisplayer.php index ab189944b..fbdd0c4e7 100644 --- a/src/Viserio/Component/Exception/Displayer/HtmlDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/HtmlDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -44,8 +44,7 @@ class HtmlDisplayer implements DisplayerContract, ProvidesDefaultConfigContract, /** * Create a new html displayer instance. * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * @param array|ArrayAccess $config + * @param array|ArrayAccess $config */ public function __construct(ResponseFactoryInterface $responseFactory, $config = []) { @@ -115,10 +114,6 @@ public function isVerbose(): bool /** * Render the page with given info. - * - * @param array $info - * - * @return string */ protected function render(array $info): string { diff --git a/src/Viserio/Component/Exception/Displayer/JsonApiDisplayer.php b/src/Viserio/Component/Exception/Displayer/JsonApiDisplayer.php index a8b23f19e..09765b19d 100644 --- a/src/Viserio/Component/Exception/Displayer/JsonApiDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/JsonApiDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; diff --git a/src/Viserio/Component/Exception/Displayer/JsonDisplayer.php b/src/Viserio/Component/Exception/Displayer/JsonDisplayer.php index a5344f1c3..f26e1882b 100644 --- a/src/Viserio/Component/Exception/Displayer/JsonDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/JsonDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -26,8 +26,6 @@ class JsonDisplayer implements DisplayerContract /** * Create a new html displayer instance. - * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory */ public function __construct(ResponseFactoryInterface $responseFactory) { diff --git a/src/Viserio/Component/Exception/Displayer/SymfonyDisplayer.php b/src/Viserio/Component/Exception/Displayer/SymfonyDisplayer.php index 5ce2c9709..b1bf5f0db 100644 --- a/src/Viserio/Component/Exception/Displayer/SymfonyDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/SymfonyDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -39,8 +39,7 @@ class SymfonyDisplayer implements DisplayerContract, /** * Create a new symfony displayer instance. * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * @param array|ArrayAccess $config + * @param array|ArrayAccess $config */ public function __construct(ResponseFactoryInterface $responseFactory, $config = []) { @@ -119,10 +118,6 @@ public function isVerbose(): bool /** * Render an exception to a string using Symfony. - * - * @param Throwable $exception - * - * @return string */ private function renderExceptionWithSymfony(Throwable $exception): string { diff --git a/src/Viserio/Component/Exception/Displayer/ViewDisplayer.php b/src/Viserio/Component/Exception/Displayer/ViewDisplayer.php index 172592cc0..62a2cd149 100644 --- a/src/Viserio/Component/Exception/Displayer/ViewDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/ViewDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -34,9 +34,6 @@ class ViewDisplayer implements DisplayerContract /** * Create a new html displayer instance. - * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * @param \Viserio\Contract\View\Factory $factory */ public function __construct(ResponseFactoryInterface $responseFactory, FactoryContract $factory) { diff --git a/src/Viserio/Component/Exception/Displayer/WhoopsJsonDisplayer.php b/src/Viserio/Component/Exception/Displayer/WhoopsJsonDisplayer.php index e0292458e..c8502b89d 100644 --- a/src/Viserio/Component/Exception/Displayer/WhoopsJsonDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/WhoopsJsonDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -36,8 +36,6 @@ public function isVerbose(): bool /** * Get the Whoops handler. - * - * @return \Whoops\Handler\Handler */ protected function getHandler(): Handler { diff --git a/src/Viserio/Component/Exception/Displayer/WhoopsPrettyDisplayer.php b/src/Viserio/Component/Exception/Displayer/WhoopsPrettyDisplayer.php index 6899e4a13..f5036e215 100644 --- a/src/Viserio/Component/Exception/Displayer/WhoopsPrettyDisplayer.php +++ b/src/Viserio/Component/Exception/Displayer/WhoopsPrettyDisplayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Displayer; @@ -33,8 +33,7 @@ class WhoopsPrettyDisplayer extends AbstractWhoopsDisplayer implements ProvidesD /** * Create a new whoops displayer instance. * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * @param array|ArrayAccess $config + * @param array|ArrayAccess $config */ public function __construct(ResponseFactoryInterface $responseFactory, $config = []) { @@ -80,8 +79,6 @@ public function isVerbose(): bool /** * Get the Whoops handler. - * - * @return \Whoops\Handler\Handler */ protected function getHandler(): Handler { diff --git a/src/Viserio/Component/Exception/ErrorHandler.php b/src/Viserio/Component/Exception/ErrorHandler.php index 4fde4c819..7f7ab8480 100644 --- a/src/Viserio/Component/Exception/ErrorHandler.php +++ b/src/Viserio/Component/Exception/ErrorHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception; @@ -122,8 +122,7 @@ class ErrorHandler implements HandlerContract, /** * Create a new error handler instance. * - * @param array|ArrayAccess $config - * @param null|\Psr\Log\LoggerInterface $logger + * @param array|ArrayAccess $config */ public function __construct($config, ?LoggerInterface $logger = null) { @@ -139,8 +138,6 @@ public function __construct($config, ?LoggerInterface $logger = null) /** * Get the transformer exceptions. - * - * @return array */ public function getTransformers(): array { @@ -179,8 +176,6 @@ public static function getDefaultConfig(): iterable /** * Determine if the exception shouldn't be reported. * - * @param Throwable $exception - * * @return $this */ public function addShouldntReport(Throwable $exception): HandlerContract @@ -192,10 +187,6 @@ public function addShouldntReport(Throwable $exception): HandlerContract /** * Report or log an exception. - * - * @param Throwable $exception - * - * @return void */ public function report(Throwable $exception): void { @@ -227,8 +218,6 @@ public function report(Throwable $exception): void /** * Add the transformed instance. * - * @param \Viserio\Contract\Exception\Transformer $transformer - * * @return $this */ public function addTransformer(TransformerContract $transformer): HandlerContract @@ -279,12 +268,8 @@ public function handleError(int $type, string $message, string $file = '', int $ * Note: Fatal error exceptions must * be handled differently since they are not normal exceptions. * - * @param Throwable $exception - * * @throws Throwable * - * @return void - * * @internal * * @see https://secure.php.net/manual/en/function.set-exception-handler.php @@ -307,8 +292,6 @@ public function handleException(Throwable $exception): void * * @throws Throwable * - * @return void - * * @internal */ public function handleShutdown(): void @@ -343,8 +326,6 @@ public function handleShutdown(): void /** * Register the PHP error handler. - * - * @return void */ protected function registerErrorHandler(): void { @@ -353,8 +334,6 @@ protected function registerErrorHandler(): void /** * Register the PHP exception handler. - * - * @return void */ protected function registerExceptionHandler(): void { @@ -370,8 +349,6 @@ protected function registerExceptionHandler(): void /** * Register the PHP shutdown handler. - * - * @return void */ protected function registerShutdownHandler(): void { @@ -412,10 +389,6 @@ protected function prepareException($exception) /** * Get the transformed exception. - * - * @param Throwable $exception - * - * @return Throwable */ protected function getTransformed(Throwable $exception): Throwable { @@ -432,10 +405,6 @@ protected function getTransformed(Throwable $exception): Throwable /** * Transform's the given array to a key (class name) value (object/class name) array. - * - * @param array $data - * - * @return array */ protected function transformArray(array $data): array { @@ -454,8 +423,6 @@ protected function transformArray(array $data): array /** * The default error transformers. - * - * @return array */ protected function getErrorTransformer(): array { @@ -468,10 +435,6 @@ protected function getErrorTransformer(): array /** * Get the exception level. - * - * @param Throwable $exception - * - * @return string */ private function getLevel(Throwable $exception): string { @@ -490,10 +453,6 @@ private function getLevel(Throwable $exception): string /** * Determine if the exception is in the "do not report" list. - * - * @param Throwable $exception - * - * @return bool */ private function shouldntReport(Throwable $exception): bool { diff --git a/src/Viserio/Component/Exception/ExceptionIdentifier.php b/src/Viserio/Component/Exception/ExceptionIdentifier.php index 828da40bb..f1a96b55e 100644 --- a/src/Viserio/Component/Exception/ExceptionIdentifier.php +++ b/src/Viserio/Component/Exception/ExceptionIdentifier.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception; @@ -29,10 +29,6 @@ class ExceptionIdentifier /** * Identify the given exception. - * - * @param Throwable $exception - * - * @return string */ public static function identify(Throwable $exception): string { @@ -56,8 +52,6 @@ public static function identify(Throwable $exception): string * Generate v4 UUID. * * We're generating uuids according to the official v4 spec. - * - * @return string */ private static function uuid4(): string { diff --git a/src/Viserio/Component/Exception/ExceptionInfo.php b/src/Viserio/Component/Exception/ExceptionInfo.php index af3971833..f4412a62c 100644 --- a/src/Viserio/Component/Exception/ExceptionInfo.php +++ b/src/Viserio/Component/Exception/ExceptionInfo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception; diff --git a/src/Viserio/Component/Exception/Filter/CanDisplayFilter.php b/src/Viserio/Component/Exception/Filter/CanDisplayFilter.php index 39346f51b..d95e2c711 100644 --- a/src/Viserio/Component/Exception/Filter/CanDisplayFilter.php +++ b/src/Viserio/Component/Exception/Filter/CanDisplayFilter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Filter; diff --git a/src/Viserio/Component/Exception/Filter/ContentTypeFilter.php b/src/Viserio/Component/Exception/Filter/ContentTypeFilter.php index 4a0c82f91..01da8eeac 100644 --- a/src/Viserio/Component/Exception/Filter/ContentTypeFilter.php +++ b/src/Viserio/Component/Exception/Filter/ContentTypeFilter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Filter; diff --git a/src/Viserio/Component/Exception/Filter/VerboseFilter.php b/src/Viserio/Component/Exception/Filter/VerboseFilter.php index d5de2b4a8..317acc9ff 100644 --- a/src/Viserio/Component/Exception/Filter/VerboseFilter.php +++ b/src/Viserio/Component/Exception/Filter/VerboseFilter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Filter; diff --git a/src/Viserio/Component/Exception/Http/Handler.php b/src/Viserio/Component/Exception/Http/Handler.php index 5f4f52356..028b247cd 100644 --- a/src/Viserio/Component/Exception/Http/Handler.php +++ b/src/Viserio/Component/Exception/Http/Handler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Http; @@ -55,9 +55,7 @@ class Handler extends ErrorHandler implements HttpHandlerContract, RequiresManda /** * Create a new handler instance. * - * @param array|ArrayAccess $config - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * @param null|\Psr\Log\LoggerInterface $logger + * @param array|ArrayAccess $config */ public function __construct($config, ResponseFactoryInterface $responseFactory, ?LoggerInterface $logger = null) { @@ -161,12 +159,6 @@ public function render(ServerRequestInterface $request, Throwable $exception): R /** * Get a prepared response with the transformed exception. - * - * @param null|\Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $exception - * @param Throwable $transformed - * - * @return \Psr\Http\Message\ResponseInterface */ protected function getPreparedResponse( ?ServerRequestInterface $request, @@ -192,12 +184,6 @@ protected function getPreparedResponse( /** * Create a response for the given exception. - * - * @param null|\Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $exception - * @param Throwable $transformed - * - * @return \Psr\Http\Message\ResponseInterface */ protected function getResponse( ?ServerRequestInterface $request, @@ -219,13 +205,6 @@ protected function getResponse( /** * Get the displayer instance. - * - * @param null|\Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $original - * @param Throwable $transformed - * @param int $code - * - * @return \Viserio\Contract\Exception\Displayer */ protected function getDisplayer( ?ServerRequestInterface $request, @@ -255,11 +234,7 @@ protected function getDisplayer( /** * Get the filtered list of displayers. * - * @param \Viserio\Contract\Exception\Displayer[] $displayers - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $original - * @param Throwable $transformed - * @param int $code + * @param \Viserio\Contract\Exception\Displayer[] $displayers * * @return \Viserio\Contract\Exception\Displayer[] */ @@ -288,11 +263,6 @@ protected function getFiltered( /** * Sort displayer after the first found accept header. - * - * @param array $filtered - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Viserio\Contract\Exception\Displayer */ private function sortedFilter(array $filtered, ServerRequestInterface $request): DisplayerContract { diff --git a/src/Viserio/Component/Exception/Tests/Bootstrap/ConsoleHandleExceptionsTest.php b/src/Viserio/Component/Exception/Tests/Bootstrap/ConsoleHandleExceptionsTest.php index 324b52205..402cb2e05 100644 --- a/src/Viserio/Component/Exception/Tests/Bootstrap/ConsoleHandleExceptionsTest.php +++ b/src/Viserio/Component/Exception/Tests/Bootstrap/ConsoleHandleExceptionsTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Bootstrap; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleHandleExceptionsTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Bootstrap/HttpHandleExceptionsTest.php b/src/Viserio/Component/Exception/Tests/Bootstrap/HttpHandleExceptionsTest.php index e2000dcd1..2003991bb 100644 --- a/src/Viserio/Component/Exception/Tests/Bootstrap/HttpHandleExceptionsTest.php +++ b/src/Viserio/Component/Exception/Tests/Bootstrap/HttpHandleExceptionsTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Bootstrap; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class HttpHandleExceptionsTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Console/HandlerTest.php b/src/Viserio/Component/Exception/Tests/Console/HandlerTest.php index a055d7e0e..3fcc28824 100644 --- a/src/Viserio/Component/Exception/Tests/Console/HandlerTest.php +++ b/src/Viserio/Component/Exception/Tests/Console/HandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Console; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class HandlerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Container/Provider/ConsoleExceptionServiceProviderTest.php b/src/Viserio/Component/Exception/Tests/Container/Provider/ConsoleExceptionServiceProviderTest.php index 60f247c25..328a8c677 100644 --- a/src/Viserio/Component/Exception/Tests/Container/Provider/ConsoleExceptionServiceProviderTest.php +++ b/src/Viserio/Component/Exception/Tests/Container/Provider/ConsoleExceptionServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Provider; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleExceptionServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Container/Provider/HttpExceptionServiceProviderTest.php b/src/Viserio/Component/Exception/Tests/Container/Provider/HttpExceptionServiceProviderTest.php index c4993dd2c..8058a6e97 100644 --- a/src/Viserio/Component/Exception/Tests/Container/Provider/HttpExceptionServiceProviderTest.php +++ b/src/Viserio/Component/Exception/Tests/Container/Provider/HttpExceptionServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Provider; @@ -35,6 +35,7 @@ * @internal * * @small + * @coversNothing */ final class HttpExceptionServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/HtmlDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/HtmlDisplayerTest.php index 3ef654c91..cc2a1bf2f 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/HtmlDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/HtmlDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class HtmlDisplayerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/JsonApiDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/JsonApiDisplayerTest.php index 5763b7577..d62db5eb3 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/JsonApiDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/JsonApiDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class JsonApiDisplayerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/JsonDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/JsonDisplayerTest.php index 564c78377..0106b234d 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/JsonDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/JsonDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class JsonDisplayerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/SymfonyDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/SymfonyDisplayerTest.php index e6ad8382b..90f2f0e78 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/SymfonyDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/SymfonyDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class SymfonyDisplayerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/ViewDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/ViewDisplayerTest.php index d7edbdb01..e03705b7a 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/ViewDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/ViewDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ViewDisplayerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/WhoopsJsonDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/WhoopsJsonDisplayerTest.php index 880fbf99f..7eea1e3a8 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/WhoopsJsonDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/WhoopsJsonDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class WhoopsJsonDisplayerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Displayer/WhoopsPrettyDisplayerTest.php b/src/Viserio/Component/Exception/Tests/Displayer/WhoopsPrettyDisplayerTest.php index 6680d5f14..763ca6255 100644 --- a/src/Viserio/Component/Exception/Tests/Displayer/WhoopsPrettyDisplayerTest.php +++ b/src/Viserio/Component/Exception/Tests/Displayer/WhoopsPrettyDisplayerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Displayer; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class WhoopsPrettyDisplayerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/ErrorHandlerTest.php b/src/Viserio/Component/Exception/Tests/ErrorHandlerTest.php index aab384e79..b41a3b506 100644 --- a/src/Viserio/Component/Exception/Tests/ErrorHandlerTest.php +++ b/src/Viserio/Component/Exception/Tests/ErrorHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class ErrorHandlerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/ExceptionIdentifierTest.php b/src/Viserio/Component/Exception/Tests/ExceptionIdentifierTest.php index e8ba04d5a..b8457b1af 100644 --- a/src/Viserio/Component/Exception/Tests/ExceptionIdentifierTest.php +++ b/src/Viserio/Component/Exception/Tests/ExceptionIdentifierTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ExceptionIdentifierTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/ExceptionInfoTest.php b/src/Viserio/Component/Exception/Tests/ExceptionInfoTest.php index e9acf188a..d0024b412 100644 --- a/src/Viserio/Component/Exception/Tests/ExceptionInfoTest.php +++ b/src/Viserio/Component/Exception/Tests/ExceptionInfoTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class ExceptionInfoTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Filter/CanDisplayFilterTest.php b/src/Viserio/Component/Exception/Tests/Filter/CanDisplayFilterTest.php index 771ac2475..a08754650 100644 --- a/src/Viserio/Component/Exception/Tests/Filter/CanDisplayFilterTest.php +++ b/src/Viserio/Component/Exception/Tests/Filter/CanDisplayFilterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Filter; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class CanDisplayFilterTest extends MockeryTestCase { @@ -67,11 +68,6 @@ public function testNoChange(): void self::assertSame([$html, $json], $displayers); } - /** - * @param Throwable $exception - * - * @return \Mockery\MockInterface - */ private function arrangeJsonDisplayer(Throwable $exception): MockInterface { $json = Mockery::mock(JsonDisplayer::class); @@ -83,12 +79,6 @@ private function arrangeJsonDisplayer(Throwable $exception): MockInterface return $json; } - /** - * @param Throwable $exception - * @param bool $return - * - * @return \Mockery\MockInterface - */ private function arrangeHtmlDisplayer(Throwable $exception, bool $return): MockInterface { $html = Mockery::mock(HtmlDisplayer::class); @@ -100,13 +90,6 @@ private function arrangeHtmlDisplayer(Throwable $exception, bool $return): MockI return $html; } - /** - * @param \Viserio\Component\Exception\Displayer\HtmlDisplayer $html - * @param \Viserio\Component\Exception\Displayer\JsonDisplayer $json - * @param Throwable $exception - * - * @return array - */ private function arrangeDisplayerFilter(HtmlDisplayer $html, JsonDisplayer $json, Throwable $exception): array { return (new CanDisplayFilter())->filter([$html, $json], $this->serverRequest, $exception, $exception, 500); diff --git a/src/Viserio/Component/Exception/Tests/Filter/ContentTypeFilterTest.php b/src/Viserio/Component/Exception/Tests/Filter/ContentTypeFilterTest.php index 8dca480e7..b0352b330 100644 --- a/src/Viserio/Component/Exception/Tests/Filter/ContentTypeFilterTest.php +++ b/src/Viserio/Component/Exception/Tests/Filter/ContentTypeFilterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Filter; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class ContentTypeFilterTest extends MockeryTestCase { @@ -237,12 +238,6 @@ protected function allowMockingNonExistentMethods($allow = false): void parent::allowMockingNonExistentMethods(true); } - /** - * @param array $displayers - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return array - */ private function arrangeContentTypeFilter(array $displayers, ServerRequestInterface $request): array { $exception = new Exception(); diff --git a/src/Viserio/Component/Exception/Tests/Filter/VerboseFilterTest.php b/src/Viserio/Component/Exception/Tests/Filter/VerboseFilterTest.php index 07643277f..0ef284161 100644 --- a/src/Viserio/Component/Exception/Tests/Filter/VerboseFilterTest.php +++ b/src/Viserio/Component/Exception/Tests/Filter/VerboseFilterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Filter; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class VerboseFilterTest extends MockeryTestCase { @@ -89,11 +90,6 @@ public function testNoChangeNotInDebugMode(): void self::assertSame([$json], $displayers); } - /** - * @param bool $debug - * - * @return array - */ private function getConfig(bool $debug = false): array { return [ @@ -106,12 +102,6 @@ private function getConfig(bool $debug = false): array ]; } - /** - * @param array $displayers - * @param bool $debug - * - * @return array - */ private function arrangeVerboseFilter(array $displayers, bool $debug = false): array { return (new VerboseFilter($this->getConfig($debug)))->filter( diff --git a/src/Viserio/Component/Exception/Tests/Fixture/ErrorFixtureCommand.php b/src/Viserio/Component/Exception/Tests/Fixture/ErrorFixtureCommand.php index 0a233a6c4..78d9682ef 100644 --- a/src/Viserio/Component/Exception/Tests/Fixture/ErrorFixtureCommand.php +++ b/src/Viserio/Component/Exception/Tests/Fixture/ErrorFixtureCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Fixture; diff --git a/src/Viserio/Component/Exception/Tests/Http/HandlerTest.php b/src/Viserio/Component/Exception/Tests/Http/HandlerTest.php index 622a02664..b622d75b3 100644 --- a/src/Viserio/Component/Exception/Tests/Http/HandlerTest.php +++ b/src/Viserio/Component/Exception/Tests/Http/HandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Http; @@ -32,6 +32,7 @@ * @internal * * @small + * @coversNothing */ final class HandlerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Exception/Tests/Traits/DetermineErrorLevelTraitTest.php b/src/Viserio/Component/Exception/Tests/Traits/DetermineErrorLevelTraitTest.php index a23090bca..16b1bbc54 100644 --- a/src/Viserio/Component/Exception/Tests/Traits/DetermineErrorLevelTraitTest.php +++ b/src/Viserio/Component/Exception/Tests/Traits/DetermineErrorLevelTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Traits; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class DetermineErrorLevelTraitTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Transformer/ClassNotFoundFatalErrorTransformerTest.php b/src/Viserio/Component/Exception/Tests/Transformer/ClassNotFoundFatalErrorTransformerTest.php index 5fe1c4866..9e9ed01dd 100644 --- a/src/Viserio/Component/Exception/Tests/Transformer/ClassNotFoundFatalErrorTransformerTest.php +++ b/src/Viserio/Component/Exception/Tests/Transformer/ClassNotFoundFatalErrorTransformerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Transformer; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ClassNotFoundFatalErrorTransformerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Transformer/UndefinedFunctionFatalErrorTransformerTest.php b/src/Viserio/Component/Exception/Tests/Transformer/UndefinedFunctionFatalErrorTransformerTest.php index 3cb28fb93..dfe222f76 100644 --- a/src/Viserio/Component/Exception/Tests/Transformer/UndefinedFunctionFatalErrorTransformerTest.php +++ b/src/Viserio/Component/Exception/Tests/Transformer/UndefinedFunctionFatalErrorTransformerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Transformer; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class UndefinedFunctionFatalErrorTransformerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Tests/Transformer/UndefinedMethodFatalErrorTransformerTest.php b/src/Viserio/Component/Exception/Tests/Transformer/UndefinedMethodFatalErrorTransformerTest.php index 397ac68ed..77f1f2f89 100644 --- a/src/Viserio/Component/Exception/Tests/Transformer/UndefinedMethodFatalErrorTransformerTest.php +++ b/src/Viserio/Component/Exception/Tests/Transformer/UndefinedMethodFatalErrorTransformerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Tests\Transformer; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class UndefinedMethodFatalErrorTransformerTest extends TestCase { diff --git a/src/Viserio/Component/Exception/Traits/DetermineErrorLevelTrait.php b/src/Viserio/Component/Exception/Traits/DetermineErrorLevelTrait.php index 7a74c9d1b..9a6565546 100644 --- a/src/Viserio/Component/Exception/Traits/DetermineErrorLevelTrait.php +++ b/src/Viserio/Component/Exception/Traits/DetermineErrorLevelTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Traits; @@ -17,10 +17,6 @@ trait DetermineErrorLevelTrait { /** * Determine if an error level is fatal (halts execution). - * - * @param int $level - * - * @return bool */ protected static function isLevelFatal(int $level): bool { diff --git a/src/Viserio/Component/Exception/Traits/RegisterAndUnregisterTrait.php b/src/Viserio/Component/Exception/Traits/RegisterAndUnregisterTrait.php index cd58cb5ee..248b103ba 100644 --- a/src/Viserio/Component/Exception/Traits/RegisterAndUnregisterTrait.php +++ b/src/Viserio/Component/Exception/Traits/RegisterAndUnregisterTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Traits; @@ -59,22 +59,16 @@ public function unregister(): void /** * Register the PHP error handler. - * - * @return void */ abstract protected function registerErrorHandler(): void; /** * Register the PHP exception handler. - * - * @return void */ abstract protected function registerExceptionHandler(): void; /** * Register the PHP shutdown handler. - * - * @return void */ abstract protected function registerShutdownHandler(): void; } diff --git a/src/Viserio/Component/Exception/Transformer/ClassNotFoundFatalErrorTransformer.php b/src/Viserio/Component/Exception/Transformer/ClassNotFoundFatalErrorTransformer.php index e0db7e72d..3f5ad112e 100644 --- a/src/Viserio/Component/Exception/Transformer/ClassNotFoundFatalErrorTransformer.php +++ b/src/Viserio/Component/Exception/Transformer/ClassNotFoundFatalErrorTransformer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Transformer; diff --git a/src/Viserio/Component/Exception/Transformer/UndefinedFunctionFatalErrorTransformer.php b/src/Viserio/Component/Exception/Transformer/UndefinedFunctionFatalErrorTransformer.php index d03c8846c..6725640ea 100644 --- a/src/Viserio/Component/Exception/Transformer/UndefinedFunctionFatalErrorTransformer.php +++ b/src/Viserio/Component/Exception/Transformer/UndefinedFunctionFatalErrorTransformer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Transformer; diff --git a/src/Viserio/Component/Exception/Transformer/UndefinedMethodFatalErrorTransformer.php b/src/Viserio/Component/Exception/Transformer/UndefinedMethodFatalErrorTransformer.php index badf68634..fd75eb30c 100644 --- a/src/Viserio/Component/Exception/Transformer/UndefinedMethodFatalErrorTransformer.php +++ b/src/Viserio/Component/Exception/Transformer/UndefinedMethodFatalErrorTransformer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Exception\Transformer; diff --git a/src/Viserio/Component/Exception/composer.json b/src/Viserio/Component/Exception/composer.json index 428acb42b..1a4f40fbe 100644 --- a/src/Viserio/Component/Exception/composer.json +++ b/src/Viserio/Component/Exception/composer.json @@ -42,10 +42,9 @@ "require-dev": { "filp/whoops": "^2.2.0", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", "viserio/filesystem": "^1.0@dev", diff --git a/src/Viserio/Component/Exception/phpstan.neon b/src/Viserio/Component/Exception/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Exception/phpstan.neon +++ b/src/Viserio/Component/Exception/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Exception/phpunit.xml b/src/Viserio/Component/Exception/phpunit.xml new file mode 100644 index 000000000..b691fe8a7 --- /dev/null +++ b/src/Viserio/Component/Exception/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Exception/phpunit.xml.dist b/src/Viserio/Component/Exception/phpunit.xml.dist deleted file mode 100644 index 00d79b10f..000000000 --- a/src/Viserio/Component/Exception/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Filesystem/.gitignore b/src/Viserio/Component/Filesystem/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Filesystem/.gitignore +++ b/src/Viserio/Component/Filesystem/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Filesystem/Container/Provider/FilesystemServiceProvider.php b/src/Viserio/Component/Filesystem/Container/Provider/FilesystemServiceProvider.php index 325cd028a..3ba1844b0 100644 --- a/src/Viserio/Component/Filesystem/Container/Provider/FilesystemServiceProvider.php +++ b/src/Viserio/Component/Filesystem/Container/Provider/FilesystemServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Container\Provider; diff --git a/src/Viserio/Component/Filesystem/Filesystem.php b/src/Viserio/Component/Filesystem/Filesystem.php index 7b2ffd4b3..77e69bca1 100644 --- a/src/Viserio/Component/Filesystem/Filesystem.php +++ b/src/Viserio/Component/Filesystem/Filesystem.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem; @@ -949,9 +949,6 @@ public function mirror( /** * @internal * - * @param int $type - * @param string $msg - * * @return bool; */ public static function handleError(int $type, string $msg): bool @@ -963,13 +960,9 @@ public static function handleError(int $type, string $msg): bool } /** - * @param string $origin - * @param string $target * @param string $linkType Name of the link type, typically 'symbolic' or 'hard' * * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ private function linkException(string $origin, string $target, string $linkType): void { @@ -985,9 +978,7 @@ private function linkException(string $origin, string $target, string $linkType) /** * Parse the given visibility value. * - * @param string $path * @param float|int|string $visibility - * @param null|string $type * * @throws \Viserio\Contract\Filesystem\Exception\InvalidArgumentException * @@ -1021,11 +1012,7 @@ private function parseVisibility(string $path, $visibility, ?string $type = null * * Call the given callable with given args, but throws an ErrorException when an error/warning/notice is triggered. * - * @param callable $func - * * @throws Throwable - * - * @return mixed */ private static function box(callable $func) { @@ -1052,11 +1039,7 @@ private static function box(callable $func) /** * Check if the given dir path exists. * - * @param string $dirname - * * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException - * - * @return void */ private function ensureDirectoryExist(string $dirname): void { @@ -1068,13 +1051,10 @@ private function ensureDirectoryExist(string $dirname): void /** * Changing visibility on a given file path. * - * @param string $path * @param array $config * * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ private function changeFileVisibility(string $path, array $config): void { @@ -1091,14 +1071,11 @@ private function changeFileVisibility(string $path, array $config): void /** * Gets all of the files or directories at the input path. * - * @param string $directory - * @param string $method - * @param bool $isRecursive Whether or not we should recurse through child directories - * @param bool $shoHiddenFiles + * @param bool $isRecursive Whether or not we should recurse through child directories * * @throws \Viserio\Contract\Finder\Exception\NotFoundException * - * @return Iterator + * @return Iterator */ private function listContents( string $directory, @@ -1137,8 +1114,6 @@ private function listContents( * Check if stream is seekable. * * @param resource $resource - * - * @return bool */ private static function isSeekableStream($resource): bool { diff --git a/src/Viserio/Component/Filesystem/Iterator/SplFileInfoMethodFilterIterator.php b/src/Viserio/Component/Filesystem/Iterator/SplFileInfoMethodFilterIterator.php index 69fa8f664..aebe009e9 100644 --- a/src/Viserio/Component/Filesystem/Iterator/SplFileInfoMethodFilterIterator.php +++ b/src/Viserio/Component/Filesystem/Iterator/SplFileInfoMethodFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Iterator; @@ -26,7 +26,6 @@ class SplFileInfoMethodFilterIterator extends FilterIterator * Create a new SplFileInfoMethodFilterIterator instance. * * @param Iterator $iterator - * @param string $method */ public function __construct(Iterator $iterator, string $method) { diff --git a/src/Viserio/Component/Filesystem/Permissions.php b/src/Viserio/Component/Filesystem/Permissions.php index e02804264..64d55b224 100644 --- a/src/Viserio/Component/Filesystem/Permissions.php +++ b/src/Viserio/Component/Filesystem/Permissions.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem; diff --git a/src/Viserio/Component/Filesystem/Stream.php b/src/Viserio/Component/Filesystem/Stream.php index 8cad0d2bc..fb51f3924 100644 --- a/src/Viserio/Component/Filesystem/Stream.php +++ b/src/Viserio/Component/Filesystem/Stream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem; @@ -79,8 +79,6 @@ final class Stream * * Is already another stream wrapper registered for the scheme, * a RuntimeException will be thrown. - * - * @return bool */ public static function register(): bool { @@ -102,8 +100,6 @@ public static function register(): bool * * If unregistering fails, or if the URL wrapper for narrowspark.safe// was not * registered with this class, a RuntimeException will be thrown. - * - * @return void */ public static function unregister(): void { @@ -129,8 +125,6 @@ public static function unregister(): void * @param string $mode mode for opening * @param int $options options for opening * @param null|string $opened_path full path that was actually opened - * - * @return bool */ public function stream_open(string $path, string $mode, int $options, ?string $opened_path = null): bool { @@ -204,8 +198,6 @@ public function stream_open(string $path, string $mode, int $options, ?string $o /** * Close a resource. - * - * @return void */ public function stream_close(): void { @@ -234,8 +226,6 @@ public function stream_close(): void /** * Reads up to length bytes from the file. * - * @param int $length - * * @return bool|string */ public function stream_read(int $length) @@ -254,10 +244,6 @@ public function stream_read(int $length) /** * Writes the string to the file. - * - * @param string $data - * - * @return int */ public function stream_write(string $data): int { @@ -277,10 +263,6 @@ public function stream_write(string $data): int /** * Truncates a file to a given length. - * - * @param int $size - * - * @return bool */ public function stream_truncate(int $size): bool { @@ -317,8 +299,6 @@ public function stream_tell() /** * Returns true if the file pointer is at end-of-file. - * - * @return bool */ public function stream_eof(): bool { @@ -336,11 +316,6 @@ public function stream_eof(): bool /** * Sets the file position indicator for the file. - * - * @param int $offset - * @param int $whence - * - * @return bool */ public function stream_seek(int $offset, int $whence = \SEEK_SET): bool { @@ -378,9 +353,8 @@ public function stream_stat(): array /** * Change stream options. * - * @param string $path - * @param int $option STREAM_META_TOUCH, STREAM_META_OWNER_NAME, STREAM_META_OWNER, STREAM_META_GROUP_NAME, STREAM_META_GROUP, STREAM_META_ACCESS - * @param mixed $args variable arguments + * @param int $option STREAM_META_TOUCH, STREAM_META_OWNER_NAME, STREAM_META_OWNER, STREAM_META_GROUP_NAME, STREAM_META_GROUP, STREAM_META_ACCESS + * @param mixed $args variable arguments * * @return bool Returns TRUE on success or FALSE on failure */ @@ -420,9 +394,6 @@ public function stream_metadata(string $path, int $option, $args): bool /** * Gets information about a file referenced by filename. * - * @param string $path - * @param int $flags - * * @return array|false */ public function url_stat(string $path, int $flags) @@ -436,10 +407,6 @@ public function url_stat(string $path, int $flags) /** * Deletes a file. * On Windows unlink is not allowed till file is opened. - * - * @param string $path - * - * @return bool */ public function unlink(string $path): bool { @@ -448,12 +415,6 @@ public function unlink(string $path): bool /** * Change stream options. - * - * @param int $option - * @param int $arg1 - * @param null|int $arg2 - * - * @return bool */ public function stream_set_option(int $option, int $arg1, ?int $arg2): bool { @@ -485,9 +446,6 @@ public function stream_set_option(int $option, int $arg1, ?int $arg2): bool * Set blocking/non-blocking mode on a stream. * * @param resource $stream - * @param bool $mode - * - * @return bool */ public function stream_set_blocking($stream, bool $mode): bool { @@ -504,9 +462,6 @@ public function stream_set_blocking($stream, bool $mode): bool * Sets write file buffering on the given stream. * * @param resource $stream - * @param int $buffer - * - * @return int */ public function stream_set_write_buffer($stream, int $buffer): int { @@ -519,10 +474,6 @@ public function stream_set_write_buffer($stream, int $buffer): int * Set timeout period on a stream. * * @param resource $stream - * @param int $seconds - * @param int $microseconds - * - * @return bool */ public function stream_set_timeout($stream, int $seconds, int $microseconds = 0): bool { @@ -535,9 +486,6 @@ public function stream_set_timeout($stream, int $seconds, int $microseconds = 0) * Checks handle and locks file. * * @param false|resource $handle - * @param int $lock - * - * @return bool */ private function checkAndLock($handle, int $lock): bool { @@ -556,8 +504,6 @@ private function checkAndLock($handle, int $lock): bool /** * Error destructor. - * - * @return void */ private function clean(): void { @@ -580,10 +526,6 @@ private function clean(): void /** * Helper method to resolve a path from /foo/bar/. to /foo/bar. - * - * @param string $path - * - * @return string */ private function resolvePath(string $path): string { diff --git a/src/Viserio/Component/Filesystem/Tests/AbstractFilesystemTestCase.php b/src/Viserio/Component/Filesystem/Tests/AbstractFilesystemTestCase.php index b327ba375..363ac97cd 100644 --- a/src/Viserio/Component/Filesystem/Tests/AbstractFilesystemTestCase.php +++ b/src/Viserio/Component/Filesystem/Tests/AbstractFilesystemTestCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests; @@ -455,11 +455,8 @@ public static function provideGetAndSetVisibilityCases(): iterable /** * @dataProvider provideGetAndSetVisibilityCases * - * @param int $expectedFile * @param null|float|int|string $chmodFile - * @param int $expectedDir * @param null|float|int|string $chmodDir - * @param int $unmask */ public function testGetAndSetVisibility( int $expectedFile, @@ -532,8 +529,6 @@ public static function provideSetVisibilityToThrowInvalidArgumentExceptionCases( /** * @dataProvider provideSetVisibilityToThrowInvalidArgumentExceptionCases - * - * @param mixed $visibility */ public function testSetVisibilityToThrowInvalidArgumentException($visibility): void { @@ -761,9 +756,6 @@ public function testReadRetrievesFiles(): void self::assertEquals('Foo Bar', $this->filesystem->read($this->createFile(__FUNCTION__, 'Foo Bar'))); } - /** - * @todo fix this test for docker run - */ public function testReadThrowIOException(): void { if (\array_key_exists(__FUNCTION__, $this->skippedTests)) { @@ -863,10 +855,6 @@ public static function providePermissionCases(): iterable /** * @dataProvider providePermissionCases - * - * @param int $chmod - * @param int $umask - * @param int $expectedChmod */ public function testWriteWithVisibility(int $chmod, int $umask, int $expectedChmod): void { @@ -893,10 +881,6 @@ public function testWriteWithVisibility(int $chmod, int $umask, int $expectedChm * @requires OS Darwin|Linux * * @dataProvider providePermissionCases - * - * @param int $chmod - * @param int $umask - * @param int $expectedChmod */ public function testWriteStreamWithVisibility(int $chmod, int $umask, int $expectedChmod): void { @@ -927,10 +911,6 @@ public function testWriteStreamWithVisibility(int $chmod, int $umask, int $expec /** * @dataProvider providePermissionCases - * - * @param int $chmod - * @param int $umask - * @param int $expectedChmod */ public function testAppendStreamWithVisibility(int $chmod, int $umask, int $expectedChmod): void { @@ -1350,9 +1330,6 @@ public function testChangeExtension(): void self::assertSame($dir, $this->filesystem->changeExtension($dir, 'php')); } - /** - * @todo fix this test for docker run - */ public function testIsWritable(): void { if (\array_key_exists(__FUNCTION__, $this->skippedTests)) { @@ -2155,10 +2132,6 @@ protected function getFilesystem() /** * Get the owner uid of a file. - * - * @param string $filepath - * - * @return int */ protected function getFileOwnerId(string $filepath): int { @@ -2175,10 +2148,6 @@ protected function getFileOwnerId(string $filepath): int /** * Get the group uid of a file. - * - * @param string $filepath - * - * @return int */ protected function getFileGroupId(string $filepath): int { @@ -2194,14 +2163,7 @@ protected function getFileGroupId(string $filepath): int } /** - * @param string $name - * @param null|string $content * @param null|string $at - * @param null|int $chmod - * @param null|int $chgrp - * @param null|int $time - * - * @return string */ abstract protected function createFile( string $name, @@ -2212,20 +2174,8 @@ abstract protected function createFile( ?int $time = null ): string; - /** - * @param string $name - * @param null|string $childOf - * @param null|int $chmod - * - * @return string - */ abstract protected function createDir(string $name, ?string $childOf = null, ?int $chmod = null): string; - /** - * @param int $size - * - * @return string - */ abstract protected function createFileContent(int $size): string; /** @@ -2233,8 +2183,6 @@ abstract protected function createFileContent(int $size): string; * * @param int $expectedFilePerms Expected file permissions as three digits (i.e. 755) * @param string $filePath - * - * @return void */ private function assertFilePermissions($expectedFilePerms, $filePath): void { @@ -2249,10 +2197,6 @@ private function assertFilePermissions($expectedFilePerms, $filePath): void /** * Get the owner of a file. - * - * @param string $filepath - * - * @return string */ private function getFileOwner(string $filepath): string { @@ -2263,10 +2207,6 @@ private function getFileOwner(string $filepath): string /** * Get the group of a file. - * - * @param string $filepath - * - * @return string */ private function getFileGroup(string $filepath): string { @@ -2277,8 +2217,6 @@ private function getFileGroup(string $filepath): string /** * Check if link is supported, if not skip the test. - * - * @return void */ private function markAsSkippedIfLinkIsMissing(): void { @@ -2295,8 +2233,6 @@ private function markAsSkippedIfLinkIsMissing(): void * Check if symbolic link is supported, if not skip the test. * * @param bool $relative - * - * @return void */ private function markAsSkippedIfSymlinkIsMissing($relative = false): void { @@ -2304,7 +2240,6 @@ private function markAsSkippedIfSymlinkIsMissing($relative = false): void self::markTestSkipped('symlink requires "Create symbolic links" privilege on Windows'); } - // https://bugs.php.net/69473 if ($relative && \PHP_OS_FAMILY === 'Windows' && 1 === \PHP_ZTS) { self::markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions'); } @@ -2312,8 +2247,6 @@ private function markAsSkippedIfSymlinkIsMissing($relative = false): void /** * Check if chmod is supported, if not skip the test. - * - * @return void */ private function markAsSkippedIfChmodIsMissing(): void { @@ -2324,8 +2257,6 @@ private function markAsSkippedIfChmodIsMissing(): void /** * Check if posix_isatty is supported, if not skip the test. - * - * @return void */ private function markAsSkippedIfPosixIsMissing(): void { @@ -2336,10 +2267,6 @@ private function markAsSkippedIfPosixIsMissing(): void /** * Normalize the given path (transform each blackslash into a real directory separator). - * - * @param string $path - * - * @return string */ private function normalize(string $path): string { diff --git a/src/Viserio/Component/Filesystem/Tests/Container/Provider/FilesystemServiceProviderTest.php b/src/Viserio/Component/Filesystem/Tests/Container/Provider/FilesystemServiceProviderTest.php index cf4f89bc0..902755580 100644 --- a/src/Viserio/Component/Filesystem/Tests/Container/Provider/FilesystemServiceProviderTest.php +++ b/src/Viserio/Component/Filesystem/Tests/Container/Provider/FilesystemServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Container\Provider; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class FilesystemServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Filesystem/Tests/FilesystemTest.php b/src/Viserio/Component/Filesystem/Tests/FilesystemTest.php index 8290d2d4c..cb694695e 100644 --- a/src/Viserio/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Viserio/Component/Filesystem/Tests/FilesystemTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests; @@ -19,6 +19,7 @@ * @internal * * @small + * @coversNothing */ final class FilesystemTest extends AbstractFilesystemTestCase { @@ -135,11 +136,6 @@ protected function createFileContent(int $size): string return LargeFileContent::withKilobytes($size)->content(); } - /** - * @param string $dottedDirs - * - * @return string - */ private function getDir(string $dottedDirs): string { $folders = \explode('.', $dottedDirs); diff --git a/src/Viserio/Component/Filesystem/Tests/FilesystemVfsStreamTest.php b/src/Viserio/Component/Filesystem/Tests/FilesystemVfsStreamTest.php index 7d497704c..39397b7cd 100644 --- a/src/Viserio/Component/Filesystem/Tests/FilesystemVfsStreamTest.php +++ b/src/Viserio/Component/Filesystem/Tests/FilesystemVfsStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class FilesystemVfsStreamTest extends AbstractFilesystemTestCase { @@ -53,8 +54,8 @@ final class FilesystemVfsStreamTest extends AbstractFilesystemTestCase 'testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption' => 'chdir dont support stream wrappers', 'testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption' => 'chdir dont support stream wrappers', 'testMirrorAvoidCopyingTargetDirectoryIfInSourceDirectory' => 'symlink dont support stream wrappers', - 'testSetGroupByName' => 'chgrp dont support stream wrappers', // @todo check this' - 'testSetGroupById' => 'chgrp dont support stream wrappers', // @todo check this' + 'testSetGroupByName' => 'chgrp doesnt support stream wrappers', + 'testSetGroupById' => 'chgrp doesnt support stream wrappers', 'testCopyDoesNotOverrideExistingFileByDefault' => 'setting modification time is not working', 'testHasThrowException' => '', 'testSetOwnerByName' => 'chown dont support stream wrappers', @@ -183,8 +184,6 @@ protected function createFileContent(int $size): string } /** - * @param string $dottedDirs - * * @return \org\bovigo\vfs\vfsStreamContent|\org\bovigo\vfs\vfsStreamDirectory */ private function getDir(string $dottedDirs) diff --git a/src/Viserio/Component/Filesystem/Tests/Fixture/ChangeFileResource.php b/src/Viserio/Component/Filesystem/Tests/Fixture/ChangeFileResource.php index 07f52358b..b8872c735 100644 --- a/src/Viserio/Component/Filesystem/Tests/Fixture/ChangeFileResource.php +++ b/src/Viserio/Component/Filesystem/Tests/Fixture/ChangeFileResource.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Fixture; diff --git a/src/Viserio/Component/Filesystem/Tests/PermissionsTest.php b/src/Viserio/Component/Filesystem/Tests/PermissionsTest.php index 2f2db72af..eac7c43de 100644 --- a/src/Viserio/Component/Filesystem/Tests/PermissionsTest.php +++ b/src/Viserio/Component/Filesystem/Tests/PermissionsTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests; diff --git a/src/Viserio/Component/Filesystem/Tests/StreamTest.php b/src/Viserio/Component/Filesystem/Tests/StreamTest.php index b1ccfe7fc..a46092516 100644 --- a/src/Viserio/Component/Filesystem/Tests/StreamTest.php +++ b/src/Viserio/Component/Filesystem/Tests/StreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests; @@ -55,7 +55,7 @@ protected function tearDown(): void public function testBasicBehavior(): void { /** @var resource $handle actually it creates temporary file */ - $handle = \fopen(Stream::PROTOCOL . '://myfile.txt', 'x'); + $handle = \fopen(Stream::PROTOCOL . '://myfile.txt', 'xb'); \fwrite($handle, 'atomic and safe'); @@ -171,9 +171,6 @@ public static function provideStressCases(): iterable /** * @dataProvider provideStressCases * - * @param bool $delete - * @param int $notFoundCounter - * * @throws Exception */ public function testStress(bool $delete, int $notFoundCounter): void @@ -230,10 +227,6 @@ public function testStress(bool $delete, int $notFoundCounter): void /** * Get the owner of a file. - * - * @param string $filepath - * - * @return string */ protected function getFileOwner(string $filepath): string { @@ -252,10 +245,6 @@ protected function getFileOwner(string $filepath): string /** * Get the group of a file. - * - * @param string $filepath - * - * @return string */ protected function getFileGroup(string $filepath): string { @@ -274,8 +263,6 @@ protected function getFileGroup(string $filepath): string /** * Check if posix_isatty is supported, if not skip the test. - * - * @return void */ private function markAsSkippedIfPosixIsMissing(): void { @@ -291,11 +278,6 @@ private function generateRandomString(): string return \md5($s, true) . $s; } - /** - * @param string $s - * - * @return bool - */ private function checkStr(string $s): bool { return \strpos($s, \md5(\substr($s, 16), true)) === 0; diff --git a/src/Viserio/Component/Filesystem/Tests/Watcher/FileSystemWatchTest.php b/src/Viserio/Component/Filesystem/Tests/Watcher/FileSystemWatchTest.php index 17165ae06..5c904bbb8 100644 --- a/src/Viserio/Component/Filesystem/Tests/Watcher/FileSystemWatchTest.php +++ b/src/Viserio/Component/Filesystem/Tests/Watcher/FileSystemWatchTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Watcher; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class FileSystemWatchTest extends TestCase { diff --git a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/ArrayResourceTest.php b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/ArrayResourceTest.php index e8f599b4e..5436c28a3 100644 --- a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/ArrayResourceTest.php +++ b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/ArrayResourceTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Watcher\Resource; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ArrayResourceTest extends TestCase { diff --git a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/DirectoryResourceTest.php b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/DirectoryResourceTest.php index 4affb55bc..cff12d542 100644 --- a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/DirectoryResourceTest.php +++ b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/DirectoryResourceTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Watcher\Resource; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class DirectoryResourceTest extends TestCase { diff --git a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/FileResourceTest.php b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/FileResourceTest.php index df17f74d0..172474fa7 100644 --- a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/FileResourceTest.php +++ b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/FileResourceTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Watcher\Resource; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class FileResourceTest extends TestCase { diff --git a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/Locator/FileResourceLocatorTest.php b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/Locator/FileResourceLocatorTest.php index de415aa49..b8b746012 100644 --- a/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/Locator/FileResourceLocatorTest.php +++ b/src/Viserio/Component/Filesystem/Tests/Watcher/Resource/Locator/FileResourceLocatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Tests\Watcher\Resource\Locator; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class FileResourceLocatorTest extends TestCase { diff --git a/src/Viserio/Component/Filesystem/Watcher/Event/FileChangeEvent.php b/src/Viserio/Component/Filesystem/Watcher/Event/FileChangeEvent.php index 4ccac90eb..164bf1484 100644 --- a/src/Viserio/Component/Filesystem/Watcher/Event/FileChangeEvent.php +++ b/src/Viserio/Component/Filesystem/Watcher/Event/FileChangeEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher\Event; @@ -32,9 +32,6 @@ final class FileChangeEvent /** * Create a new FileChangeEvent instance. - * - * @param string $file - * @param int $event */ public function __construct(string $file, int $event) { @@ -44,8 +41,6 @@ public function __construct(string $file, int $event) /** * Returns the file path. - * - * @return string */ public function getFile(): string { @@ -54,8 +49,6 @@ public function getFile(): string /** * Returns the event int, like 1 for file changed, 2 for file deleted and 3 for file created. - * - * @return int */ public function getEvent(): int { diff --git a/src/Viserio/Component/Filesystem/Watcher/FileChangeWatcher.php b/src/Viserio/Component/Filesystem/Watcher/FileChangeWatcher.php index d87d71c5c..82f1241e7 100644 --- a/src/Viserio/Component/Filesystem/Watcher/FileChangeWatcher.php +++ b/src/Viserio/Component/Filesystem/Watcher/FileChangeWatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher; diff --git a/src/Viserio/Component/Filesystem/Watcher/INotifyWatcher.php b/src/Viserio/Component/Filesystem/Watcher/INotifyWatcher.php index 0290cf069..fbd84c25a 100644 --- a/src/Viserio/Component/Filesystem/Watcher/INotifyWatcher.php +++ b/src/Viserio/Component/Filesystem/Watcher/INotifyWatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher; @@ -124,8 +124,6 @@ public function watch($path, callable $callback, ?int $timeout = null): void } /** - * @param string $path - * * @return Generator */ private function scanPath(string $path): Generator diff --git a/src/Viserio/Component/Filesystem/Watcher/Resource/ArrayResource.php b/src/Viserio/Component/Filesystem/Watcher/Resource/ArrayResource.php index d51257b3e..c3eaacacb 100644 --- a/src/Viserio/Component/Filesystem/Watcher/Resource/ArrayResource.php +++ b/src/Viserio/Component/Filesystem/Watcher/Resource/ArrayResource.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher\Resource; diff --git a/src/Viserio/Component/Filesystem/Watcher/Resource/DirectoryResource.php b/src/Viserio/Component/Filesystem/Watcher/Resource/DirectoryResource.php index 3ca5a2f93..3314b7fa8 100644 --- a/src/Viserio/Component/Filesystem/Watcher/Resource/DirectoryResource.php +++ b/src/Viserio/Component/Filesystem/Watcher/Resource/DirectoryResource.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher\Resource; @@ -31,8 +31,6 @@ final class DirectoryResource implements ResourceContract /** * Create a new DirectoryResource instance. - * - * @param string $dir */ public function __construct(string $dir) { diff --git a/src/Viserio/Component/Filesystem/Watcher/Resource/FileResource.php b/src/Viserio/Component/Filesystem/Watcher/Resource/FileResource.php index 11c4c976d..752b29084 100644 --- a/src/Viserio/Component/Filesystem/Watcher/Resource/FileResource.php +++ b/src/Viserio/Component/Filesystem/Watcher/Resource/FileResource.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher\Resource; @@ -26,8 +26,6 @@ final class FileResource implements ResourceContract /** * Create a new FileResource instance. - * - * @param string $file */ public function __construct(string $file) { @@ -53,8 +51,6 @@ public function detectChanges(): array /** * Check if the file is modified. - * - * @return bool */ private function isModified(): bool { diff --git a/src/Viserio/Component/Filesystem/Watcher/Resource/Locator/FileResourceLocator.php b/src/Viserio/Component/Filesystem/Watcher/Resource/Locator/FileResourceLocator.php index 42fa3a569..0ffd1f6de 100644 --- a/src/Viserio/Component/Filesystem/Watcher/Resource/Locator/FileResourceLocator.php +++ b/src/Viserio/Component/Filesystem/Watcher/Resource/Locator/FileResourceLocator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem\Watcher\Resource\Locator; @@ -26,11 +26,6 @@ */ final class FileResourceLocator { - /** - * @param mixed $path - * - * @return null|\Viserio\Contract\Filesystem\Watcher\Resource - */ public static function locate($path): ?ResourceContract { if ($path instanceof Traversable) { diff --git a/src/Viserio/Component/Filesystem/composer.json b/src/Viserio/Component/Filesystem/composer.json index e5d34778c..022079cc0 100644 --- a/src/Viserio/Component/Filesystem/composer.json +++ b/src/Viserio/Component/Filesystem/composer.json @@ -37,10 +37,9 @@ "require-dev": { "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" }, diff --git a/src/Viserio/Component/Filesystem/helper.php b/src/Viserio/Component/Filesystem/helper.php index a06e8d1e1..f961a56f6 100644 --- a/src/Viserio/Component/Filesystem/helper.php +++ b/src/Viserio/Component/Filesystem/helper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Filesystem; diff --git a/src/Viserio/Component/Filesystem/phpstan.neon b/src/Viserio/Component/Filesystem/phpstan.neon index 92ca4c6db..fbc194d04 100644 --- a/src/Viserio/Component/Filesystem/phpstan.neon +++ b/src/Viserio/Component/Filesystem/phpstan.neon @@ -1,43 +1,7 @@ includes: - - vendor/viserio/phpstan-bridge/viserio.extensions.neon - - vendor/viserio/phpstan-bridge/viserio.rules.neon - - vendor/phpstan/phpstan-deprecation-rules/rules.neon - - vendor/phpstan/phpstan-mockery/extension.neon - - vendor/phpstan/phpstan-phpunit/extension.neon - - vendor/phpstan/phpstan-phpunit/rules.neon - - vendor/phpstan/phpstan-strict-rules/rules.neon - - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - vendor/phpstan/phpstan/conf/bleedingEdge.neon - -services: - - - class: SlamPhpStan\ClassNotationRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\GotoRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\PhpUnitFqcnAnnotationRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\StringToClassRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\UnusedVariableRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\MissingClosureParameterTypehintRule - tags: - - phpstan.rules.rule + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - ./ diff --git a/src/Viserio/Component/Filesystem/phpunit.xml b/src/Viserio/Component/Filesystem/phpunit.xml new file mode 100644 index 000000000..2c6be0e8a --- /dev/null +++ b/src/Viserio/Component/Filesystem/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Filesystem/phpunit.xml.dist b/src/Viserio/Component/Filesystem/phpunit.xml.dist deleted file mode 100644 index 4b8a86103..000000000 --- a/src/Viserio/Component/Filesystem/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Finder/.gitignore b/src/Viserio/Component/Finder/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Finder/.gitignore +++ b/src/Viserio/Component/Finder/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Finder/Comparator/Comparator.php b/src/Viserio/Component/Finder/Comparator/Comparator.php index 1e9fd1b16..5becef9af 100644 --- a/src/Viserio/Component/Finder/Comparator/Comparator.php +++ b/src/Viserio/Component/Finder/Comparator/Comparator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Comparator; @@ -86,7 +86,6 @@ public function test($test): bool return $test === $this->target; case '!==': return $test !== $this->target; - // == default: return ($test <=> $this->target) === 0; diff --git a/src/Viserio/Component/Finder/Comparator/DateComparator.php b/src/Viserio/Component/Finder/Comparator/DateComparator.php index 289b479b7..20ef9352d 100644 --- a/src/Viserio/Component/Finder/Comparator/DateComparator.php +++ b/src/Viserio/Component/Finder/Comparator/DateComparator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Comparator; @@ -35,8 +35,7 @@ class DateComparator extends Comparator implements DateComparatorContract /** * Create a new DateComparator instance. * - * @param string $test A comparison string - * @param string $timeType + * @param string $test A comparison string * * @throws \Viserio\Contract\Finder\Exception\InvalidArgumentException If the test is not understood */ diff --git a/src/Viserio/Component/Finder/Comparator/NumberComparator.php b/src/Viserio/Component/Finder/Comparator/NumberComparator.php index b1419e9ac..98aee5c91 100644 --- a/src/Viserio/Component/Finder/Comparator/NumberComparator.php +++ b/src/Viserio/Component/Finder/Comparator/NumberComparator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Comparator; diff --git a/src/Viserio/Component/Finder/Filter/AbstractMultiplePcreFilterIterator.php b/src/Viserio/Component/Finder/Filter/AbstractMultiplePcreFilterIterator.php index 97fd83df6..cc96dfb9a 100644 --- a/src/Viserio/Component/Finder/Filter/AbstractMultiplePcreFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/AbstractMultiplePcreFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; @@ -58,10 +58,6 @@ public function __construct(Iterator $iterator, array $matchPatterns, array $noM * If there is no regexps defined in the class, this method will accept the string. * Such case can be handled by child classes before calling the method if they want to * apply a different behavior. - * - * @param string $string - * - * @return bool */ protected function isAccepted(string $string): bool { @@ -89,10 +85,6 @@ protected function isAccepted(string $string): bool /** * Checks whether the string is a regex. - * - * @param string $string - * - * @return bool */ protected function isRegex(string $string): bool { diff --git a/src/Viserio/Component/Finder/Filter/CustomFilterIterator.php b/src/Viserio/Component/Finder/Filter/CustomFilterIterator.php index 523083bf7..b4bb39f81 100644 --- a/src/Viserio/Component/Finder/Filter/CustomFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/CustomFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/DateRangeFilterIterator.php b/src/Viserio/Component/Finder/Filter/DateRangeFilterIterator.php index 5a165de83..5b163b976 100644 --- a/src/Viserio/Component/Finder/Filter/DateRangeFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/DateRangeFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/DepthRangeFilterIterator.php b/src/Viserio/Component/Finder/Filter/DepthRangeFilterIterator.php index 626e70e58..37f66996c 100644 --- a/src/Viserio/Component/Finder/Filter/DepthRangeFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/DepthRangeFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/ExcludeDirectoryFilterIterator.php b/src/Viserio/Component/Finder/Filter/ExcludeDirectoryFilterIterator.php index 8bd72e6c5..7c2f9d28a 100644 --- a/src/Viserio/Component/Finder/Filter/ExcludeDirectoryFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/ExcludeDirectoryFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; @@ -102,7 +102,7 @@ public function accept(): bool public function hasChildren(): bool { if ($this->isRecursive) { - /** @var \RecursiveIterator $iterator */ + /** @var RecursiveIterator $iterator */ $iterator = $this->iterator; return $iterator->hasChildren(); @@ -114,11 +114,11 @@ public function hasChildren(): bool /** * {@inheritdoc} * - * @return \RecursiveIterator + * @return RecursiveIterator */ public function getChildren(): RecursiveIterator { - /** @var \RecursiveIterator $iterator */ + /** @var RecursiveIterator $iterator */ $iterator = $this->iterator; $children = new self($iterator->getChildren(), []); diff --git a/src/Viserio/Component/Finder/Filter/FileContentFilterIterator.php b/src/Viserio/Component/Finder/Filter/FileContentFilterIterator.php index 4724a4c54..ecc1deca3 100644 --- a/src/Viserio/Component/Finder/Filter/FileContentFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/FileContentFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/FileTypeFilterIterator.php b/src/Viserio/Component/Finder/Filter/FileTypeFilterIterator.php index 37775e3b8..2c1eef7da 100644 --- a/src/Viserio/Component/Finder/Filter/FileTypeFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/FileTypeFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/FilenameFilterIterator.php b/src/Viserio/Component/Finder/Filter/FilenameFilterIterator.php index 9fe54f3ad..43dce44ec 100644 --- a/src/Viserio/Component/Finder/Filter/FilenameFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/FilenameFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/GlobFilterIterator.php b/src/Viserio/Component/Finder/Filter/GlobFilterIterator.php index 4ffbacef7..1447acb16 100644 --- a/src/Viserio/Component/Finder/Filter/GlobFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/GlobFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/PathFilterIterator.php b/src/Viserio/Component/Finder/Filter/PathFilterIterator.php index 1ee5d934d..f8a803e07 100644 --- a/src/Viserio/Component/Finder/Filter/PathFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/PathFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Filter/RegexFilterIterator.php b/src/Viserio/Component/Finder/Filter/RegexFilterIterator.php index 8e1124e97..458e8ce52 100644 --- a/src/Viserio/Component/Finder/Filter/RegexFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/RegexFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; @@ -95,8 +95,6 @@ public function __construct(string $regExp, string $staticPrefix, Iterator $inne /** * Rewind the iterator to the first position. - * - * @return void */ public function rewind(): void { @@ -127,8 +125,6 @@ public function key() * Advances to the next match. * * @see Iterator::next() - * - * @return void */ public function next(): void { diff --git a/src/Viserio/Component/Finder/Filter/SizeRangeFilterIterator.php b/src/Viserio/Component/Finder/Filter/SizeRangeFilterIterator.php index 372c2ccc8..46cf14c7e 100644 --- a/src/Viserio/Component/Finder/Filter/SizeRangeFilterIterator.php +++ b/src/Viserio/Component/Finder/Filter/SizeRangeFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Filter; diff --git a/src/Viserio/Component/Finder/Finder.php b/src/Viserio/Component/Finder/Finder.php index 4b8763c45..2d25ce1ac 100644 --- a/src/Viserio/Component/Finder/Finder.php +++ b/src/Viserio/Component/Finder/Finder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder; @@ -504,7 +504,7 @@ public function in($dirs): FinderContract * * @throws \Viserio\Contract\Finder\Exception\LogicException if the in() method has not been called * - * @return \Traversable An iterator + * @return Traversable An iterator */ public function getIterator(): Traversable { @@ -576,8 +576,6 @@ public function count(): int /** * Search in given dir path. * - * @param string $dir - * * @return Traversable */ private function searchInDirectory(string $dir): Traversable @@ -688,10 +686,6 @@ private function searchInDirectory(string $dir): Traversable * Normalizes given directory names by removing trailing slashes. * * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper - * - * @param string $dir - * - * @return string */ private function normalizeDir(string $dir): string { diff --git a/src/Viserio/Component/Finder/Gitignore.php b/src/Viserio/Component/Finder/Gitignore.php index 5c00ccacc..40aafeddf 100644 --- a/src/Viserio/Component/Finder/Gitignore.php +++ b/src/Viserio/Component/Finder/Gitignore.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder; @@ -39,8 +39,6 @@ final class Gitignore /** * Returns a regexp which is the equivalent of the gitignore pattern. * - * @param string $gitignoreFileContent - * * @return string The regexp */ public static function toRegex(string $gitignoreFileContent): string @@ -82,9 +80,6 @@ public static function toRegex(string $gitignoreFileContent): string /** * @internal * - * @param int $type - * @param string $msg - * * @return bool; */ public static function handleError(int $type, string $msg): bool @@ -95,11 +90,6 @@ public static function handleError(int $type, string $msg): bool return true; } - /** - * @param string $gitignorePattern - * - * @return string - */ private static function getRegexFromGitignore(string $gitignorePattern): string { $regex = '('; @@ -158,11 +148,7 @@ private static function getRegexFromGitignore(string $gitignorePattern): string * * Call the given callable with given args, but throws an ErrorException when an error/warning/notice is triggered. * - * @param callable $func - * * @throws Throwable - * - * @return mixed */ private static function box(callable $func) { diff --git a/src/Viserio/Component/Finder/Iterator/GlobIterator.php b/src/Viserio/Component/Finder/Iterator/GlobIterator.php index 3737845e2..6fbffa540 100644 --- a/src/Viserio/Component/Finder/Iterator/GlobIterator.php +++ b/src/Viserio/Component/Finder/Iterator/GlobIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Iterator; diff --git a/src/Viserio/Component/Finder/Iterator/RecursiveDirectoryIterator.php b/src/Viserio/Component/Finder/Iterator/RecursiveDirectoryIterator.php index 7ed090b50..6368f72f3 100644 --- a/src/Viserio/Component/Finder/Iterator/RecursiveDirectoryIterator.php +++ b/src/Viserio/Component/Finder/Iterator/RecursiveDirectoryIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Iterator; @@ -50,10 +50,6 @@ final class RecursiveDirectoryIterator extends BaseRecursiveDirectoryIterator /** * Create a new RecursiveDirectoryIterator instance. * - * @param string $path - * @param int $flags - * @param bool $ignoreUnreadableDirs - * * @throws \Viserio\Contract\Finder\Exception\RuntimeException * @throws \Viserio\Contract\Finder\Exception\UnexpectedValueException */ @@ -113,7 +109,7 @@ public function isRewindable(): bool public function getChildren(): RecursiveIterator { try { - /** @var \RecursiveIterator $children */ + /** @var RecursiveIterator $children */ $children = parent::getChildren(); if ($children instanceof self) { @@ -173,8 +169,6 @@ public function current(): SplFileInfo /** * Do nothing for non rewindable stream. - * - * @return void */ public function rewind(): void { diff --git a/src/Viserio/Component/Finder/Iterator/SortableIterator.php b/src/Viserio/Component/Finder/Iterator/SortableIterator.php index 413a9913b..7d1148ac2 100644 --- a/src/Viserio/Component/Finder/Iterator/SortableIterator.php +++ b/src/Viserio/Component/Finder/Iterator/SortableIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Iterator; @@ -70,8 +70,7 @@ class SortableIterator implements IteratorAggregate * Create a new SortableIterator instance. * * @param Traversable $iterator - * @param callable|Closure|int $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) - * @param bool $reverseOrder + * @param callable|Closure|int $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) * * @throws \Viserio\Contract\Finder\Exception\InvalidArgumentException */ @@ -136,7 +135,7 @@ public function __construct(Traversable $iterator, $sort, bool $reverseOrder = f /** * Retrieve an external iterator. * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Viserio/Component/Finder/SplFileInfo.php b/src/Viserio/Component/Finder/SplFileInfo.php index 38ea4ace5..4f677b44f 100644 --- a/src/Viserio/Component/Finder/SplFileInfo.php +++ b/src/Viserio/Component/Finder/SplFileInfo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder; @@ -36,10 +36,6 @@ final class SplFileInfo extends BaseSplFileInfo implements SplFileInfoContract /** * Create a new SplFileInfo instance. * - * @param string $filePath - * @param string $subPath - * @param string $subPathname - * * @throws \Viserio\Contract\Finder\Exception\NotFoundException */ public function __construct(string $filePath, string $subPath, string $subPathname) diff --git a/src/Viserio/Component/Finder/Tests/AbstractIteratorTestCase.php b/src/Viserio/Component/Finder/Tests/AbstractIteratorTestCase.php index b66af1926..89afb8c80 100644 --- a/src/Viserio/Component/Finder/Tests/AbstractIteratorTestCase.php +++ b/src/Viserio/Component/Finder/Tests/AbstractIteratorTestCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -25,8 +25,6 @@ abstract class AbstractIteratorTestCase extends TestCase /** * @param array $expected * @param Traversable $iterator - * - * @return void */ protected function assertIterator(array $expected, Traversable $iterator): void { @@ -94,8 +92,8 @@ protected function assertOrderedIteratorForGroups(array $expected, Traversable $ /** * Same as AbstractIteratorTestCase::assertIterator with foreach usage. * - * @param string[] $expected - * @param Traversable $iterator + * @param string[] $expected + * @param Traversable $iterator */ protected function assertIteratorInForeach(array $expected, Traversable $iterator): void { @@ -116,8 +114,8 @@ protected function assertIteratorInForeach(array $expected, Traversable $iterato /** * Same as AbstractIteratorTestCase::assertOrderedIterator with foreach usage. * - * @param string[] $expected - * @param Traversable $iterator + * @param string[] $expected + * @param Traversable $iterator */ protected function assertOrderedIteratorInForeach(array $expected, Traversable $iterator): void { diff --git a/src/Viserio/Component/Finder/Tests/AbstractRealIteratorTestCase.php b/src/Viserio/Component/Finder/Tests/AbstractRealIteratorTestCase.php index 53d9d3691..57b5fdd45 100644 --- a/src/Viserio/Component/Finder/Tests/AbstractRealIteratorTestCase.php +++ b/src/Viserio/Component/Finder/Tests/AbstractRealIteratorTestCase.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -175,8 +175,5 @@ protected static function toAbsoluteFixtures(array $files): array return $f; } - /** - * @return string - */ abstract protected static function getTempPath(): string; } diff --git a/src/Viserio/Component/Finder/Tests/Comparator/ComparatorTest.php b/src/Viserio/Component/Finder/Tests/Comparator/ComparatorTest.php index f245c39d0..9df41c968 100644 --- a/src/Viserio/Component/Finder/Tests/Comparator/ComparatorTest.php +++ b/src/Viserio/Component/Finder/Tests/Comparator/ComparatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Comparator; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ComparatorTest extends TestCase { @@ -51,8 +52,6 @@ public function testGetSetTarget(): void /** * @dataProvider provideTestCases * - * @param string $operator - * @param string $target * @param string[] $match * @param string[] $noMatch */ diff --git a/src/Viserio/Component/Finder/Tests/Comparator/DateComparatorTest.php b/src/Viserio/Component/Finder/Tests/Comparator/DateComparatorTest.php index b27e82a7c..93dc8a84e 100644 --- a/src/Viserio/Component/Finder/Tests/Comparator/DateComparatorTest.php +++ b/src/Viserio/Component/Finder/Tests/Comparator/DateComparatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Comparator; @@ -21,13 +21,12 @@ * @internal * * @small + * @coversNothing */ final class DateComparatorTest extends TestCase { /** * @dataProvider provideConstructorCases - * - * @param string $test */ public function testConstructor(string $test): void { @@ -48,10 +47,6 @@ public static function provideConstructorCases(): iterable /** * @dataProvider provideTestCases - * - * @param mixed $test - * @param mixed $match - * @param mixed $noMatch */ public function testTest($test, $match, $noMatch): void { diff --git a/src/Viserio/Component/Finder/Tests/Comparator/NumberComparatorTest.php b/src/Viserio/Component/Finder/Tests/Comparator/NumberComparatorTest.php index 37df2fcf1..eda7493df 100644 --- a/src/Viserio/Component/Finder/Tests/Comparator/NumberComparatorTest.php +++ b/src/Viserio/Component/Finder/Tests/Comparator/NumberComparatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Comparator; @@ -21,17 +21,12 @@ * @internal * * @small + * @coversNothing */ final class NumberComparatorTest extends TestCase { /** * @dataProvider provideConstructorCases - * - * @param string $test - * @param bool $throw - * @param bool $isNumber - * - * @return void */ public function testConstructor(string $test, bool $throw = false, bool $isNumber = false): void { @@ -50,11 +45,8 @@ public function testConstructor(string $test, bool $throw = false, bool $isNumbe /** * @dataProvider provideTestCases * - * @param string $test * @param array $match * @param array $noMatch - * - * @return void */ public function testTest(string $test, array $match, array $noMatch): void { diff --git a/src/Viserio/Component/Finder/Tests/FileInfoTest.php b/src/Viserio/Component/Finder/Tests/FileInfoTest.php index 3c37a16f9..30bfe7a6b 100644 --- a/src/Viserio/Component/Finder/Tests/FileInfoTest.php +++ b/src/Viserio/Component/Finder/Tests/FileInfoTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -81,10 +81,6 @@ public function testGetFilenameWithoutExtension(): void /** * Normalize the given path (transform each blackslash into a real directory separator). - * - * @param string $path - * - * @return string */ private function normalize(string $path): string { diff --git a/src/Viserio/Component/Finder/Tests/Filter/CustomFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/CustomFilterIteratorTest.php index 03e1eaea6..baf554aa9 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/CustomFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/CustomFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -22,14 +22,12 @@ * @internal * * @small + * @coversNothing */ final class CustomFilterIteratorTest extends AbstractIteratorTestCase { /** * @dataProvider provideAcceptCases - * - * @param mixed $filters - * @param mixed $expected */ public function testAccept($filters, $expected): void { diff --git a/src/Viserio/Component/Finder/Tests/Filter/DateRangeFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/DateRangeFilterIteratorTest.php index 36aa3bf6c..21f302487 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/DateRangeFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/DateRangeFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class DateRangeFilterIteratorTest extends AbstractRealIteratorTestCase { @@ -159,9 +160,6 @@ public static function provideAcceptCases(): iterable yield [[new DateComparator('until last month', DateComparator::LAST_MODIFIED)], self::toAbsolute($untilLastMonth)]; } - /** - * @return string - */ protected static function getTempPath(): string { return dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/Filter/DepthRangeFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/DepthRangeFilterIteratorTest.php index 94f8967bb..2290f9170 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/DepthRangeFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/DepthRangeFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -23,14 +23,13 @@ * @internal * * @small + * @coversNothing */ final class DepthRangeFilterIteratorTest extends AbstractRealIteratorTestCase { /** * @dataProvider provideAcceptCases * - * @param int $minDepth - * @param int $maxDepth * @param string[] $expected */ public function testAccept(int $minDepth, int $maxDepth, array $expected): void @@ -129,9 +128,6 @@ public static function provideAcceptCases(): iterable yield [1, 1, self::toAbsolute($equalTo1)]; } - /** - * @return string - */ protected static function getTempPath(): string { return dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/Filter/ExcludeDirectoryFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/ExcludeDirectoryFilterIteratorTest.php index c0159e7d7..1216b269a 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/ExcludeDirectoryFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/ExcludeDirectoryFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ExcludeDirectoryFilterIteratorTest extends AbstractRealIteratorTestCase { @@ -129,9 +130,6 @@ public static function provideAcceptCases(): iterable yield [['toto/'], self::toAbsolute($toto)]; } - /** - * @return string - */ protected static function getTempPath(): string { return dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/Filter/FileContentFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/FileContentFilterIteratorTest.php index 4d05b6a09..20701e0db 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/FileContentFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/FileContentFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class FileContentFilterIteratorTest extends AbstractIteratorTestCase { diff --git a/src/Viserio/Component/Finder/Tests/Filter/FileTypeFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/FileTypeFilterIteratorTest.php index 2a3e8ab2a..544c7c36a 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/FileTypeFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/FileTypeFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -20,13 +20,13 @@ * @internal * * @small + * @coversNothing */ final class FileTypeFilterIteratorTest extends AbstractRealIteratorTestCase { /** * @dataProvider provideAcceptCases * - * @param int $mode * @param string[] $expected */ public function testAccept(int $mode, array $expected): void @@ -74,9 +74,6 @@ public static function provideAcceptCases(): iterable yield [FileTypeFilterIterator::ONLY_DIRECTORIES, self::toAbsolute($onlyDirectories)]; } - /** - * @return string - */ protected static function getTempPath(): string { return dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/Filter/FilenameFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/FilenameFilterIteratorTest.php index e089ba552..e6ca27131 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/FilenameFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/FilenameFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -20,15 +20,12 @@ * @internal * * @small + * @coversNothing */ final class FilenameFilterIteratorTest extends AbstractIteratorTestCase { /** * @dataProvider provideAcceptCases - * - * @param mixed $matchPatterns - * @param mixed $noMatchPatterns - * @param mixed $expected */ public function testAccept($matchPatterns, $noMatchPatterns, $expected): void { diff --git a/src/Viserio/Component/Finder/Tests/Filter/MultiplePcreFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/MultiplePcreFilterIteratorTest.php index 75b4baecd..57ab9be1e 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/MultiplePcreFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/MultiplePcreFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -19,15 +19,12 @@ * @internal * * @small + * @coversNothing */ final class MultiplePcreFilterIteratorTest extends TestCase { /** * @dataProvider provideIsRegexCases - * - * @param string $string - * @param bool $isRegex - * @param string $message */ public function testIsRegex(string $string, bool $isRegex, string $message): void { diff --git a/src/Viserio/Component/Finder/Tests/Filter/PathFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/PathFilterIteratorTest.php index 69b9e1211..662722b06 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/PathFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/PathFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class PathFilterIteratorTest extends AbstractIteratorTestCase { diff --git a/src/Viserio/Component/Finder/Tests/Filter/RegexFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/RegexFilterIteratorTest.php index 74eec655d..17c81aaab 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/RegexFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/RegexFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Iterator; diff --git a/src/Viserio/Component/Finder/Tests/Filter/SizeRangeFilterIteratorTest.php b/src/Viserio/Component/Finder/Tests/Filter/SizeRangeFilterIteratorTest.php index cf132dcff..84b11a549 100644 --- a/src/Viserio/Component/Finder/Tests/Filter/SizeRangeFilterIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Filter/SizeRangeFilterIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Filter; @@ -21,14 +21,12 @@ * @internal * * @small + * @coversNothing */ final class SizeRangeFilterIteratorTest extends AbstractRealIteratorTestCase { /** * @dataProvider provideAcceptCases - * - * @param mixed $size - * @param mixed $expected */ public function testAccept($size, $expected): void { @@ -57,9 +55,6 @@ public static function provideAcceptCases(): iterable yield [[new NumberComparator('< 1K'), new NumberComparator('> 0.5K')], self::toAbsolute($lessThan1KGreaterThan05K)]; } - /** - * @return string - */ protected static function getTempPath(): string { return dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/FinderTest.php b/src/Viserio/Component/Finder/Tests/FinderTest.php index 23ac32eab..683f45cd3 100644 --- a/src/Viserio/Component/Finder/Tests/FinderTest.php +++ b/src/Viserio/Component/Finder/Tests/FinderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class FinderTest extends AbstractRealIteratorTestCase { @@ -350,9 +351,6 @@ public function testNotNameWithArrayParam(): void * @dataProvider provideRegexNameCases * * @param string[] $expected - * @param string $regex - * - * @return void */ public function testRegexName($expected, string $regex): void { @@ -1263,10 +1261,6 @@ public function testNoResults(): void /** * @dataProvider provideContainsCases - * - * @param mixed $matchPatterns - * @param mixed $noMatchPatterns - * @param mixed $expected */ public function testContains($matchPatterns, $noMatchPatterns, $expected): void { @@ -1608,8 +1602,6 @@ public function testIgnoredAccessDeniedException(): void /** * Check if chmod is supported, if not skip the test. - * - * @return void */ protected function markAsSkippedIfChmodIsMissing(): void { @@ -1618,9 +1610,6 @@ protected function markAsSkippedIfChmodIsMissing(): void } } - /** - * @return string - */ protected static function getTempPath(): string { return __DIR__ . \DIRECTORY_SEPARATOR . 'Fixture' . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/InnerNameIterator.php b/src/Viserio/Component/Finder/Tests/Fixture/InnerNameIterator.php index d266ddbbf..2ef3bb2bd 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/InnerNameIterator.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/InnerNameIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/InnerSizeIterator.php b/src/Viserio/Component/Finder/Tests/Fixture/InnerSizeIterator.php index 551c16467..20f5243af 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/InnerSizeIterator.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/InnerSizeIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/InnerTypeIterator.php b/src/Viserio/Component/Finder/Tests/Fixture/InnerTypeIterator.php index 866734cd5..cfa0c5ec0 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/InnerTypeIterator.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/InnerTypeIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/Iterator.php b/src/Viserio/Component/Finder/Tests/Fixture/Iterator.php index 702085d3f..b6c3263e3 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/Iterator.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/Iterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/MockFileListIterator.php b/src/Viserio/Component/Finder/Tests/Fixture/MockFileListIterator.php index 97be5894d..c79ef743b 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/MockFileListIterator.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/MockFileListIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/MockSplFileInfo.php b/src/Viserio/Component/Finder/Tests/Fixture/MockSplFileInfo.php index b8dacaf42..b13ba5041 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/MockSplFileInfo.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/MockSplFileInfo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; @@ -139,9 +139,6 @@ public function getSubPath(): string return $this->subPath; } - /** - * @param mixed $subPath - */ public function setSubPath($subPath): void { $this->subPath = $subPath; @@ -157,9 +154,6 @@ public function getSubPathname(): string return $this->subPathname; } - /** - * @param mixed $subPathname - */ public function setSubPathname($subPathname): void { $this->subPathname = $subPathname; diff --git a/src/Viserio/Component/Finder/Tests/Fixture/TestMultiplePcreFilterIterator.php b/src/Viserio/Component/Finder/Tests/Fixture/TestMultiplePcreFilterIterator.php index 50cba1b3f..7da1bf1ff 100644 --- a/src/Viserio/Component/Finder/Tests/Fixture/TestMultiplePcreFilterIterator.php +++ b/src/Viserio/Component/Finder/Tests/Fixture/TestMultiplePcreFilterIterator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Fixture; diff --git a/src/Viserio/Component/Finder/Tests/GitignoreTest.php b/src/Viserio/Component/Finder/Tests/GitignoreTest.php index 0f52b6dd5..ef8ef36f1 100644 --- a/src/Viserio/Component/Finder/Tests/GitignoreTest.php +++ b/src/Viserio/Component/Finder/Tests/GitignoreTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -20,13 +20,13 @@ * @internal * * @small + * @coversNothing */ final class GitignoreTest extends TestCase { /** * @dataProvider provideCasesCases * - * @param string $patterns * @param string[] $matchingCases * @param string[] $nonMatchingCases */ diff --git a/src/Viserio/Component/Finder/Tests/HelperTest.php b/src/Viserio/Component/Finder/Tests/HelperTest.php index 9a852bd6c..9479b64f0 100644 --- a/src/Viserio/Component/Finder/Tests/HelperTest.php +++ b/src/Viserio/Component/Finder/Tests/HelperTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -176,7 +176,6 @@ public static function provideGlobStreamWrapperCases(): iterable /** * @dataProvider provideGlobStreamWrapperCases * - * @param string $path * @param string[] $expected */ public function testGlobStreamWrapper(string $path, array $expected): void diff --git a/src/Viserio/Component/Finder/Tests/Iterator/GlobIteratorTest.php b/src/Viserio/Component/Finder/Tests/Iterator/GlobIteratorTest.php index 9834ac590..6ba35d85b 100644 --- a/src/Viserio/Component/Finder/Tests/Iterator/GlobIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Iterator/GlobIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Iterator; @@ -314,8 +314,6 @@ public function testGlobFailsIfNotAbsolute(): void * This is necessary since RecursiveDirectoryIterator is not guaranteed to * return sorted results on all filesystems. * - * @param mixed $expected - * @param mixed $actual * @param string $message */ private function assertSameAfterSorting($expected, $actual, $message = ''): void diff --git a/src/Viserio/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/src/Viserio/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php index edcf1f957..e8f0a9519 100644 --- a/src/Viserio/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Iterator; @@ -189,10 +189,6 @@ public function testSeekOnFtp(): void * * This is necessary since RecursiveDirectoryIterator is not guaranteed to * return sorted results on all filesystems. - * - * @param mixed $expected - * @param mixed $actual - * @param string $message */ private function assertSameAfterSorting($expected, $actual, string $message = ''): void { diff --git a/src/Viserio/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/src/Viserio/Component/Finder/Tests/Iterator/SortableIteratorTest.php index 7d2cf9e19..7f25bd379 100644 --- a/src/Viserio/Component/Finder/Tests/Iterator/SortableIteratorTest.php +++ b/src/Viserio/Component/Finder/Tests/Iterator/SortableIteratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests\Iterator; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class SortableIteratorTest extends AbstractRealIteratorTestCase { @@ -35,9 +36,6 @@ public function testConstructor(): void /** * @dataProvider provideAcceptCases - * - * @param mixed $mode - * @param mixed $expected */ public function testAccept($mode, $expected): void { @@ -292,9 +290,6 @@ public static function provideAcceptCases(): iterable }, self::toAbsolute($customComparison)]; } - /** - * @return string - */ protected static function getTempPath(): string { return \realpath(\sys_get_temp_dir()) . \DIRECTORY_SEPARATOR . 'viserio_finder'; diff --git a/src/Viserio/Component/Finder/Tests/TestStreamWrapper.php b/src/Viserio/Component/Finder/Tests/TestStreamWrapper.php index 04f074bb9..0db422f30 100644 --- a/src/Viserio/Component/Finder/Tests/TestStreamWrapper.php +++ b/src/Viserio/Component/Finder/Tests/TestStreamWrapper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; diff --git a/src/Viserio/Component/Finder/Tests/UtilTest.php b/src/Viserio/Component/Finder/Tests/UtilTest.php index 0d8bda9be..677c989b3 100644 --- a/src/Viserio/Component/Finder/Tests/UtilTest.php +++ b/src/Viserio/Component/Finder/Tests/UtilTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder\Tests; @@ -28,9 +28,6 @@ final class UtilTest extends TestCase { /** * @dataProvider provideToRegExCases - * - * @param mixed $path - * @param mixed $isMatch */ public function testToRegEx($path, $isMatch): void { @@ -41,9 +38,6 @@ public function testToRegEx($path, $isMatch): void /** * @dataProvider provideToRegExDoubleWildcardCases - * - * @param mixed $path - * @param mixed $isMatch */ public function testToRegExDoubleWildcard($path, $isMatch): void { @@ -89,9 +83,11 @@ public static function provideToRegExDoubleWildcardCases(): iterable ]; } - // From the PHP manual: To specify a literal single quote, escape it with a - // backslash (\). To specify a literal backslash, double it (\\). - // All other instances of backslash will be treated as a literal backslash + /** + * From the PHP manual: To specify a literal single quote, escape it with a + * backslash (\). To specify a literal backslash, double it (\\). + * All other instances of backslash will be treated as a literal backslash + */ public function testEscapedWildcard(): void { // evaluates to "\*" @@ -460,9 +456,6 @@ public function testToRegexFailsIfNotAbsolute(): void /** * @dataProvider provideGetStaticPrefixCases - * - * @param mixed $glob - * @param mixed $prefix */ public function testGetStaticPrefix($glob, $prefix): void { @@ -510,9 +503,6 @@ public function testGetStaticPrefixFailsIfNotAbsolute(): void /** * @dataProvider provideBasePaths - * - * @param mixed $glob - * @param mixed $basePath */ public function testGetBasePath($glob, $basePath): void { @@ -521,9 +511,6 @@ public function testGetBasePath($glob, $basePath): void /** * @dataProvider provideBasePaths - * - * @param mixed $glob - * @param mixed $basePath */ public function testGetBasePathStream($glob, $basePath): void { @@ -600,7 +587,6 @@ public static function providePatternsCases(): iterable /** * @dataProvider providePatternsCases * - * @param string $pattern * @param array $expectedSequence */ public function testPatterns(string $pattern, array $expectedSequence): void diff --git a/src/Viserio/Component/Finder/Util.php b/src/Viserio/Component/Finder/Util.php index 6bc2f5b66..4578860ab 100644 --- a/src/Viserio/Component/Finder/Util.php +++ b/src/Viserio/Component/Finder/Util.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder; @@ -178,13 +178,11 @@ public static function getStaticPrefix(string $glob): string * glob returned by {@link getStaticPrefix()} to reduce the number of calls * to the expensive {@link preg_match()}. * - * @param string $glob The canonical glob. The glob should contain forward - * slashes as directory separators only. It must not - * contain any "." or ".." segments. Use the - * "Path::canonicalize" to canonicalize globs - * prior to calling this method. - * @param string $delimiter - * @param bool $checkForAbsolutePathOrUri + * @param string $glob The canonical glob. The glob should contain forward + * slashes as directory separators only. It must not + * contain any "." or ".." segments. Use the + * "Path::canonicalize" to canonicalize globs + * prior to calling this method. * * @throws \Viserio\Contract\Finder\Exception\InvalidArgumentException * @@ -330,9 +328,6 @@ public static function toRegEx( * * @see https://github.com/zendframework/zend-stdlib/issues/58 * - * @param string $pattern - * @param int $flags - * * @return false|string[] */ public static function polyfillGlobBrace(string $pattern, int $flags = 0) diff --git a/src/Viserio/Component/Finder/composer.json b/src/Viserio/Component/Finder/composer.json index 72cdf88fb..396facd27 100644 --- a/src/Viserio/Component/Finder/composer.json +++ b/src/Viserio/Component/Finder/composer.json @@ -31,10 +31,9 @@ "require-dev": { "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", - "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0" + "phpunit/phpunit": "8.2.*" }, "extra": { "branch-alias": { diff --git a/src/Viserio/Component/Finder/helper.php b/src/Viserio/Component/Finder/helper.php index 974a58e48..e3c97771f 100644 --- a/src/Viserio/Component/Finder/helper.php +++ b/src/Viserio/Component/Finder/helper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Finder; diff --git a/src/Viserio/Component/Finder/phpunit.xml b/src/Viserio/Component/Finder/phpunit.xml new file mode 100644 index 000000000..be47f1b19 --- /dev/null +++ b/src/Viserio/Component/Finder/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Finder/phpunit.xml.dist b/src/Viserio/Component/Finder/phpunit.xml.dist deleted file mode 100644 index 721ebe110..000000000 --- a/src/Viserio/Component/Finder/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Foundation/.gitignore b/src/Viserio/Component/Foundation/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Foundation/.gitignore +++ b/src/Viserio/Component/Foundation/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Foundation/AbstractKernel.php b/src/Viserio/Component/Foundation/AbstractKernel.php index 3b124e5d9..185b1e5c9 100644 --- a/src/Viserio/Component/Foundation/AbstractKernel.php +++ b/src/Viserio/Component/Foundation/AbstractKernel.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation; @@ -81,8 +81,6 @@ abstract class AbstractKernel implements KernelContract * List of allowed bootstrap types. * * @internal - * - * @var array */ protected static array $allowedBootstrapTypes = ['global']; @@ -95,22 +93,16 @@ abstract class AbstractKernel implements KernelContract /** * A Container Builder instance. - * - * @var null|\Viserio\Contract\Container\ContainerBuilder&\Viserio\Contract\Container\ServiceProvider\ContainerBuilder */ protected $containerBuilder; /** * The environment file to load during bootstrapping. - * - * @var string */ protected string $environmentFile = '.env'; /** * The custom environment path defined by the developer. - * - * @var null|string */ protected ?string $environmentPath = null; @@ -130,15 +122,11 @@ abstract class AbstractKernel implements KernelContract /** * The current application environment. - * - * @var null|string */ protected ?string $environment = null; /** * Check if the application is running in debug mode. - * - * @var bool */ protected bool $debug = false; @@ -492,15 +480,11 @@ public function bootstrap(): void /** * Returns the bootstrap lock file path. - * - * @return string */ abstract protected function getBootstrapLockFileName(): string; /** * Returns the bootstrap lock file path. - * - * @return string */ protected function getBootstrapDirPath(): string { @@ -509,8 +493,6 @@ protected function getBootstrapDirPath(): string /** * Returns prepared bootstrap classes, sorted and filtered after static::$allowedBootstrapTypes. - * - * @return array */ protected function getPreparedBootstraps(): array { diff --git a/src/Viserio/Component/Foundation/Bootstrap/AbstractFilesLoaderBootstrap.php b/src/Viserio/Component/Foundation/Bootstrap/AbstractFilesLoaderBootstrap.php index 620425f6f..c6189413e 100644 --- a/src/Viserio/Component/Foundation/Bootstrap/AbstractFilesLoaderBootstrap.php +++ b/src/Viserio/Component/Foundation/Bootstrap/AbstractFilesLoaderBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Bootstrap; @@ -27,10 +27,7 @@ abstract class AbstractFilesLoaderBootstrap /** * Get all of the files for the application. * - * @param string $path * @param array $extensions - * - * @return array */ protected static function getFiles(string $path, array $extensions = ['php']): array { diff --git a/src/Viserio/Component/Foundation/Bootstrap/LoadEnvironmentVariablesBootstrap.php b/src/Viserio/Component/Foundation/Bootstrap/LoadEnvironmentVariablesBootstrap.php index 8ce063097..ab9b277d9 100644 --- a/src/Viserio/Component/Foundation/Bootstrap/LoadEnvironmentVariablesBootstrap.php +++ b/src/Viserio/Component/Foundation/Bootstrap/LoadEnvironmentVariablesBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Bootstrap; diff --git a/src/Viserio/Component/Foundation/Bootstrap/SetRequestForConsoleBootstrap.php b/src/Viserio/Component/Foundation/Bootstrap/SetRequestForConsoleBootstrap.php index e79ee44c0..41413c276 100644 --- a/src/Viserio/Component/Foundation/Bootstrap/SetRequestForConsoleBootstrap.php +++ b/src/Viserio/Component/Foundation/Bootstrap/SetRequestForConsoleBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Bootstrap; diff --git a/src/Viserio/Component/Foundation/Bootstrap/ShellVerbosityBootstrap.php b/src/Viserio/Component/Foundation/Bootstrap/ShellVerbosityBootstrap.php index ee12b7ae5..cb3d3fe90 100644 --- a/src/Viserio/Component/Foundation/Bootstrap/ShellVerbosityBootstrap.php +++ b/src/Viserio/Component/Foundation/Bootstrap/ShellVerbosityBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Bootstrap; diff --git a/src/Viserio/Component/Foundation/BootstrapManager.php b/src/Viserio/Component/Foundation/BootstrapManager.php index c4c85aded..ae24ccb87 100644 --- a/src/Viserio/Component/Foundation/BootstrapManager.php +++ b/src/Viserio/Component/Foundation/BootstrapManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation; @@ -48,8 +48,6 @@ final class BootstrapManager implements BootstrapManagerContract /** * Create a new bootstrap manger instance. - * - * @param \Viserio\Contract\Foundation\Kernel $kernel */ public function __construct(KernelContract $kernel) { @@ -116,13 +114,6 @@ public function bootstrapWith(array $bootstraps): void /** * Calls callbacks on bootstrap name. - * - * @param array $bootCallbacks - * @param \Viserio\Contract\Foundation\Kernel $kernel - * @param string $type - * @param string $bootstrap - * - * @return void */ private function callCallbacks(array $bootCallbacks, KernelContract $kernel, string $type, string $bootstrap): void { diff --git a/src/Viserio/Component/Foundation/Console/Kernel.php b/src/Viserio/Component/Foundation/Console/Kernel.php index ade5e14a7..61f2a7621 100644 --- a/src/Viserio/Component/Foundation/Console/Kernel.php +++ b/src/Viserio/Component/Foundation/Console/Kernel.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Console; @@ -45,8 +45,6 @@ class Kernel extends AbstractKernel implements ConsoleKernelContract, Terminable * List of allowed bootstrap types. * * @internal - * - * @var array */ protected static array $allowedBootstrapTypes = ['global', 'console']; @@ -62,12 +60,6 @@ public function __construct() parent::__construct(); } - /** - * @param string $method - * @param array $arguments - * - * @return mixed - */ public function __call(string $method, array $arguments) { $this->bootstrap(); @@ -114,8 +106,6 @@ public function getAll(): array /** * Get the output for the last run command. - * - * @return string */ public function getOutput(): string { @@ -126,10 +116,6 @@ public function getOutput(): string /** * Register the given command with the console application. - * - * @param \Symfony\Component\Console\Command\Command $command - * - * @return void */ public function registerCommand(SymfonyCommand $command): void { @@ -140,8 +126,6 @@ public function registerCommand(SymfonyCommand $command): void /** * Get the cerebro application instance. - * - * @return \Viserio\Component\Console\Application */ protected function getConsole(): Cerebro { @@ -154,10 +138,6 @@ protected function getConsole(): Cerebro /** * Report the exception to the exception handler. - * - * @param Throwable $exception - * - * @return void */ protected function reportException(Throwable $exception): void { @@ -172,9 +152,6 @@ protected function reportException(Throwable $exception): void * Report the exception to the exception handler. * * @param null|\Symfony\Component\Console\Output\OutputInterface $output - * @param Throwable $exception - * - * @return void */ protected function renderException($output, Throwable $exception): void { diff --git a/src/Viserio/Component/Foundation/Container/Provider/FoundationDataCollectorServiceProvider.php b/src/Viserio/Component/Foundation/Container/Provider/FoundationDataCollectorServiceProvider.php index 2b307fa17..8ab91ab0c 100644 --- a/src/Viserio/Component/Foundation/Container/Provider/FoundationDataCollectorServiceProvider.php +++ b/src/Viserio/Component/Foundation/Container/Provider/FoundationDataCollectorServiceProvider.php @@ -3,96 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Foundation\Kernel as KernelContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Foundation\DataCollector\FilesLoadedCollector; -// use Viserio\Component\Foundation\DataCollector\NarrowsparkDataCollector; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// // class FoundationDataCollectorServiceProvider implements // ServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'narrowspark' => false, -// 'files' => false, -// ], -// ]; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $options = self::resolveOptions($container->get('config')); -// $kernel = $container->get(KernelContract::class); -// -// if ($options['collector']['narrowspark']) { -// $profiler->addCollector(new NarrowsparkDataCollector($kernel->getEnvironment(), $kernel->isDebug()), -100); -// } -// -// if ($options['collector']['files']) { -// $profiler->addCollector(new FilesLoadedCollector($kernel->getRootDir())); -// } -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Foundation/Container/Provider/FoundationServiceProvider.php b/src/Viserio/Component/Foundation/Container/Provider/FoundationServiceProvider.php index bc2aeaed5..09003d82f 100644 --- a/src/Viserio/Component/Foundation/Container/Provider/FoundationServiceProvider.php +++ b/src/Viserio/Component/Foundation/Container/Provider/FoundationServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Container\Provider; diff --git a/src/Viserio/Component/Foundation/DataCollector/FilesLoadedCollector.php b/src/Viserio/Component/Foundation/DataCollector/FilesLoadedCollector.php index fdc5bab53..7cb4113d4 100644 --- a/src/Viserio/Component/Foundation/DataCollector/FilesLoadedCollector.php +++ b/src/Viserio/Component/Foundation/DataCollector/FilesLoadedCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\DataCollector; @@ -43,8 +43,6 @@ class FilesLoadedCollector extends AbstractDataCollector implements PanelAwareCo /** * Create new files loaded collector instance. - * - * @param string $basePath */ public function __construct(string $basePath) { @@ -98,10 +96,6 @@ public function getPanel(): string /** * Remove the base path from the paths, so they are relative to the base. - * - * @param string $path - * - * @return string */ protected function stripBasePath(string $path): string { diff --git a/src/Viserio/Component/Foundation/DataCollector/NarrowsparkDataCollector.php b/src/Viserio/Component/Foundation/DataCollector/NarrowsparkDataCollector.php index 9dce0b5c9..58dc9b5a2 100644 --- a/src/Viserio/Component/Foundation/DataCollector/NarrowsparkDataCollector.php +++ b/src/Viserio/Component/Foundation/DataCollector/NarrowsparkDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\DataCollector; diff --git a/src/Viserio/Component/Foundation/EnvironmentDetector.php b/src/Viserio/Component/Foundation/EnvironmentDetector.php index 0d6fc367d..53301ebfa 100644 --- a/src/Viserio/Component/Foundation/EnvironmentDetector.php +++ b/src/Viserio/Component/Foundation/EnvironmentDetector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation; @@ -20,8 +20,6 @@ class EnvironmentDetector implements EnvironmentContract { /** * Indicates if the application is running in the console. - * - * @var null|bool */ protected ?bool $isRunningInConsole = null; @@ -95,11 +93,6 @@ public function hasXdebug(): bool /** * Set the application environment from command-line arguments. * - * @param Closure $callback - * @param array $args - * @param Closure $filter - * @param string $method - * * @return bool|string */ protected function detectConsoleEnvironment(Closure $callback, array $args, Closure $filter, string $method) @@ -118,8 +111,6 @@ protected function detectConsoleEnvironment(Closure $callback, array $args, Clos /** * Set the application environment for a web request. * - * @param Closure $callback - * * @return bool|string */ protected function detectWebEnvironment(Closure $callback) @@ -130,8 +121,6 @@ protected function detectWebEnvironment(Closure $callback) /** * Set the debug mode for a application. * - * @param Closure $callback - * * @return bool|string */ protected function detectDebugEnvironment(Closure $callback) @@ -142,10 +131,7 @@ protected function detectDebugEnvironment(Closure $callback) /** * Get the environment argument from the console. * - * @param array $args * @param Closure $callback - * - * @return null|string */ protected function getEnvironmentArgument(array $args, $callback): ?string { diff --git a/src/Viserio/Component/Foundation/Tests/Bootstrap/LoadEnvironmentVariablesBootstrapTest.php b/src/Viserio/Component/Foundation/Tests/Bootstrap/LoadEnvironmentVariablesBootstrapTest.php index e24be98d4..c093e1baf 100644 --- a/src/Viserio/Component/Foundation/Tests/Bootstrap/LoadEnvironmentVariablesBootstrapTest.php +++ b/src/Viserio/Component/Foundation/Tests/Bootstrap/LoadEnvironmentVariablesBootstrapTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\Bootstrap; @@ -36,7 +36,7 @@ protected function tearDown(): void { parent::tearDown(); - unset($_ENV['SHELL_VERBOSITY'], $_GET['SHELL_VERBOSITY'], $_SERVER['SHELL_VERBOSITY']); + unset($_ENV['SHELL_VERBOSITY'], $_GET['SHELL_VERBOSITY'], $_SERVER['SHELL_VERBOSITY'], $_SERVER['APP_ENV'], $_ENV['APP_ENV'], $_SERVER['APP_DEBUG'], $_ENV['APP_DEBUG'], $_GET['APP_DEBUG']); } public function testGetPriority(): void diff --git a/src/Viserio/Component/Foundation/Tests/Bootstrap/SetRequestForConsoleBootstrapTest.php b/src/Viserio/Component/Foundation/Tests/Bootstrap/SetRequestForConsoleBootstrapTest.php index 214f5b473..f9c5b74c7 100644 --- a/src/Viserio/Component/Foundation/Tests/Bootstrap/SetRequestForConsoleBootstrapTest.php +++ b/src/Viserio/Component/Foundation/Tests/Bootstrap/SetRequestForConsoleBootstrapTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\Bootstrap; @@ -29,6 +29,7 @@ interface DummyContainer extends ContainerBuilderContract * @internal * * @small + * @coversNothing */ final class SetRequestForConsoleBootstrapTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Foundation/Tests/BootstrapManagerTest.php b/src/Viserio/Component/Foundation/Tests/BootstrapManagerTest.php index c86898169..16f26a4e5 100644 --- a/src/Viserio/Component/Foundation/Tests/BootstrapManagerTest.php +++ b/src/Viserio/Component/Foundation/Tests/BootstrapManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class BootstrapManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Foundation/Tests/Console/KernelTest.php b/src/Viserio/Component/Foundation/Tests/Console/KernelTest.php index 7ee55177c..761324c7d 100644 --- a/src/Viserio/Component/Foundation/Tests/Console/KernelTest.php +++ b/src/Viserio/Component/Foundation/Tests/Console/KernelTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\Console; @@ -32,6 +32,7 @@ * @preserveGlobalState disabled * * @small + * @coversNothing */ final class KernelTest extends MockeryTestCase { @@ -263,8 +264,6 @@ public function testRegisterCommand(): void /** * @param \Mockery\MockInterface|\Viserio\Contract\Container\CompiledContainer $container - * - * @return \Viserio\Component\Foundation\Console\Kernel */ private function getKernel($container): Kernel { diff --git a/src/Viserio/Component/Foundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php b/src/Viserio/Component/Foundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php index b999c7fe6..ff37c610c 100644 --- a/src/Viserio/Component/Foundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php +++ b/src/Viserio/Component/Foundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php @@ -3,85 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Config\Provider\ConfigServiceProvider; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Config\Repository as RepositoryContract; -// use Viserio\Contract\Foundation\Kernel as KernelContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Foundation\Provider\FoundationDataCollectorServiceProvider; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// ///** // * @internal // */ // final class FoundationDataCollectorServiceProviderTest extends MockeryTestCase // { -// public function testGetServices(): void -// { -// $kernel = \Mockery::mock(KernelContract::class); -// $kernel->shouldReceive('getRootDir') -// ->once() -// ->andReturn(''); -// $kernel->shouldReceive('getEnvironment') -// ->once() -// ->andReturn('local'); -// $kernel->shouldReceive('isDebug') -// ->once() -// ->andReturn(true); -// -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->bind(KernelContract::class, $kernel); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ConfigServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new FoundationDataCollectorServiceProvider()); -// -// $container->get(RepositoryContract::class)->set('viserio', [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'narrowspark' => true, -// 'files' => true, -// ], -// ], -// ]); -// -// $profiler = $container->get(ProfilerContract::class); -// -// $this->assertInstanceOf(ProfilerContract::class, $profiler); -// -// $this->assertArrayHasKey('time-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('memory-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('narrowspark', $profiler->getCollectors()); -// $this->assertArrayHasKey('files-loaded-collector', $profiler->getCollectors()); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Foundation/Tests/DataCollector/FilesLoadedCollectorTest.php b/src/Viserio/Component/Foundation/Tests/DataCollector/FilesLoadedCollectorTest.php index b66848b77..dcbdcdfe6 100644 --- a/src/Viserio/Component/Foundation/Tests/DataCollector/FilesLoadedCollectorTest.php +++ b/src/Viserio/Component/Foundation/Tests/DataCollector/FilesLoadedCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\DataCollector; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class FilesLoadedCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Foundation/Tests/DataCollector/NarrowsparkDataCollectorTest.php b/src/Viserio/Component/Foundation/Tests/DataCollector/NarrowsparkDataCollectorTest.php index 41eaf413f..47871dd2a 100644 --- a/src/Viserio/Component/Foundation/Tests/DataCollector/NarrowsparkDataCollectorTest.php +++ b/src/Viserio/Component/Foundation/Tests/DataCollector/NarrowsparkDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\DataCollector; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class NarrowsparkDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Foundation/Tests/EnvironmentDetectorTest.php b/src/Viserio/Component/Foundation/Tests/EnvironmentDetectorTest.php index 72856a092..50f06a0d0 100644 --- a/src/Viserio/Component/Foundation/Tests/EnvironmentDetectorTest.php +++ b/src/Viserio/Component/Foundation/Tests/EnvironmentDetectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class EnvironmentDetectorTest extends TestCase { diff --git a/src/Viserio/Component/Foundation/Tests/Fixture/Provider/FixtureServiceProvider.php b/src/Viserio/Component/Foundation/Tests/Fixture/Provider/FixtureServiceProvider.php index 97b39fed0..ca49406ca 100644 --- a/src/Viserio/Component/Foundation/Tests/Fixture/Provider/FixtureServiceProvider.php +++ b/src/Viserio/Component/Foundation/Tests/Fixture/Provider/FixtureServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\Fixture\Provider; diff --git a/src/Viserio/Component/Foundation/Tests/Fixture/config/bootstrap.php b/src/Viserio/Component/Foundation/Tests/Fixture/config/bootstrap.php index 80926e8dc..b004cf82a 100644 --- a/src/Viserio/Component/Foundation/Tests/Fixture/config/bootstrap.php +++ b/src/Viserio/Component/Foundation/Tests/Fixture/config/bootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return [ diff --git a/src/Viserio/Component/Foundation/Tests/Fixture/serviceproviders.php b/src/Viserio/Component/Foundation/Tests/Fixture/serviceproviders.php index 1a0520c22..85fde1a7b 100644 --- a/src/Viserio/Component/Foundation/Tests/Fixture/serviceproviders.php +++ b/src/Viserio/Component/Foundation/Tests/Fixture/serviceproviders.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use Viserio\Component\Foundation\Tests\Fixture\Provider\FixtureServiceProvider; diff --git a/src/Viserio/Component/Foundation/Tests/Helper/ClassStack.php b/src/Viserio/Component/Foundation/Tests/Helper/ClassStack.php index a269d2a22..bc03ba24d 100644 --- a/src/Viserio/Component/Foundation/Tests/Helper/ClassStack.php +++ b/src/Viserio/Component/Foundation/Tests/Helper/ClassStack.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests\Helper; @@ -20,8 +20,6 @@ class ClassStack /** * Reset state. - * - * @return void */ public static function reset(): void { @@ -30,9 +28,6 @@ public static function reset(): void /** * Push a class on the stack. - * - * @param string $class - * @param bool $bool */ public static function add(string $class, bool $bool): void { @@ -51,10 +46,6 @@ public static function stack(): array /** * Verify if class exists in the stack. - * - * @param string $class - * - * @return bool */ public static function has(string $class): bool { @@ -63,10 +54,6 @@ public static function has(string $class): bool /** * Verify if class should exists. - * - * @param string $class - * - * @return bool */ public static function get(string $class): bool { diff --git a/src/Viserio/Component/Foundation/Tests/KernelTest.php b/src/Viserio/Component/Foundation/Tests/KernelTest.php index 8feb49b95..c6d7b5bf1 100644 --- a/src/Viserio/Component/Foundation/Tests/KernelTest.php +++ b/src/Viserio/Component/Foundation/Tests/KernelTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Tests; @@ -25,6 +25,7 @@ * @preserveGlobalState disabled * * @small + * @coversNothing */ final class KernelTest extends MockeryTestCase { @@ -184,13 +185,10 @@ public function testDetectEnvironment(): void self::assertSame('prod', $kernel->detectEnvironment(static function () { return 'prod'; })); + + unset($_SERVER['APP_ENV'], $_ENV['APP_ENV']); } - /** - * @param \Viserio\Contract\Container\CompiledContainer $container - * - * @return AbstractKernel - */ protected function getKernel(CompiledContainerContract $container): AbstractKernel { return new class($container) extends AbstractKernel { @@ -231,8 +229,6 @@ public function bootstrap(): void /** * Returns the bootstrap lock file path. - * - * @return string */ protected function getBootstrapLockFileName(): string { diff --git a/src/Viserio/Component/Foundation/Tests/OverwritePhpFunctions.php b/src/Viserio/Component/Foundation/Tests/OverwritePhpFunctions.php index 664d4f025..0ad07b03b 100644 --- a/src/Viserio/Component/Foundation/Tests/OverwritePhpFunctions.php +++ b/src/Viserio/Component/Foundation/Tests/OverwritePhpFunctions.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Foundation\Bootstrap; diff --git a/src/Viserio/Component/Foundation/composer.json b/src/Viserio/Component/Foundation/composer.json index 239e80425..d78a9b014 100644 --- a/src/Viserio/Component/Foundation/composer.json +++ b/src/Viserio/Component/Foundation/composer.json @@ -47,10 +47,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "symfony/var-exporter": "^4.3.8 || ^5.0.0", "viserio/container": "^1.0@dev", "viserio/exception": "^1.0@dev", diff --git a/src/Viserio/Component/Foundation/phpstan.neon b/src/Viserio/Component/Foundation/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Foundation/phpstan.neon +++ b/src/Viserio/Component/Foundation/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Foundation/phpunit.xml.dist b/src/Viserio/Component/Foundation/phpunit.xml similarity index 100% rename from src/Viserio/Component/Foundation/phpunit.xml.dist rename to src/Viserio/Component/Foundation/phpunit.xml diff --git a/src/Viserio/Component/Http/.gitignore b/src/Viserio/Component/Http/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Http/.gitignore +++ b/src/Viserio/Component/Http/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Http/AbstractMessage.php b/src/Viserio/Component/Http/AbstractMessage.php index 2128b4367..0cc1944df 100644 --- a/src/Viserio/Component/Http/AbstractMessage.php +++ b/src/Viserio/Component/Http/AbstractMessage.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -66,8 +66,6 @@ abstract class AbstractMessage implements MessageInterface * * @param string $name The property name * @param mixed $value The property value - * - * @return void */ public function __set($name, $value): void { @@ -165,7 +163,7 @@ public function getHeaderLine($name): string return ''; } - return \implode(',', $value); + return \implode(', ', $value); } /** @@ -317,8 +315,6 @@ public function withBody(StreamInterface $body) * Set validated headers. * * @param array $headers - * - * @return void */ protected function setHeaders(array $headers): void { @@ -354,11 +350,7 @@ protected function setHeaders(array $headers): void /** * Validate the HTTP protocol version. * - * @param string $version - * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException on invalid HTTP protocol version - * - * @return void */ private function validateProtocolVersion(string $version): void { @@ -412,10 +404,6 @@ private function filterHeaderValue($values): array /** * Assert given header. - * - * @param mixed $header - * - * @return void */ private function assertHeader($header): void { diff --git a/src/Viserio/Component/Http/File/File.php b/src/Viserio/Component/Http/File/File.php index c71390c4d..2a70c0a5c 100644 --- a/src/Viserio/Component/Http/File/File.php +++ b/src/Viserio/Component/Http/File/File.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\File; diff --git a/src/Viserio/Component/Http/Request.php b/src/Viserio/Component/Http/Request.php index 9ac781d3b..a5258cb2c 100644 --- a/src/Viserio/Component/Http/Request.php +++ b/src/Viserio/Component/Http/Request.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -30,8 +30,6 @@ class Request extends AbstractMessage implements RequestInterface, RequestMethod /** * The request URI target (path + query string). - * - * @var null|string */ protected ?string $requestTarget; @@ -166,8 +164,6 @@ public function withUri(UriInterface $uri, $preserveHost = false): RequestInterf /** * Retrieve the host from the URI instance. - * - * @return void */ private function updateHostFromUri(): void { @@ -193,18 +189,13 @@ private function updateHostFromUri(): void } // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 $this->headers = ['Host' => [$host]] + $this->headers; } /** * Validate the HTTP method. * - * @param string $method - * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException on invalid HTTP method - * - * @return string */ private function filterMethod(string $method): string { @@ -227,11 +218,7 @@ private function filterMethod(string $method): string * * Otherwise, it raises an exception. * - * @param mixed $uri - * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException - * - * @return \Psr\Http\Message\UriInterface */ private function createUri($uri): UriInterface { diff --git a/src/Viserio/Component/Http/Response.php b/src/Viserio/Component/Http/Response.php index 7823be077..0a79996f4 100644 --- a/src/Viserio/Component/Http/Response.php +++ b/src/Viserio/Component/Http/Response.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -28,7 +28,6 @@ class Response extends AbstractMessage implements ResponseInterface, StatusCodeI /** * Create a new response instance. * - * @param int $status * @param array $headers headers for the response, if any * @param null|\Psr\Http\Message\StreamInterface|resource|string $body Stream identifier and/or actual stream resource * @param string $version protocol version diff --git a/src/Viserio/Component/Http/Response/BinaryFileResponse.php b/src/Viserio/Component/Http/Response/BinaryFileResponse.php index 0b7def8c8..7a6185bf8 100644 --- a/src/Viserio/Component/Http/Response/BinaryFileResponse.php +++ b/src/Viserio/Component/Http/Response/BinaryFileResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; @@ -83,8 +83,6 @@ public function __construct( * If this is set to true, the file will be unlinked after the request is send * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. * - * @param bool $shouldDelete - * * @return $this */ public function deleteFileAfterSend(bool $shouldDelete = true): self @@ -96,8 +94,6 @@ public function deleteFileAfterSend(bool $shouldDelete = true): self /** * Gets the file. - * - * @return \Viserio\Component\Http\File\File */ public function getFile(): File { @@ -107,16 +103,11 @@ public function getFile(): File /** * Transform a SplFileInfo to a Http File and check if the file exists. * - * @param mixed $file * @param string $contentDisposition - * @param bool $autoETag - * @param bool $autoLastModified * * @throws \Viserio\Contract\Http\Exception\FileNotFoundException * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException * @throws \Viserio\Contract\Http\Exception\FileException - * - * @return \Psr\Http\Message\ResponseInterface */ public function setFile( $file, @@ -205,8 +196,6 @@ public function getBody(): StreamInterface * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename * * @throws \InvalidArgumentException - * - * @return \Psr\Http\Message\ResponseInterface */ public function setContentDisposition( string $disposition, @@ -224,8 +213,6 @@ public function setContentDisposition( * Automatically sets the Last-Modified header according the file modification date. * * @throws ErrorException - * - * @return void */ protected function setAutoLastModified(): void { @@ -246,8 +233,6 @@ protected function setAutoLastModified(): void /** * Automatically sets the ETag header according to the checksum of the file. - * - * @return void */ protected function setAutoEtag(): void { diff --git a/src/Viserio/Component/Http/Response/DownloadResponse.php b/src/Viserio/Component/Http/Response/DownloadResponse.php index 51c1bd23c..c89cca855 100644 --- a/src/Viserio/Component/Http/Response/DownloadResponse.php +++ b/src/Viserio/Component/Http/Response/DownloadResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; diff --git a/src/Viserio/Component/Http/Response/EmptyResponse.php b/src/Viserio/Component/Http/Response/EmptyResponse.php index 6d37c91c0..6d3f41d01 100644 --- a/src/Viserio/Component/Http/Response/EmptyResponse.php +++ b/src/Viserio/Component/Http/Response/EmptyResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; diff --git a/src/Viserio/Component/Http/Response/HtmlResponse.php b/src/Viserio/Component/Http/Response/HtmlResponse.php index 7edab1223..67492b098 100644 --- a/src/Viserio/Component/Http/Response/HtmlResponse.php +++ b/src/Viserio/Component/Http/Response/HtmlResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; diff --git a/src/Viserio/Component/Http/Response/JsonResponse.php b/src/Viserio/Component/Http/Response/JsonResponse.php index 89b50c436..0cf81e1e8 100644 --- a/src/Viserio/Component/Http/Response/JsonResponse.php +++ b/src/Viserio/Component/Http/Response/JsonResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; @@ -83,13 +83,10 @@ public function __construct( /** * Encode the provided data to JSON. * - * @param mixed $data - * @param int $encodingOptions + * @param int $encodingOptions * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException * @throws \Viserio\Contract\Http\Exception\RuntimeException if unable to encode the $data to JSON - * - * @return string */ private function jsonEncode($data, $encodingOptions): string { diff --git a/src/Viserio/Component/Http/Response/RedirectResponse.php b/src/Viserio/Component/Http/Response/RedirectResponse.php index c594dc6a5..5ef60f18e 100644 --- a/src/Viserio/Component/Http/Response/RedirectResponse.php +++ b/src/Viserio/Component/Http/Response/RedirectResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; diff --git a/src/Viserio/Component/Http/Response/TextResponse.php b/src/Viserio/Component/Http/Response/TextResponse.php index 9f30f8dbb..8c7bfe44b 100644 --- a/src/Viserio/Component/Http/Response/TextResponse.php +++ b/src/Viserio/Component/Http/Response/TextResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; diff --git a/src/Viserio/Component/Http/Response/Traits/CreateBodyTrait.php b/src/Viserio/Component/Http/Response/Traits/CreateBodyTrait.php index 62ba64f65..136322551 100644 --- a/src/Viserio/Component/Http/Response/Traits/CreateBodyTrait.php +++ b/src/Viserio/Component/Http/Response/Traits/CreateBodyTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response\Traits; @@ -25,11 +25,7 @@ trait CreateBodyTrait /** * Create the message body. * - * @param mixed $text - * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException if $text is neither a string or stream - * - * @return \Psr\Http\Message\StreamInterface */ private function createBody($text): StreamInterface { diff --git a/src/Viserio/Component/Http/Response/Traits/DownloadResponseTrait.php b/src/Viserio/Component/Http/Response/Traits/DownloadResponseTrait.php index c30a2c388..8d1722471 100644 --- a/src/Viserio/Component/Http/Response/Traits/DownloadResponseTrait.php +++ b/src/Viserio/Component/Http/Response/Traits/DownloadResponseTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response\Traits; @@ -52,8 +52,6 @@ trait DownloadResponseTrait * * @param string[] $downloadHeaders * @param string[] $headers - * - * @return bool */ public function overridesDownloadHeaders(array $downloadHeaders, array $headers = []): bool { diff --git a/src/Viserio/Component/Http/Response/Traits/InjectContentTypeTrait.php b/src/Viserio/Component/Http/Response/Traits/InjectContentTypeTrait.php index e6606d377..d7de04753 100644 --- a/src/Viserio/Component/Http/Response/Traits/InjectContentTypeTrait.php +++ b/src/Viserio/Component/Http/Response/Traits/InjectContentTypeTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response\Traits; @@ -18,7 +18,6 @@ trait InjectContentTypeTrait /** * Inject the provided Content-Type, if none is already present. * - * @param string $contentType * @param array $headers * * @return array Headers with injected Content-Type diff --git a/src/Viserio/Component/Http/Response/XmlResponse.php b/src/Viserio/Component/Http/Response/XmlResponse.php index b59e38c75..699611f65 100644 --- a/src/Viserio/Component/Http/Response/XmlResponse.php +++ b/src/Viserio/Component/Http/Response/XmlResponse.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Response; diff --git a/src/Viserio/Component/Http/ServerRequest.php b/src/Viserio/Component/Http/ServerRequest.php index 05f48af41..37681d2c7 100644 --- a/src/Viserio/Component/Http/ServerRequest.php +++ b/src/Viserio/Component/Http/ServerRequest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; diff --git a/src/Viserio/Component/Http/ServerRequestBuilder.php b/src/Viserio/Component/Http/ServerRequestBuilder.php index c61aa5712..876ac780d 100644 --- a/src/Viserio/Component/Http/ServerRequestBuilder.php +++ b/src/Viserio/Component/Http/ServerRequestBuilder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -60,8 +60,6 @@ public function createFromGlobals(): ServerRequestInterface * @param null|\Psr\Http\Message\StreamInterface|resource|string $body Typically stdIn * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException if no valid method or URI can be determined - * - * @return \Psr\Http\Message\ServerRequestInterface */ public function createFromArray( array $server, @@ -94,8 +92,6 @@ public function createFromArray( /** * @param array $server - * - * @return string */ private function getMethodFromServer(array $server): string { @@ -112,8 +108,6 @@ private function getMethodFromServer(array $server): string * @param array $server * * @throws \Viserio\Contract\Http\Exception\UnexpectedValueException - * - * @return string */ private function marshalProtocolVersion(array $server): string { diff --git a/src/Viserio/Component/Http/Stream.php b/src/Viserio/Component/Http/Stream.php index a8665ab2d..a7d69d163 100644 --- a/src/Viserio/Component/Http/Stream.php +++ b/src/Viserio/Component/Http/Stream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -57,29 +57,21 @@ class Stream implements StreamInterface /** * Is this stream readable? - * - * @var bool */ protected bool $readable; /** * Is this stream writable? - * - * @var bool */ protected bool $writable; /** * Is this stream seekable? - * - * @var bool */ protected bool $seekable; /** * The size of the stream if known. - * - * @var null|int */ protected ?int $size; @@ -88,15 +80,11 @@ class Stream implements StreamInterface /** * Is this stream a pipe? - * - * @var null|bool */ protected ?bool $isPipe; /** * Stream type of a open stream. - * - * @var string */ protected string $streamType; @@ -437,8 +425,6 @@ public function write($string): int /** * Returns whether or not the stream is a pipe. - * - * @return bool */ private function isPipe(): bool { diff --git a/src/Viserio/Component/Http/Stream/AbstractStreamDecorator.php b/src/Viserio/Component/Http/Stream/AbstractStreamDecorator.php index 1ae5f264f..78002e2d1 100644 --- a/src/Viserio/Component/Http/Stream/AbstractStreamDecorator.php +++ b/src/Viserio/Component/Http/Stream/AbstractStreamDecorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -23,8 +23,6 @@ abstract class AbstractStreamDecorator implements StreamInterface { /** * Create a new stream instance. - * - * @param \Psr\Http\Message\StreamInterface $stream */ public function __construct(StreamInterface $stream) { @@ -38,8 +36,6 @@ public function __construct(StreamInterface $stream) * @param string $name name of the property (allows "stream" only) * * @throws \Viserio\Contract\Http\Exception\UnexpectedValueException - * - * @return StreamInterface */ public function __get($name): StreamInterface { @@ -76,8 +72,6 @@ public function __toString(): string * * @param string $method Missing method name * @param array $args Method arguments - * - * @return mixed */ public function __call(string $method, array $args) { @@ -203,8 +197,6 @@ public function write($string): int * Implement in subclasses to dynamically create streams when requested. * * @throws \Viserio\Contract\Http\Exception\BadMethodCallException - * - * @return \Psr\Http\Message\StreamInterface */ protected function createStream(): StreamInterface { diff --git a/src/Viserio/Component/Http/Stream/AppendStream.php b/src/Viserio/Component/Http/Stream/AppendStream.php index f99bb19b6..0dd5b82ac 100644 --- a/src/Viserio/Component/Http/Stream/AppendStream.php +++ b/src/Viserio/Component/Http/Stream/AppendStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; diff --git a/src/Viserio/Component/Http/Stream/BufferStream.php b/src/Viserio/Component/Http/Stream/BufferStream.php index 8049cb1db..7741a7d58 100644 --- a/src/Viserio/Component/Http/Stream/BufferStream.php +++ b/src/Viserio/Component/Http/Stream/BufferStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; diff --git a/src/Viserio/Component/Http/Stream/CachingStream.php b/src/Viserio/Component/Http/Stream/CachingStream.php index 9d5c39c88..fde0695a0 100644 --- a/src/Viserio/Component/Http/Stream/CachingStream.php +++ b/src/Viserio/Component/Http/Stream/CachingStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -48,7 +48,7 @@ public function __construct(StreamInterface $stream, ?StreamInterface $target = $this->remoteStream = $stream; /** @var resource $handle */ - $handle = \fopen('php://temp', 'r+'); + $handle = \fopen('php://temp', 'r+b'); parent::__construct($target ?? new Stream($handle)); } @@ -156,8 +156,6 @@ public function eof(): bool /** * Close both the remote stream and buffer stream. - * - * @return void */ public function close(): void { @@ -165,9 +163,6 @@ public function close(): void $this->stream->close(); } - /** - * @return int - */ private function cacheEntireStream(): int { $target = new FnStream(['write' => 'strlen']); diff --git a/src/Viserio/Component/Http/Stream/FnStream.php b/src/Viserio/Component/Http/Stream/FnStream.php index c2b04ea55..cfabb2e3c 100644 --- a/src/Viserio/Component/Http/Stream/FnStream.php +++ b/src/Viserio/Component/Http/Stream/FnStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -63,11 +63,7 @@ public function __destruct() /** * Lazily determine which methods are not implemented. * - * @param mixed $name - * * @throws \Viserio\Contract\Http\Exception\BadMethodCallException - * - * @return void */ public function __get($name): void { @@ -105,8 +101,6 @@ public function __wakeup(): void * * @param \Psr\Http\Message\StreamInterface $stream Stream to decorate * @param array|callable> $methods Hash of method name to a closure - * - * @return self */ public static function decorate(StreamInterface $stream, array $methods): self { diff --git a/src/Viserio/Component/Http/Stream/LazyOpenStream.php b/src/Viserio/Component/Http/Stream/LazyOpenStream.php index 937adcd9f..b5d2d49ea 100644 --- a/src/Viserio/Component/Http/Stream/LazyOpenStream.php +++ b/src/Viserio/Component/Http/Stream/LazyOpenStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -37,9 +37,6 @@ class LazyOpenStream extends AbstractStreamDecorator * Create a new lazy open stream instance. * * @noinspection MagicMethodsValidityInspection - * - * @param string $filename - * @param string $mode */ public function __construct(string $filename, string $mode) { diff --git a/src/Viserio/Component/Http/Stream/LimitStream.php b/src/Viserio/Component/Http/Stream/LimitStream.php index 0f6ee5a88..e139228db 100644 --- a/src/Viserio/Component/Http/Stream/LimitStream.php +++ b/src/Viserio/Component/Http/Stream/LimitStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -58,8 +58,6 @@ public function __construct(StreamInterface $stream, int $limit = -1, int $offse * @param int $offset Offset to seek to and begin byte limiting from * * @throws \Viserio\Contract\Http\Exception\RuntimeException if the stream cannot be seeked - * - * @return void */ public function setOffset(int $offset): void { @@ -85,8 +83,6 @@ public function setOffset(int $offset): void * * @param int $limit number of bytes to allow to be read from the stream. * Use -1 for no limit - * - * @return void */ public function setLimit(int $limit): void { diff --git a/src/Viserio/Component/Http/Stream/MultipartStream.php b/src/Viserio/Component/Http/Stream/MultipartStream.php index f9646b201..e7734b434 100644 --- a/src/Viserio/Component/Http/Stream/MultipartStream.php +++ b/src/Viserio/Component/Http/Stream/MultipartStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -54,8 +54,6 @@ public function __construct(array $elements = [], ?string $boundary = null) /** * Get the boundary. - * - * @return string */ public function getBoundary(): string { @@ -74,8 +72,6 @@ public function isWritable(): bool * Create the aggregate stream that will be used to upload the POST data. * * @param array $elements - * - * @return \Psr\Http\Message\StreamInterface */ private function createAppendStream(array $elements): StreamInterface { @@ -95,8 +91,6 @@ private function createAppendStream(array $elements): StreamInterface * Get the headers needed before transferring the content of a POST file. * * @param array $headers - * - * @return string */ private function getHeaders(array $headers): string { @@ -112,8 +106,6 @@ private function getHeaders(array $headers): string /** * @param \Viserio\Component\Http\Stream\AppendStream $stream * @param array $element - * - * @return void */ private function addElement(AppendStream $stream, array $element): void { @@ -149,10 +141,7 @@ private function addElement(AppendStream $stream, array $element): void } /** - * @param string $name - * @param \Psr\Http\Message\StreamInterface $stream - * @param null|string $filename - * @param array $headers + * @param array $headers * * @return array */ @@ -199,8 +188,6 @@ private function createElement(string $name, StreamInterface $stream, ?string $f /** * @param array $headers * @param int|string $key - * - * @return mixed */ private function getHeader(array $headers, $key) { @@ -221,10 +208,6 @@ private function getHeader(array $headers, $key) * PHP's basename() does not properly support streams or filenames beginning with a non-US-ASCII character. * * @author Drupal 8.2 - * - * @param string $path - * - * @return string */ private static function basename(string $path): string { diff --git a/src/Viserio/Component/Http/Stream/NoSeekStream.php b/src/Viserio/Component/Http/Stream/NoSeekStream.php index 3bc300282..6d5afc60f 100644 --- a/src/Viserio/Component/Http/Stream/NoSeekStream.php +++ b/src/Viserio/Component/Http/Stream/NoSeekStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; diff --git a/src/Viserio/Component/Http/Stream/PhpInputStream.php b/src/Viserio/Component/Http/Stream/PhpInputStream.php index c0c3b31e8..250725f67 100644 --- a/src/Viserio/Component/Http/Stream/PhpInputStream.php +++ b/src/Viserio/Component/Http/Stream/PhpInputStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; diff --git a/src/Viserio/Component/Http/Stream/PumpStream.php b/src/Viserio/Component/Http/Stream/PumpStream.php index 1548d35ff..473a01382 100644 --- a/src/Viserio/Component/Http/Stream/PumpStream.php +++ b/src/Viserio/Component/Http/Stream/PumpStream.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Stream; @@ -224,11 +224,6 @@ public function getContents(): string return $result; } - /** - * @param int $length - * - * @return void - */ private function pump(int $length): void { if ($this->source !== null) { diff --git a/src/Viserio/Component/Http/Tests/AbstractMessageTest.php b/src/Viserio/Component/Http/Tests/AbstractMessageTest.php index 6ae067415..41b9d9156 100644 --- a/src/Viserio/Component/Http/Tests/AbstractMessageTest.php +++ b/src/Viserio/Component/Http/Tests/AbstractMessageTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -28,7 +28,9 @@ abstract class AbstractMessageTest extends MockeryTestCase /** @var \Psr\Http\Message\MessageInterface */ public $classToTest; - // Test methods for default/empty instances + /** + * Test methods for default/empty instances + */ public function testMessageImplementsInterface(): void { self::assertInstanceOf(MessageInterface::class, $this->classToTest); @@ -275,9 +277,9 @@ public static function provideValidHeaderCases(): iterable // Description => [header name, header value, getHeader(), getHeaderLine()], 'Basic: value' => ['Basic', 'value', ['value'], 'value'], 'array value' => ['Basic', ['value'], ['value'], 'value'], - 'two value' => ['Basic', ['value1', 'value2'], ['value1', 'value2'], 'value1,value2'], + 'two value' => ['Basic', ['value1', 'value2'], ['value1', 'value2'], 'value1, value2'], 'empty header value' => ['Bar', '', [''], ''], - 'array value with key' => ['foo', ['foo' => 'text/plain', 'bar' => 'application/json'], ['text/plain', 'application/json'], 'text/plain,application/json'], + 'array value with key' => ['foo', ['foo' => 'text/plain', 'bar' => 'application/json'], ['text/plain', 'application/json'], 'text/plain, application/json'], 'Header with int' => ['HTTP__1', 'test', ['test'], 'test'], 'Int header' => [1, 'test', ['test'], 'test'], ['key', 'allowed key', ['allowed key'], 'allowed key'], @@ -318,17 +320,24 @@ public function testWithBody(): void /** * @dataProvider provideContainsNotAllowedCharsOnHeaderFieldCases - * - * @param mixed $header */ public function testContainsNotAllowedCharsOnHeaderField($header): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage(\sprintf('[%s] is not a valid HTTP header field name.', $header)); - $request = $this->classToTest; + $message = $this->classToTest; + + $message->withHeader($header, 'value'); + } + + public function testWithAddedHeaderArrayValueAndKeys(): void + { + $message = $this->classToTest->withAddedHeader('list', ['foo' => 'one']); + $message = $message->withAddedHeader('list', ['foo' => 'two', 'bar' => 'three']); - $request->withHeader($header, 'value'); + $headerLine = $message->getHeaderLine('list'); + self::assertSame('one, two, three', $headerLine); } public static function provideContainsNotAllowedCharsOnHeaderFieldCases(): iterable @@ -347,11 +356,6 @@ protected function assertValidHeaderValue($values): void self::assertContainsOnly('string', $values, true, 'MUST be an array of strings'); } - /** - * @param object $messageClone - * @param object $message - * @param object $newMessage - */ protected function assertImmutable(object $messageClone, object $message, object $newMessage): void { self::assertEquals($messageClone, $message, 'Original message must be immutable'); diff --git a/src/Viserio/Component/Http/Tests/Constraint/HttpProtocolVersion.php b/src/Viserio/Component/Http/Tests/Constraint/HttpProtocolVersion.php index be4981fad..572d1a5b8 100644 --- a/src/Viserio/Component/Http/Tests/Constraint/HttpProtocolVersion.php +++ b/src/Viserio/Component/Http/Tests/Constraint/HttpProtocolVersion.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Constraint; diff --git a/src/Viserio/Component/Http/Tests/Constraint/Immutable.php b/src/Viserio/Component/Http/Tests/Constraint/Immutable.php index b919c4785..b33c67767 100644 --- a/src/Viserio/Component/Http/Tests/Constraint/Immutable.php +++ b/src/Viserio/Component/Http/Tests/Constraint/Immutable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Constraint; @@ -21,9 +21,6 @@ class Immutable extends PHPUnitConstraint /** @var object */ private $new; - /** - * @param object $new - */ public function __construct(object $new) { $this->new = $new; @@ -32,8 +29,6 @@ public function __construct(object $new) /** * Asserts two objects are the same type but not the same instance. * - * @param object $original - * @param object $new * @param string $message */ public static function assertImmutable(object $original, object $new, $message = ''): void diff --git a/src/Viserio/Component/Http/Tests/File/FileTest.php b/src/Viserio/Component/Http/Tests/File/FileTest.php index 8f1a61c6d..a7fa1bf47 100644 --- a/src/Viserio/Component/Http/Tests/File/FileTest.php +++ b/src/Viserio/Component/Http/Tests/File/FileTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\File; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class FileTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Fixture/ExtendedUriTest.php b/src/Viserio/Component/Http/Tests/Fixture/ExtendedUriTest.php index 1e3eee27b..5e595e4fb 100644 --- a/src/Viserio/Component/Http/Tests/Fixture/ExtendedUriTest.php +++ b/src/Viserio/Component/Http/Tests/Fixture/ExtendedUriTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Fixture; @@ -19,6 +19,7 @@ * @internal * * @small + * @coversNothing */ final class ExtendedUriTest extends Uri { diff --git a/src/Viserio/Component/Http/Tests/Fixture/HasToString.php b/src/Viserio/Component/Http/Tests/Fixture/HasToString.php index 929f12171..eda51755f 100644 --- a/src/Viserio/Component/Http/Tests/Fixture/HasToString.php +++ b/src/Viserio/Component/Http/Tests/Fixture/HasToString.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Fixture; diff --git a/src/Viserio/Component/Http/Tests/HeaderSecurityTest.php b/src/Viserio/Component/Http/Tests/HeaderSecurityTest.php index 57a3242e1..7d6cf3b9f 100644 --- a/src/Viserio/Component/Http/Tests/HeaderSecurityTest.php +++ b/src/Viserio/Component/Http/Tests/HeaderSecurityTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class HeaderSecurityTest extends TestCase { @@ -64,9 +65,6 @@ public static function provideFiltersValuesPerRfc7230Cases(): iterable /** * @dataProvider provideFiltersValuesPerRfc7230Cases - * - * @param string $value - * @param string $expected */ public function testFiltersValuesPerRfc7230(string $value, string $expected): void { @@ -109,9 +107,6 @@ public static function provideValidatesValuesPerRfc7230Cases(): iterable /** * @dataProvider provideValidatesValuesPerRfc7230Cases - * - * @param string $value - * @param bool $assertion */ public function testValidatesValuesPerRfc7230(string $value, bool $assertion): void { @@ -146,8 +141,6 @@ public static function provideAssertValidRaisesExceptionForInvalidValueCases(): /** * @dataProvider provideAssertValidRaisesExceptionForInvalidValueCases - * - * @param string $value */ public function testAssertValidRaisesExceptionForInvalidValue(string $value): void { diff --git a/src/Viserio/Component/Http/Tests/RequestIntegrationTest.php b/src/Viserio/Component/Http/Tests/RequestIntegrationTest.php index 03efec366..9ebfb1d68 100644 --- a/src/Viserio/Component/Http/Tests/RequestIntegrationTest.php +++ b/src/Viserio/Component/Http/Tests/RequestIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class RequestIntegrationTest extends Psr7TestRequestIntegrationTest { diff --git a/src/Viserio/Component/Http/Tests/RequestTest.php b/src/Viserio/Component/Http/Tests/RequestTest.php index 9bf626162..91ce3bc2d 100644 --- a/src/Viserio/Component/Http/Tests/RequestTest.php +++ b/src/Viserio/Component/Http/Tests/RequestTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -29,6 +29,7 @@ * @small * * @property \Psr\Http\Message\RequestInterface $classToTest + * @coversNothing */ final class RequestTest extends AbstractMessageTest { @@ -405,8 +406,6 @@ public function testWithNotValidMethodRequest(): void /** * @dataProvider provideAllowsCustomRequestMethodsThatFollowSpecCases - * - * @param mixed $method */ public function testAllowsCustomRequestMethodsThatFollowSpec($method): void { @@ -557,7 +556,7 @@ public function testCanGetHeaderAsCsv(): void 'Foo' => ['a', 'b', 'c'], ]); - self::assertEquals('a,b,c', $request->getHeaderLine('Foo')); + self::assertEquals('a, b, c', $request->getHeaderLine('Foo')); self::assertEquals('', $request->getHeaderLine('Bar')); } @@ -647,9 +646,6 @@ public function testAddsPortToHeaderAndReplacePreviousPort(): void self::assertEquals('foo.com:8125', $request->getHeaderLine('host')); } - /** - * @return \Psr\Http\Message\RequestInterface - */ private function getEmptyHostHeader(): RequestInterface { /** @var \Mockery\MockInterface|\Psr\Http\Message\UriInterface $emptyHostHeaderUriMock */ diff --git a/src/Viserio/Component/Http/Tests/Response/BinaryFileResponseTest.php b/src/Viserio/Component/Http/Tests/Response/BinaryFileResponseTest.php index 638b3f179..f15e7660c 100644 --- a/src/Viserio/Component/Http/Tests/Response/BinaryFileResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/BinaryFileResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class BinaryFileResponseTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Response/DownloadResponseTest.php b/src/Viserio/Component/Http/Tests/Response/DownloadResponseTest.php index 316a6c39f..72b191739 100644 --- a/src/Viserio/Component/Http/Tests/Response/DownloadResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/DownloadResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class DownloadResponseTest extends MockeryTestCase { @@ -77,9 +78,6 @@ public function testConstructorAllowsSendingDownloadResponse(): void /** * @dataProvider provideConstructorDoesNotAllowsOverridingDownloadHeadersWhenSendingDownloadResponseCases - * - * @param mixed $header - * @param mixed $value */ public function testConstructorDoesNotAllowsOverridingDownloadHeadersWhenSendingDownloadResponse( $header, @@ -145,8 +143,6 @@ public function provideRaisesExceptionForNonStringNonStreamBodyContentCases(): i /** * @dataProvider provideRaisesExceptionForNonStringNonStreamBodyContentCases - * - * @param mixed $body */ public function testRaisesExceptionForNonStringNonStreamBodyContent($body): void { diff --git a/src/Viserio/Component/Http/Tests/Response/EmptyResponseTest.php b/src/Viserio/Component/Http/Tests/Response/EmptyResponseTest.php index 6fe83e233..375cfc2c5 100644 --- a/src/Viserio/Component/Http/Tests/Response/EmptyResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/EmptyResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class EmptyResponseTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Response/HtmlResponseTest.php b/src/Viserio/Component/Http/Tests/Response/HtmlResponseTest.php index ebc7b2780..c55d5764d 100644 --- a/src/Viserio/Component/Http/Tests/Response/HtmlResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/HtmlResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class HtmlResponseTest extends MockeryTestCase { @@ -80,8 +81,6 @@ public function testAllowsStreamsForResponseBody(): void /** * @dataProvider provideRaisesExceptionForNonStringNonStreamBodyContentCases - * - * @param mixed $body */ public function testRaisesExceptionForNonStringNonStreamBodyContent($body): void { diff --git a/src/Viserio/Component/Http/Tests/Response/JsonResponseTest.php b/src/Viserio/Component/Http/Tests/Response/JsonResponseTest.php index 4e38a7fb3..801dcfb81 100644 --- a/src/Viserio/Component/Http/Tests/Response/JsonResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/JsonResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class JsonResponseTest extends TestCase { @@ -55,8 +56,6 @@ public function provideScalarValuePassedToConstructorJsonEncodesDirectlyCases(): /** * @dataProvider provideScalarValuePassedToConstructorJsonEncodesDirectlyCases - * - * @param mixed $value */ public function testScalarValuePassedToConstructorJsonEncodesDirectly($value): void { @@ -122,9 +121,6 @@ public static function provideUsesSaneDefaultJsonEncodingFlagsCases(): iterable /** * @dataProvider provideUsesSaneDefaultJsonEncodingFlagsCases - * - * @param mixed $value - * @param mixed $key */ public function testUsesSaneDefaultJsonEncodingFlags($value, $key): void { diff --git a/src/Viserio/Component/Http/Tests/Response/RedirectResponseTest.php b/src/Viserio/Component/Http/Tests/Response/RedirectResponseTest.php index b6038b823..32eca6eea 100644 --- a/src/Viserio/Component/Http/Tests/Response/RedirectResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/RedirectResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class RedirectResponseTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Response/TextResponseTest.php b/src/Viserio/Component/Http/Tests/Response/TextResponseTest.php index f161930fe..4c9c66f39 100644 --- a/src/Viserio/Component/Http/Tests/Response/TextResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/TextResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class TextResponseTest extends MockeryTestCase { @@ -84,8 +85,6 @@ public function testAllowsStreamsForResponseBody(): void /** * @dataProvider provideRaisesExceptionForNonStringNonStreamBodyContentCases - * - * @param mixed $body */ public function testRaisesExceptionForNonStringNonStreamBodyContent($body): void { diff --git a/src/Viserio/Component/Http/Tests/Response/Traits/StreamBodyContentCasesTrait.php b/src/Viserio/Component/Http/Tests/Response/Traits/StreamBodyContentCasesTrait.php index fb003d5e7..0183ec749 100644 --- a/src/Viserio/Component/Http/Tests/Response/Traits/StreamBodyContentCasesTrait.php +++ b/src/Viserio/Component/Http/Tests/Response/Traits/StreamBodyContentCasesTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response\Traits; diff --git a/src/Viserio/Component/Http/Tests/Response/XmlResponseTest.php b/src/Viserio/Component/Http/Tests/Response/XmlResponseTest.php index 6ec38671e..e2e9f2b70 100644 --- a/src/Viserio/Component/Http/Tests/Response/XmlResponseTest.php +++ b/src/Viserio/Component/Http/Tests/Response/XmlResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Response; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class XmlResponseTest extends MockeryTestCase { @@ -91,8 +92,6 @@ public function testAllowsStreamsForResponseBody(): void /** * @dataProvider provideRaisesExceptionForNonStringNonStreamBodyContentCases - * - * @param mixed $body */ public function testRaisesExceptionForNonStringNonStreamBodyContent($body): void { diff --git a/src/Viserio/Component/Http/Tests/ResponseIntegrationTest.php b/src/Viserio/Component/Http/Tests/ResponseIntegrationTest.php index be3c38441..3bc1a9058 100644 --- a/src/Viserio/Component/Http/Tests/ResponseIntegrationTest.php +++ b/src/Viserio/Component/Http/Tests/ResponseIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class ResponseIntegrationTest extends Psr7TestResponseIntegrationTest { diff --git a/src/Viserio/Component/Http/Tests/ResponseTest.php b/src/Viserio/Component/Http/Tests/ResponseTest.php index c9f569ecb..e9e38cf4e 100644 --- a/src/Viserio/Component/Http/Tests/ResponseTest.php +++ b/src/Viserio/Component/Http/Tests/ResponseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -26,6 +26,7 @@ * @small * * @property \Psr\Http\Message\ResponseInterface $classToTest + * @coversNothing */ final class ResponseTest extends AbstractMessageTest { @@ -70,8 +71,6 @@ public function testValidDefaultReasonPhrase(): void /** * @dataProvider invalidStatusCodeRangeProvider - * - * @param mixed $invalidValues */ public function testConstructResponseWithInvalidRangeStatusCode($invalidValues): void { @@ -83,8 +82,6 @@ public function testConstructResponseWithInvalidRangeStatusCode($invalidValues): /** * @dataProvider invalidStatusCodeRangeProvider - * - * @param mixed $invalidValues */ public function testResponseChangeStatusCodeWithWithInvalidRange($invalidValues): void { @@ -107,7 +104,9 @@ public static function invalidStatusCodeRangeProvider(): iterable ]; } - // Test methods for change instances status + /** + * Test methods for change instances status + */ public function testValidWithStatusDefaultReasonPhrase(): void { $message = $this->classToTest; @@ -209,7 +208,7 @@ public function testCanConstructWithHeadersAsArray(): void ]); self::assertSame(['Foo' => ['baz', 'bar']], $response->getHeaders()); - self::assertSame('baz,bar', $response->getHeaderLine('Foo')); + self::assertSame('baz, bar', $response->getHeaderLine('Foo')); self::assertSame(['baz', 'bar'], $response->getHeader('Foo')); } @@ -315,7 +314,7 @@ public function testWithHeaderAsArray(): void self::assertSame(['Foo' => ['Bar']], $response->getHeaders()); self::assertSame(['Foo' => ['Bar'], 'baZ' => ['Bam', 'Bar']], $response2->getHeaders()); - self::assertSame('Bam,Bar', $response2->getHeaderLine('baz')); + self::assertSame('Bam, Bar', $response2->getHeaderLine('baz')); self::assertSame(['Bam', 'Bar'], $response2->getHeader('baz')); } @@ -337,7 +336,7 @@ public function testWithAddedHeader(): void self::assertSame(['Foo' => ['Bar']], $response->getHeaders()); self::assertSame(['Foo' => ['Bar', 'Baz']], $response2->getHeaders()); - self::assertSame('Bar,Baz', $response2->getHeaderLine('foo')); + self::assertSame('Bar, Baz', $response2->getHeaderLine('foo')); self::assertSame(['Bar', 'Baz'], $response2->getHeader('foo')); } @@ -348,7 +347,7 @@ public function testWithAddedHeaderAsArray(): void self::assertSame(['Foo' => ['Bar']], $response->getHeaders()); self::assertSame(['Foo' => ['Bar', 'Baz', 'Bam']], $response2->getHeaders()); - self::assertSame('Bar,Baz,Bam', $response2->getHeaderLine('foo')); + self::assertSame('Bar, Baz, Bam', $response2->getHeaderLine('foo')); self::assertSame(['Bar', 'Baz', 'Bam'], $response2->getHeader('foo')); } diff --git a/src/Viserio/Component/Http/Tests/ServerRequestBuilderTest.php b/src/Viserio/Component/Http/Tests/ServerRequestBuilderTest.php index a3afdec5f..c53365327 100644 --- a/src/Viserio/Component/Http/Tests/ServerRequestBuilderTest.php +++ b/src/Viserio/Component/Http/Tests/ServerRequestBuilderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class ServerRequestBuilderTest extends TestCase { @@ -83,9 +84,6 @@ protected function tearDown(): void $_SERVER = self::$globalServer; } - /** - * @return void - */ public static function initFiles(): void { if (\count(self::$filenames) !== 0) { @@ -148,9 +146,6 @@ public function provideGetUriFromGlobalsCases(): iterable /** * @dataProvider provideGetUriFromGlobalsCases - * - * @param mixed $expected - * @param mixed $serverParams */ public function testGetUriFromGlobals($expected, $serverParams): void { @@ -330,8 +325,6 @@ public static function provideCreateFromGlobalsCases(): iterable /** * @dataProvider provideCreateFromGlobalsCases - * - * @param mixed $server */ public function testCreateFromGlobals($server): void { diff --git a/src/Viserio/Component/Http/Tests/ServerRequestIntegrationTest.php b/src/Viserio/Component/Http/Tests/ServerRequestIntegrationTest.php index db5b7a9ed..87d5a02d2 100644 --- a/src/Viserio/Component/Http/Tests/ServerRequestIntegrationTest.php +++ b/src/Viserio/Component/Http/Tests/ServerRequestIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class ServerRequestIntegrationTest extends Psr7TestServerRequestIntegrationTest { diff --git a/src/Viserio/Component/Http/Tests/ServerRequestTest.php b/src/Viserio/Component/Http/Tests/ServerRequestTest.php index 7abe01bb8..9fb17d75e 100644 --- a/src/Viserio/Component/Http/Tests/ServerRequestTest.php +++ b/src/Viserio/Component/Http/Tests/ServerRequestTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ServerRequestTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Stream/AppendStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/AppendStreamTest.php index 1c43a5be6..51d301d12 100644 --- a/src/Viserio/Component/Http/Tests/Stream/AppendStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/AppendStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class AppendStreamTest extends MockeryTestCase { @@ -36,7 +37,7 @@ public function testValidatesStreamsAreReadable(): void $appendStream = new AppendStream(); /** @var resource $handler */ - $handler = \fopen('php://temp', 'w'); + $handler = \fopen('php://temp', 'wb'); /** @var \Mockery\MockInterface|\Psr\Http\Message\StreamInterface $streamMock */ $streamMock = Mockery::mock(new Stream($handler)); @@ -65,7 +66,7 @@ public function testTriesToRewindOnSeek(): void $a = new AppendStream(); /** @var resource $handler */ - $handler = \fopen('php://temp', 'w'); + $handler = \fopen('php://temp', 'wb'); /** @var \Mockery\MockInterface|\Psr\Http\Message\StreamInterface $streamMock */ $streamMock = Mockery::mock(new Stream($handler)); @@ -115,7 +116,7 @@ public function testDetachWithoutStreams(): void public function testDetachesEachStream(): void { /** @var resource $handle */ - $handle = \fopen('php://temp', 'r'); + $handle = \fopen('php://temp', 'rb'); $s1 = Util::createStreamFor($handle); $s2 = Util::createStreamFor('bar'); @@ -141,7 +142,7 @@ public function testDetachesEachStream(): void public function testClosesEachStream(): void { /** @var resource $handle */ - $handle = \fopen('php://temp', 'r'); + $handle = \fopen('php://temp', 'rb'); $s1 = Util::createStreamFor($handle); $s2 = Util::createStreamFor('bar'); @@ -209,7 +210,7 @@ public function testCanDetermineSizeFromMultipleStreams(): void self::assertEquals(6, $a->getSize()); /** @var resource $handle */ - $handle = \fopen('php://temp', 'r'); + $handle = \fopen('php://temp', 'rb'); /** @var \Mockery\MockInterface|\Psr\Http\Message\StreamInterface $streamMock */ $streamMock = Mockery::mock(new Stream($handle)); diff --git a/src/Viserio/Component/Http/Tests/Stream/BufferStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/BufferStreamTest.php index 39eb28788..e2c830f8b 100644 --- a/src/Viserio/Component/Http/Tests/Stream/BufferStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/BufferStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class BufferStreamTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Stream/CachingStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/CachingStreamTest.php index 9c42fdf06..2b57a5246 100644 --- a/src/Viserio/Component/Http/Tests/Stream/CachingStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/CachingStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class CachingStreamTest extends MockeryTestCase { @@ -142,7 +143,7 @@ public function testCanSeekToReadBytes(): void public function testCanSeekToReadBytesWithPartialBodyReturned(): void { /** @var resource $handler */ - $handler = \fopen('php://temp', 'r+'); + $handler = \fopen('php://temp', 'r+b'); \fwrite($handler, 'testing'); \fseek($handler, 0); @@ -221,7 +222,7 @@ public function testSkipsOverwrittenBytes(): void public function testClosesBothStreams(): void { /** @var resource $handler */ - $handler = \fopen('php://temp', 'r'); + $handler = \fopen('php://temp', 'rb'); $caching = new CachingStream(Util::createStreamFor($handler)); $caching->close(); diff --git a/src/Viserio/Component/Http/Tests/Stream/FnStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/FnStreamTest.php index 5922222b3..4be84d1b5 100644 --- a/src/Viserio/Component/Http/Tests/Stream/FnStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/FnStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class FnStreamTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Stream/LazyOpenStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/LazyOpenStreamTest.php index 112a9f7b2..9d0d879d8 100644 --- a/src/Viserio/Component/Http/Tests/Stream/LazyOpenStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/LazyOpenStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class LazyOpenStreamTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Stream/LimitStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/LimitStreamTest.php index a132e66db..42c0a7a0a 100644 --- a/src/Viserio/Component/Http/Tests/Stream/LimitStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/LimitStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class LimitStreamTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Stream/MultipartStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/MultipartStreamTest.php index 09673ffcc..a0d69bbb3 100644 --- a/src/Viserio/Component/Http/Tests/Stream/MultipartStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/MultipartStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MultipartStreamTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/Stream/NoSeekStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/NoSeekStreamTest.php index 72ad66bc9..1750802af 100644 --- a/src/Viserio/Component/Http/Tests/Stream/NoSeekStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/NoSeekStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class NoSeekStreamTest extends MockeryTestCase { @@ -33,7 +34,7 @@ public function testCannotSeek(): void $this->expectExceptionMessage('Cannot seek a NoSeekStream'); /** @var resource $handle */ - $handle = \fopen('php://temp', 'w'); + $handle = \fopen('php://temp', 'wb'); /** @var \Mockery\MockInterface|StreamInterface $streamMock */ $streamMock = Mockery::mock(new Stream($handle)); diff --git a/src/Viserio/Component/Http/Tests/Stream/PhpInputStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/PhpInputStreamTest.php index 686fff029..48c091ba3 100644 --- a/src/Viserio/Component/Http/Tests/Stream/PhpInputStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/PhpInputStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class PhpInputStreamTest extends TestCase { @@ -38,20 +39,11 @@ protected function setUp(): void $this->stream = new PhpInputStream($this->file); } - /** - * @return string - */ public function getFileContents(): string { return (string) \file_get_contents($this->file); } - /** - * @param string $test - * @param string $message - * - * @return void - */ public function assertStreamContents(string $test, string $message = ''): void { $content = $this->getFileContents(); diff --git a/src/Viserio/Component/Http/Tests/Stream/PumpStreamTest.php b/src/Viserio/Component/Http/Tests/Stream/PumpStreamTest.php index ec47ac23d..069deb290 100644 --- a/src/Viserio/Component/Http/Tests/Stream/PumpStreamTest.php +++ b/src/Viserio/Component/Http/Tests/Stream/PumpStreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests\Stream; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class PumpStreamTest extends TestCase { diff --git a/src/Viserio/Component/Http/Tests/StreamIntegrationTest.php b/src/Viserio/Component/Http/Tests/StreamIntegrationTest.php index 78d59e2a6..3be62ec2c 100644 --- a/src/Viserio/Component/Http/Tests/StreamIntegrationTest.php +++ b/src/Viserio/Component/Http/Tests/StreamIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class StreamIntegrationTest extends Psr7TestStreamIntegrationTest { diff --git a/src/Viserio/Component/Http/Tests/StreamTest.php b/src/Viserio/Component/Http/Tests/StreamTest.php index 7653cbd97..387180d63 100644 --- a/src/Viserio/Component/Http/Tests/StreamTest.php +++ b/src/Viserio/Component/Http/Tests/StreamTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class StreamTest extends MockeryTestCase { @@ -339,13 +340,7 @@ public function testCanReadContentFromNotSeekableResource(): void /** * @dataProvider provideForReadableStreamsCases * - * @param string $mode - * @param string $func - * @param bool $createFile - * * @throws \Exception - * - * @return void */ public function testForReadableStreams(string $mode, string $func, bool $createFile = false): void { @@ -451,13 +446,7 @@ public static function provideForReadableStreamsCases(): iterable /** * @dataProvider provideForWritableStreamsCases * - * @param string $mode - * @param string $func - * @param bool $createFile - * * @throws \Exception - * - * @return void */ public function testForWritableStreams(string $mode, string $func, bool $createFile = false): void { @@ -572,7 +561,7 @@ public function testIsPipe(): void self::assertFalse(NSA::invokeMethod($stream, 'isPipe')); /** @var resource $handler */ - $handler = \fopen(__FILE__, 'r'); + $handler = \fopen(__FILE__, 'rb'); $fileStream = new Stream($handler); @@ -682,9 +671,6 @@ public function testConvertsToStringNonSeekablePartiallyReadStream(): void self::assertSame('ar', \trim((string) $stream)); } - /** - * @param Stream $stream - */ private static function assertStreamStateAfterClosedOrDetached(Stream $stream): void { self::assertFalse($stream->isReadable()); @@ -746,7 +732,6 @@ private static function assertStreamStateAfterClosedOrDetached(Stream $stream): /** * @param resource $handle - * @param int $length * * @return false|string */ diff --git a/src/Viserio/Component/Http/Tests/UploadedFileIntegrationTest.php b/src/Viserio/Component/Http/Tests/UploadedFileIntegrationTest.php index ecf5b87a8..884e157ab 100644 --- a/src/Viserio/Component/Http/Tests/UploadedFileIntegrationTest.php +++ b/src/Viserio/Component/Http/Tests/UploadedFileIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class UploadedFileIntegrationTest extends Psr7TestUploadedFileIntegrationTest { diff --git a/src/Viserio/Component/Http/Tests/UploadedFileTest.php b/src/Viserio/Component/Http/Tests/UploadedFileTest.php index 1f3391e4d..1af34a52e 100644 --- a/src/Viserio/Component/Http/Tests/UploadedFileTest.php +++ b/src/Viserio/Component/Http/Tests/UploadedFileTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class UploadedFileTest extends TestCase { @@ -70,8 +71,6 @@ public static function provideRaisesExceptionOnInvalidStreamOrFileCases(): itera /** * @dataProvider provideRaisesExceptionOnInvalidStreamOrFileCases - * - * @param mixed $streamOrFile */ public function testRaisesExceptionOnInvalidStreamOrFile($streamOrFile): void { @@ -178,8 +177,6 @@ public static function provideMoveRaisesExceptionForInvalidPathCases(): iterable /** * @dataProvider provideMoveRaisesExceptionForInvalidPathCases - * - * @param mixed $path */ public function testMoveRaisesExceptionForInvalidPath($path): void { @@ -276,8 +273,6 @@ public static function nonOkErrorStatus(): iterable /** * @dataProvider nonOkErrorStatus - * - * @param mixed $status */ public function testConstructorDoesNotRaiseExceptionForInvalidStreamWhenErrorStatusPresent($status): void { @@ -288,8 +283,6 @@ public function testConstructorDoesNotRaiseExceptionForInvalidStreamWhenErrorSta /** * @dataProvider nonOkErrorStatus - * - * @param mixed $status */ public function testMoveToRaisesExceptionWhenErrorStatusPresent($status): void { @@ -303,8 +296,6 @@ public function testMoveToRaisesExceptionWhenErrorStatusPresent($status): void /** * @dataProvider nonOkErrorStatus - * - * @param mixed $status */ public function testGetStreamRaisesExceptionWhenErrorStatusPresent($status): void { diff --git a/src/Viserio/Component/Http/Tests/UriIntegrationTest.php b/src/Viserio/Component/Http/Tests/UriIntegrationTest.php index 84c42a85e..68d3616cd 100644 --- a/src/Viserio/Component/Http/Tests/UriIntegrationTest.php +++ b/src/Viserio/Component/Http/Tests/UriIntegrationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class UriIntegrationTest extends Psr7TestUriIntegrationTest { diff --git a/src/Viserio/Component/Http/Tests/UtilTest.php b/src/Viserio/Component/Http/Tests/UtilTest.php index 9a50c2457..057407ae7 100644 --- a/src/Viserio/Component/Http/Tests/UtilTest.php +++ b/src/Viserio/Component/Http/Tests/UtilTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http\Tests; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class UtilTest extends TestCase { @@ -138,7 +139,6 @@ public function testMarshalsVariablesPrefixedByApacheFromServerArray(): void /** * @dataProvider provideGetAllHeadersCases * - * @param string $testType * @param array $expected * @param array $server */ @@ -726,9 +726,6 @@ public static function provideNormalizeFilesCases(): iterable /** * @dataProvider provideNormalizeFilesCases - * - * @param mixed $files - * @param mixed $expected */ public function testNormalizeFiles($files, $expected): void { @@ -889,7 +886,7 @@ public function testNumericFirstIndexedFiles(): void public function testKeepsPositionOfResource(): void { /** @var resource $handler */ - $handler = \fopen(__FILE__, 'r'); + $handler = \fopen(__FILE__, 'rb'); \fseek($handler, 10); @@ -922,7 +919,7 @@ public function testFactoryCreatesFromNull(): void public function testFactoryCreatesFromResource(): void { - $resource = \fopen(__FILE__, 'r'); + $resource = \fopen(__FILE__, 'rb'); $stream = Util::createStreamFor($resource); self::assertInstanceOf(Stream::class, $stream); diff --git a/src/Viserio/Component/Http/UploadedFile.php b/src/Viserio/Component/Http/UploadedFile.php index 78aa44944..37b0f8741 100644 --- a/src/Viserio/Component/Http/UploadedFile.php +++ b/src/Viserio/Component/Http/UploadedFile.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -41,50 +41,36 @@ class UploadedFile implements UploadedFileInterface * The client-provided full path to the file. * * @note this is public to maintain BC with 3.1.0 and earlier. - * - * @var null|string */ public ?string $file; /** * The client-provided file name. - * - * @var string */ protected string $name; /** * The client-provided media type of the file. - * - * @var string */ protected string $type; /** * The size of the file in bytes. - * - * @var int */ protected int $size; /** * A valid PHP UPLOAD_ERR_xxx code for the file upload. - * - * @var int */ protected int $error; /** * An optional StreamInterface wrapping the file resource. - * - * @var null|\Psr\Http\Message\StreamInterface */ protected ?StreamInterface $stream; /** * Indicates if the uploaded file has already been moved. - * - * @var bool */ protected bool $moved = false; @@ -112,10 +98,6 @@ class UploadedFile implements UploadedFileInterface * Create a new uploaded file instance. * * @param \Psr\Http\Message\StreamInterface|resource|string $streamOrFile - * @param int $size - * @param int $errorStatus - * @param null|string $clientFilename - * @param null|string $clientMediaType * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException */ @@ -248,11 +230,7 @@ public function moveTo($targetPath): void /** * Check if error is a int or a array, then set it. * - * @param int $error - * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException - * - * @return void */ private function setError(int $error): void { @@ -266,11 +244,7 @@ private function setError(int $error): void /** * Set the fill the right variable. * - * @param mixed $streamOrFile - * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException - * - * @return void */ private function setStreamOrFile($streamOrFile): void { @@ -297,10 +271,6 @@ private function setStreamOrFile($streamOrFile): void /** * Check if is a string or is empty. - * - * @param mixed $param - * - * @return bool */ private function isStringNotEmpty($param): bool { @@ -309,8 +279,6 @@ private function isStringNotEmpty($param): bool /** * Return true if there is no upload error. - * - * @return bool */ private function isOk(): bool { @@ -321,8 +289,6 @@ private function isOk(): bool * Validate retrieve stream. * * @throws \Viserio\Contract\Http\Exception\RuntimeException if is moved or not ok - * - * @return void */ private function validateActive(): void { diff --git a/src/Viserio/Component/Http/Uri.php b/src/Viserio/Component/Http/Uri.php index b78c32112..ac0693256 100644 --- a/src/Viserio/Component/Http/Uri.php +++ b/src/Viserio/Component/Http/Uri.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; diff --git a/src/Viserio/Component/Http/Util.php b/src/Viserio/Component/Http/Util.php index 0bb291f23..921b6ae55 100644 --- a/src/Viserio/Component/Http/Util.php +++ b/src/Viserio/Component/Http/Util.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Http; @@ -164,8 +164,6 @@ public static function tryFopen(string $filename, string $mode) * @param array $options Additional options * * @throws \Viserio\Contract\Http\Exception\InvalidArgumentException if the $resource arg is not valid - * - * @return \Psr\Http\Message\StreamInterface */ public static function createStreamFor($resource = '', array $options = []): StreamInterface { @@ -229,8 +227,6 @@ public static function createStreamFor($resource = '', array $options = []): Str * to read the entire stream. * * @throws \RuntimeException - * - * @return string */ public static function copyToString(StreamInterface $stream, int $maxLen = -1): string { @@ -322,8 +318,6 @@ public static function copyToStream(StreamInterface $source, StreamInterface $de * * @param \Psr\Http\Message\StreamInterface $stream Stream to read from * @param int $maxLength Maximum buffer length - * - * @return string */ public static function readline(StreamInterface $stream, ?int $maxLength = null): string { diff --git a/src/Viserio/Component/Http/composer.json b/src/Viserio/Component/Http/composer.json index 2c57b5f56..607bbb125 100644 --- a/src/Viserio/Component/Http/composer.json +++ b/src/Viserio/Component/Http/composer.json @@ -49,12 +49,11 @@ "require-dev": { "ext-zlib": "*", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "nyholm/nsa": "^1.1.0", "php-http/psr7-integration-tests": "^1.0", - "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0" + "phpunit/phpunit": "8.2.*" }, "extra": { "branch-alias": { diff --git a/src/Viserio/Component/Http/phpstan.neon b/src/Viserio/Component/Http/phpstan.neon index f7a630b53..9385007da 100644 --- a/src/Viserio/Component/Http/phpstan.neon +++ b/src/Viserio/Component/Http/phpstan.neon @@ -1,41 +1,9 @@ includes: - - vendor/phpstan/phpstan-deprecation-rules/rules.neon - - vendor/phpstan/phpstan-mockery/extension.neon - - vendor/phpstan/phpstan-phpunit/extension.neon - - vendor/phpstan/phpstan-phpunit/rules.neon - - vendor/phpstan/phpstan-strict-rules/rules.neon - - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - vendor/phpstan/phpstan/conf/bleedingEdge.neon - -services: - - - class: SlamPhpStan\ClassNotationRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\GotoRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\PhpUnitFqcnAnnotationRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\StringToClassRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\UnusedVariableRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\MissingClosureParameterTypehintRule - tags: - - phpstan.rules.rule + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true + # waiting for phpsan to check traits and implemented interfaces + checkMissingIterableValueType: false paths: - ./ @@ -43,10 +11,8 @@ parameters: - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ - # waiting for phpsan to check traits and implemented interfaces - checkMissingIterableValueType: false + - vendor + - Tests/Fixture ignoreErrors: - '#Access to an undefined property Viserio\\Component\\Http\\Stream\\AbstractStreamDecorator::\$stream#' diff --git a/src/Viserio/Component/Http/phpunit.xml b/src/Viserio/Component/Http/phpunit.xml new file mode 100644 index 000000000..be4df51a8 --- /dev/null +++ b/src/Viserio/Component/Http/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Http/phpunit.xml.dist b/src/Viserio/Component/Http/phpunit.xml.dist deleted file mode 100644 index 70fad4d7a..000000000 --- a/src/Viserio/Component/Http/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/HttpFactory/.gitignore b/src/Viserio/Component/HttpFactory/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/HttpFactory/.gitignore +++ b/src/Viserio/Component/HttpFactory/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/HttpFactory/Container/Provider/HttpFactoryServiceProvider.php b/src/Viserio/Component/HttpFactory/Container/Provider/HttpFactoryServiceProvider.php index 8b59f9e26..f3333d2ac 100644 --- a/src/Viserio/Component/HttpFactory/Container/Provider/HttpFactoryServiceProvider.php +++ b/src/Viserio/Component/HttpFactory/Container/Provider/HttpFactoryServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Container\Provider; diff --git a/src/Viserio/Component/HttpFactory/RequestFactory.php b/src/Viserio/Component/HttpFactory/RequestFactory.php index 672864a76..aa2aed8ae 100644 --- a/src/Viserio/Component/HttpFactory/RequestFactory.php +++ b/src/Viserio/Component/HttpFactory/RequestFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory; diff --git a/src/Viserio/Component/HttpFactory/ResponseFactory.php b/src/Viserio/Component/HttpFactory/ResponseFactory.php index c741ccbb7..ac699bf2b 100644 --- a/src/Viserio/Component/HttpFactory/ResponseFactory.php +++ b/src/Viserio/Component/HttpFactory/ResponseFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory; diff --git a/src/Viserio/Component/HttpFactory/ServerRequestFactory.php b/src/Viserio/Component/HttpFactory/ServerRequestFactory.php index bc3d4de3e..e3ee17a02 100644 --- a/src/Viserio/Component/HttpFactory/ServerRequestFactory.php +++ b/src/Viserio/Component/HttpFactory/ServerRequestFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory; diff --git a/src/Viserio/Component/HttpFactory/StreamFactory.php b/src/Viserio/Component/HttpFactory/StreamFactory.php index 3962b4414..c34a2b4ee 100644 --- a/src/Viserio/Component/HttpFactory/StreamFactory.php +++ b/src/Viserio/Component/HttpFactory/StreamFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory; diff --git a/src/Viserio/Component/HttpFactory/Tests/Container/Provider/HttpFactoryServiceProviderTest.php b/src/Viserio/Component/HttpFactory/Tests/Container/Provider/HttpFactoryServiceProviderTest.php index 6b994dd7d..bd5d45f63 100644 --- a/src/Viserio/Component/HttpFactory/Tests/Container/Provider/HttpFactoryServiceProviderTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/Container/Provider/HttpFactoryServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests\Container\Provider; @@ -33,6 +33,7 @@ * @internal * * @small + * @coversNothing */ final class HttpFactoryServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/HttpFactory/Tests/RequestFactoryTest.php b/src/Viserio/Component/HttpFactory/Tests/RequestFactoryTest.php index 7e71c03f7..1a2d8c998 100644 --- a/src/Viserio/Component/HttpFactory/Tests/RequestFactoryTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/RequestFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class RequestFactoryTest extends TestCase { @@ -52,8 +53,6 @@ public static function provideCreateRequestCases(): iterable /** * @dataProvider provideCreateRequestCases - * - * @param mixed $method */ public function testCreateRequest($method): void { diff --git a/src/Viserio/Component/HttpFactory/Tests/ResponseFactoryTest.php b/src/Viserio/Component/HttpFactory/Tests/ResponseFactoryTest.php index c81676087..cb15ad1b3 100644 --- a/src/Viserio/Component/HttpFactory/Tests/ResponseFactoryTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/ResponseFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests; @@ -46,8 +46,6 @@ public static function provideCreateResponseCases(): iterable /** * @dataProvider provideCreateResponseCases - * - * @param mixed $code */ public function testCreateResponse($code): void { diff --git a/src/Viserio/Component/HttpFactory/Tests/ServerRequestFactoryTest.php b/src/Viserio/Component/HttpFactory/Tests/ServerRequestFactoryTest.php index 6f121940a..08613fa22 100644 --- a/src/Viserio/Component/HttpFactory/Tests/ServerRequestFactoryTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/ServerRequestFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class ServerRequestFactoryTest extends TestCase { @@ -75,9 +76,6 @@ protected function tearDown(): void $_COOKIE = self::$globalCookie; } - /** - * @return array - */ public function dataMethods(): array { return [ @@ -110,8 +108,6 @@ public function dataServer(): iterable /** * @dataProvider dataServer - * - * @param mixed $server */ public function testCreateServerRequest($server): void { @@ -125,8 +121,6 @@ public function testCreateServerRequest($server): void /** * @dataProvider dataServer - * - * @param array $server */ public function testCreateServerRequestFromArray(array $server): void { @@ -140,8 +134,6 @@ public function testCreateServerRequestFromArray(array $server): void /** * @dataProvider dataServer - * - * @param mixed $server */ public function testCreateServerRequestWithUriObject($server): void { diff --git a/src/Viserio/Component/HttpFactory/Tests/StreamFactoryTest.php b/src/Viserio/Component/HttpFactory/Tests/StreamFactoryTest.php index 2bfd06f19..37f4f24e2 100644 --- a/src/Viserio/Component/HttpFactory/Tests/StreamFactoryTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/StreamFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class StreamFactoryTest extends TestCase { @@ -49,7 +50,7 @@ public function testCreateStreamFromFileCursorPosition(): void \file_put_contents($filename, $string); - $resource = \fopen($filename, 'r'); + $resource = \fopen($filename, 'rb'); $fopenTell = \ftell($resource); fclose($resource); @@ -196,10 +197,6 @@ public function testCreateStreamFromResource(): void $this->assertStream($stream, $string); } - /** - * @param \Psr\Http\Message\StreamInterface $stream - * @param string $content - */ protected function assertStream(StreamInterface $stream, string $content): void { self::assertInstanceOf(StreamInterface::class, $stream); diff --git a/src/Viserio/Component/HttpFactory/Tests/Traits/StreamHelperTrait.php b/src/Viserio/Component/HttpFactory/Tests/Traits/StreamHelperTrait.php index 35e4f6e44..769958a6f 100644 --- a/src/Viserio/Component/HttpFactory/Tests/Traits/StreamHelperTrait.php +++ b/src/Viserio/Component/HttpFactory/Tests/Traits/StreamHelperTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests\Traits; @@ -39,14 +39,12 @@ protected function createTemporaryFile() } /** - * @param mixed $content - * * @return bool|resource */ protected function createTemporaryResource($content = null) { $file = $this->createTemporaryFile(); - $resource = \fopen($file, 'r+'); + $resource = \fopen($file, 'r+b'); if ($content !== null) { \fwrite($resource, $content); diff --git a/src/Viserio/Component/HttpFactory/Tests/UploadedFileFactoryTest.php b/src/Viserio/Component/HttpFactory/Tests/UploadedFileFactoryTest.php index af6c1bd1e..0e34d4b77 100644 --- a/src/Viserio/Component/HttpFactory/Tests/UploadedFileFactoryTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/UploadedFileFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class UploadedFileFactoryTest extends TestCase { @@ -64,11 +65,6 @@ public function testCreateUploadedFileWithError(): void self::assertSame($error, $file->getError()); } - /** - * @param mixed $content - * - * @return \Psr\Http\Message\StreamInterface - */ protected function createStream($content): StreamInterface { return (new StreamFactory())->createStream($content); diff --git a/src/Viserio/Component/HttpFactory/Tests/UriFactoryTest.php b/src/Viserio/Component/HttpFactory/Tests/UriFactoryTest.php index 09d067f26..4be489d3f 100644 --- a/src/Viserio/Component/HttpFactory/Tests/UriFactoryTest.php +++ b/src/Viserio/Component/HttpFactory/Tests/UriFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class UriFactoryTest extends TestCase { diff --git a/src/Viserio/Component/HttpFactory/UploadedFileFactory.php b/src/Viserio/Component/HttpFactory/UploadedFileFactory.php index d1edf8828..f6e7e2125 100644 --- a/src/Viserio/Component/HttpFactory/UploadedFileFactory.php +++ b/src/Viserio/Component/HttpFactory/UploadedFileFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory; diff --git a/src/Viserio/Component/HttpFactory/UriFactory.php b/src/Viserio/Component/HttpFactory/UriFactory.php index 12a0fbccc..899638055 100644 --- a/src/Viserio/Component/HttpFactory/UriFactory.php +++ b/src/Viserio/Component/HttpFactory/UriFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFactory; diff --git a/src/Viserio/Component/HttpFactory/composer.json b/src/Viserio/Component/HttpFactory/composer.json index 4506dea0b..f7bb32bfb 100644 --- a/src/Viserio/Component/HttpFactory/composer.json +++ b/src/Viserio/Component/HttpFactory/composer.json @@ -33,6 +33,7 @@ "psr/http-message-implementation": "^1.0" }, "require-dev": { + "narrowspark/coding-standard": "^4.0.0", "phpunit/phpunit": "8.2.*", "viserio/container": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" diff --git a/src/Viserio/Component/HttpFactory/phpstan.neon b/src/Viserio/Component/HttpFactory/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/HttpFactory/phpstan.neon +++ b/src/Viserio/Component/HttpFactory/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/HttpFactory/phpunit.xml b/src/Viserio/Component/HttpFactory/phpunit.xml new file mode 100644 index 000000000..0649817c2 --- /dev/null +++ b/src/Viserio/Component/HttpFactory/phpunit.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + ./Tests/ + ./vendor/http-interop/http-factory-tests/test + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/HttpFactory/phpunit.xml.dist b/src/Viserio/Component/HttpFactory/phpunit.xml.dist deleted file mode 100644 index 0f58ed862..000000000 --- a/src/Viserio/Component/HttpFactory/phpunit.xml.dist +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - ./Tests/ - ./vendor/http-interop/http-factory-tests/test - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/HttpFoundation/.gitignore b/src/Viserio/Component/HttpFoundation/.gitignore index 44364a3d7..48c1d45b2 100644 --- a/src/Viserio/Component/HttpFoundation/.gitignore +++ b/src/Viserio/Component/HttpFoundation/.gitignore @@ -1,4 +1,3 @@ vendor/ composer.lock -phpunit.xml Tests/Fixture/storage diff --git a/src/Viserio/Component/HttpFoundation/Console/Command/DownCommand.php b/src/Viserio/Component/HttpFoundation/Console/Command/DownCommand.php index 8515f9dce..86cc17954 100644 --- a/src/Viserio/Component/HttpFoundation/Console/Command/DownCommand.php +++ b/src/Viserio/Component/HttpFoundation/Console/Command/DownCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Console\Command; @@ -62,8 +62,6 @@ public function handle(ConsoleKernelContract $kernel): int /** * Get the information that are put into the "down" file. - * - * @return array */ protected function getDownPayload(): array { @@ -76,8 +74,6 @@ protected function getDownPayload(): array /** * Get the number of seconds the client should wait before retrying their request. - * - * @return null|int */ protected function getRetryTime(): ?int { diff --git a/src/Viserio/Component/HttpFoundation/Console/Command/UpCommand.php b/src/Viserio/Component/HttpFoundation/Console/Command/UpCommand.php index 534137acc..902014f98 100644 --- a/src/Viserio/Component/HttpFoundation/Console/Command/UpCommand.php +++ b/src/Viserio/Component/HttpFoundation/Console/Command/UpCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Console\Command; diff --git a/src/Viserio/Component/HttpFoundation/Container/Provider/FoundationDataCollectorServiceProvider.php b/src/Viserio/Component/HttpFoundation/Container/Provider/FoundationDataCollectorServiceProvider.php index ccf34fc20..8ab91ab0c 100644 --- a/src/Viserio/Component/HttpFoundation/Container/Provider/FoundationDataCollectorServiceProvider.php +++ b/src/Viserio/Component/HttpFoundation/Container/Provider/FoundationDataCollectorServiceProvider.php @@ -3,97 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Foundation\Kernel as KernelContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Routing\Router as RouterContract; -// use Viserio\Component\HttpFoundation\DataCollector\ViserioHttpDataCollector; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// // class FoundationDataCollectorServiceProvider implements // ServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'viserio_http' => false, -// ], -// ]; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $options = self::resolveOptions($container->get('config')); -// $kernel = $container->get(KernelContract::class); -// -// if ($options['collector']['viserio_http']) { -// $profiler->addCollector( -// new ViserioHttpDataCollector( -// $container->get(RouterContract::class), -// $kernel->getRoutesPath() -// ), -// 1 -// ); -// } -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/HttpFoundation/Container/Provider/HttpFoundationServiceProvider.php b/src/Viserio/Component/HttpFoundation/Container/Provider/HttpFoundationServiceProvider.php index afdb9d375..c1887cbd5 100644 --- a/src/Viserio/Component/HttpFoundation/Container/Provider/HttpFoundationServiceProvider.php +++ b/src/Viserio/Component/HttpFoundation/Container/Provider/HttpFoundationServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Container\Provider; diff --git a/src/Viserio/Component/HttpFoundation/DataCollector/ViserioHttpDataCollector.php b/src/Viserio/Component/HttpFoundation/DataCollector/ViserioHttpDataCollector.php index 469e96a06..f217f6c6e 100644 --- a/src/Viserio/Component/HttpFoundation/DataCollector/ViserioHttpDataCollector.php +++ b/src/Viserio/Component/HttpFoundation/DataCollector/ViserioHttpDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\DataCollector; @@ -71,9 +71,6 @@ class ViserioHttpDataCollector extends AbstractDataCollector implements AssetAwa /** * Create a new viserio request and response data collector instance. - * - * @param \Viserio\Contract\Routing\Router $router - * @param string $routeDirPath */ public function __construct(RouterContract $router, string $routeDirPath) { @@ -260,11 +257,6 @@ public function getAssets(): array /** * Prepare request and response cookie infos and create a cookie tab. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return array */ protected function createCookieTab(ServerRequestInterface $serverRequest, ResponseInterface $response): array { @@ -304,10 +296,6 @@ protected function createCookieTab(ServerRequestInterface $serverRequest, Respon /** * Get the route information for a given route. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return array */ protected function getRouteInformation(RouteContract $route): array { @@ -350,10 +338,6 @@ protected function getRouteInformation(RouteContract $route): array /** * Prepare request attributes, check of route object. - * - * @param array $attributes - * - * @return array */ protected function prepareRequestAttributes(array $attributes): array { @@ -383,10 +367,6 @@ protected function prepareRequestAttributes(array $attributes): array /** * Prepare request headers. - * - * @param array $headers - * - * @return array */ protected function prepareRequestHeaders(array $headers): array { @@ -406,10 +386,6 @@ protected function prepareRequestHeaders(array $headers): array /** * Prepare server parameter. * Hide all keys with a _KEY|_PASSWORD|_PW|_SECRET in it. - * - * @param array $params - * - * @return array */ protected function prepareServerParams(array $params): array { @@ -428,10 +404,6 @@ protected function prepareServerParams(array $params): array /** * Post Parameters from parsed body. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return array */ private function getParsedBody(ServerRequestInterface $request): array { diff --git a/src/Viserio/Component/HttpFoundation/Event/KernelExceptionEvent.php b/src/Viserio/Component/HttpFoundation/Event/KernelExceptionEvent.php index 10f7f548c..1a5417fe0 100644 --- a/src/Viserio/Component/HttpFoundation/Event/KernelExceptionEvent.php +++ b/src/Viserio/Component/HttpFoundation/Event/KernelExceptionEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Event; @@ -25,10 +25,6 @@ class KernelExceptionEvent implements EventContract /** * Create a new kernel exception event. - * - * @param \Viserio\Contract\HttpFoundation\HttpKernel $kernel - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response */ public function __construct( HttpKernelContract $kernel, diff --git a/src/Viserio/Component/HttpFoundation/Event/KernelFinishRequestEvent.php b/src/Viserio/Component/HttpFoundation/Event/KernelFinishRequestEvent.php index 995fe9773..54db3d9c2 100644 --- a/src/Viserio/Component/HttpFoundation/Event/KernelFinishRequestEvent.php +++ b/src/Viserio/Component/HttpFoundation/Event/KernelFinishRequestEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Event; @@ -24,9 +24,6 @@ class KernelFinishRequestEvent implements EventContract /** * Create a new kernel request finish event. - * - * @param \Viserio\Contract\HttpFoundation\HttpKernel $kernel - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest */ public function __construct(HttpKernelContract $kernel, ServerRequestInterface $serverRequest) { diff --git a/src/Viserio/Component/HttpFoundation/Event/KernelRequestEvent.php b/src/Viserio/Component/HttpFoundation/Event/KernelRequestEvent.php index e400f4453..636fc2ac3 100644 --- a/src/Viserio/Component/HttpFoundation/Event/KernelRequestEvent.php +++ b/src/Viserio/Component/HttpFoundation/Event/KernelRequestEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Event; @@ -24,9 +24,6 @@ class KernelRequestEvent implements EventContract /** * Create a new kernel request event. - * - * @param \Viserio\Contract\HttpFoundation\HttpKernel $kernel - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest */ public function __construct(HttpKernelContract $kernel, ServerRequestInterface $serverRequest) { diff --git a/src/Viserio/Component/HttpFoundation/Event/KernelTerminateEvent.php b/src/Viserio/Component/HttpFoundation/Event/KernelTerminateEvent.php index f16c3ad35..9dfc56004 100644 --- a/src/Viserio/Component/HttpFoundation/Event/KernelTerminateEvent.php +++ b/src/Viserio/Component/HttpFoundation/Event/KernelTerminateEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Event; @@ -25,10 +25,6 @@ class KernelTerminateEvent implements EventContract /** * Create a new kernel terminate event. - * - * @param \Viserio\Contract\HttpFoundation\Terminable $kernel - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response */ public function __construct( TerminableContract $kernel, diff --git a/src/Viserio/Component/HttpFoundation/Exception/MaintenanceModeException.php b/src/Viserio/Component/HttpFoundation/Exception/MaintenanceModeException.php index 25b923033..ca8907db1 100644 --- a/src/Viserio/Component/HttpFoundation/Exception/MaintenanceModeException.php +++ b/src/Viserio/Component/HttpFoundation/Exception/MaintenanceModeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Exception; @@ -42,11 +42,6 @@ class MaintenanceModeException extends ServiceUnavailableException /** * Create a new MaintenanceModeException instance. - * - * @param int $time - * @param null|int $retryAfter - * @param null|string $message - * @param null|Throwable $previous */ public function __construct( int $time, @@ -67,8 +62,6 @@ public function __construct( /** * Get time when the application went down. - * - * @return \Cake\Chronos\Chronos */ public function getWentDownAt(): Chronos { @@ -77,8 +70,6 @@ public function getWentDownAt(): Chronos /** * Get retry after down. - * - * @return int */ public function getRetryAfter(): int { @@ -87,8 +78,6 @@ public function getRetryAfter(): int /** * Get the time when the application is available. - * - * @return \Cake\Chronos\Chronos */ public function getWillBeAvailableAt(): Chronos { diff --git a/src/Viserio/Component/HttpFoundation/Kernel.php b/src/Viserio/Component/HttpFoundation/Kernel.php index 26681f152..9e9754ca3 100644 --- a/src/Viserio/Component/HttpFoundation/Kernel.php +++ b/src/Viserio/Component/HttpFoundation/Kernel.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation; @@ -36,8 +36,6 @@ class Kernel extends AbstractKernel implements HttpKernelContract, TerminableCon * List of allowed bootstrap types. * * @internal - * - * @var array */ protected static array $allowedBootstrapTypes = ['global', 'http']; @@ -88,11 +86,6 @@ public function terminate(ServerRequestInterface $serverRequest, ResponseInterfa /** * Convert request into response. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param null|\Viserio\Contract\Events\EventManager $events - * - * @return \Psr\Http\Message\ResponseInterface */ protected function handleRequest( ServerRequestInterface $serverRequest, @@ -119,10 +112,6 @@ protected function handleRequest( /** * Report the exception to the exception handler. - * - * @param Throwable $exception - * - * @return void */ protected function reportException(Throwable $exception): void { @@ -135,11 +124,6 @@ protected function reportException(Throwable $exception): void /** * Render the exception to a response. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $exception - * - * @return \Psr\Http\Message\ResponseInterface */ protected function renderException(ServerRequestInterface $request, Throwable $exception): ResponseInterface { @@ -154,10 +138,6 @@ protected function renderException(ServerRequestInterface $request, Throwable $e /** * Send the given request through the middleware / router. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Psr\Http\Message\ResponseInterface */ protected function sendRequestThroughRouter(ServerRequestInterface $request): ResponseInterface { @@ -179,11 +159,6 @@ protected function sendRequestThroughRouter(ServerRequestInterface $request): Re /** * Pipes the request through given middleware and dispatch a response. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Viserio\Contract\Routing\Router $router - * - * @return \Psr\Http\Message\ResponseInterface */ protected function pipeRequestThroughMiddlewareAndRouter( ServerRequestInterface $request, diff --git a/src/Viserio/Component/HttpFoundation/Middleware/CheckForMaintenanceModeMiddleware.php b/src/Viserio/Component/HttpFoundation/Middleware/CheckForMaintenanceModeMiddleware.php index 8a01d717d..3a4d7a25c 100644 --- a/src/Viserio/Component/HttpFoundation/Middleware/CheckForMaintenanceModeMiddleware.php +++ b/src/Viserio/Component/HttpFoundation/Middleware/CheckForMaintenanceModeMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Middleware; @@ -31,8 +31,6 @@ class CheckForMaintenanceModeMiddleware implements MiddlewareInterface /** * Create a new maintenance check middleware instance. - * - * @param \Viserio\Contract\HttpFoundation\HttpKernel $kernel */ public function __construct(HttpKernelContract $kernel) { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Console/Command/DownCommandTest.php b/src/Viserio/Component/HttpFoundation/Tests/Console/Command/DownCommandTest.php index b0824c305..7002d0d71 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Console/Command/DownCommandTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Console/Command/DownCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Console\Command; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class DownCommandTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Console/Command/UpCommandTest.php b/src/Viserio/Component/HttpFoundation/Tests/Console/Command/UpCommandTest.php index a85bf283a..1758d12b0 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Console/Command/UpCommandTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Console/Command/UpCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Console\Command; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class UpCommandTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php b/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php index 781feab73..ff37c610c 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/FoundationDataCollectorServiceProviderTest.php @@ -3,88 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Config\Provider\ConfigServiceProvider; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Config\Repository as RepositoryContract; -// use Viserio\Contract\Foundation\Kernel as KernelContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Routing\Route as RouteContract; -// use Viserio\Contract\Routing\Router as RouterContract; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\HttpFoundation\Provider\FoundationDataCollectorServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// ///** // * @internal // */ // final class FoundationDataCollectorServiceProviderTest extends MockeryTestCase // { -// public function testGetServices(): void -// { -// $route = \Mockery::mock(RouteContract::class); -// $router = \Mockery::mock(RouterContract::class); -// $router->shouldReceive('group') -// ->once(); -// $router->shouldReceive('getCurrentRoute') -// ->once() -// ->andReturn($route); -// -// $kernel = \Mockery::mock(KernelContract::class); -// $kernel->shouldReceive('getRoutesPath') -// ->once() -// ->andReturn(''); -// -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->bind(RouterContract::class, $router); -// $container->bind(KernelContract::class, $kernel); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ConfigServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new FoundationDataCollectorServiceProvider()); -// -// $container->get(RepositoryContract::class)->set('viserio', [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'viserio_http' => true, -// ], -// ], -// ]); -// -// $profiler = $container->get(ProfilerContract::class); -// -// $this->assertInstanceOf(ProfilerContract::class, $profiler); -// -// $this->assertArrayHasKey('time-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('memory-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('viserio-http-data-collector', $profiler->getCollectors()); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/HttpFoundationServiceProviderTest.php b/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/HttpFoundationServiceProviderTest.php index 7feee7061..3582e948f 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/HttpFoundationServiceProviderTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Container/Provider/HttpFoundationServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Provider; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class HttpFoundationServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/DataCollector/ViserioHttpDataCollectorTest.php b/src/Viserio/Component/HttpFoundation/Tests/DataCollector/ViserioHttpDataCollectorTest.php index 9b456705b..ec2ff05b4 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/DataCollector/ViserioHttpDataCollectorTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/DataCollector/ViserioHttpDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\DataCollector; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ViserioHttpDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelExceptionEventTest.php b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelExceptionEventTest.php index 83070ab2c..8ed242679 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelExceptionEventTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelExceptionEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Event; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class KernelExceptionEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelFinishRequestEventTest.php b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelFinishRequestEventTest.php index dda9745a9..cc1d0d0fc 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelFinishRequestEventTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelFinishRequestEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Event; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class KernelFinishRequestEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelRequestEventTest.php b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelRequestEventTest.php index 27744f87f..74a8b378f 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelRequestEventTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelRequestEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Event; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class KernelRequestEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelTerminateEventTest.php b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelTerminateEventTest.php index 666d3ebe7..d466688d0 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Event/KernelTerminateEventTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Event/KernelTerminateEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Event; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class KernelTerminateEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Fixture/config/bootstrap.php b/src/Viserio/Component/HttpFoundation/Tests/Fixture/config/bootstrap.php index 31f677340..e4a6dec4b 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Fixture/config/bootstrap.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Fixture/config/bootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return [ diff --git a/src/Viserio/Component/HttpFoundation/Tests/KernelTest.php b/src/Viserio/Component/HttpFoundation/Tests/KernelTest.php index 72a3aa3f1..a0e2d03c0 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/KernelTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/KernelTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests; @@ -38,6 +38,7 @@ * @preserveGlobalState disabled * * @small + * @coversNothing */ final class KernelTest extends MockeryTestCase { @@ -189,9 +190,6 @@ protected function allowMockingNonExistentMethods(bool $allow = false): void /** * @param \Mockery\MockInterface|\Psr\Container\ContainerInterface $container - * @param null|\Viserio\Contract\Foundation\BootstrapManager $bootstrapManager - * - * @return \Viserio\Component\HttpFoundation\Kernel */ private function getKernel(MockInterface $container, ?BootstrapManagerContract $bootstrapManager = null): Kernel { @@ -224,9 +222,6 @@ public function getRootDir(): string return $kernel; } - /** - * @return \Mockery\MockInterface - */ private function arrangeKernelHandleEvents(): MockInterface { $eventsMock = Mock::mock(EventManagerContract::class); @@ -240,9 +235,6 @@ private function arrangeKernelHandleEvents(): MockInterface return $eventsMock; } - /** - * @return \Mockery\MockInterface - */ private function arrangeServerRequestWithXPhpObLevel(): MockInterface { $serverRequestMock = Mock::mock(ServerRequestInterface::class); @@ -274,7 +266,6 @@ private function arrangeDispatcher($container): void } /** - * @param Exception $exception * @param \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface $serverRequest * @param \Mockery\MockInterface|\Psr\Container\ContainerInterface $container */ diff --git a/src/Viserio/Component/HttpFoundation/Tests/Middleware/CheckForMaintenanceModeMiddlewareTest.php b/src/Viserio/Component/HttpFoundation/Tests/Middleware/CheckForMaintenanceModeMiddlewareTest.php index 00f7c206e..e29a847ee 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Middleware/CheckForMaintenanceModeMiddlewareTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Middleware/CheckForMaintenanceModeMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Middleware; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class CheckForMaintenanceModeMiddlewareTest extends MockeryTestCase { diff --git a/src/Viserio/Component/HttpFoundation/Tests/Middleware/Exception/MaintenanceModeExceptionTest.php b/src/Viserio/Component/HttpFoundation/Tests/Middleware/Exception/MaintenanceModeExceptionTest.php index 2b81bddff..176d1f24e 100644 --- a/src/Viserio/Component/HttpFoundation/Tests/Middleware/Exception/MaintenanceModeExceptionTest.php +++ b/src/Viserio/Component/HttpFoundation/Tests/Middleware/Exception/MaintenanceModeExceptionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\HttpFoundation\Tests\Middleware\Exception; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class MaintenanceModeExceptionTest extends TestCase { diff --git a/src/Viserio/Component/HttpFoundation/composer.json b/src/Viserio/Component/HttpFoundation/composer.json index 9ef1b196c..0a2a5cf57 100644 --- a/src/Viserio/Component/HttpFoundation/composer.json +++ b/src/Viserio/Component/HttpFoundation/composer.json @@ -47,11 +47,10 @@ "require-dev": { "cakephp/chronos": "^1.0.4", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "paragonie/halite": "^4.6.0", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "symfony/var-dumper": "^4.3.8 || ^5.0.0", "viserio/config": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/HttpFoundation/phpstan.neon b/src/Viserio/Component/HttpFoundation/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/HttpFoundation/phpstan.neon +++ b/src/Viserio/Component/HttpFoundation/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/HttpFoundation/phpunit.xml b/src/Viserio/Component/HttpFoundation/phpunit.xml new file mode 100644 index 000000000..1396326fc --- /dev/null +++ b/src/Viserio/Component/HttpFoundation/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/HttpFoundation/phpunit.xml.dist b/src/Viserio/Component/HttpFoundation/phpunit.xml.dist deleted file mode 100644 index 76c970ac1..000000000 --- a/src/Viserio/Component/HttpFoundation/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Log/.gitignore b/src/Viserio/Component/Log/.gitignore index 7ef46f6bd..a023aa463 100644 --- a/src/Viserio/Component/Log/.gitignore +++ b/src/Viserio/Component/Log/.gitignore @@ -3,4 +3,3 @@ vendor/ Tests/prod.log composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Log/Container/Provider/LoggerDataCollectorServiceProvider.php b/src/Viserio/Component/Log/Container/Provider/LoggerDataCollectorServiceProvider.php index b1c026173..89842e6b2 100644 --- a/src/Viserio/Component/Log/Container/Provider/LoggerDataCollectorServiceProvider.php +++ b/src/Viserio/Component/Log/Container/Provider/LoggerDataCollectorServiceProvider.php @@ -3,110 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Viserio\Bridge\Monolog\Processor\DebugProcessor; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Log\DataCollector\LoggerDataCollector; -// use Viserio\Component\Log\LogManager; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// // class LoggerDataCollectorServiceProvider implements // ServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// LogManager::class => [self::class, 'extendLogManager'], -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'logs' => false, -// ], -// ]; -// } -// -// /** -// * Extend monolog with a processor. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Monolog\Logger|\Viserio\Component\Log\LogManager $logManager -// * -// * @return null|\Monolog\Logger|\Viserio\Component\Log\Logger -// */ -// public static function extendLogManager(ContainerInterface $container, $logManager = null) -// { -// $options = self::resolveOptions($container->get('config')); -// -// if ($logManager !== null && $options['collector']['logs'] === true) { -// $logManager->pushProcessor(new DebugProcessor()); -// } -// -// return $logManager; -// } -// -// /** -// * Extend viserio profiler with a data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['logs'] === true && $container->has(LogManager::class)) { -// $profiler->addCollector(new LoggerDataCollector($container->get(LogManager::class)->getDriver())); -// } -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Log/Container/Provider/LoggerServiceProvider.php b/src/Viserio/Component/Log/Container/Provider/LoggerServiceProvider.php index 186e6eb7c..db623307c 100644 --- a/src/Viserio/Component/Log/Container/Provider/LoggerServiceProvider.php +++ b/src/Viserio/Component/Log/Container/Provider/LoggerServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Container\Provider; diff --git a/src/Viserio/Component/Log/DataCollector/LoggerDataCollector.php b/src/Viserio/Component/Log/DataCollector/LoggerDataCollector.php index d32d52598..32b127767 100644 --- a/src/Viserio/Component/Log/DataCollector/LoggerDataCollector.php +++ b/src/Viserio/Component/Log/DataCollector/LoggerDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\DataCollector; @@ -157,8 +157,6 @@ public function collect(ServerRequestInterface $serverRequest, ResponseInterface /** * Get log error priorities. - * - * @return array */ public function getPriorities(): array { @@ -167,8 +165,6 @@ public function getPriorities(): array /** * Get counted errors. - * - * @return int */ public function getCountedErrors(): int { @@ -177,8 +173,6 @@ public function getCountedErrors(): int /** * Get counted deprecations. - * - * @return int */ public function getCountedDeprecations(): int { @@ -187,8 +181,6 @@ public function getCountedDeprecations(): int /** * Get counted warnings. - * - * @return int */ public function getCountedWarnings(): int { @@ -197,8 +189,6 @@ public function getCountedWarnings(): int /** * Get counted screams. - * - * @return int */ public function getCountedScreams(): int { @@ -207,8 +197,6 @@ public function getCountedScreams(): int /** * Get counted logs. - * - * @return int */ public function getCountedLogs(): int { @@ -217,8 +205,6 @@ public function getCountedLogs(): int /** * Returns collected logs. - * - * @return array */ public function getLogs(): array { @@ -241,8 +227,6 @@ public function reset(): void /** * Returns a DebugProcessor instance if one is registered with this logger. - * - * @return null|\Viserio\Bridge\Monolog\Processor\DebugProcessor */ private function getDebugLogger(): ?DebugProcessor { @@ -257,10 +241,6 @@ private function getDebugLogger(): ?DebugProcessor /** * Undocumented function. - * - * @param array $logs - * - * @return array */ private function sanitizeLogs(array $logs): array { @@ -293,10 +273,6 @@ private function sanitizeLogs(array $logs): array /** * Find silenced or deprecation in error log. - * - * @param array $log - * - * @return bool */ private function isSilencedOrDeprecationErrorLog(array $log): bool { @@ -319,8 +295,6 @@ private function isSilencedOrDeprecationErrorLog(array $log): bool /** * Get computed log error levels. - * - * @return array */ private function getComputedErrorsCount(): array { @@ -368,8 +342,6 @@ private function getComputedErrorsCount(): array /** * Group log level together. - * - * @return array */ private function groupLogLevels(): array { diff --git a/src/Viserio/Component/Log/Event/MessageLoggedEvent.php b/src/Viserio/Component/Log/Event/MessageLoggedEvent.php index 7653e3fec..610041aa2 100644 --- a/src/Viserio/Component/Log/Event/MessageLoggedEvent.php +++ b/src/Viserio/Component/Log/Event/MessageLoggedEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Event; @@ -25,10 +25,7 @@ class MessageLoggedEvent implements EventContract /** * Create a new message event. * - * @param \Psr\Log\LoggerInterface $log - * @param string $level * @param null|bool|float|int|mixed|string $message - * @param array $context */ public function __construct(LoggerInterface $log, string $level, $message, array $context = []) { @@ -41,8 +38,6 @@ public function __construct(LoggerInterface $log, string $level, $message, array * The log "level". * * @var string - * - * @return string */ public function getLevel(): string { @@ -53,8 +48,6 @@ public function getLevel(): string * The log message. * * @var null|bool|float|int|mixed|string - * - * @return mixed */ public function getMessage() { @@ -65,8 +58,6 @@ public function getMessage() * The log context. * * @var array - * - * @return array */ public function getContext(): array { diff --git a/src/Viserio/Component/Log/LogManager.php b/src/Viserio/Component/Log/LogManager.php index 9b208a55a..a9f13d868 100644 --- a/src/Viserio/Component/Log/LogManager.php +++ b/src/Viserio/Component/Log/LogManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log; @@ -106,8 +106,6 @@ public static function getMandatoryConfig(): iterable /** * Adds a processor on to the stack. * - * @param callable $callback - * * @return $this */ public function pushProcessor(callable $callback): self @@ -119,10 +117,6 @@ public function pushProcessor(callable $callback): self /** * Get a log channel instance. - * - * @param null|string $channel - * - * @return mixed */ public function getChannel(?string $channel = null) { @@ -165,10 +159,6 @@ public function createDriver(array $config): LoggerInterface /** * Create a new, on-demand aggregate logger instance. - * - * @param array $config - * - * @return \Psr\Log\LoggerInterface */ protected function createStackDriver(array $config): LoggerInterface { @@ -177,10 +167,6 @@ protected function createStackDriver(array $config): LoggerInterface /** * Create a aggregate log driver instance. - * - * @param array $config - * - * @return \Psr\Log\LoggerInterface */ protected function createAggregateDriver(array $config): LoggerInterface { @@ -200,8 +186,6 @@ protected function createAggregateDriver(array $config): LoggerInterface * * @throws Exception * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createEmergencyDriver(): LoggerInterface { @@ -220,12 +204,8 @@ protected function createEmergencyDriver(): LoggerInterface /** * Create an instance of the single file log driver. * - * @param array $config - * * @throws Exception * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createSingleDriver(array $config): LoggerInterface { @@ -244,11 +224,7 @@ protected function createSingleDriver(array $config): LoggerInterface /** * Create an instance of the daily file log driver. * - * @param array $config - * * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createDailyDriver(array $config): LoggerInterface { @@ -268,11 +244,7 @@ protected function createDailyDriver(array $config): LoggerInterface /** * Create an instance of the syslog log driver. * - * @param array $config - * * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createSyslogDriver(array $config): LoggerInterface { @@ -289,11 +261,7 @@ protected function createSyslogDriver(array $config): LoggerInterface /** * Create an instance of the "error log" log driver. * - * @param array $config - * * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createErrorlogDriver(array $config): LoggerInterface { @@ -309,11 +277,7 @@ protected function createErrorlogDriver(array $config): LoggerInterface /** * Create an instance of the Slack log driver. * - * @param array $config - * * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createSlackDriver(array $config): LoggerInterface { @@ -337,11 +301,7 @@ protected function createSlackDriver(array $config): LoggerInterface /** * Create a custom log driver instance. * - * @param array $config - * * @throws \Viserio\Contract\Log\Exception\RuntimeException - * - * @return \Psr\Log\LoggerInterface */ protected function createCustomDriver(array $config): LoggerInterface { @@ -364,11 +324,7 @@ protected function createCustomDriver(array $config): LoggerInterface /** * Create an instance of any handler available in Monolog. * - * @param array $config - * * @throws \InvalidArgumentException - * - * @return \Psr\Log\LoggerInterface */ protected function createMonologDriver(array $config): LoggerInterface { @@ -405,8 +361,6 @@ protected function createMonologDriver(array $config): LoggerInterface /** * Returns a line formatter with included stacktraces. - * - * @return \Monolog\Formatter\LineFormatter */ protected function getConfiguredLineFormatter(): LineFormatter { @@ -447,11 +401,6 @@ protected static function getConfigName(): string /** * Push given processors to monolog. - * - * @param array $config - * @param \Monolog\Logger $driver - * - * @return \Monolog\Logger */ protected function pushProcessorsToMonolog(array $config, Monolog $driver): Monolog { @@ -470,10 +419,6 @@ protected function pushProcessorsToMonolog(array $config, Monolog $driver): Mono /** * Extract the log channel from the given configuration. - * - * @param array $config - * - * @return string */ private function parseChannel(array $config): string { @@ -482,8 +427,6 @@ private function parseChannel(array $config): string /** * Return the file path for some logger. - * - * @return string */ private function getFilePath(): string { diff --git a/src/Viserio/Component/Log/Logger.php b/src/Viserio/Component/Log/Logger.php index d38a6b674..2d544f553 100644 --- a/src/Viserio/Component/Log/Logger.php +++ b/src/Viserio/Component/Log/Logger.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log; @@ -47,8 +47,6 @@ class Logger extends LogLevel implements PsrLoggerInterface /** * Create a new log writer instance. - * - * @param \Monolog\Logger $logger */ public function __construct(Monolog $logger) { @@ -58,12 +56,7 @@ public function __construct(Monolog $logger) /** * Call Monolog with the given method and parameters. * - * @param string $method - * @param array $parameters - * * @throws \Psr\Log\InvalidArgumentException - * - * @return mixed */ public function __call(string $method, array $parameters) { @@ -73,13 +66,7 @@ public function __call(string $method, array $parameters) /** * Logs with an arbitrary level. * - * @param mixed $level - * @param mixed $message - * @param array $context - * * @throws \Psr\Log\InvalidArgumentException - * - * @return void */ public function log($level, $message, array $context = []): void { @@ -103,8 +90,6 @@ public function log($level, $message, array $context = []): void /** * Get the underlying Monolog instance. - * - * @return \Monolog\Logger */ public function getMonolog(): Monolog { @@ -114,8 +99,6 @@ public function getMonolog(): Monolog /** * Format the parameters for the logger. * - * @param mixed $message - * * @return null|bool|float|int|object|string */ private function formatMessage($message) diff --git a/src/Viserio/Component/Log/Tests/Container/Provider/LoggerDataCollectorServiceProviderTest.php b/src/Viserio/Component/Log/Tests/Container/Provider/LoggerDataCollectorServiceProviderTest.php index 91f501dba..aead4e60b 100644 --- a/src/Viserio/Component/Log/Tests/Container/Provider/LoggerDataCollectorServiceProviderTest.php +++ b/src/Viserio/Component/Log/Tests/Container/Provider/LoggerDataCollectorServiceProviderTest.php @@ -3,75 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Events\Provider\EventsServiceProvider; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Log\Logger; -// use Viserio\Component\Log\LogManager; -// use Viserio\Component\Log\Provider\LoggerDataCollectorServiceProvider; -// use Viserio\Component\Log\Provider\LoggerServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// ///** // * @internal // */ // final class LoggerDataCollectorServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new EventsServiceProvider()); -// $container->register(new LoggerServiceProvider()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new LoggerDataCollectorServiceProvider()); -// -// $container->bind('config', [ -// 'viserio' => [ -// 'logging' => [ -// 'name' => 'narrowspark', -// 'path' => __DIR__, -// 'env' => 'prod', -// ], -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'logs' => true, -// ], -// ], -// ], -// ]); -// -// $this->assertInstanceOf(Logger::class, $container->get(LogManager::class)->getDriver()); -// $this->assertInstanceOf(ProfilerContract::class, $container->get(ProfilerContract::class)); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Log/Tests/Container/Provider/LoggerServiceProviderTest.php b/src/Viserio/Component/Log/Tests/Container/Provider/LoggerServiceProviderTest.php index dfd6f10cd..ab9387959 100644 --- a/src/Viserio/Component/Log/Tests/Container/Provider/LoggerServiceProviderTest.php +++ b/src/Viserio/Component/Log/Tests/Container/Provider/LoggerServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Provider; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class LoggerServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Log/Tests/Event/MessageLoggedEventTest.php b/src/Viserio/Component/Log/Tests/Event/MessageLoggedEventTest.php index 55dc41e03..d22479343 100644 --- a/src/Viserio/Component/Log/Tests/Event/MessageLoggedEventTest.php +++ b/src/Viserio/Component/Log/Tests/Event/MessageLoggedEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Event; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MessageLoggedEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Log/Tests/Fixture/ArrayableClass.php b/src/Viserio/Component/Log/Tests/Fixture/ArrayableClass.php index 111ee43aa..81830475f 100644 --- a/src/Viserio/Component/Log/Tests/Fixture/ArrayableClass.php +++ b/src/Viserio/Component/Log/Tests/Fixture/ArrayableClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Fixture; diff --git a/src/Viserio/Component/Log/Tests/Fixture/DummyToString.php b/src/Viserio/Component/Log/Tests/Fixture/DummyToString.php index c4b12290a..4ace6be84 100644 --- a/src/Viserio/Component/Log/Tests/Fixture/DummyToString.php +++ b/src/Viserio/Component/Log/Tests/Fixture/DummyToString.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Fixture; diff --git a/src/Viserio/Component/Log/Tests/Fixture/JsonableClass.php b/src/Viserio/Component/Log/Tests/Fixture/JsonableClass.php index 8a439db0c..1a7d84c56 100644 --- a/src/Viserio/Component/Log/Tests/Fixture/JsonableClass.php +++ b/src/Viserio/Component/Log/Tests/Fixture/JsonableClass.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Fixture; diff --git a/src/Viserio/Component/Log/Tests/Fixture/MyCustomLogger.php b/src/Viserio/Component/Log/Tests/Fixture/MyCustomLogger.php index 0c7f9aa89..d1b30c397 100644 --- a/src/Viserio/Component/Log/Tests/Fixture/MyCustomLogger.php +++ b/src/Viserio/Component/Log/Tests/Fixture/MyCustomLogger.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Fixture; diff --git a/src/Viserio/Component/Log/Tests/LogManagerTest.php b/src/Viserio/Component/Log/Tests/LogManagerTest.php index 80a5bc25e..2fd3020d9 100644 --- a/src/Viserio/Component/Log/Tests/LogManagerTest.php +++ b/src/Viserio/Component/Log/Tests/LogManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class LogManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Log/Tests/LoggerTest.php b/src/Viserio/Component/Log/Tests/LoggerTest.php index 93dc8ffd3..d9077a0a2 100644 --- a/src/Viserio/Component/Log/Tests/LoggerTest.php +++ b/src/Viserio/Component/Log/Tests/LoggerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests; @@ -33,6 +33,7 @@ * @internal * * @small + * @coversNothing */ final class LoggerTest extends MockeryTestCase { @@ -231,9 +232,6 @@ public function testImplements(): void /** * @dataProvider provideLogsAtAllLevelsCases - * - * @param string $level - * @param string $message */ public function testLogsAtAllLevels(string $level, string $message): void { diff --git a/src/Viserio/Component/Log/Tests/Traits/ParseLevelTraitTest.php b/src/Viserio/Component/Log/Tests/Traits/ParseLevelTraitTest.php index 17257b0e3..3211e4a34 100644 --- a/src/Viserio/Component/Log/Tests/Traits/ParseLevelTraitTest.php +++ b/src/Viserio/Component/Log/Tests/Traits/ParseLevelTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ParseLevelTraitTest extends TestCase { @@ -29,9 +30,6 @@ final class ParseLevelTraitTest extends TestCase /** * @dataProvider provideParseLevelCases - * - * @param string $stringLevel - * @param int $monologLevel */ public function testParseLevel(string $stringLevel, int $monologLevel): void { diff --git a/src/Viserio/Component/Log/Traits/ParseLevelTrait.php b/src/Viserio/Component/Log/Traits/ParseLevelTrait.php index f7ee909e6..7c2dd8229 100644 --- a/src/Viserio/Component/Log/Traits/ParseLevelTrait.php +++ b/src/Viserio/Component/Log/Traits/ParseLevelTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Log\Traits; @@ -37,11 +37,7 @@ trait ParseLevelTrait /** * Parse the string level into a Monolog constant. * - * @param string $level - * * @throws \InvalidArgumentException - * - * @return int */ public static function parseLevel(string $level): int { diff --git a/src/Viserio/Component/Log/composer.json b/src/Viserio/Component/Log/composer.json index 2f048df37..06f0c9446 100644 --- a/src/Viserio/Component/Log/composer.json +++ b/src/Viserio/Component/Log/composer.json @@ -36,10 +36,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/container": "^1.0@dev", "viserio/events": "^1.0@dev", diff --git a/src/Viserio/Component/Log/phpstan.neon b/src/Viserio/Component/Log/phpstan.neon index 40e8ea447..3e1522003 100644 --- a/src/Viserio/Component/Log/phpstan.neon +++ b/src/Viserio/Component/Log/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Log/phpunit.xml b/src/Viserio/Component/Log/phpunit.xml new file mode 100644 index 000000000..e5a504e44 --- /dev/null +++ b/src/Viserio/Component/Log/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Log/phpunit.xml.dist b/src/Viserio/Component/Log/phpunit.xml.dist deleted file mode 100644 index b69812b3d..000000000 --- a/src/Viserio/Component/Log/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Mail/.gitignore b/src/Viserio/Component/Mail/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Mail/.gitignore +++ b/src/Viserio/Component/Mail/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Mail/Container/Provider/MailServiceProvider.php b/src/Viserio/Component/Mail/Container/Provider/MailServiceProvider.php index cd126dda8..aa3ce9d04 100644 --- a/src/Viserio/Component/Mail/Container/Provider/MailServiceProvider.php +++ b/src/Viserio/Component/Mail/Container/Provider/MailServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Container\Provider; diff --git a/src/Viserio/Component/Mail/Event/MessageSendingEvent.php b/src/Viserio/Component/Mail/Event/MessageSendingEvent.php index ba6ea9ed4..468571f24 100644 --- a/src/Viserio/Component/Mail/Event/MessageSendingEvent.php +++ b/src/Viserio/Component/Mail/Event/MessageSendingEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Event; @@ -24,9 +24,6 @@ class MessageSendingEvent implements EventContract /** * Create a new message sending event. - * - * @param \Viserio\Contract\Mail\Mailer $mailer - * @param Swift_Mime_SimpleMessage $message */ public function __construct(MailerContract $mailer, Swift_Mime_SimpleMessage $message) { @@ -37,8 +34,6 @@ public function __construct(MailerContract $mailer, Swift_Mime_SimpleMessage $me /** * Get swift message. - * - * @return Swift_Mime_SimpleMessage */ public function getMessage(): Swift_Mime_SimpleMessage { diff --git a/src/Viserio/Component/Mail/Event/MessageSentEvent.php b/src/Viserio/Component/Mail/Event/MessageSentEvent.php index 51358e011..e08ca1c0d 100644 --- a/src/Viserio/Component/Mail/Event/MessageSentEvent.php +++ b/src/Viserio/Component/Mail/Event/MessageSentEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Event; @@ -24,10 +24,6 @@ class MessageSentEvent implements EventContract /** * Create a new message sent event. - * - * @param \Viserio\Contract\Mail\Mailer $mailer - * @param Swift_Mime_SimpleMessage $message - * @param int $recipients */ public function __construct(MailerContract $mailer, Swift_Mime_SimpleMessage $message, int $recipients) { @@ -38,8 +34,6 @@ public function __construct(MailerContract $mailer, Swift_Mime_SimpleMessage $me /** * Get swift message. - * - * @return Swift_Mime_SimpleMessage */ public function getMessage(): Swift_Mime_SimpleMessage { @@ -48,8 +42,6 @@ public function getMessage(): Swift_Mime_SimpleMessage /** * Get recipients. - * - * @return int */ public function getRecipients(): int { diff --git a/src/Viserio/Component/Mail/MailManager.php b/src/Viserio/Component/Mail/MailManager.php index b0cb99d4c..044e69bf8 100644 --- a/src/Viserio/Component/Mail/MailManager.php +++ b/src/Viserio/Component/Mail/MailManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail; @@ -56,10 +56,6 @@ public function __construct($config, TransportFactory $transportFactory) /** * Set the queue manager. - * - * @param \Viserio\Contract\Queue\QueueConnector $queueManager - * - * @return void */ public function setQueueManager(QueueContract $queueManager): void { @@ -124,10 +120,6 @@ protected static function getConfigName(): string /** * Create a new SwiftMailer instance. - * - * @param Swift_Transport $transport - * - * @return Swift_Mailer */ protected function createSwiftMailer(Swift_Transport $transport): Swift_Mailer { @@ -143,9 +135,6 @@ protected function createSwiftMailer(Swift_Transport $transport): Swift_Mailer /** * Create a mailer or queue mailer instance. * - * @param Swift_Transport $transport - * @param array $config - * * @return \Viserio\Contract\Mail\Mailer|\Viserio\Contract\Mail\QueueMailer */ private function createMailer(Swift_Transport $transport, array $config): MailerContract @@ -182,11 +171,6 @@ private function createMailer(Swift_Transport $transport, array $config): Mailer /** * Set a global address on the mailer by type. - * - * @param \Viserio\Contract\Mail\Mailer $mailer - * @param string $type - * - * @return void */ private function setGlobalAddress(MailerContract $mailer, string $type): void { diff --git a/src/Viserio/Component/Mail/Mailer.php b/src/Viserio/Component/Mail/Mailer.php index 55bf748b1..74fa36656 100644 --- a/src/Viserio/Component/Mail/Mailer.php +++ b/src/Viserio/Component/Mail/Mailer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail; @@ -78,9 +78,6 @@ class Mailer implements MailerContract /** * Create a new Mailer instance. - * - * @param Swift_Mailer $swiftMailer - * @param array $data */ public function __construct(Swift_Mailer $swiftMailer, array $data) { @@ -123,10 +120,7 @@ public function alwaysTo(string $address, ?string $name = null): void /** * Set the global reply-to address and name. * - * @param string $address * @param null|string $name - * - * @return void */ public function alwaysReplyTo(string $address, $name = null): void { @@ -197,8 +191,6 @@ public function failures(): array /** * Get the Swift Mailer instance. - * - * @return Swift_Mailer */ public function getSwiftMailer(): Swift_Mailer { @@ -211,8 +203,6 @@ public function getSwiftMailer(): Swift_Mailer * @param array|string $view * * @throws \Viserio\Contract\Mail\Exception\UnexpectedValueException - * - * @return array */ protected function parseView($view): array { @@ -243,12 +233,6 @@ protected function parseView($view): array /** * Add the content to a given message. - * - * @param \Viserio\Contract\Mail\Message $message - * @param null|string $view - * @param null|string $plain - * @param null|string $raw - * @param array $data */ protected function addContent( MessageContract $message, @@ -276,10 +260,6 @@ protected function addContent( /** * Send a Swift Message instance. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return int */ protected function sendSwiftMessage(Swift_Mime_SimpleMessage $message): int { @@ -296,10 +276,6 @@ protected function sendSwiftMessage(Swift_Mime_SimpleMessage $message): int /** * Determines if the message can be sent. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return bool */ protected function shouldSendMessage(Swift_Mime_SimpleMessage $message): bool { @@ -314,8 +290,6 @@ protected function shouldSendMessage(Swift_Mime_SimpleMessage $message): bool * Force the transport to re-connect. * * This will prevent errors in daemon queue situations. - * - * @return void */ protected function forceReconnecting(): void { @@ -324,8 +298,6 @@ protected function forceReconnecting(): void /** * Create a new message instance. - * - * @return \Viserio\Contract\Mail\Message */ protected function createMessage(): MessageContract { @@ -351,12 +323,9 @@ protected function createMessage(): MessageContract /** * Call the provided message builder. * - * @param null|Closure|string $callback - * @param \Viserio\Contract\Mail\Message $message + * @param null|Closure|string $callback * * @throws InvalidArgumentException - * - * @return mixed */ protected function callMessageBuilder($callback, MessageContract $message) { @@ -373,11 +342,6 @@ protected function callMessageBuilder($callback, MessageContract $message) /** * Creates a view string for the email body. - * - * @param string $view - * @param array $data - * - * @return string */ protected function createView(string $view, array $data): string { diff --git a/src/Viserio/Component/Mail/Message.php b/src/Viserio/Component/Mail/Message.php index 0fbd27b95..d0b8590ad 100644 --- a/src/Viserio/Component/Mail/Message.php +++ b/src/Viserio/Component/Mail/Message.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail; @@ -33,8 +33,6 @@ class Message implements MessageContract /** * Create a new message instance. - * - * @param Swift_Mime_SimpleMessage $swift */ public function __construct(Swift_Mime_SimpleMessage $swift) { @@ -43,11 +41,6 @@ public function __construct(Swift_Mime_SimpleMessage $swift) /** * Dynamically pass missing methods to the Swift instance. - * - * @param string $method - * @param array $parameters - * - * @return mixed */ public function __call(string $method, array $parameters) { @@ -206,8 +199,6 @@ public function embedData(string $data, string $name, ?string $contentType = nul /** * Get the underlying Swift Message instance. - * - * @return Swift_Mime_SimpleMessage */ public function getSwiftMessage(): Swift_Mime_SimpleMessage { @@ -218,10 +209,6 @@ public function getSwiftMessage(): Swift_Mime_SimpleMessage * Add a recipient to the message. * * @param array|string $address - * @param string $name - * @param string $type - * - * @return void */ protected function addAddresses($address, string $name, string $type): void { @@ -238,10 +225,6 @@ protected function addAddresses($address, string $name, string $type): void /** * Create a Swift Attachment instance. - * - * @param string $file - * - * @return Swift_Mime_Attachment */ protected function createAttachmentFromPath(string $file): Swift_Mime_Attachment { @@ -250,11 +233,6 @@ protected function createAttachmentFromPath(string $file): Swift_Mime_Attachment /** * Create a Swift Attachment instance from data. - * - * @param string $data - * @param string $name - * - * @return Swift_Mime_Attachment */ protected function createAttachmentFromData(string $data, string $name): Swift_Mime_Attachment { @@ -263,11 +241,6 @@ protected function createAttachmentFromData(string $data, string $name): Swift_M /** * Prepare and attach the given attachment. - * - * @param Swift_Mime_Attachment $attachment - * @param array $options - * - * @return void */ protected function prepAttachment(Swift_Mime_Attachment $attachment, array $options = []): void { diff --git a/src/Viserio/Component/Mail/QueueMailer.php b/src/Viserio/Component/Mail/QueueMailer.php index 45b0a0f26..174ed7721 100644 --- a/src/Viserio/Component/Mail/QueueMailer.php +++ b/src/Viserio/Component/Mail/QueueMailer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail; @@ -31,10 +31,6 @@ class QueueMailer extends Mailer implements QueueMailerContract /** * Create a new Mailer instance. - * - * @param Swift_Mailer $swiftMailer - * @param \Viserio\Contract\Queue\QueueConnector $queue - * @param array $config */ public function __construct(Swift_Mailer $swiftMailer, QueueConnectorContract $queue, array $config) { @@ -137,8 +133,6 @@ protected function buildQueueCallable($callback) /** * Get the true callable for a queued e-mail message. * - * @param array $data - * * @return Closure|string */ protected function getQueuedCallable(array $data) diff --git a/src/Viserio/Component/Mail/Tests/Container/Provider/MailServiceProviderTest.php b/src/Viserio/Component/Mail/Tests/Container/Provider/MailServiceProviderTest.php index 4f4a5932c..dfe5c4016 100644 --- a/src/Viserio/Component/Mail/Tests/Container/Provider/MailServiceProviderTest.php +++ b/src/Viserio/Component/Mail/Tests/Container/Provider/MailServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Container\Provider; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class MailServiceProviderTest extends AbstractContainerTestCase { @@ -80,8 +81,6 @@ public function testProvider(): void * self::assertInstanceOf(QueueMailer::class, $container->get(MailerContract::class)); * self::assertInstanceOf(QueueMailer::class, $container->get('mailer')); * } - * - * @param ContainerBuilder $containerBuilder */ /** diff --git a/src/Viserio/Component/Mail/Tests/Event/MessageSendingEventTest.php b/src/Viserio/Component/Mail/Tests/Event/MessageSendingEventTest.php index edc17caa9..5f5b403a1 100644 --- a/src/Viserio/Component/Mail/Tests/Event/MessageSendingEventTest.php +++ b/src/Viserio/Component/Mail/Tests/Event/MessageSendingEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Event; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MessageSendingEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/Event/MessageSentEventTest.php b/src/Viserio/Component/Mail/Tests/Event/MessageSentEventTest.php index bde6b8a55..7ee6382d2 100644 --- a/src/Viserio/Component/Mail/Tests/Event/MessageSentEventTest.php +++ b/src/Viserio/Component/Mail/Tests/Event/MessageSentEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Event; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MessageSentEventTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/Fixture/FailingSwiftMailerStub.php b/src/Viserio/Component/Mail/Tests/Fixture/FailingSwiftMailerStub.php index cdc06b59f..b0d7ca5f8 100644 --- a/src/Viserio/Component/Mail/Tests/Fixture/FailingSwiftMailerStub.php +++ b/src/Viserio/Component/Mail/Tests/Fixture/FailingSwiftMailerStub.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Fixture; diff --git a/src/Viserio/Component/Mail/Tests/Fixture/MandrillTransportStub.php b/src/Viserio/Component/Mail/Tests/Fixture/MandrillTransportStub.php index 8dd9c4ad8..42fa6e591 100644 --- a/src/Viserio/Component/Mail/Tests/Fixture/MandrillTransportStub.php +++ b/src/Viserio/Component/Mail/Tests/Fixture/MandrillTransportStub.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Fixture; diff --git a/src/Viserio/Component/Mail/Tests/MailManagerTest.php b/src/Viserio/Component/Mail/Tests/MailManagerTest.php index 8c4eeba9f..06385fd2e 100644 --- a/src/Viserio/Component/Mail/Tests/MailManagerTest.php +++ b/src/Viserio/Component/Mail/Tests/MailManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests; @@ -32,6 +32,7 @@ * @internal * * @small + * @coversNothing */ final class MailManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/MailerTest.php b/src/Viserio/Component/Mail/Tests/MailerTest.php index c02d9c252..ff778522b 100644 --- a/src/Viserio/Component/Mail/Tests/MailerTest.php +++ b/src/Viserio/Component/Mail/Tests/MailerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests; @@ -35,6 +35,7 @@ * @internal * * @small + * @coversNothing */ final class MailerTest extends MockeryTestCase { @@ -356,9 +357,6 @@ protected function allowMockingNonExistentMethods($allow = false): void parent::allowMockingNonExistentMethods(true); } - /** - * @return \Mockery\MockInterface - */ private function arrangeMailerWithMessage(): MockInterface { $mailer = Mock::mock(Mailer::class . '[createMessage]', [$this->swiftMock, []]) diff --git a/src/Viserio/Component/Mail/Tests/MessageTest.php b/src/Viserio/Component/Mail/Tests/MessageTest.php index 2ff7d343a..2e58966f0 100644 --- a/src/Viserio/Component/Mail/Tests/MessageTest.php +++ b/src/Viserio/Component/Mail/Tests/MessageTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MessageTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/QueueMailerTest.php b/src/Viserio/Component/Mail/Tests/QueueMailerTest.php index 8ba438d39..98db96604 100644 --- a/src/Viserio/Component/Mail/Tests/QueueMailerTest.php +++ b/src/Viserio/Component/Mail/Tests/QueueMailerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class QueueMailerTest extends MockeryTestCase { @@ -173,9 +174,6 @@ private function arrangeSwiftTransport(): void ->andReturn($transport); } - /** - * @return object - */ private function createAMockMailerObject(): object { $message = $this->messageMock; diff --git a/src/Viserio/Component/Mail/Tests/Transport/ArrayTransportTest.php b/src/Viserio/Component/Mail/Tests/Transport/ArrayTransportTest.php index 21a8ae55e..8c12b150b 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/ArrayTransportTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/ArrayTransportTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ArrayTransportTest extends TestCase { diff --git a/src/Viserio/Component/Mail/Tests/Transport/Fixture/SendRawEmailMock.php b/src/Viserio/Component/Mail/Tests/Transport/Fixture/SendRawEmailMock.php index 2342668be..532fbd757 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/Fixture/SendRawEmailMock.php +++ b/src/Viserio/Component/Mail/Tests/Transport/Fixture/SendRawEmailMock.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport\Fixture; @@ -24,10 +24,6 @@ public function __construct($responseValue) /** * Mock the get() call for the sendRawEmail response. - * - * @param mixed $key - * - * @return string */ public function get($key): string { diff --git a/src/Viserio/Component/Mail/Tests/Transport/LogTransportTest.php b/src/Viserio/Component/Mail/Tests/Transport/LogTransportTest.php index ed0c40bf0..a3c1dc16c 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/LogTransportTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/LogTransportTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class LogTransportTest extends MockeryTestCase { @@ -44,10 +45,6 @@ public function testSend(): void /** * Get a loggable string out of a Swiftmailer entity. - * - * @param Swift_Message $entity - * - * @return string */ protected function getMimeEntityString(Swift_Message $entity): string { diff --git a/src/Viserio/Component/Mail/Tests/Transport/MailgunTest.php b/src/Viserio/Component/Mail/Tests/Transport/MailgunTest.php index 78fb0587c..71386951f 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/MailgunTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/MailgunTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MailgunTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/Transport/MandrillTransportTest.php b/src/Viserio/Component/Mail/Tests/Transport/MandrillTransportTest.php index 31bde8eeb..f12f72f26 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/MandrillTransportTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/MandrillTransportTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MandrillTransportTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/Transport/PostmarkTransportTest.php b/src/Viserio/Component/Mail/Tests/Transport/PostmarkTransportTest.php index 73903b526..96df9ae24 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/PostmarkTransportTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/PostmarkTransportTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class PostmarkTransportTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/Transport/SesTransportTest.php b/src/Viserio/Component/Mail/Tests/Transport/SesTransportTest.php index 1ecb642fc..ca4848892 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/SesTransportTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/SesTransportTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class SesTransportTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Tests/Transport/SparkPostTest.php b/src/Viserio/Component/Mail/Tests/Transport/SparkPostTest.php index 2b1f2e056..2098a46ca 100644 --- a/src/Viserio/Component/Mail/Tests/Transport/SparkPostTest.php +++ b/src/Viserio/Component/Mail/Tests/Transport/SparkPostTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests\Transport; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class SparkPostTest extends MockeryTestCase { @@ -93,8 +94,6 @@ private function arrangeSend($endpoint): void /** * @param \GuzzleHttp\Client|\Mockery\MockInterface $client - * @param Swift_Message $message2 - * @param string $endpoint */ private function arrangeClientPost($client, Swift_Message $message2, string $endpoint): void { diff --git a/src/Viserio/Component/Mail/Tests/TransportFactoryTest.php b/src/Viserio/Component/Mail/Tests/TransportFactoryTest.php index 3791e4acb..eb2717429 100644 --- a/src/Viserio/Component/Mail/Tests/TransportFactoryTest.php +++ b/src/Viserio/Component/Mail/Tests/TransportFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Tests; @@ -32,6 +32,7 @@ * @internal * * @small + * @coversNothing */ final class TransportFactoryTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Mail/Transport/AbstractTransport.php b/src/Viserio/Component/Mail/Transport/AbstractTransport.php index 2a5516870..fd0af5a2b 100644 --- a/src/Viserio/Component/Mail/Transport/AbstractTransport.php +++ b/src/Viserio/Component/Mail/Transport/AbstractTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -57,10 +57,6 @@ public function stop(): void /** * Register a plug-in with the transport. - * - * @param Swift_Events_EventListener $plugin - * - * @return void */ public function registerPlugin(Swift_Events_EventListener $plugin): void { @@ -69,10 +65,6 @@ public function registerPlugin(Swift_Events_EventListener $plugin): void /** * Iterate through registered plugins and execute plugins' methods. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return void */ protected function beforeSendPerformed(Swift_Mime_SimpleMessage $message): void { @@ -87,10 +79,6 @@ protected function beforeSendPerformed(Swift_Mime_SimpleMessage $message): void /** * Get the number of recipients. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return int */ protected function numberOfRecipients(Swift_Mime_SimpleMessage $message): int { @@ -103,10 +91,6 @@ protected function numberOfRecipients(Swift_Mime_SimpleMessage $message): int /** * Iterate through registered plugins and execute plugins' methods. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return void */ protected function sendPerformed(Swift_Mime_SimpleMessage $message): void { diff --git a/src/Viserio/Component/Mail/Transport/ArrayTransport.php b/src/Viserio/Component/Mail/Transport/ArrayTransport.php index ad8d0208a..abf093973 100644 --- a/src/Viserio/Component/Mail/Transport/ArrayTransport.php +++ b/src/Viserio/Component/Mail/Transport/ArrayTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -26,8 +26,6 @@ class ArrayTransport extends AbstractTransport /** * Retrieve the array of messages. - * - * @return array */ public function getMessages(): array { @@ -58,8 +56,6 @@ public function ping(): bool /** * Clear all of the messages from the local array. - * - * @return void */ public function reset(): void { diff --git a/src/Viserio/Component/Mail/Transport/LogTransport.php b/src/Viserio/Component/Mail/Transport/LogTransport.php index eacf8c88e..a82bab157 100644 --- a/src/Viserio/Component/Mail/Transport/LogTransport.php +++ b/src/Viserio/Component/Mail/Transport/LogTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -28,8 +28,6 @@ class LogTransport extends AbstractTransport /** * Create a new log transport instance. - * - * @param \Psr\Log\LoggerInterface $logger */ public function __construct(LoggerInterface $logger) { @@ -62,10 +60,6 @@ public function ping(): bool /** * Get a loggable string out of a Swiftmailer entity. - * - * @param Swift_Message $entity - * - * @return string */ protected function getMimeEntityString(Swift_Message $entity): string { diff --git a/src/Viserio/Component/Mail/Transport/MailgunTransport.php b/src/Viserio/Component/Mail/Transport/MailgunTransport.php index b41c2c637..93ef77d0a 100644 --- a/src/Viserio/Component/Mail/Transport/MailgunTransport.php +++ b/src/Viserio/Component/Mail/Transport/MailgunTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -57,11 +57,6 @@ class MailgunTransport extends AbstractTransport /** * Create a new Mailgun transport instance. - * - * @param \GuzzleHttp\Client $client - * @param string $key - * @param string $domain - * @param null|string $baseUrl */ public function __construct(Client $client, string $key, string $domain, ?string $baseUrl = null) { @@ -74,8 +69,6 @@ public function __construct(Client $client, string $key, string $domain, ?string /** * Get the API key being used by the transport. - * - * @return string */ public function getKey(): string { @@ -85,8 +78,6 @@ public function getKey(): string /** * Set the API key being used by the transport. * - * @param string $key - * * @return $this */ public function setKey(string $key): self @@ -98,8 +89,6 @@ public function setKey(string $key): self /** * Get the domain being used by the transport. - * - * @return string */ public function getDomain(): string { @@ -109,8 +98,6 @@ public function getDomain(): string /** * Set the domain being used by the transport. * - * @param string $domain - * * @return $this */ public function setDomain(string $domain): self @@ -157,10 +144,6 @@ public function ping(): bool /** * Get the "to" payload field for the API request. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return string */ protected function getTo(Swift_Mime_SimpleMessage $message): string { @@ -169,10 +152,6 @@ protected function getTo(Swift_Mime_SimpleMessage $message): string /** * Get the "cc" payload field for the API request. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return string */ protected function getCc(Swift_Mime_SimpleMessage $message): string { @@ -181,10 +160,6 @@ protected function getCc(Swift_Mime_SimpleMessage $message): string /** * Get the "bcc" payload field for the API request. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return string */ protected function getBcc(Swift_Mime_SimpleMessage $message): string { @@ -193,10 +168,6 @@ protected function getBcc(Swift_Mime_SimpleMessage $message): string /** * Get Comma-Separated Address (with name, if available) for the API request. - * - * @param array $contacts - * - * @return string */ protected function formatAddress(array $contacts): string { diff --git a/src/Viserio/Component/Mail/Transport/MandrillTransport.php b/src/Viserio/Component/Mail/Transport/MandrillTransport.php index 257513ffc..da849c60f 100644 --- a/src/Viserio/Component/Mail/Transport/MandrillTransport.php +++ b/src/Viserio/Component/Mail/Transport/MandrillTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -34,9 +34,6 @@ class MandrillTransport extends AbstractTransport /** * Create a new Mandrill transport instance. - * - * @param \GuzzleHttp\Client $client - * @param string $key */ public function __construct(Client $client, string $key) { @@ -46,8 +43,6 @@ public function __construct(Client $client, string $key) /** * Get the API key being used by the transport. - * - * @return string */ public function getKey(): string { @@ -57,8 +52,6 @@ public function getKey(): string /** * Set the API key being used by the transport. * - * @param string $key - * * @return $this */ public function setKey(string $key): self @@ -104,10 +97,6 @@ public function ping(): bool /** * Get all the addresses this email should be sent to, * including "to", "cc" and "bcc" addresses. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return array */ protected function getToAddresses(Swift_Mime_SimpleMessage $message): array { diff --git a/src/Viserio/Component/Mail/Transport/PostmarkTransport.php b/src/Viserio/Component/Mail/Transport/PostmarkTransport.php index 977e135d9..7df3b5413 100644 --- a/src/Viserio/Component/Mail/Transport/PostmarkTransport.php +++ b/src/Viserio/Component/Mail/Transport/PostmarkTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -51,9 +51,6 @@ class PostmarkTransport extends AbstractTransport /** * Create a new Postmark transport instance. - * - * @param \GuzzleHttp\Client $client - * @param string $serverToken */ public function __construct(Client $client, string $serverToken) { @@ -63,8 +60,6 @@ public function __construct(Client $client, string $serverToken) /** * Get the API key being used by the transport. - * - * @return string */ public function getServerToken(): string { @@ -74,8 +69,6 @@ public function getServerToken(): string /** * Set the API Server Token being used by the transport. * - * @param string $serverToken - * * @return $this */ public function setServerToken(string $serverToken): self @@ -129,10 +122,6 @@ public function ping(): bool /** * Get the message ID from the response. - * - * @param null|\Psr\Http\Message\ResponseInterface $response - * - * @return string */ protected function getMessageId(?ResponseInterface $response): string { @@ -150,8 +139,6 @@ protected function getMessageId(?ResponseInterface $response): string * to array of emails with names. * * @param string[] $emails - * - * @return array */ protected function convertEmailsArray(array $emails): array { @@ -171,10 +158,7 @@ protected function convertEmailsArray(array $emails): array * Excludes parts of type \Swift_Mime_Attachment as those * are handled later. * - * @param Swift_Mime_SimpleMessage $message - * @param string $mimeType - * - * @return null|Swift_Mime_SimpleMimeEntity + * @param string $mimeType */ protected function getMIMEPart(Swift_Mime_SimpleMessage $message, $mimeType): ?Swift_Mime_SimpleMimeEntity { @@ -189,10 +173,6 @@ protected function getMIMEPart(Swift_Mime_SimpleMessage $message, $mimeType): ?S /** * Convert a Swift Mime Message to a Postmark Payload. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return array */ protected function getMessagePayload(Swift_Mime_SimpleMessage $message): array { @@ -206,11 +186,6 @@ protected function getMessagePayload(Swift_Mime_SimpleMessage $message): array /** * Applies the recipients of the message into the API Payload. - * - * @param array $payload - * @param Swift_Mime_SimpleMessage $message - * - * @return array */ protected function processRecipients(array $payload, Swift_Mime_SimpleMessage $message): array { @@ -248,11 +223,6 @@ protected function processRecipients(array $payload, Swift_Mime_SimpleMessage $m /** * Applies the message parts and attachments * into the API Payload. - * - * @param array $payload - * @param Swift_Mime_SimpleMessage $message - * - * @return array */ protected function processMessageParts(array $payload, Swift_Mime_SimpleMessage $message): array { @@ -308,11 +278,6 @@ protected function processMessageParts(array $payload, Swift_Mime_SimpleMessage /** * Applies the headers into the API Payload. - * - * @param array $payload - * @param Swift_Mime_SimpleMessage $message - * - * @return array */ protected function processHeaders(array $payload, Swift_Mime_SimpleMessage $message): array { diff --git a/src/Viserio/Component/Mail/Transport/SesTransport.php b/src/Viserio/Component/Mail/Transport/SesTransport.php index 38ef05da8..c69ab992d 100644 --- a/src/Viserio/Component/Mail/Transport/SesTransport.php +++ b/src/Viserio/Component/Mail/Transport/SesTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -27,8 +27,6 @@ class SesTransport extends AbstractTransport /** * Create a new SES transport instance. - * - * @param \Aws\Ses\SesClient $ses */ public function __construct(SesClient $ses) { diff --git a/src/Viserio/Component/Mail/Transport/SparkPostTransport.php b/src/Viserio/Component/Mail/Transport/SparkPostTransport.php index 4d88f1e77..9417cb4e7 100644 --- a/src/Viserio/Component/Mail/Transport/SparkPostTransport.php +++ b/src/Viserio/Component/Mail/Transport/SparkPostTransport.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail\Transport; @@ -51,11 +51,6 @@ class SparkPostTransport extends AbstractTransport /** * Create a new SparkPost transport instance. - * - * @param \GuzzleHttp\Client $client - * @param string $key - * @param array $options - * @param null|string $endpoint */ public function __construct(Client $client, string $key, array $options = [], ?string $endpoint = null) { @@ -67,8 +62,6 @@ public function __construct(Client $client, string $key, array $options = [], ?s /** * Get the API key being used by the transport. - * - * @return string */ public function getKey(): string { @@ -78,8 +71,6 @@ public function getKey(): string /** * Set the API key being used by the transport. * - * @param string $key - * * @return $this */ public function setKey(string $key): self @@ -91,8 +82,6 @@ public function setKey(string $key): self /** * Get the transmission options being used by the transport. - * - * @return array */ public function getOptions(): array { @@ -102,8 +91,6 @@ public function getOptions(): array /** * Set the transmission options being used by the transport. * - * @param array $options - * * @return $this */ public function setOptions(array $options): self @@ -161,10 +148,6 @@ public function ping(): bool /** * Get the transmission ID from the response. - * - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return null|string */ protected function getTransmissionId(ResponseInterface $response): ?string { @@ -185,10 +168,6 @@ protected function getTransmissionId(ResponseInterface $response): ?string * Get all the addresses this message should be sent to. * * Note that SparkPost still respects CC, BCC headers in raw message itself. - * - * @param Swift_Mime_SimpleMessage $message - * - * @return array */ protected function getRecipients(Swift_Mime_SimpleMessage $message): array { diff --git a/src/Viserio/Component/Mail/TransportFactory.php b/src/Viserio/Component/Mail/TransportFactory.php index 1ca6c5236..620db7a8e 100644 --- a/src/Viserio/Component/Mail/TransportFactory.php +++ b/src/Viserio/Component/Mail/TransportFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Mail; @@ -50,8 +50,6 @@ class TransportFactory implements LoggerAwareInterface /** * Get all of the created "transports". - * - * @return array */ public function getTransports(): array { @@ -61,12 +59,7 @@ public function getTransports(): array /** * Get a transport instance. * - * @param string $transport - * @param array $config - * * @throws \Viserio\Contract\Mail\Exception\InvalidArgumentException - * - * @return Swift_Transport */ public function getTransport(string $transport, array $config): Swift_Transport { @@ -83,12 +76,7 @@ public function getTransport(string $transport, array $config): Swift_Transport /** * Make a new transport instance. * - * @param string $transport - * @param array $config - * * @throws \Viserio\Contract\Mail\Exception\InvalidArgumentException - * - * @return Swift_Transport */ public function createTransport(string $transport, array $config): Swift_Transport { @@ -101,10 +89,6 @@ public function createTransport(string $transport, array $config): Swift_Transpo /** * Check if the given transport is supported. - * - * @param string $transport - * - * @return bool */ public function hasTransport(string $transport): bool { @@ -124,12 +108,7 @@ public function extend(string $driver, Closure $callback): void /** * Make a new driver instance. * - * @param array $config - * @param string $method - * * @throws \Viserio\Contract\Mail\Exception\InvalidArgumentException - * - * @return Swift_Transport */ protected function create(array $config, string $method): Swift_Transport { @@ -146,11 +125,6 @@ protected function create(array $config, string $method): Swift_Transport /** * Call a custom connection / driver creator. - * - * @param string $extension - * @param array $config - * - * @return mixed */ protected function callCustomCreator(string $extension, array $config = []) { @@ -159,8 +133,6 @@ protected function callCustomCreator(string $extension, array $config = []) /** * Create an instance of the Log Swift Transport driver. - * - * @return \Viserio\Component\Mail\Transport\LogTransport */ protected function createLogTransport(): LogTransport { @@ -169,8 +141,6 @@ protected function createLogTransport(): LogTransport /** * Create an instance of the Log Swift Transport driver. - * - * @return \Viserio\Component\Mail\Transport\ArrayTransport */ protected function createArrayTransport(): ArrayTransport { @@ -179,10 +149,6 @@ protected function createArrayTransport(): ArrayTransport /** * Create an instance of the Sendmail Swift Transport driver. - * - * @param array $config - * - * @return Swift_SendmailTransport */ protected function createSendmailTransport(array $config): Swift_SendmailTransport { @@ -191,10 +157,6 @@ protected function createSendmailTransport(array $config): Swift_SendmailTranspo /** * Create an instance of the SMTP Swift Transport driver. - * - * @param array $config - * - * @return Swift_SmtpTransport */ protected function createSmtpTransport(array $config): Swift_SmtpTransport { @@ -226,10 +188,6 @@ protected function createSmtpTransport(array $config): Swift_SmtpTransport /** * Create an instance of the Mailgun Swift Transport driver. - * - * @param array $config - * - * @return \Viserio\Component\Mail\Transport\MailgunTransport */ protected function createMailgunTransport(array $config): MailgunTransport { @@ -243,10 +201,6 @@ protected function createMailgunTransport(array $config): MailgunTransport /** * Create an instance of the Mandrill Swift Transport driver. - * - * @param array $config - * - * @return \Viserio\Component\Mail\Transport\MandrillTransport */ protected function createMandrillTransport(array $config): MandrillTransport { @@ -258,10 +212,6 @@ protected function createMandrillTransport(array $config): MandrillTransport /** * Create an instance of the SparkPost Swift Transport driver. - * - * @param array $config - * - * @return \Viserio\Component\Mail\Transport\SparkPostTransport */ protected function createSparkPostTransport(array $config): SparkPostTransport { @@ -276,11 +226,7 @@ protected function createSparkPostTransport(array $config): SparkPostTransport /** * Create an instance of the Amazon SES Swift Transport driver. * - * @param array $config - * * @throws \InvalidArgumentException - * - * @return \Viserio\Component\Mail\Transport\SesTransport */ protected function createSesTransport(array $config): SesTransport { @@ -298,10 +244,6 @@ protected function createSesTransport(array $config): SesTransport /** * Get a fresh Guzzle HTTP client instance. - * - * @param array $config - * - * @return \GuzzleHttp\Client */ protected function getHttpClient(array $config): HttpClient { diff --git a/src/Viserio/Component/Mail/composer.json b/src/Viserio/Component/Mail/composer.json index d5f43bd71..f2bbf1412 100644 --- a/src/Viserio/Component/Mail/composer.json +++ b/src/Viserio/Component/Mail/composer.json @@ -41,13 +41,12 @@ "aws/aws-sdk-php": "^3.0", "guzzlehttp/guzzle": "^6.0", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "nyholm/nsa": "^1.1.0", "opis/closure": "^3.0", "phpunit/phpunit": "8.2.*", "psr/log": "^1.1.0", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/events": "^1.0@dev", "viserio/filesystem": "^1.0@dev", diff --git a/src/Viserio/Component/Mail/phpstan.neon b/src/Viserio/Component/Mail/phpstan.neon index 613320f02..da4b9e9ce 100644 --- a/src/Viserio/Component/Mail/phpstan.neon +++ b/src/Viserio/Component/Mail/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Mail/phpunit.xml b/src/Viserio/Component/Mail/phpunit.xml new file mode 100644 index 000000000..deb853b1a --- /dev/null +++ b/src/Viserio/Component/Mail/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Mail/phpunit.xml.dist b/src/Viserio/Component/Mail/phpunit.xml.dist deleted file mode 100644 index c34e30ea8..000000000 --- a/src/Viserio/Component/Mail/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Manager/.gitignore b/src/Viserio/Component/Manager/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Manager/.gitignore +++ b/src/Viserio/Component/Manager/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Manager/AbstractConnectionManager.php b/src/Viserio/Component/Manager/AbstractConnectionManager.php index e55fa68b0..dbed7b2a6 100644 --- a/src/Viserio/Component/Manager/AbstractConnectionManager.php +++ b/src/Viserio/Component/Manager/AbstractConnectionManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager; @@ -53,11 +53,6 @@ public function __construct($config) /** * Dynamically pass methods to the default connection. - * - * @param string $method - * @param array $parameters - * - * @return mixed */ public function __call(string $method, array $parameters) { diff --git a/src/Viserio/Component/Manager/AbstractManager.php b/src/Viserio/Component/Manager/AbstractManager.php index a8173f23a..0324056ff 100644 --- a/src/Viserio/Component/Manager/AbstractManager.php +++ b/src/Viserio/Component/Manager/AbstractManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager; @@ -53,11 +53,6 @@ public function __construct($config) /** * Dynamically call the default driver instance. - * - * @param string $method - * @param array $parameters - * - * @return mixed */ public function __call(string $method, array $parameters) { diff --git a/src/Viserio/Component/Manager/Tests/AbstractConnectionManagerTest.php b/src/Viserio/Component/Manager/Tests/AbstractConnectionManagerTest.php index 6071f9312..96dd4562d 100644 --- a/src/Viserio/Component/Manager/Tests/AbstractConnectionManagerTest.php +++ b/src/Viserio/Component/Manager/Tests/AbstractConnectionManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class AbstractConnectionManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Manager/Tests/AbstractManagerTest.php b/src/Viserio/Component/Manager/Tests/AbstractManagerTest.php index fca7ca9f8..0dc6f6667 100644 --- a/src/Viserio/Component/Manager/Tests/AbstractManagerTest.php +++ b/src/Viserio/Component/Manager/Tests/AbstractManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class AbstractManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Manager/Tests/Fixture/TestConnectionManager.php b/src/Viserio/Component/Manager/Tests/Fixture/TestConnectionManager.php index 2e362756d..05aa4e462 100644 --- a/src/Viserio/Component/Manager/Tests/Fixture/TestConnectionManager.php +++ b/src/Viserio/Component/Manager/Tests/Fixture/TestConnectionManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager\Tests\Fixture; @@ -34,8 +34,6 @@ public function getName(): string /** * Get the configuration name. - * - * @return string */ protected static function getConfigName(): string { diff --git a/src/Viserio/Component/Manager/Tests/Fixture/TestManager.php b/src/Viserio/Component/Manager/Tests/Fixture/TestManager.php index ec4d02428..0f74435e2 100644 --- a/src/Viserio/Component/Manager/Tests/Fixture/TestManager.php +++ b/src/Viserio/Component/Manager/Tests/Fixture/TestManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager\Tests\Fixture; @@ -40,8 +40,6 @@ protected function createTestmanagerDriver($config) /** * Get the configuration name. - * - * @return string */ protected static function getConfigName(): string { diff --git a/src/Viserio/Component/Manager/Traits/ManagerTrait.php b/src/Viserio/Component/Manager/Traits/ManagerTrait.php index 66f475467..797bcf0b0 100644 --- a/src/Viserio/Component/Manager/Traits/ManagerTrait.php +++ b/src/Viserio/Component/Manager/Traits/ManagerTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Manager\Traits; @@ -74,11 +74,6 @@ public function extend(string $driver, Closure $callback): void /** * Call a custom connection / driver creator. - * - * @param string $extension - * @param array $config - * - * @return mixed */ protected function callCustomCreator(string $extension, array $config = []) { @@ -87,10 +82,6 @@ protected function callCustomCreator(string $extension, array $config = []) /** * Get config on adapter name. - * - * @param string $name - * - * @return array */ protected function getConfigFromName(string $name): array { @@ -109,13 +100,7 @@ protected function getConfigFromName(string $name): array /** * Make a new driver instance. * - * @param array $config - * @param string $method - * @param string $errorMessage - * * @throws \Viserio\Contract\Manager\Exception\InvalidArgumentException - * - * @return mixed */ protected function create(array $config, string $method, string $errorMessage) { @@ -134,10 +119,6 @@ protected function create(array $config, string $method, string $errorMessage) /** * Convert a value to studly caps case. - * - * @param string $value - * - * @return string */ protected static function studly(string $value): string { @@ -158,8 +139,6 @@ protected static function studly(string $value): string /** * Get the configuration name. - * - * @return string */ abstract protected static function getConfigName(): string; } diff --git a/src/Viserio/Component/Manager/composer.json b/src/Viserio/Component/Manager/composer.json index 0100417b2..a285f4262 100644 --- a/src/Viserio/Component/Manager/composer.json +++ b/src/Viserio/Component/Manager/composer.json @@ -34,10 +34,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", - "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0" + "phpunit/phpunit": "8.2.*" }, "extra": { "branch-alias": { diff --git a/src/Viserio/Component/Manager/phpstan.neon b/src/Viserio/Component/Manager/phpstan.neon index 4827e2fcf..62e878fa3 100644 --- a/src/Viserio/Component/Manager/phpstan.neon +++ b/src/Viserio/Component/Manager/phpstan.neon @@ -1,26 +1,16 @@ includes: -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Manager/phpunit.xml b/src/Viserio/Component/Manager/phpunit.xml new file mode 100644 index 000000000..e3c129233 --- /dev/null +++ b/src/Viserio/Component/Manager/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Manager/phpunit.xml.dist b/src/Viserio/Component/Manager/phpunit.xml.dist deleted file mode 100644 index b3e6bd448..000000000 --- a/src/Viserio/Component/Manager/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Pagination/.gitignore b/src/Viserio/Component/Pagination/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Pagination/.gitignore +++ b/src/Viserio/Component/Pagination/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Pagination/AbstractPaginator.php b/src/Viserio/Component/Pagination/AbstractPaginator.php index fd77b2b11..19f8f2c64 100644 --- a/src/Viserio/Component/Pagination/AbstractPaginator.php +++ b/src/Viserio/Component/Pagination/AbstractPaginator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination; @@ -102,11 +102,6 @@ abstract class AbstractPaginator implements ArrayableContract, /** * Make dynamic calls into the collection. * - * @param string $method - * @param array $parameters - * - * @return mixed - * * @codeCoverageIgnore */ public function __call(string $method, array $parameters) @@ -286,8 +281,6 @@ public function appends($key, ?string $value = null): PaginatorContract /** * Get an iterator for the items. * - * @return ArrayIterator - * * @codeCoverageIgnore */ public function getIterator(): ArrayIterator @@ -307,8 +300,6 @@ public function isEmpty(): bool /** * Get the number of items for the current page. - * - * @return int */ public function count(): int { @@ -368,8 +359,6 @@ public function hasPages(): bool /** * Set the paginator's underlying collection. * - * @param \Narrowspark\Collection\Collection $collection - * * @return $this * * @codeCoverageIgnore @@ -384,8 +373,6 @@ public function setCollection(Collection $collection) /** * Get the paginator's underlying collection. * - * @return \Narrowspark\Collection\Collection - * * @codeCoverageIgnore */ public function getCollection(): Collection @@ -396,10 +383,6 @@ public function getCollection(): Collection /** * Determine if the given item exist. * - * @param mixed $key - * - * @return bool - * * @codeCoverageIgnore */ public function offsetExists($key): bool @@ -410,10 +393,6 @@ public function offsetExists($key): bool /** * Get the item at the given offset. * - * @param mixed $key - * - * @return mixed - * * @codeCoverageIgnore */ public function offsetGet($key) @@ -424,9 +403,6 @@ public function offsetGet($key) /** * Set the item at the given offset. * - * @param mixed $key - * @param mixed $value - * * @codeCoverageIgnore */ public function offsetSet($key, $value): void @@ -437,8 +413,6 @@ public function offsetSet($key, $value): void /** * Unset the item at the given key. * - * @param mixed $key - * * @codeCoverageIgnore */ public function offsetUnset($key): void @@ -448,8 +422,6 @@ public function offsetUnset($key): void /** * Build the full fragment portion of a URL. - * - * @return string */ protected function buildFragment(): string { @@ -459,8 +431,6 @@ protected function buildFragment(): string /** * Add an array of query string values. * - * @param array $keys - * * @return $this */ protected function appendArray(array $keys) @@ -474,10 +444,6 @@ protected function appendArray(array $keys) /** * Determine if the given value is a valid page number. - * - * @param int $page - * - * @return bool */ protected function isValidPageNumber(int $page): bool { @@ -486,8 +452,6 @@ protected function isValidPageNumber(int $page): bool /** * Resolve the current page or return the default value. - * - * @return int */ protected function resolveCurrentPage(): int { @@ -508,10 +472,6 @@ protected function resolveCurrentPage(): int /** * At least check if the input string does not have null-byte * and is a UTF-8 valid string. - * - * @param array $query - * - * @return array */ private function secureInput(array $query): array { diff --git a/src/Viserio/Component/Pagination/Adapter/ArrayAdapter.php b/src/Viserio/Component/Pagination/Adapter/ArrayAdapter.php index ce2035f58..49eb03c70 100644 --- a/src/Viserio/Component/Pagination/Adapter/ArrayAdapter.php +++ b/src/Viserio/Component/Pagination/Adapter/ArrayAdapter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Adapter; @@ -33,9 +33,6 @@ class ArrayAdapter implements AdapterContract /** * Create a new Array adapter. - * - * @param array $array - * @param int $itemsPerPage */ public function __construct(array $array, int $itemsPerPage) { diff --git a/src/Viserio/Component/Pagination/Adapter/DoctrineDbalAdapter.php b/src/Viserio/Component/Pagination/Adapter/DoctrineDbalAdapter.php index d7223e675..ca1506a76 100644 --- a/src/Viserio/Component/Pagination/Adapter/DoctrineDbalAdapter.php +++ b/src/Viserio/Component/Pagination/Adapter/DoctrineDbalAdapter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Adapter; @@ -36,9 +36,6 @@ class DoctrineDbalAdapter implements AdapterContract /** * Create a new DoctrineDbal adapter. * - * @param \Doctrine\DBAL\Query\QueryBuilder $queryBuilder - * @param int $itemsPerPage - * * @throws InvalidArgumentException */ public function __construct(QueryBuilder $queryBuilder, int $itemsPerPage) diff --git a/src/Viserio/Component/Pagination/Adapter/NullAdapter.php b/src/Viserio/Component/Pagination/Adapter/NullAdapter.php index 6d4e4477b..7d7f81d6a 100644 --- a/src/Viserio/Component/Pagination/Adapter/NullAdapter.php +++ b/src/Viserio/Component/Pagination/Adapter/NullAdapter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Adapter; diff --git a/src/Viserio/Component/Pagination/Paginator.php b/src/Viserio/Component/Pagination/Paginator.php index 92903c61f..a4772eaeb 100644 --- a/src/Viserio/Component/Pagination/Paginator.php +++ b/src/Viserio/Component/Pagination/Paginator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination; @@ -55,9 +55,6 @@ class Paginator extends AbstractPaginator /** * Create a new paginator. - * - * @param \Viserio\Contract\Pagination\Adapter $adapter - * @param \Psr\Http\Message\ServerRequestInterface $request */ public function __construct(AdapterContract $adapter, ServerRequestInterface $request) { @@ -74,9 +71,6 @@ public function __construct(AdapterContract $adapter, ServerRequestInterface $re /** * Add a new presenter. * - * @param string $key - * @param \Viserio\Contract\Pagination\Presenter $presenter - * * @return $this */ public function addPresenter(string $key, PresenterContract $presenter): self @@ -89,8 +83,6 @@ public function addPresenter(string $key, PresenterContract $presenter): self /** * Set a default presenter. * - * @param string $presenter - * * @return $this */ public function setDefaultPresenter(string $presenter): self @@ -102,8 +94,6 @@ public function setDefaultPresenter(string $presenter): self /** * Get the default presenter. - * - * @return string */ public function getDefaultPresenter(): string { @@ -174,8 +164,6 @@ public function toJson(int $options = 0): string /** * Manually indicate that the paginator does have more pages. * - * @param bool $value - * * @return $this * * @codeCoverageIgnore @@ -189,8 +177,6 @@ public function hasMorePagesWhen(bool $value = true): self /** * Determine if there are more items in the data source. - * - * @return bool */ public function hasMorePages(): bool { @@ -209,8 +195,6 @@ public function getCurrentPage(): int /** * Check for more pages. The last item will be sliced off. - * - * @return void */ protected function checkForMorePages(): void { diff --git a/src/Viserio/Component/Pagination/Presenter/Bootstrap4.php b/src/Viserio/Component/Pagination/Presenter/Bootstrap4.php index 0a14e3010..caea95dcc 100644 --- a/src/Viserio/Component/Pagination/Presenter/Bootstrap4.php +++ b/src/Viserio/Component/Pagination/Presenter/Bootstrap4.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Presenter; @@ -27,8 +27,6 @@ class Bootstrap4 implements PresenterContract /** * Create a new Bootstrap 4 presenter. - * - * @param \Viserio\Contract\Pagination\Paginator $paginator */ public function __construct(PaginatorContract $paginator) { @@ -74,7 +72,6 @@ public function render(): string /** * Get all paginations page links. * - * @param array $items * @param string $pagination */ private function getPaginationsLinks(array $items, $pagination): void diff --git a/src/Viserio/Component/Pagination/Presenter/Foundation6.php b/src/Viserio/Component/Pagination/Presenter/Foundation6.php index 2c81fba3c..a6feb72c3 100644 --- a/src/Viserio/Component/Pagination/Presenter/Foundation6.php +++ b/src/Viserio/Component/Pagination/Presenter/Foundation6.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Presenter; @@ -27,8 +27,6 @@ class Foundation6 implements PresenterContract /** * Create a new Foundation 6 presenter. - * - * @param \Viserio\Contract\Pagination\Paginator $paginator */ public function __construct(PaginatorContract $paginator) { @@ -74,7 +72,6 @@ public function render(): string /** * Get all paginations page links. * - * @param array $items * @param string $pagination */ private function getPaginationsLinks(array $items, $pagination): void diff --git a/src/Viserio/Component/Pagination/Presenter/SemanticUi.php b/src/Viserio/Component/Pagination/Presenter/SemanticUi.php index d85527dd9..200e9d1b9 100644 --- a/src/Viserio/Component/Pagination/Presenter/SemanticUi.php +++ b/src/Viserio/Component/Pagination/Presenter/SemanticUi.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Presenter; @@ -27,8 +27,6 @@ class SemanticUi implements PresenterContract /** * Create a new semantic-ui presenter. - * - * @param \Viserio\Contract\Pagination\Paginator $paginator */ public function __construct(PaginatorContract $paginator) { @@ -74,7 +72,6 @@ public function render(): string /** * Get all paginations page links. * - * @param array $items * @param string $pagination */ private function getPaginationsLinks(array $items, $pagination): void diff --git a/src/Viserio/Component/Pagination/Presenter/SimplePagination.php b/src/Viserio/Component/Pagination/Presenter/SimplePagination.php index baf7aa5a7..3aaf70294 100644 --- a/src/Viserio/Component/Pagination/Presenter/SimplePagination.php +++ b/src/Viserio/Component/Pagination/Presenter/SimplePagination.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Presenter; @@ -27,8 +27,6 @@ class SimplePagination implements PresenterContract /** * Create a new Simple pagination presenter. - * - * @param \Viserio\Contract\Pagination\Paginator $paginator */ public function __construct(PaginatorContract $paginator) { diff --git a/src/Viserio/Component/Pagination/Tests/Adapter/ArrayAdapterTest.php b/src/Viserio/Component/Pagination/Tests/Adapter/ArrayAdapterTest.php index bc47adfed..a8326d67d 100644 --- a/src/Viserio/Component/Pagination/Tests/Adapter/ArrayAdapterTest.php +++ b/src/Viserio/Component/Pagination/Tests/Adapter/ArrayAdapterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests\Adapter; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class ArrayAdapterTest extends TestCase { diff --git a/src/Viserio/Component/Pagination/Tests/Adapter/NullAdapterTest.php b/src/Viserio/Component/Pagination/Tests/Adapter/NullAdapterTest.php index 3e541f607..08b30ddaf 100644 --- a/src/Viserio/Component/Pagination/Tests/Adapter/NullAdapterTest.php +++ b/src/Viserio/Component/Pagination/Tests/Adapter/NullAdapterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests\Adapter; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class NullAdapterTest extends TestCase { diff --git a/src/Viserio/Component/Pagination/Tests/PaginatorTest.php b/src/Viserio/Component/Pagination/Tests/PaginatorTest.php index 01e986fd3..e4d7b3ba8 100644 --- a/src/Viserio/Component/Pagination/Tests/PaginatorTest.php +++ b/src/Viserio/Component/Pagination/Tests/PaginatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class PaginatorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Pagination/Tests/Presenter/Bootstrap4Test.php b/src/Viserio/Component/Pagination/Tests/Presenter/Bootstrap4Test.php index 723e02369..75cf13e5b 100644 --- a/src/Viserio/Component/Pagination/Tests/Presenter/Bootstrap4Test.php +++ b/src/Viserio/Component/Pagination/Tests/Presenter/Bootstrap4Test.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests\Presenters; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class Bootstrap4Test extends MockeryTestCase { diff --git a/src/Viserio/Component/Pagination/Tests/Presenter/Foundation6Test.php b/src/Viserio/Component/Pagination/Tests/Presenter/Foundation6Test.php index becc1dc2e..951d6a6b7 100644 --- a/src/Viserio/Component/Pagination/Tests/Presenter/Foundation6Test.php +++ b/src/Viserio/Component/Pagination/Tests/Presenter/Foundation6Test.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests\Presenters; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class Foundation6Test extends MockeryTestCase { diff --git a/src/Viserio/Component/Pagination/Tests/Presenter/SemanticUiTest.php b/src/Viserio/Component/Pagination/Tests/Presenter/SemanticUiTest.php index 672d07c4f..b3021f501 100644 --- a/src/Viserio/Component/Pagination/Tests/Presenter/SemanticUiTest.php +++ b/src/Viserio/Component/Pagination/Tests/Presenter/SemanticUiTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests\Presenters; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class SemanticUiTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Pagination/Tests/Presenter/SimplePaginationTest.php b/src/Viserio/Component/Pagination/Tests/Presenter/SimplePaginationTest.php index 56e3e0828..78b0e7755 100644 --- a/src/Viserio/Component/Pagination/Tests/Presenter/SimplePaginationTest.php +++ b/src/Viserio/Component/Pagination/Tests/Presenter/SimplePaginationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pagination\Tests\Presenters; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class SimplePaginationTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Pagination/composer.json b/src/Viserio/Component/Pagination/composer.json index b7373fec2..d1a274135 100644 --- a/src/Viserio/Component/Pagination/composer.json +++ b/src/Viserio/Component/Pagination/composer.json @@ -40,11 +40,10 @@ "require-dev": { "doctrine/dbal": "^2.5", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", "psr/container": "^1.0.0", - "slam/phpstan-extensions": "^4.0.0", "viserio/http-factory": "^1.0@dev" }, "extra": { diff --git a/src/Viserio/Component/Pagination/phpstan.neon b/src/Viserio/Component/Pagination/phpstan.neon index d426e7219..aa4f19f01 100644 --- a/src/Viserio/Component/Pagination/phpstan.neon +++ b/src/Viserio/Component/Pagination/phpstan.neon @@ -1,26 +1,16 @@ includes: -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Pagination/phpunit.xml b/src/Viserio/Component/Pagination/phpunit.xml new file mode 100644 index 000000000..0c989dd8e --- /dev/null +++ b/src/Viserio/Component/Pagination/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Pagination/phpunit.xml.dist b/src/Viserio/Component/Pagination/phpunit.xml.dist deleted file mode 100644 index 633aca8ff..000000000 --- a/src/Viserio/Component/Pagination/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Parser/.gitignore b/src/Viserio/Component/Parser/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Parser/.gitignore +++ b/src/Viserio/Component/Parser/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Parser/Command/AbstractLintCommand.php b/src/Viserio/Component/Parser/Command/AbstractLintCommand.php index 8790a8b6d..b4ba1beea 100644 --- a/src/Viserio/Component/Parser/Command/AbstractLintCommand.php +++ b/src/Viserio/Component/Parser/Command/AbstractLintCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Command; @@ -65,12 +65,8 @@ public function handle(): int * Get display type from format. * * @param array>|bool|string>> $files - * @param string $format - * @param bool $displayCorrectFiles * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException - * - * @return int */ protected function display(array $files, string $format, bool $displayCorrectFiles): int { @@ -89,9 +85,6 @@ protected function display(array $files, string $format, bool $displayCorrectFil * Display errors in txt format. * * @param array>|bool|string>> $filesInfo - * @param bool $displayCorrectFiles - * - * @return int */ abstract protected function displayTxt(array $filesInfo, bool $displayCorrectFiles): int; @@ -99,8 +92,6 @@ abstract protected function displayTxt(array $filesInfo, bool $displayCorrectFil * Display errors in json format. * * @param array>|bool|string>> $filesInfo - * - * @return int */ protected function displayJson(array $filesInfo): int { @@ -124,9 +115,6 @@ protected function displayJson(array $filesInfo): int /** * Validate file content. * - * @param string $content - * @param null|string $file - * * @return array */ abstract protected function validate(string $content, ?string $file = null): array; @@ -134,8 +122,6 @@ abstract protected function validate(string $content, ?string $file = null): arr /** * Get a generator of files. * - * @param string $fileOrDirectory - * * @return Generator */ protected function getFiles(string $fileOrDirectory): Generator @@ -158,8 +144,6 @@ protected function getFiles(string $fileOrDirectory): Generator /** * Get content from stdin. - * - * @return null|string */ protected function getStdin(): ?string { @@ -179,8 +163,6 @@ protected function getStdin(): ?string /** * Get item from dirs. * - * @param string $directory - * * @return RecursiveIteratorIterator */ protected static function getDirectoryIterator(string $directory): RecursiveIteratorIterator diff --git a/src/Viserio/Component/Parser/Command/XliffLintCommand.php b/src/Viserio/Component/Parser/Command/XliffLintCommand.php index 454476b88..0d660284f 100644 --- a/src/Viserio/Component/Parser/Command/XliffLintCommand.php +++ b/src/Viserio/Component/Parser/Command/XliffLintCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Command; @@ -132,10 +132,6 @@ protected function displayTxt(array $filesInfo, bool $displayCorrectFiles): int /** * Get the target language from file. - * - * @param DOMDocument $xliffContents - * - * @return null|string */ private function getTargetLanguageFromFile(DOMDocument $xliffContents): ?string { diff --git a/src/Viserio/Component/Parser/Command/YamlLintCommand.php b/src/Viserio/Component/Parser/Command/YamlLintCommand.php index b0f972737..3bd013b93 100644 --- a/src/Viserio/Component/Parser/Command/YamlLintCommand.php +++ b/src/Viserio/Component/Parser/Command/YamlLintCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Command; @@ -118,8 +118,6 @@ protected function displayTxt(array $filesInfo, bool $displayCorrectFiles): int /** * Get a parser instance. - * - * @return \Symfony\Component\Yaml\Parser */ private function getParser(): Parser { diff --git a/src/Viserio/Component/Parser/Container/Provider/ConsoleCommandsServiceProvider.php b/src/Viserio/Component/Parser/Container/Provider/ConsoleCommandsServiceProvider.php index 8d3fe6bc3..749f7c284 100644 --- a/src/Viserio/Component/Parser/Container/Provider/ConsoleCommandsServiceProvider.php +++ b/src/Viserio/Component/Parser/Container/Provider/ConsoleCommandsServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Container\Provider; diff --git a/src/Viserio/Component/Parser/Container/Provider/ParserServiceProvider.php b/src/Viserio/Component/Parser/Container/Provider/ParserServiceProvider.php index 7bcbaaba6..d6ad5bbbb 100644 --- a/src/Viserio/Component/Parser/Container/Provider/ParserServiceProvider.php +++ b/src/Viserio/Component/Parser/Container/Provider/ParserServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Container\Provider; diff --git a/src/Viserio/Component/Parser/Dumper.php b/src/Viserio/Component/Parser/Dumper.php index aa5bb3133..5ddd5aa71 100644 --- a/src/Viserio/Component/Parser/Dumper.php +++ b/src/Viserio/Component/Parser/Dumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser; @@ -73,11 +73,6 @@ class Dumper /** * Add a new mime type with extension. - * - * @param string $mimeType - * @param string $extension - * - * @return void */ public function addMimeType(string $mimeType, string $extension): void { @@ -86,11 +81,6 @@ public function addMimeType(string $mimeType, string $extension): void /** * Add a new dumper. - * - * @param \Viserio\Contract\Parser\Dumper $dumper - * @param string $extension - * - * @return void */ public function addDumper(DumperContract $dumper, string $extension): void { @@ -101,12 +91,9 @@ public function addDumper(DumperContract $dumper, string $extension): void * Dump data in your choosing format. * * @param array $data - * @param string $format * * @throws \Viserio\Contract\Parser\Exception\DumpException * @throws \Viserio\Contract\Parser\Exception\NotSupportedException - * - * @return string */ public function dump(array $data, string $format): string { @@ -118,11 +105,7 @@ public function dump(array $data, string $format): string /** * Get supported dumper on extension or mime type. * - * @param string $type - * * @throws \Viserio\Contract\Parser\Exception\NotSupportedException - * - * @return \Viserio\Contract\Parser\Dumper */ public function getDumper(string $type): DumperContract { diff --git a/src/Viserio/Component/Parser/Dumper/IniDumper.php b/src/Viserio/Component/Parser/Dumper/IniDumper.php index 891f57a36..0ed5504e1 100644 --- a/src/Viserio/Component/Parser/Dumper/IniDumper.php +++ b/src/Viserio/Component/Parser/Dumper/IniDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; @@ -35,8 +35,6 @@ class IniDumper implements DumperContract /** * Get nest separator. - * - * @return string */ public function getNestSeparator(): string { @@ -45,10 +43,6 @@ public function getNestSeparator(): string /** * Set nest separator. - * - * @param string $separator - * - * @return self */ public function setNestSeparator(string $separator): self { @@ -62,10 +56,6 @@ public function setNestSeparator(string $separator): self * * If set to true, the INI file is rendered without sections completely * into the global namespace of the INI file. - * - * @param bool $withoutSections - * - * @return self */ public function setRenderWithoutSectionsFlags(bool $withoutSections): self { @@ -76,8 +66,6 @@ public function setRenderWithoutSectionsFlags(bool $withoutSections): self /** * Return whether the writer should render without sections. - * - * @return bool */ public function shouldRenderWithoutSections(): bool { @@ -110,7 +98,6 @@ public function dump(array $data): string } } - return $output; } @@ -119,8 +106,6 @@ public function dump(array $data): string * * @param array $config * @param array $parents - * - * @return string */ protected function addBranch(array $config, array $parents = []): string { @@ -173,8 +158,6 @@ protected function sortRootElements(array $config): array /** * Converts the supplied value into a valid ini representation. * - * @param mixed $value - * * @throws \Viserio\Contract\Parser\Exception\RuntimeException * * @return float|int|string diff --git a/src/Viserio/Component/Parser/Dumper/JsonDumper.php b/src/Viserio/Component/Parser/Dumper/JsonDumper.php index 064e29bf3..171052f3d 100644 --- a/src/Viserio/Component/Parser/Dumper/JsonDumper.php +++ b/src/Viserio/Component/Parser/Dumper/JsonDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; @@ -35,10 +35,6 @@ class JsonDumper implements DumperContract /** * Set the user specified recursion depth. - * - * @param int $depth - * - * @return void */ public function setDepth(int $depth): void { @@ -47,10 +43,6 @@ public function setDepth(int $depth): void /** * Set the user specified recursion depth. - * - * @param int $options - * - * @return void */ public function setOptions(int $options): void { diff --git a/src/Viserio/Component/Parser/Dumper/PhpArrayDumper.php b/src/Viserio/Component/Parser/Dumper/PhpArrayDumper.php index eea6d07c6..00c8d6c74 100644 --- a/src/Viserio/Component/Parser/Dumper/PhpArrayDumper.php +++ b/src/Viserio/Component/Parser/Dumper/PhpArrayDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; diff --git a/src/Viserio/Component/Parser/Dumper/PoDumper.php b/src/Viserio/Component/Parser/Dumper/PoDumper.php index ef532a96a..597c082dc 100644 --- a/src/Viserio/Component/Parser/Dumper/PoDumper.php +++ b/src/Viserio/Component/Parser/Dumper/PoDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; @@ -31,8 +31,6 @@ class PoDumper implements DumperContract /** * Create a new po dumper. * - * @param string $eol - * * @throws \Viserio\Contract\Parser\Exception\DumpException */ public function __construct(string $eol = 'unix') @@ -119,8 +117,6 @@ public function dump(array $data): string * Prepares a string to be outputed into a file. * * @param string $string the string to be converted - * - * @return string */ protected function cleanExport(string $string): string { @@ -142,7 +138,6 @@ protected function cleanExport(string $string): string * Adds tcomment to the output. * * @param array $entry - * @param string $output * * @return array */ @@ -161,7 +156,6 @@ private function addTCommentToOutput(array $entry, string $output): array * Adds ccomment to the output. * * @param array $entry - * @param string $output * * @return array */ @@ -180,7 +174,6 @@ private function addCcommentToOutput($entry, string $output): array * Adds reference to the output. * * @param array $entry - * @param string $output * * @return array */ @@ -199,7 +192,6 @@ private function addReferencesToOutput(array $entry, string $output): array * Adds flags infos to the output. * * @param array $entry - * @param string $output * * @return array */ @@ -216,7 +208,6 @@ private function addFlagsToOutput(array $entry, string $output): array * Adds previous info to the output. * * @param array $entry - * @param string $output * * @return array */ @@ -241,8 +232,6 @@ private function addPreviousToOutput(array $entry, string $output): array * Adds msgid to the output. * * @param array $entry - * @param string $output - * @param bool $isObsolete * * @throws \Viserio\Contract\Parser\Exception\DumpException * @@ -278,7 +267,6 @@ private function addMsgidToOutput(array $entry, string $output, bool $isObsolete * Add msgid_plural to the output. * * @param array $entry - * @param string $output * * @throws \Viserio\Contract\Parser\Exception\DumpException * @@ -310,11 +298,6 @@ private function addMsgidPluralToOutput(array $entry, string $output): array * Adds key with msgstr to the output. * * @param array $entry - * @param bool $isPlural - * @param string $output - * @param bool $isObsolete - * - * @return string */ private function addMsgstrToOutput(array $entry, bool $isPlural, string $output, bool $isObsolete): string { @@ -362,7 +345,6 @@ private function addMsgstrToOutput(array $entry, bool $isPlural, string $output, * Adds a header to the output. * * @param array $data - * @param string $output * * @throws \Viserio\Contract\Parser\Exception\DumpException * diff --git a/src/Viserio/Component/Parser/Dumper/QtDumper.php b/src/Viserio/Component/Parser/Dumper/QtDumper.php index 75ebc795e..713bfec06 100644 --- a/src/Viserio/Component/Parser/Dumper/QtDumper.php +++ b/src/Viserio/Component/Parser/Dumper/QtDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; diff --git a/src/Viserio/Component/Parser/Dumper/QueryStrDumper.php b/src/Viserio/Component/Parser/Dumper/QueryStrDumper.php index 6b9bff55a..7d642ca23 100644 --- a/src/Viserio/Component/Parser/Dumper/QueryStrDumper.php +++ b/src/Viserio/Component/Parser/Dumper/QueryStrDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; diff --git a/src/Viserio/Component/Parser/Dumper/SerializeDumper.php b/src/Viserio/Component/Parser/Dumper/SerializeDumper.php index 358e8c49b..f8987d92e 100644 --- a/src/Viserio/Component/Parser/Dumper/SerializeDumper.php +++ b/src/Viserio/Component/Parser/Dumper/SerializeDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; diff --git a/src/Viserio/Component/Parser/Dumper/TomlDumper.php b/src/Viserio/Component/Parser/Dumper/TomlDumper.php index ae0159d16..6921904ea 100644 --- a/src/Viserio/Component/Parser/Dumper/TomlDumper.php +++ b/src/Viserio/Component/Parser/Dumper/TomlDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; @@ -49,11 +49,7 @@ public function dump(array $data): string /** * Build toml file from given array. * - * @param array $data - * @param \Yosymfony\Toml\TomlBuilder $builder - * @param string $parent - * - * @return \Yosymfony\Toml\TomlBuilder + * @param array $data */ private function fromArray(array $data, TomlBuilder $builder, string $parent = ''): TomlBuilder { @@ -87,11 +83,7 @@ private function fromArray(array $data, TomlBuilder $builder, string $parent = ' /** * Run through all arrays. * - * @param array $values - * @param string $parent - * @param \Yosymfony\Toml\TomlBuilder $builder - * - * @return \Yosymfony\Toml\TomlBuilder + * @param array $values */ private function processArrayOfArrays(array $values, string $parent, TomlBuilder $builder): TomlBuilder { @@ -124,8 +116,6 @@ private function processArrayOfArrays(array $values, string $parent, TomlBuilder * Check if array has string keys. * * @param array $array - * - * @return bool */ private function hasStringKeys(array $array): bool { @@ -136,8 +126,6 @@ private function hasStringKeys(array $array): bool * Check if array has only arrays. * * @param array $array - * - * @return bool */ private function onlyArrays(array $array): bool { diff --git a/src/Viserio/Component/Parser/Dumper/XliffDumper.php b/src/Viserio/Component/Parser/Dumper/XliffDumper.php index 6521ffd64..5388a7ee3 100644 --- a/src/Viserio/Component/Parser/Dumper/XliffDumper.php +++ b/src/Viserio/Component/Parser/Dumper/XliffDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; @@ -81,8 +81,6 @@ public function dump(array $data): string * Dump xliff version 1. * * @param array $data - * - * @return string */ private static function dumpXliffVersion1(array $data): string { @@ -169,8 +167,6 @@ private static function dumpXliffVersion1(array $data): string * Dump xliff version 2. * * @param array $data - * - * @return string */ private static function dumpXliffVersion2(array $data): string { diff --git a/src/Viserio/Component/Parser/Dumper/XmlDumper.php b/src/Viserio/Component/Parser/Dumper/XmlDumper.php index 6dfc24a33..347b9d995 100644 --- a/src/Viserio/Component/Parser/Dumper/XmlDumper.php +++ b/src/Viserio/Component/Parser/Dumper/XmlDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; @@ -75,13 +75,10 @@ public function dump(array $data): string /** * Parse individual element. * - * @param \DOMDocument $document - * @param \DOMElement|DOMNode $element + * @param DOMElement|DOMNode $element * @param array|int|string $value * * @throws DOMException - * - * @return void */ private function convertElement(DOMDocument $document, $element, $value): void { @@ -121,14 +118,10 @@ private function convertElement(DOMDocument $document, $element, $value): void /** * Add node. * - * @param \DOMDocument $document - * @param \DOMElement|DOMNode $element - * @param string $key - * @param string|string[] $value + * @param DOMElement|DOMNode $element + * @param string|string[] $value * * @throws DOMException - * - * @return void */ private function addNode(DOMDocument $document, $element, string $key, $value): void { @@ -144,13 +137,10 @@ private function addNode(DOMDocument $document, $element, string $key, $value): /** * Add collection node. * - * @param \DOMDocument $document - * @param \DOMElement|DOMNode $element - * @param string|string[] $value + * @param DOMElement|DOMNode $element + * @param string|string[] $value * * @throws DOMException - * - * @return void */ private function addCollectionNode(DOMDocument $document, $element, $value): void { @@ -169,10 +159,7 @@ private function addCollectionNode(DOMDocument $document, $element, $value): voi /** * Add sequential node. * - * @param \DOMElement|DOMNode $element - * @param string $value - * - * @return void + * @param DOMElement|DOMNode $element */ private function addSequentialNode($element, string $value): void { @@ -193,10 +180,7 @@ private function addSequentialNode($element, string $value): void /** * Create the root element. * - * @param DOMDocument $document * @param array>|string $rootElement - * - * @return DOMElement */ private function createRootElement(DOMDocument $document, $rootElement): DOMElement { @@ -223,10 +207,6 @@ private function createRootElement(DOMDocument $document, $rootElement): DOMElem /** * Check if array are all sequential. - * - * @param mixed $value - * - * @return bool */ private static function isArrayAllKeySequential($value): bool { diff --git a/src/Viserio/Component/Parser/Dumper/YamlDumper.php b/src/Viserio/Component/Parser/Dumper/YamlDumper.php index aaa183c16..159a06eb6 100644 --- a/src/Viserio/Component/Parser/Dumper/YamlDumper.php +++ b/src/Viserio/Component/Parser/Dumper/YamlDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Dumper; diff --git a/src/Viserio/Component/Parser/FileLoader.php b/src/Viserio/Component/Parser/FileLoader.php index 475b1b487..37590efde 100644 --- a/src/Viserio/Component/Parser/FileLoader.php +++ b/src/Viserio/Component/Parser/FileLoader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser; @@ -108,10 +108,6 @@ public function load(string $file, ?array $options = null): array /** * Get the data path for a file. - * - * @param string $file - * - * @return string */ protected function getPath(string $file): string { @@ -132,8 +128,6 @@ protected function getPath(string $file): string * @param array $options * * @throws \Viserio\Contract\Parser\Exception\NotSupportedException - * - * @return void */ protected function checkOption(array $options): void { diff --git a/src/Viserio/Component/Parser/GroupParser.php b/src/Viserio/Component/Parser/GroupParser.php index 382c48035..128e28442 100644 --- a/src/Viserio/Component/Parser/GroupParser.php +++ b/src/Viserio/Component/Parser/GroupParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser; @@ -25,8 +25,6 @@ class GroupParser extends Parser /** * Set group key. * - * @param string $key - * * @return $this */ public function setGroup(string $key): self diff --git a/src/Viserio/Component/Parser/Parser.php b/src/Viserio/Component/Parser/Parser.php index 6b6719e1f..52a24c516 100644 --- a/src/Viserio/Component/Parser/Parser.php +++ b/src/Viserio/Component/Parser/Parser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser; @@ -80,11 +80,6 @@ class Parser /** * Add a new mime type with extension. - * - * @param string $mimeType - * @param string $extension - * - * @return void */ public function addMimeType(string $mimeType, string $extension): void { @@ -93,11 +88,6 @@ public function addMimeType(string $mimeType, string $extension): void /** * Add a new parser. - * - * @param \Viserio\Contract\Parser\Parser $parser - * @param string $extension - * - * @return void */ public function addParser(ParserContract $parser, string $extension): void { @@ -107,8 +97,6 @@ public function addParser(ParserContract $parser, string $extension): void /** * Parse given file path or content string. * - * @param string $payload - * * @throws \Viserio\Contract\Parser\Exception\RuntimeException if an error occurred during reading * @throws \Viserio\Contract\Parser\Exception\NotSupportedException if a mime type is not supported * @throws \Viserio\Contract\Parser\Exception\ParseException @@ -137,11 +125,7 @@ public function parse(string $payload): array /** * Get supported parser on extension or mime type. * - * @param string $type - * * @throws \Viserio\Contract\Parser\Exception\NotSupportedException - * - * @return \Viserio\Contract\Parser\Parser */ public function getParser(string $type): ParserContract { @@ -165,8 +149,6 @@ public function getParser(string $type): ParserContract /** * Auto detect the payload data type using finfo and pathinfo. * - * @param string $payload - * * @return string Tries to return the short format code (xml, json, ...) else the mime type */ protected function getFormat(string $payload): string diff --git a/src/Viserio/Component/Parser/Parser/IniParser.php b/src/Viserio/Component/Parser/Parser/IniParser.php index 2a52c285a..ed1eb22db 100644 --- a/src/Viserio/Component/Parser/Parser/IniParser.php +++ b/src/Viserio/Component/Parser/Parser/IniParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; @@ -36,42 +36,12 @@ class IniParser implements ParserContract */ private $nestSeparator = '.'; - /** - * Get nest separator. - * - * @return string - */ - public function getNestSeparator(): string - { - return $this->nestSeparator; - } - - /** - * Set nest separator. - * - * @param string $separator - * - * @return self - */ - public function setNestSeparator(string $separator): self - { - if ($separator === '') { - throw new InvalidArgumentException('A empty string cant be set as a separator.'); - } - - $this->nestSeparator = $separator; - - return $this; - } - /** * Get if sections should be processed * When sections are not processed,section names are stripped and section * values are merged. * * @see https://www.php.net/parse_ini_file - * - * @return bool */ public function getProcessSections(): bool { @@ -85,8 +55,6 @@ public function getProcessSections(): bool * * @see https://www.php.net/parse_ini_file * - * @param bool $processSections - * * @return $this */ public function setProcessSections(bool $processSections): self @@ -96,6 +64,28 @@ public function setProcessSections(bool $processSections): self return $this; } + /** + * Get nest separator. + */ + public function getNestSeparator(): string + { + return $this->nestSeparator; + } + + /** + * Set nest separator. + */ + public function setNestSeparator(string $separator): self + { + if ($separator === '') { + throw new InvalidArgumentException('A empty string cant be set as a separator.'); + } + + $this->nestSeparator = $separator; + + return $this; + } + /** * {@inheritdoc} */ @@ -166,7 +156,6 @@ protected function processSection(array $section): array * Process a key. * * @param int|string $key - * @param mixed $value * @param array $config * * @throws \Viserio\Contract\Parser\Exception\RuntimeException @@ -201,7 +190,6 @@ protected function processKey($key, $value, array &$config): void * Process a nested section. * * @param array $sections - * @param mixed $value * * @return array */ @@ -222,8 +210,6 @@ private function buildNestedSection(array $sections, $value): array /** * Normalizes INI and other values. * - * @param mixed $value - * * @return null|array|bool|int|string */ private function normalize($value) @@ -276,10 +262,7 @@ private function normalize($value) /** * Case insensitively compares values. * - * @param string $value * @param array $comparisons - * - * @return bool */ private static function compareValues(string $value, array $comparisons): bool { diff --git a/src/Viserio/Component/Parser/Parser/JsonParser.php b/src/Viserio/Component/Parser/Parser/JsonParser.php index 53a29e382..0be638fb7 100644 --- a/src/Viserio/Component/Parser/Parser/JsonParser.php +++ b/src/Viserio/Component/Parser/Parser/JsonParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; @@ -35,10 +35,6 @@ class JsonParser implements ParserContract /** * Set the user specified recursion depth. - * - * @param int $depth - * - * @return void */ public function setDepth(int $depth): void { @@ -47,10 +43,6 @@ public function setDepth(int $depth): void /** * Set the user specified recursion depth. - * - * @param int $options - * - * @return void */ public function setOptions(int $options): void { diff --git a/src/Viserio/Component/Parser/Parser/PhpArrayParser.php b/src/Viserio/Component/Parser/Parser/PhpArrayParser.php index 76e9d6b81..751fba5f9 100644 --- a/src/Viserio/Component/Parser/Parser/PhpArrayParser.php +++ b/src/Viserio/Component/Parser/Parser/PhpArrayParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; diff --git a/src/Viserio/Component/Parser/Parser/PoParser.php b/src/Viserio/Component/Parser/Parser/PoParser.php index c93ff6092..3d233c0fe 100644 --- a/src/Viserio/Component/Parser/Parser/PoParser.php +++ b/src/Viserio/Component/Parser/Parser/PoParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; @@ -104,11 +104,11 @@ public function parse(string $payload): array $data = (string) ($splitLine[1] ?? ''); switch ($key) { - case '#': // # Translator comments + case '#': $entry['tcomment'][] = self::convertString($data); break; - case '#.': // #. Comments extracted from source code + case '#.': $entry['ccomment'][] = self::convertString($data); break; @@ -200,10 +200,6 @@ public function parse(string $payload): array /** * Convert a string from its PO representation. - * - * @param string $value - * - * @return string */ private static function convertString(string $value): string { @@ -235,8 +231,6 @@ private static function convertString(string $value): string * Checks if entry is a header. * * @param array $entry - * - * @return bool */ private static function isHeader(array $entry): bool { @@ -270,8 +264,6 @@ private static function isHeader(array $entry): bool * and possible continuations of a header entry. * * @param string $line Line to parse - * - * @return bool */ private static function isHeaderDefinition(string $line): bool { @@ -281,7 +273,6 @@ private static function isHeaderDefinition(string $line): bool /** * Export reference infos. * - * @param string $data * @param array $entry * * @return array @@ -322,9 +313,6 @@ private static function addReferences(string $data, array $entry): array /** * Export obsolete entries. * - * @param null|string $lastPreviousKey - * @param null|string $tmpKey - * @param string $str * @param array $entry * * @return array @@ -360,11 +348,7 @@ private static function processObsoleteEntry( /** * Export previous entries. * - * @param null|string $lastPreviousKey - * @param null|string $tmpKey - * @param string $str * @param array $entry - * @param string $key * * @return array */ @@ -397,11 +381,7 @@ private static function processPreviousEntry( * Export multi-lines from given line. * Throws a exception if state is not found or broken comment is given. * - * @param null|string $state * @param array $entry - * @param string $line - * @param string $key - * @param int $i * * @throws \Viserio\Contract\Parser\Exception\ParseException * diff --git a/src/Viserio/Component/Parser/Parser/QtParser.php b/src/Viserio/Component/Parser/Parser/QtParser.php index 08472705c..6a36e37a2 100644 --- a/src/Viserio/Component/Parser/Parser/QtParser.php +++ b/src/Viserio/Component/Parser/Parser/QtParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; diff --git a/src/Viserio/Component/Parser/Parser/QueryStrParser.php b/src/Viserio/Component/Parser/Parser/QueryStrParser.php index 1113af502..08402e0b8 100644 --- a/src/Viserio/Component/Parser/Parser/QueryStrParser.php +++ b/src/Viserio/Component/Parser/Parser/QueryStrParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; diff --git a/src/Viserio/Component/Parser/Parser/SerializeParser.php b/src/Viserio/Component/Parser/Parser/SerializeParser.php index f2ec3e99a..899f1f7bd 100644 --- a/src/Viserio/Component/Parser/Parser/SerializeParser.php +++ b/src/Viserio/Component/Parser/Parser/SerializeParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; diff --git a/src/Viserio/Component/Parser/Parser/TomlParser.php b/src/Viserio/Component/Parser/Parser/TomlParser.php index a916a6901..bdd37e849 100644 --- a/src/Viserio/Component/Parser/Parser/TomlParser.php +++ b/src/Viserio/Component/Parser/Parser/TomlParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; diff --git a/src/Viserio/Component/Parser/Parser/XliffParser.php b/src/Viserio/Component/Parser/Parser/XliffParser.php index 257cb39f4..657b4a7ac 100644 --- a/src/Viserio/Component/Parser/Parser/XliffParser.php +++ b/src/Viserio/Component/Parser/Parser/XliffParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; @@ -58,8 +58,6 @@ public function parse(string $payload): array /** * Extract messages and metadata from DOMDocument into a MessageCatalogue. * - * @param \DOMDocument $dom - * * @throws \Viserio\Contract\Parser\Exception\ParseException * * @return array @@ -85,7 +83,7 @@ private function extractXliffVersion1(DOMDocument $dom): array $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:1.2'); - /** @var \SimpleXMLElement $trans */ + /** @var SimpleXMLElement $trans */ foreach ((array) $xml->xpath('//xliff:trans-unit') as $trans) { $attributes = $trans->attributes(); $id = (string) ($attributes['resname'] ?? $trans->source ?? ''); @@ -125,9 +123,6 @@ private function extractXliffVersion1(DOMDocument $dom): array /** * Parse xliff notes. * - * @param SimpleXMLElement $noteElement - * @param null|string $encoding - * * @return array */ private static function parseNotes(SimpleXMLElement $noteElement, ?string $encoding = null): array @@ -156,8 +151,6 @@ private static function parseNotes(SimpleXMLElement $noteElement, ?string $encod /** * Extract messages and metadata from DOMDocument into a MessageCatalogue. * - * @param DOMDocument $dom - * * @throws \Viserio\Contract\Parser\Exception\ParseException * * @return array @@ -183,7 +176,7 @@ private function extractXliffVersion2(DOMDocument $dom): array $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0'); - /** @var \SimpleXMLElement $unit */ + /** @var SimpleXMLElement $unit */ foreach ((array) $xml->xpath('//xliff:unit') as $unit) { $unitAttr = (array) $unit->attributes(); $unitAttr = \reset($unitAttr); @@ -236,8 +229,6 @@ private function extractXliffVersion2(DOMDocument $dom): array * * @param string $content String to decode * @param null|string $encoding Target encoding - * - * @return string */ private static function utf8ToCharset(string $content, ?string $encoding = null): string { diff --git a/src/Viserio/Component/Parser/Parser/XmlParser.php b/src/Viserio/Component/Parser/Parser/XmlParser.php index 4ee069bdf..7e5348f05 100644 --- a/src/Viserio/Component/Parser/Parser/XmlParser.php +++ b/src/Viserio/Component/Parser/Parser/XmlParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; diff --git a/src/Viserio/Component/Parser/Parser/YamlParser.php b/src/Viserio/Component/Parser/Parser/YamlParser.php index 791e44dfa..6d5e59820 100644 --- a/src/Viserio/Component/Parser/Parser/YamlParser.php +++ b/src/Viserio/Component/Parser/Parser/YamlParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Parser; @@ -54,8 +54,6 @@ public function __construct() /** * A bit field of PARSE_* constants to customize the YAML parser behavior. - * - * @param int $flags */ public function setFlags(int $flags): void { diff --git a/src/Viserio/Component/Parser/TaggableParser.php b/src/Viserio/Component/Parser/TaggableParser.php index 2864a9784..d3bfc1c60 100644 --- a/src/Viserio/Component/Parser/TaggableParser.php +++ b/src/Viserio/Component/Parser/TaggableParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser; @@ -32,8 +32,6 @@ class TaggableParser extends Parser /** * Set tag key. * - * @param string $key - * * @return $this */ public function setTag(string $key): self @@ -58,7 +56,6 @@ public function parse(string $payload): array /** * Tag all keys with given tag. * - * @param string $tag * @param array $data * * @return array diff --git a/src/Viserio/Component/Parser/Tests/Command/XliffLintCommandTest.php b/src/Viserio/Component/Parser/Tests/Command/XliffLintCommandTest.php index 26cc04d56..533185092 100644 --- a/src/Viserio/Component/Parser/Tests/Command/XliffLintCommandTest.php +++ b/src/Viserio/Component/Parser/Tests/Command/XliffLintCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Command; @@ -33,6 +33,7 @@ * @internal * * @small + * @coversNothing */ final class XliffLintCommandTest extends TestCase { @@ -226,9 +227,6 @@ public function testLintCommandFileNotReadable(): void } /** - * @param string $sourceContent - * @param string $targetLanguage - * * @return string Path to the new file */ private function createFile(string $sourceContent = 'note', string $targetLanguage = 'en'): string diff --git a/src/Viserio/Component/Parser/Tests/Command/YamlLintCommandTest.php b/src/Viserio/Component/Parser/Tests/Command/YamlLintCommandTest.php index 40b2255a0..491f7cece 100644 --- a/src/Viserio/Component/Parser/Tests/Command/YamlLintCommandTest.php +++ b/src/Viserio/Component/Parser/Tests/Command/YamlLintCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Command; @@ -32,6 +32,7 @@ * @internal * * @small + * @coversNothing */ final class YamlLintCommandTest extends TestCase { @@ -165,8 +166,6 @@ public function testLintFileNotReadable(): void } /** - * @param mixed $content - * * @return string Path to the new file */ private function createFile($content): string diff --git a/src/Viserio/Component/Parser/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php b/src/Viserio/Component/Parser/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php index 922c13a4c..50f34dbbc 100644 --- a/src/Viserio/Component/Parser/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php +++ b/src/Viserio/Component/Parser/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Provider; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleCommandsServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Parser/Tests/Container/Provider/ParsersServiceProviderTest.php b/src/Viserio/Component/Parser/Tests/Container/Provider/ParsersServiceProviderTest.php index f556d3886..bb766f3e2 100644 --- a/src/Viserio/Component/Parser/Tests/Container/Provider/ParsersServiceProviderTest.php +++ b/src/Viserio/Component/Parser/Tests/Container/Provider/ParsersServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Container\Provider; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class ParsersServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Parser/Tests/DumperTest.php b/src/Viserio/Component/Parser/Tests/DumperTest.php index d19bd2345..3e474760f 100644 --- a/src/Viserio/Component/Parser/Tests/DumperTest.php +++ b/src/Viserio/Component/Parser/Tests/DumperTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class DumperTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/FileLoaderTest.php b/src/Viserio/Component/Parser/Tests/FileLoaderTest.php index b51b911fb..ea78bea0b 100644 --- a/src/Viserio/Component/Parser/Tests/FileLoaderTest.php +++ b/src/Viserio/Component/Parser/Tests/FileLoaderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class FileLoaderTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Fixture/TextDumper.php b/src/Viserio/Component/Parser/Tests/Fixture/TextDumper.php index 939f4d394..951763f24 100644 --- a/src/Viserio/Component/Parser/Tests/Fixture/TextDumper.php +++ b/src/Viserio/Component/Parser/Tests/Fixture/TextDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Fixture; diff --git a/src/Viserio/Component/Parser/Tests/Fixture/TextParser.php b/src/Viserio/Component/Parser/Tests/Fixture/TextParser.php index 6be4e6733..d14b54f05 100644 --- a/src/Viserio/Component/Parser/Tests/Fixture/TextParser.php +++ b/src/Viserio/Component/Parser/Tests/Fixture/TextParser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Fixture; diff --git a/src/Viserio/Component/Parser/Tests/Fixture/xliff/output_xliffv1.php b/src/Viserio/Component/Parser/Tests/Fixture/xliff/output_xliffv1.php index 21fabd718..4c6bbeac2 100644 --- a/src/Viserio/Component/Parser/Tests/Fixture/xliff/output_xliffv1.php +++ b/src/Viserio/Component/Parser/Tests/Fixture/xliff/output_xliffv1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return [ diff --git a/src/Viserio/Component/Parser/Tests/Format/IniTest.php b/src/Viserio/Component/Parser/Tests/Format/IniTest.php index 91e05472b..b56af8df3 100644 --- a/src/Viserio/Component/Parser/Tests/Format/IniTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/IniTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Formats\Format; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class IniTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/JsonTest.php b/src/Viserio/Component/Parser/Tests/Format/JsonTest.php index e923298f6..3868fb7f9 100644 --- a/src/Viserio/Component/Parser/Tests/Format/JsonTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/JsonTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class JsonTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/PhpArrayTest.php b/src/Viserio/Component/Parser/Tests/Format/PhpArrayTest.php index d219ba1a5..0cbe0a485 100644 --- a/src/Viserio/Component/Parser/Tests/Format/PhpArrayTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/PhpArrayTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class PhpArrayTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/PoTest.php b/src/Viserio/Component/Parser/Tests/Format/PoTest.php index cfe2de1e9..f72f656f5 100644 --- a/src/Viserio/Component/Parser/Tests/Format/PoTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/PoTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parsers\Tests\Format; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class PoTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/QtTest.php b/src/Viserio/Component/Parser/Tests/Format/QtTest.php index 8550cb561..d3705c1f1 100644 --- a/src/Viserio/Component/Parser/Tests/Format/QtTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/QtTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class QtTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/QueryStrTest.php b/src/Viserio/Component/Parser/Tests/Format/QueryStrTest.php index 2b79be58a..c98f573e4 100644 --- a/src/Viserio/Component/Parser/Tests/Format/QueryStrTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/QueryStrTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class QueryStrTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/SerializeTest.php b/src/Viserio/Component/Parser/Tests/Format/SerializeTest.php index b324df7b6..2468ea38f 100644 --- a/src/Viserio/Component/Parser/Tests/Format/SerializeTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/SerializeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class SerializeTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/TomlTest.php b/src/Viserio/Component/Parser/Tests/Format/TomlTest.php index abac5e45e..dae66097d 100644 --- a/src/Viserio/Component/Parser/Tests/Format/TomlTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/TomlTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class TomlTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/XliffTest.php b/src/Viserio/Component/Parser/Tests/Format/XliffTest.php index 3614590b5..b7ad8bfcd 100644 --- a/src/Viserio/Component/Parser/Tests/Format/XliffTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/XliffTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class XliffTest extends TestCase { @@ -343,8 +344,6 @@ public function testDumpWithWrongVersion(): void } /** - * @param string $path - * * @throws \Viserio\Contract\Parser\Exception\ParseException * * @return array diff --git a/src/Viserio/Component/Parser/Tests/Format/XmlTest.php b/src/Viserio/Component/Parser/Tests/Format/XmlTest.php index 850f016d8..fec2392b2 100644 --- a/src/Viserio/Component/Parser/Tests/Format/XmlTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/XmlTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class XmlTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Format/YamlTest.php b/src/Viserio/Component/Parser/Tests/Format/YamlTest.php index d8ddfd022..ea5729bf0 100644 --- a/src/Viserio/Component/Parser/Tests/Format/YamlTest.php +++ b/src/Viserio/Component/Parser/Tests/Format/YamlTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Format; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class YamlTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/GroupParserTest.php b/src/Viserio/Component/Parser/Tests/GroupParserTest.php index 68cedcf48..78ec1b7a3 100644 --- a/src/Viserio/Component/Parser/Tests/GroupParserTest.php +++ b/src/Viserio/Component/Parser/Tests/GroupParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class GroupParserTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/ParserTest.php b/src/Viserio/Component/Parser/Tests/ParserTest.php index 86edcd4f5..103321231 100644 --- a/src/Viserio/Component/Parser/Tests/ParserTest.php +++ b/src/Viserio/Component/Parser/Tests/ParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class ParserTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/TaggableParserTest.php b/src/Viserio/Component/Parser/Tests/TaggableParserTest.php index e539bf677..21f0c3261 100644 --- a/src/Viserio/Component/Parser/Tests/TaggableParserTest.php +++ b/src/Viserio/Component/Parser/Tests/TaggableParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class TaggableParserTest extends TestCase { diff --git a/src/Viserio/Component/Parser/Tests/Utils/XmlUtilsTest.php b/src/Viserio/Component/Parser/Tests/Utils/XmlUtilsTest.php index f28a2b603..0a867a84f 100644 --- a/src/Viserio/Component/Parser/Tests/Utils/XmlUtilsTest.php +++ b/src/Viserio/Component/Parser/Tests/Utils/XmlUtilsTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Tests\Util; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class XmlUtilsTest extends MockeryTestCase { @@ -186,9 +187,6 @@ public function testLoadFileWithInternalErrorsEnabled(): void * @dataProvider provideConvertDomToArrayCases * * @param null|array|string $expected - * @param string $xml - * @param bool $root - * @param bool $checkPrefix */ public function testConvertDomToArray($expected, string $xml, bool $root = false, bool $checkPrefix = true): void { @@ -229,9 +227,6 @@ public static function provideConvertDomToArrayCases(): iterable /** * @dataProvider providePhpizeCases - * - * @param mixed $expected - * @param mixed $value */ public function testPhpize($expected, $value): void { @@ -287,7 +282,9 @@ public function testLoadEmptyXmlFile(): void XmlUtils::loadFile($file->url()); } - // test for issue https://github.com/symfony/symfony/issues/9731 + /** + * test for issue https://github.com/symfony/symfony/issues/9731 + */ public function testLoadWrongEmptyXMLWithErrorHandler(): void { $file = vfsStream::newFile('foo.xml')->withContent( diff --git a/src/Viserio/Component/Parser/Utils/XliffUtils.php b/src/Viserio/Component/Parser/Utils/XliffUtils.php index 8ba489c9f..1acef16ec 100644 --- a/src/Viserio/Component/Parser/Utils/XliffUtils.php +++ b/src/Viserio/Component/Parser/Utils/XliffUtils.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Utils; @@ -32,8 +32,6 @@ private function __construct() /** * Validates and parses the given file into a DOMDocument. * - * @param DOMDocument $dom - * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException * * @return array> @@ -47,11 +45,7 @@ public static function validateSchema(DOMDocument $dom): array * Gets xliff file version based on the root "version" attribute. * Defaults to 1.2 for backwards compatibility. * - * @param DOMDocument $dom - * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException; - * - * @return string */ public static function getVersionNumber(DOMDocument $dom): string { @@ -78,12 +72,8 @@ public static function getVersionNumber(DOMDocument $dom): string /** * Get the right xliff schema from version. * - * @param string $xliffVersion - * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException; * @throws \Viserio\Contract\Parser\Exception\RuntimeException; - * - * @return string */ public static function getSchema(string $xliffVersion): string { @@ -114,8 +104,6 @@ public static function getSchema(string $xliffVersion): string * * @param string $schemaSource Current content of schema file * @param string $xmlUri External URI of XML to convert to local - * - * @return string */ private static function fixLocation(string $schemaSource, string $xmlUri): string { diff --git a/src/Viserio/Component/Parser/Utils/XmlUtils.php b/src/Viserio/Component/Parser/Utils/XmlUtils.php index b3c0f6073..26e36fcd3 100644 --- a/src/Viserio/Component/Parser/Utils/XmlUtils.php +++ b/src/Viserio/Component/Parser/Utils/XmlUtils.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Parser\Utils; @@ -43,11 +43,7 @@ private function __construct() /** * A simplexml_import_dom wrapper. * - * @param DOMDocument $dom - * * @throws \Viserio\Contract\Parser\Exception\ParseException - * - * @return SimpleXMLElement */ public static function importDom(DOMDocument $dom): SimpleXMLElement { @@ -63,8 +59,7 @@ public static function importDom(DOMDocument $dom): SimpleXMLElement /** * Validates and parses the given file into a DOMDocument. * - * @param DOMDocument $dom - * @param string $schema source of the schema + * @param string $schema source of the schema * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException * @@ -96,8 +91,6 @@ public static function validateSchema(DOMDocument $dom, string $schema): array * Transforms xml errors to errors string. * * @param array> $xmlErrors - * - * @return string */ public static function getErrorsAsString(array $xmlErrors): string { @@ -121,8 +114,6 @@ public static function getErrorsAsString(array $xmlErrors): string /** * Returns the XML errors of the internal XML parser. * - * @param bool $internalErrors - * * @return array> An array of errors */ public static function getXmlErrors(bool $internalErrors): array @@ -154,8 +145,6 @@ public static function getXmlErrors(bool $internalErrors): array * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException When loading of XML file returns error * @throws \Viserio\Contract\Parser\Exception\FileNotFoundException - * - * @return DOMDocument */ public static function loadFile(string $file, $schemaOrCallable = null): DOMDocument { @@ -173,8 +162,6 @@ public static function loadFile(string $file, $schemaOrCallable = null): DOMDocu * @param null|callable|string $schemaOrCallable An XSD schema file path, a callable, or null to disable validation * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException When loading of XML file returns error - * - * @return DOMDocument */ public static function loadString(string $content, $schemaOrCallable = null): DOMDocument { @@ -297,10 +284,6 @@ public static function convertDomElementToArray(DOMElement $element, bool $check /** * Converts an xml value to a PHP type. - * - * @param mixed $value - * - * @return mixed */ public static function phpize($value) { @@ -349,12 +332,9 @@ public static function phpize($value) /** * Validates DOMDocument against a file or callback. * - * @param \DOMDocument $dom - * @param mixed $schemaOrCallable should be a callable or a string + * @param mixed $schemaOrCallable should be a callable or a string * * @throws \Viserio\Contract\Parser\Exception\InvalidArgumentException - * - * @return void */ private static function validateXmlDom(DOMDocument $dom, $schemaOrCallable): void { @@ -397,12 +377,6 @@ private static function validateXmlDom(DOMDocument $dom, $schemaOrCallable): voi } } - /** - * @param string $value - * @param int $position - * - * @return int - */ private static function transformToNumber(string $value, int $position): int { $raw = $value; diff --git a/src/Viserio/Component/Parser/composer.json b/src/Viserio/Component/Parser/composer.json index aa889e38e..8f4bac3d5 100644 --- a/src/Viserio/Component/Parser/composer.json +++ b/src/Viserio/Component/Parser/composer.json @@ -43,10 +43,9 @@ "require-dev": { "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "symfony/yaml": "^4.3.8 || ^5.0.0", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/Parser/phpunit.xml b/src/Viserio/Component/Parser/phpunit.xml new file mode 100644 index 000000000..28280b694 --- /dev/null +++ b/src/Viserio/Component/Parser/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Parser/phpunit.xml.dist b/src/Viserio/Component/Parser/phpunit.xml.dist deleted file mode 100644 index 40a36c809..000000000 --- a/src/Viserio/Component/Parser/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Path/.gitignore b/src/Viserio/Component/Path/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Path/.gitignore +++ b/src/Viserio/Component/Path/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Path/Tests/PathTest.php b/src/Viserio/Component/Path/Tests/PathTest.php index 345d00d28..6760ed218 100644 --- a/src/Viserio/Component/Path/Tests/PathTest.php +++ b/src/Viserio/Component/Path/Tests/PathTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Path\Tests; @@ -268,9 +268,6 @@ public static function provideCanonicalizeWithHomeForUnixCases(): iterable /** * @dataProvider provideCanonicalizeCases - * - * @param string $path - * @param string $canonicalized */ public function testCanonicalize(string $path, string $canonicalized): void { @@ -365,9 +362,6 @@ public static function provideGetDirectoryCases(): iterable /** * @dataProvider provideGetDirectoryCases - * - * @param string $path - * @param string $directory */ public function testGetDirectory(string $path, string $directory): void { @@ -418,10 +412,6 @@ public static function provideGetFilenameWithoutExtensionCases(): iterable /** * @dataProvider provideGetFilenameWithoutExtensionCases - * - * @param string $path - * @param null|string $extension - * @param string $filename */ public function testGetFilenameWithoutExtension(string $path, ?string $extension, string $filename): void { @@ -458,10 +448,6 @@ public static function provideGetExtensionCases(): iterable /** * @dataProvider provideGetExtensionCases - * - * @param string $path - * @param bool $forceLowerCase - * @param string $extension */ public function testGetExtension(string $path, bool $forceLowerCase, string $extension): void { @@ -533,10 +519,7 @@ public static function provideHasExtensionCases(): iterable /** * @dataProvider provideHasExtensionCases * - * @param bool $hasExtension - * @param string $path * @param null|string|string[] $extension - * @param bool $ignoreCase */ public function testHasExtension(bool $hasExtension, string $path, $extension, bool $ignoreCase): void { @@ -575,10 +558,6 @@ public static function provideChangeExtensionCases(): iterable /** * @dataProvider provideChangeExtensionCases - * - * @param string $path - * @param string $extension - * @param string $pathExpected */ public function testChangeExtension(string $path, string $extension, string $pathExpected): void { @@ -623,9 +602,6 @@ public static function provideIsAbsolutePathTests(): iterable /** * @dataProvider provideIsAbsolutePathTests - * - * @param string $path - * @param bool $isAbsolute */ public function testIsAbsolute(string $path, bool $isAbsolute): void { @@ -634,9 +610,6 @@ public function testIsAbsolute(string $path, bool $isAbsolute): void /** * @dataProvider provideIsAbsolutePathTests - * - * @param string $path - * @param bool $isAbsolute */ public function testIsRelative(string $path, bool $isAbsolute): void { @@ -685,9 +658,6 @@ public static function provideGetRootCases(): iterable /** * @dataProvider provideGetRootCases - * - * @param string $path - * @param string $root */ public function testGetRoot(string $path, string $root): void { @@ -830,10 +800,6 @@ public function provideMakeAbsoluteCases(): iterable /** * @dataProvider provideMakeAbsoluteCases - * - * @param string $relativePath - * @param string $basePath - * @param string $absolutePath */ public function testMakeAbsolute(string $relativePath, string $basePath, string $absolutePath): void { @@ -899,9 +865,6 @@ public static function provideAbsolutePathsWithDifferentRoots(): iterable /** * @dataProvider provideAbsolutePathsWithDifferentRoots - * - * @param string $basePath - * @param string $absolutePath */ public function testMakeAbsoluteDoesNotFailIfDifferentRoot(string $basePath, string $absolutePath): void { @@ -1054,10 +1017,6 @@ public function provideMakeRelativeCases(): iterable /** * @dataProvider provideMakeRelativeCases - * - * @param string $absolutePath - * @param string $basePath - * @param string $relativePath */ public function testMakeRelative(string $absolutePath, string $basePath, string $relativePath): void { @@ -1081,9 +1040,6 @@ public function testMakeRelativeFailsIfAbsolutePathAndBasePathEmpty(): void /** * @dataProvider provideAbsolutePathsWithDifferentRoots - * - * @param string $absolutePath - * @param string $basePath */ public function testMakeRelativeFailsIfDifferentRoot(string $absolutePath, string $basePath): void { @@ -1110,9 +1066,6 @@ public static function provideIsLocalCases(): iterable /** * @dataProvider provideIsLocalCases - * - * @param string $path - * @param bool $isLocal */ public function testIsLocal(string $path, bool $isLocal): void { @@ -1424,10 +1377,6 @@ public static function provideIsBasePathCases(): iterable /** * @dataProvider provideIsBasePathCases - * - * @param string $path - * @param string $ofPath - * @param bool $result */ public function testIsBasePath(string $path, string $ofPath, bool $result): void { @@ -1564,7 +1513,6 @@ public static function provideJoinCases(): iterable * @dataProvider provideJoinCases * * @param array $paths - * @param string $result */ public function testJoin(array $paths, string $result): void { @@ -1641,9 +1589,6 @@ public static function provideCanonicalizeWithHomeForWindowsCases(): iterable /** * @dataProvider provideCanonicalizeWithHomeForUnixCases - * - * @param string $path - * @param string $canonicalized */ public function testCanonicalizeWithHomeForUnix(string $path, string $canonicalized): void { @@ -1652,9 +1597,6 @@ public function testCanonicalizeWithHomeForUnix(string $path, string $canonicali /** * @dataProvider provideCanonicalizeWithHomeForWindowsCases - * - * @param mixed $path - * @param mixed $canonicalized */ public function testCanonicalizeWithHomeForWindows($path, $canonicalized): void { diff --git a/src/Viserio/Component/Path/composer.json b/src/Viserio/Component/Path/composer.json index 9fe1b9cec..fe323794e 100644 --- a/src/Viserio/Component/Path/composer.json +++ b/src/Viserio/Component/Path/composer.json @@ -30,10 +30,9 @@ "require-dev": { "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", - "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0" + "phpunit/phpunit": "8.2.*" }, "extra": { "branch-alias": { diff --git a/src/Viserio/Component/Path/phpunit.xml b/src/Viserio/Component/Path/phpunit.xml new file mode 100644 index 000000000..55169bb87 --- /dev/null +++ b/src/Viserio/Component/Path/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Path/phpunit.xml.dist b/src/Viserio/Component/Path/phpunit.xml.dist deleted file mode 100644 index 9e4cea2b0..000000000 --- a/src/Viserio/Component/Path/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Pipeline/.gitignore b/src/Viserio/Component/Pipeline/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Pipeline/.gitignore +++ b/src/Viserio/Component/Pipeline/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Pipeline/Pipeline.php b/src/Viserio/Component/Pipeline/Pipeline.php index 357b876b9..f886fb5f7 100644 --- a/src/Viserio/Component/Pipeline/Pipeline.php +++ b/src/Viserio/Component/Pipeline/Pipeline.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pipeline; @@ -28,8 +28,6 @@ class Pipeline implements PipelineContract /** * The object being passed through the pipeline. - * - * @var mixed */ protected $traveler; @@ -93,8 +91,6 @@ public function then(Closure $destination) /** * Get a Closure that represents a slice of the application onion. - * - * @return Closure */ protected function getSlice(): Closure { @@ -137,10 +133,6 @@ protected function getSlice(): Closure /** * Get the initial slice to begin the stack call. - * - * @param Closure $destination - * - * @return Closure */ protected function getInitialSlice(Closure $destination): Closure { @@ -151,10 +143,6 @@ protected function getInitialSlice(Closure $destination): Closure /** * Parse full pipe string to get name and parameters. - * - * @param string $stage - * - * @return array */ protected function parseStageString(string $stage): array { @@ -170,13 +158,7 @@ protected function parseStageString(string $stage): array /** * Resolve from container. * - * @param mixed $traveler - * @param mixed $stack - * @param string $stage - * * @throws \Viserio\Contract\Pipeline\Exception\RuntimeException - * - * @return mixed */ protected function sliceThroughContainer($traveler, $stack, string $stage) { diff --git a/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineInvokePipe.php b/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineInvokePipe.php index 324ef4ab0..7a073297b 100644 --- a/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineInvokePipe.php +++ b/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineInvokePipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pipeline\Tests\Fixture; diff --git a/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestParameterPipe.php b/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestParameterPipe.php index cc1b330d8..528703359 100644 --- a/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestParameterPipe.php +++ b/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestParameterPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pipeline\Tests\Fixture; diff --git a/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestPipeOne.php b/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestPipeOne.php index 5e3f3200d..5df3c570e 100644 --- a/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestPipeOne.php +++ b/src/Viserio/Component/Pipeline/Tests/Fixture/PipelineTestPipeOne.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pipeline\Tests\Fixture; diff --git a/src/Viserio/Component/Pipeline/Tests/PipelineTest.php b/src/Viserio/Component/Pipeline/Tests/PipelineTest.php index 08455caa6..ea9fabce1 100644 --- a/src/Viserio/Component/Pipeline/Tests/PipelineTest.php +++ b/src/Viserio/Component/Pipeline/Tests/PipelineTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Pipeline\Tests; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class PipelineTest extends TestCase { diff --git a/src/Viserio/Component/Pipeline/composer.json b/src/Viserio/Component/Pipeline/composer.json index 6cfb59f64..f318b8b15 100644 --- a/src/Viserio/Component/Pipeline/composer.json +++ b/src/Viserio/Component/Pipeline/composer.json @@ -33,10 +33,9 @@ "psr/container-implementation": "^1.0" }, "require-dev": { - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev" }, "extra": { diff --git a/src/Viserio/Component/Pipeline/phpstan.neon b/src/Viserio/Component/Pipeline/phpstan.neon index d3e3cd354..1bfed1eed 100644 --- a/src/Viserio/Component/Pipeline/phpstan.neon +++ b/src/Viserio/Component/Pipeline/phpstan.neon @@ -1,26 +1,16 @@ includes: -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture ignoreErrors: diff --git a/src/Viserio/Component/Pipeline/phpunit.xml b/src/Viserio/Component/Pipeline/phpunit.xml new file mode 100644 index 000000000..26f7ffd13 --- /dev/null +++ b/src/Viserio/Component/Pipeline/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Pipeline/phpunit.xml.dist b/src/Viserio/Component/Pipeline/phpunit.xml.dist deleted file mode 100644 index f4911e388..000000000 --- a/src/Viserio/Component/Pipeline/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Profiler/.gitignore b/src/Viserio/Component/Profiler/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Profiler/.gitignore +++ b/src/Viserio/Component/Profiler/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Profiler/AssetsRenderer.php b/src/Viserio/Component/Profiler/AssetsRenderer.php index 378d0e380..3e6d03690 100644 --- a/src/Viserio/Component/Profiler/AssetsRenderer.php +++ b/src/Viserio/Component/Profiler/AssetsRenderer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler; @@ -90,9 +90,6 @@ class AssetsRenderer implements AssetsRendererContract /** * Create a new file javascript renderer instance. - * - * @param bool $jqueryIsUsed - * @param null|string $rootPath */ public function __construct(bool $jqueryIsUsed = false, ?string $rootPath = null) { @@ -240,8 +237,6 @@ function ($collector) { /** * Render css and js into html elements. - * - * @return string */ protected function renderIntoHtml(): string { @@ -254,10 +249,7 @@ protected function renderIntoHtml(): string /** * Filters a tuple of (css, js) assets according to $type. * - * @param array $array - * @param null|string $type 'css', 'js' or null for both - * - * @return array + * @param null|string $type 'css', 'js' or null for both */ protected function filterAssetArray(array $array, ?string $type = null): array { @@ -280,8 +272,6 @@ protected function filterAssetArray(array $array, ?string $type = null): array * Get the last modified time of any assets. * * @param string $type 'js' or 'css' - * - * @return int */ protected function getModifiedTime(string $type): int { diff --git a/src/Viserio/Component/Profiler/Container/Provider/ProfilerPDOBridgeServiceProvider.php b/src/Viserio/Component/Profiler/Container/Provider/ProfilerPDOBridgeServiceProvider.php index 33544e320..84b3b0461 100644 --- a/src/Viserio/Component/Profiler/Container/Provider/ProfilerPDOBridgeServiceProvider.php +++ b/src/Viserio/Component/Profiler/Container/Provider/ProfilerPDOBridgeServiceProvider.php @@ -3,83 +3,13 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use PDO; -// use Psr\Container\ContainerInterface; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Profiler\DataCollector\Bridge\PDO\PDODataCollector; -// use Viserio\Component\Profiler\DataCollector\Bridge\PDO\TraceablePDODecorater; -// // class ProfilerPDOBridgeServiceProvider implements ServiceProviderContract // { -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// PDO::class => [self::class, 'createTraceablePDODecorator'], -// TraceablePDODecorater::class => static function (ContainerInterface $container) { -// return $container->get(PDO::class); -// }, -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * Extend PDO with our TraceablePDODecorater. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\PDO $pdo -// * -// * @return null|\Viserio\Component\Profiler\DataCollector\Bridge\PDO\TraceablePDODecorater -// */ -// public static function createTraceablePDODecorator( -// ContainerInterface $container, -// ?PDO $pdo = null -// ): ?TraceablePDODecorater { -// if ($pdo === null) { -// return null; -// } -// -// return new TraceablePDODecorater($pdo); -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $profiler->addCollector(new PDODataCollector( -// $container->get(TraceablePDODecorater::class) -// )); -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Profiler/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProvider.php b/src/Viserio/Component/Profiler/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProvider.php index 1c15db54e..e264f7c68 100644 --- a/src/Viserio/Component/Profiler/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProvider.php +++ b/src/Viserio/Component/Profiler/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProvider.php @@ -3,126 +3,13 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Cache\Adapter\Common\PhpCachePool as PhpCachePoolInterface; -// use Psr\Cache\CacheItemPoolInterface; -// use Psr\Container\ContainerInterface; -// use Psr\SimpleCache\CacheInterface; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Profiler\DataCollector\Bridge\Cache\PhpCacheTraceableCacheDecorator; -// use Viserio\Component\Profiler\DataCollector\Bridge\Cache\Psr6Psr16CacheDataCollector; -// use Viserio\Component\Profiler\DataCollector\Bridge\Cache\SimpleTraceableCacheDecorator; -// use Viserio\Component\Profiler\DataCollector\Bridge\Cache\TraceableCacheItemDecorator; -// // class ProfilerPsr6Psr16CacheBridgeServiceProvider implements ServiceProviderContract // { -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// CacheItemPoolInterface::class => [self::class, 'extendCacheItemPool'], -// CacheInterface::class => [self::class, 'extendSimpleTraceableCache'], -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * Decorate CacheItemPool instances. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Psr\Cache\CacheItemPoolInterface $cache -// * -// * @return null|\Psr\Cache\CacheItemPoolInterface -// */ -// public static function extendCacheItemPool( -// ContainerInterface $container, -// ?CacheItemPoolInterface $cache = null -// ): ?CacheItemPoolInterface { -// if ($cache !== null) { -// if ($cache instanceof PhpCachePoolInterface) { -// return new PhpCacheTraceableCacheDecorator($cache); -// } -// -// return new TraceableCacheItemDecorator($cache); -// } -// -// return $cache; -// } -// -// /** -// * Decorate SimpleTraceableCache instances. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Psr\SimpleCache\CacheInterface $cache -// * -// * @return null|\Psr\SimpleCache\CacheInterface -// */ -// public static function extendSimpleTraceableCache( -// ContainerInterface $container, -// ?CacheInterface $cache = null -// ): ?CacheInterface { -// if ($cache !== null) { -// if ($cache instanceof PhpCachePoolInterface) { -// return new PhpCacheTraceableCacheDecorator($cache); -// } -// -// return new SimpleTraceableCacheDecorator($cache); -// } -// -// return $cache; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $collector = new Psr6Psr16CacheDataCollector(); -// -// if ($container->has(CacheItemPoolInterface::class)) { -// if (($cache = $container->get(CacheItemPoolInterface::class)) instanceof TraceableCacheItemDecorator) { -// $collector->addPool($cache); -// } -// } -// -// if ($container->has(CacheInterface::class)) { -// $cache = $container->get(CacheInterface::class); -// -// if ($cache instanceof SimpleTraceableCacheDecorator || $cache instanceof PhpCacheTraceableCacheDecorator) { -// $collector->addPool($cache); -// } -// } -// -// $profiler->addCollector($collector); -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Profiler/Container/Provider/ProfilerServiceProvider.php b/src/Viserio/Component/Profiler/Container/Provider/ProfilerServiceProvider.php index e034f1565..7a19450d3 100644 --- a/src/Viserio/Component/Profiler/Container/Provider/ProfilerServiceProvider.php +++ b/src/Viserio/Component/Profiler/Container/Provider/ProfilerServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Provider; @@ -112,11 +112,6 @@ public static function getDefaultConfig(): iterable /** * Register profiler asset controllers. - * - * @param \Psr\Container\ContainerInterface $container - * @param null|\Viserio\Contract\Events\EventManager $eventManager - * - * @return null|\Viserio\Contract\Events\EventManager */ public static function extendEventManager( ContainerInterface $container, @@ -165,9 +160,6 @@ public static function createProfiler(ContainerInterface $container): ProfilerCo /** * Register profiler asset controllers. * - * @param \Psr\Container\ContainerInterface $container - * @param null|\Viserio\Contract\Routing\Router $router - * * @return null|\Viserio\Contract\Routing\Router */ public static function extendRouter(ContainerInterface $container, ?RouterContract $router = null): RouterContract @@ -196,12 +188,6 @@ static function ($router): void { /** * Register base collectors. - * - * @param \Psr\Container\ContainerInterface $container - * @param \Viserio\Contract\Profiler\Profiler $profiler - * @param array $options - * - * @return void */ protected static function registerBaseCollectors( ContainerInterface $container, @@ -229,12 +215,6 @@ protected static function registerBaseCollectors( /** * Register all found collectors in config. - * - * @param \Psr\Container\ContainerInterface $container - * @param \Viserio\Contract\Profiler\Profiler $profiler - * @param array $options - * - * @return void */ private static function registerCollectorsFromConfig( ContainerInterface $container, diff --git a/src/Viserio/Component/Profiler/Container/Provider/ProfilerSwiftMailerBridgeServiceProvider.php b/src/Viserio/Component/Profiler/Container/Provider/ProfilerSwiftMailerBridgeServiceProvider.php index 2e5e21f65..0bb1598d5 100644 --- a/src/Viserio/Component/Profiler/Container/Provider/ProfilerSwiftMailerBridgeServiceProvider.php +++ b/src/Viserio/Component/Profiler/Container/Provider/ProfilerSwiftMailerBridgeServiceProvider.php @@ -3,59 +3,13 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Swift_Mailer; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\Profiler\DataCollector\Bridge\SwiftMailDataCollector; -// // class ProfilerSwiftMailerBridgeServiceProvider implements ServiceProviderContract // { -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $profiler->addCollector(new SwiftMailDataCollector( -// $container->get(Swift_Mailer::class) -// )); -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Profiler/Controller/AssetController.php b/src/Viserio/Component/Profiler/Controller/AssetController.php index 3124761f8..6f387c131 100644 --- a/src/Viserio/Component/Profiler/Controller/AssetController.php +++ b/src/Viserio/Component/Profiler/Controller/AssetController.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Controller; @@ -46,11 +46,6 @@ class AssetController extends AbstractController /** * Create a new AssetController instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * @param \Psr\Http\Message\StreamFactoryInterface $streamFactory - * @param \Viserio\Contract\Profiler\Profiler $profiler */ public function __construct( ServerRequestInterface $serverRequest, @@ -70,8 +65,6 @@ public function __construct( /** * Return the javascript for the Debugbar. - * - * @return \Psr\Http\Message\ResponseInterface */ public function js(): ResponseInterface { @@ -89,8 +82,6 @@ public function js(): ResponseInterface /** * Return the stylesheets for the Debugbar. - * - * @return \Psr\Http\Message\ResponseInterface */ public function css(): ResponseInterface { diff --git a/src/Viserio/Component/Profiler/DataCollector/AbstractDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/AbstractDataCollector.php index 3603faf19..61a06e29b 100644 --- a/src/Viserio/Component/Profiler/DataCollector/AbstractDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/AbstractDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector; @@ -67,8 +67,6 @@ abstract class AbstractDataCollector implements DataCollectorContract /** * Get all collected data. - * - * @return array */ public function getData(): array { @@ -104,10 +102,6 @@ public function reset(): void /** * Add measurement to float time. * - * @param float $seconds - * - * @return string - * * @codeCoverageIgnore */ protected function formatDuration(float $seconds): string @@ -133,8 +127,6 @@ protected function formatDuration(float $seconds): string * ['value'] string Adds the content. * * @param array $data (See above) - * - * @return string */ protected function createTooltipGroup(array $data): string { @@ -173,8 +165,6 @@ protected function createTooltipGroup(array $data): string * ['content'] string Tab content. * * @param array $data (See above) - * - * @return string */ protected function createTabs(array $data): string { @@ -198,11 +188,6 @@ protected function createTabs(array $data): string /** * Creates a table. - * - * @param array $data - * @param array $settings - * - * @return string */ protected function createTable(array $data, array $settings = []): string { @@ -255,10 +240,6 @@ protected function createTable(array $data, array $settings = []): string /** * Create a dropdown menu content. - * - * @param array $data - * - * @return string */ protected function createDropdownMenuContent(array $data): string { @@ -291,11 +272,6 @@ protected function createDropdownMenuContent(array $data): string /** * Create a metrics. - * - * @param array $data - * @param null|string $name - * - * @return string */ protected function createMetrics(array $data, ?string $name = null): string { @@ -315,10 +291,6 @@ protected function createMetrics(array $data, ?string $name = null): string /** * Converts the variable into a serializable Data instance. - * - * @param mixed $var - * - * @return null|string */ protected function cloneVar($var): ?string { @@ -338,8 +310,6 @@ protected function cloneVar($var): ?string /** * Get the cloner used for dumping variables. - * - * @return \Symfony\Component\VarDumper\Cloner\AbstractCloner */ private static function getCloner(): AbstractCloner { @@ -358,8 +328,6 @@ private static function getCloner(): AbstractCloner /** * Get a HtmlDumper instance. - * - * @return \Symfony\Component\VarDumper\Dumper\HtmlDumper */ private static function getDumper(): HtmlDumper { @@ -373,11 +341,6 @@ private static function getDumper(): HtmlDumper return self::$htmlDumper; } - /** - * @param mixed $var - * - * @return mixed - */ private function decorateVar($var) { if (\is_array($var)) { diff --git a/src/Viserio/Component/Profiler/DataCollector/AjaxRequestsDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/AjaxRequestsDataCollector.php index e853ecd76..c651f5baf 100644 --- a/src/Viserio/Component/Profiler/DataCollector/AjaxRequestsDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/AjaxRequestsDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector; diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/CacheDecorator.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/CacheDecorator.php index 43bc71220..cd26c87c1 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/CacheDecorator.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/CacheDecorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache; @@ -17,15 +17,11 @@ interface CacheDecorator { /** * Get the original class name. - * - * @return string */ public function getName(): string; /** * Get a list of calls. - * - * @return array */ public function getCalls(): array; } diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecorator.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecorator.php index ab651c7d5..64b1c44cb 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecorator.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache; @@ -124,8 +124,6 @@ public function invalidateTag($tag) /** * Start new event. * - * @param string $name - * * @return \Viserio\Component\Profiler\DataCollector\Bridge\Cache\TraceableCollector */ private function start(string $name): object diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollector.php index 9eb2a96b7..3b1733f3f 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache; @@ -41,8 +41,6 @@ class Psr6Psr16CacheDataCollector extends AbstractDataCollector implements Panel * @param \Viserio\Component\Profiler\DataCollector\Bridge\Cache\CacheDecorator $cache * * @throws \Viserio\Contract\Profiler\Exception\UnexpectedValueException - * - * @return void */ public function addPool(CacheDecorator $cache): void { @@ -146,8 +144,6 @@ public function getPanel(): string /** * Method returns amount of logged Cache reads: "get" calls. - * - * @return array */ public function getStatistics(): array { @@ -156,8 +152,6 @@ public function getStatistics(): array /** * Method returns the statistic totals. - * - * @return array */ public function getTotals(): array { @@ -166,8 +160,6 @@ public function getTotals(): array /** * Method returns all logged Cache call objects. - * - * @return int */ public function getCalls(): int { @@ -187,9 +179,6 @@ public function reset(): void } } - /** - * @return array - */ private function calculateStatistics(): array { $statistics = []; @@ -245,9 +234,6 @@ private function calculateStatistics(): array return $statistics; } - /** - * @return array - */ private function calculateTotalStatistics(): array { $statistics = $this->getStatistics(); diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/SimpleTraceableCacheDecorator.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/SimpleTraceableCacheDecorator.php index 1e25792ba..34db0b41b 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/SimpleTraceableCacheDecorator.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/SimpleTraceableCacheDecorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache; @@ -50,8 +50,6 @@ final class SimpleTraceableCacheDecorator implements CacheDecorator, CacheInterf /** * Create new Simple Traceable Cache Decorator instance. - * - * @param CacheInterface $pool */ public function __construct(CacheInterface $pool) { @@ -96,8 +94,6 @@ public function clear(): ?bool /** * Start new event. * - * @param string $name - * * @return \Viserio\Component\Profiler\DataCollector\Bridge\Cache\TraceableCollector */ private function start(string $name): object diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCacheItemDecorator.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCacheItemDecorator.php index d46b7d0cd..256cb877c 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCacheItemDecorator.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCacheItemDecorator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache; @@ -50,8 +50,6 @@ final class TraceableCacheItemDecorator implements CacheDecorator, CacheItemPool /** * Create new Traceable Cache Item Decorator instance. - * - * @param \Psr\Cache\CacheItemPoolInterface $pool */ public function __construct(CacheItemPoolInterface $pool) { @@ -96,8 +94,6 @@ public function clear(): ?bool /** * Start new event. * - * @param string $name - * * @return \Viserio\Component\Profiler\DataCollector\Bridge\Cache\TraceableCollector */ private function start(string $name): TraceableCollector diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCollector.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCollector.php index 627eaf0fa..91d349ac6 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/TraceableCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache; diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTrait.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTrait.php index 6213abf07..afdf5d148 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTrait.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache\Traits; diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTrait.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTrait.php index fdb6216ed..3b909fbe4 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTrait.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\Cache\Traits; diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/PDODataCollector.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/PDODataCollector.php index e1ba93129..ba6f7c9c7 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/PDODataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/PDODataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\PDO; diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDODecorater.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDODecorater.php index f04b6996d..44a499d9e 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDODecorater.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDODecorater.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\PDO; @@ -35,8 +35,6 @@ class TraceablePDODecorater extends PDO /** * Create a new TraceablePDODecorater instance. - * - * @param PDO $pdo */ public function __construct(PDO $pdo) { @@ -46,8 +44,6 @@ public function __construct(PDO $pdo) /** * Returns the list of executed statements as TracedStatement objects. - * - * @return array */ public function getExecutedStatements(): array { @@ -88,8 +84,6 @@ public function errorInfo(): array /** * {@inheritdoc} - * - * @param mixed $statement */ public function exec($statement) { @@ -172,8 +166,6 @@ public function addExecutedStatement(TracedStatement $stmt): void /** * Returns the accumulated execution time of statements. - * - * @return int */ public function getAccumulatedStatementsDuration(): int { @@ -184,8 +176,6 @@ public function getAccumulatedStatementsDuration(): int /** * Returns the peak memory usage while performing statements. - * - * @return int */ public function getMemoryUsage(): int { @@ -196,8 +186,6 @@ public function getMemoryUsage(): int /** * Returns the peak memory usage while performing statements. - * - * @return int */ public function getPeakMemoryUsage(): int { @@ -210,8 +198,6 @@ public function getPeakMemoryUsage(): int /** * Returns the list of failed statements. - * - * @return array */ public function getFailedExecutedStatements(): array { @@ -222,12 +208,6 @@ public function getFailedExecutedStatements(): array /** * Profiles a call to a PDO method. - * - * @param string $method - * @param string $sql - * @param array $args - * - * @return mixed */ protected function profileCall(string $method, string $sql, array $args) { diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDOStatementDecorater.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDOStatementDecorater.php index 108110853..5e70dcaba 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDOStatementDecorater.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TraceablePDOStatementDecorater.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\PDO; diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TracedStatement.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TracedStatement.php index aff0e6aee..f9559b806 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TracedStatement.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/PDO/TracedStatement.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge\PDO; @@ -41,7 +41,6 @@ class TracedStatement /** * @param string $sql - * @param array $params * @param string $preparedId */ public function __construct($sql, array $params = [], $preparedId = null) @@ -53,8 +52,6 @@ public function __construct($sql, array $params = [], $preparedId = null) /** * Returns the SQL string used for the query. - * - * @return string */ public function getSql(): string { @@ -63,8 +60,6 @@ public function getSql(): string /** * Returns the number of rows affected/returned. - * - * @return int */ public function getRowCount(): int { @@ -73,8 +68,6 @@ public function getRowCount(): int /** * Returns an array of parameters used with the query. - * - * @return array */ public function getParameters(): array { @@ -87,17 +80,11 @@ public function getParameters(): array return $params; } - /** - * @return mixed - */ public function getStartTime() { return $this->startTime; } - /** - * @return mixed - */ public function getEndTime() { return $this->endTime; @@ -105,25 +92,17 @@ public function getEndTime() /** * Returns the duration in seconds of the execution. - * - * @return int */ public function getDuration(): int { return $this->duration; } - /** - * @return mixed - */ public function getStartMemory() { return $this->startMemory; } - /** - * @return mixed - */ public function getEndMemory() { return $this->endMemory; @@ -131,8 +110,6 @@ public function getEndMemory() /** * Returns the exception triggered. - * - * @return Exception */ public function getException(): Exception { @@ -141,8 +118,6 @@ public function getException(): Exception /** * Returns the prepared statement id. - * - * @return string */ public function getPreparedId(): string { @@ -160,10 +135,9 @@ public function start($startTime = null, $startMemory = null): void } /** - * @param null|Exception $exception - * @param int $rowCount - * @param null $endTime - * @param null $endMemory + * @param int $rowCount + * @param null $endTime + * @param null $endMemory */ public function end(?Exception $exception = null, $rowCount = 0, $endTime = null, $endMemory = null): void { @@ -177,10 +151,6 @@ public function end(?Exception $exception = null, $rowCount = 0, $endTime = null /** * Check parameters for illegal (non UTF-8) strings, like Binary data. - * - * @param array $params - * - * @return mixed */ public function checkParameters(array $params) { @@ -197,8 +167,6 @@ public function checkParameters(array $params) * Returns the SQL string with any parameters used embedded. * * @param string $quotationChar - * - * @return string */ public function getSqlWithParams($quotationChar = '<>'): string { @@ -226,8 +194,6 @@ public function getSqlWithParams($quotationChar = '<>'): string /** * Checks if this is a prepared statement. - * - * @return bool */ public function isPrepared(): bool { @@ -236,8 +202,6 @@ public function isPrepared(): bool /** * Returns the memory usage during the execution. - * - * @return int */ public function getMemoryUsage(): int { @@ -246,8 +210,6 @@ public function getMemoryUsage(): int /** * Checks if the statement was successful. - * - * @return bool */ public function isSuccess(): bool { @@ -256,8 +218,6 @@ public function isSuccess(): bool /** * Returns the exception's code. - * - * @return string */ public function getErrorCode(): string { @@ -266,8 +226,6 @@ public function getErrorCode(): string /** * Returns the exception's message. - * - * @return string */ public function getErrorMessage(): string { diff --git a/src/Viserio/Component/Profiler/DataCollector/Bridge/SwiftMailDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/Bridge/SwiftMailDataCollector.php index 95634aab9..855f24340 100644 --- a/src/Viserio/Component/Profiler/DataCollector/Bridge/SwiftMailDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/Bridge/SwiftMailDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector\Bridge; @@ -31,8 +31,6 @@ class SwiftMailDataCollector extends AbstractDataCollector implements PanelAware /** * Create new swift mailer data collector instance. - * - * @param Swift_Mailer $mailer */ public function __construct(Swift_Mailer $mailer) { @@ -87,10 +85,6 @@ public function getPanel(): string /** * Format to from message. - * - * @param null|array $to - * - * @return string */ protected function formatTo(?array $to): string { diff --git a/src/Viserio/Component/Profiler/DataCollector/MemoryDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/MemoryDataCollector.php index b35f1e84e..dddcfca8c 100644 --- a/src/Viserio/Component/Profiler/DataCollector/MemoryDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/MemoryDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector; diff --git a/src/Viserio/Component/Profiler/DataCollector/MessagesDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/MessagesDataCollector.php index bc17fdc83..8abbf4784 100644 --- a/src/Viserio/Component/Profiler/DataCollector/MessagesDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/MessagesDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector; @@ -34,8 +34,6 @@ class MessagesDataCollector extends AbstractDataCollector /** * Create new messages collector. - * - * @param string $name */ public function __construct(string $name = 'messages') { @@ -44,8 +42,6 @@ public function __construct(string $name = 'messages') /** * Returns collected messages. - * - * @return array */ public function getMessages(): array { @@ -91,11 +87,6 @@ public function getMenu(): array * Adds a message. * * A message can be anything from an object to a string. - * - * @param mixed $message - * @param string $label - * - * @return void */ public function addMessage($message, string $label = 'info'): void { @@ -112,8 +103,6 @@ public function addMessage($message, string $label = 'info'): void /** * Deletes all messages. - * - * @return void */ public function reset(): void { diff --git a/src/Viserio/Component/Profiler/DataCollector/PhpInfoDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/PhpInfoDataCollector.php index 14342842f..c1c3fde54 100644 --- a/src/Viserio/Component/Profiler/DataCollector/PhpInfoDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/PhpInfoDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector; @@ -71,8 +71,6 @@ public function getPhpVersionExtra(): ?string /** * The PHP architecture as number of bits (e.g. 32 or 64). - * - * @return null|int */ public function getPhpArchitecture(): ?int { diff --git a/src/Viserio/Component/Profiler/DataCollector/TimeDataCollector.php b/src/Viserio/Component/Profiler/DataCollector/TimeDataCollector.php index bd0b06f55..50a346c01 100644 --- a/src/Viserio/Component/Profiler/DataCollector/TimeDataCollector.php +++ b/src/Viserio/Component/Profiler/DataCollector/TimeDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\DataCollector; @@ -49,8 +49,6 @@ class TimeDataCollector extends AbstractDataCollector /** * Create new time collector instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest */ public function __construct(ServerRequestInterface $serverRequest) { @@ -68,8 +66,6 @@ public function __construct(ServerRequestInterface $serverRequest) /** * Returns the request start time. * - * @return float - * * @codeCoverageIgnore */ public function getRequestStartTime(): float @@ -80,8 +76,6 @@ public function getRequestStartTime(): float /** * Returns the request end time. * - * @return float - * * @codeCoverageIgnore */ public function getRequestEndTime(): float @@ -91,8 +85,6 @@ public function getRequestEndTime(): float /** * Returns an array of all measures. - * - * @return array */ public function getMeasures(): array { @@ -149,8 +141,6 @@ public function getMenuPosition(): string /** * Returns the duration of a request. - * - * @return float */ public function getRequestDuration(): float { @@ -167,8 +157,6 @@ public function getRequestDuration(): float * @param string $name Internal name, used to stop the measure * @param null|string $label Public name * @param null|string $collector The source of the collector - * - * @return void */ public function startMeasure(string $name, ?string $label = null, ?string $collector = null): void { @@ -183,10 +171,6 @@ public function startMeasure(string $name, ?string $label = null, ?string $colle /** * Check a measure exists. - * - * @param string $name - * - * @return bool */ public function hasStartedMeasure(string $name): bool { @@ -196,12 +180,7 @@ public function hasStartedMeasure(string $name): bool /** * Stops a measure. * - * @param string $name - * @param array $params - * * @throws RuntimeException - * - * @return void */ public function stopMeasure(string $name, array $params = []): void { @@ -224,14 +203,6 @@ public function stopMeasure(string $name, array $params = []): void /** * Adds a measure. - * - * @param string $label - * @param float $start - * @param float $end - * @param array $params - * @param null|string $collector - * - * @return void */ public function addMeasure( string $label, diff --git a/src/Viserio/Component/Profiler/Middleware/ProfilerMiddleware.php b/src/Viserio/Component/Profiler/Middleware/ProfilerMiddleware.php index bfefd79fc..68c2f5049 100644 --- a/src/Viserio/Component/Profiler/Middleware/ProfilerMiddleware.php +++ b/src/Viserio/Component/Profiler/Middleware/ProfilerMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Middleware; @@ -31,8 +31,6 @@ class ProfilerMiddleware implements MiddlewareInterface /** * Create a new middleware instance. - * - * @param \Psr\Container\ContainerInterface $container */ public function __construct(ContainerInterface $container) { diff --git a/src/Viserio/Component/Profiler/Profile.php b/src/Viserio/Component/Profiler/Profile.php index a2c6d5542..240ed4c43 100644 --- a/src/Viserio/Component/Profiler/Profile.php +++ b/src/Viserio/Component/Profiler/Profile.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler; @@ -76,8 +76,6 @@ class Profile /** * Create new Profiler profile. - * - * @param string $token */ public function __construct(string $token) { @@ -85,8 +83,6 @@ public function __construct(string $token) } /** - * @return array - * * @codeCoverageIgnore */ public function __sleep(): array @@ -119,8 +115,6 @@ public function getToken(): string * Sets the token. * * @param string $token The token - * - * @return void */ public function setToken(string $token): void { @@ -139,10 +133,6 @@ public function getIp(): string /** * Sets the IP. - * - * @param string $ip - * - * @return void */ public function setIp(string $ip): void { @@ -161,10 +151,6 @@ public function getMethod(): string /** * Set the request method. - * - * @param string $method - * - * @return void */ public function setMethod(string $method): void { @@ -173,8 +159,6 @@ public function setMethod(string $method): void /** * Returns the url. - * - * @return string */ public function getUrl(): string { @@ -183,10 +167,6 @@ public function getUrl(): string /** * Set the request url. - * - * @param string $url - * - * @return void */ public function setUrl(string $url): void { @@ -211,8 +191,6 @@ public function getTime(): string * Set the needed time. * * @param float|string $time - * - * @return void */ public function setTime($time): void { @@ -231,10 +209,6 @@ public function getDate(): string /** * Set the creation date. - * - * @param string $date - * - * @return void */ public function setDate(string $date): void { @@ -243,8 +217,6 @@ public function setDate(string $date): void /** * Get the response status code. - * - * @return string */ public function getStatusCode(): string { @@ -253,10 +225,6 @@ public function getStatusCode(): string /** * Set the response status code. - * - * @param int $statusCode - * - * @return void */ public function setStatusCode(int $statusCode): void { @@ -275,10 +243,6 @@ public function getCollectors(): array /** * Sets the Collectors associated with this profile. - * - * @param array $collectors - * - * @return void */ public function setCollectors(array $collectors): void { @@ -293,8 +257,6 @@ public function setCollectors(array $collectors): void * @param string $name A collector name * * @throws \Viserio\Contract\Profiler\Exception\CollectorNotFoundException if the collector does not exist - * - * @return \Viserio\Contract\Profiler\DataCollector */ public function getCollector(string $name): DataCollectorContract { @@ -307,10 +269,6 @@ public function getCollector(string $name): DataCollectorContract /** * Adds a Collector. - * - * @param \Viserio\Contract\Profiler\DataCollector $collector - * - * @return void */ public function addCollector(DataCollectorContract $collector): void { @@ -321,8 +279,6 @@ public function addCollector(DataCollectorContract $collector): void * Returns true if a Collector for the given name exists. * * @param string $name A collector name - * - * @return bool */ public function hasCollector(string $name): bool { diff --git a/src/Viserio/Component/Profiler/Profiler.php b/src/Viserio/Component/Profiler/Profiler.php index 50adf4bb0..b4effb91d 100644 --- a/src/Viserio/Component/Profiler/Profiler.php +++ b/src/Viserio/Component/Profiler/Profiler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler; @@ -79,8 +79,6 @@ class Profiler implements LoggerAwareInterface, ProfilerContract /** * Create new Profiler instance. - * - * @param \Viserio\Contract\Profiler\AssetsRenderer $assetsRenderer */ public function __construct(AssetsRendererContract $assetsRenderer) { @@ -115,8 +113,6 @@ public function setUrlGenerator(UrlGeneratorContract $urlGenerator): ProfilerCon /** * Returns a AssetsRenderer for this instance. - * - * @return \Viserio\Contract\Profiler\AssetsRenderer */ public function getAssetsRenderer(): AssetsRendererContract { @@ -143,8 +139,6 @@ public function setTemplate(string $path): ProfilerContract /** * Disables the profiler. - * - * @return void */ public function disable(): void { @@ -153,8 +147,6 @@ public function disable(): void /** * Enables the profiler. - * - * @return void */ public function enable(): void { @@ -234,11 +226,6 @@ public function reset(): void /** * Injects the web debug toolbar into the given Response. * - * @param \Psr\Http\Message\ResponseInterface $response - * @param string $token - * - * @return \Psr\Http\Message\ResponseInterface - * * @see https://github.com/symfony/ProfilerBundle/blob/master/EventListener/WebDebugToolbarListener.php */ protected function injectProfiler(ResponseInterface $response, string $token): ResponseInterface @@ -267,8 +254,6 @@ protected function injectProfiler(ResponseInterface $response, string $token): R /** * Determine if we are running in the console. * - * @return bool - * * @codeCoverageIgnore */ protected function runningInConsole(): bool @@ -278,12 +263,6 @@ protected function runningInConsole(): bool /** * Collect data and create a new profile and save it. - * - * @param string $token - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return void */ private function collectData( string $token, @@ -319,10 +298,6 @@ private function collectData( /** * Create template. - * - * @param string $token - * - * @return string */ private function createTemplate(string $token): string { @@ -339,10 +314,6 @@ private function createTemplate(string $token): string /** * Check if response is a html response. - * - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return bool */ private function isHtmlResponse(ResponseInterface $response): bool { @@ -351,17 +322,6 @@ private function isHtmlResponse(ResponseInterface $response): bool /** * Create profile with all datas. - * - * @param string $token - * @param string $ip - * @param string $method - * @param string $url - * @param int $statusCode - * @param float $time - * @param string $date - * @param array $collectors - * - * @return void */ private function createProfile( string $token, diff --git a/src/Viserio/Component/Profiler/TemplateManager.php b/src/Viserio/Component/Profiler/TemplateManager.php index c18a6601f..677e66ae1 100644 --- a/src/Viserio/Component/Profiler/TemplateManager.php +++ b/src/Viserio/Component/Profiler/TemplateManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler; @@ -49,11 +49,6 @@ class TemplateManager implements RenderableContract /** * Create a new template manager instance. - * - * @param array $collectors - * @param string $templatePath - * @param string $token - * @param array $icons */ public function __construct(array $collectors, string $templatePath, string $token, array $icons = []) { @@ -65,10 +60,6 @@ public function __construct(array $collectors, string $templatePath, string $tok /** * Escapes a string for output in an HTML document. - * - * @param string $raw - * - * @return string */ public static function escape(string $raw): string { @@ -117,8 +108,6 @@ public function render(): string /** * Sort all datas from collectors. - * - * @return array */ public function getSortedData(): array { diff --git a/src/Viserio/Component/Profiler/Tests/AssetsRendererTest.php b/src/Viserio/Component/Profiler/Tests/AssetsRendererTest.php index 84feff578..23fa70c82 100644 --- a/src/Viserio/Component/Profiler/Tests/AssetsRendererTest.php +++ b/src/Viserio/Component/Profiler/Tests/AssetsRendererTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class AssetsRendererTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPDOBridgeServiceProviderTest.php b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPDOBridgeServiceProviderTest.php index 40f3e34e4..1f822e2e3 100644 --- a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPDOBridgeServiceProviderTest.php +++ b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPDOBridgeServiceProviderTest.php @@ -3,58 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use PDO; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\DataCollector\Bridge\PDO\TraceablePDODecorater; -// use Viserio\Component\Profiler\Provider\ProfilerPDOBridgeServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// ///** // * @internal // */ // final class ProfilerPDOBridgeServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $container = new Container(); -// $container->bind(PDO::class, new PDO('sqlite:' . \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Stub' . \DIRECTORY_SEPARATOR . 'database.sqlite')); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new ProfilerPDOBridgeServiceProvider()); -// -// $container->bind('config', ['viserio' => ['profiler' => ['enable' => true]]]); -// -// $this->assertInstanceOf(ProfilerContract::class, $container->get(ProfilerContract::class)); -// $this->assertInstanceOf(TraceablePDODecorater::class, $container->get(PDO::class)); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProviderTest.php b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProviderTest.php index a949d8566..e983d4954 100644 --- a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProviderTest.php +++ b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerPsr6Psr16CacheBridgeServiceProviderTest.php @@ -3,58 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Cache\CacheItemPoolInterface; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\DataCollector\Bridge\Cache\TraceableCacheItemDecorator; -// use Viserio\Component\Profiler\Provider\ProfilerPsr6Psr16CacheBridgeServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// ///** // * @internal // */ // final class ProfilerPsr6Psr16CacheBridgeServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $container = new Container(); -// $container->bind(CacheItemPoolInterface::class, \Mockery::mock(CacheItemPoolInterface::class)); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new ProfilerPsr6Psr16CacheBridgeServiceProvider()); -// -// $container->bind('config', ['viserio' => ['profiler' => ['enable' => true]]]); -// -// $this->assertInstanceOf(ProfilerContract::class, $container->get(ProfilerContract::class)); -// $this->assertInstanceOf(TraceableCacheItemDecorator::class, $container->get(CacheItemPoolInterface::class)); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerServiceProviderTest.php b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerServiceProviderTest.php index b5f9f5eda..680a14b47 100644 --- a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerServiceProviderTest.php +++ b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerServiceProviderTest.php @@ -3,82 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Routing\Router as RouterContract; -// use Viserio\Component\Events\Provider\EventsServiceProvider; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\AssetsRenderer; -// use Viserio\Component\Profiler\Profiler; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// use Viserio\Component\Routing\Provider\RoutingServiceProvider; -// ///** // * @internal // */ // final class ProfilerServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new EventsServiceProvider()); -// -// $container->register(new ProfilerServiceProvider()); -// -// $container->bind('config', ['viserio' => ['profiler' => ['enable' => true]]]); -// -// $this->assertInstanceOf(AssetsRenderer::class, $container->get(AssetsRenderer::class)); -// $this->assertInstanceOf(Profiler::class, $container->get(ProfilerContract::class)); -// $this->assertInstanceOf(ProfilerContract::class, $container->get(ProfilerContract::class)); -// } -// -// public function testRouteGroups(): void -// { -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new EventsServiceProvider()); -// $container->register(new RoutingServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// -// $container->bind('config', ['viserio' => ['profiler' => ['enable' => true]]]); -// -// $router = $container->get(RouterContract::class); -// $routes = $router->getRoutes()->getRoutes(); -// -// $action1 = $routes[0]->getAction(); -// $action2 = $routes[1]->getAction(); -// -// $this->assertEquals('Viserio\Component\Profiler\Controller\AssetController@css', $action1['controller']); -// $this->assertEquals('Viserio\Component\Profiler\Controller\AssetController@js', $action2['controller']); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerSwiftMailerBridgeServiceProviderTest.php b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerSwiftMailerBridgeServiceProviderTest.php index 91e38471d..02dff33dd 100644 --- a/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerSwiftMailerBridgeServiceProviderTest.php +++ b/src/Viserio/Component/Profiler/Tests/Container/Provider/ProfilerSwiftMailerBridgeServiceProviderTest.php @@ -3,57 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Swift_Mailer; -// use Swift_SmtpTransport; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerSwiftMailerBridgeServiceProvider; -// ///** // * @internal // */ // final class ProfilerSwiftMailerBridgeServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->bind(Swift_Mailer::class, new Swift_Mailer(new Swift_SmtpTransport('smtp.example.org', 25))); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new ProfilerSwiftMailerBridgeServiceProvider()); -// -// $container->bind('config', ['viserio' => ['profiler' => ['enable' => true]]]); -// -// $this->assertInstanceOf(ProfilerContract::class, $container->get(ProfilerContract::class)); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecoratorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecoratorTest.php index cb842a082..a9cda3cdc 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecoratorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/PhpCacheTraceableCacheDecoratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge\Cache; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class PhpCacheTraceableCacheDecoratorTest extends TestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollectorTest.php index 006042724..aece137be 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Psr6Psr16CacheDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge\Cache; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class Psr6Psr16CacheDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/SimpleTraceableCacheDecoratorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/SimpleTraceableCacheDecoratorTest.php index ecb5b92f4..151722e06 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/SimpleTraceableCacheDecoratorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/SimpleTraceableCacheDecoratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge\Cache; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class SimpleTraceableCacheDecoratorTest extends TestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/TraceableCacheItemDecoratorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/TraceableCacheItemDecoratorTest.php index 2db99624f..dd824bff7 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/TraceableCacheItemDecoratorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/TraceableCacheItemDecoratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge\Cache; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class TraceableCacheItemDecoratorTest extends TestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTestTrait.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTestTrait.php index a24d5aa90..e8e6a2ac5 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTestTrait.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/SimpleTraceableCacheDecoratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge\Cache\Traits; diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTestTrait.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTestTrait.php index 240d56210..3b1f6d5ae 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTestTrait.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/Cache/Traits/TraceableCacheItemDecoratorTestTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge\Cache\Traits; diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/SwiftMailDataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/SwiftMailDataCollectorTest.php index 4fad9252e..88c67fdbf 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/SwiftMailDataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/Bridge/SwiftMailDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector\Bridge; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class SwiftMailDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/DataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/DataCollectorTest.php index db02d4bc3..686465ee3 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/DataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/DataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class DataCollectorTest extends TestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/MemoryDataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/MemoryDataCollectorTest.php index fef9b39f4..46822b592 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/MemoryDataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/MemoryDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class MemoryDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/MessagesDataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/MessagesDataCollectorTest.php index 0b34fc1ea..59e023f48 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/MessagesDataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/MessagesDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class MessagesDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/PhpInfoDataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/PhpInfoDataCollectorTest.php index c6d321c10..c781f0c04 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/PhpInfoDataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/PhpInfoDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class PhpInfoDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/DataCollector/TimeDataCollectorTest.php b/src/Viserio/Component/Profiler/Tests/DataCollector/TimeDataCollectorTest.php index 0345bc6d6..f043fcf1e 100644 --- a/src/Viserio/Component/Profiler/Tests/DataCollector/TimeDataCollectorTest.php +++ b/src/Viserio/Component/Profiler/Tests/DataCollector/TimeDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\DataCollector; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class TimeDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/Fixture/FixtureDataCollector.php b/src/Viserio/Component/Profiler/Tests/Fixture/FixtureDataCollector.php index bc3d2a530..066f16a4a 100644 --- a/src/Viserio/Component/Profiler/Tests/Fixture/FixtureDataCollector.php +++ b/src/Viserio/Component/Profiler/Tests/Fixture/FixtureDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\Fixture; diff --git a/src/Viserio/Component/Profiler/Tests/Fixture/ProfilerTester.php b/src/Viserio/Component/Profiler/Tests/Fixture/ProfilerTester.php index 008532dc9..49d24428e 100644 --- a/src/Viserio/Component/Profiler/Tests/Fixture/ProfilerTester.php +++ b/src/Viserio/Component/Profiler/Tests/Fixture/ProfilerTester.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\Fixture; @@ -20,8 +20,6 @@ class ProfilerTester extends Profiler /** * Determine if we are running in the console. * - * @return bool - * * @codeCoverageIgnore */ protected function runningInConsole(): bool diff --git a/src/Viserio/Component/Profiler/Tests/Middleware/ProfilerMiddlewareTest.php b/src/Viserio/Component/Profiler/Tests/Middleware/ProfilerMiddlewareTest.php index b181bcb7b..a14f33bd7 100644 --- a/src/Viserio/Component/Profiler/Tests/Middleware/ProfilerMiddlewareTest.php +++ b/src/Viserio/Component/Profiler/Tests/Middleware/ProfilerMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Test\Middleware; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class ProfilerMiddlewareTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Profiler/Tests/ProfileTest.php b/src/Viserio/Component/Profiler/Tests/ProfileTest.php index 6a6551cd6..3ac874f06 100644 --- a/src/Viserio/Component/Profiler/Tests/ProfileTest.php +++ b/src/Viserio/Component/Profiler/Tests/ProfileTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ProfileTest extends TestCase { diff --git a/src/Viserio/Component/Profiler/Tests/ProfilerTest.php b/src/Viserio/Component/Profiler/Tests/ProfilerTest.php index 661bbaabd..70a37a8a5 100644 --- a/src/Viserio/Component/Profiler/Tests/ProfilerTest.php +++ b/src/Viserio/Component/Profiler/Tests/ProfilerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class ProfilerTest extends MockeryTestCase { @@ -182,9 +183,6 @@ private function removeId(string $html): string return \trim(\preg_replace('/="profiler-(.*?)"/', '', $html)); } - /** - * @return \Psr\Http\Message\ResponseInterface - */ private function getHtmlResponse(): ResponseInterface { $response = (new ResponseFactory())->createResponse(); diff --git a/src/Viserio/Component/Profiler/Tests/TemplateManagerTest.php b/src/Viserio/Component/Profiler/Tests/TemplateManagerTest.php index d7bc0b603..416ff46fd 100644 --- a/src/Viserio/Component/Profiler/Tests/TemplateManagerTest.php +++ b/src/Viserio/Component/Profiler/Tests/TemplateManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests; @@ -22,14 +22,13 @@ use Viserio\Component\Profiler\AssetsRenderer; use Viserio\Component\Profiler\DataCollector\AjaxRequestsDataCollector; use Viserio\Component\Profiler\DataCollector\Bridge\SwiftMailDataCollector; -use Viserio\Component\Profiler\DataCollector\PhpInfoDataCollector; use Viserio\Component\Profiler\TemplateManager; -use const DIRECTORY_SEPARATOR; /** * @internal * * @small + * @coversNothing */ final class TemplateManagerTest extends MockeryTestCase { @@ -72,34 +71,6 @@ public function testRender(): void ); } -// public function testRenderWithCollector(): void -// { -// $collector = new PhpInfoDataCollector(); -// $collector->collect( -// Mockery::mock(ServerRequestInterface::class), -// Mockery::mock(ResponseInterface::class) -// ); -// -// $assets = new AssetsRenderer(); -// $template = new TemplateManager( -// [ -// 'php-info-data-collector' => [ -// 'collector' => $collector, -// ], -// ], -// \dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Resource' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'profiler.html.php', -// 'fds4f6as', -// $assets->getIcons() -// ); -// -// require_once __DIR__ . DIRECTORY_SEPARATOR . 'Fixture' . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . 'profilewithcollector.html.php'; -// -// self::assertSame( -// $this->removeId($text), -// $this->removeId($template->render()) -// ); -// } - public function testRenderWithAjaxRequestsDataCollector(): void { $collector = new AjaxRequestsDataCollector(); diff --git a/src/Viserio/Component/Profiler/Tests/Util/HtmlDumperOutputTest.php b/src/Viserio/Component/Profiler/Tests/Util/HtmlDumperOutputTest.php index f57cfd4dd..fe26bba83 100644 --- a/src/Viserio/Component/Profiler/Tests/Util/HtmlDumperOutputTest.php +++ b/src/Viserio/Component/Profiler/Tests/Util/HtmlDumperOutputTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Tests\Util; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class HtmlDumperOutputTest extends TestCase { diff --git a/src/Viserio/Component/Profiler/Util/HtmlDumperOutput.php b/src/Viserio/Component/Profiler/Util/HtmlDumperOutput.php index 32b057d33..b19930ebd 100644 --- a/src/Viserio/Component/Profiler/Util/HtmlDumperOutput.php +++ b/src/Viserio/Component/Profiler/Util/HtmlDumperOutput.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Profiler\Util; @@ -44,8 +44,6 @@ public function __invoke($line, $depth): void /** * Get the dump output. - * - * @return null|string */ public function getOutput(): ?string { @@ -54,8 +52,6 @@ public function getOutput(): ?string /** * Clear the output. - * - * @return void */ public function reset(): void { diff --git a/src/Viserio/Component/Profiler/composer.json b/src/Viserio/Component/Profiler/composer.json index d82609502..a2d73f7a3 100644 --- a/src/Viserio/Component/Profiler/composer.json +++ b/src/Viserio/Component/Profiler/composer.json @@ -46,11 +46,10 @@ "require-dev": { "ext-pdo": "*", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", "psr/http-server-middleware": "^1.0.0", - "slam/phpstan-extensions": "^4.0.0", "swiftmailer/swiftmailer": "^6.0.0", "viserio/cache": "^1.0@dev", "viserio/config": "^1.0@dev", diff --git a/src/Viserio/Component/Profiler/phpstan.neon b/src/Viserio/Component/Profiler/phpstan.neon index e37a25664..b71e64f4e 100644 --- a/src/Viserio/Component/Profiler/phpstan.neon +++ b/src/Viserio/Component/Profiler/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled # Ignore html.php files - Resource/views/profiler.html.php diff --git a/src/Viserio/Component/Profiler/phpunit.xml b/src/Viserio/Component/Profiler/phpunit.xml new file mode 100644 index 000000000..d83fd9790 --- /dev/null +++ b/src/Viserio/Component/Profiler/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Profiler/phpunit.xml.dist b/src/Viserio/Component/Profiler/phpunit.xml.dist deleted file mode 100644 index 995da1cd1..000000000 --- a/src/Viserio/Component/Profiler/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Routing/.gitignore b/src/Viserio/Component/Routing/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Routing/.gitignore +++ b/src/Viserio/Component/Routing/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Routing/AbstractController.php b/src/Viserio/Component/Routing/AbstractController.php index cf4babf8b..c7d65d0b5 100644 --- a/src/Viserio/Component/Routing/AbstractController.php +++ b/src/Viserio/Component/Routing/AbstractController.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -24,12 +24,7 @@ abstract class AbstractController implements MiddlewareAwareContract /** * Handle calls to missing methods on the controller. * - * @param string $method - * @param array $parameters - * * @throws BadMethodCallException - * - * @return mixed */ public function __call(string $method, array $parameters) { @@ -38,8 +33,6 @@ public function __call(string $method, array $parameters) /** * Get all middleware, including the ones from the controller. - * - * @return array */ public function gatherMiddleware(): array { @@ -48,8 +41,6 @@ public function gatherMiddleware(): array /** * Return all disabled middleware. - * - * @return array */ public function gatherDisabledMiddleware(): array { diff --git a/src/Viserio/Component/Routing/Command/RouteListCommand.php b/src/Viserio/Component/Routing/Command/RouteListCommand.php index e5ba49433..edd0fc4d9 100644 --- a/src/Viserio/Component/Routing/Command/RouteListCommand.php +++ b/src/Viserio/Component/Routing/Command/RouteListCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Command; @@ -56,8 +56,6 @@ class RouteListCommand extends AbstractCommand /** * Create a new route command instance. - * - * @param \Viserio\Contract\Routing\Router $router */ public function __construct(RouterContract $router) { @@ -84,8 +82,6 @@ public function handle(): int /** * Compile the routes into a displayable format. - * - * @return array */ protected function getRoutes(): array { @@ -112,10 +108,6 @@ protected function getRoutes(): array /** * Get the route information for a given route. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return null|array */ protected function getRouteInformation(RouteContract $route): ?array { @@ -132,10 +124,6 @@ protected function getRouteInformation(RouteContract $route): ?array /** * Filter the route by URI and / or name. - * - * @param array $route - * - * @return null|array */ protected function filterRoute(array $route): ?array { @@ -154,11 +142,6 @@ protected function filterRoute(array $route): ?array /** * Sort the array using the given callback. - * - * @param array $array - * @param callable $callback - * - * @return array */ protected static function sort(array $array, callable $callback): array { diff --git a/src/Viserio/Component/Routing/Container/Provider/ConsoleCommandsServiceProvider.php b/src/Viserio/Component/Routing/Container/Provider/ConsoleCommandsServiceProvider.php index 765b7d038..180497163 100644 --- a/src/Viserio/Component/Routing/Container/Provider/ConsoleCommandsServiceProvider.php +++ b/src/Viserio/Component/Routing/Container/Provider/ConsoleCommandsServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Container\Provider; diff --git a/src/Viserio/Component/Routing/Container/Provider/RoutingDataCollectorServiceProvider.php b/src/Viserio/Component/Routing/Container/Provider/RoutingDataCollectorServiceProvider.php index fe1a3ad92..fd90cfc01 100644 --- a/src/Viserio/Component/Routing/Container/Provider/RoutingDataCollectorServiceProvider.php +++ b/src/Viserio/Component/Routing/Container/Provider/RoutingDataCollectorServiceProvider.php @@ -3,93 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Routing\Router as RouterContract; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// use Viserio\Component\Routing\DataCollector\RoutingDataCollector; -// // class RoutingDataCollectorServiceProvider implements // ServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'routes' => false, -// ], -// ]; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['routes']) { -// $profiler->addCollector( -// new RoutingDataCollector( -// $container->get(RouterContract::class)->getRoutes() -// ) -// ); -// } -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Routing/Container/Provider/RoutingServiceProvider.php b/src/Viserio/Component/Routing/Container/Provider/RoutingServiceProvider.php index 2b4b6a4d7..cce9aae9e 100644 --- a/src/Viserio/Component/Routing/Container/Provider/RoutingServiceProvider.php +++ b/src/Viserio/Component/Routing/Container/Provider/RoutingServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Container\Provider; diff --git a/src/Viserio/Component/Routing/DataCollector/RoutingDataCollector.php b/src/Viserio/Component/Routing/DataCollector/RoutingDataCollector.php index 15a5ad4c8..66105d736 100644 --- a/src/Viserio/Component/Routing/DataCollector/RoutingDataCollector.php +++ b/src/Viserio/Component/Routing/DataCollector/RoutingDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\DataCollector; @@ -30,8 +30,6 @@ class RoutingDataCollector extends AbstractDataCollector implements PanelAwareCo /** * Create a new viserio routes data collector. - * - * @param \Viserio\Contract\Routing\RouteCollection $routes */ public function __construct(RouteCollectionContract $routes) { diff --git a/src/Viserio/Component/Routing/Dispatcher/MiddlewareBasedDispatcher.php b/src/Viserio/Component/Routing/Dispatcher/MiddlewareBasedDispatcher.php index 4eede8905..f9a674e2f 100644 --- a/src/Viserio/Component/Routing/Dispatcher/MiddlewareBasedDispatcher.php +++ b/src/Viserio/Component/Routing/Dispatcher/MiddlewareBasedDispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Dispatcher; @@ -46,10 +46,6 @@ class MiddlewareBasedDispatcher extends SimpleDispatcher implements MiddlewareAw /** * Register middleware groups. - * - * @param array $groups - * - * @return void */ public function setMiddlewareGroups(array $groups): void { @@ -70,11 +66,6 @@ public function withoutMiddleware($middleware = null): MiddlewareAwareContract /** * Register a group of middleware. - * - * @param string $name - * @param array $middleware - * - * @return void */ public function setMiddlewareGroup(string $name, array $middleware): void { @@ -83,10 +74,6 @@ public function setMiddlewareGroup(string $name, array $middleware): void /** * Set a list of middleware priorities. - * - * @param array $middlewarePriorities - * - * @return void */ public function setMiddlewarePriorities(array $middlewarePriorities): void { @@ -95,8 +82,6 @@ public function setMiddlewarePriorities(array $middlewarePriorities): void /** * Get a list of middleware priorities. - * - * @return array */ public function getMiddlewarePriorities(): array { @@ -105,8 +90,6 @@ public function getMiddlewarePriorities(): array /** * Get a middleware list. - * - * @return array */ public function getMiddleware(): array { @@ -115,11 +98,6 @@ public function getMiddleware(): array /** * Run the given route within a Stack "onion" instance. - * - * @param \Viserio\Contract\Routing\Route $route - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Psr\Http\Message\ResponseInterface */ protected function runRoute(RouteContract $route, ServerRequestInterface $request): ResponseInterface { @@ -138,10 +116,6 @@ protected function runRoute(RouteContract $route, ServerRequestInterface $reques /** * Gather the middleware for the given route. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return array */ protected function gatherRouteMiddleware(RouteContract $route): array { @@ -170,11 +144,6 @@ protected function gatherRouteMiddleware(RouteContract $route): array /** * Applies the callback to the elements of the given arrays. - * - * @param array $array - * @param callable $callback - * - * @return array */ protected static function map(array $array, callable $callback): array { @@ -192,10 +161,7 @@ protected static function map(array $array, callable $callback): array /** * Convert a multi-dimensional array into a single-dimensional array without keys. * - * @param array $array - * @param int $depth - * - * @return array + * @param int $depth */ protected static function flatten(array $array, $depth = \INF): array { diff --git a/src/Viserio/Component/Routing/Dispatcher/SimpleDispatcher.php b/src/Viserio/Component/Routing/Dispatcher/SimpleDispatcher.php index 413aef808..72618ecc2 100644 --- a/src/Viserio/Component/Routing/Dispatcher/SimpleDispatcher.php +++ b/src/Viserio/Component/Routing/Dispatcher/SimpleDispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Dispatcher; @@ -54,10 +54,6 @@ class SimpleDispatcher implements DispatcherContract /** * Refresh cache file on development. - * - * @param bool $refreshCache - * - * @return void */ public function refreshCache(bool $refreshCache): void { @@ -66,10 +62,6 @@ public function refreshCache(bool $refreshCache): void /** * Set the cache path for compiled routes. - * - * @param string $path - * - * @return void */ public function setCachePath(string $path): void { @@ -78,8 +70,6 @@ public function setCachePath(string $path): void /** * Get the cache path for the compiled routes. - * - * @return string */ public function getCachePath(): string { @@ -127,13 +117,6 @@ public function handle(RouteCollectionContract $routes, ServerRequestInterface $ /** * Handle dispatching of a found route. - * - * @param \Viserio\Contract\Routing\RouteCollection $routes - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param string $identifier - * @param array $segments - * - * @return \Psr\Http\Message\ResponseInterface */ protected function handleFound( RouteCollectionContract $routes, @@ -161,11 +144,6 @@ protected function handleFound( /** * Run the given route. - * - * @param \Viserio\Contract\Routing\Route $route - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Psr\Http\Message\ResponseInterface */ protected function runRoute(RouteContract $route, ServerRequestInterface $request): ResponseInterface { @@ -174,10 +152,6 @@ protected function runRoute(RouteContract $route, ServerRequestInterface $reques /** * Prepare the request uri path. - * - * @param string $path - * - * @return string */ protected function prepareUriPath(string $path): string { @@ -192,10 +166,6 @@ protected function prepareUriPath(string $path): string /** * Generates a router file with all routes. - * - * @param \Viserio\Contract\Routing\RouteCollection $routes - * - * @return void */ protected function generateRouterFile(RouteCollectionContract $routes): void { @@ -208,11 +178,7 @@ protected function generateRouterFile(RouteCollectionContract $routes): void /** * Generate a cache directory. * - * @param string $directory - * * @throws \Viserio\Contract\Routing\Exception\RuntimeException - * - * @return void */ private static function generateDirectory(string $directory): void { diff --git a/src/Viserio/Component/Routing/Event/RouteMatchedEvent.php b/src/Viserio/Component/Routing/Event/RouteMatchedEvent.php index 82b3c8ea3..88463ac1a 100644 --- a/src/Viserio/Component/Routing/Event/RouteMatchedEvent.php +++ b/src/Viserio/Component/Routing/Event/RouteMatchedEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Event; @@ -25,10 +25,6 @@ class RouteMatchedEvent implements EventContract /** * Create a new route matched event. - * - * @param \Viserio\Contract\Routing\Dispatcher $dispatcher - * @param \Viserio\Contract\Routing\Route $route - * @param \Psr\Http\Message\ServerRequestInterface $request */ public function __construct(DispatcherContract $dispatcher, RouteContract $route, ServerRequestInterface $request) { @@ -39,8 +35,6 @@ public function __construct(DispatcherContract $dispatcher, RouteContract $route /** * Get matched route instance. - * - * @return \Viserio\Contract\Routing\Route */ public function getRoute(): RouteContract { @@ -49,8 +43,6 @@ public function getRoute(): RouteContract /** * Get server request instance. - * - * @return \Psr\Http\Message\ServerRequestInterface */ public function getServerRequest(): ServerRequestInterface { diff --git a/src/Viserio/Component/Routing/Generator/UrlGenerator.php b/src/Viserio/Component/Routing/Generator/UrlGenerator.php index 662364a09..64355dcae 100644 --- a/src/Viserio/Component/Routing/Generator/UrlGenerator.php +++ b/src/Viserio/Component/Routing/Generator/UrlGenerator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Generator; @@ -89,10 +89,6 @@ class UrlGenerator implements UrlGeneratorContract /** * Create a new URL Generator instance. - * - * @param \Viserio\Contract\Routing\RouteCollection $routes - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\UriFactoryInterface $uriFactory */ public function __construct( RouteCollectionContract $routes, @@ -174,12 +170,6 @@ public function generate(string $name, array $parameters = [], int $referenceTyp /** * Get the URL for a given route instance. - * - * @param \Viserio\Contract\Routing\Route $route - * @param array $parameters - * @param int $referenceType - * - * @return string */ protected function toRoute(RouteContract $route, array $parameters, int $referenceType): string { @@ -213,11 +203,6 @@ protected function toRoute(RouteContract $route, array $parameters, int $referen /** * Prepare route patch with all parameters and encode the path. - * - * @param \Viserio\Contract\Routing\Route $route - * @param array $parameters - * - * @return string */ protected function prepareRoutePath(RouteContract $route, array $parameters): string { @@ -246,10 +231,6 @@ protected function prepareRoutePath(RouteContract $route, array $parameters): st /** * Check if a scheme is required. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return bool */ protected function isSchemeRequired(RouteContract $route): bool { @@ -269,10 +250,6 @@ protected function isSchemeRequired(RouteContract $route): bool * The path segments "." and ".." are interpreted as relative reference when resolving a URI; * see http://tools.ietf.org/html/rfc3986#section-3.3 so we need to encode them as they are not used for this purpose here * otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route. - * - * @param string $path - * - * @return string */ protected function replacePathSegments(string $path): string { @@ -289,11 +266,6 @@ protected function replacePathSegments(string $path): string /** * Add the port and scheme to the uri if necessary. - * - * @param \Psr\Http\Message\UriInterface $uri - * @param \Viserio\Contract\Routing\Route $route - * - * @return \Psr\Http\Message\UriInterface */ protected function addPortAndSchemeToUri(UriInterface $uri, RouteContract $route): UriInterface { @@ -316,11 +288,6 @@ protected function addPortAndSchemeToUri(UriInterface $uri, RouteContract $route /** * Replace all of the wildcard parameters for a route path. - * - * @param string $path - * @param array $parameters - * - * @return string */ protected function replaceRouteParameters(string $path, array &$parameters): string { @@ -339,11 +306,6 @@ protected function replaceRouteParameters(string $path, array &$parameters): str /** * Replace all of the named parameters in the path. - * - * @param string $path - * @param array $parameters - * - * @return string */ protected function replaceNamedParameters(string $path, array &$parameters): string { @@ -362,11 +324,6 @@ protected function replaceNamedParameters(string $path, array &$parameters): str /** * Add a query string to the URI. - * - * @param string $uri - * @param array $parameters - * - * @return string */ protected function addQueryString(string $uri, array $parameters): string { @@ -388,10 +345,6 @@ protected function addQueryString(string $uri, array $parameters): string /** * Get the query string for a given route. - * - * @param array $parameters - * - * @return string */ protected function getRouteQueryString(array $parameters): string { @@ -420,16 +373,11 @@ protected function getRouteQueryString(array $parameters): string } // "/" and "?" can be left decoded for better user experience, see - // http://tools.ietf.org/html/rfc3986#section-3.4 return '?' . \trim(\strtr($query, ['%2F' => '/']), '&'); } /** * Get the string parameters from a given list. - * - * @param array $parameters - * - * @return array */ protected function getStringParameters(array $parameters): array { @@ -438,10 +386,6 @@ protected function getStringParameters(array $parameters): array /** * Get the numeric parameters from a given list. - * - * @param array $parameters - * - * @return array */ protected function getNumericParameters(array $parameters): array { diff --git a/src/Viserio/Component/Routing/Matcher/AbstractMatcher.php b/src/Viserio/Component/Routing/Matcher/AbstractMatcher.php index 6786395af..73a12bd5a 100644 --- a/src/Viserio/Component/Routing/Matcher/AbstractMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/AbstractMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -68,8 +68,6 @@ public function getHash(): string /** * Returns a unique hash for the matching criteria of the segment. - * - * @return string */ abstract protected function getMatchHash(): string; } diff --git a/src/Viserio/Component/Routing/Matcher/AnyMatcher.php b/src/Viserio/Component/Routing/Matcher/AnyMatcher.php index 8e0a178ea..2a832ddfc 100644 --- a/src/Viserio/Component/Routing/Matcher/AnyMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/AnyMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -17,8 +17,6 @@ class AnyMatcher extends AbstractMatcher { /** * Create a new any matcher instance. - * - * @param array $parameterKeys */ public function __construct(array $parameterKeys) { diff --git a/src/Viserio/Component/Routing/Matcher/CompoundMatcher.php b/src/Viserio/Component/Routing/Matcher/CompoundMatcher.php index 07acb32f1..71a704a33 100644 --- a/src/Viserio/Component/Routing/Matcher/CompoundMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/CompoundMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -24,8 +24,6 @@ class CompoundMatcher extends AbstractMatcher /** * Create a new compound matcher instance. - * - * @param array $matchers */ public function __construct(array $matchers) { diff --git a/src/Viserio/Component/Routing/Matcher/ExpressionMatcher.php b/src/Viserio/Component/Routing/Matcher/ExpressionMatcher.php index 2fa4998f6..717d020f8 100644 --- a/src/Viserio/Component/Routing/Matcher/ExpressionMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/ExpressionMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -24,9 +24,6 @@ class ExpressionMatcher extends AbstractMatcher /** * Create a new expression segment matcher instance. - * - * @param string $expression - * @param array $parameterKeys */ public function __construct(string $expression, array $parameterKeys) { @@ -36,8 +33,6 @@ public function __construct(string $expression, array $parameterKeys) /** * Returns the used expression. - * - * @return string */ public function getExpression(): string { diff --git a/src/Viserio/Component/Routing/Matcher/ParameterMatcher.php b/src/Viserio/Component/Routing/Matcher/ParameterMatcher.php index 4ecd5385b..99fdcb054 100644 --- a/src/Viserio/Component/Routing/Matcher/ParameterMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/ParameterMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -35,7 +35,6 @@ class ParameterMatcher * Create a new any matcher instance. * * @param array|string $names - * @param string $regex */ public function __construct($names, string $regex) { @@ -45,10 +44,6 @@ public function __construct($names, string $regex) /** * Returns an equivalent segment matcher and adds the parameters to the map. - * - * @param array $parameterIndexNameMap - * - * @return \Viserio\Contract\Routing\SegmentMatcher */ public function getMatcher(array &$parameterIndexNameMap): SegmentMatcherContract { diff --git a/src/Viserio/Component/Routing/Matcher/RegexMatcher.php b/src/Viserio/Component/Routing/Matcher/RegexMatcher.php index 73610707c..73a71ce3e 100644 --- a/src/Viserio/Component/Routing/Matcher/RegexMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/RegexMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -35,7 +35,6 @@ class RegexMatcher extends AbstractMatcher /** * Create a new regex segment matcher instance. * - * @param string $regex * @param array|int $parameterKeyGroupMap */ public function __construct(string $regex, $parameterKeyGroupMap) @@ -56,8 +55,6 @@ public function __construct(string $regex, $parameterKeyGroupMap) /** * Returns the used regex. - * - * @return string */ public function getRegex(): string { @@ -66,8 +63,6 @@ public function getRegex(): string /** * Returns the parameters key group array. - * - * @return array */ public function getParameterKeyGroupMap(): array { @@ -76,8 +71,6 @@ public function getParameterKeyGroupMap(): array /** * Counted parameters keys. - * - * @return int */ public function getGroupCount(): int { diff --git a/src/Viserio/Component/Routing/Matcher/StaticMatcher.php b/src/Viserio/Component/Routing/Matcher/StaticMatcher.php index 3b4add864..eff4f1ac5 100644 --- a/src/Viserio/Component/Routing/Matcher/StaticMatcher.php +++ b/src/Viserio/Component/Routing/Matcher/StaticMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Matcher; @@ -27,9 +27,6 @@ class StaticMatcher extends AbstractMatcher /** * Create a new satic segment matcher instance. * - * @param string $segment - * @param null|array $parameterKeys - * * @throws \Viserio\Contract\Routing\Exception\InvalidArgumentException */ public function __construct(string $segment, ?array $parameterKeys = null) diff --git a/src/Viserio/Component/Routing/MiddlewareNameResolver.php b/src/Viserio/Component/Routing/MiddlewareNameResolver.php index c70b9cce9..7abea1544 100644 --- a/src/Viserio/Component/Routing/MiddlewareNameResolver.php +++ b/src/Viserio/Component/Routing/MiddlewareNameResolver.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -18,11 +18,6 @@ class MiddlewareNameResolver /** * Resolve the middleware name to a class name(s). * - * @param string $name - * @param array $map - * @param array $middlewareGroups - * @param array $disabledMiddleware - * * @return array|string */ public static function resolve(string $name, array $map, array $middlewareGroups, array $disabledMiddleware) @@ -40,13 +35,6 @@ public static function resolve(string $name, array $map, array $middlewareGroups /** * Parse the middleware group and format it for usage. - * - * @param string $name - * @param array $map - * @param array $middlewareGroups - * @param array $disabledMiddleware - * - * @return array */ protected static function parseMiddlewareGroup( string $name, diff --git a/src/Viserio/Component/Routing/PendingResourceRegistration.php b/src/Viserio/Component/Routing/PendingResourceRegistration.php index 402ee729a..0bb5f7af7 100644 --- a/src/Viserio/Component/Routing/PendingResourceRegistration.php +++ b/src/Viserio/Component/Routing/PendingResourceRegistration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -55,9 +55,6 @@ class PendingResourceRegistration implements PendingResourceRegistrationContract * Create a new pending resource registration instance. * * @param \Viserio\Component\Routing\ResourceRegistrar $registrar - * @param string $name - * @param string $controller - * @param array $options */ public function __construct(ResourceRegistrar $registrar, string $name, string $controller, array $options) { @@ -169,8 +166,6 @@ public function withoutMiddleware($middleware): MiddlewareAwareContract * * @throws RuntimeException if wrong input is given * @throws LogicException if \Psr\Http\Server\MiddlewareInterface was not found - * - * @return void */ private function validateGivenMiddleware($middleware): void { diff --git a/src/Viserio/Component/Routing/Pipeline.php b/src/Viserio/Component/Routing/Pipeline.php index ea07cb2ca..415b9a27b 100644 --- a/src/Viserio/Component/Routing/Pipeline.php +++ b/src/Viserio/Component/Routing/Pipeline.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -47,13 +47,7 @@ protected function getSlice(): Closure /** * Resolve from container. * - * @param mixed $traveler - * @param mixed $stack - * @param string $stage - * * @throws \Viserio\Contract\Routing\Exception\RuntimeException - * - * @return mixed */ protected function sliceThroughContainer($traveler, $stack, string $stage) { @@ -74,10 +68,6 @@ protected function sliceThroughContainer($traveler, $stack, string $stage) /** * Private delegate callable middleware for the pipe. - * - * @param callable $middleware - * - * @return \Psr\Http\Server\RequestHandlerInterface */ private function getRequestHandlerMiddleware(callable $middleware): RequestHandlerInterface { @@ -87,8 +77,6 @@ private function getRequestHandlerMiddleware(callable $middleware): RequestHandl /** * Create a new delegate callable middleware instance. - * - * @param callable $middleware */ public function __construct(callable $middleware) { diff --git a/src/Viserio/Component/Routing/ResourceRegistrar.php b/src/Viserio/Component/Routing/ResourceRegistrar.php index bf5c6b5e3..254850eb0 100644 --- a/src/Viserio/Component/Routing/ResourceRegistrar.php +++ b/src/Viserio/Component/Routing/ResourceRegistrar.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -75,8 +75,6 @@ class ResourceRegistrar /** * Create a new resource registrar instance. - * - * @param \Viserio\Contract\Routing\Router $router */ public function __construct(RouterContract $router) { @@ -85,8 +83,6 @@ public function __construct(RouterContract $router) /** * Get the global parameter map. - * - * @return array */ public static function getParameters(): array { @@ -95,10 +91,6 @@ public static function getParameters(): array /** * Set the global parameter mapping. - * - * @param array $parameters - * - * @return void */ public static function setParameters(array $parameters = []): void { @@ -107,10 +99,6 @@ public static function setParameters(array $parameters = []): void /** * Set or unset the unmapped global parameters to singular. - * - * @param bool $singular - * - * @return void */ public static function singularParameters(bool $singular = true): void { @@ -119,8 +107,6 @@ public static function singularParameters(bool $singular = true): void /** * Get the action verbs used in the resource URIs. - * - * @return array */ public static function getVerbs(): array { @@ -129,10 +115,6 @@ public static function getVerbs(): array /** * Set the action verbs used in the resource URIs. - * - * @param array $verbs - * - * @return void */ public static function setVerbs(array $verbs): void { @@ -141,12 +123,6 @@ public static function setVerbs(array $verbs): void /** * Route a resource to a controller. - * - * @param string $name - * @param string $controller - * @param array $options - * - * @return void */ public function register(string $name, string $controller, array $options = []): void { @@ -188,11 +164,6 @@ public function register(string $name, string $controller, array $options = []): /** * Get the base resource URI for a given resource. - * - * @param string $resource - * @param array $options - * - * @return string */ public function getResourceUri(string $resource, array $options): string { @@ -218,10 +189,6 @@ public function getResourceUri(string $resource, array $options): string /** * Format a resource parameter for usage. - * - * @param string $value - * - * @return string */ public function getResourceWildcard(string $value): string { @@ -238,12 +205,6 @@ public function getResourceWildcard(string $value): string /** * Build a set of prefixed resource routes. - * - * @param string $name - * @param string $controller - * @param array $options - * - * @return void */ protected function prefixedResource(string $name, string $controller, array $options): void { @@ -261,10 +222,6 @@ protected function prefixedResource(string $name, string $controller, array $opt /** * Extract the resource and prefix from a resource name. - * - * @param string $name - * - * @return array */ protected function getResourcePrefix(string $name): array { @@ -280,11 +237,6 @@ protected function getResourcePrefix(string $name): array /** * Get the applicable resource methods. - * - * @param array $defaults - * @param array $options - * - * @return array */ protected function getResourceMethods(array $defaults, array $options): array { @@ -301,13 +253,6 @@ protected function getResourceMethods(array $defaults, array $options): array /** * Add the index method for a resourceful route. - * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * - * @return Route */ protected function addResourceIndex(string $name, string $base, string $controller, array $options): Route { @@ -320,13 +265,6 @@ protected function addResourceIndex(string $name, string $base, string $controll /** * Add the create method for a resourceful route. - * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * - * @return Route */ protected function addResourceCreate(string $name, string $base, string $controller, array $options): Route { @@ -340,11 +278,6 @@ protected function addResourceCreate(string $name, string $base, string $control /** * Add the store method for a resourceful route. * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * * @return Route */ protected function addResourceStore(string $name, string $base, string $controller, array $options): RouteContract @@ -359,11 +292,6 @@ protected function addResourceStore(string $name, string $base, string $controll /** * Add the show method for a resourceful route. * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * * @return Route */ protected function addResourceShow(string $name, string $base, string $controller, array $options): RouteContract @@ -378,11 +306,6 @@ protected function addResourceShow(string $name, string $base, string $controlle /** * Add the edit method for a resourceful route. * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * * @return Route */ protected function addResourceEdit(string $name, string $base, string $controller, array $options): RouteContract @@ -397,11 +320,6 @@ protected function addResourceEdit(string $name, string $base, string $controlle /** * Add the update method for a resourceful route. * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * * @return Route */ protected function addResourceUpdate(string $name, string $base, string $controller, array $options): RouteContract @@ -416,11 +334,6 @@ protected function addResourceUpdate(string $name, string $base, string $control /** * Add the destroy method for a resourceful route. * - * @param string $name - * @param string $base - * @param string $controller - * @param array $options - * * @return Route */ protected function addResourceDestroy(string $name, string $base, string $controller, array $options): RouteContract @@ -434,11 +347,6 @@ protected function addResourceDestroy(string $name, string $base, string $contro /** * Get the URI for a nested resource segment array. - * - * @param array $segments - * @param array $options - * - * @return string */ protected function getNestedResourceUri(array $segments, array $options): string { @@ -459,13 +367,6 @@ protected function getNestedResourceUri(array $segments, array $options): string /** * Get the action array for a resource route. - * - * @param string $resource - * @param string $controller - * @param string $method - * @param array $options - * - * @return array */ protected function getResourceAction(string $resource, string $controller, string $method, array $options): array { @@ -486,12 +387,6 @@ protected function getResourceAction(string $resource, string $controller, strin /** * Get the name for a given resource. - * - * @param string $resource - * @param string $method - * @param array $options - * - * @return string */ protected function getResourceRouteName(string $resource, string $method, array $options): string { diff --git a/src/Viserio/Component/Routing/Route.php b/src/Viserio/Component/Routing/Route.php index b8779518f..db1e06b6d 100644 --- a/src/Viserio/Component/Routing/Route.php +++ b/src/Viserio/Component/Routing/Route.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -52,8 +52,6 @@ class Route implements RouteContract /** * The controller instance. - * - * @var mixed */ protected $controller; @@ -89,7 +87,6 @@ class Route implements RouteContract * Create a new Route instance. * * @param array|string $methods - * @param string $uri * @param null|array|Closure $action */ public function __construct($methods, string $uri, $action) @@ -116,8 +113,6 @@ public function __construct($methods, string $uri, $action) * Dynamically access route parameters. * * @param string $key - * - * @return mixed */ public function __get($key) { @@ -184,8 +179,6 @@ public function getParameters(): array /** * Get route identifier. - * - * @return string */ public function getIdentifier(): string { @@ -194,10 +187,6 @@ public function getIdentifier(): string /** * Set a Invoker instance. - * - * @param \Invoker\InvokerInterface $invoker - * - * @return void */ public function setInvoker(InvokerInterface $invoker): void { @@ -417,9 +406,6 @@ public function run(ServerRequestInterface $serverRequest): ResponseInterface * Parse arguments to the where method into an array. * * @param array|string $name - * @param null|string $expression - * - * @return array */ protected function parseWhere($name, ?string $expression): array { @@ -438,8 +424,6 @@ protected function parseWhere($name, ?string $expression): array /** * Get the bound route controller middleware. - * - * @return array */ protected function getControllerMiddleware(): array { @@ -458,8 +442,6 @@ protected function getControllerMiddleware(): array /** * Get the bound route controller disabled middleware. - * - * @return array */ protected function getControllerDisabledMiddleware(): array { @@ -478,8 +460,6 @@ protected function getControllerDisabledMiddleware(): array /** * Checks whether the route's action is a controller. - * - * @return bool */ protected function isControllerAction(): bool { @@ -488,8 +468,6 @@ protected function isControllerAction(): bool /** * Get the controller method used for the route. - * - * @return string */ protected function getControllerMethod(): string { diff --git a/src/Viserio/Component/Routing/Route/Action.php b/src/Viserio/Component/Routing/Route/Action.php index 833601a7a..e0e4ba303 100644 --- a/src/Viserio/Component/Routing/Route/Action.php +++ b/src/Viserio/Component/Routing/Route/Action.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Route; @@ -21,13 +21,8 @@ class Action /** * Parse the given action into an array. * - * @param string $uri - * @param mixed $action - * * @throws \Viserio\Contract\Routing\Exception\UnexpectedValueException if invalid route action * @throws \Viserio\Contract\Routing\Exception\LogicException if no action found - * - * @return array */ public static function parse(string $uri, $action): array { @@ -68,11 +63,7 @@ public static function parse(string $uri, $action): array /** * Get an action for a route that has no action. * - * @param string $uri - * * @throws \Viserio\Contract\Routing\Exception\LogicException if no action found - * - * @return array */ protected static function missingAction(string $uri): array { @@ -83,11 +74,6 @@ protected static function missingAction(string $uri): array /** * Return the first element in an array passing a given truth test. - * - * @param array $array - * @param callable $callback - * - * @return mixed */ protected static function getFirst(array $array, callable $callback) { diff --git a/src/Viserio/Component/Routing/Route/Collection.php b/src/Viserio/Component/Routing/Route/Collection.php index d98c2b318..3d7072417 100644 --- a/src/Viserio/Component/Routing/Route/Collection.php +++ b/src/Viserio/Component/Routing/Route/Collection.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Route; @@ -101,8 +101,6 @@ public function getRoutes(): array /** * Count the number of items in the collection. - * - * @return int */ public function count(): int { @@ -111,10 +109,6 @@ public function count(): int /** * Add the route to any look-up tables if necessary. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return void */ protected function addLookups(RouteContract $route): void { diff --git a/src/Viserio/Component/Routing/Route/Group.php b/src/Viserio/Component/Routing/Route/Group.php index 59ed5002e..07ba32811 100644 --- a/src/Viserio/Component/Routing/Route/Group.php +++ b/src/Viserio/Component/Routing/Route/Group.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Route; @@ -17,11 +17,6 @@ class Group { /** * Merge route groups into a new array. - * - * @param array $new - * @param array $old - * - * @return array */ public static function merge(array $new, array $old): array { @@ -47,11 +42,6 @@ public static function merge(array $new, array $old): array /** * Format the uses prefix for the new group attributes. - * - * @param array $new - * @param array $old - * - * @return null|string */ protected static function formatNamespace(array $new, array $old): ?string { @@ -70,11 +60,6 @@ protected static function formatNamespace(array $new, array $old): ?string /** * Format the prefix for the new group attributes. - * - * @param array $new - * @param array $old - * - * @return null|string */ protected static function formatGroupPrefix(array $new, array $old): ?string { @@ -89,11 +74,6 @@ protected static function formatGroupPrefix(array $new, array $old): ?string /** * Format the suffix for the new group attributes. - * - * @param array $new - * @param array $old - * - * @return null|string */ protected static function formatGroupSuffix(array $new, array $old): ?string { @@ -108,11 +88,6 @@ protected static function formatGroupSuffix(array $new, array $old): ?string /** * Format the "wheres" for the new group attributes. - * - * @param array $new - * @param array $old - * - * @return array */ protected static function formatWhere(array $new, array $old): array { @@ -124,11 +99,6 @@ protected static function formatWhere(array $new, array $old): array /** * Format the "as" clause of the new group attributes. - * - * @param array $new - * @param array $old - * - * @return array */ protected static function formatAs(array $new, array $old): array { diff --git a/src/Viserio/Component/Routing/Route/Parser.php b/src/Viserio/Component/Routing/Route/Parser.php index 17fcce382..d70a024c8 100644 --- a/src/Viserio/Component/Routing/Route/Parser.php +++ b/src/Viserio/Component/Routing/Route/Parser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Route; @@ -33,13 +33,10 @@ final class Parser * \Viserio\Component\Routing\Matcher\StaticMatcher{ $value => 'create' }, * ] * - * @param string $route * @param string[] $conditions * * @throws \Viserio\Contract\Routing\Exception\InvalidArgumentException * @throws \Viserio\Contract\Routing\Exception\InvalidRoutePatternException - * - * @return array */ public static function parse(string $route, array $conditions): array { @@ -71,15 +68,7 @@ public static function parse(string $route, array $conditions): array /** * Validate and match uri parameters. * - * @param string $route - * @param string $patternSegment - * @param array $conditions - * @param array $matches - * @param array $names - * * @throws \Viserio\Contract\Routing\Exception\InvalidRoutePatternException - * - * @return bool */ private static function matchRouteParameters( string $route, @@ -145,11 +134,6 @@ private static function matchRouteParameters( /** * Generate a segment regex. - * - * @param array $matches - * @param array $parameterPatterns - * - * @return string */ private static function generateRegex(array $matches, array $parameterPatterns): string { diff --git a/src/Viserio/Component/Routing/Router.php b/src/Viserio/Component/Routing/Router.php index d5e03dd37..38c1511bf 100644 --- a/src/Viserio/Component/Routing/Router.php +++ b/src/Viserio/Component/Routing/Router.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -68,8 +68,6 @@ class Router implements RouterContract /** * Create a new Router instance. - * - * @param \Viserio\Contract\Routing\Dispatcher $dispatcher */ public function __construct(DispatcherContract $dispatcher) { @@ -358,10 +356,7 @@ public function dispatch(ServerRequestInterface $request): ResponseInterface * Add a route to the underlying route collection. * * @param array|string $methods - * @param string $uri * @param null|array|Closure|string $action - * - * @return \Viserio\Contract\Routing\Route */ protected function addRoute($methods, string $uri, $action): RouteContract { @@ -372,10 +367,6 @@ protected function addRoute($methods, string $uri, $action): RouteContract * Create a new route instance. * * @param array|string $methods - * @param string $uri - * @param mixed $action - * - * @return \Viserio\Contract\Routing\Route */ protected function createRoute($methods, string $uri, $action): RouteContract { @@ -409,10 +400,6 @@ protected function createRoute($methods, string $uri, $action): RouteContract /** * Add the necessary where clauses to the route based on its initial registration. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return void */ protected function addWhereClausesToRoute(RouteContract $route): void { @@ -426,10 +413,6 @@ protected function addWhereClausesToRoute(RouteContract $route): void /** * Merge the group stack with the controller action. - * - * @param \Viserio\Contract\Routing\Route $route - * - * @return void */ protected function mergeGroupAttributesIntoRoute(RouteContract $route): void { @@ -442,8 +425,6 @@ protected function mergeGroupAttributesIntoRoute(RouteContract $route): void * Determine if the action is routing to a controller. * * @param array|Closure|string $action - * - * @return bool */ protected function actionReferencesController($action): bool { @@ -458,8 +439,6 @@ protected function actionReferencesController($action): bool * Add a controller based route action to the action array. * * @param array|string $action - * - * @return array */ protected function convertToControllerAction($action): array { @@ -478,10 +457,6 @@ protected function convertToControllerAction($action): array /** * Prepend the last group uses onto the use clause. - * - * @param string $uses - * - * @return string */ protected function prependGroupNamespace(string $uses): string { @@ -494,10 +469,6 @@ protected function prependGroupNamespace(string $uses): string /** * Prefix the given URI with the last prefix. - * - * @param string $uri - * - * @return string */ protected function prefix(string $uri): string { @@ -516,10 +487,6 @@ protected function prefix(string $uri): string /** * Suffix the given URI with the last suffix. - * - * @param string $uri - * - * @return string */ protected function suffix(string $uri): string { @@ -528,10 +495,6 @@ protected function suffix(string $uri): string /** * Update the group stack with the given attributes. - * - * @param array $attributes - * - * @return void */ protected function updateGroupStack(array $attributes): void { diff --git a/src/Viserio/Component/Routing/SortedMiddleware.php b/src/Viserio/Component/Routing/SortedMiddleware.php index 37ad4fe84..ef544c840 100644 --- a/src/Viserio/Component/Routing/SortedMiddleware.php +++ b/src/Viserio/Component/Routing/SortedMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing; @@ -24,9 +24,6 @@ class SortedMiddleware /** * Create a new Sorted Middleware container. - * - * @param array $priorityMap - * @param array $middleware */ public function __construct(array $priorityMap, array $middleware) { @@ -35,8 +32,6 @@ public function __construct(array $priorityMap, array $middleware) /** * Get all sorted middleware. - * - * @return array */ public function getAll(): array { @@ -47,11 +42,6 @@ public function getAll(): array * Sort the middleware by the given priority map. * * Each call to this method makes one discrete middleware movement if necessary. - * - * @param array $priorityMap - * @param array $middleware - * - * @return array */ protected function doSortMiddleware(array $priorityMap, array $middleware): array { @@ -86,12 +76,6 @@ protected function doSortMiddleware(array $priorityMap, array $middleware): arra /** * Splice a middleware into a new position and remove the old entry. - * - * @param array $middleware - * @param int $from - * @param int $to - * - * @return array */ protected function moveMiddleware(array $middleware, int $from, int $to): array { diff --git a/src/Viserio/Component/Routing/Tests/Command/RouteListCommandTest.php b/src/Viserio/Component/Routing/Tests/Command/RouteListCommandTest.php index 7bb00f87e..34bd36a1c 100644 --- a/src/Viserio/Component/Routing/Tests/Command/RouteListCommandTest.php +++ b/src/Viserio/Component/Routing/Tests/Command/RouteListCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Command; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class RouteListCommandTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Routing/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php b/src/Viserio/Component/Routing/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php index 54f6be6ce..610f0bb52 100644 --- a/src/Viserio/Component/Routing/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php +++ b/src/Viserio/Component/Routing/Tests/Container/Provider/ConsoleCommandsServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Provider; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ConsoleCommandsServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingDataCollectorServiceProviderTest.php b/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingDataCollectorServiceProviderTest.php index 5d1dca9fc..ab71faa72 100644 --- a/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingDataCollectorServiceProviderTest.php +++ b/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingDataCollectorServiceProviderTest.php @@ -3,83 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Routing\RouteCollection as RouteCollectionContract; -// use Viserio\Contract\Routing\Router as RouterContract; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// use Viserio\Component\Routing\Provider\RoutingDataCollectorServiceProvider; -// ///** // * @internal // */ // final class RoutingDataCollectorServiceProviderTest extends MockeryTestCase // { -// public function testGetServices(): void -// { -// $routes = \Mockery::mock(RouteCollectionContract::class); -// $router = \Mockery::mock(RouterContract::class); -// $router->shouldReceive('getRoutes') -// ->once() -// ->andReturn($routes); -// $router->shouldReceive('group') -// ->once(); -// -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->bind(RouterContract::class, $router); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new RoutingDataCollectorServiceProvider()); -// -// $container->bind( -// 'config', -// [ -// 'viserio' => [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'routes' => true, -// ], -// ], -// ], -// ] -// ); -// -// $profiler = $container->get(ProfilerContract::class); -// -// $this->assertInstanceOf(ProfilerContract::class, $profiler); -// -// $this->assertArrayHasKey('time-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('memory-data-collector', $profiler->getCollectors()); -// $this->assertArrayHasKey('routing-data-collector', $profiler->getCollectors()); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingServiceProviderTest.php b/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingServiceProviderTest.php index 20f3ef810..ab677b433 100644 --- a/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingServiceProviderTest.php +++ b/src/Viserio/Component/Routing/Tests/Container/Provider/RoutingServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Container\Provider; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class RoutingServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Routing/Tests/ControllerTest.php b/src/Viserio/Component/Routing/Tests/ControllerTest.php index 3061338d7..e64abd25e 100644 --- a/src/Viserio/Component/Routing/Tests/ControllerTest.php +++ b/src/Viserio/Component/Routing/Tests/ControllerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ControllerTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/DataCollector/RoutingDataCollectorTest.php b/src/Viserio/Component/Routing/Tests/DataCollector/RoutingDataCollectorTest.php index a8d0aa223..6cf2cb714 100644 --- a/src/Viserio/Component/Routing/Tests/DataCollector/RoutingDataCollectorTest.php +++ b/src/Viserio/Component/Routing/Tests/DataCollector/RoutingDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\DataCollector; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class RoutingDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Routing/Tests/Dispatcher/AbstractDispatcherTest.php b/src/Viserio/Component/Routing/Tests/Dispatcher/AbstractDispatcherTest.php index f74d43f38..e6022531d 100644 --- a/src/Viserio/Component/Routing/Tests/Dispatcher/AbstractDispatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Dispatcher/AbstractDispatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Dispatcher; diff --git a/src/Viserio/Component/Routing/Tests/Dispatcher/MiddlewareBasedDispatcherTest.php b/src/Viserio/Component/Routing/Tests/Dispatcher/MiddlewareBasedDispatcherTest.php index d90b84d32..1b8827c96 100644 --- a/src/Viserio/Component/Routing/Tests/Dispatcher/MiddlewareBasedDispatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Dispatcher/MiddlewareBasedDispatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Dispatcher; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class MiddlewareBasedDispatcherTest extends AbstractDispatcherTest { diff --git a/src/Viserio/Component/Routing/Tests/Dispatcher/SimpleDispatcherTest.php b/src/Viserio/Component/Routing/Tests/Dispatcher/SimpleDispatcherTest.php index ac34c3538..519ca90c1 100644 --- a/src/Viserio/Component/Routing/Tests/Dispatcher/SimpleDispatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Dispatcher/SimpleDispatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Dispatcher; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class SimpleDispatcherTest extends AbstractDispatcherTest { diff --git a/src/Viserio/Component/Routing/Tests/Fixture/Controller.php b/src/Viserio/Component/Routing/Tests/Fixture/Controller.php index a1cb30dd5..96f5e6252 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/Controller.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/Controller.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/ControllerClosureMiddleware.php b/src/Viserio/Component/Routing/Tests/Fixture/ControllerClosureMiddleware.php index ed801e47a..3ecb6c41e 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/ControllerClosureMiddleware.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/ControllerClosureMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/FakeMiddleware.php b/src/Viserio/Component/Routing/Tests/Fixture/FakeMiddleware.php index 9ba34027b..03da90074 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/FakeMiddleware.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/FakeMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/FooMiddleware.php b/src/Viserio/Component/Routing/Tests/Fixture/FooMiddleware.php index feed41eac..f1a3fbf6e 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/FooMiddleware.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/FooMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/InvokableActionFixture.php b/src/Viserio/Component/Routing/Tests/Fixture/InvokableActionFixture.php index e2d2e0dca..694c976a5 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/InvokableActionFixture.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/InvokableActionFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/MiddlewareHandler.php b/src/Viserio/Component/Routing/Tests/Fixture/MiddlewareHandler.php index 8c45bcf8d..568dc9919 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/MiddlewareHandler.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/MiddlewareHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; @@ -31,17 +31,11 @@ public function __construct(bool $resetMiddleware = false, bool $resetBypassedMi } } - /** - * @return array - */ public function getMiddleware(): array { return $this->middleware; } - /** - * @return array - */ public function getBypassedMiddleware(): array { return $this->bypassedMiddleware; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/RouteRegistrarControllerFixture.php b/src/Viserio/Component/Routing/Tests/Fixture/RouteRegistrarControllerFixture.php index 001a09e12..67776854f 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/RouteRegistrarControllerFixture.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/RouteRegistrarControllerFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/RouteTestClosureMiddlewareController.php b/src/Viserio/Component/Routing/Tests/Fixture/RouteTestClosureMiddlewareController.php index 7886fad2a..9a1dee97b 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/RouteTestClosureMiddlewareController.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/RouteTestClosureMiddlewareController.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Fixture; diff --git a/src/Viserio/Component/Routing/Tests/Fixture/routes.php b/src/Viserio/Component/Routing/Tests/Fixture/routes.php index e908fe876..a02b71d56 100644 --- a/src/Viserio/Component/Routing/Tests/Fixture/routes.php +++ b/src/Viserio/Component/Routing/Tests/Fixture/routes.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use Viserio\Component\HttpFactory\ResponseFactory; diff --git a/src/Viserio/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Viserio/Component/Routing/Tests/Generator/UrlGeneratorTest.php index f546b468f..c0c5bc435 100644 --- a/src/Viserio/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Viserio/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Generator; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class UrlGeneratorTest extends MockeryTestCase { @@ -284,10 +285,6 @@ public function testVariableWithNoRealSeparator(): void /** * @dataProvider provideGetRelativePathCases - * - * @param mixed $sourcePath - * @param mixed $targetPath - * @param mixed $expectedPath */ public function testGetRelativePath($sourcePath, $targetPath, $expectedPath): void { @@ -451,12 +448,6 @@ public function testFragmentUrl(): void self::assertSame('/index#?', $this->getGenerator($routes)->generate('test')); } - /** - * @param \Viserio\Component\Routing\Route\Collection $routes - * @param array $serverVar - * - * @return \Viserio\Component\Routing\Generator\UrlGenerator - */ protected function getGenerator(RouteCollection $routes, array $serverVar = []): UrlGenerator { $server = \array_merge( @@ -477,11 +468,6 @@ protected function getGenerator(RouteCollection $routes, array $serverVar = []): ); } - /** - * @param \Viserio\Component\Routing\Route $route - * - * @return \Viserio\Component\Routing\Route\Collection - */ protected function getRoutes(Route $route): RouteCollection { $routes = new RouteCollection(); diff --git a/src/Viserio/Component/Routing/Tests/Matcher/AnyMatcherTest.php b/src/Viserio/Component/Routing/Tests/Matcher/AnyMatcherTest.php index baf6aa238..dd8a2ffcb 100644 --- a/src/Viserio/Component/Routing/Tests/Matcher/AnyMatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Matcher/AnyMatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Matchers; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class AnyMatcherTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Matcher/CompoundMatcherTest.php b/src/Viserio/Component/Routing/Tests/Matcher/CompoundMatcherTest.php index 543f925ec..3f2d9f384 100644 --- a/src/Viserio/Component/Routing/Tests/Matcher/CompoundMatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Matcher/CompoundMatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Matchers; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class CompoundMatcherTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Matcher/ExpressionMatcherTest.php b/src/Viserio/Component/Routing/Tests/Matcher/ExpressionMatcherTest.php index 220012f09..9b605c17d 100644 --- a/src/Viserio/Component/Routing/Tests/Matcher/ExpressionMatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Matcher/ExpressionMatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Matchers; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ExpressionMatcherTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Matcher/ParameterMatcherTest.php b/src/Viserio/Component/Routing/Tests/Matcher/ParameterMatcherTest.php index e12c799ce..0950f7b2a 100644 --- a/src/Viserio/Component/Routing/Tests/Matcher/ParameterMatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Matcher/ParameterMatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Matchers; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ParameterMatcherTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Matcher/RegexMatcherTest.php b/src/Viserio/Component/Routing/Tests/Matcher/RegexMatcherTest.php index 8d3103833..bde092762 100644 --- a/src/Viserio/Component/Routing/Tests/Matcher/RegexMatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Matcher/RegexMatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Matchers; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class RegexMatcherTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Matcher/StaticMatcherTest.php b/src/Viserio/Component/Routing/Tests/Matcher/StaticMatcherTest.php index 404af1c87..b411abc6c 100644 --- a/src/Viserio/Component/Routing/Tests/Matcher/StaticMatcherTest.php +++ b/src/Viserio/Component/Routing/Tests/Matcher/StaticMatcherTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Matchers; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class StaticMatcherTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/MiddlewareNameResolverTest.php b/src/Viserio/Component/Routing/Tests/MiddlewareNameResolverTest.php index 255ddf5f0..ae16b99d2 100644 --- a/src/Viserio/Component/Routing/Tests/MiddlewareNameResolverTest.php +++ b/src/Viserio/Component/Routing/Tests/MiddlewareNameResolverTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class MiddlewareNameResolverTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Route/ActionTest.php b/src/Viserio/Component/Routing/Tests/Route/ActionTest.php index 37ed5001a..e806de90f 100644 --- a/src/Viserio/Component/Routing/Tests/Route/ActionTest.php +++ b/src/Viserio/Component/Routing/Tests/Route/ActionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Route; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ActionTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Route/CollectionTest.php b/src/Viserio/Component/Routing/Tests/Route/CollectionTest.php index c970618f8..21462f3c0 100644 --- a/src/Viserio/Component/Routing/Tests/Route/CollectionTest.php +++ b/src/Viserio/Component/Routing/Tests/Route/CollectionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Route; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class CollectionTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Route/GroupTest.php b/src/Viserio/Component/Routing/Tests/Route/GroupTest.php index ba8584d4c..0241b9275 100644 --- a/src/Viserio/Component/Routing/Tests/Route/GroupTest.php +++ b/src/Viserio/Component/Routing/Tests/Route/GroupTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class GroupTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Route/ParserTest.php b/src/Viserio/Component/Routing/Tests/Route/ParserTest.php index f63368dc5..3a7fd7639 100644 --- a/src/Viserio/Component/Routing/Tests/Route/ParserTest.php +++ b/src/Viserio/Component/Routing/Tests/Route/ParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ParserTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/RouteCollectionTest.php b/src/Viserio/Component/Routing/Tests/RouteCollectionTest.php index cf8f94c86..004391a01 100644 --- a/src/Viserio/Component/Routing/Tests/RouteCollectionTest.php +++ b/src/Viserio/Component/Routing/Tests/RouteCollectionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class RouteCollectionTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/RouteParserTest.php b/src/Viserio/Component/Routing/Tests/RouteParserTest.php index 779947004..0abf47a56 100644 --- a/src/Viserio/Component/Routing/Tests/RouteParserTest.php +++ b/src/Viserio/Component/Routing/Tests/RouteParserTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -24,15 +24,12 @@ * @internal * * @small + * @coversNothing */ final class RouteParserTest extends TestCase { /** * @dataProvider provideRouteParserCases - * - * @param mixed $pattern - * @param array $conditions - * @param array $expectedSegments */ public function testRouteParser($pattern, array $conditions, array $expectedSegments): void { @@ -150,8 +147,6 @@ public static function provideRouteParserCases(): iterable /** * @dataProvider provideInvalidRouteParsingCases - * - * @param mixed $uri */ public function testInvalidRouteParsing($uri): void { diff --git a/src/Viserio/Component/Routing/Tests/RouteTest.php b/src/Viserio/Component/Routing/Tests/RouteTest.php index 17929f8db..e72ec98e1 100644 --- a/src/Viserio/Component/Routing/Tests/RouteTest.php +++ b/src/Viserio/Component/Routing/Tests/RouteTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class RouteTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Router/AbstractRouterBaseTest.php b/src/Viserio/Component/Routing/Tests/Router/AbstractRouterBaseTest.php index b2b8d50d2..c76e924f4 100644 --- a/src/Viserio/Component/Routing/Tests/Router/AbstractRouterBaseTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/AbstractRouterBaseTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -88,11 +88,6 @@ protected function tearDown(): void /** * @dataProvider provideRouterCases - * - * @param mixed $httpMethod - * @param mixed $uri - * @param mixed $expectedResult - * @param mixed $status */ public function testRouter($httpMethod, $uri, $expectedResult, $status = 200): void { @@ -106,11 +101,6 @@ public function testRouter($httpMethod, $uri, $expectedResult, $status = 200): v self::assertSame($status, $actualResult->getStatusCode()); } - /** - * @param \Viserio\Contract\Routing\Router $router - * - * @return void - */ abstract protected function definitions(RouterContract $router): void; abstract protected static function provideRouterCases(): iterable; diff --git a/src/Viserio/Component/Routing/Tests/Router/BasicParameterPatternsRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/BasicParameterPatternsRouterTest.php index 43f310cd8..bd1b05555 100644 --- a/src/Viserio/Component/Routing/Tests/Router/BasicParameterPatternsRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/BasicParameterPatternsRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -21,14 +21,12 @@ * @internal * * @small + * @coversNothing */ final class BasicParameterPatternsRouterTest extends AbstractRouterBaseTest { use TestRouter404Trait; - /** - * @return array - */ public static function provideRouterCases(): array { return [ diff --git a/src/Viserio/Component/Routing/Tests/Router/BasicRestfulRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/BasicRestfulRouterTest.php index 64b29983f..5988815e4 100644 --- a/src/Viserio/Component/Routing/Tests/Router/BasicRestfulRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/BasicRestfulRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class BasicRestfulRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/CommonRouteSegmentRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/CommonRouteSegmentRouterTest.php index 681d2f991..2488a3505 100644 --- a/src/Viserio/Component/Routing/Tests/Router/CommonRouteSegmentRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/CommonRouteSegmentRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class CommonRouteSegmentRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/ComplexParameterPatternsRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/ComplexParameterPatternsRouterTest.php index 4a8bf4df2..6f4f0b990 100644 --- a/src/Viserio/Component/Routing/Tests/Router/ComplexParameterPatternsRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/ComplexParameterPatternsRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ComplexParameterPatternsRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/ComplexShopRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/ComplexShopRouterTest.php index 96b1097a2..04f84050c 100644 --- a/src/Viserio/Component/Routing/Tests/Router/ComplexShopRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/ComplexShopRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ComplexShopRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/EdgeCasesRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/EdgeCasesRouterTest.php index 2986936cf..9ec148559 100644 --- a/src/Viserio/Component/Routing/Tests/Router/EdgeCasesRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/EdgeCasesRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class EdgeCasesRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/HttpMethodRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/HttpMethodRouterTest.php index e5b3f29b4..d6f389c8d 100644 --- a/src/Viserio/Component/Routing/Tests/Router/HttpMethodRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/HttpMethodRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -19,6 +19,7 @@ * @internal * * @small + * @coversNothing */ final class HttpMethodRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/InlineParameterRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/InlineParameterRouterTest.php index 69e5bc19e..594804b6c 100644 --- a/src/Viserio/Component/Routing/Tests/Router/InlineParameterRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/InlineParameterRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class InlineParameterRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/ResourceRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/ResourceRouterTest.php index c1028ef83..fe46952b2 100644 --- a/src/Viserio/Component/Routing/Tests/Router/ResourceRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/ResourceRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class ResourceRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/RootRoutesRouterTest.php b/src/Viserio/Component/Routing/Tests/Router/RootRoutesRouterTest.php index 9e4135bae..fc68edbc3 100644 --- a/src/Viserio/Component/Routing/Tests/Router/RootRoutesRouterTest.php +++ b/src/Viserio/Component/Routing/Tests/Router/RootRoutesRouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class RootRoutesRouterTest extends AbstractRouterBaseTest { diff --git a/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter404Trait.php b/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter404Trait.php index 8113be212..d3a297f08 100644 --- a/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter404Trait.php +++ b/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter404Trait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router\Traits; @@ -19,9 +19,6 @@ trait TestRouter404Trait { /** * @dataProvider provideRouter404Cases - * - * @param mixed $httpMethod - * @param mixed $uri */ public function testRouter404($httpMethod, $uri): void { diff --git a/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter405Trait.php b/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter405Trait.php index 9cea82154..e176e2ba8 100644 --- a/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter405Trait.php +++ b/src/Viserio/Component/Routing/Tests/Router/Traits/TestRouter405Trait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Router\Traits; @@ -19,9 +19,6 @@ trait TestRouter405Trait { /** * @dataProvider provideRouter405Cases - * - * @param mixed $httpMethod - * @param mixed $uri */ public function testRouter405($httpMethod, $uri): void { diff --git a/src/Viserio/Component/Routing/Tests/RouterTest.php b/src/Viserio/Component/Routing/Tests/RouterTest.php index 10da2a593..9df6d8a29 100644 --- a/src/Viserio/Component/Routing/Tests/RouterTest.php +++ b/src/Viserio/Component/Routing/Tests/RouterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class RouterTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Routing/Tests/SortedMiddlewareTest.php b/src/Viserio/Component/Routing/Tests/SortedMiddlewareTest.php index d2694434e..3a14653eb 100644 --- a/src/Viserio/Component/Routing/Tests/SortedMiddlewareTest.php +++ b/src/Viserio/Component/Routing/Tests/SortedMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class SortedMiddlewareTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/Traits/MiddlewareAwareTraitTest.php b/src/Viserio/Component/Routing/Tests/Traits/MiddlewareAwareTraitTest.php index 086822ec7..f415058cc 100644 --- a/src/Viserio/Component/Routing/Tests/Traits/MiddlewareAwareTraitTest.php +++ b/src/Viserio/Component/Routing/Tests/Traits/MiddlewareAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class MiddlewareAwareTraitTest extends TestCase { diff --git a/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeBuilderTest.php b/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeBuilderTest.php index 03a24d0ce..ba84c25da 100644 --- a/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeBuilderTest.php +++ b/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeBuilderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\TreeGenerator; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class RouteTreeBuilderTest extends TestCase { @@ -184,10 +185,6 @@ public static function provideRouteTreeBuilderCases(): iterable /** * @dataProvider provideRouteTreeBuilderCases - * - * @param mixed $routes - * @param mixed $rootRoute - * @param mixed $segmentDepthNodesMap */ public function testRouteTreeBuilder($routes, $rootRoute, $segmentDepthNodesMap): void { diff --git a/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeNodeTest.php b/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeNodeTest.php index 17b66aa63..6176567b3 100644 --- a/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeNodeTest.php +++ b/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeNodeTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\TreeGenerator; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class RouteTreeNodeTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeOptimizerTest.php b/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeOptimizerTest.php index 182b129d4..c806b4bf9 100644 --- a/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeOptimizerTest.php +++ b/src/Viserio/Component/Routing/Tests/TreeGenerator/RouteTreeOptimizerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Tests\TreeGenerator; @@ -31,6 +31,7 @@ * @internal * * @small + * @coversNothing */ final class RouteTreeOptimizerTest extends MockeryTestCase { @@ -336,9 +337,6 @@ public static function provideRouteTreeOptimizerCases(): iterable /** * @dataProvider provideRouteTreeOptimizerCases - * - * @param array $original - * @param array $expected */ public function testRouteTreeOptimizer(array $original, array $expected): void { diff --git a/src/Viserio/Component/Routing/Traits/MiddlewareAwareTrait.php b/src/Viserio/Component/Routing/Traits/MiddlewareAwareTrait.php index 200fb2a6d..9fc47c9ce 100644 --- a/src/Viserio/Component/Routing/Traits/MiddlewareAwareTrait.php +++ b/src/Viserio/Component/Routing/Traits/MiddlewareAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Traits; @@ -38,7 +38,6 @@ trait MiddlewareAwareTrait /** * Register a short-hand name for a middleware. * - * @param string $name * @param \Psr\Http\Server\MiddlewareInterface|string $middleware * * @throws \Viserio\Contract\Routing\Exception\RuntimeException if alias exists @@ -73,8 +72,6 @@ public function aliasMiddleware(string $name, $middleware) * @param array|\Psr\Http\Server\MiddlewareInterface|string $middleware * * @throws \Viserio\Contract\Routing\Exception\UnexpectedValueException if wrong type is given - * - * @return \Viserio\Contract\Routing\MiddlewareAware */ public function withMiddleware($middleware): MiddlewareAwareContract { @@ -112,8 +109,6 @@ public function withMiddleware($middleware): MiddlewareAwareContract * @param null|array|string $middleware * * @throws \Viserio\Contract\Routing\Exception\UnexpectedValueException if wrong type is given - * - * @return \Viserio\Contract\Routing\MiddlewareAware */ public function withoutMiddleware($middleware = null): MiddlewareAwareContract { diff --git a/src/Viserio/Component/Routing/Traits/MiddlewareValidatorTrait.php b/src/Viserio/Component/Routing/Traits/MiddlewareValidatorTrait.php index cdff1672d..88933e0c5 100644 --- a/src/Viserio/Component/Routing/Traits/MiddlewareValidatorTrait.php +++ b/src/Viserio/Component/Routing/Traits/MiddlewareValidatorTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\Traits; @@ -24,8 +24,6 @@ trait MiddlewareValidatorTrait * @param array|object|string $middleware * * @throws \Viserio\Contract\Routing\Exception\UnexpectedValueException - * - * @return void */ protected function validateInput($middleware): void { @@ -42,8 +40,6 @@ protected function validateInput($middleware): void * @param \Psr\Http\Server\MiddlewareInterface|string $middleware * * @throws \Viserio\Contract\Routing\Exception\UnexpectedValueException if \Psr\Http\Server\MiddlewareInterface was not found - * - * @return void */ protected function validateMiddleware($middleware): void { @@ -59,8 +55,6 @@ protected function validateMiddleware($middleware): void * If input is a object returns full class name else the given string input. * * @param \Psr\Http\Server\MiddlewareInterface|string $middleware - * - * @return string */ protected function getMiddlewareClassName($middleware): string { diff --git a/src/Viserio/Component/Routing/TreeGenerator/ChildrenNodeCollection.php b/src/Viserio/Component/Routing/TreeGenerator/ChildrenNodeCollection.php index 8580848af..619c18453 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/ChildrenNodeCollection.php +++ b/src/Viserio/Component/Routing/TreeGenerator/ChildrenNodeCollection.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator; @@ -26,8 +26,6 @@ final class ChildrenNodeCollection /** * Create a new child node collection instance. - * - * @param array $children */ public function __construct(array $children = []) { @@ -44,27 +42,18 @@ public function getChildren(): array /** * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeNode $node - * - * @return bool */ public function hasChild(RouteTreeNode $node): bool { return $this->hasChildFor($node->getFirstMatcher()); } - /** - * @param \Viserio\Contract\Routing\SegmentMatcher $matcher - * - * @return bool - */ public function hasChildFor(SegmentMatcherContract $matcher): bool { return isset($this->children[$matcher->getHash()]); } /** - * @param \Viserio\Contract\Routing\SegmentMatcher $matcher - * * @return null|\Viserio\Component\Routing\TreeGenerator\RouteTreeNode */ public function getChild(SegmentMatcherContract $matcher): ?RouteTreeNode diff --git a/src/Viserio/Component/Routing/TreeGenerator/MatchedRouteDataMap.php b/src/Viserio/Component/Routing/TreeGenerator/MatchedRouteDataMap.php index e614fae11..6279ed957 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/MatchedRouteDataMap.php +++ b/src/Viserio/Component/Routing/TreeGenerator/MatchedRouteDataMap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator; @@ -22,17 +22,12 @@ final class MatchedRouteDataMap /** * Create a new matched route data map instance. - * - * @param array $httpMethodRouteMap */ public function __construct(array $httpMethodRouteMap = []) { $this->httpMethodRouteMap = $httpMethodRouteMap; } - /** - * @return array - */ public function getHttpMethodRouteDataMap(): array { return $this->httpMethodRouteMap; @@ -40,8 +35,6 @@ public function getHttpMethodRouteDataMap(): array /** * Get all allowed http methods. - * - * @return array */ public function allowedHttpMethods(): array { @@ -58,9 +51,6 @@ public function allowedHttpMethods(): array /** * Adds the supplied route to the matched route data map. - * - * @param \Viserio\Contract\Routing\Route $route - * @param array $parameterIndexNameMap */ public function addRoute(RouteContract $route, array $parameterIndexNameMap): void { diff --git a/src/Viserio/Component/Routing/TreeGenerator/Optimizer/MatcherOptimizer.php b/src/Viserio/Component/Routing/TreeGenerator/Optimizer/MatcherOptimizer.php index bcd9414c5..f420ce342 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/Optimizer/MatcherOptimizer.php +++ b/src/Viserio/Component/Routing/TreeGenerator/Optimizer/MatcherOptimizer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator\Optimizer; @@ -34,11 +34,6 @@ private function __construct() /** * Merge same matcher together. - * - * @param array $parentMatchers - * @param array $childMatchers - * - * @return array */ public static function mergeMatchers(array $parentMatchers, array $childMatchers): array { @@ -57,10 +52,6 @@ public static function mergeMatchers(array $parentMatchers, array $childMatchers /** * Optimize matcher and matcher order. - * - * @param array $matchers - * - * @return array */ public static function optimizeMatchers(array $matchers): array { @@ -73,10 +64,6 @@ public static function optimizeMatchers(array $matchers): array /** * Change matcher for a faster one, if available. - * - * @param \Viserio\Contract\Routing\SegmentMatcher $matcher - * - * @return \Viserio\Contract\Routing\SegmentMatcher */ private static function optimizeMatcher(SegmentMatcherContract $matcher): SegmentMatcherContract { @@ -109,10 +96,6 @@ private static function optimizeMatcher(SegmentMatcherContract $matcher): Segmen /** * Optimizing the matcher order, unknown types are added last. - * - * @param array $matchers - * - * @return array */ private static function optimizeMatcherOrder(array $matchers): array { diff --git a/src/Viserio/Component/Routing/TreeGenerator/Optimizer/RouteTreeOptimizer.php b/src/Viserio/Component/Routing/TreeGenerator/Optimizer/RouteTreeOptimizer.php index aeda2929f..ecd6401da 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/Optimizer/RouteTreeOptimizer.php +++ b/src/Viserio/Component/Routing/TreeGenerator/Optimizer/RouteTreeOptimizer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator\Optimizer; @@ -21,10 +21,6 @@ final class RouteTreeOptimizer { /** * Optimizes the supplied route tree. - * - * @param array $routeTree - * - * @return array */ public function optimize(array $routeTree): array { @@ -39,10 +35,6 @@ public function optimize(array $routeTree): array /** * Optimize child node collection. - * - * @param \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection $nodes - * - * @return \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection */ private function optimizeNodes(ChildrenNodeCollection $nodes): ChildrenNodeCollection { @@ -59,10 +51,6 @@ private function optimizeNodes(ChildrenNodeCollection $nodes): ChildrenNodeColle /** * Optimize node collection. - * - * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeNode $node - * - * @return \Viserio\Component\Routing\TreeGenerator\RouteTreeNode */ private function optimizeNode(RouteTreeNode $node): RouteTreeNode { @@ -90,10 +78,6 @@ private function optimizeNode(RouteTreeNode $node): RouteTreeNode /** * Move matched common node to the parent node. - * - * @param \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection $nodeCollection - * - * @return \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection */ private function moveCommonMatchersToParentNode(ChildrenNodeCollection $nodeCollection): ChildrenNodeCollection { @@ -124,11 +108,6 @@ private function moveCommonMatchersToParentNode(ChildrenNodeCollection $nodeColl /** * Extract parent nodes from route tree nood. - * - * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeNode $node1 - * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeNode $node2 - * - * @return null|\Viserio\Component\Routing\TreeGenerator\RouteTreeNode */ private function extractCommonParentNode(RouteTreeNode $node1, RouteTreeNode $node2): ?RouteTreeNode { diff --git a/src/Viserio/Component/Routing/TreeGenerator/PHPCodeCollection.php b/src/Viserio/Component/Routing/TreeGenerator/PHPCodeCollection.php index b3a36a64f..ed0994068 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/PHPCodeCollection.php +++ b/src/Viserio/Component/Routing/TreeGenerator/PHPCodeCollection.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator; @@ -31,8 +31,6 @@ final class PHPCodeCollection /** * Appends the supplied code to the builder. - * - * @param string $code */ public function append(string $code): void { @@ -43,8 +41,6 @@ public function append(string $code): void /** * Appends the supplied code and a new line to the builder. - * - * @param string $code */ public function appendLine(string $code = ''): void { diff --git a/src/Viserio/Component/Routing/TreeGenerator/RouteTreeBuilder.php b/src/Viserio/Component/Routing/TreeGenerator/RouteTreeBuilder.php index 14f4a3acf..6aaaf412b 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/RouteTreeBuilder.php +++ b/src/Viserio/Component/Routing/TreeGenerator/RouteTreeBuilder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator; @@ -23,8 +23,6 @@ final class RouteTreeBuilder * Creates a route tree from the supplied routes. * * @param \Viserio\Contract\Routing\Route[] $routes - * - * @return array */ public function build(array $routes): array { @@ -72,14 +70,8 @@ public function build(array $routes): array * Adds a route to the node tree. * * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeNode $node - * @param \Viserio\Contract\Routing\Route $route - * @param array $segments - * @param int $segmentDepth - * @param array $parameterIndexNameMap * * @throws \Viserio\Contract\Routing\Exception\RuntimeException - * - * @return void */ private function addRouteToNode( RouteTreeNode $node, @@ -113,9 +105,6 @@ private function addRouteToNode( * Get the right Matcher. * * @param \Viserio\Component\Routing\Matcher\ParameterMatcher|\Viserio\Contract\Routing\SegmentMatcher $firstSegment - * @param array $parameterIndexNameMap - * - * @return \Viserio\Contract\Routing\SegmentMatcher */ private function getMatcher($firstSegment, array &$parameterIndexNameMap): SegmentMatcherContract { diff --git a/src/Viserio/Component/Routing/TreeGenerator/RouteTreeCompiler.php b/src/Viserio/Component/Routing/TreeGenerator/RouteTreeCompiler.php index 353ef2849..3256675b4 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/RouteTreeCompiler.php +++ b/src/Viserio/Component/Routing/TreeGenerator/RouteTreeCompiler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator; @@ -35,8 +35,7 @@ final class RouteTreeCompiler /** * Create a new tree route compailer instance. * - * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeBuilder $treeBuilder - * @param \Viserio\Component\Routing\TreeGenerator\Optimizer\RouteTreeOptimizer $treeOptimizer + * @param \Viserio\Component\Routing\TreeGenerator\RouteTreeBuilder $treeBuilder */ public function __construct(RouteTreeBuilder $treeBuilder, RouteTreeOptimizer $treeOptimizer) { @@ -46,10 +45,6 @@ public function __construct(RouteTreeBuilder $treeBuilder, RouteTreeOptimizer $t /** * Complie all added routes to a router handler. - * - * @param array $routes - * - * @return string */ public function compile(array $routes): string { @@ -72,11 +67,6 @@ public function compile(array $routes): string /** * Creating a template for the router class. - * - * @param string $rootRoute - * @param string $body - * - * @return string */ private function createRouterClassTemplate(string $rootRoute, string $body): string { @@ -101,7 +91,6 @@ private function createRouterClassTemplate(string $rootRoute, string $body): str * Compile the counter for the segments check. * * @param \Viserio\Component\Routing\TreeGenerator\PHPCodeCollection $code - * @param array $routeTree */ private function compileRouteTree(PHPCodeCollection $code, array $routeTree): void { @@ -149,8 +138,6 @@ private function compileRouteTree(PHPCodeCollection $code, array $routeTree): vo * * @param \Viserio\Component\Routing\TreeGenerator\PHPCodeCollection $code * @param \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection $nodes - * @param array $segmentVariables - * @param array $parameters */ private function compileSegmentNodes( PHPCodeCollection $code, @@ -207,7 +194,6 @@ private function compileSegmentNodes( * * @param \Viserio\Component\Routing\TreeGenerator\PHPCodeCollection $code * @param \Viserio\Component\Routing\TreeGenerator\MatchedRouteDataMap $routeDataMap - * @param array $parameters */ private function compiledRouteHttpMethodMatch( PHPCodeCollection $code, @@ -283,8 +269,6 @@ private function compileDisallowedHttpMethodOrNotFound(PHPCodeCollection $code): * Compile the found route data. * * @param \Viserio\Component\Routing\TreeGenerator\PHPCodeCollection $code - * @param array $foundRoute - * @param array $parameterExpressions */ private function compileFoundRoute(PHPCodeCollection $code, array $foundRoute, array $parameterExpressions): void { diff --git a/src/Viserio/Component/Routing/TreeGenerator/RouteTreeNode.php b/src/Viserio/Component/Routing/TreeGenerator/RouteTreeNode.php index 9fefc2974..4d5b2dfc9 100644 --- a/src/Viserio/Component/Routing/TreeGenerator/RouteTreeNode.php +++ b/src/Viserio/Component/Routing/TreeGenerator/RouteTreeNode.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Routing\TreeGenerator; @@ -72,8 +72,6 @@ public function getContents() /** * Get the first matcher from array. - * - * @return \Viserio\Contract\Routing\SegmentMatcher */ public function getFirstMatcher(): SegmentMatcherContract { @@ -82,8 +80,6 @@ public function getFirstMatcher(): SegmentMatcherContract /** * Check if content is a leaf node. - * - * @return bool */ public function isLeafNode(): bool { @@ -92,8 +88,6 @@ public function isLeafNode(): bool /** * Check if content is a parent node. - * - * @return bool */ public function isParentNode(): bool { @@ -103,7 +97,6 @@ public function isParentNode(): bool /** * Update RouteTreeNode class. * - * @param array $matchers * @param \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection|\Viserio\Component\Routing\TreeGenerator\MatchedRouteDataMap $contents * * @throws \RuntimeException diff --git a/src/Viserio/Component/Routing/composer.json b/src/Viserio/Component/Routing/composer.json index 8fbfaada5..c67b62465 100644 --- a/src/Viserio/Component/Routing/composer.json +++ b/src/Viserio/Component/Routing/composer.json @@ -48,10 +48,9 @@ "require-dev": { "doctrine/inflector": "^1.3", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/Routing/phpstan.neon b/src/Viserio/Component/Routing/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Routing/phpstan.neon +++ b/src/Viserio/Component/Routing/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Routing/phpunit.xml b/src/Viserio/Component/Routing/phpunit.xml new file mode 100644 index 000000000..8a9cea204 --- /dev/null +++ b/src/Viserio/Component/Routing/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Routing/phpunit.xml.dist b/src/Viserio/Component/Routing/phpunit.xml.dist deleted file mode 100644 index 6520c8e43..000000000 --- a/src/Viserio/Component/Routing/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Session/.gitignore b/src/Viserio/Component/Session/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Session/.gitignore +++ b/src/Viserio/Component/Session/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Session/Container/Provider/SessionServiceProvider.php b/src/Viserio/Component/Session/Container/Provider/SessionServiceProvider.php index 39187f22f..d8aad3e26 100644 --- a/src/Viserio/Component/Session/Container/Provider/SessionServiceProvider.php +++ b/src/Viserio/Component/Session/Container/Provider/SessionServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Container\Provider; diff --git a/src/Viserio/Component/Session/EncryptedStore.php b/src/Viserio/Component/Session/EncryptedStore.php index b6a88dfc9..98d45a8ec 100644 --- a/src/Viserio/Component/Session/EncryptedStore.php +++ b/src/Viserio/Component/Session/EncryptedStore.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session; @@ -29,10 +29,6 @@ class EncryptedStore extends Store /** * Create a new session instance. - * - * @param string $name - * @param SessionHandlerContract $handler - * @param \ParagonIE\Halite\Symmetric\EncryptionKey $key */ public function __construct(string $name, SessionHandlerContract $handler, EncryptionKey $key) { @@ -43,8 +39,6 @@ public function __construct(string $name, SessionHandlerContract $handler, Encry /** * Hide this from var_dump(), etc. - * - * @return array */ public function __debugInfo(): array { diff --git a/src/Viserio/Component/Session/Fingerprint/ClientIpGenerator.php b/src/Viserio/Component/Session/Fingerprint/ClientIpGenerator.php index 581baaa2e..48db7b83c 100644 --- a/src/Viserio/Component/Session/Fingerprint/ClientIpGenerator.php +++ b/src/Viserio/Component/Session/Fingerprint/ClientIpGenerator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Fingerprint; @@ -28,8 +28,6 @@ class ClientIpGenerator implements FingerprintContract /** * Create a new ClientIpGenerator instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest */ public function __construct(ServerRequestInterface $serverRequest) { diff --git a/src/Viserio/Component/Session/Fingerprint/UserAgentGenerator.php b/src/Viserio/Component/Session/Fingerprint/UserAgentGenerator.php index f8052d83b..2e277aec8 100644 --- a/src/Viserio/Component/Session/Fingerprint/UserAgentGenerator.php +++ b/src/Viserio/Component/Session/Fingerprint/UserAgentGenerator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Fingerprint; @@ -27,8 +27,6 @@ class UserAgentGenerator implements FingerprintContract /** * Create a new UserAgentGenerator instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest */ public function __construct(ServerRequestInterface $serverRequest) { diff --git a/src/Viserio/Component/Session/Handler/AbstractSessionHandler.php b/src/Viserio/Component/Session/Handler/AbstractSessionHandler.php index d32463bf9..67b3ea6c8 100644 --- a/src/Viserio/Component/Session/Handler/AbstractSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/AbstractSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -109,25 +109,9 @@ public function destroy($sessionId): bool return $this->newSessionId === $sessionId || $this->doDestroy($sessionId); } - /** - * @param string $sessionId - * - * @return string - */ abstract protected function doRead(string $sessionId): string; - /** - * @param string $sessionId - * @param string $data - * - * @return bool - */ abstract protected function doWrite(string $sessionId, string $data): bool; - /** - * @param string $sessionId - * - * @return bool - */ abstract protected function doDestroy(string $sessionId): bool; } diff --git a/src/Viserio/Component/Session/Handler/CookieSessionHandler.php b/src/Viserio/Component/Session/Handler/CookieSessionHandler.php index 6dc70f73c..64b3b08c7 100644 --- a/src/Viserio/Component/Session/Handler/CookieSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/CookieSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -43,8 +43,7 @@ class CookieSessionHandler extends AbstractSessionHandler /** * Create a new cookie driven handler instance. * - * @param \Viserio\Contract\Cookie\QueueingFactory $cookie - * @param int $lifetime The session lifetime in seconds + * @param int $lifetime The session lifetime in seconds */ public function __construct(JarContract $cookie, int $lifetime) { @@ -54,8 +53,6 @@ public function __construct(JarContract $cookie, int $lifetime) /** * Set the request instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $request */ public function setRequest(ServerRequestInterface $request): void { @@ -76,8 +73,6 @@ public function close(): bool * @see https://php.net/manual/en/sessionhandlerinterface.gc.php * * @param int $maxlifetime - * - * @return bool */ public function gc($maxlifetime): bool { @@ -89,8 +84,6 @@ public function gc($maxlifetime): bool * * @param string $sessionId The session id * @param string $sessionData - * - * @return bool */ public function updateTimestamp($sessionId, $sessionData): bool { diff --git a/src/Viserio/Component/Session/Handler/FileSessionHandler.php b/src/Viserio/Component/Session/Handler/FileSessionHandler.php index f128ed40d..a9a5a4d9b 100644 --- a/src/Viserio/Component/Session/Handler/FileSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/FileSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -42,8 +42,7 @@ class FileSessionHandler extends AbstractSessionHandler /** * Create a new file driven handler instance. * - * @param string $path - * @param int $lifetime The session lifetime in seconds + * @param int $lifetime The session lifetime in seconds */ public function __construct(string $path, int $lifetime) { @@ -65,8 +64,6 @@ public function close(): bool * @see https://php.net/manual/en/sessionhandlerinterface.gc.php * * @param int $maxlifetime - * - * @return bool */ public function gc($maxlifetime): bool { @@ -92,8 +89,6 @@ public function gc($maxlifetime): bool * * @param string $sessionId The session id * @param string $sessionData - * - * @return bool */ public function updateTimestamp($sessionId, $sessionData): bool { diff --git a/src/Viserio/Component/Session/Handler/MigratingSessionHandler.php b/src/Viserio/Component/Session/Handler/MigratingSessionHandler.php index 800081013..cfbaf379b 100644 --- a/src/Viserio/Component/Session/Handler/MigratingSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/MigratingSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -29,23 +29,16 @@ class MigratingSessionHandler implements SessionHandlerInterface, SessionUpdateT { /** * A session handler instance. - * - * @var SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface */ private $currentHandler; /** * A session handler instance. - * - * @var SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface */ private $writeOnlyHandler; /** * Create a new MigratingSessionHandler instance. - * - * @param SessionHandlerInterface $currentHandler - * @param SessionHandlerInterface $writeOnlyHandler */ public function __construct(SessionHandlerInterface $currentHandler, SessionHandlerInterface $writeOnlyHandler) { @@ -91,8 +84,6 @@ public function destroy($sessionId): bool * @see https://php.net/manual/en/sessionhandlerinterface.gc.php * * @param int $maxlifetime - * - * @return bool */ public function gc($maxlifetime): bool { @@ -150,8 +141,6 @@ public function validateId($sessionId): bool * * @param string $sessionId The session id * @param string $sessionData - * - * @return bool */ public function updateTimestamp($sessionId, $sessionData): bool { diff --git a/src/Viserio/Component/Session/Handler/NullSessionHandler.php b/src/Viserio/Component/Session/Handler/NullSessionHandler.php index bc84610b3..317649f85 100644 --- a/src/Viserio/Component/Session/Handler/NullSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/NullSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -39,8 +39,6 @@ public function validateId($sessionId): bool * * @param string $sessionId The session id * @param string $sessionData - * - * @return bool */ public function updateTimestamp($sessionId, $sessionData): bool { @@ -53,8 +51,6 @@ public function updateTimestamp($sessionId, $sessionData): bool * @see https://php.net/manual/en/sessionhandlerinterface.gc.php * * @param int $maxlifetime - * - * @return bool */ public function gc($maxlifetime): bool { diff --git a/src/Viserio/Component/Session/Handler/PdoSessionHandler.php b/src/Viserio/Component/Session/Handler/PdoSessionHandler.php index e205577db..ca168ef95 100644 --- a/src/Viserio/Component/Session/Handler/PdoSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/PdoSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -366,8 +366,6 @@ public function gc($maxlifetime) * @param string $sessionData * * @throws PDOException - * - * @return bool */ public function updateTimestamp($sessionId, $sessionData): bool { @@ -568,8 +566,6 @@ protected function doRead($sessionId): string /** * Return a PDO instance. - * - * @return PDO */ private function getConnection(): PDO { @@ -584,8 +580,6 @@ private function getConnection(): PDO * Lazy-connects to the database. * * @param string $dsn DSN string - * - * @return void */ private function connect(string $dsn): void { @@ -676,8 +670,6 @@ private function rollback(): void * - for oci using DBMS_LOCK.REQUEST * - for sqlsrv using sp_getapplock with LockOwner = Session * - * @param string $sessionId - * * @throws \DomainException When an unsupported PDO driver is used * * @return PDOStatement The statement that needs to be executed later to release the lock @@ -766,12 +758,6 @@ private function getSelectSql(): string /** * Returns a merge/upsert (i.e. insert or update) statement when supported by the database for writing session data. - * - * @param string $sessionId - * @param string $data - * @param int $maxlifetime - * - * @return null|PDOStatement */ private function getMergeStatement(string $sessionId, string $data, int $maxlifetime): ?PDOStatement { diff --git a/src/Viserio/Component/Session/Handler/StrictSessionHandler.php b/src/Viserio/Component/Session/Handler/StrictSessionHandler.php index 9112b0f01..bc63941f9 100644 --- a/src/Viserio/Component/Session/Handler/StrictSessionHandler.php +++ b/src/Viserio/Component/Session/Handler/StrictSessionHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Handler; @@ -34,8 +34,6 @@ class StrictSessionHandler extends AbstractSessionHandler /** * StrictSessionHandler constructor. * - * @param SessionHandlerInterface $handler - * * @throws \Viserio\Contract\Session\Exception\LogicException */ public function __construct(SessionHandlerInterface $handler) @@ -62,8 +60,6 @@ public function open($savePath, $sessionName): bool * * @param string $sessionId The session id * @param string $sessionData - * - * @return bool */ public function updateTimestamp($sessionId, $sessionData): bool { @@ -96,8 +92,6 @@ public function close(): bool * @see https://php.net/manual/en/sessionhandlerinterface.gc.php * * @param int $maxlifetime - * - * @return bool */ public function gc($maxlifetime): bool { diff --git a/src/Viserio/Component/Session/Middleware/StartSessionMiddleware.php b/src/Viserio/Component/Session/Middleware/StartSessionMiddleware.php index ac8645551..63645bf57 100644 --- a/src/Viserio/Component/Session/Middleware/StartSessionMiddleware.php +++ b/src/Viserio/Component/Session/Middleware/StartSessionMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Middleware; @@ -68,8 +68,6 @@ class StartSessionMiddleware implements MiddlewareInterface /** * Create a new session middleware. - * - * @param \Viserio\Component\Session\SessionManager $manager */ public function __construct(SessionManager $manager) { @@ -105,10 +103,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface /** * Start the session for the given request. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Viserio\Contract\Session\Store */ protected function startSession(ServerRequestInterface $request): StoreContract { @@ -134,11 +128,6 @@ protected function startSession(ServerRequestInterface $request): StoreContract /** * Store the current URL for the request if necessary. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Viserio\Contract\Session\Store $session - * - * @return \Viserio\Contract\Session\Store */ protected function storeCurrentUrl(ServerRequestInterface $request, StoreContract $session): StoreContract { @@ -153,10 +142,6 @@ protected function storeCurrentUrl(ServerRequestInterface $request, StoreContrac /** * Remove the garbage from the session if necessary. - * - * @param \Viserio\Contract\Session\Store $session - * - * @return void */ protected function collectGarbage(StoreContract $session): void { @@ -174,13 +159,7 @@ protected function collectGarbage(StoreContract $session): void /** * Add the session cookie to the application response. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * @param \Viserio\Contract\Session\Store $session - * * @throws \Viserio\Contract\Cookie\Exception\InvalidArgumentException - * - * @return \Psr\Http\Message\ResponseInterface */ protected function addCookieToResponse( ServerRequestInterface $request, diff --git a/src/Viserio/Component/Session/Middleware/VerifyCsrfTokenMiddleware.php b/src/Viserio/Component/Session/Middleware/VerifyCsrfTokenMiddleware.php index c0a85bf42..53e833b52 100644 --- a/src/Viserio/Component/Session/Middleware/VerifyCsrfTokenMiddleware.php +++ b/src/Viserio/Component/Session/Middleware/VerifyCsrfTokenMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Middleware; @@ -52,8 +52,6 @@ class VerifyCsrfTokenMiddleware implements MiddlewareInterface /** * Create a new session middleware. - * - * @param \Viserio\Component\Session\SessionManager $manager */ public function __construct(SessionManager $manager) { @@ -88,8 +86,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface /** * Determine if the application is running unit tests. - * - * @return bool */ protected function runningUnitTests(): bool { @@ -98,10 +94,6 @@ protected function runningUnitTests(): bool /** * Determine if the session and input CSRF tokens match. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return bool */ protected function tokensMatch(ServerRequestInterface $request): bool { @@ -129,12 +121,7 @@ protected function tokensMatch(ServerRequestInterface $request): bool /** * Add the CSRF token to the response cookies. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * * @throws InvalidArgumentException - * - * @return \Psr\Http\Message\ResponseInterface */ protected function addCookieToResponse( ServerRequestInterface $request, @@ -158,10 +145,6 @@ protected function addCookieToResponse( /** * Determine if the HTTP request uses a ‘read’ verb. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return bool */ protected function isReading(ServerRequestInterface $request): bool { diff --git a/src/Viserio/Component/Session/SessionManager.php b/src/Viserio/Component/Session/SessionManager.php index 58a4517a2..3b0240fb7 100644 --- a/src/Viserio/Component/Session/SessionManager.php +++ b/src/Viserio/Component/Session/SessionManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session; @@ -66,8 +66,6 @@ public function __construct($config) /** * Hide this from var_dump(), etc. - * - * @return array */ public function __debugInfo(): array { @@ -78,8 +76,6 @@ public function __debugInfo(): array /** * Set the cookie jar instance. - * - * @param \Viserio\Contract\Cookie\QueueingFactory $cookieJar */ public function setCookieJar(JarContract $cookieJar): void { @@ -122,10 +118,6 @@ public static function getMandatoryConfig(): iterable /** * Create an instance of the file session driver. - * - * @param array $config - * - * @return \Viserio\Contract\Session\Store */ protected function createFileDriver(array $config): StoreContract { @@ -141,8 +133,6 @@ protected function createFileDriver(array $config): StoreContract * Create an instance of the "cookie" session driver. * * @throws \Viserio\Contract\Session\Exception\RuntimeException - * - * @return \Viserio\Contract\Session\Store */ protected function createCookieDriver(): StoreContract { @@ -160,8 +150,6 @@ protected function createCookieDriver(): StoreContract /** * Create an instance of the Array session driver. - * - * @return \Viserio\Contract\Session\Store */ protected function createArrayDriver(): StoreContract { @@ -171,8 +159,6 @@ protected function createArrayDriver(): StoreContract /** * Create an instance of the Memcached session driver. * - * @return \Viserio\Contract\Session\Store - * * @codeCoverageIgnore */ protected function createMemcachedDriver(): StoreContract @@ -183,8 +169,6 @@ protected function createMemcachedDriver(): StoreContract /** * Create an instance of the Memcache session driver. * - * @return \Viserio\Contract\Session\Store - * * @codeCoverageIgnore */ protected function createMemcacheDriver(): StoreContract @@ -195,8 +179,6 @@ protected function createMemcacheDriver(): StoreContract /** * Create an instance of the Mongodb session driver. * - * @return \Viserio\Contract\Session\Store - * * @codeCoverageIgnore */ protected function createMongodbDriver(): StoreContract @@ -207,8 +189,6 @@ protected function createMongodbDriver(): StoreContract /** * Create an instance of the Predis session driver. * - * @return \Viserio\Contract\Session\Store - * * @codeCoverageIgnore */ protected function createPredisDriver(): StoreContract @@ -219,8 +199,6 @@ protected function createPredisDriver(): StoreContract /** * Create an instance of the Redis session driver. * - * @return \Viserio\Contract\Session\Store - * * @codeCoverageIgnore */ protected function createRedisDriver(): StoreContract @@ -230,8 +208,6 @@ protected function createRedisDriver(): StoreContract /** * Create an instance of the Filesystem session driver. - * - * @return \Viserio\Contract\Session\Store */ protected function createFilesystemDriver(): StoreContract { @@ -241,8 +217,6 @@ protected function createFilesystemDriver(): StoreContract /** * Create an instance of the APCu session driver. * - * @return \Viserio\Contract\Session\Store - * * @codeCoverageIgnore */ protected function createApcuDriver(): StoreContract @@ -253,11 +227,7 @@ protected function createApcuDriver(): StoreContract /** * Create an instance of the Migrating session driver. * - * @param array $config - * * @throws \Viserio\Contract\Session\Exception\RuntimeException - * - * @return \Viserio\Contract\Session\Store */ protected function createMigratingDriver(array $config): StoreContract { @@ -289,8 +259,6 @@ protected function callCustomCreator(string $driver, array $options = []): Store * @param string $driver * * @throws \Viserio\Contract\Session\Exception\RuntimeException - * - * @return \Viserio\Contract\Session\Store */ protected function createCacheBased($driver): StoreContract { @@ -308,10 +276,6 @@ protected function createCacheBased($driver): StoreContract /** * Build the session instance. - * - * @param SessionHandlerInterface $handler - * - * @return \Viserio\Contract\Session\Store */ protected function buildSession(SessionHandlerInterface $handler): StoreContract { @@ -324,10 +288,6 @@ protected function buildSession(SessionHandlerInterface $handler): StoreContract /** * Build the encrypted session instance. - * - * @param SessionHandlerInterface $handler - * - * @return \Viserio\Contract\Session\Store */ protected function buildEncryptedSession(SessionHandlerInterface $handler): StoreContract { diff --git a/src/Viserio/Component/Session/Store.php b/src/Viserio/Component/Session/Store.php index 7f8ff916d..74a0c1fde 100644 --- a/src/Viserio/Component/Session/Store.php +++ b/src/Viserio/Component/Session/Store.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session; @@ -120,9 +120,6 @@ class Store implements StoreContract /** * Create a new session instance. - * - * @param string $name - * @param SessionHandlerContract $handler */ public function __construct(string $name, SessionHandlerContract $handler) { @@ -529,8 +526,6 @@ public function jsonSerialize(): array /** * Get the CSRF token value. - * - * @return string */ public function getToken(): string { @@ -545,8 +540,6 @@ public function getToken(): string /** * Regenerate the CSRF token value. - * - * @return void */ public function regenerateToken(): void { @@ -573,8 +566,6 @@ public function setPreviousUrl(string $url): void * Determine if this is a valid session ID. * * @param string $id - * - * @return bool */ protected function isValidId($id): bool { @@ -583,8 +574,6 @@ protected function isValidId($id): bool /** * Updates last trace timestamp. - * - * @return void */ protected function updateLastTrace(): void { @@ -593,8 +582,6 @@ protected function updateLastTrace(): void /** * Get a new, random session ID. - * - * @return string */ protected function generateSessionId(): string { @@ -605,8 +592,6 @@ protected function generateSessionId(): string * Check if session has already started. * * @throws \Viserio\Contract\Session\Exception\SessionNotStartedException - * - * @return void */ protected function checkIfSessionHasStarted(): void { @@ -619,8 +604,6 @@ protected function checkIfSessionHasStarted(): void * Prepare the raw string data from the session. * * @param string $data - * - * @return array */ protected function prepareForReadFromHandler($data): array { @@ -635,10 +618,6 @@ protected function prepareForReadFromHandler($data): array /** * Prepare the session data for storage. - * - * @param string $data - * - * @return string */ protected function prepareForWriteToHandler(string $data): string { @@ -647,10 +626,6 @@ protected function prepareForWriteToHandler(string $data): string /** * Merge new flash keys into the new flash array. - * - * @param array $keys - * - * @return void */ private function mergeNewFlashes(array $keys): void { @@ -661,10 +636,6 @@ private function mergeNewFlashes(array $keys): void /** * Remove the given keys from the old flash data. - * - * @param array $keys - * - * @return void */ private function removeFromOldFlashData(array $keys): void { @@ -673,8 +644,6 @@ private function removeFromOldFlashData(array $keys): void /** * Determine if session id should be regenerated? (based on requestsCount or regenerationTrace). - * - * @return bool */ private function shouldRegenerateId(): bool { @@ -693,8 +662,6 @@ private function shouldRegenerateId(): bool /** * Load the session data from the handler. - * - * @return bool */ private function loadSession(): bool { @@ -719,8 +686,6 @@ private function loadSession(): bool /** * Read the session data from the handler. - * - * @return array */ private function readFromHandler(): array { @@ -735,8 +700,6 @@ private function readFromHandler(): array /** * Write values to handler. - * - * @return void */ private function writeToHandler(): void { @@ -760,8 +723,6 @@ private function writeToHandler(): void /** * Generate a fingerprint string. - * - * @return string */ private function generateFingerprint(): string { @@ -776,8 +737,6 @@ private function generateFingerprint(): string /** * Get time stamp. - * - * @return int */ private function getTimestamp(): int { diff --git a/src/Viserio/Component/Session/Tests/Container/Provider/SessionServiceProviderTest.php b/src/Viserio/Component/Session/Tests/Container/Provider/SessionServiceProviderTest.php index 9f03f480c..6069165f3 100644 --- a/src/Viserio/Component/Session/Tests/Container/Provider/SessionServiceProviderTest.php +++ b/src/Viserio/Component/Session/Tests/Container/Provider/SessionServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Container\Provider; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class SessionServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Session/Tests/EncryptedStoreTest.php b/src/Viserio/Component/Session/Tests/EncryptedStoreTest.php index 8504a1591..2f7b49920 100644 --- a/src/Viserio/Component/Session/Tests/EncryptedStoreTest.php +++ b/src/Viserio/Component/Session/Tests/EncryptedStoreTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class EncryptedStoreTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/Fingerprint/ClientIpGeneratorTest.php b/src/Viserio/Component/Session/Tests/Fingerprint/ClientIpGeneratorTest.php index 3e15c8818..e42a90ceb 100644 --- a/src/Viserio/Component/Session/Tests/Fingerprint/ClientIpGeneratorTest.php +++ b/src/Viserio/Component/Session/Tests/Fingerprint/ClientIpGeneratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ClientIpGeneratorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/Fingerprint/UserAgentGeneratorTest.php b/src/Viserio/Component/Session/Tests/Fingerprint/UserAgentGeneratorTest.php index 28de6e6ce..e40402f2b 100644 --- a/src/Viserio/Component/Session/Tests/Fingerprint/UserAgentGeneratorTest.php +++ b/src/Viserio/Component/Session/Tests/Fingerprint/UserAgentGeneratorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class UserAgentGeneratorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/Fixture/MockPdo.php b/src/Viserio/Component/Session/Tests/Fixture/MockPdo.php index 909293988..c1a0b005f 100644 --- a/src/Viserio/Component/Session/Tests/Fixture/MockPdo.php +++ b/src/Viserio/Component/Session/Tests/Fixture/MockPdo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Fixture; diff --git a/src/Viserio/Component/Session/Tests/Handler/CookieSessionHandlerTest.php b/src/Viserio/Component/Session/Tests/Handler/CookieSessionHandlerTest.php index 1cba19ec9..d504ebc07 100644 --- a/src/Viserio/Component/Session/Tests/Handler/CookieSessionHandlerTest.php +++ b/src/Viserio/Component/Session/Tests/Handler/CookieSessionHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Handler; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class CookieSessionHandlerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/Handler/FileSessionHandlerTest.php b/src/Viserio/Component/Session/Tests/Handler/FileSessionHandlerTest.php index 03933080c..e0739dd4c 100644 --- a/src/Viserio/Component/Session/Tests/Handler/FileSessionHandlerTest.php +++ b/src/Viserio/Component/Session/Tests/Handler/FileSessionHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Handler; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class FileSessionHandlerTest extends TestCase { diff --git a/src/Viserio/Component/Session/Tests/Handler/MigratingSessionHandlerTest.php b/src/Viserio/Component/Session/Tests/Handler/MigratingSessionHandlerTest.php index 032abfcf1..b906d7004 100644 --- a/src/Viserio/Component/Session/Tests/Handler/MigratingSessionHandlerTest.php +++ b/src/Viserio/Component/Session/Tests/Handler/MigratingSessionHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Handler; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class MigratingSessionHandlerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/Handler/NullSessionHandlerTest.php b/src/Viserio/Component/Session/Tests/Handler/NullSessionHandlerTest.php index ae7746581..232fef008 100644 --- a/src/Viserio/Component/Session/Tests/Handler/NullSessionHandlerTest.php +++ b/src/Viserio/Component/Session/Tests/Handler/NullSessionHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Handler; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class NullSessionHandlerTest extends TestCase { diff --git a/src/Viserio/Component/Session/Tests/Handler/PdoSessionHandlerTest.php b/src/Viserio/Component/Session/Tests/Handler/PdoSessionHandlerTest.php index d315200f6..72d55fe0d 100644 --- a/src/Viserio/Component/Session/Tests/Handler/PdoSessionHandlerTest.php +++ b/src/Viserio/Component/Session/Tests/Handler/PdoSessionHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Handler; @@ -32,6 +32,7 @@ * @internal * * @small + * @coversNothing */ final class PdoSessionHandlerTest extends MockeryTestCase { @@ -342,9 +343,6 @@ public function testGetConnectionConnectsIfNeeded(): void self::assertInstanceOf(PDO::class, $method->invoke($handler)); } - /** - * @return string - */ private function getPersistentSqliteDsn(): string { $this->dbFile = \tempnam(\sys_get_temp_dir(), 'sf2_sqlite_sessions'); @@ -352,9 +350,6 @@ private function getPersistentSqliteDsn(): string return 'sqlite:' . $this->dbFile; } - /** - * @return PDO - */ private function getMemorySqlitePdo(): PDO { $pdo = new PDO('sqlite::memory:'); @@ -367,8 +362,6 @@ private function getMemorySqlitePdo(): PDO } /** - * @param string $content - * * @return bool|resource */ private function createStream(string $content) diff --git a/src/Viserio/Component/Session/Tests/Handler/StrictSessionHandlerTest.php b/src/Viserio/Component/Session/Tests/Handler/StrictSessionHandlerTest.php index b4cf9313f..f712efa1b 100644 --- a/src/Viserio/Component/Session/Tests/Handler/StrictSessionHandlerTest.php +++ b/src/Viserio/Component/Session/Tests/Handler/StrictSessionHandlerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests\Handler; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class StrictSessionHandlerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/Middleware/StartSessionMiddlewareTest.php b/src/Viserio/Component/Session/Tests/Middleware/StartSessionMiddlewareTest.php index 927d112fe..13d4dbbd4 100644 --- a/src/Viserio/Component/Session/Tests/Middleware/StartSessionMiddlewareTest.php +++ b/src/Viserio/Component/Session/Tests/Middleware/StartSessionMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class StartSessionMiddlewareTest extends MockeryTestCase { @@ -86,11 +87,6 @@ public function testAddSessionToCookie(): void })); } - /** - * @param string $default - * - * @return \Viserio\Component\Session\SessionManager - */ private function arrangeSessionManager(string $default = 'file'): SessionManager { return new SessionManager([ diff --git a/src/Viserio/Component/Session/Tests/Middleware/VerifyCsrfTokenMiddlewareTest.php b/src/Viserio/Component/Session/Tests/Middleware/VerifyCsrfTokenMiddlewareTest.php index 5b199878f..dd017a690 100644 --- a/src/Viserio/Component/Session/Tests/Middleware/VerifyCsrfTokenMiddlewareTest.php +++ b/src/Viserio/Component/Session/Tests/Middleware/VerifyCsrfTokenMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class VerifyCsrfTokenMiddlewareTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/SessionManagerTest.php b/src/Viserio/Component/Session/Tests/SessionManagerTest.php index 64c21c2ea..6d479bf3f 100644 --- a/src/Viserio/Component/Session/Tests/SessionManagerTest.php +++ b/src/Viserio/Component/Session/Tests/SessionManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class SessionManagerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Session/Tests/StoreTest.php b/src/Viserio/Component/Session/Tests/StoreTest.php index 80ef42fd3..877dd2771 100644 --- a/src/Viserio/Component/Session/Tests/StoreTest.php +++ b/src/Viserio/Component/Session/Tests/StoreTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Session\Tests; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class StoreTest extends MockeryTestCase { @@ -105,8 +106,6 @@ public function testSessionReturnsFalseOnFirstTraceNull(): void * @dataProvider provideValidSessionNameCases * * @var string - * - * @param string $sessionName */ public function testValidSessionName(string $sessionName): void { @@ -128,8 +127,6 @@ public static function provideValidSessionNameCases(): iterable * @dataProvider provideInvalidSessionNameCases * * @var string - * - * @param string $sessionName */ public function testInvalidSessionName(string $sessionName): void { @@ -456,13 +453,6 @@ protected function allowMockingNonExistentMethods($allow = false): void parent::allowMockingNonExistentMethods(true); } - /** - * @param int $requestsCount - * @param string $fingerprint - * @param int $regenerationTrace - * - * @return string - */ private function getSessionInfoAsJsonString( int $requestsCount = 0, string $fingerprint = '', diff --git a/src/Viserio/Component/Session/composer.json b/src/Viserio/Component/Session/composer.json index d28d37f3b..779fcafa1 100644 --- a/src/Viserio/Component/Session/composer.json +++ b/src/Viserio/Component/Session/composer.json @@ -44,11 +44,10 @@ "cache/session-handler": "^1.0.0", "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", "psr/http-server-middleware": "^1.0.0", - "slam/phpstan-extensions": "^4.0.0", "viserio/cache": "^1.0@dev", "viserio/container": "^1.0@dev", "viserio/cookie": "^1.0@dev", diff --git a/src/Viserio/Component/Session/phpstan.neon b/src/Viserio/Component/Session/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Session/phpstan.neon +++ b/src/Viserio/Component/Session/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Session/phpunit.xml b/src/Viserio/Component/Session/phpunit.xml new file mode 100644 index 000000000..3990b8ed7 --- /dev/null +++ b/src/Viserio/Component/Session/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Session/phpunit.xml.dist b/src/Viserio/Component/Session/phpunit.xml.dist deleted file mode 100644 index 29674937d..000000000 --- a/src/Viserio/Component/Session/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Support/.gitignore b/src/Viserio/Component/Support/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Support/.gitignore +++ b/src/Viserio/Component/Support/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Support/Http/ClientIp.php b/src/Viserio/Component/Support/Http/ClientIp.php index 5049226c5..fb350bb1f 100644 --- a/src/Viserio/Component/Support/Http/ClientIp.php +++ b/src/Viserio/Component/Support/Http/ClientIp.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Http; @@ -39,8 +39,6 @@ final class ClientIp /** * Create ClientIp instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest */ public function __construct(ServerRequestInterface $serverRequest) { @@ -49,8 +47,6 @@ public function __construct(ServerRequestInterface $serverRequest) /** * Returns client IP address. - * - * @return null|string */ public function getIpAddress(): ?string { @@ -80,10 +76,6 @@ public function getIpAddress(): ?string /** * Check that a given string is a valid IP address. - * - * @param string $ip - * - * @return bool */ private function isValidIpAddress(string $ip): bool { @@ -93,10 +85,7 @@ private function isValidIpAddress(string $ip): bool /** * Find out the client's IP address from the headers available to us. * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param string $header Header name - * - * @return string + * @param string $header Header name */ private function getFirstIpAddressFromHeader(ServerRequestInterface $serverRequest, string $header): string { diff --git a/src/Viserio/Component/Support/Invoker.php b/src/Viserio/Component/Support/Invoker.php index 0d1187233..271749ea7 100644 --- a/src/Viserio/Component/Support/Invoker.php +++ b/src/Viserio/Component/Support/Invoker.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support; @@ -53,8 +53,6 @@ final class Invoker implements InvokerInterface /** * Inject by type hint. * - * @param bool $inject - * * @return $this */ public function injectByTypeHint(bool $inject = false): self @@ -67,8 +65,6 @@ public function injectByTypeHint(bool $inject = false): self /** * Inject by parameter. * - * @param bool $inject - * * @return $this */ public function injectByParameterName(bool $inject = false): self @@ -81,8 +77,6 @@ public function injectByParameterName(bool $inject = false): self /** * Adds a resolver to the invoker class. * - * @param ParameterResolver $resolver - * * @return $this */ public function addResolver(ParameterResolver $resolver): self @@ -102,8 +96,6 @@ public function call($callable, array $parameters = []) /** * Get a full configured invoker class. - * - * @return \Invoker\InvokerInterface */ private function getInvoker(): InvokerInterface { diff --git a/src/Viserio/Component/Support/LazyString.php b/src/Viserio/Component/Support/LazyString.php index a56ee5e20..f70803a7f 100644 --- a/src/Viserio/Component/Support/LazyString.php +++ b/src/Viserio/Component/Support/LazyString.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support; @@ -96,11 +96,7 @@ public static function fromCallable($callback, ...$arguments): self } /** - * @param callable $callback - * * @throws \ReflectionException< - * - * @return string */ private static function getPrettyName(callable $callback): string { diff --git a/src/Viserio/Component/Support/Pluralizer.php b/src/Viserio/Component/Support/Pluralizer.php index 0376119d8..9f9b55392 100644 --- a/src/Viserio/Component/Support/Pluralizer.php +++ b/src/Viserio/Component/Support/Pluralizer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support; @@ -94,8 +94,6 @@ private function __construct() /** * Returns a list of uncountable words. - * - * @return array */ public static function getUncountable(): array { @@ -104,11 +102,6 @@ public static function getUncountable(): array /** * Get the plural form of an English word. - * - * @param string $value - * @param int $count - * - * @return string */ public static function plural(string $value, int $count = 2): string { @@ -123,10 +116,6 @@ public static function plural(string $value, int $count = 2): string /** * Get the singular form of an English word. - * - * @param string $value - * - * @return string */ public static function singular(string $value): string { @@ -137,10 +126,6 @@ public static function singular(string $value): string /** * Determine if the given value is uncountable. - * - * @param string $value - * - * @return bool */ protected static function uncountable(string $value): bool { @@ -149,11 +134,6 @@ protected static function uncountable(string $value): bool /** * Attempt to match the case on two strings. - * - * @param string $value - * @param string $comparison - * - * @return string */ protected static function matchCase(string $value, string $comparison): string { diff --git a/src/Viserio/Component/Support/Str.php b/src/Viserio/Component/Support/Str.php index 767de7b72..a28b0290e 100644 --- a/src/Viserio/Component/Support/Str.php +++ b/src/Viserio/Component/Support/Str.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support; @@ -44,10 +44,7 @@ class Str * The result is not cast, so the return value may be of type Stringy, * integer, boolean, etc. * - * @param string $name * @param mixed[] $arguments - * - * @return mixed */ public static function __callStatic(string $name, array $arguments) { @@ -56,11 +53,6 @@ public static function __callStatic(string $name, array $arguments) /** * Cap a string with a single instance of a given value. - * - * @param string $value - * @param string $cap - * - * @return string */ public static function finish(string $value, string $cap): string { @@ -71,12 +63,6 @@ public static function finish(string $value, string $cap): string /** * Limit the number of characters in a string. - * - * @param string $value - * @param int $limit - * @param string $end - * - * @return string */ public static function limit(string $value, int $limit = 100, string $end = '...'): string { @@ -89,12 +75,6 @@ public static function limit(string $value, int $limit = 100, string $end = '... /** * Limit the number of words in a string. - * - * @param string $value - * @param int $words - * @param string $end - * - * @return string */ public static function words(string $value, int $words = 100, string $end = '...'): string { @@ -109,11 +89,6 @@ public static function words(string $value, int $words = 100, string $end = '... /** * Parse a Class@method style callback into class and method. - * - * @param string $callback - * @param string $default - * - * @return array */ public static function parseCallback(string $callback, string $default): array { @@ -125,8 +100,6 @@ public static function parseCallback(string $callback, string $default): array * * @param int $length How many characters do you want? * @param string $characters Which characters to choose from - * - * @return string */ public static function random(int $length = 64, string $characters = CharacterType::PRINTABLE_ASCII): string { @@ -143,10 +116,6 @@ public static function random(int $length = 64, string $characters = CharacterTy /** * Convert a string to kebab case. - * - * @param string $value - * - * @return string */ public static function kebab(string $value): string { @@ -157,11 +126,6 @@ public static function kebab(string $value): string * Convert a string to snake case. * * @see https://en.wikipedia.org/wiki/Snake_case - * - * @param string $value - * @param string $delimiter - * - * @return string */ public static function snake(string $value, string $delimiter = '_'): string { @@ -183,10 +147,6 @@ public static function snake(string $value, string $delimiter = '_'): string /** * Convert a value to studly caps case. - * - * @param string $value - * - * @return string */ public static function studly(string $value): string { @@ -204,11 +164,6 @@ public static function studly(string $value): string /** * Get the plural form of an English word. - * - * @param string $value - * @param int $count - * - * @return string */ public static function plural(string $value, int $count = 2): string { @@ -217,10 +172,6 @@ public static function plural(string $value, int $count = 2): string /** * Get the singular form of an English word. - * - * @param string $value - * - * @return string */ public static function singular(string $value): string { @@ -229,12 +180,6 @@ public static function singular(string $value): string /** * Replace the first occurrence of a given value in the string. - * - * @param string $search - * @param string $replace - * @param string $subject - * - * @return string */ public static function replaceFirst(string $search, string $replace, string $subject): string { @@ -249,12 +194,6 @@ public static function replaceFirst(string $search, string $replace, string $sub /** * Replace the last occurrence of a given value in the string. - * - * @param string $search - * @param string $replace - * @param string $subject - * - * @return string */ public static function replaceLast(string $search, string $replace, string $subject): string { @@ -266,12 +205,7 @@ public static function replaceLast(string $search, string $replace, string $subj /** * Helper function for replaceLast and replaceFirst. * - * @param string $subject - * @param string $replace * @param bool|int $position - * @param string $search - * - * @return string */ private static function replaceByPosition(string $subject, string $replace, $position, string $search): string { @@ -284,10 +218,6 @@ private static function replaceByPosition(string $subject, string $replace, $pos /** * Normalize screaming snake/kebab case value to regular snake/kebab case. - * - * @param string $value - * - * @return string */ private static function normalizeScreamingCase(string $value): string { diff --git a/src/Viserio/Component/Support/Tests/Fixture/Controller.php b/src/Viserio/Component/Support/Tests/Fixture/Controller.php index a9c7c8571..c1c105a50 100644 --- a/src/Viserio/Component/Support/Tests/Fixture/Controller.php +++ b/src/Viserio/Component/Support/Tests/Fixture/Controller.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests\Fixture; diff --git a/src/Viserio/Component/Support/Tests/Http/ClientIpTest.php b/src/Viserio/Component/Support/Tests/Http/ClientIpTest.php index b73eeef7b..d1c7b0e14 100644 --- a/src/Viserio/Component/Support/Tests/Http/ClientIpTest.php +++ b/src/Viserio/Component/Support/Tests/Http/ClientIpTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests\Http; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ClientIpTest extends MockeryTestCase { @@ -170,9 +171,6 @@ public function testGetIpByXForwardedForWithInvalidIp(): void self::assertSame('192.168.1.1', $clientIp->getIpAddress()); } - /** - * @return MockInterface - */ private function arrangeRequestWithXForwardedForHeader(): MockInterface { $request = Mockery::mock(ServerRequestInterface::class); @@ -198,9 +196,6 @@ private function arrangeRequestWithXForwardedForHeader(): MockInterface return $request; } - /** - * @return MockInterface - */ private function arrangeRequestWithForwardedHeader(): MockInterface { $request = Mockery::mock(ServerRequestInterface::class); diff --git a/src/Viserio/Component/Support/Tests/InvokerTest.php b/src/Viserio/Component/Support/Tests/InvokerTest.php index 31eb2016a..00cb42b4f 100644 --- a/src/Viserio/Component/Support/Tests/InvokerTest.php +++ b/src/Viserio/Component/Support/Tests/InvokerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class InvokerTest extends TestCase { diff --git a/src/Viserio/Component/Support/Tests/LazyStringTest.php b/src/Viserio/Component/Support/Tests/LazyStringTest.php index ec820c34e..e2bdc8ec2 100644 --- a/src/Viserio/Component/Support/Tests/LazyStringTest.php +++ b/src/Viserio/Component/Support/Tests/LazyStringTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class LazyStringTest extends TestCase { diff --git a/src/Viserio/Component/Support/Tests/PluralizerTest.php b/src/Viserio/Component/Support/Tests/PluralizerTest.php index f3d451c23..c06746cca 100644 --- a/src/Viserio/Component/Support/Tests/PluralizerTest.php +++ b/src/Viserio/Component/Support/Tests/PluralizerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class PluralizerTest extends TestCase { diff --git a/src/Viserio/Component/Support/Tests/StrTest.php b/src/Viserio/Component/Support/Tests/StrTest.php index ae829113d..6b1ae6722 100644 --- a/src/Viserio/Component/Support/Tests/StrTest.php +++ b/src/Viserio/Component/Support/Tests/StrTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class StrTest extends TestCase { diff --git a/src/Viserio/Component/Support/Tests/Traits/BytesFormatTraitTest.php b/src/Viserio/Component/Support/Tests/Traits/BytesFormatTraitTest.php index 02de7aec0..8b4fee977 100644 --- a/src/Viserio/Component/Support/Tests/Traits/BytesFormatTraitTest.php +++ b/src/Viserio/Component/Support/Tests/Traits/BytesFormatTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class BytesFormatTraitTest extends TestCase { diff --git a/src/Viserio/Component/Support/Traits/BytesFormatTrait.php b/src/Viserio/Component/Support/Traits/BytesFormatTrait.php index 1c3f29d9c..7f2824348 100644 --- a/src/Viserio/Component/Support/Traits/BytesFormatTrait.php +++ b/src/Viserio/Component/Support/Traits/BytesFormatTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Traits; @@ -21,8 +21,6 @@ trait BytesFormatTrait /** * Convert a number string to bytes. * - * @param string $number - * * @throws InvalidArgumentException * @throws OutOfBoundsException * @@ -72,11 +70,7 @@ protected static function convertToBytes(string $number): int * - but the value has only one delimiter, such as "234,56", then it is impossible to know whether it is decimal * separator or not. Only knowing the right format would allow this. * - * @param string $number - * * @throws InvalidArgumentException - * - * @return string */ private static function convertToNumber(string $number): string { diff --git a/src/Viserio/Component/Support/Traits/InvokerAwareTrait.php b/src/Viserio/Component/Support/Traits/InvokerAwareTrait.php index d05107842..795b9ee06 100644 --- a/src/Viserio/Component/Support/Traits/InvokerAwareTrait.php +++ b/src/Viserio/Component/Support/Traits/InvokerAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Support\Traits; @@ -26,8 +26,6 @@ trait InvokerAwareTrait /** * Get configured invoker. - * - * @return \Viserio\Component\Support\Invoker */ protected function getInvoker(): Invoker { diff --git a/src/Viserio/Component/Support/composer.json b/src/Viserio/Component/Support/composer.json index 65afd1ee1..a18f8ec18 100644 --- a/src/Viserio/Component/Support/composer.json +++ b/src/Viserio/Component/Support/composer.json @@ -39,11 +39,10 @@ "doctrine/inflector": "^1.3", "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "php-di/invoker": "^2.0.0", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev", "voku/stringy": "^5.2.0" diff --git a/src/Viserio/Component/Support/phpstan.neon b/src/Viserio/Component/Support/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Support/phpstan.neon +++ b/src/Viserio/Component/Support/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Support/phpunit.xml b/src/Viserio/Component/Support/phpunit.xml new file mode 100644 index 000000000..c61558b5e --- /dev/null +++ b/src/Viserio/Component/Support/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Support/phpunit.xml.dist b/src/Viserio/Component/Support/phpunit.xml.dist deleted file mode 100644 index cf9dacdf0..000000000 --- a/src/Viserio/Component/Support/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Translation/.gitignore b/src/Viserio/Component/Translation/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Translation/.gitignore +++ b/src/Viserio/Component/Translation/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Translation/Container/Provider/TranslationDataCollectorServiceProvider.php b/src/Viserio/Component/Translation/Container/Provider/TranslationDataCollectorServiceProvider.php index 143607193..99fb5425b 100644 --- a/src/Viserio/Component/Translation/Container/Provider/TranslationDataCollectorServiceProvider.php +++ b/src/Viserio/Component/Translation/Container/Provider/TranslationDataCollectorServiceProvider.php @@ -3,91 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Psr\Container\ContainerInterface; -// use Viserio\Contract\Container\ServiceProvider as ServiceProviderContract; -// use Viserio\Contract\Config\ProvidesDefaultConfig as ProvidesDefaultConfigContract; -// use Viserio\Contract\Config\RequiresComponentConfig as RequiresComponentConfigContract; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Translation\Translator as TranslatorContract; -// use Viserio\Component\Config\Traits\OptionsResolverTrait; -// use Viserio\Component\Translation\DataCollector\ViserioTranslationDataCollector; -// // class TranslationDataCollectorServiceProvider implements // ServiceProviderContract, // RequiresComponentConfigContract, // ProvidesDefaultConfigContract // { -// use OptionsResolverTrait; -// -// /** -// * {@inheritdoc} -// */ -// public function getFactories(): array -// { -// return []; -// } -// -// /** -// * {@inheritdoc} -// */ -// public function getExtensions(): array -// { -// return [ -// ProfilerContract::class => [self::class, 'extendProfiler'], -// ]; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDimensions(): iterable -// { -// return ['viserio', 'profiler']; -// } -// -// /** -// * {@inheritdoc} -// */ -// public static function getDefaultOptions(): array -// { -// return [ -// 'collector' => [ -// 'translation' => false, -// ], -// ]; -// } -// -// /** -// * Extend viserio profiler with data collector. -// * -// * @param \Psr\Container\ContainerInterface $container -// * @param null|\Viserio\Contract\Profiler\Profiler $profiler -// * -// * @return null|\Viserio\Contract\Profiler\Profiler -// */ -// public static function extendProfiler( -// ContainerInterface $container, -// ?ProfilerContract $profiler = null -// ): ?ProfilerContract { -// if ($profiler !== null) { -// $options = self::resolveOptions($container->get('config')); -// -// if ($options['collector']['translation']) { -// $profiler->addCollector(new ViserioTranslationDataCollector( -// $container->get(TranslatorContract::class) -// )); -// } -// } -// -// return $profiler; -// } -// } diff --git a/src/Viserio/Component/Translation/Container/Provider/TranslationServiceProvider.php b/src/Viserio/Component/Translation/Container/Provider/TranslationServiceProvider.php index 1495c5174..9131b8969 100644 --- a/src/Viserio/Component/Translation/Container/Provider/TranslationServiceProvider.php +++ b/src/Viserio/Component/Translation/Container/Provider/TranslationServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Container\Provider; diff --git a/src/Viserio/Component/Translation/DataCollector/ViserioTranslationDataCollector.php b/src/Viserio/Component/Translation/DataCollector/ViserioTranslationDataCollector.php index 9c05a57ce..6957a273c 100644 --- a/src/Viserio/Component/Translation/DataCollector/ViserioTranslationDataCollector.php +++ b/src/Viserio/Component/Translation/DataCollector/ViserioTranslationDataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\DataCollector; @@ -28,8 +28,6 @@ class ViserioTranslationDataCollector extends AbstractDataCollector implements P /** * Create new translation data collector. - * - * @param \Viserio\Contract\Translation\Translator $translator */ public function __construct(TranslatorContract $translator) { @@ -137,8 +135,6 @@ public function getPanel(): string /** * Get all collected messages. * - * @return array - * * @codeCoverageIgnore */ public function getMessages(): array @@ -149,8 +145,6 @@ public function getMessages(): array /** * Get counted messages. * - * @return array - * * @codeCoverageIgnore */ public function getCountedMessages(): array @@ -160,10 +154,6 @@ public function getCountedMessages(): array /** * Sanitize collected messages. - * - * @param array $messages - * - * @return array */ protected function sanitizeCollectedMessages(array $messages): array { @@ -192,10 +182,6 @@ protected function sanitizeCollectedMessages(array $messages): array /** * Counter for message types. - * - * @param array $messages - * - * @return array */ protected function computeCount(array $messages): array { @@ -214,10 +200,6 @@ protected function computeCount(array $messages): array /** * Sorte messages to the right type. - * - * @param array $messages - * - * @return array */ protected function getSortedMessages(array $messages): array { diff --git a/src/Viserio/Component/Translation/Extractor/AbstractFileExtractor.php b/src/Viserio/Component/Translation/Extractor/AbstractFileExtractor.php index 424389c09..b6f3d1430 100644 --- a/src/Viserio/Component/Translation/Extractor/AbstractFileExtractor.php +++ b/src/Viserio/Component/Translation/Extractor/AbstractFileExtractor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Extractor; @@ -39,8 +39,6 @@ public function setPrefix(string $prefix): void * Extract files from given resources. * * @param iterable|SplFileInfo|string $resource Files, a file or a directory - * - * @return array */ protected function extractFiles($resource): array { @@ -74,11 +72,7 @@ protected function extractFiles($resource): array /** * Check if is file. * - * @param string $file - * * @throws \Viserio\Contract\Translation\Exception\InvalidArgumentException - * - * @return bool */ protected function isFile(string $file): bool { @@ -91,10 +85,6 @@ protected function isFile(string $file): bool /** * Check if file can be extracted. - * - * @param string $file - * - * @return bool */ abstract protected function canBeExtracted(string $file): bool; diff --git a/src/Viserio/Component/Translation/Extractor/ChainExtractor.php b/src/Viserio/Component/Translation/Extractor/ChainExtractor.php index b4e8bb1a7..fb4100bd2 100644 --- a/src/Viserio/Component/Translation/Extractor/ChainExtractor.php +++ b/src/Viserio/Component/Translation/Extractor/ChainExtractor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Extractor; @@ -27,11 +27,6 @@ class ChainExtractor implements ExtractorContract /** * Adds a loader to the translation extractor. - * - * @param string $format - * @param \Viserio\Contract\Translation\Extractor $extractor - * - * @return void */ public function addExtractor(string $format, ExtractorContract $extractor): void { @@ -50,8 +45,6 @@ public function setPrefix(string $prefix): void /** * {@inheritdoc} - * - * @param mixed $resource */ public function extract($resource): array { diff --git a/src/Viserio/Component/Translation/Extractor/PhpExtractor.php b/src/Viserio/Component/Translation/Extractor/PhpExtractor.php index a31369102..fd5e13aea 100644 --- a/src/Viserio/Component/Translation/Extractor/PhpExtractor.php +++ b/src/Viserio/Component/Translation/Extractor/PhpExtractor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Extractor; @@ -60,8 +60,6 @@ class PhpExtractor extends AbstractFileExtractor /** * {@inheritdoc} - * - * @param mixed $resource */ public function extract($resource): array { @@ -89,10 +87,6 @@ public function extract($resource): array /** * Normalizes a token. - * - * @param mixed $token - * - * @return string */ protected function normalizeToken($token): string { @@ -105,10 +99,6 @@ protected function normalizeToken($token): string /** * Extracts trans message from PHP tokens. - * - * @param array $tokens - * - * @return array */ protected function parseTokens(array $tokens): array { @@ -162,8 +152,6 @@ protected function parseTokens(array $tokens): array * @param string $file * * @throws \InvalidArgumentException - * - * @return bool */ protected function canBeExtracted($file): bool { @@ -172,8 +160,6 @@ protected function canBeExtracted($file): bool /** * @param array|string $directory - * - * @return array */ protected function extractFromDirectory($directory): array { @@ -193,10 +179,6 @@ protected function extractFromDirectory($directory): array /** * Seeks to a non-whitespace token. - * - * @param Iterator $tokenIterator - * - * @return void */ private function seekToNextRelevantToken(Iterator $tokenIterator): void { @@ -209,11 +191,6 @@ private function seekToNextRelevantToken(Iterator $tokenIterator): void } } - /** - * @param Iterator $tokenIterator - * - * @return void - */ private function skipMethodArgument(Iterator $tokenIterator): void { $openBraces = 0; @@ -238,10 +215,6 @@ private function skipMethodArgument(Iterator $tokenIterator): void /** * Extracts the message from the iterator while the tokens * match allowed message tokens. - * - * @param Iterator $tokenIterator - * - * @return string */ private function getValue(Iterator $tokenIterator): string { @@ -282,10 +255,6 @@ private function getValue(Iterator $tokenIterator): string /** * Check if file is a php file. - * - * @param string $file - * - * @return bool */ private function isPhpFile(string $file): bool { diff --git a/src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php b/src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php index ecf107476..dee460af7 100644 --- a/src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php +++ b/src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Extractor\PhpParser; @@ -56,7 +56,9 @@ */ final class ScalarString { - // For use in "kind" attribute + /** + * For use in "kind" attribute + */ public const KIND_SINGLE_QUOTED = 1; public const KIND_DOUBLE_QUOTED = 2; public const KIND_HEREDOC = 3; diff --git a/src/Viserio/Component/Translation/Formatter/IntlMessageFormatter.php b/src/Viserio/Component/Translation/Formatter/IntlMessageFormatter.php index fa1663fdb..24bac5c69 100644 --- a/src/Viserio/Component/Translation/Formatter/IntlMessageFormatter.php +++ b/src/Viserio/Component/Translation/Formatter/IntlMessageFormatter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Formatter; diff --git a/src/Viserio/Component/Translation/MessageCatalogue.php b/src/Viserio/Component/Translation/MessageCatalogue.php index 96afa8e7d..c3c071ab2 100644 --- a/src/Viserio/Component/Translation/MessageCatalogue.php +++ b/src/Viserio/Component/Translation/MessageCatalogue.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation; diff --git a/src/Viserio/Component/Translation/Tests/Container/Provider/TranslationDataCollectorServiceProviderTest.php b/src/Viserio/Component/Translation/Tests/Container/Provider/TranslationDataCollectorServiceProviderTest.php index bd4dffd40..b8009db18 100644 --- a/src/Viserio/Component/Translation/Tests/Container/Provider/TranslationDataCollectorServiceProviderTest.php +++ b/src/Viserio/Component/Translation/Tests/Container/Provider/TranslationDataCollectorServiceProviderTest.php @@ -3,102 +3,16 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ -// -// use Narrowspark\TestingHelper\Phpunit\MockeryTestCase; -// use Psr\Http\Message\ServerRequestInterface; -// use Viserio\Component\Container\Container; -// use Viserio\Contract\Profiler\Profiler as ProfilerContract; -// use Viserio\Contract\Translation\Translator as TranslatorContract; -// use Viserio\Component\HttpFactory\Provider\HttpFactoryServiceProvider; -// use Viserio\Component\Profiler\Provider\ProfilerServiceProvider; -// use Viserio\Component\Translation\Formatter\IntlMessageFormatter; -// use Viserio\Component\Translation\MessageCatalogue; -// use Viserio\Component\Translation\Provider\TranslationDataCollectorServiceProvider; -// use Viserio\Component\Translation\Translator; -// ///** // * @internal // */ // final class TranslationDataCollectorServiceProviderTest extends MockeryTestCase // { -// public function testProvider(): void -// { -// $catalogue = new MessageCatalogue('en', [ -// 'messages' => [ -// 'foo' => 'bar', -// ], -// ]); -// -// $catalogue->addFallbackCatalogue(new MessageCatalogue('fr', [ -// 'messages' => [ -// 'test' => 'bar', -// ], -// ])); -// -// $container = new Container(); -// $container->bind(ServerRequestInterface::class, $this->getRequest()); -// $container->bind(TranslatorContract::class, new Translator( -// $catalogue, -// new IntlMessageFormatter() -// )); -// $container->register(new HttpFactoryServiceProvider()); -// $container->register(new ProfilerServiceProvider()); -// $container->register(new TranslationDataCollectorServiceProvider()); -// -// $container->bind('config', [ -// 'viserio' => [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'translation' => true, -// ], -// ], -// ], -// ]); -// -// $this->assertInstanceOf(ProfilerContract::class, $container->get(ProfilerContract::class)); -// } -// -// public function testProviderProfilerIsNull(): void -// { -// $container = new Container(); -// $container->register(new TranslationDataCollectorServiceProvider()); -// -// $container->bind('config', [ -// 'viserio' => [ -// 'profiler' => [ -// 'enable' => true, -// 'collector' => [ -// 'translation' => true, -// ], -// ], -// ], -// ]); -// -// $this->assertNull($container->get(ProfilerContract::class)); -// } -// -// /** -// * @return \Mockery\MockInterface|\Psr\Http\Message\ServerRequestInterface -// */ -// private function getRequest() -// { -// $request = \Mockery::mock(ServerRequestInterface::class); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time_float') -// ->andReturn(false); -// $request->shouldReceive('getHeaderLine') -// ->with('request_time') -// ->andReturn(false); -// -// return $request; -// } -// } diff --git a/src/Viserio/Component/Translation/Tests/Container/Provider/TranslatorServiceProviderTest.php b/src/Viserio/Component/Translation/Tests/Container/Provider/TranslatorServiceProviderTest.php index 7804e992d..97ae0f5a1 100644 --- a/src/Viserio/Component/Translation/Tests/Container/Provider/TranslatorServiceProviderTest.php +++ b/src/Viserio/Component/Translation/Tests/Container/Provider/TranslatorServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests\Container\Provider; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class TranslatorServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Translation/Tests/DataCollector/ViserioTranslationDataCollectorTest.php b/src/Viserio/Component/Translation/Tests/DataCollector/ViserioTranslationDataCollectorTest.php index bbaa1d6b4..8f5eb2bf9 100644 --- a/src/Viserio/Component/Translation/Tests/DataCollector/ViserioTranslationDataCollectorTest.php +++ b/src/Viserio/Component/Translation/Tests/DataCollector/ViserioTranslationDataCollectorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests\DataCollector; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ViserioTranslationDataCollectorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Translation/Tests/Extractor/PhpExtractorTest.php b/src/Viserio/Component/Translation/Tests/Extractor/PhpExtractorTest.php index 8a260aa0f..b090625ac 100644 --- a/src/Viserio/Component/Translation/Tests/Extractor/PhpExtractorTest.php +++ b/src/Viserio/Component/Translation/Tests/Extractor/PhpExtractorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests\Extractor; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class PhpExtractorTest extends TestCase { diff --git a/src/Viserio/Component/Translation/Tests/Extractor/PhpParser/ScalarStringTest.php b/src/Viserio/Component/Translation/Tests/Extractor/PhpParser/ScalarStringTest.php index 5b17ceb7a..caf34293b 100644 --- a/src/Viserio/Component/Translation/Tests/Extractor/PhpParser/ScalarStringTest.php +++ b/src/Viserio/Component/Translation/Tests/Extractor/PhpParser/ScalarStringTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests\Extractor\PhpParser; @@ -54,15 +54,12 @@ * @internal * * @small + * @coversNothing */ final class ScalarStringTest extends TestCase { /** * @dataProvider provideParseEscapeSequencesCases - * - * @param mixed $expected - * @param mixed $string - * @param mixed $quote */ public function testParseEscapeSequences($expected, $string, $quote): void { @@ -74,9 +71,6 @@ public function testParseEscapeSequences($expected, $string, $quote): void /** * @dataProvider provideCreateCases - * - * @param mixed $expected - * @param mixed $string */ public function testCreate($expected, $string): void { diff --git a/src/Viserio/Component/Translation/Tests/Formatter/IntlMessageFormatterTest.php b/src/Viserio/Component/Translation/Tests/Formatter/IntlMessageFormatterTest.php index edb3ee0d0..d22331226 100644 --- a/src/Viserio/Component/Translation/Tests/Formatter/IntlMessageFormatterTest.php +++ b/src/Viserio/Component/Translation/Tests/Formatter/IntlMessageFormatterTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests\Formatter; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class IntlMessageFormatterTest extends TestCase { @@ -60,10 +61,6 @@ public function testFormatToThrowExceptionOnFormat(): void /** * @dataProvider provideFormatCases - * - * @param mixed $expected - * @param mixed $message - * @param mixed $arguments */ public function testFormat($expected, $message, $arguments): void { diff --git a/src/Viserio/Component/Translation/Tests/MessageCatalogueTest.php b/src/Viserio/Component/Translation/Tests/MessageCatalogueTest.php index 22d146117..2d66127b0 100644 --- a/src/Viserio/Component/Translation/Tests/MessageCatalogueTest.php +++ b/src/Viserio/Component/Translation/Tests/MessageCatalogueTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class MessageCatalogueTest extends TestCase { @@ -193,8 +194,6 @@ public function testAddCatalogueWhenLocaleIsNotTheSameAsTheCurrentOne(): void /** * @dataProvider provideSetValidLocaleCases - * - * @param mixed $locale */ public function testSetValidLocale($locale): void { diff --git a/src/Viserio/Component/Translation/Tests/Traits/ValidateLocaleTraitTest.php b/src/Viserio/Component/Translation/Tests/Traits/ValidateLocaleTraitTest.php index d5a2098fa..69acd05ed 100644 --- a/src/Viserio/Component/Translation/Tests/Traits/ValidateLocaleTraitTest.php +++ b/src/Viserio/Component/Translation/Tests/Traits/ValidateLocaleTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests\Traits; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ValidateLocaleTraitTest extends TestCase { @@ -28,8 +29,6 @@ final class ValidateLocaleTraitTest extends TestCase /** * @dataProvider provideAssertValidLocaleToThrowExceptionCases - * - * @param mixed $locale */ public function testAssertValidLocaleToThrowException($locale): void { diff --git a/src/Viserio/Component/Translation/Tests/TranslationManagerTest.php b/src/Viserio/Component/Translation/Tests/TranslationManagerTest.php index e2d22e4bc..178052bed 100644 --- a/src/Viserio/Component/Translation/Tests/TranslationManagerTest.php +++ b/src/Viserio/Component/Translation/Tests/TranslationManagerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests; @@ -28,6 +28,7 @@ * @internal * * @small + * @coversNothing */ final class TranslationManagerTest extends MockeryTestCase { @@ -197,9 +198,6 @@ public function testAddMessageCatalogue(): void $this->manager->getTranslator('ab'); } - /** - * @return \Viserio\Contract\Parser\Loader - */ protected function getFileLoader(): LoaderContract { return (new FileLoader())->addDirectory($this->root->url()); diff --git a/src/Viserio/Component/Translation/Tests/TranslatorTest.php b/src/Viserio/Component/Translation/Tests/TranslatorTest.php index 705da859b..1fb5084d1 100644 --- a/src/Viserio/Component/Translation/Tests/TranslatorTest.php +++ b/src/Viserio/Component/Translation/Tests/TranslatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class TranslatorTest extends MockeryTestCase { diff --git a/src/Viserio/Component/Translation/Traits/ValidateLocaleTrait.php b/src/Viserio/Component/Translation/Traits/ValidateLocaleTrait.php index 342c46075..349323b37 100644 --- a/src/Viserio/Component/Translation/Traits/ValidateLocaleTrait.php +++ b/src/Viserio/Component/Translation/Traits/ValidateLocaleTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation\Traits; @@ -23,8 +23,6 @@ trait ValidateLocaleTrait * @param string $locale Locale to tests * * @throws \Viserio\Contract\Translation\Exception\InvalidArgumentException If the locale contains invalid characters - * - * @return void */ protected static function assertValidLocale(string $locale): void { diff --git a/src/Viserio/Component/Translation/TranslationManager.php b/src/Viserio/Component/Translation/TranslationManager.php index 56854df43..1853f6129 100644 --- a/src/Viserio/Component/Translation/TranslationManager.php +++ b/src/Viserio/Component/Translation/TranslationManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation; @@ -75,8 +75,6 @@ class TranslationManager implements LoggerAwareInterface, TranslationManagerCont /** * Create a new Translation instance. - * - * @param \Viserio\Contract\Translation\MessageFormatter $formatter */ public function __construct(MessageFormatterContract $formatter) { @@ -86,8 +84,6 @@ public function __construct(MessageFormatterContract $formatter) /** * Gets the string dictating the default language. - * - * @return string */ public function getLocale(): string { @@ -97,8 +93,6 @@ public function getLocale(): string /** * Sets the string dictating the default language to translate into. (e.g. 'en'). * - * @param string $locale - * * @return $this */ public function setLocale(string $locale): self @@ -112,8 +106,6 @@ public function setLocale(string $locale): self /** * Get default fallback. - * - * @return null|\Viserio\Contract\Translation\MessageCatalogue */ public function getDefaultFallback(): ?MessageCatalogueContract { @@ -123,8 +115,6 @@ public function getDefaultFallback(): ?MessageCatalogueContract /** * Set default fallback for all languages. * - * @param \Viserio\Contract\Translation\MessageCatalogue $fallback - * * @return $this */ public function setDefaultFallback(MessageCatalogueContract $fallback): self @@ -136,8 +126,6 @@ public function setDefaultFallback(MessageCatalogueContract $fallback): self /** * Get directories. - * - * @return array */ public function getDirectories(): array { @@ -147,8 +135,6 @@ public function getDirectories(): array /** * Set directories. * - * @param array $directories - * * @return $this */ public function setDirectories(array $directories): self @@ -163,8 +149,6 @@ public function setDirectories(array $directories): self /** * Add directory. * - * @param string $directory - * * @return $this */ public function addDirectory(string $directory): self @@ -198,8 +182,6 @@ public function import($filePaths): self /** * Add message catalogue. * - * @param \Viserio\Contract\Translation\MessageCatalogue $messageCatalogue - * * @return $this */ public function addMessageCatalogue(MessageCatalogueContract $messageCatalogue): self @@ -224,9 +206,6 @@ public function addMessageCatalogue(MessageCatalogueContract $messageCatalogue): /** * Set fallback for a language. * - * @param string $lang - * @param \Viserio\Contract\Translation\MessageCatalogue $fallback - * * @throws \RuntimeException * * @return $this @@ -240,10 +219,6 @@ public function setLanguageFallback(string $lang, MessageCatalogueContract $fall /** * Get fallback for a language. - * - * @param string $lang - * - * @return null|\Viserio\Contract\Translation\MessageCatalogue */ public function getLanguageFallback(string $lang): ?MessageCatalogueContract { @@ -271,13 +246,10 @@ public function getTranslator(?string $locale = null): TranslatorContract /** * Imports a language from given file path array. * - * @param array $filePaths * @param \Viserio\Contract\Parser\Loader $loader * * @throws \Viserio\Contract\Translation\Exception\InvalidArgumentException * @throws \Viserio\Contract\Parser\Exception\FileNotFoundException - * - * @return void */ private function imports(array $filePaths, $loader): void { diff --git a/src/Viserio/Component/Translation/Translator.php b/src/Viserio/Component/Translation/Translator.php index b54f2c149..c24a8ef6e 100644 --- a/src/Viserio/Component/Translation/Translator.php +++ b/src/Viserio/Component/Translation/Translator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Translation; @@ -72,9 +72,6 @@ class Translator implements LoggerAwareInterface, TranslatorContract /** * Create new Translator instance. * - * @param \Viserio\Contract\Translation\MessageCatalogue $catalogue - * @param \Viserio\Contract\Translation\MessageFormatter $formatter - * * @throws InvalidArgumentException If a locale contains invalid characters */ public function __construct(MessageCatalogueContract $catalogue, MessageFormatterContract $formatter) @@ -171,8 +168,6 @@ public function addFilter(callable $filter): TranslatorContract /** * Get all collected messages. - * - * @return array */ public function getCollectedMessages(): array { @@ -181,10 +176,6 @@ public function getCollectedMessages(): array /** * Apply helpers. - * - * @param string $translation - * - * @return mixed */ protected function applyHelpers(string $translation) { @@ -209,10 +200,6 @@ protected function applyHelpers(string $translation) /** * Filter a helper from string. - * - * @param string $translation - * - * @return array */ protected function filterHelpersFromString(string $translation): array { @@ -241,10 +228,6 @@ protected function filterHelpersFromString(string $translation): array /** * Apply filter on string. - * - * @param string $translation - * - * @return string */ protected function applyFilters(string $translation): string { @@ -261,11 +244,6 @@ protected function applyFilters(string $translation): string /** * Logs for missing translations. - * - * @param string $id - * @param string $domain - * - * @return void */ protected function log(string $id, string $domain): void { @@ -290,14 +268,6 @@ protected function log(string $id, string $domain): void /** * Collect messages about all translations. - * - * @param null|string $locale - * @param string $domain - * @param string $id - * @param string $translation - * @param array $parameters - * - * @return void */ protected function collectMessage( ?string $locale, diff --git a/src/Viserio/Component/Translation/composer.json b/src/Viserio/Component/Translation/composer.json index 42813ca07..0afeef911 100644 --- a/src/Viserio/Component/Translation/composer.json +++ b/src/Viserio/Component/Translation/composer.json @@ -39,10 +39,9 @@ "require-dev": { "mikey179/vfsstream": "^1.6.8", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Component/Translation/phpstan.neon b/src/Viserio/Component/Translation/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Translation/phpstan.neon +++ b/src/Viserio/Component/Translation/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Translation/phpunit.xml b/src/Viserio/Component/Translation/phpunit.xml new file mode 100644 index 000000000..bebd3dd06 --- /dev/null +++ b/src/Viserio/Component/Translation/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Translation/phpunit.xml.dist b/src/Viserio/Component/Translation/phpunit.xml.dist deleted file mode 100644 index 918934bfe..000000000 --- a/src/Viserio/Component/Translation/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/Validation/.gitignore b/src/Viserio/Component/Validation/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/Validation/.gitignore +++ b/src/Viserio/Component/Validation/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/Validation/Container/Provider/SanitizerServiceProvider.php b/src/Viserio/Component/Validation/Container/Provider/SanitizerServiceProvider.php index e8ef5eb4e..b4e2e711f 100644 --- a/src/Viserio/Component/Validation/Container/Provider/SanitizerServiceProvider.php +++ b/src/Viserio/Component/Validation/Container/Provider/SanitizerServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Container\Provider; diff --git a/src/Viserio/Component/Validation/Container/Provider/ValidationServiceProvider.php b/src/Viserio/Component/Validation/Container/Provider/ValidationServiceProvider.php index c1ad96d7c..84e9401bb 100644 --- a/src/Viserio/Component/Validation/Container/Provider/ValidationServiceProvider.php +++ b/src/Viserio/Component/Validation/Container/Provider/ValidationServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Container\Provider; diff --git a/src/Viserio/Component/Validation/Tests/Container/Provider/SanitizerServiceProviderTest.php b/src/Viserio/Component/Validation/Tests/Container/Provider/SanitizerServiceProviderTest.php index e185222a2..f0b114b04 100644 --- a/src/Viserio/Component/Validation/Tests/Container/Provider/SanitizerServiceProviderTest.php +++ b/src/Viserio/Component/Validation/Tests/Container/Provider/SanitizerServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Tests\Container\Provider; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class SanitizerServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Validation/Tests/Container/Provider/ValidationServiceProviderTest.php b/src/Viserio/Component/Validation/Tests/Container/Provider/ValidationServiceProviderTest.php index 7753c17cc..e2e880837 100644 --- a/src/Viserio/Component/Validation/Tests/Container/Provider/ValidationServiceProviderTest.php +++ b/src/Viserio/Component/Validation/Tests/Container/Provider/ValidationServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Tests\Container\Provider; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class ValidationServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/Validation/Tests/Fixture/SanitizerFixture.php b/src/Viserio/Component/Validation/Tests/Fixture/SanitizerFixture.php index 872e25e8f..9e339804a 100644 --- a/src/Viserio/Component/Validation/Tests/Fixture/SanitizerFixture.php +++ b/src/Viserio/Component/Validation/Tests/Fixture/SanitizerFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Tests\Fixture; diff --git a/src/Viserio/Component/Validation/Tests/Fixture/SuffixFixture.php b/src/Viserio/Component/Validation/Tests/Fixture/SuffixFixture.php index 01cb15862..36a8486af 100644 --- a/src/Viserio/Component/Validation/Tests/Fixture/SuffixFixture.php +++ b/src/Viserio/Component/Validation/Tests/Fixture/SuffixFixture.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Tests\Fixture; diff --git a/src/Viserio/Component/Validation/Tests/SanitizerTest.php b/src/Viserio/Component/Validation/Tests/SanitizerTest.php index 15f624f4e..e1db154cd 100644 --- a/src/Viserio/Component/Validation/Tests/SanitizerTest.php +++ b/src/Viserio/Component/Validation/Tests/SanitizerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Tests; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class SanitizerTest extends TestCase { diff --git a/src/Viserio/Component/Validation/Tests/ValidatorTest.php b/src/Viserio/Component/Validation/Tests/ValidatorTest.php index f58cbc27f..78fcbc3c5 100644 --- a/src/Viserio/Component/Validation/Tests/ValidatorTest.php +++ b/src/Viserio/Component/Validation/Tests/ValidatorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ValidatorTest extends TestCase { diff --git a/src/Viserio/Component/Validation/Validator.php b/src/Viserio/Component/Validation/Validator.php index c563bcf69..3a27ca80d 100644 --- a/src/Viserio/Component/Validation/Validator.php +++ b/src/Viserio/Component/Validation/Validator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\Validation; @@ -49,11 +49,6 @@ public function __construct() /** * Add your own rule's namespace. * - * @param string $namespace - * @param bool $overwrite - * - * @return void - * * @codeCoverageIgnore */ public function with(string $namespace, bool $overwrite = false): void @@ -129,10 +124,6 @@ public function invalid(): array /** * Parse the data array. - * - * @param array $data - * - * @return array */ protected function parseData(array $data): array { @@ -152,8 +143,6 @@ protected function parseData(array $data): array * Create a rule object. * * @param array|string $rules - * - * @return \Respect\Validation\Validator */ protected function createRule($rules): RespectValidator { @@ -187,13 +176,7 @@ protected function createRule($rules): RespectValidator /** * Create a validator instance. * - * @param array $rules - * @param array $notRules - * @param array $optionalRules - * * @throws RuntimeException - * - * @return \Respect\Validation\Validator */ protected function createValidator(array &$rules, array $notRules, array $optionalRules): RespectValidator { @@ -218,11 +201,6 @@ protected function createValidator(array &$rules, array $notRules, array $option /** * Create a negative or optional validator instance. - * - * @param string $filter - * @param array $rules - * - * @return \Respect\Validation\Validator */ protected function createNegativeOrOptionalValidator(string $filter, array $rules): RespectValidator { @@ -242,11 +220,6 @@ protected function createNegativeOrOptionalValidator(string $filter, array $rule /** * Chain validator to a chained validator object. - * - * @param \Respect\Validation\Validator $class - * @param array $rules - * - * @return \Respect\Validation\Validator */ protected function createChainableValidators(RespectValidator $class, array $rules): RespectValidator { @@ -277,10 +250,6 @@ protected function createChainableValidators(RespectValidator $class, array $rul /** * Parse a string based rule. - * - * @param string $rules - * - * @return array */ protected function parseStringRule(string $rules): array { @@ -300,11 +269,6 @@ protected function parseStringRule(string $rules): array /** * Parse a parameter list. - * - * @param string $rule - * @param string $parameter - * - * @return array */ protected function parseParameters(string $rule, string $parameter): array { diff --git a/src/Viserio/Component/Validation/composer.json b/src/Viserio/Component/Validation/composer.json index 2b694c734..fd40e4cd8 100644 --- a/src/Viserio/Component/Validation/composer.json +++ b/src/Viserio/Component/Validation/composer.json @@ -34,10 +34,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/container": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev", "viserio/translation": "^1.0@dev" diff --git a/src/Viserio/Component/Validation/phpstan.neon b/src/Viserio/Component/Validation/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/Validation/phpstan.neon +++ b/src/Viserio/Component/Validation/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/Validation/phpunit.xml b/src/Viserio/Component/Validation/phpunit.xml new file mode 100644 index 000000000..cd2918bcb --- /dev/null +++ b/src/Viserio/Component/Validation/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/Validation/phpunit.xml.dist b/src/Viserio/Component/Validation/phpunit.xml.dist deleted file mode 100644 index 828af4283..000000000 --- a/src/Viserio/Component/Validation/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/View/.gitignore b/src/Viserio/Component/View/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/View/.gitignore +++ b/src/Viserio/Component/View/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/View/Container/Pipeline/AddViewEnginePipe.php b/src/Viserio/Component/View/Container/Pipeline/AddViewEnginePipe.php index 8b00f5aa4..6964697f4 100644 --- a/src/Viserio/Component/View/Container/Pipeline/AddViewEnginePipe.php +++ b/src/Viserio/Component/View/Container/Pipeline/AddViewEnginePipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Container\Pipeline; @@ -30,8 +30,6 @@ class AddViewEnginePipe implements PipeContract /** * Create a new AddViewEnginePipe instance. - * - * @param string $commandTag */ public function __construct(string $commandTag = 'view.engine') { diff --git a/src/Viserio/Component/View/Container/Provider/ViewServiceProvider.php b/src/Viserio/Component/View/Container/Provider/ViewServiceProvider.php index 540775003..cd1d50741 100644 --- a/src/Viserio/Component/View/Container/Provider/ViewServiceProvider.php +++ b/src/Viserio/Component/View/Container/Provider/ViewServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Container\Provider; diff --git a/src/Viserio/Component/View/Engine/AbstractBaseEngine.php b/src/Viserio/Component/View/Engine/AbstractBaseEngine.php index 5d0f6581e..1c72d483a 100644 --- a/src/Viserio/Component/View/Engine/AbstractBaseEngine.php +++ b/src/Viserio/Component/View/Engine/AbstractBaseEngine.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Engine; diff --git a/src/Viserio/Component/View/Engine/FileEngine.php b/src/Viserio/Component/View/Engine/FileEngine.php index 5ff14377c..b54af0194 100644 --- a/src/Viserio/Component/View/Engine/FileEngine.php +++ b/src/Viserio/Component/View/Engine/FileEngine.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Engine; diff --git a/src/Viserio/Component/View/Engine/IteratorViewEngineLoader.php b/src/Viserio/Component/View/Engine/IteratorViewEngineLoader.php index 4f649e995..b89f20ccb 100644 --- a/src/Viserio/Component/View/Engine/IteratorViewEngineLoader.php +++ b/src/Viserio/Component/View/Engine/IteratorViewEngineLoader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Engine; diff --git a/src/Viserio/Component/View/Engine/MarkdownEngine.php b/src/Viserio/Component/View/Engine/MarkdownEngine.php index a8df6c646..060dd7758 100644 --- a/src/Viserio/Component/View/Engine/MarkdownEngine.php +++ b/src/Viserio/Component/View/Engine/MarkdownEngine.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Engine; diff --git a/src/Viserio/Component/View/Engine/PhpEngine.php b/src/Viserio/Component/View/Engine/PhpEngine.php index 8fc7c2a45..11ee82c32 100644 --- a/src/Viserio/Component/View/Engine/PhpEngine.php +++ b/src/Viserio/Component/View/Engine/PhpEngine.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Engine; @@ -63,9 +63,6 @@ public function get(array $fileInfo, array $data = []): string /** * Handle a view exception. * - * @param Throwable $exception - * @param int $obLevel - * * @throws Throwable */ protected function handleViewException(Throwable $exception, int $obLevel): void @@ -81,8 +78,6 @@ protected function handleViewException(Throwable $exception, int $obLevel): void * Get a ErrorException instance. * * @param ParseError|Throwable|TypeError $exception - * - * @return ErrorException */ private function getErrorException($exception): ErrorException { diff --git a/src/Viserio/Component/View/Middleware/ShareErrorsFromSessionMiddleware.php b/src/Viserio/Component/View/Middleware/ShareErrorsFromSessionMiddleware.php index 75c3cd69e..5157a7783 100644 --- a/src/Viserio/Component/View/Middleware/ShareErrorsFromSessionMiddleware.php +++ b/src/Viserio/Component/View/Middleware/ShareErrorsFromSessionMiddleware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Middleware; @@ -30,8 +30,6 @@ class ShareErrorsFromSessionMiddleware implements MiddlewareInterface /** * Create a new error binder instance. - * - * @param \Viserio\Contract\View\Factory $view */ public function __construct(FactoryContract $view) { diff --git a/src/Viserio/Component/View/Tests/Container/Provider/ViewServiceProviderTest.php b/src/Viserio/Component/View/Tests/Container/Provider/ViewServiceProviderTest.php index 7dcce1bac..cd2d9b2fd 100644 --- a/src/Viserio/Component/View/Tests/Container/Provider/ViewServiceProviderTest.php +++ b/src/Viserio/Component/View/Tests/Container/Provider/ViewServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests\Provider; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ViewServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/View/Tests/Engine/IteratorViewEngineLoaderTest.php b/src/Viserio/Component/View/Tests/Engine/IteratorViewEngineLoaderTest.php index 18a796627..7ba8184ef 100644 --- a/src/Viserio/Component/View/Tests/Engine/IteratorViewEngineLoaderTest.php +++ b/src/Viserio/Component/View/Tests/Engine/IteratorViewEngineLoaderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests\Engines; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class IteratorViewEngineLoaderTest extends MockeryTestCase { diff --git a/src/Viserio/Component/View/Tests/Engine/MarkdownEngineTest.php b/src/Viserio/Component/View/Tests/Engine/MarkdownEngineTest.php index 37156a023..9dc4d8abc 100644 --- a/src/Viserio/Component/View/Tests/Engine/MarkdownEngineTest.php +++ b/src/Viserio/Component/View/Tests/Engine/MarkdownEngineTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests\Engines; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class MarkdownEngineTest extends TestCase { diff --git a/src/Viserio/Component/View/Tests/Fixture/Nested/foo.php b/src/Viserio/Component/View/Tests/Fixture/Nested/foo.php index 40df3ef8f..39fe19971 100644 --- a/src/Viserio/Component/View/Tests/Fixture/Nested/foo.php +++ b/src/Viserio/Component/View/Tests/Fixture/Nested/foo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return 'content'; diff --git a/src/Viserio/Component/View/Tests/Middleware/ShareErrorsFromSessionMiddlewareTest.php b/src/Viserio/Component/View/Tests/Middleware/ShareErrorsFromSessionMiddlewareTest.php index a0a78b76b..93278edf0 100644 --- a/src/Viserio/Component/View/Tests/Middleware/ShareErrorsFromSessionMiddlewareTest.php +++ b/src/Viserio/Component/View/Tests/Middleware/ShareErrorsFromSessionMiddlewareTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests\Middleware; @@ -26,6 +26,7 @@ * @internal * * @small + * @coversNothing */ final class ShareErrorsFromSessionMiddlewareTest extends MockeryTestCase { diff --git a/src/Viserio/Component/View/Tests/OverwritePhpFunctions.php b/src/Viserio/Component/View/Tests/OverwritePhpFunctions.php index 78bcab530..c9e224084 100644 --- a/src/Viserio/Component/View/Tests/OverwritePhpFunctions.php +++ b/src/Viserio/Component/View/Tests/OverwritePhpFunctions.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View; diff --git a/src/Viserio/Component/View/Tests/StaticMemory.php b/src/Viserio/Component/View/Tests/StaticMemory.php index 5a4126de9..61e991de5 100644 --- a/src/Viserio/Component/View/Tests/StaticMemory.php +++ b/src/Viserio/Component/View/Tests/StaticMemory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests; diff --git a/src/Viserio/Component/View/Tests/Traits/NormalizeNameTraitTest.php b/src/Viserio/Component/View/Tests/Traits/NormalizeNameTraitTest.php index 994297d6a..090b51c3c 100644 --- a/src/Viserio/Component/View/Tests/Traits/NormalizeNameTraitTest.php +++ b/src/Viserio/Component/View/Tests/Traits/NormalizeNameTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests\Traits; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class NormalizeNameTraitTest extends TestCase { @@ -27,9 +28,6 @@ final class NormalizeNameTraitTest extends TestCase /** * @dataProvider provideNormalizeNameCases - * - * @param mixed $name - * @param mixed $validated */ public function testNormalizeName($name, $validated): void { diff --git a/src/Viserio/Component/View/Tests/ViewFactoryTest.php b/src/Viserio/Component/View/Tests/ViewFactoryTest.php index 38385fbc8..b5728a35d 100644 --- a/src/Viserio/Component/View/Tests/ViewFactoryTest.php +++ b/src/Viserio/Component/View/Tests/ViewFactoryTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class ViewFactoryTest extends MockeryTestCase { @@ -301,9 +302,6 @@ public function testGetAnItemFromTheSharedData(): void self::assertEquals('foo', $this->viewFactory->shared('test')); } - /** - * @return array - */ private function getFactoryArgs(): array { return [ diff --git a/src/Viserio/Component/View/Tests/ViewFinderTest.php b/src/Viserio/Component/View/Tests/ViewFinderTest.php index 939f426f9..aa87c5591 100644 --- a/src/Viserio/Component/View/Tests/ViewFinderTest.php +++ b/src/Viserio/Component/View/Tests/ViewFinderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ViewFinderTest extends MockeryTestCase { diff --git a/src/Viserio/Component/View/Tests/ViewTest.php b/src/Viserio/Component/View/Tests/ViewTest.php index 78d702a28..471307c4e 100644 --- a/src/Viserio/Component/View/Tests/ViewTest.php +++ b/src/Viserio/Component/View/Tests/ViewTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Tests; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class ViewTest extends MockeryTestCase { diff --git a/src/Viserio/Component/View/Traits/NormalizeNameTrait.php b/src/Viserio/Component/View/Traits/NormalizeNameTrait.php index 6e1447309..a06a51b3b 100644 --- a/src/Viserio/Component/View/Traits/NormalizeNameTrait.php +++ b/src/Viserio/Component/View/Traits/NormalizeNameTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View\Traits; @@ -19,10 +19,6 @@ trait NormalizeNameTrait { /** * Normalize a view name. - * - * @param string $name - * - * @return string */ protected function normalizeName(string $name): string { diff --git a/src/Viserio/Component/View/View.php b/src/Viserio/Component/View/View.php index 06e39be0c..6f07a66e4 100644 --- a/src/Viserio/Component/View/View.php +++ b/src/Viserio/Component/View/View.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View; @@ -64,10 +64,6 @@ class View implements ArrayAccess, ViewContract /** * Create a new view instance. * - * @param \Viserio\Contract\View\Factory $factory - * @param \Viserio\Contract\View\Engine $engine - * @param string $view - * @param array $fileInfo * @param array|\Viserio\Contract\Support\Arrayable $data */ public function __construct( @@ -89,7 +85,6 @@ public function __construct( * Set a piece of data on the view. * * @param string $key - * @param mixed $value */ public function __set($key, $value): void { @@ -100,8 +95,6 @@ public function __set($key, $value): void * Check if a piece of data is bound to the view. * * @param string $key - * - * @return bool */ public function __isset($key): bool { @@ -112,8 +105,6 @@ public function __isset($key): bool * Remove a piece of bound data from the view. * * @param string $key - * - * @return void */ public function __unset($key): void { @@ -123,12 +114,7 @@ public function __unset($key): void /** * Dynamically bind parameters to the view. * - * @param string $method - * @param array $parameters - * * @throws BadMethodCallException - * - * @return \Viserio\Contract\View\View */ public function __call(string $method, array $parameters): ViewContract { @@ -141,8 +127,6 @@ public function __call(string $method, array $parameters): ViewContract /** * Get the string contents of the view. - * - * @return string */ public function __toString(): string { @@ -246,8 +230,6 @@ public function setPath(string $path): ViewContract /** * Get file extension. - * - * @return string */ public function getExtension(): string { @@ -258,8 +240,6 @@ public function getExtension(): string * Determine if a piece of data is bound. * * @param string $key - * - * @return bool */ public function offsetExists($key): bool { @@ -270,8 +250,6 @@ public function offsetExists($key): bool * Get a piece of bound data to the view. * * @param string $key - * - * @return mixed */ public function offsetGet($key) { @@ -282,7 +260,6 @@ public function offsetGet($key) * Set a piece of data on the view. * * @param string $key - * @param mixed $value */ public function offsetSet($key, $value): void { @@ -303,8 +280,6 @@ public function offsetUnset($key): void * Get a piece of data from the view. * * @param string $key - * - * @return mixed */ public function &__get($key) { @@ -313,8 +288,6 @@ public function &__get($key) /** * Get the evaluated contents of the view. - * - * @return string */ protected function getContents(): string { @@ -323,8 +296,6 @@ protected function getContents(): string /** * Get the data bound to the view instance. - * - * @return array */ protected function gatherData(): array { diff --git a/src/Viserio/Component/View/ViewFactory.php b/src/Viserio/Component/View/ViewFactory.php index acceeb52e..a3b767787 100644 --- a/src/Viserio/Component/View/ViewFactory.php +++ b/src/Viserio/Component/View/ViewFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View; @@ -28,22 +28,16 @@ class ViewFactory implements FactoryContract /** * Array of registered view name aliases. - * - * @var array */ protected array $aliases = []; /** * All of the registered view names. - * - * @var array */ protected array $names = []; /** * Register a view extension. - * - * @var array */ protected static array $extensions = [ 'php' => 'php', @@ -55,8 +49,6 @@ class ViewFactory implements FactoryContract /** * Data that should be available to all templates. - * - * @var array */ protected array $shared = []; @@ -76,9 +68,6 @@ class ViewFactory implements FactoryContract /** * Create a new factory instance. - * - * @param \Viserio\Contract\View\EngineResolver $engines - * @param \Viserio\Contract\View\Finder $finder */ public function __construct(EngineResolverContract $engines, FinderContract $finder) { @@ -341,10 +330,6 @@ public function getEngineResolver(): EngineResolverContract /** * Parse the given data into a raw array. - * - * @param mixed $data - * - * @return array */ protected function parseData($data): array { @@ -353,10 +338,6 @@ protected function parseData($data): array /** * Get the extension used by the view file. - * - * @param string $path - * - * @return null|string */ protected function getExtension(string $path): ?string { @@ -376,10 +357,6 @@ protected function getExtension(string $path): ?string /** * Get the right view object. * - * @param \Viserio\Contract\View\Factory $factory - * @param \Viserio\Contract\View\Engine $engine - * @param string $view - * @param array $fileInfo * @param array|\Viserio\Contract\Support\Arrayable $data * * @return \Viserio\Component\View\View @@ -396,11 +373,6 @@ protected function getView( /** * Determine if a given string ends with a given substring. - * - * @param string $haystack - * @param string $needle - * - * @return bool */ private function endsWith(string $haystack, string $needle): bool { diff --git a/src/Viserio/Component/View/ViewFinder.php b/src/Viserio/Component/View/ViewFinder.php index 32ad0b3b5..51c8fda80 100644 --- a/src/Viserio/Component/View/ViewFinder.php +++ b/src/Viserio/Component/View/ViewFinder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\View; @@ -21,29 +21,21 @@ class ViewFinder implements FinderContract { /** * The array of active view paths. - * - * @var array */ protected array $paths = []; /** * The array of views that have been located. - * - * @var array */ protected array $views = []; /** * The namespace to file path hints. - * - * @var array */ protected array $hints = []; /** * Register a view extension with the finder. - * - * @var array */ protected static array $extensions = [ 'php', @@ -55,9 +47,6 @@ class ViewFinder implements FinderContract /** * Create a new file view loader instance. - * - * @param array $paths - * @param array $extensions */ public function __construct(array $paths, array $extensions = []) { @@ -212,10 +201,6 @@ public function reset(): void /** * Get the path to a template with a named path. - * - * @param string $name - * - * @return array */ protected function findNamedPathView(string $name): array { @@ -227,11 +212,7 @@ protected function findNamedPathView(string $name): array /** * Get the segments of a template with a named path. * - * @param string $name - * * @throws \Viserio\Contract\View\Exception\InvalidArgumentException - * - * @return array */ protected function getNamespaceSegments(string $name): array { @@ -251,12 +232,7 @@ protected function getNamespaceSegments(string $name): array /** * Find the given view in the list of paths. * - * @param string $name - * @param array $paths - * * @throws \Viserio\Contract\View\Exception\InvalidArgumentException - * - * @return array */ protected function findInPaths(string $name, array $paths): array { @@ -285,10 +261,6 @@ protected function findInPaths(string $name, array $paths): array /** * Get an array of possible view files. - * - * @param string $name - * - * @return array */ protected function getPossibleViewFiles(string $name): array { diff --git a/src/Viserio/Component/View/composer.json b/src/Viserio/Component/View/composer.json index c1df3821f..826d7e5db 100644 --- a/src/Viserio/Component/View/composer.json +++ b/src/Viserio/Component/View/composer.json @@ -37,11 +37,10 @@ "erusev/parsedown": "^1.7.3", "erusev/parsedown-extra": "^0.7.1", "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", "psr/http-server-middleware": "^1.0.0", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/container": "^1.0@dev", "viserio/http-factory": "^1.0@dev", diff --git a/src/Viserio/Component/View/phpstan.neon b/src/Viserio/Component/View/phpstan.neon index b7a453e82..84509d386 100644 --- a/src/Viserio/Component/View/phpstan.neon +++ b/src/Viserio/Component/View/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/View/phpunit.xml b/src/Viserio/Component/View/phpunit.xml new file mode 100644 index 000000000..8f860e049 --- /dev/null +++ b/src/Viserio/Component/View/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/View/phpunit.xml.dist b/src/Viserio/Component/View/phpunit.xml.dist deleted file mode 100644 index dab703990..000000000 --- a/src/Viserio/Component/View/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Component/WebServer/.gitignore b/src/Viserio/Component/WebServer/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Component/WebServer/.gitignore +++ b/src/Viserio/Component/WebServer/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Component/WebServer/Command/ServerDumpCommand.php b/src/Viserio/Component/WebServer/Command/ServerDumpCommand.php index 7c4081f91..9f1c866f8 100644 --- a/src/Viserio/Component/WebServer/Command/ServerDumpCommand.php +++ b/src/Viserio/Component/WebServer/Command/ServerDumpCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command; @@ -49,10 +49,6 @@ final class ServerDumpCommand extends AbstractCommand /** * Create a new DumpServerCommand instance. - * - * @param \Symfony\Component\VarDumper\Server\DumpServer $server - * @param \Symfony\Component\VarDumper\Dumper\CliDumper $cliDumper - * @param \Symfony\Component\VarDumper\Dumper\HtmlDumper $htmlDumper */ public function __construct(DumpServer $server, CliDumper $cliDumper, HtmlDumper $htmlDumper) { diff --git a/src/Viserio/Component/WebServer/Command/ServerLogCommand.php b/src/Viserio/Component/WebServer/Command/ServerLogCommand.php index 21d69d263..8e88e03e3 100644 --- a/src/Viserio/Component/WebServer/Command/ServerLogCommand.php +++ b/src/Viserio/Component/WebServer/Command/ServerLogCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command; @@ -104,8 +104,6 @@ public function handle(): int * Get collected logs. * * @param resource $socket - * - * @return Generator */ private function getLogs($socket): Generator { @@ -135,12 +133,6 @@ private function getLogs($socket): Generator /** * Display the record as log message. - * - * @param OutputInterface $output - * @param int $clientId - * @param array $record - * - * @return void */ private function displayLog(OutputInterface $output, int $clientId, array $record): void { diff --git a/src/Viserio/Component/WebServer/Command/ServerServeCommand.php b/src/Viserio/Component/WebServer/Command/ServerServeCommand.php index b00866e55..35d7e9af0 100644 --- a/src/Viserio/Component/WebServer/Command/ServerServeCommand.php +++ b/src/Viserio/Component/WebServer/Command/ServerServeCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command; @@ -49,9 +49,6 @@ final class ServerServeCommand extends AbstractCommand /** * Create a new ServerServeCommand Instance. - * - * @param string $documentRoot - * @param string $environment */ public function __construct(string $documentRoot, string $environment) { diff --git a/src/Viserio/Component/WebServer/Command/ServerStartCommand.php b/src/Viserio/Component/WebServer/Command/ServerStartCommand.php index 3bba98adf..6fe2862c7 100644 --- a/src/Viserio/Component/WebServer/Command/ServerStartCommand.php +++ b/src/Viserio/Component/WebServer/Command/ServerStartCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command; @@ -47,9 +47,6 @@ final class ServerStartCommand extends AbstractCommand /** * Create a new ServerStartCommand Instance. - * - * @param string $documentRoot - * @param string $environment */ public function __construct(string $documentRoot, string $environment) { diff --git a/src/Viserio/Component/WebServer/Command/ServerStatusCommand.php b/src/Viserio/Component/WebServer/Command/ServerStatusCommand.php index 8fbce8a78..42cffca01 100644 --- a/src/Viserio/Component/WebServer/Command/ServerStatusCommand.php +++ b/src/Viserio/Component/WebServer/Command/ServerStatusCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command; diff --git a/src/Viserio/Component/WebServer/Command/ServerStopCommand.php b/src/Viserio/Component/WebServer/Command/ServerStopCommand.php index 655600dbf..ad9956fd5 100644 --- a/src/Viserio/Component/WebServer/Command/ServerStopCommand.php +++ b/src/Viserio/Component/WebServer/Command/ServerStopCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command; diff --git a/src/Viserio/Component/WebServer/Command/Traits/ServerCommandRequirementsCheckTrait.php b/src/Viserio/Component/WebServer/Command/Traits/ServerCommandRequirementsCheckTrait.php index 01611cbd6..dbe620cda 100644 --- a/src/Viserio/Component/WebServer/Command/Traits/ServerCommandRequirementsCheckTrait.php +++ b/src/Viserio/Component/WebServer/Command/Traits/ServerCommandRequirementsCheckTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Command\Traits; @@ -36,8 +36,6 @@ trait ServerCommandRequirementsCheckTrait /** * Check the requirements for the command. - * - * @return int */ protected function checkRequirements(): int { diff --git a/src/Viserio/Component/WebServer/Container/Provider/WebServerServiceProvider.php b/src/Viserio/Component/WebServer/Container/Provider/WebServerServiceProvider.php index b3e64e4ad..06124267b 100644 --- a/src/Viserio/Component/WebServer/Container/Provider/WebServerServiceProvider.php +++ b/src/Viserio/Component/WebServer/Container/Provider/WebServerServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Container\Provider; diff --git a/src/Viserio/Component/WebServer/Event/DumpListenerEvent.php b/src/Viserio/Component/WebServer/Event/DumpListenerEvent.php index 77c2c97a2..ec116197b 100644 --- a/src/Viserio/Component/WebServer/Event/DumpListenerEvent.php +++ b/src/Viserio/Component/WebServer/Event/DumpListenerEvent.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Event; @@ -43,10 +43,6 @@ class DumpListenerEvent /** * Create a new DumpListenerEvent instance. - * - * @param \Symfony\Component\VarDumper\Cloner\ClonerInterface $cloner - * @param \Symfony\Component\VarDumper\Dumper\DataDumperInterface $dumper - * @param null|\Symfony\Component\VarDumper\Server\Connection $connection */ public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper, ?Connection $connection = null) { diff --git a/src/Viserio/Component/WebServer/RequestContextProvider.php b/src/Viserio/Component/WebServer/RequestContextProvider.php index 7d287a95a..b7d3513c5 100644 --- a/src/Viserio/Component/WebServer/RequestContextProvider.php +++ b/src/Viserio/Component/WebServer/RequestContextProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer; @@ -27,8 +27,6 @@ final class RequestContextProvider implements ContextProviderInterface /** * Created a RequestContextProvider instance. - * - * @param \Psr\Http\Message\ServerRequestInterface $currentRequest */ public function __construct(ServerRequestInterface $currentRequest) { diff --git a/src/Viserio/Component/WebServer/Resources/router.php b/src/Viserio/Component/WebServer/Resources/router.php index 345af794d..c26ca5243 100644 --- a/src/Viserio/Component/WebServer/Resources/router.php +++ b/src/Viserio/Component/WebServer/Resources/router.php @@ -9,16 +9,15 @@ * with this source code in the file LICENSE. */ - declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ if (\is_file($_SERVER['DOCUMENT_ROOT'] . \DIRECTORY_SEPARATOR . $_SERVER['SCRIPT_NAME'])) { diff --git a/src/Viserio/Component/WebServer/Tests/Command/ServerDumpCommandTest.php b/src/Viserio/Component/WebServer/Tests/Command/ServerDumpCommandTest.php index 71816fab1..bf58b7992 100644 --- a/src/Viserio/Component/WebServer/Tests/Command/ServerDumpCommandTest.php +++ b/src/Viserio/Component/WebServer/Tests/Command/ServerDumpCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests\Command; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ServerDumpCommandTest extends CommandTestCase { diff --git a/src/Viserio/Component/WebServer/Tests/Command/ServerStatusCommandTest.php b/src/Viserio/Component/WebServer/Tests/Command/ServerStatusCommandTest.php index d28c40ed2..d14e99b50 100644 --- a/src/Viserio/Component/WebServer/Tests/Command/ServerStatusCommandTest.php +++ b/src/Viserio/Component/WebServer/Tests/Command/ServerStatusCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests\Command; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ServerStatusCommandTest extends CommandTestCase { diff --git a/src/Viserio/Component/WebServer/Tests/Command/ServerStopCommandTest.php b/src/Viserio/Component/WebServer/Tests/Command/ServerStopCommandTest.php index 8b9d179eb..2b7d54761 100644 --- a/src/Viserio/Component/WebServer/Tests/Command/ServerStopCommandTest.php +++ b/src/Viserio/Component/WebServer/Tests/Command/ServerStopCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests\Command; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class ServerStopCommandTest extends CommandTestCase { diff --git a/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTest.php b/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTest.php index b2da714f6..47f13a92b 100644 --- a/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTest.php +++ b/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests\Container\Provider; @@ -40,6 +40,7 @@ * @internal * * @small + * @coversNothing */ final class WebServerServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTestWithoutConsoleKernelTest.php b/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTestWithoutConsoleKernelTest.php index 779b53f92..0d64544fb 100644 --- a/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTestWithoutConsoleKernelTest.php +++ b/src/Viserio/Component/WebServer/Tests/Container/Provider/WebServerServiceProviderTestWithoutConsoleKernelTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests\Container\Provider; @@ -39,6 +39,7 @@ * @internal * * @small + * @coversNothing */ final class WebServerServiceProviderTestWithoutConsoleKernelTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Component/WebServer/Tests/Event/DumpListenerEventTest.php b/src/Viserio/Component/WebServer/Tests/Event/DumpListenerEventTest.php index 459a6e999..992c2ee82 100644 --- a/src/Viserio/Component/WebServer/Tests/Event/DumpListenerEventTest.php +++ b/src/Viserio/Component/WebServer/Tests/Event/DumpListenerEventTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Event; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class DumpListenerEventTest extends TestCase { diff --git a/src/Viserio/Component/WebServer/Tests/OverwritePhpFunctions.php b/src/Viserio/Component/WebServer/Tests/OverwritePhpFunctions.php index f6a374856..7660914e1 100644 --- a/src/Viserio/Component/WebServer/Tests/OverwritePhpFunctions.php +++ b/src/Viserio/Component/WebServer/Tests/OverwritePhpFunctions.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer; diff --git a/src/Viserio/Component/WebServer/Tests/RequestContextProviderTest.php b/src/Viserio/Component/WebServer/Tests/RequestContextProviderTest.php index c30c603d9..36167e87d 100644 --- a/src/Viserio/Component/WebServer/Tests/RequestContextProviderTest.php +++ b/src/Viserio/Component/WebServer/Tests/RequestContextProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class RequestContextProviderTest extends TestCase { diff --git a/src/Viserio/Component/WebServer/Tests/StaticMemory.php b/src/Viserio/Component/WebServer/Tests/StaticMemory.php index e7a484049..6fbd5ab12 100644 --- a/src/Viserio/Component/WebServer/Tests/StaticMemory.php +++ b/src/Viserio/Component/WebServer/Tests/StaticMemory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests; diff --git a/src/Viserio/Component/WebServer/Tests/WebServerConfigTest.php b/src/Viserio/Component/WebServer/Tests/WebServerConfigTest.php index eeaa193b2..9dd3389da 100644 --- a/src/Viserio/Component/WebServer/Tests/WebServerConfigTest.php +++ b/src/Viserio/Component/WebServer/Tests/WebServerConfigTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class WebServerConfigTest extends MockeryTestCase { @@ -166,7 +167,6 @@ public function testGetPidFile(): void * @param false|string $router * @param null|string $host * @param null|int|string $port - * @param null|string $pidfile * * @return \Mockery\MockInterface|\Viserio\Component\Console\Command\AbstractCommand */ diff --git a/src/Viserio/Component/WebServer/Tests/WebServerTest.php b/src/Viserio/Component/WebServer/Tests/WebServerTest.php index d70256045..d30f815b5 100644 --- a/src/Viserio/Component/WebServer/Tests/WebServerTest.php +++ b/src/Viserio/Component/WebServer/Tests/WebServerTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer\Tests; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class WebServerTest extends MockeryTestCase { diff --git a/src/Viserio/Component/WebServer/WebServer.php b/src/Viserio/Component/WebServer/WebServer.php index 55914c413..a36f538f8 100644 --- a/src/Viserio/Component/WebServer/WebServer.php +++ b/src/Viserio/Component/WebServer/WebServer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer; @@ -34,10 +34,6 @@ private function __construct() /** * @param \Viserio\Component\WebServer\WebServerConfig $config - * @param bool $disableOutput - * @param null|callable $callback - * - * @return void */ public static function run(WebServerConfig $config, bool $disableOutput = true, ?callable $callback = null): void { @@ -75,9 +71,6 @@ public static function run(WebServerConfig $config, bool $disableOutput = true, * Starts a local web server in the background. * * @param \Viserio\Component\WebServer\WebServerConfig $config - * @param null|string $pidFile - * - * @return int */ public static function start(WebServerConfig $config, ?string $pidFile = null): int { @@ -125,10 +118,6 @@ public static function start(WebServerConfig $config, ?string $pidFile = null): /** * Stop a running web server. - * - * @param null|string $pidFile - * - * @return void */ public static function stop(?string $pidFile = null): void { @@ -144,8 +133,6 @@ public static function stop(?string $pidFile = null): void /** * Get the address from the pid file. * - * @param null|string $pidFile - * * @return bool|string */ public static function getAddress(?string $pidFile = null) @@ -161,10 +148,6 @@ public static function getAddress(?string $pidFile = null) /** * Check if a server is running. - * - * @param null|string $pidFile - * - * @return bool */ public static function isRunning(?string $pidFile = null): bool { @@ -194,8 +177,6 @@ public static function isRunning(?string $pidFile = null): bool * Create a new server command process. * * @param \Viserio\Component\WebServer\WebServerConfig $config - * - * @return \Symfony\Component\Process\Process */ private static function createServerProcess(WebServerConfig $config): Process { @@ -220,8 +201,6 @@ private static function createServerProcess(WebServerConfig $config): Process /** * Get the default pid file path. - * - * @return string */ private static function getDefaultPidFile(): string { diff --git a/src/Viserio/Component/WebServer/WebServerConfig.php b/src/Viserio/Component/WebServer/WebServerConfig.php index 3ef3799e2..c0223e7be 100644 --- a/src/Viserio/Component/WebServer/WebServerConfig.php +++ b/src/Viserio/Component/WebServer/WebServerConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Component\WebServer; @@ -34,10 +34,6 @@ final class WebServerConfig implements ProvidesDefaultConfigContract, RequiresCo /** * Create a new WebServerOptions instance. - * - * @param string $documentRoot - * @param string $environment - * @param \Viserio\Component\Console\Command\AbstractCommand $command */ public function __construct(string $documentRoot, string $environment, AbstractCommand $command) { @@ -124,8 +120,6 @@ public static function getConfigValidators(): iterable /** * Return the path to the document folder, where you can find the index.php. - * - * @return string */ public function getDocumentRoot(): string { @@ -134,8 +128,6 @@ public function getDocumentRoot(): string /** * Return the environment. - * - * @return string */ public function getEnv(): string { @@ -144,8 +136,6 @@ public function getEnv(): string /** * Returns the router file. - * - * @return string */ public function getRouter(): string { @@ -154,8 +144,6 @@ public function getRouter(): string /** * Returns the given host name or the default 127.0.0.1. - * - * @return string */ public function getHostname(): string { @@ -164,8 +152,6 @@ public function getHostname(): string /** * Returns the given port or a found free port between 8000 and 8100. - * - * @return string */ public function getPort(): string { @@ -174,8 +160,6 @@ public function getPort(): string /** * Return the full address of the hostname:port. - * - * @return string */ public function getAddress(): string { @@ -184,8 +168,6 @@ public function getAddress(): string /** * Check if xdebug should be used. - * - * @return bool */ public function hasXdebug(): bool { @@ -194,8 +176,6 @@ public function hasXdebug(): bool /** * Return a path to the pid file it it was given. - * - * @return null|string */ public function getPidFile(): ?string { @@ -204,8 +184,6 @@ public function getPidFile(): ?string /** * Contains resolved hostname if available. - * - * @return null|string */ public function getDisplayAddress(): ?string { @@ -223,12 +201,7 @@ public function getDisplayAddress(): ?string /** * Finds the front controller in root path. * - * @param string $documentRoot - * @param string $env - * * @throws \Viserio\Contract\WebServer\Exception\InvalidArgumentException - * - * @return string */ private static function findFrontController(string $documentRoot, string $env): string { @@ -246,11 +219,7 @@ private static function findFrontController(string $documentRoot, string $env): /** * Finds a host and port. * - * @param array $config - * * @throws \Viserio\Contract\WebServer\Exception\InvalidArgumentException - * - * @return array */ private static function findHostnameAndPort(array $config): array { @@ -274,10 +243,6 @@ private static function findHostnameAndPort(array $config): array /** * Searching for the port between 8000 and 8100. - * - * @param string $host - * - * @return string */ private static function findBestPort(string $host): string { diff --git a/src/Viserio/Component/WebServer/composer.json b/src/Viserio/Component/WebServer/composer.json index 35536b02f..c3b929b50 100644 --- a/src/Viserio/Component/WebServer/composer.json +++ b/src/Viserio/Component/WebServer/composer.json @@ -37,11 +37,10 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", "psr/http-message": "^1.0.0", - "slam/phpstan-extensions": "^4.0.0", "symfony/var-dumper": "^4.3.8 || ^5.0.0", "viserio/container": "^1.0@dev", "viserio/events": "^1.0@dev", diff --git a/src/Viserio/Component/WebServer/phpstan.neon b/src/Viserio/Component/WebServer/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Component/WebServer/phpstan.neon +++ b/src/Viserio/Component/WebServer/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Component/WebServer/phpunit.xml b/src/Viserio/Component/WebServer/phpunit.xml new file mode 100644 index 000000000..b1f21d56c --- /dev/null +++ b/src/Viserio/Component/WebServer/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Component/WebServer/phpunit.xml.dist b/src/Viserio/Component/WebServer/phpunit.xml.dist deleted file mode 100644 index 23aaf31ec..000000000 --- a/src/Viserio/Component/WebServer/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Contract/.gitignore b/src/Viserio/Contract/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Contract/.gitignore +++ b/src/Viserio/Contract/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Contract/Bus/Dispatcher.php b/src/Viserio/Contract/Bus/Dispatcher.php index 0052baf2d..95d4cc56e 100644 --- a/src/Viserio/Contract/Bus/Dispatcher.php +++ b/src/Viserio/Contract/Bus/Dispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Bus; @@ -19,74 +19,41 @@ interface Dispatcher { /** * Set the method to call on the command. - * - * @param string $method - * - * @return self */ public function via(string $method): self; /** * Get the handler instance for the given command. - * - * @param mixed $command - * - * @return object */ public function resolveHandler($command): object; /** * Get the handler class for the given command. - * - * @param mixed $command - * - * @return string */ public function getHandlerClass($command): string; /** * Get the handler method for the given command. - * - * @param mixed $command - * - * @return string */ public function getHandlerMethod($command): string; /** * Register command to handler mappings. - * - * @param array $commands - * - * @return void */ public function maps(array $commands): void; /** * Register a fallback mapper callback. - * - * @param Closure $mapper - * - * @return void */ public function mapUsing(Closure $mapper): void; /** * Dispatch a command to its appropriate handler. - * - * @param mixed $command - * @param null|Closure $afterResolving - * - * @return mixed */ public function dispatch($command, ?Closure $afterResolving = null); /** * Set the pipes through which commands should be piped before dispatching. - * - * @param array $pipes - * - * @return self */ public function pipeThrough(array $pipes): self; } diff --git a/src/Viserio/Contract/Bus/Exception/Exception.php b/src/Viserio/Contract/Bus/Exception/Exception.php index 5a543feec..23f3e72f5 100644 --- a/src/Viserio/Contract/Bus/Exception/Exception.php +++ b/src/Viserio/Contract/Bus/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Bus\Exception; diff --git a/src/Viserio/Contract/Bus/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Bus/Exception/InvalidArgumentException.php index b47120fc9..78d3b98e2 100644 --- a/src/Viserio/Contract/Bus/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Bus/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Bus\Exception; diff --git a/src/Viserio/Contract/Bus/Exception/RuntimeException.php b/src/Viserio/Contract/Bus/Exception/RuntimeException.php index 483adb97b..c6fe62b14 100644 --- a/src/Viserio/Contract/Bus/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Bus/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Bus\Exception; diff --git a/src/Viserio/Contract/Bus/QueueingDispatcher.php b/src/Viserio/Contract/Bus/QueueingDispatcher.php index eb58d8f8e..ae91bdd51 100644 --- a/src/Viserio/Contract/Bus/QueueingDispatcher.php +++ b/src/Viserio/Contract/Bus/QueueingDispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Bus; @@ -20,22 +20,13 @@ interface QueueingDispatcher { /** * Dispatch a command to its appropriate handler. - * - * @param mixed $command - * @param null|Closure $afterResolving - * - * @return mixed */ public function dispatch($command, ?Closure $afterResolving = null); /** * Dispatch a command to its appropriate handler behind a queue. * - * @param mixed $command - * * @throws RuntimeException - * - * @return mixed */ public function dispatchToQueue($command); } diff --git a/src/Viserio/Contract/Cache/Manager.php b/src/Viserio/Contract/Cache/Manager.php index b53587a0b..0dc947786 100644 --- a/src/Viserio/Contract/Cache/Manager.php +++ b/src/Viserio/Contract/Cache/Manager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cache; diff --git a/src/Viserio/Contract/Cache/Traits/CacheItemPoolAwareTrait.php b/src/Viserio/Contract/Cache/Traits/CacheItemPoolAwareTrait.php index a506b27f1..3e108d681 100644 --- a/src/Viserio/Contract/Cache/Traits/CacheItemPoolAwareTrait.php +++ b/src/Viserio/Contract/Cache/Traits/CacheItemPoolAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cache\Traits; @@ -27,8 +27,6 @@ trait CacheItemPoolAwareTrait /** * Set a CacheItemPool. * - * @param \Psr\Cache\CacheItemPoolInterface $cachePool - * * @return static */ public function setCacheItemPool(CacheItemPoolInterface $cachePool): self diff --git a/src/Viserio/Contract/Cache/Traits/CacheManagerAwareTrait.php b/src/Viserio/Contract/Cache/Traits/CacheManagerAwareTrait.php index 299b01e6c..d8375cf73 100644 --- a/src/Viserio/Contract/Cache/Traits/CacheManagerAwareTrait.php +++ b/src/Viserio/Contract/Cache/Traits/CacheManagerAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cache\Traits; @@ -27,8 +27,6 @@ trait CacheManagerAwareTrait /** * Set a Cache Manager. * - * @param \Viserio\Contract\Cache\Manager $cacheManager - * * @return static */ public function setCacheManager(Manager $cacheManager): self diff --git a/src/Viserio/Contract/Config/DeprecatedConfig.php b/src/Viserio/Contract/Config/DeprecatedConfig.php index 481679e9e..4e96403e3 100644 --- a/src/Viserio/Contract/Config/DeprecatedConfig.php +++ b/src/Viserio/Contract/Config/DeprecatedConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/Exception/DimensionNotFoundException.php b/src/Viserio/Contract/Config/Exception/DimensionNotFoundException.php index efb4c4d48..05faf6308 100644 --- a/src/Viserio/Contract/Config/Exception/DimensionNotFoundException.php +++ b/src/Viserio/Contract/Config/Exception/DimensionNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; @@ -24,11 +24,7 @@ class DimensionNotFoundException extends OutOfBoundsException implements Excepti /** * Create a new DimensionNotFoundException instance. * - * @param string $class - * @param string $currentDimension Current configuration key - * @param null|string $id - * @param int $code - * @param null|Throwable $previous + * @param string $currentDimension Current configuration key */ public function __construct( string $class, diff --git a/src/Viserio/Contract/Config/Exception/Exception.php b/src/Viserio/Contract/Config/Exception/Exception.php index e023bc3da..59d82b812 100644 --- a/src/Viserio/Contract/Config/Exception/Exception.php +++ b/src/Viserio/Contract/Config/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; diff --git a/src/Viserio/Contract/Config/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Config/Exception/InvalidArgumentException.php index f2b3143d0..1278933ed 100644 --- a/src/Viserio/Contract/Config/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Config/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; @@ -24,8 +24,6 @@ class InvalidArgumentException extends BaseInvalidArgumentException implements E * @param mixed $provided the provided value * @param array $expected the expected value type * @param string $configClass - * - * @return self */ public static function invalidType(string $name, $provided, array $expected, $configClass): self { diff --git a/src/Viserio/Contract/Config/Exception/InvalidValidatorException.php b/src/Viserio/Contract/Config/Exception/InvalidValidatorException.php index 1f9434055..6a861a88f 100644 --- a/src/Viserio/Contract/Config/Exception/InvalidValidatorException.php +++ b/src/Viserio/Contract/Config/Exception/InvalidValidatorException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; diff --git a/src/Viserio/Contract/Config/Exception/LogicException.php b/src/Viserio/Contract/Config/Exception/LogicException.php index 0babab960..31505f093 100644 --- a/src/Viserio/Contract/Config/Exception/LogicException.php +++ b/src/Viserio/Contract/Config/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; diff --git a/src/Viserio/Contract/Config/Exception/MandatoryConfigNotFoundException.php b/src/Viserio/Contract/Config/Exception/MandatoryConfigNotFoundException.php index 35dd58da2..a6af82500 100644 --- a/src/Viserio/Contract/Config/Exception/MandatoryConfigNotFoundException.php +++ b/src/Viserio/Contract/Config/Exception/MandatoryConfigNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; @@ -20,11 +20,6 @@ class MandatoryConfigNotFoundException extends OutOfBoundsException implements E { /** * Create a new MandatoryOptionNotFound exception. - * - * @param iterable $dimensions - * @param string $option - * @param int $code - * @param null|Throwable $previous */ public function __construct(iterable $dimensions, string $option, int $code = 0, ?Throwable $previous = null) { diff --git a/src/Viserio/Contract/Config/Exception/RuntimeException.php b/src/Viserio/Contract/Config/Exception/RuntimeException.php index 68d615b98..47fd0a8c1 100644 --- a/src/Viserio/Contract/Config/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Config/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; diff --git a/src/Viserio/Contract/Config/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Config/Exception/UnexpectedValueException.php index b8f9779b4..9db97d1ef 100644 --- a/src/Viserio/Contract/Config/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Config/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config\Exception; @@ -21,10 +21,7 @@ class UnexpectedValueException extends BaseUnexpectedValueException implements E /** * Create a new UnexpectedValue exception. * - * @param iterable $dimensions - * @param mixed $currentDimension Current configuration key - * @param int $code - * @param null|Throwable $previous + * @param mixed $currentDimension Current configuration key */ public function __construct( iterable $dimensions, diff --git a/src/Viserio/Contract/Config/ProvidesConfigComment.php b/src/Viserio/Contract/Config/ProvidesConfigComment.php index 4239f6527..19cbc17da 100644 --- a/src/Viserio/Contract/Config/ProvidesConfigComment.php +++ b/src/Viserio/Contract/Config/ProvidesConfigComment.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/ProvidesDefaultConfig.php b/src/Viserio/Contract/Config/ProvidesDefaultConfig.php index ace570682..aa816c61a 100644 --- a/src/Viserio/Contract/Config/ProvidesDefaultConfig.php +++ b/src/Viserio/Contract/Config/ProvidesDefaultConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/RequiresComponentConfig.php b/src/Viserio/Contract/Config/RequiresComponentConfig.php index 47e3c6479..044c51dc6 100644 --- a/src/Viserio/Contract/Config/RequiresComponentConfig.php +++ b/src/Viserio/Contract/Config/RequiresComponentConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/RequiresComponentConfigId.php b/src/Viserio/Contract/Config/RequiresComponentConfigId.php index 64e53a1b3..d5a45caaa 100644 --- a/src/Viserio/Contract/Config/RequiresComponentConfigId.php +++ b/src/Viserio/Contract/Config/RequiresComponentConfigId.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/RequiresConfig.php b/src/Viserio/Contract/Config/RequiresConfig.php index 4b3fc2d75..7d149a0cb 100644 --- a/src/Viserio/Contract/Config/RequiresConfig.php +++ b/src/Viserio/Contract/Config/RequiresConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/RequiresConfigId.php b/src/Viserio/Contract/Config/RequiresConfigId.php index ce32462bc..05781297d 100644 --- a/src/Viserio/Contract/Config/RequiresConfigId.php +++ b/src/Viserio/Contract/Config/RequiresConfigId.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/RequiresMandatoryConfig.php b/src/Viserio/Contract/Config/RequiresMandatoryConfig.php index daba104c2..016bd1274 100644 --- a/src/Viserio/Contract/Config/RequiresMandatoryConfig.php +++ b/src/Viserio/Contract/Config/RequiresMandatoryConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Config/RequiresValidatedConfig.php b/src/Viserio/Contract/Config/RequiresValidatedConfig.php index e45f62dfe..6718d5473 100644 --- a/src/Viserio/Contract/Config/RequiresValidatedConfig.php +++ b/src/Viserio/Contract/Config/RequiresValidatedConfig.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Config; diff --git a/src/Viserio/Contract/Console/Exception/Exception.php b/src/Viserio/Contract/Console/Exception/Exception.php index 2b7620f27..5b2ee7eda 100644 --- a/src/Viserio/Contract/Console/Exception/Exception.php +++ b/src/Viserio/Contract/Console/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console\Exception; diff --git a/src/Viserio/Contract/Console/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Console/Exception/InvalidArgumentException.php index 5176abec8..ba5bfa1f2 100644 --- a/src/Viserio/Contract/Console/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Console/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console\Exception; diff --git a/src/Viserio/Contract/Console/Exception/InvalidCommandExpression.php b/src/Viserio/Contract/Console/Exception/InvalidCommandExpression.php index b8224e66b..e5c9a59f3 100644 --- a/src/Viserio/Contract/Console/Exception/InvalidCommandExpression.php +++ b/src/Viserio/Contract/Console/Exception/InvalidCommandExpression.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console\Exception; diff --git a/src/Viserio/Contract/Console/Exception/InvocationException.php b/src/Viserio/Contract/Console/Exception/InvocationException.php index 8516a30a5..eb9b0c231 100644 --- a/src/Viserio/Contract/Console/Exception/InvocationException.php +++ b/src/Viserio/Contract/Console/Exception/InvocationException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console\Exception; diff --git a/src/Viserio/Contract/Console/Exception/LogicException.php b/src/Viserio/Contract/Console/Exception/LogicException.php index b5de1b6aa..9e6e59564 100644 --- a/src/Viserio/Contract/Console/Exception/LogicException.php +++ b/src/Viserio/Contract/Console/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console\Exception; diff --git a/src/Viserio/Contract/Console/Kernel.php b/src/Viserio/Contract/Console/Kernel.php index cea3d996b..fed7ecbc2 100644 --- a/src/Viserio/Contract/Console/Kernel.php +++ b/src/Viserio/Contract/Console/Kernel.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console; @@ -21,18 +21,11 @@ interface Kernel extends BaseKernel { /** * Handle an incoming console command. - * - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param null|\Symfony\Component\Console\Output\OutputInterface $output - * - * @return int */ public function handle(InputInterface $input, ?OutputInterface $output = null): int; /** * Get all of the commands registered with the console. - * - * @return array */ public function getAll(): array; } diff --git a/src/Viserio/Contract/Console/Terminable.php b/src/Viserio/Contract/Console/Terminable.php index 98778b6f4..20c56e1f1 100644 --- a/src/Viserio/Contract/Console/Terminable.php +++ b/src/Viserio/Contract/Console/Terminable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Console; @@ -19,11 +19,6 @@ interface Terminable { /** * Terminate the application. - * - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param int $status - * - * @return void */ public function terminate(InputInterface $input, int $status): void; } diff --git a/src/Viserio/Contract/Container/Argument/Argument.php b/src/Viserio/Contract/Container/Argument/Argument.php index 4357e0689..96f1468c2 100644 --- a/src/Viserio/Contract/Container/Argument/Argument.php +++ b/src/Viserio/Contract/Container/Argument/Argument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Argument; @@ -26,8 +26,6 @@ public function getValue(): array; * The service references to put in the set. * * @param \Viserio\Contract\Container\Definition\ReferenceDefinition[] $values - * - * @return void */ public function setValue(array $values): void; } diff --git a/src/Viserio/Contract/Container/Argument/ConditionArgument.php b/src/Viserio/Contract/Container/Argument/ConditionArgument.php index eb99ed3a7..5b97271ca 100644 --- a/src/Viserio/Contract/Container/Argument/ConditionArgument.php +++ b/src/Viserio/Contract/Container/Argument/ConditionArgument.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Argument; diff --git a/src/Viserio/Contract/Container/CompiledContainer.php b/src/Viserio/Contract/Container/CompiledContainer.php index ac7ac737c..b2262b276 100644 --- a/src/Viserio/Contract/Container/CompiledContainer.php +++ b/src/Viserio/Contract/Container/CompiledContainer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; diff --git a/src/Viserio/Contract/Container/ContainerBuilder.php b/src/Viserio/Contract/Container/ContainerBuilder.php index 1ad22dc57..31020a288 100644 --- a/src/Viserio/Contract/Container/ContainerBuilder.php +++ b/src/Viserio/Contract/Container/ContainerBuilder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -45,10 +45,6 @@ public function getDefinitions(): array; /** * Overwrite the parameters. - * - * @param array $parameters - * - * @return void */ public function setParameters(array $parameters): void; @@ -70,18 +66,13 @@ public function addDefinitions(array $definitions): void; * Sets the service definitions. * * @param \Viserio\Contract\Container\Definition\Definition[] $definitions An array of service definitions - * - * @return void */ public function setDefinitions(array $definitions): void; /** * Set a definition. * - * @param string $id * @param ClosureDefinitionContract|DefinitionContract|FactoryDefinitionContract|ObjectDefinitionContract|UndefinedDefinitionContract $definition - * - * @return void */ public function setDefinition(string $id, DefinitionContract $definition): void; @@ -90,8 +81,6 @@ public function setDefinition(string $id, DefinitionContract $definition): void; * * The method "unaliases" recursively to return a Definition instance. * - * @param string $id - * *@throws \Viserio\Contract\Container\Exception\NotFoundException if the service definition does not exist * @throws \Viserio\Contract\Container\Exception\CircularDependencyException * @@ -102,8 +91,6 @@ public function findDefinition(string $id): DefinitionContract; /** * Get definition from identifier. * - * @param string $id - * *@throws \Viserio\Contract\Container\Exception\NotFoundException if the service definition does not exist * * @return ClosureDefinitionContract|DefinitionContract|FactoryDefinitionContract|ObjectDefinitionContract|UndefinedDefinitionContract @@ -114,17 +101,11 @@ public function getDefinition(string $id): DefinitionContract; * Removes a service definition from the container. * * @param string $id The service identifier - * - * @return void */ public function removeDefinition(string $id): void; /** * Get parameter from identifier. - * - * @param string $id - * - * @return \Viserio\Contract\Container\Definition\Definition */ public function getParameter(string $id): DefinitionContract; @@ -133,8 +114,6 @@ public function getParameter(string $id): DefinitionContract; * Returns false otherwise. * * @param string $id identifier of the parameter to look for - * - * @return bool */ public function hasParameter(string $id): bool; @@ -143,39 +122,25 @@ public function hasParameter(string $id): bool; * Returns false otherwise. * * @param string $id identifier of the entry to look for - * - * @return bool */ public function hasDefinition(string $id): bool; /** * Check if the container is compiled. - * - * @return bool */ public function isCompiled(): bool; /** * Get the reflection object for the object or class name. * - * @param string $class - * @param bool $throw - * * @throws ReflectionException - * - * @return null|ReflectionClass */ public function getClassReflector(string $class, bool $throw = true): ?ReflectionClass; /** * Get the reflection object for a method. * - * @param ReflectionClass $classReflector - * @param string $method - * * @throws \Viserio\Contract\Container\Exception\BindingResolutionException - * - * @return ReflectionFunctionAbstract */ public function getMethodReflector(ReflectionClass $classReflector, string $method): ReflectionFunctionAbstract; @@ -185,30 +150,20 @@ public function getMethodReflector(ReflectionClass $classReflector, string $meth * @param Closure|string $function * * @throws \Viserio\Contract\Container\Exception\BindingResolutionException - * - * @return ReflectionFunction */ public function getFunctionReflector($function): ReflectionFunction; /** * Log pipeline processes. - * - * @param \Viserio\Contract\Container\Pipe $pass - * @param string $message - * - * @return void */ public function log(PipeContract $pass, string $message): void; /** * Registers a service provider. * - * @param object $provider - * @param array $parameters An array of values that customizes the provider + * @param array $parameters An array of values that customizes the provider * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException if object is missing service interfaces - * - * @return void */ public function register(object $provider, array $parameters = []): void; @@ -221,20 +176,11 @@ public function getAliases(): array; /** * Overwrite the aliases. - * - * @param array $aliases - * - * @return void */ public function setAliases(array $aliases): void; /** * Alias a type to a different name. - * - * @param string $original - * @param string $alias - * - * @return \Viserio\Contract\Container\Definition\AliasDefinition */ public function setAlias(string $original, string $alias): AliasDefinitionContract; @@ -242,56 +188,33 @@ public function setAlias(string $original, string $alias): AliasDefinitionContra * Removes an alias. * * @param string $alias The alias to remove - * - * @return void */ public function removeAlias(string $alias): void; /** * Returns true if an alias exists under the given identifier. - * - * @param string $id - * - * @return bool */ public function hasAlias(string $id): bool; /** * Returns a found alias or the given id. * - * @param string $id - * * @throws \Viserio\Contract\Container\Exception\NotFoundException if the alias does not exist - * - * @return \Viserio\Contract\Container\Definition\AliasDefinition */ public function getAlias(string $id): AliasDefinitionContract; /** * "Extend" an abstract type in the container. - * - * @param string $abstract - * @param Closure $closure - * - * @return void */ public function extend(string $abstract, Closure $closure): void; /** * Get the extender callbacks for a given type. - * - * @param string $abstract - * - * @return array */ public function getExtenders(string $abstract): array; /** * Remove all of the extender callbacks for a given type. - * - * @param string $abstract - * - * @return void */ public function removeExtenders(string $abstract): void; @@ -299,8 +222,6 @@ public function removeExtenders(string $abstract): void; * Returns all removed ids. * * @internal - * - * @return array */ public function getRemovedIds(): array; } diff --git a/src/Viserio/Contract/Container/Definition/AliasDefinition.php b/src/Viserio/Contract/Container/Definition/AliasDefinition.php index 45933f30a..42b38041e 100644 --- a/src/Viserio/Contract/Container/Definition/AliasDefinition.php +++ b/src/Viserio/Contract/Container/Definition/AliasDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -17,55 +17,37 @@ interface AliasDefinition extends DeprecatedDefinition { /** * Get the definition hash. - * - * @return string */ public function getHash(): string; /** * Get the definition name. - * - * @return string */ public function getName(): string; /** * Set the definition name. - * - * @param string $original - * - * @return void */ public function setName(string $original): void; /** * Check if the alias is public. - * - * @return bool */ public function isPublic(): bool; /** * Set the alias name. - * - * @param string $name - * - * @return void */ public function setAlias(string $name): void; /** * Get the alias name. - * - * @return string */ public function getAlias(): string; /** * Set the alias public. * - * @param bool $bool - * * @return static */ public function setPublic(bool $bool); diff --git a/src/Viserio/Contract/Container/Definition/ArgumentAwareDefinition.php b/src/Viserio/Contract/Container/Definition/ArgumentAwareDefinition.php index 242a4a515..92b43fdad 100644 --- a/src/Viserio/Contract/Container/Definition/ArgumentAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/ArgumentAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -20,8 +20,6 @@ interface ArgumentAwareDefinition /** * Set a list of arguments. * - * @param array $arguments - * * @return static */ public function setArguments(array $arguments); @@ -39,7 +37,6 @@ public function addArgument($argument); * Sets a specific argument. * * @param int|string $key - * @param mixed $value * * @return static */ @@ -49,15 +46,11 @@ public function setArgument($key, $value); * Gets an argument from key. * * @param int|string $index - * - * @return mixed */ public function getArgument($index); /** * Returns the list of arguments to pass when calling the method. - * - * @return array */ public function getArguments(): array; @@ -65,7 +58,6 @@ public function getArguments(): array; * Replaces a specific argument. * * @param int|string $index - * @param mixed $argument * * @throws OutOfBoundsException When the replaced argument does not exist * diff --git a/src/Viserio/Contract/Container/Definition/AutowiredAwareDefinition.php b/src/Viserio/Contract/Container/Definition/AutowiredAwareDefinition.php index 623ca57c8..becc06239 100644 --- a/src/Viserio/Contract/Container/Definition/AutowiredAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/AutowiredAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -17,16 +17,12 @@ interface AutowiredAwareDefinition { /** * Is the definition autowired? - * - * @return bool */ public function isAutowired(): bool; /** * Enables/disables autowiring. * - * @param bool $autowired - * * @return static */ public function setAutowired(bool $autowired); diff --git a/src/Viserio/Contract/Container/Definition/ChangeAwareDefinition.php b/src/Viserio/Contract/Container/Definition/ChangeAwareDefinition.php index 86abde0ca..eaa4270cd 100644 --- a/src/Viserio/Contract/Container/Definition/ChangeAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/ChangeAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -34,19 +34,12 @@ public function setChanges(array $changes); /** * Set or overwrite a tracked change. * - * @param string $key - * @param bool $changed - * * @return self */ public function setChange(string $key, bool $changed); /** * Get a tracked change. - * - * @param string $key - * - * @return bool */ public function getChange(string $key): bool; } diff --git a/src/Viserio/Contract/Container/Definition/ClosureDefinition.php b/src/Viserio/Contract/Container/Definition/ClosureDefinition.php index 3746fb4a3..cc9cacf00 100644 --- a/src/Viserio/Contract/Container/Definition/ClosureDefinition.php +++ b/src/Viserio/Contract/Container/Definition/ClosureDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -21,16 +21,12 @@ interface ClosureDefinition extends ArgumentAwareDefinition, AutowiredAwareDefin /** * Set closure to be executed after call. * - * @param bool $bool - * * @return static */ public function setExecutable(bool $bool); /** * Check if the closure is executable. - * - * @return bool */ public function isExecutable(): bool; } diff --git a/src/Viserio/Contract/Container/Definition/DecoratorAwareDefinition.php b/src/Viserio/Contract/Container/Definition/DecoratorAwareDefinition.php index 4c91e98ea..b0c122466 100644 --- a/src/Viserio/Contract/Container/Definition/DecoratorAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/DecoratorAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -38,8 +38,6 @@ public function decorate( /** * Remove decorator from definition. - * - * @return void */ public function removeDecorator(): void; diff --git a/src/Viserio/Contract/Container/Definition/Definition.php b/src/Viserio/Contract/Container/Definition/Definition.php index ecde7694f..58b4f2053 100644 --- a/src/Viserio/Contract/Container/Definition/Definition.php +++ b/src/Viserio/Contract/Container/Definition/Definition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -28,31 +28,23 @@ interface Definition extends ChangeAwareDefinition, DeprecatedDefinition /** * Get the definition hash. - * - * @return string */ public function getHash(): string; /** * Set the binding name. * - * @param string $id - * * @return static */ public function setName(string $id); /** * Get the binding name. - * - * @return string */ public function getName(): string; /** * Check if the binding is lazy. - * - * @return bool */ public function isLazy(): bool; @@ -60,23 +52,17 @@ public function isLazy(): bool; * Check if the binding is public. * * - synthetic services are always public. - * - * @return bool */ public function isPublic(): bool; /** * Check if the binding is shared. - * - * @return bool */ public function isShared(): bool; /** * Set the binding lazy. * - * @param bool $bool - * * @return static */ public function setLazy(bool $bool); @@ -84,24 +70,18 @@ public function setLazy(bool $bool); /** * Set the binding public. * - * @param bool $bool - * * @return static */ public function setPublic(bool $bool); /** * Get the service value. - * - * @return mixed */ public function getValue(); /** * Set a new value for the definition. * - * @param mixed $value - * * @return static */ public function setValue($value); @@ -109,8 +89,6 @@ public function setValue($value); /** * Whether this definition is synthetic, that is not constructed by the * container, but dynamically injected. - * - * @return bool */ public function isSynthetic(): bool; @@ -118,8 +96,6 @@ public function isSynthetic(): bool; * Sets whether this definition is synthetic, that is not constructed by the * container, but dynamically injected. * - * @param bool $boolean - * * @return static */ public function setSynthetic(bool $boolean); @@ -141,25 +117,17 @@ public function getConditions(): array; public function setConditions(array $conditions); /** - * @param \Viserio\Contract\Container\Argument\ConditionArgument $condition - * * @return static */ public function addCondition(ConditionArgument $condition); /** * Get type of definition. - * - * @return int */ public function getType(): int; /** * Set type of definition. - * - * @param int $type - * - * @return void */ public function setType(int $type): void; } diff --git a/src/Viserio/Contract/Container/Definition/DeprecatedDefinition.php b/src/Viserio/Contract/Container/Definition/DeprecatedDefinition.php index 5a3fd9be7..97576f462 100644 --- a/src/Viserio/Contract/Container/Definition/DeprecatedDefinition.php +++ b/src/Viserio/Contract/Container/Definition/DeprecatedDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -19,7 +19,6 @@ interface DeprecatedDefinition * Whether this definition is deprecated, that means it should not be called * anymore. * - * @param bool $status * @param string $template Template message to use if the definition is deprecated * * @throws \Viserio\Contract\Container\Exception\InvalidArgumentException when the message template is invalid @@ -30,16 +29,12 @@ public function setDeprecated(bool $status = true, ?string $template = null); /** * Message to use if this definition is deprecated. - * - * @return string */ public function getDeprecationMessage(): string; /** * Whether this definition is deprecated, that means it should not be called * anymore. - * - * @return bool */ public function isDeprecated(): bool; } diff --git a/src/Viserio/Contract/Container/Definition/FactoryDefinition.php b/src/Viserio/Contract/Container/Definition/FactoryDefinition.php index 76699f82e..35aa20261 100644 --- a/src/Viserio/Contract/Container/Definition/FactoryDefinition.php +++ b/src/Viserio/Contract/Container/Definition/FactoryDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -19,8 +19,6 @@ interface FactoryDefinition extends ArgumentAwareDefinition, AutowiredAwareDefin { /** * Get the class of this definition. - * - * @return string */ public function getClass(): string; @@ -35,7 +33,6 @@ public function setClass($class): void; * Sets a specific argument. * * @param int|string $key - * @param mixed $value * * @return static */ @@ -45,15 +42,11 @@ public function setClassArgument($key, $value); * Gets an class parameter from key. * * @param int|string $index - * - * @return mixed */ public function getClassArgument($index); /** * Get the factory method. - * - * @return string */ public function getMethod(): string; @@ -61,7 +54,6 @@ public function getMethod(): string; * Replaces a specific class parameter. * * @param int|string $index - * @param mixed $parameter * * @throws OutOfBoundsException When the replaced argument does not exist * @@ -71,48 +63,36 @@ public function replaceClassArgument($index, $parameter); /** * Returns a list of class parameters. - * - * @return array */ public function getClassArguments(): array; /** * Set a list of class parameters. * - * @param array $arguments - * * @return static */ public function setClassArguments(array $arguments); /** * Check if the method is static. - * - * @return bool */ public function isStatic(): bool; /** * Set true if the method is static or false if not. * - * @param bool $static - * * @return static */ public function setStatic(bool $static); /** * Get the method return type. - * - * @return null|string */ public function getReturnType(): ?string; /** * Set the method return type. * - * @param string $type - * * @return static */ public function setReturnType(string $type); diff --git a/src/Viserio/Contract/Container/Definition/IteratorDefinition.php b/src/Viserio/Contract/Container/Definition/IteratorDefinition.php index 6db083247..67d4a7c13 100644 --- a/src/Viserio/Contract/Container/Definition/IteratorDefinition.php +++ b/src/Viserio/Contract/Container/Definition/IteratorDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -17,8 +17,6 @@ interface IteratorDefinition extends Definition { /** * Returns the argument. - * - * @return null|array */ public function getArgument(): ?array; diff --git a/src/Viserio/Contract/Container/Definition/MethodCallsAwareDefinition.php b/src/Viserio/Contract/Container/Definition/MethodCallsAwareDefinition.php index e1b77afc0..ac1563924 100644 --- a/src/Viserio/Contract/Container/Definition/MethodCallsAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/MethodCallsAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -17,16 +17,12 @@ interface MethodCallsAwareDefinition { /** * Gets the methods to call after service initialization. - * - * @return array */ public function getMethodCalls(): array; /** * Sets the methods to call after service initialization. * - * @param array $calls - * * @return static */ public function setMethodCalls(array $calls = []); @@ -57,8 +53,6 @@ public function removeMethodCall(string $method); * Check if the current definition has a given method to call after service initialization. * * @param string $method The method name to search for - * - * @return bool */ public function hasMethodCall($method): bool; } diff --git a/src/Viserio/Contract/Container/Definition/ObjectDefinition.php b/src/Viserio/Contract/Container/Definition/ObjectDefinition.php index 4c3491ec1..6f1a3a44a 100644 --- a/src/Viserio/Contract/Container/Definition/ObjectDefinition.php +++ b/src/Viserio/Contract/Container/Definition/ObjectDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -17,8 +17,6 @@ interface ObjectDefinition extends ArgumentAwareDefinition, AutowiredAwareDefini { /** * Get the class of this definition. - * - * @return string */ public function getClass(): string; diff --git a/src/Viserio/Contract/Container/Definition/PropertiesAwareDefinition.php b/src/Viserio/Contract/Container/Definition/PropertiesAwareDefinition.php index 93dcaad14..950cc24bc 100644 --- a/src/Viserio/Contract/Container/Definition/PropertiesAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/PropertiesAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -25,8 +25,6 @@ public function getProperties(): array; /** * Sets the properties to define when creating the service. * - * @param array $properties - * * @return static */ public function setProperties(array $properties); @@ -34,10 +32,6 @@ public function setProperties(array $properties); /** * Sets a specific property. * - * @param string $key - * @param mixed $value - * @param bool $static - * * @return static */ public function setProperty(string $key, $value, bool $static = false); diff --git a/src/Viserio/Contract/Container/Definition/ReferenceDefinition.php b/src/Viserio/Contract/Container/Definition/ReferenceDefinition.php index 55398ea26..32b22ef19 100644 --- a/src/Viserio/Contract/Container/Definition/ReferenceDefinition.php +++ b/src/Viserio/Contract/Container/Definition/ReferenceDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -34,47 +34,35 @@ public function getName(): ?string; /** * Get the PHP type of the identified service. - * - * @return null|string */ public function getType(): ?string; /** * Set the PHP type of the identified service. * - * @param string $type - * * @return static */ public function setType(string $type): self; /** * Returns the behavior to be used when the service does not exist. - * - * @return int */ public function getBehavior(): int; /** * Get the definition hash. - * - * @return string */ public function getHash(): string; /** * Return a variable name of this reference. * - * @param string $parameterName - * * @return static */ public function setVariableName(string $parameterName): self; /** * Return a variable name of this reference. - * - * @return null|string */ public function getVariableName(): ?string; } diff --git a/src/Viserio/Contract/Container/Definition/TagAwareDefinition.php b/src/Viserio/Contract/Container/Definition/TagAwareDefinition.php index d06e1db1a..3cd33ef03 100644 --- a/src/Viserio/Contract/Container/Definition/TagAwareDefinition.php +++ b/src/Viserio/Contract/Container/Definition/TagAwareDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; @@ -25,8 +25,6 @@ public function getTags(): array; /** * Sets tags for this definition. * - * @param array $tags - * * @return static */ public function setTags(array $tags); @@ -52,10 +50,6 @@ public function addTag(string $name, array $attributes = []); /** * Whether this definition has a tag with the given name. - * - * @param string $name - * - * @return bool */ public function hasTag(string $name): bool; diff --git a/src/Viserio/Contract/Container/Definition/UndefinedDefinition.php b/src/Viserio/Contract/Container/Definition/UndefinedDefinition.php index ea62bd935..c4ce06529 100644 --- a/src/Viserio/Contract/Container/Definition/UndefinedDefinition.php +++ b/src/Viserio/Contract/Container/Definition/UndefinedDefinition.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Definition; diff --git a/src/Viserio/Contract/Container/DelegateAwareContainer.php b/src/Viserio/Contract/Container/DelegateAwareContainer.php index 6c056e71a..56bef2c12 100644 --- a/src/Viserio/Contract/Container/DelegateAwareContainer.php +++ b/src/Viserio/Contract/Container/DelegateAwareContainer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -18,8 +18,6 @@ interface DelegateAwareContainer { /** - * @param array $delegates - * * @return static */ public function setDelegates(array $delegates); @@ -28,18 +26,12 @@ public function setDelegates(array $delegates); * Delegate a backup container to be checked for services if it * cannot be resolved via this container. * - * @param \Psr\Container\ContainerInterface $container - * * @return static */ public function delegate(ContainerInterface $container); /** * Returns true if service is registered in one of the delegated backup containers. - * - * @param string $abstract - * - * @return bool */ public function hasInDelegate(string $abstract): bool; } diff --git a/src/Viserio/Contract/Container/Dumper/Dumper.php b/src/Viserio/Contract/Container/Dumper/Dumper.php index 258ad7abe..2bee2e8d5 100644 --- a/src/Viserio/Contract/Container/Dumper/Dumper.php +++ b/src/Viserio/Contract/Container/Dumper/Dumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Dumper; diff --git a/src/Viserio/Contract/Container/Exception/BindingResolutionException.php b/src/Viserio/Contract/Container/Exception/BindingResolutionException.php index 28fff3957..44717827d 100644 --- a/src/Viserio/Contract/Container/Exception/BindingResolutionException.php +++ b/src/Viserio/Contract/Container/Exception/BindingResolutionException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; diff --git a/src/Viserio/Contract/Container/Exception/CircularDependencyException.php b/src/Viserio/Contract/Container/Exception/CircularDependencyException.php index 6ec63480d..0c0d2f455 100644 --- a/src/Viserio/Contract/Container/Exception/CircularDependencyException.php +++ b/src/Viserio/Contract/Container/Exception/CircularDependencyException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -35,10 +35,7 @@ class CircularDependencyException extends Exception implements ContainerExceptio /** * Create a new circular reference exception instance. * - * @param string $class - * @param array $buildStack - * @param null|Exception $previous - * @param string $message + * @param string $message */ public function __construct(string $class, array $buildStack, ?Exception $previous = null, ?string $message = null) { @@ -55,8 +52,6 @@ public function __construct(string $class, array $buildStack, ?Exception $previo /** * Returns the name of the class. - * - * @return string */ public function getClass(): string { @@ -65,8 +60,6 @@ public function getClass(): string /** * Get the build stack that caused the exception. - * - * @return array */ public function getBuildStack(): array { diff --git a/src/Viserio/Contract/Container/Exception/CircularParameterException.php b/src/Viserio/Contract/Container/Exception/CircularParameterException.php index 93b24d854..cc29f8725 100644 --- a/src/Viserio/Contract/Container/Exception/CircularParameterException.php +++ b/src/Viserio/Contract/Container/Exception/CircularParameterException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -26,10 +26,7 @@ class CircularParameterException extends Exception implements ContainerException /** * Create a new circular parameter exception instance. * - * @param string $name - * @param null|Exception $previous - * @param string $message - * @param $parameters + * @param string $message */ public function __construct(string $name, array $parameters, ?Exception $previous = null, ?string $message = null) { @@ -46,8 +43,6 @@ public function __construct(string $name, array $parameters, ?Exception $previou /** * Returns parameters. - * - * @return array */ public function getParameters(): array { diff --git a/src/Viserio/Contract/Container/Exception/CompileException.php b/src/Viserio/Contract/Container/Exception/CompileException.php index 3d33307c7..1f6d8773e 100644 --- a/src/Viserio/Contract/Container/Exception/CompileException.php +++ b/src/Viserio/Contract/Container/Exception/CompileException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; diff --git a/src/Viserio/Contract/Container/Exception/FileNotWritableException.php b/src/Viserio/Contract/Container/Exception/FileNotWritableException.php index 53c8cb1e6..fe9d5b3de 100644 --- a/src/Viserio/Contract/Container/Exception/FileNotWritableException.php +++ b/src/Viserio/Contract/Container/Exception/FileNotWritableException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -30,8 +30,6 @@ public static function fromInvalidMoveOperation(string $fromPath, string $toPath /** * @deprecated this method is unused, and will be removed in ProxyManager 3.0.0 - * - * @param mixed $path */ public static function fromNonWritableLocation($path): self { diff --git a/src/Viserio/Contract/Container/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Container/Exception/InvalidArgumentException.php index 08154a53a..f2c3b6976 100644 --- a/src/Viserio/Contract/Container/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Container/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -20,8 +20,6 @@ class InvalidArgumentException extends BaseInvalidArgumentException implements C { /** * @param string $className - * - * @return self */ public static function classMustNotBeAbstract($className): self { @@ -30,8 +28,6 @@ public static function classMustNotBeAbstract($className): self /** * @param string $className - * - * @return self */ public static function classMustNotBeFinal($className): self { diff --git a/src/Viserio/Contract/Container/Exception/LogicException.php b/src/Viserio/Contract/Container/Exception/LogicException.php index 551403ca4..56b851162 100644 --- a/src/Viserio/Contract/Container/Exception/LogicException.php +++ b/src/Viserio/Contract/Container/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; diff --git a/src/Viserio/Contract/Container/Exception/NotFoundException.php b/src/Viserio/Contract/Container/Exception/NotFoundException.php index 50f139f05..ad2c5ed13 100644 --- a/src/Viserio/Contract/Container/Exception/NotFoundException.php +++ b/src/Viserio/Contract/Container/Exception/NotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -33,12 +33,6 @@ class NotFoundException extends Exception implements NotFoundExceptionInterface /** * Create a new NotFoundException instance. - * - * @param string $id - * @param null|string $sourceId - * @param null|Exception $previous - * @param array $alternatives - * @param null|string $message */ public function __construct( string $id, @@ -72,25 +66,17 @@ public function __construct( /** * Get service id. - * - * @return string */ public function getId(): string { return $this->id; } - /** - * @return null|string - */ public function getSourceId(): ?string { return $this->sourceId; } - /** - * @return array - */ public function getAlternatives(): array { return $this->alternatives; diff --git a/src/Viserio/Contract/Container/Exception/OutOfBoundsException.php b/src/Viserio/Contract/Container/Exception/OutOfBoundsException.php index 3447a28ba..c3a555207 100644 --- a/src/Viserio/Contract/Container/Exception/OutOfBoundsException.php +++ b/src/Viserio/Contract/Container/Exception/OutOfBoundsException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; diff --git a/src/Viserio/Contract/Container/Exception/ParameterNotFoundException.php b/src/Viserio/Contract/Container/Exception/ParameterNotFoundException.php index d3d774da2..12fe9953b 100644 --- a/src/Viserio/Contract/Container/Exception/ParameterNotFoundException.php +++ b/src/Viserio/Contract/Container/Exception/ParameterNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -19,14 +19,6 @@ class ParameterNotFoundException extends NotFoundException { /** * Create a new ParameterNotFoundException instance. - * - * @param string $id - * @param null|string $sourceId - * @param null|string $sourceKey - * @param null|Exception $previous - * @param array $alternatives - * @param null|string $nonNestedAlternative - * @param null|string $message */ public function __construct( string $id, diff --git a/src/Viserio/Contract/Container/Exception/RuntimeException.php b/src/Viserio/Contract/Container/Exception/RuntimeException.php index 7c3011725..d95c1b43f 100644 --- a/src/Viserio/Contract/Container/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Container/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; diff --git a/src/Viserio/Contract/Container/Exception/UnresolvableDependencyException.php b/src/Viserio/Contract/Container/Exception/UnresolvableDependencyException.php index e1d3e2655..b6e88dd04 100644 --- a/src/Viserio/Contract/Container/Exception/UnresolvableDependencyException.php +++ b/src/Viserio/Contract/Container/Exception/UnresolvableDependencyException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Exception; @@ -28,10 +28,7 @@ class UnresolvableDependencyException extends Exception implements ContainerExce /** * Create a new UnresolvableDependencyException instance. * - * @param string $id - * @param string $message - * @param int $code - * @param null|Exception $previous + * @param string $message */ public function __construct(string $id, $message = '', int $code = 0, ?Exception $previous = null) { @@ -42,8 +39,6 @@ public function __construct(string $id, $message = '', int $code = 0, ?Exception /** * Get binding id. - * - * @return string */ public function getId(): string { diff --git a/src/Viserio/Contract/Container/Factory.php b/src/Viserio/Contract/Container/Factory.php index 08508e229..0525b4328 100644 --- a/src/Viserio/Contract/Container/Factory.php +++ b/src/Viserio/Contract/Container/Factory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -27,12 +27,9 @@ interface Factory * @param array $arguments Optional arguments to use to build the entry. Use this to force specific * arguments to specific values. Arguments not defined in this array will * be automatically resolved. - * @param bool $shared * * @throws \Viserio\Contract\Container\Exception\BindingResolutionException * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return mixed */ public function make($abstract, array $arguments = [], bool $shared = true); } diff --git a/src/Viserio/Contract/Container/LazyProxy/Dumper.php b/src/Viserio/Contract/Container/LazyProxy/Dumper.php index 6ff34718a..374922371 100644 --- a/src/Viserio/Contract/Container/LazyProxy/Dumper.php +++ b/src/Viserio/Contract/Container/LazyProxy/Dumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\LazyProxy; @@ -20,29 +20,18 @@ interface Dumper { /** * Inspects whether the given definitions should produce lazy instantiation logic in the dumped container. - * - * @param \Viserio\Contract\Container\Definition\Definition $definition - * - * @return bool */ public function isSupported(DefinitionContract $definition): bool; /** * Generates the code for the lazy code. - * - * @param \Viserio\Contract\Container\Definition\ObjectDefinition $definition - * - * @return string */ public function getProxyCode(ObjectDefinitionContract $definition): string; /** * Generates the code to be used to instantiate a proxy in the dumped factory code. * - * @param \Viserio\Contract\Container\Definition\ObjectDefinition $definition - * @param string $factoryCode The code to execute to create the service - * - * @return string + * @param string $factoryCode The code to execute to create the service */ public function getProxyFactoryCode(ObjectDefinitionContract $definition, string $factoryCode): string; } diff --git a/src/Viserio/Contract/Container/Parameter.php b/src/Viserio/Contract/Container/Parameter.php index 7c5b4517d..a26ac31b4 100644 --- a/src/Viserio/Contract/Container/Parameter.php +++ b/src/Viserio/Contract/Container/Parameter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -21,8 +21,6 @@ interface Parameter * @param string $id identifier of the entry to look for * * @throws \Viserio\Contract\Container\Exception\ParameterNotFoundException - * - * @return mixed */ public function getParameter(string $id); @@ -31,8 +29,6 @@ public function getParameter(string $id); * Returns false otherwise. * * @param string $id identifier of the entry to look for - * - * @return bool */ public function hasParameter(string $id): bool; diff --git a/src/Viserio/Contract/Container/Pipe.php b/src/Viserio/Contract/Container/Pipe.php index 8427a8f75..e22aa1f31 100644 --- a/src/Viserio/Contract/Container/Pipe.php +++ b/src/Viserio/Contract/Container/Pipe.php @@ -3,22 +3,17 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; interface Pipe { - /** - * @param ContainerBuilder $containerBuilder - * - * @return void - */ public function process(ContainerBuilder $containerBuilder): void; } diff --git a/src/Viserio/Contract/Container/Processor/ParameterProcessor.php b/src/Viserio/Contract/Container/Processor/ParameterProcessor.php index c7dd32ff3..ce80bde14 100644 --- a/src/Viserio/Contract/Container/Processor/ParameterProcessor.php +++ b/src/Viserio/Contract/Container/Processor/ParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Processor; @@ -23,8 +23,6 @@ interface ParameterProcessor /** * Option to resolve the processor only on runtime call. - * - * @return bool */ public static function isRuntime(): bool; @@ -37,21 +35,13 @@ public static function getProvidedTypes(): array; /** * Check if processor supports parameter. - * - * @param string $parameter - * - * @return bool */ public function supports(string $parameter): bool; /** * Process parameter value through processor. * - * @param string $parameter - * * @throws \Viserio\Contract\Container\Exception\RuntimeException - * - * @return mixed */ public function process(string $parameter); } diff --git a/src/Viserio/Contract/Container/ServiceProvider/AliasServiceProvider.php b/src/Viserio/Contract/Container/ServiceProvider/AliasServiceProvider.php index fb690e0e6..ba9fa8ed3 100644 --- a/src/Viserio/Contract/Container/ServiceProvider/AliasServiceProvider.php +++ b/src/Viserio/Contract/Container/ServiceProvider/AliasServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\ServiceProvider; diff --git a/src/Viserio/Contract/Container/ServiceProvider/ContainerBuilder.php b/src/Viserio/Contract/Container/ServiceProvider/ContainerBuilder.php index e6e35c632..a9d4d1727 100644 --- a/src/Viserio/Contract/Container/ServiceProvider/ContainerBuilder.php +++ b/src/Viserio/Contract/Container/ServiceProvider/ContainerBuilder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\ServiceProvider; @@ -26,7 +26,6 @@ interface ContainerBuilder /** * Register a binding with the container. * - * @param string $abstract * @param null|array|Closure|object|string $concrete * * @return ClosureDefinitionContract|DefinitionContract|FactoryDefinitionContract|ObjectDefinitionContract|UndefinedDefinitionContract @@ -39,7 +38,6 @@ public function bind(string $abstract, $concrete = null); * Sometimes, you may wish to bind something into the container that should only be resolved once * and the same instance should be returned on subsequent calls into the container. * - * @param string $abstract * @param null|array|Closure|object|string $concrete * * @return ClosureDefinitionContract|DefinitionContract|FactoryDefinitionContract|ObjectDefinitionContract|UndefinedDefinitionContract @@ -48,11 +46,6 @@ public function singleton(string $abstract, $concrete = null); /** * Register a new Parameter to the container. - * - * @param string $id - * @param mixed $value - * - * @return \Viserio\Contract\Container\Definition\Definition */ public function setParameter(string $id, $value): DefinitionContract; @@ -60,17 +53,11 @@ public function setParameter(string $id, $value): DefinitionContract; * Removes an definition from the container. * * @param string $abstract Identifier of the entry to remove - * - * @return void */ public function remove(string $abstract): void; /** * Removes a parameter from the container. - * - * @param string $id - * - * @return void */ public function removeParameter(string $id): void; @@ -79,18 +66,11 @@ public function removeParameter(string $id): void; * Returns false otherwise. * * @param string $id identifier of the entry to look for - * - * @return bool */ public function has(string $id): bool; /** * Alias a type to a different name. - * - * @param string $original - * @param string $alias - * - * @return \Viserio\Contract\Container\Definition\AliasDefinition */ public function setAlias(string $original, string $alias): AliasDefinitionContract; @@ -98,17 +78,11 @@ public function setAlias(string $original, string $alias): AliasDefinitionContra * Removes an alias. * * @param string $alias The alias to remove - * - * @return void */ public function removeAlias(string $alias): void; /** * Overwrite the aliases. - * - * @param array $aliases - * - * @return void */ public function setAliases(array $aliases): void; } diff --git a/src/Viserio/Contract/Container/ServiceProvider/ExtendServiceProvider.php b/src/Viserio/Contract/Container/ServiceProvider/ExtendServiceProvider.php index 2d56b5447..a66bda83e 100644 --- a/src/Viserio/Contract/Container/ServiceProvider/ExtendServiceProvider.php +++ b/src/Viserio/Contract/Container/ServiceProvider/ExtendServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\ServiceProvider; diff --git a/src/Viserio/Contract/Container/ServiceProvider/PipelineServiceProvider.php b/src/Viserio/Contract/Container/ServiceProvider/PipelineServiceProvider.php index 296a7b8bc..cd86164b9 100644 --- a/src/Viserio/Contract/Container/ServiceProvider/PipelineServiceProvider.php +++ b/src/Viserio/Contract/Container/ServiceProvider/PipelineServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\ServiceProvider; diff --git a/src/Viserio/Contract/Container/ServiceProvider/PreloadServiceProvider.php b/src/Viserio/Contract/Container/ServiceProvider/PreloadServiceProvider.php index 6a8ec9592..b092c93b2 100644 --- a/src/Viserio/Contract/Container/ServiceProvider/PreloadServiceProvider.php +++ b/src/Viserio/Contract/Container/ServiceProvider/PreloadServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\ServiceProvider; diff --git a/src/Viserio/Contract/Container/ServiceProvider/ServiceProvider.php b/src/Viserio/Contract/Container/ServiceProvider/ServiceProvider.php index 0033ddd5e..0760bc7dd 100644 --- a/src/Viserio/Contract/Container/ServiceProvider/ServiceProvider.php +++ b/src/Viserio/Contract/Container/ServiceProvider/ServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\ServiceProvider; @@ -21,10 +21,6 @@ interface ServiceProvider * Builds the service provider. * * It is only ever called once when the cache is empty. - * - * @param \Viserio\Contract\Container\ServiceProvider\ContainerBuilder $container - * - * @return void */ public function build(ContainerBuilderContract $container): void; } diff --git a/src/Viserio/Contract/Container/ServiceReferenceGraph.php b/src/Viserio/Contract/Container/ServiceReferenceGraph.php index 60c89c9cb..a368e8cea 100644 --- a/src/Viserio/Contract/Container/ServiceReferenceGraph.php +++ b/src/Viserio/Contract/Container/ServiceReferenceGraph.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -27,18 +27,12 @@ public function getNodes(): array; /** * Returns true if the graph can return an entry for the given identifier. * Returns false otherwise. - * - * @param string $id - * - * @return bool */ public function hasNode(string $id): bool; /** * Gets a node by identifier. * - * @param string $id - * *@throws \Viserio\Contract\Container\Exception\InvalidArgumentException if no node matches the supplied identifier * * @return \Viserio\Contract\Container\ServiceReferenceGraphNode @@ -49,13 +43,8 @@ public function getNode(string $id): ServiceReferenceGraphNode; * Connects 2 nodes together in the Graph. * * @param null|int|string $sourceId - * @param mixed $sourceValue - * @param null|string $destId * @param null|mixed $destValue * @param null|mixed $reference - * @param bool $lazy - * @param bool $weak - * @param bool $byConstructor */ public function connect( $sourceId, diff --git a/src/Viserio/Contract/Container/ServiceReferenceGraphEdge.php b/src/Viserio/Contract/Container/ServiceReferenceGraphEdge.php index e2831bb42..77f1d8fcf 100644 --- a/src/Viserio/Contract/Container/ServiceReferenceGraphEdge.php +++ b/src/Viserio/Contract/Container/ServiceReferenceGraphEdge.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -31,29 +31,21 @@ public function getDestNode(): ServiceReferenceGraphNode; /** * Returns the value of the edge. - * - * @return mixed */ public function getValue(); /** * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation. - * - * @return bool */ public function isLazy(): bool; /** * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service. - * - * @return bool */ public function isWeak(): bool; /** * Returns true if the edge links with a constructor argument. - * - * @return bool */ public function isReferencedByConstructor(): bool; } diff --git a/src/Viserio/Contract/Container/ServiceReferenceGraphNode.php b/src/Viserio/Contract/Container/ServiceReferenceGraphNode.php index c6c3e0fe5..0fbd40781 100644 --- a/src/Viserio/Contract/Container/ServiceReferenceGraphNode.php +++ b/src/Viserio/Contract/Container/ServiceReferenceGraphNode.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; diff --git a/src/Viserio/Contract/Container/TaggedContainer.php b/src/Viserio/Contract/Container/TaggedContainer.php index e6546cdfc..86d243b63 100644 --- a/src/Viserio/Contract/Container/TaggedContainer.php +++ b/src/Viserio/Contract/Container/TaggedContainer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container; @@ -33,8 +33,6 @@ interface TaggedContainer * echo $tag['hello']; * } * } - * - * @return Traversable */ public function getTagged(string $tag): Traversable; diff --git a/src/Viserio/Contract/Container/Traits/ContainerAwareTrait.php b/src/Viserio/Contract/Container/Traits/ContainerAwareTrait.php index 4ebfe21cf..74bfa0588 100644 --- a/src/Viserio/Contract/Container/Traits/ContainerAwareTrait.php +++ b/src/Viserio/Contract/Container/Traits/ContainerAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Traits; @@ -27,8 +27,6 @@ trait ContainerAwareTrait /** * Set a container instance. * - * @param \Psr\Container\ContainerInterface $container - * * @return static */ public function setContainer(ContainerInterface $container): self diff --git a/src/Viserio/Contract/Cookie/Exception/Exception.php b/src/Viserio/Contract/Cookie/Exception/Exception.php index ad11915e1..0fef609cf 100644 --- a/src/Viserio/Contract/Cookie/Exception/Exception.php +++ b/src/Viserio/Contract/Cookie/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cookie\Exception; diff --git a/src/Viserio/Contract/Cookie/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Cookie/Exception/InvalidArgumentException.php index 3c486b435..29d313a5f 100644 --- a/src/Viserio/Contract/Cookie/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Cookie/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cookie\Exception; diff --git a/src/Viserio/Contract/Cookie/Factory.php b/src/Viserio/Contract/Cookie/Factory.php index 58dd5883f..d223acd1b 100644 --- a/src/Viserio/Contract/Cookie/Factory.php +++ b/src/Viserio/Contract/Cookie/Factory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cookie; @@ -18,13 +18,6 @@ interface Factory /** * Create a new cookie instance. * - * @param string $name - * @param null|string $value - * @param int $second - * @param null|string $path - * @param null|string $domain - * @param bool $secure - * @param bool $httpOnly * @param null|bool|string $sameSite * * @return \Viserio\Contract\Cookie\Cookie @@ -43,12 +36,6 @@ public function create( /** * Create a cookie that lasts "forever" (five years). * - * @param string $name - * @param null|string $value - * @param null|string $path - * @param null|string $domain - * @param bool $secure - * @param bool $httpOnly * @param null|bool|string $sameSite * * @return \Viserio\Contract\Cookie\Cookie @@ -66,10 +53,6 @@ public function forever( /** * Expire the given cookie. * - * @param string $name - * @param null|string $path - * @param null|string $domain - * * @return \Viserio\Contract\Cookie\Cookie */ public function delete(string $name, ?string $path = null, ?string $domain = null): Cookie; diff --git a/src/Viserio/Contract/Cookie/QueueingFactory.php b/src/Viserio/Contract/Cookie/QueueingFactory.php index 869be0db9..aaa0b9621 100644 --- a/src/Viserio/Contract/Cookie/QueueingFactory.php +++ b/src/Viserio/Contract/Cookie/QueueingFactory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cookie; @@ -24,26 +24,17 @@ public function queue(...$arguments); /** * Remove a cookie from the queue. - * - * @param string $name - * - * @return void */ public function unqueue(string $name): void; /** * Determine if a cookie has been queued. - * - * @param string $key - * - * @return bool */ public function hasQueued(string $key): bool; /** * Get a queued cookie instance. * - * @param string $key * @param null|mixed $default * * @return null|\Viserio\Contract\Cookie\Cookie @@ -52,8 +43,6 @@ public function queued(string $key, $default = null): ?Cookie; /** * Get the cookies which have been queued for the next request. - * - * @return array */ public function getQueuedCookies(): array; } diff --git a/src/Viserio/Contract/Cron/Cron.php b/src/Viserio/Contract/Cron/Cron.php index f178397ed..ace82a3b5 100644 --- a/src/Viserio/Contract/Cron/Cron.php +++ b/src/Viserio/Contract/Cron/Cron.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cron; @@ -19,24 +19,18 @@ interface Cron { /** * Get the command name. - * - * @return string */ public function getCommand(): string; /** * Set which user the command should run as. * - * @param string $user - * * @return static */ public function setUser(string $user): self; /** * Get which user runs the command. - * - * @return string */ public function getUser(): string; @@ -51,17 +45,11 @@ public function setEnvironments($environments): self; /** * Determine if the cron runs in the given environment. - * - * @param string $environment - * - * @return bool */ public function runsInEnvironment(string $environment): bool; /** * Run the given cron job. - * - * @return mixed */ public function run(); @@ -74,8 +62,6 @@ public function runInBackground(): self; /** * Build the command string. - * - * @return string */ public function buildCommand(): string; @@ -89,8 +75,6 @@ public function withoutOverlapping(): self; /** * Append the output of the command to a given location. * - * @param string $location - * * @return static */ public function appendOutputTo(string $location): self; @@ -98,34 +82,23 @@ public function appendOutputTo(string $location): self; /** * Send the output of the command to a given location. * - * @param string $location - * * @return static */ public function sendOutputTo(string $location): self; /** * Determine if the given cron job should run based on the Cron expression. - * - * @param string $environment - * @param bool $isMaintenance - * - * @return bool */ public function isDue(string $environment, bool $isMaintenance = false): bool; /** * Get the cron expression for the cron job. - * - * @return string */ public function getExpression(): string; /** * The Cron expression representing the cron's frequency. * - * @param string $expression - * * @return static */ public function cron(string $expression); @@ -212,9 +185,6 @@ public function days($days): self; /** * Schedule the cron job to run monthly on a given day and time. * - * @param int $day - * @param string $time - * * @return static */ public function monthlyOn(int $day = 1, string $time = '0:0'): self; @@ -222,8 +192,6 @@ public function monthlyOn(int $day = 1, string $time = '0:0'): self; /** * Schedule the cron job to run daily at a given time (10:00, 19:30, etc). * - * @param string $time - * * @return static */ public function dailyAt(string $time): self; @@ -231,9 +199,6 @@ public function dailyAt(string $time): self; /** * Schedule the cron job to run twice daily. * - * @param int $first - * @param int $second - * * @return static */ public function twiceDaily(int $first = 1, int $second = 13): self; @@ -241,9 +206,6 @@ public function twiceDaily(int $first = 1, int $second = 13): self; /** * Schedule the cron to run twice monthly. * - * @param int $first - * @param int $second - * * @return static */ public function twiceMonthly(int $first = 1, int $second = 16): self; @@ -314,9 +276,6 @@ public function weekly(): self; /** * Schedule the cron job to run weekly on a given day and time. * - * @param int $day - * @param string $time - * * @return static */ public function weeklyOn(int $day, string $time = '0:0'): self; @@ -324,9 +283,6 @@ public function weeklyOn(int $day, string $time = '0:0'): self; /** * Schedule the cron job to run between start and end time. * - * @param string $startTime - * @param string $endTime - * * @return static */ public function between(string $startTime, string $endTime): self; @@ -334,9 +290,6 @@ public function between(string $startTime, string $endTime): self; /** * Schedule the cron job to not run between start and end time. * - * @param string $startTime - * @param string $endTime - * * @return static */ public function unlessBetween(string $startTime, string $endTime): self; @@ -344,8 +297,6 @@ public function unlessBetween(string $startTime, string $endTime): self; /** * Register a callback to further filter the schedule. * - * @param Closure $callback - * * @return static */ public function when(Closure $callback): self; @@ -353,8 +304,6 @@ public function when(Closure $callback): self; /** * Register a callback to further filter the schedule. * - * @param Closure $callback - * * @return static */ public function skip(Closure $callback): self; @@ -362,8 +311,6 @@ public function skip(Closure $callback): self; /** * Register a callback to be called before the operation. * - * @param Closure $callback - * * @return static */ public function before(Closure $callback): self; @@ -371,8 +318,6 @@ public function before(Closure $callback): self; /** * Register a callback to be called after the operation. * - * @param Closure $callback - * * @return static */ public function after(Closure $callback): self; @@ -380,32 +325,24 @@ public function after(Closure $callback): self; /** * Set the human-friendly description of the cron. * - * @param string $description - * * @return static */ public function setDescription(string $description): self; /** * Get the summary of the cron for display. - * - * @return string */ public function getSummaryForDisplay(): string; /** * Set the timezone the date should be evaluated on. * - * @param string $timezone - * * @return static */ public function setTimezone(string $timezone): self; /** * Determine if the filters pass for the cron. - * - * @return bool */ public function filtersPass(): bool; } diff --git a/src/Viserio/Contract/Cron/CronJob.php b/src/Viserio/Contract/Cron/CronJob.php index c720f8a81..9e05f4255 100644 --- a/src/Viserio/Contract/Cron/CronJob.php +++ b/src/Viserio/Contract/Cron/CronJob.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cron; @@ -19,10 +19,6 @@ interface CronJob { /** * Register the cron job to the schedule. - * - * @param \Viserio\Contract\Cron\Schedule $schedule - * - * @return void */ public static function register(ScheduleContract $schedule): void; } diff --git a/src/Viserio/Contract/Cron/Exception/Exception.php b/src/Viserio/Contract/Cron/Exception/Exception.php index eeb22cf0f..ccd6a66c5 100644 --- a/src/Viserio/Contract/Cron/Exception/Exception.php +++ b/src/Viserio/Contract/Cron/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cron\Exception; diff --git a/src/Viserio/Contract/Cron/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Cron/Exception/InvalidArgumentException.php index 41f560932..782c3e7f1 100644 --- a/src/Viserio/Contract/Cron/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Cron/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cron\Exception; diff --git a/src/Viserio/Contract/Cron/Exception/LogicException.php b/src/Viserio/Contract/Cron/Exception/LogicException.php index dc022ff64..bf4b264c2 100644 --- a/src/Viserio/Contract/Cron/Exception/LogicException.php +++ b/src/Viserio/Contract/Cron/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cron\Exception; diff --git a/src/Viserio/Contract/Cron/Schedule.php b/src/Viserio/Contract/Cron/Schedule.php index 3f02b5ab8..4e76e8f7f 100644 --- a/src/Viserio/Contract/Cron/Schedule.php +++ b/src/Viserio/Contract/Cron/Schedule.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cron; @@ -22,48 +22,28 @@ interface Schedule * Add a new callback cron job to the schedule. * * @param callable|string $callback - * @param array $parameters - * - * @return \Viserio\Component\Cron\CallbackCron */ public function call($callback, array $parameters = []): CallbackCron; /** * Add a new command cron job to the schedule. * - * @param string $command - * @param array $parameters - * * @throws \Viserio\Contract\Cron\Exception\LogicException - * - * @return \Viserio\Contract\Cron\Cron */ public function command(string $command, array $parameters = []): CronContract; /** * Add a new executable command cron job to the schedule. - * - * @param string $command - * @param array $parameters - * - * @return \Viserio\Contract\Cron\Cron */ public function exec(string $command, array $parameters = []): CronContract; /** * Get all of the events on the schedule. - * - * @return array */ public function getCronJobs(): array; /** * Get all of the cron jobs on the schedule that are due. - * - * @param string $environment - * @param bool $isMaintenance - * - * @return array */ public function dueCronJobs(string $environment, bool $isMaintenance = false): array; } diff --git a/src/Viserio/Contract/Events/Event.php b/src/Viserio/Contract/Events/Event.php index ea048d850..d1dabd7c5 100644 --- a/src/Viserio/Contract/Events/Event.php +++ b/src/Viserio/Contract/Events/Event.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events; @@ -17,8 +17,6 @@ interface Event { /** * Get event name. - * - * @return string */ public function getName(): string; @@ -31,15 +29,11 @@ public function getTarget(); /** * Get parameters passed to the event. - * - * @return array */ public function getParams(): array; /** * Has this event indicated event propagation should stop? - * - * @return bool */ public function isPropagationStopped(): bool; } diff --git a/src/Viserio/Contract/Events/EventManager.php b/src/Viserio/Contract/Events/EventManager.php index 3cdf067c8..d3bc993b1 100644 --- a/src/Viserio/Contract/Events/EventManager.php +++ b/src/Viserio/Contract/Events/EventManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events; @@ -20,11 +20,7 @@ interface EventManager /** * Subscribe to an event. * - * @param string $eventName * @param null|callable|Closure $listener - * @param int $priority - * - * @return void */ public function attach(string $eventName, $listener, int $priority = 0): void; @@ -34,10 +30,7 @@ public function attach(string $eventName, $listener, int $priority = 0): void; * If the listener could not be found, this method will return false. If it * was removed it will return true. * - * @param string $eventName * @param null|callable|Closure $listener - * - * @return bool */ public function detach(string $eventName, $listener): bool; @@ -46,10 +39,6 @@ public function detach(string $eventName, $listener): bool; * * If the eventName argument is specified, all listeners for that event are * removed. - * - * @param string $eventName - * - * @return void */ public function clearListeners(string $eventName): void; @@ -64,9 +53,6 @@ public function clearListeners(string $eventName): void; * * @param string|\Viserio\Contract\Events\Event $event * @param null|object|string $target - * @param array $argv - * - * @return bool */ public function trigger($event, $target = null, array $argv = []): bool; } diff --git a/src/Viserio/Contract/Events/Exception/Exception.php b/src/Viserio/Contract/Events/Exception/Exception.php index aecfc696b..527055bdf 100644 --- a/src/Viserio/Contract/Events/Exception/Exception.php +++ b/src/Viserio/Contract/Events/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events\Exception; diff --git a/src/Viserio/Contract/Events/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Events/Exception/InvalidArgumentException.php index 6ab7b13ea..2b8e4ff61 100644 --- a/src/Viserio/Contract/Events/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Events/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events\Exception; diff --git a/src/Viserio/Contract/Events/Exception/RuntimeException.php b/src/Viserio/Contract/Events/Exception/RuntimeException.php index 040e313de..81b9cc411 100644 --- a/src/Viserio/Contract/Events/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Events/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events\Exception; diff --git a/src/Viserio/Contract/Events/Traits/EventManagerAwareTrait.php b/src/Viserio/Contract/Events/Traits/EventManagerAwareTrait.php index a47b072ba..19231c280 100644 --- a/src/Viserio/Contract/Events/Traits/EventManagerAwareTrait.php +++ b/src/Viserio/Contract/Events/Traits/EventManagerAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events\Traits; @@ -27,8 +27,6 @@ trait EventManagerAwareTrait /** * Set a event manager instance. * - * @param \Viserio\Contract\Events\EventManager $eventManager - * * @return static */ public function setEventManager(EventManagerContract $eventManager): self diff --git a/src/Viserio/Contract/Exception/ConsoleHandler.php b/src/Viserio/Contract/Exception/ConsoleHandler.php index 4678f7b57..a80fce787 100644 --- a/src/Viserio/Contract/Exception/ConsoleHandler.php +++ b/src/Viserio/Contract/Exception/ConsoleHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -19,15 +19,11 @@ interface ConsoleHandler extends Handler { /** * Register the exception / Error handlers for the application. - * - * @return void */ public function register(): void; /** * Unregister the PHP error handler. - * - * @return void */ public function unregister(): void; @@ -35,9 +31,6 @@ public function unregister(): void; * Render an exception to the console. * * @param \Viserio\Contract\Exception\ConsoleOutput $output - * @param Throwable $exception - * - * @return void */ public function render(ConsoleOutput $output, Throwable $exception): void; } diff --git a/src/Viserio/Contract/Exception/ConsoleOutput.php b/src/Viserio/Contract/Exception/ConsoleOutput.php index 460cc7967..a999a5bba 100644 --- a/src/Viserio/Contract/Exception/ConsoleOutput.php +++ b/src/Viserio/Contract/Exception/ConsoleOutput.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -21,8 +21,6 @@ interface ConsoleOutput * Writes a message to the output and adds a newline at the end. * * @param string $message The message as an array of lines of a single string - * - * @return void */ public function writeln(string $message): void; diff --git a/src/Viserio/Contract/Exception/Displayer.php b/src/Viserio/Contract/Exception/Displayer.php index af81ff2a4..cfc78ce96 100644 --- a/src/Viserio/Contract/Exception/Displayer.php +++ b/src/Viserio/Contract/Exception/Displayer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -21,37 +21,22 @@ interface Displayer /** * Display the given exception. * - * @param Throwable $exception - * @param string $id - * @param int $code - * @param string[] $headers - * - * @return \Psr\Http\Message\ResponseInterface + * @param string[] $headers */ public function display(Throwable $exception, string $id, int $code, array $headers): ResponseInterface; /** * Get the supported content type. - * - * @return string */ public function getContentType(): string; /** * Can we display the exception? - * - * @param Throwable $original - * @param Throwable $transformed - * @param int $code - * - * @return bool */ public function canDisplay(Throwable $original, Throwable $transformed, int $code): bool; /** * Do we provide verbose information about the exception? - * - * @return bool */ public function isVerbose(): bool; } diff --git a/src/Viserio/Contract/Exception/Exception/Exception.php b/src/Viserio/Contract/Exception/Exception/Exception.php index 703ce5566..768a4165e 100644 --- a/src/Viserio/Contract/Exception/Exception/Exception.php +++ b/src/Viserio/Contract/Exception/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception\Exception; diff --git a/src/Viserio/Contract/Exception/Exception/NotFoundException.php b/src/Viserio/Contract/Exception/Exception/NotFoundException.php index 79ae503f4..7b1996641 100644 --- a/src/Viserio/Contract/Exception/Exception/NotFoundException.php +++ b/src/Viserio/Contract/Exception/Exception/NotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception\Exception; diff --git a/src/Viserio/Contract/Exception/Filter.php b/src/Viserio/Contract/Exception/Filter.php index ff33ed92e..8fdd97a8c 100644 --- a/src/Viserio/Contract/Exception/Filter.php +++ b/src/Viserio/Contract/Exception/Filter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -21,11 +21,7 @@ interface Filter /** * Filter and return the displayers. * - * @param \Viserio\Contract\Exception\Displayer[] $displayers - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $original - * @param Throwable $transformed - * @param int $code + * @param \Viserio\Contract\Exception\Displayer[] $displayers * * @return \Viserio\Contract\Exception\Displayer[] */ diff --git a/src/Viserio/Contract/Exception/Handler.php b/src/Viserio/Contract/Exception/Handler.php index 65bfe1ba0..77c51ddd8 100644 --- a/src/Viserio/Contract/Exception/Handler.php +++ b/src/Viserio/Contract/Exception/Handler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -20,35 +20,21 @@ interface Handler { /** * Determine if the exception shouldn't be reported. - * - * @param Throwable $exception - * - * @return self */ public function addShouldntReport(Throwable $exception): self; /** * Report or log an exception. - * - * @param Throwable $exception - * - * @return void */ public function report(Throwable $exception): void; /** * Add the transformed instance. - * - * @param \Viserio\Contract\Exception\Transformer $transformer - * - * @return self */ public function addTransformer(TransformerContract $transformer): self; /** * Get the transformer exceptions. - * - * @return array */ public function getTransformers(): array; } diff --git a/src/Viserio/Contract/Exception/HttpHandler.php b/src/Viserio/Contract/Exception/HttpHandler.php index 2e5802adf..2fc09815f 100644 --- a/src/Viserio/Contract/Exception/HttpHandler.php +++ b/src/Viserio/Contract/Exception/HttpHandler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -21,15 +21,11 @@ interface HttpHandler extends Handler { /** * Register the exception / Error handlers for the application. - * - * @return void */ public function register(): void; /** * Unregister the PHP error handler. - * - * @return void */ public function unregister(): void; @@ -37,7 +33,6 @@ public function unregister(): void; * Add the displayer instance. * * @param \Viserio\Contract\Exception\Displayer $displayer - * @param int $priority * * @return self */ @@ -45,8 +40,6 @@ public function addDisplayer(Displayer $displayer, int $priority = 0): HttpHandl /** * Get the displayer instance. - * - * @return array */ public function getDisplayers(): array; @@ -54,7 +47,6 @@ public function getDisplayers(): array; * Add the filter instance. * * @param \Viserio\Contract\Exception\Filter $filter - * @param int $priority * * @return self */ @@ -62,18 +54,11 @@ public function addFilter(Filter $filter, int $priority = 0): HttpHandler; /** * Get the filter exceptions. - * - * @return array */ public function getFilters(): array; /** * Render an exception into an HTTP response. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param Throwable $exception - * - * @return \Psr\Http\Message\ResponseInterface */ public function render(ServerRequestInterface $request, Throwable $exception): ResponseInterface; } diff --git a/src/Viserio/Contract/Exception/Transformer.php b/src/Viserio/Contract/Exception/Transformer.php index 6b2691a9d..643ee9963 100644 --- a/src/Viserio/Contract/Exception/Transformer.php +++ b/src/Viserio/Contract/Exception/Transformer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Exception; @@ -19,10 +19,6 @@ interface Transformer { /** * Transform the provided exception. - * - * @param Throwable $exception - * - * @return Throwable */ public function transform(Throwable $exception): Throwable; } diff --git a/src/Viserio/Contract/Filesystem/CloudFileSystem.php b/src/Viserio/Contract/Filesystem/CloudFileSystem.php index f64f37665..f4f023504 100644 --- a/src/Viserio/Contract/Filesystem/CloudFileSystem.php +++ b/src/Viserio/Contract/Filesystem/CloudFileSystem.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem; @@ -17,10 +17,6 @@ interface CloudFileSystem extends Filesystem { /** * Get the URL for the file at the given path. - * - * @param string $path - * - * @return string */ public function url(string $path): string; } diff --git a/src/Viserio/Contract/Filesystem/DirectorySystem.php b/src/Viserio/Contract/Filesystem/DirectorySystem.php index 3e43ad794..6c33a61d1 100644 --- a/src/Viserio/Contract/Filesystem/DirectorySystem.php +++ b/src/Viserio/Contract/Filesystem/DirectorySystem.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem; @@ -21,8 +21,6 @@ interface DirectorySystem /** * Get all of the directories within a given directory. * - * @param string $directory - * * @return Iterator */ public function directories(string $directory): Iterator; @@ -30,8 +28,6 @@ public function directories(string $directory): Iterator; /** * Get all (recursive) of the directories within a given directory. * - * @param string $directory - * * @return Iterator */ public function allDirectories(string $directory): Iterator; @@ -39,65 +35,46 @@ public function allDirectories(string $directory): Iterator; /** * Creates a directory recursively. * - * @param string $dirname - * @param array $config An array of boolean options - * Valid options are: - * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) + * @param array $config An array of boolean options + * Valid options are: + * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) * * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ public function createDirectory(string $dirname, array $config = []): void; /** * Recursively delete a directory. * - * @param string $dirname - * * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws \Viserio\Contract\Filesystem\Exception\UnreadableFileException * @throws \Viserio\Contract\Finder\Exception\NotFoundException - * - * @return void */ public function deleteDirectory(string $dirname): void; /** * Empty the specified directory of all files and folders. * - * @param string $dirname - * * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws \Viserio\Contract\Filesystem\Exception\UnreadableFileException * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException - * - * @return void */ public function cleanDirectory(string $dirname): void; /** * Determine if the given path is a directory. - * - * @param string $dirname - * - * @return bool */ public function isDirectory(string $dirname): bool; /** * Copy a directory from one location to another. * - * @param string $directory - * @param string $destination - * @param array $config An array of boolean options - * Valid options are: - * - $config['flags'] @see https://php.net/manual/en/filesystemiterator.construct.php and than the flags section + * @param array $config An array of boolean options + * Valid options are: + * - $config['flags'] @see https://php.net/manual/en/filesystemiterator.construct.php and than the flags section * * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException - * - * @return void */ public function copyDirectory(string $directory, string $destination, array $config = []): void; } diff --git a/src/Viserio/Contract/Filesystem/Exception/Exception.php b/src/Viserio/Contract/Filesystem/Exception/Exception.php index a5c51e2bb..b4edc4033 100644 --- a/src/Viserio/Contract/Filesystem/Exception/Exception.php +++ b/src/Viserio/Contract/Filesystem/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; diff --git a/src/Viserio/Contract/Filesystem/Exception/IOException.php b/src/Viserio/Contract/Filesystem/Exception/IOException.php index 21ea6f75b..fa05094ca 100644 --- a/src/Viserio/Contract/Filesystem/Exception/IOException.php +++ b/src/Viserio/Contract/Filesystem/Exception/IOException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; @@ -23,14 +23,6 @@ class IOException extends BaseErrorException implements Exception /** * Create a new IOException instance. - * - * @param string $message - * @param int $code - * @param null|Throwable $previous - * @param null|string $path - * @param null|int $severity - * @param string $filename - * @param int $lineno */ public function __construct( string $message, @@ -48,8 +40,6 @@ public function __construct( /** * Get the file/dir path. - * - * @return null|string */ public function getPath(): ?string { diff --git a/src/Viserio/Contract/Filesystem/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Filesystem/Exception/InvalidArgumentException.php index 04638dd90..607911d7f 100644 --- a/src/Viserio/Contract/Filesystem/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Filesystem/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; diff --git a/src/Viserio/Contract/Filesystem/Exception/NotFoundException.php b/src/Viserio/Contract/Filesystem/Exception/NotFoundException.php index bf3321ce7..77d1093a8 100644 --- a/src/Viserio/Contract/Filesystem/Exception/NotFoundException.php +++ b/src/Viserio/Contract/Filesystem/Exception/NotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; @@ -39,12 +39,6 @@ class NotFoundException extends BaseException implements Exception /** * Create a new DirectoryNotFoundException instance. - * - * @param string $type - * @param null|string $message - * @param int $code - * @param null|Throwable $previous - * @param null|string $path */ public function __construct( string $type, @@ -69,8 +63,6 @@ public function __construct( /** * Get the file or directory path. - * - * @return null|string */ public function getPath(): ?string { @@ -79,8 +71,6 @@ public function getPath(): ?string /** * Check if exception is a file exception. - * - * @return bool */ public function isFile(): bool { @@ -89,8 +79,6 @@ public function isFile(): bool /** * Check if exception is a dir exception. - * - * @return bool */ public function isDir(): bool { diff --git a/src/Viserio/Contract/Filesystem/Exception/NotSupportedException.php b/src/Viserio/Contract/Filesystem/Exception/NotSupportedException.php index 1b1053979..b3ca927ff 100644 --- a/src/Viserio/Contract/Filesystem/Exception/NotSupportedException.php +++ b/src/Viserio/Contract/Filesystem/Exception/NotSupportedException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; diff --git a/src/Viserio/Contract/Filesystem/Exception/OutOfBoundsException.php b/src/Viserio/Contract/Filesystem/Exception/OutOfBoundsException.php index 0d800bcf8..eed32694b 100644 --- a/src/Viserio/Contract/Filesystem/Exception/OutOfBoundsException.php +++ b/src/Viserio/Contract/Filesystem/Exception/OutOfBoundsException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; diff --git a/src/Viserio/Contract/Filesystem/Exception/RuntimeException.php b/src/Viserio/Contract/Filesystem/Exception/RuntimeException.php index 4fea3bfcd..464c87c21 100644 --- a/src/Viserio/Contract/Filesystem/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Filesystem/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; diff --git a/src/Viserio/Contract/Filesystem/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Filesystem/Exception/UnexpectedValueException.php index 205b079d1..6de3837fc 100644 --- a/src/Viserio/Contract/Filesystem/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Filesystem/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; diff --git a/src/Viserio/Contract/Filesystem/Exception/UnreadableFileException.php b/src/Viserio/Contract/Filesystem/Exception/UnreadableFileException.php index 6e47a3f38..789464037 100644 --- a/src/Viserio/Contract/Filesystem/Exception/UnreadableFileException.php +++ b/src/Viserio/Contract/Filesystem/Exception/UnreadableFileException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Exception; @@ -23,10 +23,6 @@ class UnreadableFileException extends BaseException implements Exception /** * Create a new FileNotFoundException instance. - * - * @param string $path - * @param int $code - * @param null|Throwable $previous */ public function __construct(string $path, int $code = 0, ?Throwable $previous = null) { @@ -37,8 +33,6 @@ public function __construct(string $path, int $code = 0, ?Throwable $previous = /** * Get the file path. - * - * @return null|string */ public function getPath(): ?string { diff --git a/src/Viserio/Contract/Filesystem/Filesystem.php b/src/Viserio/Contract/Filesystem/Filesystem.php index 593a04a1d..d0b82eacf 100644 --- a/src/Viserio/Contract/Filesystem/Filesystem.php +++ b/src/Viserio/Contract/Filesystem/Filesystem.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem; @@ -39,11 +39,7 @@ interface Filesystem extends DirectorySystem /** * Check whether a file exists. * - * @param string $path - * * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return bool */ public function has(string $path): bool; @@ -82,23 +78,18 @@ public function readStream(string $path): Generator; * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) * * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ public function write(string $path, string $content, array $config = []): void; /** * Write a new file using a stream. * - * @param string $path * @param resource $resource * @param array $config An array of boolean options * Valid options are: * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) * * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ public function writeStream(string $path, $resource, array $config = []): void; @@ -106,16 +97,12 @@ public function writeStream(string $path, $resource, array $config = []): void; * Appends the given content to the specified file. * If the file does not exist, the file will be created. * - * @param string $path - * @param string $content - * @param array $config An array of boolean options - * Valid options are: - * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) + * @param array $config An array of boolean options + * Valid options are: + * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) * * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ public function append(string $path, string $content, array $config = []): void; @@ -123,7 +110,6 @@ public function append(string $path, string $content, array $config = []): void; * Appends the given content to the specified file using stream. * If the file does not exist, the file will be created. * - * @param string $path * @param resource $resource * @param array $config An array of boolean options * Valid options are: @@ -131,8 +117,6 @@ public function append(string $path, string $content, array $config = []): void; * * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ public function appendStream(string $path, $resource, array $config = []): void; @@ -148,15 +132,12 @@ public function appendStream(string $path, $resource, array $config = []): void; * * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException * @throws \Viserio\Contract\Filesystem\Exception\IOException - * - * @return void */ public function update(string $path, string $content, array $config = []): void; /** * Update a file using a stream. * - * @param string $path * @param resource $resource * @param array $config An array of boolean options * Valid options are: @@ -164,52 +145,37 @@ public function update(string $path, string $content, array $config = []): void; * - $config['visibility'] Whether to change the file chmod (defaults to public visibility) * * @throws \Viserio\Contract\Filesystem\Exception\IOException if the getting of the stream content failed - * - * @return void */ public function updateStream(string $path, $resource, array $config = []): void; /** * Change the owner of a file or directory. * - * @param string $file * @param int|string $user A user name or number * * @throws \Viserio\Contract\Filesystem\Exception\IOException When the change fails - * - * @return void */ public function setOwner(string $file, $user): void; /** * Change the group of an array of files or directories. * - * @param string $file * @param int|string $group A group name or number * * @throws \Viserio\Contract\Filesystem\Exception\IOException When the change fails - * - * @return void */ public function setGroup(string $file, $group): void; /** * Get the visibility for the given path. - * - * @param string $path - * - * @return int */ public function getVisibility(string $path): int; /** * Set the visibility for the given path. * - * @param string $path * @param float|int|string $visibility The new mode (octal) * @param int $umask The mode mask (octal) - * - * @return void */ public function setVisibility(string $path, $visibility, int $umask = 0000): void; @@ -226,16 +192,12 @@ public function setVisibility(string $path, $visibility, int $umask = 0000): voi * * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException When originFile doesn't exist * @throws \Viserio\Contract\Filesystem\Exception\IOException When copy fails - * - * @return void */ public function copy(string $originFile, string $targetFile, bool $override = false): void; /** * Move a file to a new location. * - * @param string $from - * @param string $to * @param array $config An array of boolean options * Valid options are: * - $config['overwrite'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) @@ -243,8 +205,6 @@ public function copy(string $originFile, string $targetFile, bool $override = fa * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws \Viserio\Contract\Filesystem\Exception\UnreadableFileException * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException - * - * @return void */ public function move(string $from, string $to, array $config = []): void; @@ -252,8 +212,6 @@ public function move(string $from, string $to, array $config = []): void; * Get a file's size. * * @param string $path the path to the file - * - * @return int */ public function getSize(string $path): int; @@ -282,18 +240,12 @@ public function getLastModified(string $path): DateTime; /** * Delete the file at a given path. - * - * @param string $path - * - * @return void */ public function delete(string $path): void; /** * Get an array of all files in a directory. * - * @param string $directory - * * @return Iterator */ public function files(string $directory): Iterator; @@ -301,19 +253,12 @@ public function files(string $directory): Iterator; /** * Get all of the files from the given directory (recursive). * - * @param string $directory - * @param bool $showHiddenFiles - * * @return Iterator */ public function allFiles(string $directory, bool $showHiddenFiles = false): Iterator; /** * Extract the file extension from a file path. - * - * @param string $path - * - * @return string */ public function getExtension(string $path): string; @@ -340,30 +285,18 @@ public function changeExtension(string $path, string $extension): string; /** * Check if path is writable. - * - * @param string $path - * - * @return bool */ public function isWritable(string $path): bool; /** * Tells whether a file exists and is readable. * - * @param string $filename - * * @throws \Viserio\Contract\Filesystem\Exception\IOException When windows path is longer than 258 characters - * - * @return bool */ public function isReadable(string $filename): bool; /** * Check if path is a file. - * - * @param string $file - * - * @return bool */ public function isFile(string $file): bool; @@ -375,21 +308,17 @@ public function isFile(string $file): bool; * - existing files in the target directory will be overwritten, except if they are newer (see the `override` option) * - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option) * - * @param string $originDir - * @param string $targetDir - * @param null|Traversable $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created - * @param array $config An array of boolean options - * Valid options are: - * - $config['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) - * - $config['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) - * - $config['follow_symlinks'] Whether to follow symlinks - * - $config['delete'] Whether to delete files that are not in the source directory (defaults to false) + * @param null|Traversable $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created + * @param array $config An array of boolean options + * Valid options are: + * - $config['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) + * - $config['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) + * - $config['follow_symlinks'] Whether to follow symlinks + * - $config['delete'] Whether to delete files that are not in the source directory (defaults to false) * * @throws \Viserio\Contract\Filesystem\Exception\IOException When file type is unknown * @throws \Viserio\Contract\Finder\Exception\NotFoundException * @throws Throwable - * - * @return void */ public function mirror( string $originDir, diff --git a/src/Viserio/Contract/Filesystem/LinkSystem.php b/src/Viserio/Contract/Filesystem/LinkSystem.php index 9b1bfe5b6..ca6bd51a2 100644 --- a/src/Viserio/Contract/Filesystem/LinkSystem.php +++ b/src/Viserio/Contract/Filesystem/LinkSystem.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem; @@ -28,52 +28,33 @@ interface LinkSystem * - if $path does not exist, returns null * - if $path exists, returns its absolute fully resolved final version * - * @param string $path - * @param bool $canonicalize - * * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws Throwable - * - * @return null|string */ public function readlink(string $path, bool $canonicalize = false): ?string; /** * Creates a hard link, or several hard links to a file. * - * @param string $originFile - * @param string $targetFile - * * @throws \Viserio\Contract\Filesystem\Exception\IOException When link fails, including if link already exists * @throws \Viserio\Contract\Filesystem\Exception\NotFoundException When original file is missing or not a file * @throws Throwable - * - * @return void */ public function hardlink(string $originFile, string $targetFile): void; /** * Creates a symbolic link to the target file or directory. * - * @param string $origin - * @param string $target - * * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws Throwable - * - * @return void */ public function symlink(string $origin, string $target): void; /** * Tells whether the filename is a symbolic link. * - * @param string $filename - * * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws Throwable - * - * @return bool */ public function isLink(string $filename): bool; } diff --git a/src/Viserio/Contract/Filesystem/Watcher/Adapter.php b/src/Viserio/Contract/Filesystem/Watcher/Adapter.php index 584c6d68c..03a77fa8c 100644 --- a/src/Viserio/Contract/Filesystem/Watcher/Adapter.php +++ b/src/Viserio/Contract/Filesystem/Watcher/Adapter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Watcher; @@ -17,8 +17,6 @@ interface Adapter extends Watcher { /** * Returns whether this watcher is supported on the current OS. - * - * @return bool */ public function isSupported(): bool; } diff --git a/src/Viserio/Contract/Filesystem/Watcher/Resource.php b/src/Viserio/Contract/Filesystem/Watcher/Resource.php index 4ecbcddad..dbb5ed063 100644 --- a/src/Viserio/Contract/Filesystem/Watcher/Resource.php +++ b/src/Viserio/Contract/Filesystem/Watcher/Resource.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Watcher; diff --git a/src/Viserio/Contract/Filesystem/Watcher/Watcher.php b/src/Viserio/Contract/Filesystem/Watcher/Watcher.php index 4eaeecdb4..f1b62c839 100644 --- a/src/Viserio/Contract/Filesystem/Watcher/Watcher.php +++ b/src/Viserio/Contract/Filesystem/Watcher/Watcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Filesystem\Watcher; @@ -25,8 +25,6 @@ interface Watcher * @throws \Viserio\Contract\Filesystem\Exception\IOException * @throws \Viserio\Contract\Filesystem\Exception\RuntimeException * @throws \Viserio\Contract\Filesystem\Exception\InvalidArgumentException - * - * @return void */ public function watch($path, callable $callback, ?int $timeout = null): void; } diff --git a/src/Viserio/Contract/Finder/Comparator/Comparator.php b/src/Viserio/Contract/Finder/Comparator/Comparator.php index 089980c29..dd66488b5 100644 --- a/src/Viserio/Contract/Finder/Comparator/Comparator.php +++ b/src/Viserio/Contract/Finder/Comparator/Comparator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Comparator; @@ -39,8 +39,6 @@ public function getOperator(): string; /** * Sets the comparison operator. * - * @param string $operator - * * @throws \Viserio\Contract\Finder\Exception\InvalidArgumentException */ public function setOperator(string $operator): void; @@ -49,8 +47,6 @@ public function setOperator(string $operator): void; * Tests against the target. * * @param mixed $test A test value - * - * @return bool */ public function test($test): bool; } diff --git a/src/Viserio/Contract/Finder/Comparator/DateComparator.php b/src/Viserio/Contract/Finder/Comparator/DateComparator.php index 75b2ff168..c2f56c96b 100644 --- a/src/Viserio/Contract/Finder/Comparator/DateComparator.php +++ b/src/Viserio/Contract/Finder/Comparator/DateComparator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Comparator; @@ -26,8 +26,6 @@ interface DateComparator /** * Returns the given time type. - * - * @return string */ public function getTimeType(): string; } diff --git a/src/Viserio/Contract/Finder/Exception/AccessDeniedException.php b/src/Viserio/Contract/Finder/Exception/AccessDeniedException.php index 365856304..8f22e873d 100644 --- a/src/Viserio/Contract/Finder/Exception/AccessDeniedException.php +++ b/src/Viserio/Contract/Finder/Exception/AccessDeniedException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; diff --git a/src/Viserio/Contract/Finder/Exception/Exception.php b/src/Viserio/Contract/Finder/Exception/Exception.php index 87a67f42d..37281577d 100644 --- a/src/Viserio/Contract/Finder/Exception/Exception.php +++ b/src/Viserio/Contract/Finder/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; diff --git a/src/Viserio/Contract/Finder/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Finder/Exception/InvalidArgumentException.php index d8028ef15..24732725f 100644 --- a/src/Viserio/Contract/Finder/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Finder/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; diff --git a/src/Viserio/Contract/Finder/Exception/LogicException.php b/src/Viserio/Contract/Finder/Exception/LogicException.php index 90471f287..21a009ee8 100644 --- a/src/Viserio/Contract/Finder/Exception/LogicException.php +++ b/src/Viserio/Contract/Finder/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; diff --git a/src/Viserio/Contract/Finder/Exception/NotFoundException.php b/src/Viserio/Contract/Finder/Exception/NotFoundException.php index 6379327a3..9837eecd1 100644 --- a/src/Viserio/Contract/Finder/Exception/NotFoundException.php +++ b/src/Viserio/Contract/Finder/Exception/NotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; @@ -39,12 +39,6 @@ class NotFoundException extends BaseException implements Exception /** * Create a new DirectoryNotFoundException instance. - * - * @param string $type - * @param null|string $message - * @param int $code - * @param null|Throwable $previous - * @param null|string $path */ public function __construct( string $type, @@ -69,8 +63,6 @@ public function __construct( /** * Get the file or directory path. - * - * @return null|string */ public function getPath(): ?string { @@ -79,8 +71,6 @@ public function getPath(): ?string /** * Check if exception is a file exception. - * - * @return bool */ public function isFile(): bool { @@ -89,8 +79,6 @@ public function isFile(): bool /** * Check if exception is a dir exception. - * - * @return bool */ public function isDir(): bool { diff --git a/src/Viserio/Contract/Finder/Exception/RuntimeException.php b/src/Viserio/Contract/Finder/Exception/RuntimeException.php index c61916a67..1e05242b2 100644 --- a/src/Viserio/Contract/Finder/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Finder/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; diff --git a/src/Viserio/Contract/Finder/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Finder/Exception/UnexpectedValueException.php index 9a24ab21b..0fef35822 100644 --- a/src/Viserio/Contract/Finder/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Finder/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder\Exception; diff --git a/src/Viserio/Contract/Finder/Finder.php b/src/Viserio/Contract/Finder/Finder.php index 4b9295dac..941269dbe 100644 --- a/src/Viserio/Contract/Finder/Finder.php +++ b/src/Viserio/Contract/Finder/Finder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder; @@ -55,8 +55,6 @@ public function reverseSorting(): self; * * This can be slow as all the matching files and directories must be retrieved for comparison. * - * @param Closure $closure - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function sort(Closure $closure): self; @@ -96,8 +94,6 @@ public function notContains($patterns): self; * * By default, scanning unreadable directories content throws an AccessDeniedException. * - * @param bool $ignore - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function ignoreUnreadableDirs(bool $ignore = true): self; @@ -236,8 +232,6 @@ public function size($sizes): self; * * This option is enabled by default. * - * @param bool $ignoreDotFiles - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function ignoreDotFiles(bool $ignoreDotFiles): self; @@ -247,8 +241,6 @@ public function ignoreDotFiles(bool $ignoreDotFiles): self; * * This option is enabled by default. * - * @param bool $ignoreVCS - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function ignoreVCS(bool $ignoreVCS): self; @@ -258,8 +250,6 @@ public function ignoreVCS(bool $ignoreVCS): self; * * This option is disabled by default. * - * @param bool $ignoreVCSIgnored - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function ignoreVCSIgnored(bool $ignoreVCSIgnored): self; @@ -276,8 +266,6 @@ public static function addVCSPattern($pattern): void; * * This can be slow as all the matching files and directories must be retrieved for comparison. * - * @param bool $useNaturalSort - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function sortByName(bool $useNaturalSort = false): self; @@ -332,8 +320,6 @@ public function sortByModifiedTime(): self; * The anonymous function receives a \SplFileInfo and must return false * to remove files. * - * @param callable $closure - * * @return $this(\Viserio\Contract\Finder\Finder) */ public function filter(callable $closure): self; @@ -364,8 +350,6 @@ public function append(iterable $iterator): self; /** * Check if the any results were found. - * - * @return bool */ public function hasResults(): bool; } diff --git a/src/Viserio/Contract/Finder/SplFileInfo.php b/src/Viserio/Contract/Finder/SplFileInfo.php index d4df62e82..f20df3fca 100644 --- a/src/Viserio/Contract/Finder/SplFileInfo.php +++ b/src/Viserio/Contract/Finder/SplFileInfo.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Finder; @@ -78,27 +78,17 @@ public function getSubPath(): string; public function getSubPathname(): string; /** - * @param string $directory - * * @throws \Viserio\Contract\Finder\Exception\NotFoundException - * - * @return string */ public function getRelativeFilePathFromDirectory(string $directory): string; /** * Check if the file path ends with the given string. - * - * @param string $string - * - * @return bool */ public function endsWith(string $string): bool; /** * Return the given path without a extension. - * - * @return string */ public function getFilenameWithoutExtension(): string; @@ -113,15 +103,11 @@ public function getContents(): string; /** * Normalize the path. - * - * @return string */ public function getNormalizedPathname(): string; /** * Normalize the real path. - * - * @return string */ public function getNormalizedRealPath(): string; } diff --git a/src/Viserio/Contract/Foundation/Bootstrap.php b/src/Viserio/Contract/Foundation/Bootstrap.php index 878f708e3..1ba05f15c 100644 --- a/src/Viserio/Contract/Foundation/Bootstrap.php +++ b/src/Viserio/Contract/Foundation/Bootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation; @@ -17,8 +17,6 @@ interface Bootstrap { /** * Returns the bootstrap priority. - * - * @return int */ public static function getPriority(): int; @@ -26,8 +24,6 @@ public static function getPriority(): int; * Bootstrap the given kernel. * * @param \Viserio\Contract\Foundation\Kernel $kernel - * - * @return void */ public static function bootstrap(Kernel $kernel): void; @@ -35,8 +31,6 @@ public static function bootstrap(Kernel $kernel): void; * Check when a bootstrap needs to run. * * @param \Viserio\Contract\Foundation\Kernel $kernel - * - * @return bool */ public static function isSupported(Kernel $kernel): bool; } diff --git a/src/Viserio/Contract/Foundation/BootstrapManager.php b/src/Viserio/Contract/Foundation/BootstrapManager.php index db26f6a7d..0684ab8a4 100644 --- a/src/Viserio/Contract/Foundation/BootstrapManager.php +++ b/src/Viserio/Contract/Foundation/BootstrapManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation; @@ -17,37 +17,21 @@ interface BootstrapManager { /** * Determine if the application has been bootstrapped before. - * - * @return bool */ public function hasBeenBootstrapped(): bool; /** * Register a callback to run before a bootstrapper. - * - * @param string $bootstrapper - * @param callable $callback - * - * @return void */ public function addBeforeBootstrapping(string $bootstrapper, callable $callback): void; /** * Register a callback to run after a bootstrapper. - * - * @param string $bootstrapper - * @param callable $callback - * - * @return void */ public function addAfterBootstrapping(string $bootstrapper, callable $callback): void; /** * Run the given array of bootstrap classes. - * - * @param array $bootstraps - * - * @return void */ public function bootstrapWith(array $bootstraps): void; } diff --git a/src/Viserio/Contract/Foundation/BootstrapState.php b/src/Viserio/Contract/Foundation/BootstrapState.php index 5df5e7363..dd972b08e 100644 --- a/src/Viserio/Contract/Foundation/BootstrapState.php +++ b/src/Viserio/Contract/Foundation/BootstrapState.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation; @@ -20,15 +20,11 @@ interface BootstrapState extends Bootstrap /** * Returns the bootstrap type when this bootstrap should run, before or after a parent bootstrap class. - * - * @return string */ public static function getType(): string; /** * Returns the bootstrap class for the BootstrapManger::addBeforeBootstrapping and BootstrapManger::addAfterBootstrapping function. - * - * @return string */ public static function getBootstrapper(): string; } diff --git a/src/Viserio/Contract/Foundation/CacheWarmer/CacheWarmer.php b/src/Viserio/Contract/Foundation/CacheWarmer/CacheWarmer.php index 9508842c5..5b0491189 100644 --- a/src/Viserio/Contract/Foundation/CacheWarmer/CacheWarmer.php +++ b/src/Viserio/Contract/Foundation/CacheWarmer/CacheWarmer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation\CacheWarmer; diff --git a/src/Viserio/Contract/Foundation/CacheWarmer/Warmable.php b/src/Viserio/Contract/Foundation/CacheWarmer/Warmable.php index 83349a790..4eae503be 100644 --- a/src/Viserio/Contract/Foundation/CacheWarmer/Warmable.php +++ b/src/Viserio/Contract/Foundation/CacheWarmer/Warmable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation\CacheWarmer; diff --git a/src/Viserio/Contract/Foundation/Environment.php b/src/Viserio/Contract/Foundation/Environment.php index 97f7b80a9..4aab309b7 100644 --- a/src/Viserio/Contract/Foundation/Environment.php +++ b/src/Viserio/Contract/Foundation/Environment.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation; @@ -20,9 +20,6 @@ interface Environment /** * Detect the application's current environment. * - * @param Closure $callback - * @param null|array $consoleArgs - * * @return bool|string */ public function detect(Closure $callback, ?array $consoleArgs = null); @@ -30,29 +27,21 @@ public function detect(Closure $callback, ?array $consoleArgs = null); /** * Returns true when the runtime used is HHVM or * the runtime used is PHP + Xdebug. - * - * @return bool */ public function canCollectCodeCoverage(): bool; /** * Returns the running php/HHVM version. - * - * @return string */ public function getVersion(): string; /** * Returns true when the runtime used is PHP and Xdebug is loaded. - * - * @return bool */ public function hasXdebug(): bool; /** * Returns true when the runtime used is Console. - * - * @return bool */ public function isRunningInConsole(): bool; } diff --git a/src/Viserio/Contract/Foundation/Exception/RuntimeException.php b/src/Viserio/Contract/Foundation/Exception/RuntimeException.php index 62bac9dfc..c8e11e1d0 100644 --- a/src/Viserio/Contract/Foundation/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Foundation/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation\Exception; diff --git a/src/Viserio/Contract/Foundation/Kernel.php b/src/Viserio/Contract/Foundation/Kernel.php index 7291bd883..c1eef1e93 100644 --- a/src/Viserio/Contract/Foundation/Kernel.php +++ b/src/Viserio/Contract/Foundation/Kernel.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Foundation; @@ -23,8 +23,6 @@ interface Kernel { /** * Get a Environment Detector instance. - * - * @return \Viserio\Contract\Foundation\Environment */ public function getEnvironmentDetector(): EnvironmentContract; @@ -46,8 +44,6 @@ public function setContainerBuilder(ContainerBuilderContract $containerBuilder); /** * Returns a object with \Viserio\Contract\Container\LazyProxy\Dumper interface implemented. - * - * @return null|\Viserio\Contract\Container\LazyProxy\Dumper */ public function getProxyDumper(): ?ProxyDumperContract; @@ -55,8 +51,6 @@ public function getProxyDumper(): ?ProxyDumperContract; * Gets the container's base class. * * All names except Container must be fully qualified. - * - * @return string */ public function getContainerBaseClass(): string; @@ -78,36 +72,26 @@ public function getContainer(): ContainerInterface; /** * Bootstrap the kernel. - * - * @return void */ public function bootstrap(): void; /** * Determine if application is in local environment. - * - * @return bool */ public function isLocal(): bool; /** * Determine if we are running unit tests. - * - * @return bool */ public function isRunningUnitTests(): bool; /** * Determine if we are running in the console. - * - * @return bool */ public function isRunningInConsole(): bool; /** * Determine if the application is currently down for maintenance. - * - * @return bool */ public function isDownForMaintenance(): bool; @@ -122,8 +106,6 @@ public function getRootDir(): string; * Get the path to the application "app" directory. * * @param string $path Optionally, a path to append to the app path - * - * @return string */ public function getAppPath(string $path = ''): string; @@ -135,8 +117,6 @@ public function getAppPath(string $path = ''): string; * value; however, you can theoretically change the path from here. * * @param string $path Optionally, a path to append to the config path - * - * @return string */ public function getConfigPath(string $path = ''): string; @@ -148,8 +128,6 @@ public function getConfigPath(string $path = ''): string; * free to modify the path but you probably will not ever need to. * * @param string $path Optionally, a path to append to the database path - * - * @return string */ public function getDatabasePath(string $path = ''): string; @@ -161,8 +139,6 @@ public function getDatabasePath(string $path = ''): string; * point for web requests into these applications from the outside. * * @param string $path Optionally, a path to append to the public path - * - * @return string */ public function getPublicPath(string $path = ''): string; @@ -173,8 +149,6 @@ public function getPublicPath(string $path = ''): string; * and other pieces of information. * * @param string $path Optionally, a path to append to the storage path - * - * @return string */ public function getStoragePath(string $path = ''): string; @@ -182,8 +156,6 @@ public function getStoragePath(string $path = ''): string; * Get the path to the resources directory. * * @param string $path Optionally, a path to append to the resources path - * - * @return string */ public function getResourcePath(string $path = ''): string; @@ -193,8 +165,6 @@ public function getResourcePath(string $path = ''): string; * This path is used by the language file loader to load your application * language files. The purpose of these files is to store your strings * that are translated into other languages for views, e-mails, etc. - * - * @return string */ public function getLangPath(): string; @@ -204,8 +174,6 @@ public function getLangPath(): string; * This path is used by the routes loader to load the application * routes files. In general, you should'nt need to change this * value; however, you can theoretically change the path from here. - * - * @return string */ public function getRoutesPath(): string; @@ -213,56 +181,36 @@ public function getRoutesPath(): string; * Get the path to the tests directory. * * @param string $path Optionally, a path to append to the tests path - * - * @return string */ public function getTestsPath(string $path = ''): string; /** * Set the directory for the environment file. - * - * @param string $path - * - * @return self */ public function useEnvironmentPath(string $path): self; /** * Set the environment file to be loaded during bootstrapping. - * - * @param string $file - * - * @return self */ public function loadEnvironmentFrom(string $file): self; /** * Get the path to the environment file directory. - * - * @return string */ public function getEnvironmentPath(): string; /** * Get the environment file the application is using. - * - * @return string */ public function getEnvironmentFile(): string; /** * Get the fully qualified path to the environment file. - * - * @return string */ public function getEnvironmentFilePath(): string; /** * Detect the application's current environment. - * - * @param \Closure $callback - * - * @return string */ public function detectEnvironment(Closure $callback): string; @@ -282,17 +230,11 @@ public function isDebug(): bool; /** * Detects if the current application is in debug mode. - * - * @param Closure $callback - * - * @return bool */ public function detectDebugMode(Closure $callback): bool; /** * Returns a list of all service providers that will be registered. - * - * @return array */ public function getRegisteredServiceProviders(): array; } diff --git a/src/Viserio/Contract/Http/Exception/AccessDeniedException.php b/src/Viserio/Contract/Http/Exception/AccessDeniedException.php index 0b143fd37..7bde37e22 100644 --- a/src/Viserio/Contract/Http/Exception/AccessDeniedException.php +++ b/src/Viserio/Contract/Http/Exception/AccessDeniedException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/BadMethodCallException.php b/src/Viserio/Contract/Http/Exception/BadMethodCallException.php index 287e0916c..41fc7733e 100644 --- a/src/Viserio/Contract/Http/Exception/BadMethodCallException.php +++ b/src/Viserio/Contract/Http/Exception/BadMethodCallException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/Exception.php b/src/Viserio/Contract/Http/Exception/Exception.php index d30c96f40..83389b75e 100644 --- a/src/Viserio/Contract/Http/Exception/Exception.php +++ b/src/Viserio/Contract/Http/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/FileException.php b/src/Viserio/Contract/Http/Exception/FileException.php index 51b81ce87..84c6f346b 100644 --- a/src/Viserio/Contract/Http/Exception/FileException.php +++ b/src/Viserio/Contract/Http/Exception/FileException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/FileNotFoundException.php b/src/Viserio/Contract/Http/Exception/FileNotFoundException.php index 5881a63b2..f4de77148 100644 --- a/src/Viserio/Contract/Http/Exception/FileNotFoundException.php +++ b/src/Viserio/Contract/Http/Exception/FileNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Http/Exception/InvalidArgumentException.php index 5597d7d7c..a76d67053 100644 --- a/src/Viserio/Contract/Http/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Http/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/LogicException.php b/src/Viserio/Contract/Http/Exception/LogicException.php index c5ce7a2b6..ad1606d8d 100644 --- a/src/Viserio/Contract/Http/Exception/LogicException.php +++ b/src/Viserio/Contract/Http/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/RuntimeException.php b/src/Viserio/Contract/Http/Exception/RuntimeException.php index 5be73de4f..84823ee1b 100644 --- a/src/Viserio/Contract/Http/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Http/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/Http/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Http/Exception/UnexpectedValueException.php index 8bb27b62e..aec684861 100644 --- a/src/Viserio/Contract/Http/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Http/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Http\Exception; diff --git a/src/Viserio/Contract/HttpFactory/Traits/RequestFactoryAwareTrait.php b/src/Viserio/Contract/HttpFactory/Traits/RequestFactoryAwareTrait.php index 2551fc9c6..2c9869a43 100644 --- a/src/Viserio/Contract/HttpFactory/Traits/RequestFactoryAwareTrait.php +++ b/src/Viserio/Contract/HttpFactory/Traits/RequestFactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Traits; @@ -27,8 +27,6 @@ trait RequestFactoryAwareTrait /** * Set a RequestFactory instance. * - * @param \Psr\Http\Message\RequestFactoryInterface $requestFactory - * * @return static */ public function setRequestFactory(RequestFactoryInterface $requestFactory): self diff --git a/src/Viserio/Contract/HttpFactory/Traits/ResponseFactoryAwareTrait.php b/src/Viserio/Contract/HttpFactory/Traits/ResponseFactoryAwareTrait.php index c08bf2104..041feeafa 100644 --- a/src/Viserio/Contract/HttpFactory/Traits/ResponseFactoryAwareTrait.php +++ b/src/Viserio/Contract/HttpFactory/Traits/ResponseFactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Traits; @@ -27,8 +27,6 @@ trait ResponseFactoryAwareTrait /** * Set a ResponseFactory instance. * - * @param \Psr\Http\Message\ResponseFactoryInterface $responseFactory - * * @return static */ public function setResponseFactory(ResponseFactoryInterface $responseFactory): self diff --git a/src/Viserio/Contract/HttpFactory/Traits/ServerRequestFactoryAwareTrait.php b/src/Viserio/Contract/HttpFactory/Traits/ServerRequestFactoryAwareTrait.php index a3ae96108..eefc596ea 100644 --- a/src/Viserio/Contract/HttpFactory/Traits/ServerRequestFactoryAwareTrait.php +++ b/src/Viserio/Contract/HttpFactory/Traits/ServerRequestFactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Traits; @@ -27,8 +27,6 @@ trait ServerRequestFactoryAwareTrait /** * Set a ServerRequest instance. * - * @param \Psr\Http\Message\ServerRequestFactoryInterface $serverRequestFactory - * * @return static */ public function setServerRequestFactory(ServerRequestFactoryInterface $serverRequestFactory): self diff --git a/src/Viserio/Contract/HttpFactory/Traits/StreamFactoryAwareTrait.php b/src/Viserio/Contract/HttpFactory/Traits/StreamFactoryAwareTrait.php index 86cced9ac..71087e247 100644 --- a/src/Viserio/Contract/HttpFactory/Traits/StreamFactoryAwareTrait.php +++ b/src/Viserio/Contract/HttpFactory/Traits/StreamFactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Traits; @@ -27,8 +27,6 @@ trait StreamFactoryAwareTrait /** * Set a StreamFactory instance. * - * @param \Psr\Http\Message\StreamFactoryInterface $streamFactory - * * @return static */ public function setStreamFactory(StreamFactoryInterface $streamFactory): self diff --git a/src/Viserio/Contract/HttpFactory/Traits/UploadedFileFactoryAwareTrait.php b/src/Viserio/Contract/HttpFactory/Traits/UploadedFileFactoryAwareTrait.php index ac3b57d6c..62d70e40e 100644 --- a/src/Viserio/Contract/HttpFactory/Traits/UploadedFileFactoryAwareTrait.php +++ b/src/Viserio/Contract/HttpFactory/Traits/UploadedFileFactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Traits; @@ -27,8 +27,6 @@ trait UploadedFileFactoryAwareTrait /** * Set a UploadedFileFactory instance. * - * @param \Psr\Http\Message\UploadedFileFactoryInterface $uploadedFileFactory - * * @return static */ public function setUploadedFileFactory(UploadedFileFactoryInterface $uploadedFileFactory): self diff --git a/src/Viserio/Contract/HttpFactory/Traits/UriFactoryAwareTrait.php b/src/Viserio/Contract/HttpFactory/Traits/UriFactoryAwareTrait.php index 031366785..c359a2da5 100644 --- a/src/Viserio/Contract/HttpFactory/Traits/UriFactoryAwareTrait.php +++ b/src/Viserio/Contract/HttpFactory/Traits/UriFactoryAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Traits; @@ -27,8 +27,6 @@ trait UriFactoryAwareTrait /** * Set a UriFactory instance. * - * @param \Psr\Http\Message\UriFactoryInterface $uriFactory - * * @return static */ public function setUriFactory(UriFactoryInterface $uriFactory): self diff --git a/src/Viserio/Contract/HttpFoundation/HttpKernel.php b/src/Viserio/Contract/HttpFoundation/HttpKernel.php index 2cc35486c..e1e5bdcdb 100644 --- a/src/Viserio/Contract/HttpFoundation/HttpKernel.php +++ b/src/Viserio/Contract/HttpFoundation/HttpKernel.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFoundation; @@ -63,10 +63,6 @@ interface HttpKernel extends KernelContract /** * Handle an incoming HTTP request. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * - * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $serverRequest): ResponseInterface; } diff --git a/src/Viserio/Contract/HttpFoundation/Terminable.php b/src/Viserio/Contract/HttpFoundation/Terminable.php index 11c567e5b..5575577cc 100644 --- a/src/Viserio/Contract/HttpFoundation/Terminable.php +++ b/src/Viserio/Contract/HttpFoundation/Terminable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFoundation; @@ -31,11 +31,6 @@ interface Terminable * Terminates a request/response cycle. * * Should be called after sending the response and before shutting down the kernel. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return void */ public function terminate(ServerRequestInterface $serverRequest, ResponseInterface $response): void; } diff --git a/src/Viserio/Contract/Log/Exception/Exception.php b/src/Viserio/Contract/Log/Exception/Exception.php index e9b8f1639..8110eb8ac 100644 --- a/src/Viserio/Contract/Log/Exception/Exception.php +++ b/src/Viserio/Contract/Log/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Log\Exception; diff --git a/src/Viserio/Contract/Log/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Log/Exception/InvalidArgumentException.php index 48cb3c37e..fc2373290 100644 --- a/src/Viserio/Contract/Log/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Log/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Log\Exception; diff --git a/src/Viserio/Contract/Log/Exception/RuntimeException.php b/src/Viserio/Contract/Log/Exception/RuntimeException.php index 6777441af..78c00e8d5 100644 --- a/src/Viserio/Contract/Log/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Log/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Log\Exception; diff --git a/src/Viserio/Contract/Mail/Exception/Exception.php b/src/Viserio/Contract/Mail/Exception/Exception.php index f2714ab5a..e7517154b 100644 --- a/src/Viserio/Contract/Mail/Exception/Exception.php +++ b/src/Viserio/Contract/Mail/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Mail\Exception; diff --git a/src/Viserio/Contract/Mail/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Mail/Exception/InvalidArgumentException.php index 50d6e30ba..264a280bc 100644 --- a/src/Viserio/Contract/Mail/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Mail/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Mail\Exception; diff --git a/src/Viserio/Contract/Mail/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Mail/Exception/UnexpectedValueException.php index 7c8419a21..bf6605f5d 100644 --- a/src/Viserio/Contract/Mail/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Mail/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Mail\Exception; diff --git a/src/Viserio/Contract/Mail/Mailer.php b/src/Viserio/Contract/Mail/Mailer.php index ededb4255..a91c854b7 100644 --- a/src/Viserio/Contract/Mail/Mailer.php +++ b/src/Viserio/Contract/Mail/Mailer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Mail; @@ -19,52 +19,28 @@ interface Mailer { /** * Set the global from address and name. - * - * @param string $address - * @param null|string $name - * - * @return void */ public function alwaysFrom(string $address, ?string $name = null): void; /** * Set the global to address and name. - * - * @param string $address - * @param null|string $name - * - * @return void */ public function alwaysTo(string $address, ?string $name = null): void; /** * Set the global reply-to address and name. * - * @param string $address * @param null|string $name - * - * @return void */ public function alwaysReplyTo(string $address, $name = null): void; /** * Send a new message when only a raw text part. - * - * @param string $text - * @param mixed $callback - * - * @return int */ public function raw(string $text, $callback): int; /** * Send a new message when only a plain part. - * - * @param string $view - * @param array $data - * @param mixed $callback - * - * @return int */ public function plain(string $view, array $data, $callback): int; @@ -72,17 +48,12 @@ public function plain(string $view, array $data, $callback): int; * Send a new message using a view. * * @param array|string $view - * @param array $data * @param null|Closure|string $callback - * - * @return int */ public function send($view, array $data = [], $callback = null): int; /** * Get the array of failed recipients. - * - * @return array */ public function failures(): array; } diff --git a/src/Viserio/Contract/Mail/Message.php b/src/Viserio/Contract/Mail/Message.php index 1595aa5cb..52079e774 100644 --- a/src/Viserio/Contract/Mail/Message.php +++ b/src/Viserio/Contract/Mail/Message.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Mail; @@ -17,30 +17,16 @@ interface Message { /** * Add a "from" address to the message. - * - * @param string $address - * @param null|string $name - * - * @return self */ public function from(string $address, ?string $name = null): self; /** * Set the "sender" of the message. - * - * @param string $address - * @param null|string $name - * - * @return self */ public function sender(string $address, ?string $name = null): self; /** * Set the "return path" of the message. - * - * @param string $address - * - * @return self */ public function returnPath(string $address): self; @@ -48,10 +34,7 @@ public function returnPath(string $address): self; * Add a recipient to the message. * * @param array|string $address - * @param null|string $name * @param bool $override Will force ignoring the previous recipients - * - * @return self */ public function to($address, ?string $name = null, bool $override = false): self; @@ -59,10 +42,7 @@ public function to($address, ?string $name = null, bool $override = false): self * Add a Chronos copy to the message. * * @param array|string $address - * @param null|string $name * @param bool $override Will force ignoring the previous recipients - * - * @return self */ public function cc($address, ?string $name = null, bool $override = false): self; @@ -70,79 +50,42 @@ public function cc($address, ?string $name = null, bool $override = false): self * Add a blind Chronos copy to the message. * * @param array|string $address - * @param null|string $name * @param bool $override Will force ignoring the previous recipients - * - * @return self */ public function bcc($address, ?string $name = null, bool $override = false): self; /** * Add a reply to address to the message. - * - * @param string $address - * @param null|string $name - * - * @return self */ public function replyTo(string $address, ?string $name = null): self; /** * Set the subject of the message. - * - * @param string $subject - * - * @return self */ public function subject(string $subject): self; /** * Set the message priority level. - * - * @param int $level - * - * @return self */ public function priority(int $level): self; /** * Attach a file to the message. - * - * @param string $file - * @param array $options - * - * @return self */ public function attach(string $file, array $options = []): self; /** * Attach in-memory data as an attachment. - * - * @param string $data - * @param string $name - * @param array $options - * - * @return self */ public function attachData(string $data, string $name, array $options = []): self; /** * Embed a file in the message and get the CID. - * - * @param string $file - * - * @return string */ public function embed(string $file): string; /** * Embed in-memory data in the message and get the CID. - * - * @param string $data - * @param string $name - * @param null|string $contentType - * - * @return string */ public function embedData(string $data, string $name, ?string $contentType = null): string; } diff --git a/src/Viserio/Contract/Mail/QueueMailer.php b/src/Viserio/Contract/Mail/QueueMailer.php index a392c1f68..a0f914d93 100644 --- a/src/Viserio/Contract/Mail/QueueMailer.php +++ b/src/Viserio/Contract/Mail/QueueMailer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Mail; @@ -21,8 +21,6 @@ interface QueueMailer extends Mailer { /** * Get the queue manager instance. - * - * @return \Viserio\Contract\Queue\QueueConnector */ public function getQueue(): QueueConnectorContract; @@ -30,36 +28,23 @@ public function getQueue(): QueueConnectorContract; * Queue a new e-mail message for sending. * * @param array|string $view - * @param array $data * @param Closure|string $callback - * @param null|string $queue - * - * @return mixed */ public function queue($view, array $data = [], $callback = null, ?string $queue = null); /** * Queue a new e-mail message for sending on the given queue. * - * @param string $queue * @param array|string $view - * @param array $data * @param Closure|string $callback - * - * @return mixed */ public function onQueue(string $queue, $view, array $data, $callback); /** * Queue a new e-mail message for sending after (n) seconds. * - * @param int $delay * @param array|string $view - * @param array $data * @param Closure|string $callback - * @param null|string $queue - * - * @return mixed */ public function later( int $delay, @@ -72,13 +57,8 @@ public function later( /** * Queue a new e-mail message for sending after (n) seconds on the given queue. * - * @param string $queue - * @param int $delay * @param array|string $view - * @param array $data * @param Closure|string $callback - * - * @return mixed */ public function laterOn( string $queue, @@ -90,9 +70,6 @@ public function laterOn( /** * Handle a queued e-mail message job. - * - * @param \Viserio\Contract\Queue\Job $job - * @param array $data */ public function handleQueuedMessage(JobContract $job, array $data); } diff --git a/src/Viserio/Contract/Manager/ConnectionManager.php b/src/Viserio/Contract/Manager/ConnectionManager.php index abaaa6a2f..64ad0fc68 100644 --- a/src/Viserio/Contract/Manager/ConnectionManager.php +++ b/src/Viserio/Contract/Manager/ConnectionManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Manager; @@ -19,61 +19,36 @@ interface ConnectionManager { /** * Get manager config. - * - * @return array */ public function getConfig(): array; /** * Get a connection instance. - * - * @param null|string $name - * - * @return mixed */ public function getConnection(?string $name = null); /** * Reconnect to the given connection. - * - * @param null|string $name - * - * @return object */ public function reconnect(?string $name = null): object; /** * Disconnect from the given connection. - * - * @param null|string $name - * - * @return void */ public function disconnect(?string $name = null): void; /** * Get the default connection name. - * - * @return string */ public function getDefaultConnection(): string; /** * Set the default connection name. - * - * @param string $name - * - * @return void */ public function setDefaultConnection(string $name): void; /** * Register a custom connection creator. - * - * @param string $driver - * @param Closure $callback - * - * @return void */ public function extend(string $driver, Closure $callback): void; @@ -86,30 +61,18 @@ public function getConnections(): array; /** * Check if the given connect is supported. - * - * @param string $connect - * - * @return bool */ public function hasConnection(string $connect): bool; /** * Get the configuration for a connection. - * - * @param string $name - * - * @return array */ public function getConnectionConfig(string $name): array; /** * Make the connection instance. * - * @param array $config - * * @throws \Viserio\Contract\Manager\Exception\InvalidArgumentException - * - * @return mixed */ public function createConnection(array $config); } diff --git a/src/Viserio/Contract/Manager/Exception/Exception.php b/src/Viserio/Contract/Manager/Exception/Exception.php index e3a89a53c..510c18743 100644 --- a/src/Viserio/Contract/Manager/Exception/Exception.php +++ b/src/Viserio/Contract/Manager/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Manager\Exception; diff --git a/src/Viserio/Contract/Manager/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Manager/Exception/InvalidArgumentException.php index 2f7dc46d3..29ddba463 100644 --- a/src/Viserio/Contract/Manager/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Manager/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Manager\Exception; diff --git a/src/Viserio/Contract/Manager/Manager.php b/src/Viserio/Contract/Manager/Manager.php index 487327b38..b4e5e8b6d 100644 --- a/src/Viserio/Contract/Manager/Manager.php +++ b/src/Viserio/Contract/Manager/Manager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Manager; @@ -19,79 +19,48 @@ interface Manager { /** * Get manager config. - * - * @return array */ public function getConfig(): array; /** * Get the default driver name. - * - * @return string */ public function getDefaultDriver(): string; /** * Set the default driver name. - * - * @param string $name - * - * @return void */ public function setDefaultDriver(string $name): void; /** * Get a driver instance. - * - * @param null|string $driver - * - * @return mixed */ public function getDriver(?string $driver = null); /** * Register a custom driver creator Closure. - * - * @param string $driver - * @param Closure $callback - * - * @return void */ public function extend(string $driver, Closure $callback): void; /** * Get all of the created "drivers". - * - * @return array */ public function getDrivers(): array; /** * Check if the given driver is supported. - * - * @param string $driver - * - * @return bool */ public function hasDriver(string $driver): bool; /** * Get the configuration for a driver. - * - * @param string $name - * - * @return array */ public function getDriverConfig(string $name): array; /** * Make a new driver instance. * - * @param array $config - * * @throws \Viserio\Contract\Manager\Exception\InvalidArgumentException - * - * @return mixed */ public function createDriver(array $config); } diff --git a/src/Viserio/Contract/Pagination/Adapter.php b/src/Viserio/Contract/Pagination/Adapter.php index 7c7c2a177..b53c57e16 100644 --- a/src/Viserio/Contract/Pagination/Adapter.php +++ b/src/Viserio/Contract/Pagination/Adapter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Pagination; @@ -17,15 +17,11 @@ interface Adapter { /** * Returns an array of all items. - * - * @return array */ public function getItems(): array; /** * Returns an number of items for a page. - * - * @return int */ public function getItemsPerPage(): int; } diff --git a/src/Viserio/Contract/Pagination/Paginator.php b/src/Viserio/Contract/Pagination/Paginator.php index 600982951..566abc520 100644 --- a/src/Viserio/Contract/Pagination/Paginator.php +++ b/src/Viserio/Contract/Pagination/Paginator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Pagination; @@ -17,69 +17,41 @@ interface Paginator { /** * Render the pagination using the given view. - * - * @param null|string $view - * - * @return string */ public function render(?string $view = null): string; /** * Create a range of pagination URLs. - * - * @param int $start - * @param int $end - * - * @return array */ public function getUrlRange(int $start, int $end): array; /** * Get the URL for the next page. - * - * @return null|string */ public function getNextPageUrl(): ?string; /** * Get the URL for a given page number. - * - * @param int $page - * - * @return string */ public function getUrl(int $page): string; /** * Get the URL for the previous page. - * - * @return null|string */ public function getPreviousPageUrl(): ?string; /** * Add a query string value to the paginator. - * - * @param string $key - * @param string $value - * - * @return self */ public function addQuery(string $key, string $value): self; /** * Set the URL fragment to be appended to URLs. - * - * @param string $fragment - * - * @return self */ public function setFragment(string $fragment): self; /** * Get the URL fragment to be appended to URLs. - * - * @return null|string */ public function getFragment(): ?string; @@ -87,104 +59,71 @@ public function getFragment(): ?string; * Add a set of query string values to the paginator. * * @param array|string $key - * @param null|string $value - * - * @return self */ public function appends($key, ?string $value = null): self; /** * Get the query string variable used to store the page. - * - * @return string */ public function getPageName(): string; /** * Set the query string variable used to store the page. - * - * @param string $name - * - * @return self */ public function setPageName(string $name): self; /** * Set the base path to assign to all URLs. - * - * @param string $path - * - * @return self */ public function setPath(string $path): self; /** * Gets the base path. - * - * @return string */ public function getPath(): string; /** * Determine if the list of items is empty or not. - * - * @return bool */ public function isEmpty(): bool; /** * Get the slice of items being paginated. - * - * @return array */ public function getItems(): array; /** * Get the number of the first item in the slice. - * - * @return int */ public function getFirstItem(): int; /** * Get the number of the last item in the slice. - * - * @return int */ public function getLastItem(): int; /** * Determine if the pagination is on the first page. - * - * @return bool */ public function onFirstPage(): bool; /** * Get the number of items shown per page. - * - * @return int */ public function getItemsPerPage(): int; /** * Get the current page. - * - * @return int */ public function getCurrentPage(): int; /** * Determine if there are enough items to split into multiple pages. - * - * @return bool */ public function hasPages(): bool; /** * Determine if there are more items in the data source. - * - * @return bool */ public function hasMorePages(): bool; } diff --git a/src/Viserio/Contract/Pagination/Presenter.php b/src/Viserio/Contract/Pagination/Presenter.php index a29caba57..3a9f13937 100644 --- a/src/Viserio/Contract/Pagination/Presenter.php +++ b/src/Viserio/Contract/Pagination/Presenter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Pagination; diff --git a/src/Viserio/Contract/Parser/Dumper.php b/src/Viserio/Contract/Parser/Dumper.php index c36c980ae..3b695b1bd 100644 --- a/src/Viserio/Contract/Parser/Dumper.php +++ b/src/Viserio/Contract/Parser/Dumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser; @@ -21,8 +21,6 @@ interface Dumper * @param array $data * * @throws \Viserio\Contract\Parser\Exception\DumpException If dumping fails on some formats - * - * @return string */ public function dump(array $data): string; } diff --git a/src/Viserio/Contract/Parser/Exception/DumpException.php b/src/Viserio/Contract/Parser/Exception/DumpException.php index 0bdd630c3..5ee4bd8e5 100644 --- a/src/Viserio/Contract/Parser/Exception/DumpException.php +++ b/src/Viserio/Contract/Parser/Exception/DumpException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Exception/Exception.php b/src/Viserio/Contract/Parser/Exception/Exception.php index a2feb0d77..7515d336c 100644 --- a/src/Viserio/Contract/Parser/Exception/Exception.php +++ b/src/Viserio/Contract/Parser/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Exception/FileNotFoundException.php b/src/Viserio/Contract/Parser/Exception/FileNotFoundException.php index 633aa5dff..bedfb7354 100644 --- a/src/Viserio/Contract/Parser/Exception/FileNotFoundException.php +++ b/src/Viserio/Contract/Parser/Exception/FileNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Parser/Exception/InvalidArgumentException.php index 9fbcf5d66..f67c0e30a 100644 --- a/src/Viserio/Contract/Parser/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Parser/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Exception/LoadingException.php b/src/Viserio/Contract/Parser/Exception/LoadingException.php index 96c31f9c4..85b7f41d5 100644 --- a/src/Viserio/Contract/Parser/Exception/LoadingException.php +++ b/src/Viserio/Contract/Parser/Exception/LoadingException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Exception/NotSupportedException.php b/src/Viserio/Contract/Parser/Exception/NotSupportedException.php index e7b7a5a21..3101e72aa 100644 --- a/src/Viserio/Contract/Parser/Exception/NotSupportedException.php +++ b/src/Viserio/Contract/Parser/Exception/NotSupportedException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Exception/ParseException.php b/src/Viserio/Contract/Parser/Exception/ParseException.php index 8623985d4..11041168b 100644 --- a/src/Viserio/Contract/Parser/Exception/ParseException.php +++ b/src/Viserio/Contract/Parser/Exception/ParseException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; @@ -19,12 +19,6 @@ class ParseException extends RuntimeException { /** * Create a new ParseException instance. - * - * @param string $message - * @param int $code - * @param string $file - * @param int $line - * @param null|Throwable $exception */ public function __construct( string $message, @@ -42,9 +36,6 @@ public function __construct( /** * Helper to create exception from a catch exception. * - * @param string $message - * @param \Throwable $exception - * * @return static */ public static function createFromException(string $message, Throwable $exception): self diff --git a/src/Viserio/Contract/Parser/Exception/RuntimeException.php b/src/Viserio/Contract/Parser/Exception/RuntimeException.php index 2130604ff..30319ea05 100644 --- a/src/Viserio/Contract/Parser/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Parser/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Exception; diff --git a/src/Viserio/Contract/Parser/Loader.php b/src/Viserio/Contract/Parser/Loader.php index b8e6ba151..033b34f36 100644 --- a/src/Viserio/Contract/Parser/Loader.php +++ b/src/Viserio/Contract/Parser/Loader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser; @@ -19,8 +19,6 @@ interface Loader * Set directories. * * @param array $directories - * - * @return self */ public function setDirectories(array $directories): self; @@ -33,17 +31,12 @@ public function getDirectories(): array; /** * Add directory. - * - * @param string $directory - * - * @return self */ public function addDirectory(string $directory): self; /** * Load the given file path. * - * @param string $file * @param null|array $options * * @throws \Viserio\Contract\Parser\Exception\RuntimeException if wrong options are given @@ -57,11 +50,7 @@ public function load(string $file, ?array $options = null): array; /** * Determine if the given file exists. * - * @param string $file - * * @throws \Viserio\Contract\Parser\Exception\FileNotFoundException - * - * @return string */ public function exists(string $file): string; } diff --git a/src/Viserio/Contract/Parser/Parser.php b/src/Viserio/Contract/Parser/Parser.php index 1bf3fa362..c691c1e5e 100644 --- a/src/Viserio/Contract/Parser/Parser.php +++ b/src/Viserio/Contract/Parser/Parser.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser; diff --git a/src/Viserio/Contract/Parser/Traits/ParserAwareTrait.php b/src/Viserio/Contract/Parser/Traits/ParserAwareTrait.php index b030e56e0..52c9d3529 100644 --- a/src/Viserio/Contract/Parser/Traits/ParserAwareTrait.php +++ b/src/Viserio/Contract/Parser/Traits/ParserAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Traits; @@ -27,8 +27,6 @@ trait ParserAwareTrait /** * Set a loader instance. * - * @param \Viserio\Contract\Parser\Loader $loader - * * @return static */ public function setLoader(LoaderContract $loader): self diff --git a/src/Viserio/Contract/Pipeline/Exception/Exception.php b/src/Viserio/Contract/Pipeline/Exception/Exception.php index fbb2717f0..23fc3ae59 100644 --- a/src/Viserio/Contract/Pipeline/Exception/Exception.php +++ b/src/Viserio/Contract/Pipeline/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Pipeline\Exception; diff --git a/src/Viserio/Contract/Pipeline/Exception/RuntimeException.php b/src/Viserio/Contract/Pipeline/Exception/RuntimeException.php index 9e1d5912f..33dc168f8 100644 --- a/src/Viserio/Contract/Pipeline/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Pipeline/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Pipeline\Exception; diff --git a/src/Viserio/Contract/Pipeline/Pipeline.php b/src/Viserio/Contract/Pipeline/Pipeline.php index ec402a5b2..4b4c5e330 100644 --- a/src/Viserio/Contract/Pipeline/Pipeline.php +++ b/src/Viserio/Contract/Pipeline/Pipeline.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Pipeline; @@ -19,10 +19,6 @@ interface Pipeline { /** * Set the traveler object being sent on the pipeline. - * - * @param mixed $traveler - * - * @return self */ public function send($traveler): self; @@ -30,26 +26,16 @@ public function send($traveler): self; * Set the array of stages. * * @param array|mixed $stages - * - * @return self */ public function through($stages): self; /** * Run the pipeline with a final destination callback. - * - * @param Closure $destination - * - * @return mixed */ public function then(Closure $destination); /** * Set the method to call on the stages. - * - * @param string $method - * - * @return self */ public function via(string $method): self; } diff --git a/src/Viserio/Contract/Profiler/AssetAware.php b/src/Viserio/Contract/Profiler/AssetAware.php index 160608c83..612264a6e 100644 --- a/src/Viserio/Contract/Profiler/AssetAware.php +++ b/src/Viserio/Contract/Profiler/AssetAware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler; @@ -19,8 +19,6 @@ interface AssetAware extends DataCollector * Returns an array with the following keys: * - css: an array of filenames * - js: an array of filenames. - * - * @return array */ public function getAssets(): array; } diff --git a/src/Viserio/Contract/Profiler/AssetsRenderer.php b/src/Viserio/Contract/Profiler/AssetsRenderer.php index f896b0a18..d8a7f003a 100644 --- a/src/Viserio/Contract/Profiler/AssetsRenderer.php +++ b/src/Viserio/Contract/Profiler/AssetsRenderer.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler; @@ -21,41 +21,26 @@ interface AssetsRenderer extends RenderableContract * Set the Profiler. * * @param \Viserio\Contract\Profiler\Profiler $profiler - * - * @return self */ public function setProfiler(Profiler $profiler): self; /** * Add icon to list. - * - * @param string $name - * @param string $path - * - * @return self */ public function setIcon(string $name, string $path): self; /** * Get all registered icons. - * - * @return array */ public function getIcons(): array; /** * Ignores widgets provided by a collector. - * - * @param string $name - * - * @return self */ public function setIgnoredCollector(string $name): self; /** * Returns the list of ignored collectors. - * - * @return array */ public function getIgnoredCollectors(): array; @@ -63,8 +48,6 @@ public function getIgnoredCollectors(): array; * Return assets as a string. * * @param string $type 'js' or 'css' - * - * @return string */ public function dumpAssetsToString(string $type): string; @@ -72,8 +55,6 @@ public function dumpAssetsToString(string $type): string; * Returns the list of asset files. * * @param null|string $type Only return css or js files - * - * @return array */ public function getAssets(?string $type = null): array; } diff --git a/src/Viserio/Contract/Profiler/DataCollector.php b/src/Viserio/Contract/Profiler/DataCollector.php index 5d010e9ed..4e172516c 100644 --- a/src/Viserio/Contract/Profiler/DataCollector.php +++ b/src/Viserio/Contract/Profiler/DataCollector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler; @@ -20,18 +20,11 @@ interface DataCollector { /** * Collects data for the given Request. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return void */ public function collect(ServerRequestInterface $serverRequest, ResponseInterface $response): void; /** * Returns the unique name of the collector. - * - * @return string */ public function getName(): string; @@ -41,23 +34,17 @@ public function getName(): string; * - label * - value * - class. - * - * @return array */ public function getMenu(): array; /** * Get the Tab position from a collector. * Choose between left or right position. - * - * @return string */ public function getMenuPosition(): string; /** * Resets this data collector to its initial state. - * - * @return void */ public function reset(): void; } diff --git a/src/Viserio/Contract/Profiler/Exception/CollectorNotFoundException.php b/src/Viserio/Contract/Profiler/Exception/CollectorNotFoundException.php index b03e6f2c9..99fc001b9 100644 --- a/src/Viserio/Contract/Profiler/Exception/CollectorNotFoundException.php +++ b/src/Viserio/Contract/Profiler/Exception/CollectorNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler\Exception; diff --git a/src/Viserio/Contract/Profiler/Exception/Exception.php b/src/Viserio/Contract/Profiler/Exception/Exception.php index 96838153c..9a200dfd4 100644 --- a/src/Viserio/Contract/Profiler/Exception/Exception.php +++ b/src/Viserio/Contract/Profiler/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler\Exception; diff --git a/src/Viserio/Contract/Profiler/Exception/RuntimeException.php b/src/Viserio/Contract/Profiler/Exception/RuntimeException.php index 60b13a4ce..c4d7d45ea 100644 --- a/src/Viserio/Contract/Profiler/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Profiler/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler\Exception; diff --git a/src/Viserio/Contract/Profiler/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Profiler/Exception/UnexpectedValueException.php index bdad84f1a..3b8d9e6fa 100644 --- a/src/Viserio/Contract/Profiler/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Profiler/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler\Exception; diff --git a/src/Viserio/Contract/Profiler/PanelAware.php b/src/Viserio/Contract/Profiler/PanelAware.php index 93c5b494e..afe606848 100644 --- a/src/Viserio/Contract/Profiler/PanelAware.php +++ b/src/Viserio/Contract/Profiler/PanelAware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler; @@ -17,8 +17,6 @@ interface PanelAware extends DataCollector { /** * Returns all data in a panel window. - * - * @return string */ public function getPanel(): string; } diff --git a/src/Viserio/Contract/Profiler/Profiler.php b/src/Viserio/Contract/Profiler/Profiler.php index 3ae95b644..697a275b0 100644 --- a/src/Viserio/Contract/Profiler/Profiler.php +++ b/src/Viserio/Contract/Profiler/Profiler.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler; @@ -23,31 +23,21 @@ interface Profiler { /** * Disables the profiler. - * - * @return void */ public function disable(): void; /** * Enables the profiler. - * - * @return void */ public function enable(): void; /** * Set the Profiler template path. - * - * @param string $path - * - * @return self */ public function setTemplate(string $path): self; /** * Get the Profiler template path. - * - * @return string */ public function getTemplate(): string; @@ -61,38 +51,22 @@ public function getAssetsRenderer(): AssetsRenderer; /** * Adds a data collector. * - * @param \Viserio\Contract\Profiler\DataCollector $collector - * @param int $priority - * * @throws RuntimeException - * - * @return self */ public function addCollector(DataCollectorContract $collector, int $priority = 100): self; /** * Checks if a data collector has been added. - * - * @param string $name - * - * @return bool */ public function hasCollector(string $name): bool; /** * Returns an array of all data collectors. - * - * @return array */ public function getCollectors(): array; /** * Modify the response and inject the debugbar. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * @param \Psr\Http\Message\ResponseInterface $response - * - * @return \Psr\Http\Message\ResponseInterface */ public function modifyResponse( ServerRequestInterface $serverRequest, @@ -101,24 +75,16 @@ public function modifyResponse( /** * Set a url generator instance. - * - * @param \Viserio\Contract\Routing\UrlGenerator $urlGenerator - * - * @return self */ public function setUrlGenerator(UrlGeneratorContract $urlGenerator): self; /** * Get a url generator instance. - * - * @return null|\Viserio\Contract\Routing\UrlGenerator */ public function getUrlGenerator(): ?UrlGeneratorContract; /** * Reset the profiler data. - * - * @return void */ public function reset(): void; } diff --git a/src/Viserio/Contract/Profiler/TooltipAware.php b/src/Viserio/Contract/Profiler/TooltipAware.php index 2c260c321..c97349b9e 100644 --- a/src/Viserio/Contract/Profiler/TooltipAware.php +++ b/src/Viserio/Contract/Profiler/TooltipAware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Profiler; @@ -17,8 +17,6 @@ interface TooltipAware extends DataCollector { /** * Returns infos for a tooltip. - * - * @return string */ public function getTooltip(): string; } diff --git a/src/Viserio/Contract/Queue/Exception/Exception.php b/src/Viserio/Contract/Queue/Exception/Exception.php index 4f7f53196..5cf7cab1c 100644 --- a/src/Viserio/Contract/Queue/Exception/Exception.php +++ b/src/Viserio/Contract/Queue/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue\Exception; diff --git a/src/Viserio/Contract/Queue/Exception/TimeoutException.php b/src/Viserio/Contract/Queue/Exception/TimeoutException.php index 46753b5b9..ce5916cff 100644 --- a/src/Viserio/Contract/Queue/Exception/TimeoutException.php +++ b/src/Viserio/Contract/Queue/Exception/TimeoutException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue\Exception; diff --git a/src/Viserio/Contract/Queue/Factory.php b/src/Viserio/Contract/Queue/Factory.php index d7e52d718..b9857cc88 100644 --- a/src/Viserio/Contract/Queue/Factory.php +++ b/src/Viserio/Contract/Queue/Factory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -17,10 +17,6 @@ interface Factory { /** * Get a connection instance. - * - * @param null|string $name - * - * @return mixed */ public function getConnection(?string $name = null); } diff --git a/src/Viserio/Contract/Queue/FailedJobProvider.php b/src/Viserio/Contract/Queue/FailedJobProvider.php index 64b0f203c..df8fbb71d 100644 --- a/src/Viserio/Contract/Queue/FailedJobProvider.php +++ b/src/Viserio/Contract/Queue/FailedJobProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -17,37 +17,21 @@ interface FailedJobProvider { /** * Log a failed job into storage. - * - * @param string $connection - * @param string $queue - * @param string $payload - * - * @return null|int */ public function log(string $connection, string $queue, string $payload): ?int; /** * Get a list of all of the failed jobs. - * - * @return array */ public function getAll(): array; /** * Get a single failed job. - * - * @param mixed $id - * - * @return array */ public function find($id): array; /** * Delete a single failed job from storage. - * - * @param mixed $id - * - * @return bool */ public function delete($id): bool; diff --git a/src/Viserio/Contract/Queue/InteractsWithQueue.php b/src/Viserio/Contract/Queue/InteractsWithQueue.php index 997b13dad..ebf75da69 100644 --- a/src/Viserio/Contract/Queue/InteractsWithQueue.php +++ b/src/Viserio/Contract/Queue/InteractsWithQueue.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -26,8 +26,6 @@ public function setJob(Job $job); /** * Get the number of times the job has been attempted. - * - * @return int */ public function attempts(): int; @@ -43,8 +41,6 @@ public function failed(); /** * Release the job back into the queue. - * - * @param int $delay */ public function release(int $delay = 0); } diff --git a/src/Viserio/Contract/Queue/Job.php b/src/Viserio/Contract/Queue/Job.php index 916a03144..f71766730 100644 --- a/src/Viserio/Contract/Queue/Job.php +++ b/src/Viserio/Contract/Queue/Job.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -27,43 +27,31 @@ public function delete(); /** * Determine if the job has been deleted. - * - * @return bool */ public function isDeleted(): bool; /** * Release the job back into the queue. - * - * @param int $delay */ public function release(int $delay = 0); /** * Determine if the job was released back into the queue. - * - * @return bool */ public function isReleased(): bool; /** * Determine if the job has been deleted or released. - * - * @return bool */ public function isDeletedOrReleased(): bool; /** * Get the number of times the job has been attempted. - * - * @return int */ public function attempts(): int; /** * Get the name of the queued job class. - * - * @return string */ public function getName(): string; @@ -74,29 +62,21 @@ public function failed(); /** * Get the name of the queue the job belongs to. - * - * @return string */ public function getQueue(): string; /** * Get the raw body string for the job. - * - * @return string */ public function getRawBody(): string; /** * Get the job identifier. - * - * @return string */ public function getJobId(): string; /** * Get the resolved name of the queued job class. - * - * @return string */ public function resolveName(): string; } diff --git a/src/Viserio/Contract/Queue/Monitor.php b/src/Viserio/Contract/Queue/Monitor.php index b9449fac4..c65a79bba 100644 --- a/src/Viserio/Contract/Queue/Monitor.php +++ b/src/Viserio/Contract/Queue/Monitor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -17,24 +17,16 @@ interface Monitor { /** * Register a callback to be executed when a job fails after the maximum amount of retries. - * - * @param mixed $callback */ public function failing($callback); /** * Register a callback to be executed when a daemon queue is stopping. - * - * @param mixed $callback */ public function stopping($callback); /** * Register an event listener for the exception occurred job event. - * - * @param mixed $callback - * - * @return void */ public function exceptionOccurred($callback): void; } diff --git a/src/Viserio/Contract/Queue/Pushable.php b/src/Viserio/Contract/Queue/Pushable.php index 74d70a339..c7cd173ae 100644 --- a/src/Viserio/Contract/Queue/Pushable.php +++ b/src/Viserio/Contract/Queue/Pushable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; diff --git a/src/Viserio/Contract/Queue/QueueConnector.php b/src/Viserio/Contract/Queue/QueueConnector.php index fdd5b45a5..8b4448214 100644 --- a/src/Viserio/Contract/Queue/QueueConnector.php +++ b/src/Viserio/Contract/Queue/QueueConnector.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -22,21 +22,11 @@ interface QueueConnector * Push a new job onto the queue. * * @param Closure|object|string $job - * @param mixed $data - * @param null|string $queue - * - * @return mixed */ public function push($job, $data = '', ?string $queue = null); /** * Push a raw payload onto the queue. - * - * @param string $payload - * @param null|string $queue - * @param array $options - * - * @return mixed */ public function pushRaw(string $payload, ?string $queue = null, array $options = []); @@ -45,18 +35,12 @@ public function pushRaw(string $payload, ?string $queue = null, array $options = * * @param DateTime|int $delay * @param Closure|object|string $job - * @param mixed $data - * @param null|string $queue - * - * @return mixed */ public function later($delay, $job, $data = '', ?string $queue = null); /** * Pop the next job off of the queue. * - * @param null|string $queue - * * @return null|\Viserio\Contract\Queue\Job */ public function pop(?string $queue = null): ?Job; @@ -64,34 +48,20 @@ public function pop(?string $queue = null): ?Job; /** * Push a new job onto the queue. * - * @param string $queue * @param Closure|object|string $job - * @param mixed $data - * - * @return mixed */ public function pushOn(string $queue, $job, $data = ''); /** * Push a new job onto the queue after a delay. * - * @param string $queue * @param DateTime|int $delay * @param Closure|object|string $job - * @param mixed $data - * - * @return mixed */ public function laterOn(string $queue, $delay, $job, $data = ''); /** * Push an array of jobs onto the queue. - * - * @param array $jobs - * @param mixed $data - * @param null|string $queue - * - * @return mixed */ public function bulk(array $jobs, $data = '', ?string $queue = null); @@ -99,8 +69,6 @@ public function bulk(array $jobs, $data = '', ?string $queue = null); * Get the queue or return the default. * * @param null|string $queue - * - * @return string */ public function getQueue($queue): string; } diff --git a/src/Viserio/Contract/Queue/ShouldQueue.php b/src/Viserio/Contract/Queue/ShouldQueue.php index 91691c883..0406e8b21 100644 --- a/src/Viserio/Contract/Queue/ShouldQueue.php +++ b/src/Viserio/Contract/Queue/ShouldQueue.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; diff --git a/src/Viserio/Contract/Queue/Worker.php b/src/Viserio/Contract/Queue/Worker.php index 7c00df183..aeec7b847 100644 --- a/src/Viserio/Contract/Queue/Worker.php +++ b/src/Viserio/Contract/Queue/Worker.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Queue; @@ -19,14 +19,6 @@ interface Worker { /** * Listen to the given queue in a loop. - * - * @param string $connectionName - * @param null|string $queue - * @param int $delay - * @param int $memory - * @param int $timeout - * @param int $sleep - * @param int $maxTries */ public function daemon( string $connectionName, @@ -41,10 +33,7 @@ public function daemon( /** * Process a given job from the queue. * - * @param string $connection * @param \Viserio\Contract\Queue\Job $job - * @param int $maxTries - * @param int $delay * * @throws Throwable */ @@ -52,12 +41,6 @@ public function process(string $connection, Job $job, int $maxTries = 0, int $de /** * Run the next job on the queue. - * - * @param string $connectionName - * @param null|string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries */ public function runNextJob( string $connectionName, @@ -69,10 +52,6 @@ public function runNextJob( /** * Determine if the memory limit has been exceeded. - * - * @param int $memoryLimit - * - * @return bool */ public function memoryExceeded(int $memoryLimit): bool; @@ -83,8 +62,6 @@ public function stop(); /** * Sleep the script for a given number of seconds. - * - * @param int $seconds */ public function sleep(int $seconds); } diff --git a/src/Viserio/Contract/Routing/Dispatcher.php b/src/Viserio/Contract/Routing/Dispatcher.php index 47417dc46..6a24588b0 100644 --- a/src/Viserio/Contract/Routing/Dispatcher.php +++ b/src/Viserio/Contract/Routing/Dispatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -42,26 +42,16 @@ interface Dispatcher /** * Set the cache path for compiled routes. - * - * @param string $path - * - * @return void */ public function setCachePath(string $path): void; /** * Get the cache path for the compiled routes. - * - * @return string */ public function getCachePath(): string; /** * Refresh cache file on development. - * - * @param bool $refreshCache - * - * @return void */ public function refreshCache(bool $refreshCache): void; @@ -75,13 +65,8 @@ public function getCurrentRoute(): ?Route; /** * Match and dispatch a route matching the given http method and uri. * - * @param \Viserio\Contract\Routing\RouteCollection $routes - * @param \Psr\Http\Message\ServerRequestInterface $request - * * @throws \Narrowspark\HttpStatus\Exception\MethodNotAllowedException * @throws \Narrowspark\HttpStatus\Exception\NotFoundException - * - * @return \Psr\Http\Message\ResponseInterface */ public function handle(RouteCollectionContract $routes, ServerRequestInterface $request): ResponseInterface; } diff --git a/src/Viserio/Contract/Routing/Exception/Exception.php b/src/Viserio/Contract/Routing/Exception/Exception.php index ef7f71477..f597876d3 100644 --- a/src/Viserio/Contract/Routing/Exception/Exception.php +++ b/src/Viserio/Contract/Routing/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Routing/Exception/InvalidArgumentException.php index 8083466e3..a29b01f7c 100644 --- a/src/Viserio/Contract/Routing/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Routing/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/InvalidRoutePatternException.php b/src/Viserio/Contract/Routing/Exception/InvalidRoutePatternException.php index 27e6edcdb..98c7a44f2 100644 --- a/src/Viserio/Contract/Routing/Exception/InvalidRoutePatternException.php +++ b/src/Viserio/Contract/Routing/Exception/InvalidRoutePatternException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/LogicException.php b/src/Viserio/Contract/Routing/Exception/LogicException.php index 363fda93d..38c69d1c8 100644 --- a/src/Viserio/Contract/Routing/Exception/LogicException.php +++ b/src/Viserio/Contract/Routing/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/RouteNotFoundException.php b/src/Viserio/Contract/Routing/Exception/RouteNotFoundException.php index cb1abef01..7965bd4c5 100644 --- a/src/Viserio/Contract/Routing/Exception/RouteNotFoundException.php +++ b/src/Viserio/Contract/Routing/Exception/RouteNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/RuntimeException.php b/src/Viserio/Contract/Routing/Exception/RuntimeException.php index b8d9b4c00..3eeef74a4 100644 --- a/src/Viserio/Contract/Routing/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Routing/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/UnexpectedValueException.php b/src/Viserio/Contract/Routing/Exception/UnexpectedValueException.php index a2fc2136e..5194d8f71 100644 --- a/src/Viserio/Contract/Routing/Exception/UnexpectedValueException.php +++ b/src/Viserio/Contract/Routing/Exception/UnexpectedValueException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; diff --git a/src/Viserio/Contract/Routing/Exception/UrlGenerationException.php b/src/Viserio/Contract/Routing/Exception/UrlGenerationException.php index e54bd2c33..e8e1c2bb9 100644 --- a/src/Viserio/Contract/Routing/Exception/UrlGenerationException.php +++ b/src/Viserio/Contract/Routing/Exception/UrlGenerationException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing\Exception; @@ -20,8 +20,6 @@ class UrlGenerationException extends InvalidArgumentException implements Excepti { /** * Create a new exception for missing route parameters. - * - * @param \Viserio\Contract\Routing\Route $route */ public function __construct(RouteContract $route) { diff --git a/src/Viserio/Contract/Routing/MiddlewareAware.php b/src/Viserio/Contract/Routing/MiddlewareAware.php index 95f8a4a99..d58ebb5a0 100644 --- a/src/Viserio/Contract/Routing/MiddlewareAware.php +++ b/src/Viserio/Contract/Routing/MiddlewareAware.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -24,8 +24,6 @@ interface MiddlewareAware * * @throws \Viserio\Contract\Routing\Exception\LogicException if \Psr\Http\Server\MiddlewareInterface was not found * @throws \Viserio\Contract\Routing\Exception\RuntimeException if wrong input is given - * - * @return self */ public function withMiddleware($middleware): self; @@ -36,8 +34,6 @@ public function withMiddleware($middleware): self; * @param array|object|string $middleware * * @throws RuntimeException if wrong input is given - * - * @return self */ public function withoutMiddleware($middleware): self; } diff --git a/src/Viserio/Contract/Routing/Pattern.php b/src/Viserio/Contract/Routing/Pattern.php index dbad7f8c1..4704c5c13 100644 --- a/src/Viserio/Contract/Routing/Pattern.php +++ b/src/Viserio/Contract/Routing/Pattern.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; diff --git a/src/Viserio/Contract/Routing/PendingResourceRegistration.php b/src/Viserio/Contract/Routing/PendingResourceRegistration.php index 44b2f2ccf..79b94405e 100644 --- a/src/Viserio/Contract/Routing/PendingResourceRegistration.php +++ b/src/Viserio/Contract/Routing/PendingResourceRegistration.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -19,8 +19,6 @@ interface PendingResourceRegistration extends MiddlewareAware * Set the methods the controller should apply to. * * @param string[] $methods - * - * @return self */ public function only(array $methods): self; @@ -28,8 +26,6 @@ public function only(array $methods): self; * Set the methods the controller should exclude. * * @param string[] $methods - * - * @return self */ public function except(array $methods): self; @@ -37,37 +33,21 @@ public function except(array $methods): self; * Set the route names for controller actions. * * @param string[] $names - * - * @return self */ public function addNames(array $names): self; /** * Set the route name for a controller action. - * - * @param string $method - * @param string $name - * - * @return self */ public function setName(string $method, string $name): self; /** * Override the route parameter names. - * - * @param array $parameters - * - * @return self */ public function setParameters(array $parameters): self; /** * Override a route parameter's name. - * - * @param string $previous - * @param string $new - * - * @return self */ public function setParameter(string $previous, string $new): self; } diff --git a/src/Viserio/Contract/Routing/Route.php b/src/Viserio/Contract/Routing/Route.php index 1bb106e0d..3b9167db8 100644 --- a/src/Viserio/Contract/Routing/Route.php +++ b/src/Viserio/Contract/Routing/Route.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -20,38 +20,26 @@ interface Route extends MiddlewareAware { /** * Get the domain defined for the route. - * - * @return null|string */ public function getDomain(): ?string; /** * Get the URI that the route responds to. - * - * @return string */ public function getUri(): string; /** * Get the name of the route instance. - * - * @return null|string */ public function getName(): ?string; /** * Add or change the route name. - * - * @param string $name - * - * @return self */ public function setName(string $name): self; /** * Get the HTTP verbs the route responds to. - * - * @return array */ public function getMethods(): array; @@ -59,99 +47,66 @@ public function getMethods(): array; * Set a regular expression requirement on the route. * * @param array|string $name - * @param null|string $expression - * - * @return self */ public function where($name, ?string $expression = null): self; /** * Get all middleware, including the ones from the controller. - * - * @return array */ public function gatherMiddleware(): array; /** * Return all disabled middleware. - * - * @return array */ public function gatherDisabledMiddleware(): array; /** * Determine if the route only responds to HTTP requests. - * - * @return bool */ public function isHttpOnly(): bool; /** * Determine if the route only responds to HTTPS requests. - * - * @return bool */ public function isHttpsOnly(): bool; /** * Get the action name for the route. - * - * @return string */ public function getActionName(): string; /** * Get the action array for the route. - * - * @return array */ public function getAction(): array; /** * Set the action array for the route. - * - * @param array $action - * - * @return self */ public function setAction(array $action): self; /** * Get route identifier. - * - * @return string */ public function getIdentifier(): string; /** * Add a prefix to the route URI. - * - * @param string $prefix - * - * @return self */ public function addPrefix(string $prefix): self; /** * Get the prefix of the route instance. - * - * @return string */ public function getPrefix(): string; /** * Add a suffix to the route URI. - * - * @param string $suffix - * - * @return self */ public function addSuffix(string $suffix): self; /** * Get the suffix of the route instance. - * - * @return null|string */ public function getSuffix(): ?string; @@ -159,67 +114,43 @@ public function getSuffix(): ?string; * Set a parameter to the given value. * * @param string $name - * @param mixed $value - * - * @return self */ public function addParameter($name, $value): self; /** * Get a given parameter from the route. * - * @param string $name - * @param mixed $default - * * @return object|string */ public function getParameter(string $name, $default = null); /** * Determine a given parameter exists from the route. - * - * @param string $name - * - * @return bool */ public function hasParameter(string $name): bool; /** * Get the key / value list of parameters for the route. - * - * @return array */ public function getParameters(): array; /** * Unset a parameter on the route if it is set. - * - * @param string $name - * - * @return void */ public function removeParameter(string $name): void; /** * The regular expression requirements. - * - * @return array */ public function getSegments(): array; /** * Get the controller instance for the route. - * - * @return mixed */ public function getController(); /** * Run the route action and return the response. - * - * @param \Psr\Http\Message\ServerRequestInterface $serverRequest - * - * @return \Psr\Http\Message\ResponseInterface */ public function run(ServerRequestInterface $serverRequest): ResponseInterface; } diff --git a/src/Viserio/Contract/Routing/RouteCollection.php b/src/Viserio/Contract/Routing/RouteCollection.php index 8ca298bea..9d9646ea5 100644 --- a/src/Viserio/Contract/Routing/RouteCollection.php +++ b/src/Viserio/Contract/Routing/RouteCollection.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -29,8 +29,6 @@ public function add(Route $route): Route; /** * Find the first route matching a given identifier. * - * @param string $identifier - * * @throws \Viserio\Contract\Routing\Exception\RuntimeException * * @return \Viserio\Contract\Routing\Route @@ -39,18 +37,12 @@ public function match(string $identifier): Route; /** * Determine if the route collection contains a given named route. - * - * @param string $name - * - * @return bool */ public function hasNamedRoute(string $name): bool; /** * Get a route instance by its name. * - * @param string $name - * * @return null|\Viserio\Contract\Routing\Route */ public function getByName(string $name): ?Route; @@ -58,16 +50,12 @@ public function getByName(string $name): ?Route; /** * Get a route instance by its controller action. * - * @param string $action - * * @return null|\Viserio\Contract\Routing\Route */ public function getByAction(string $action): ?Route; /** * Get all of the routes in the collection. - * - * @return array */ public function getRoutes(): array; } diff --git a/src/Viserio/Contract/Routing/Router.php b/src/Viserio/Contract/Routing/Router.php index 11b761ea1..2e4ea2f0e 100644 --- a/src/Viserio/Contract/Routing/Router.php +++ b/src/Viserio/Contract/Routing/Router.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -35,7 +35,6 @@ interface Router /** * Register a new GET route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -45,7 +44,6 @@ public function get(string $uri, $action = null): Route; /** * Register a new POST route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -55,7 +53,6 @@ public function post(string $uri, $action = null): Route; /** * Register a new PUT route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -65,7 +62,6 @@ public function put(string $uri, $action = null): Route; /** * Register a new PATCH route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -75,7 +71,6 @@ public function patch(string $uri, $action = null): Route; /** * Register a new HEAD route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -85,7 +80,6 @@ public function head(string $uri, $action = null): Route; /** * Register a new DELETE route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -95,7 +89,6 @@ public function delete(string $uri, $action = null): Route; /** * Register a new OPTIONS route with the router. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -105,7 +98,6 @@ public function options(string $uri, $action = null): Route; /** * Register a new route responding to all verbs. * - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -116,7 +108,6 @@ public function any(string $uri, $action = null): Route; * Register a new route with the given verbs. * * @param array|string $methods - * @param string $uri * @param null|array|Closure|string $action * * @return \Viserio\Contract\Routing\Route @@ -125,100 +116,63 @@ public function match($methods, string $uri, $action = null): Route; /** * Set a global where pattern on all routes. - * - * @param string $key - * @param string $pattern - * - * @return self */ public function pattern(string $key, string $pattern): self; /** * Set a group of global where patterns on all routes. - * - * @param array $patterns - * - * @return self */ public function patterns(array $patterns): self; /** * Get the global "where" patterns. - * - * @return array */ public function getPatterns(): array; /** * Defines the supplied parameter name to be globally associated with the expression. - * - * @param string $parameterName - * @param string $expression - * - * @return self */ public function addParameter(string $parameterName, string $expression): self; /** * Removes the global expression associated with the supplied parameter name. - * - * @param string $name - * - * @return void */ public function removeParameter(string $name): void; /** * Get all global parameters for all routes. - * - * @return array */ public function getParameters(): array; /** * Create a route group with shared attributes. * - * @param array $attributes * @param Closure|string $routes - * - * @return void */ public function group(array $attributes, $routes): void; /** * Merge the given array with the last group stack. - * - * @param array $new - * - * @return array */ public function mergeWithLastGroup(array $new): array; /** * Get the suffix from the last group on the stack. - * - * @return string */ public function getLastGroupSuffix(): string; /** * Get the prefix from the last group on the stack. - * - * @return string */ public function getLastGroupPrefix(): string; /** * Determine if the router currently has a group stack. - * - * @return bool */ public function hasGroupStack(): bool; /** * Get the current group stack for the router. - * - * @return array */ public function getGroupStack(): array; @@ -238,10 +192,6 @@ public function getDispatcher(): Dispatcher; /** * Dispatch router for HTTP request. - * - * @param \Psr\Http\Message\ServerRequestInterface $request - * - * @return \Psr\Http\Message\ResponseInterface */ public function dispatch(ServerRequestInterface $request): ResponseInterface; @@ -254,20 +204,12 @@ public function getRoutes(): RouteCollection; /** * Register an array of resource controllers. - * - * @param array $resources - * - * @return void */ public function resources(array $resources): void; /** * Route a resource to a controller. * - * @param string $name - * @param string $controller - * @param array $options - * * @return \Viserio\Contract\Routing\PendingResourceRegistration */ public function resource(string $name, string $controller, array $options = []): PendingResourceRegistration; diff --git a/src/Viserio/Contract/Routing/SegmentMatcher.php b/src/Viserio/Contract/Routing/SegmentMatcher.php index 0d8658354..b57c2962b 100644 --- a/src/Viserio/Contract/Routing/SegmentMatcher.php +++ b/src/Viserio/Contract/Routing/SegmentMatcher.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -25,9 +25,6 @@ public function getParameterKeys(): array; /** * Get a matched parameter key back,. * - * @param string $segmentVariable - * @param null|int $uniqueKey - * * @return string[] */ public function getMatchedParameterExpressions(string $segmentVariable, ?int $uniqueKey = null): array; @@ -36,25 +33,16 @@ public function getMatchedParameterExpressions(string $segmentVariable, ?int $un * Merge parameters keys from same matcher. * * @param self $matcher - * - * @return void */ public function mergeParameterKeys(SegmentMatcher $matcher): void; /** * Get a ready to use condition expression from a segment. - * - * @param string $segmentVariable - * @param null|int $uniqueKey - * - * @return string */ public function getConditionExpression(string $segmentVariable, ?int $uniqueKey = null): string; /** * Returns a unique hash for the segment matcher. - * - * @return string */ public function getHash(): string; } diff --git a/src/Viserio/Contract/Routing/UrlGenerator.php b/src/Viserio/Contract/Routing/UrlGenerator.php index 2919fd9a7..b1564109a 100644 --- a/src/Viserio/Contract/Routing/UrlGenerator.php +++ b/src/Viserio/Contract/Routing/UrlGenerator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Routing; @@ -41,13 +41,7 @@ interface UrlGenerator /** * Generates a URL or path for a specific route based on the given parameters. * - * @param string $name - * @param array $parameters - * @param int $referenceType - * * @throws \Viserio\Contract\Routing\Exception\RouteNotFoundException If the named route doesn't exist - * - * @return string */ public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string; } diff --git a/src/Viserio/Contract/Session/Exception/DomainException.php b/src/Viserio/Contract/Session/Exception/DomainException.php index 956311e4b..a3b4fc918 100644 --- a/src/Viserio/Contract/Session/Exception/DomainException.php +++ b/src/Viserio/Contract/Session/Exception/DomainException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/Exception.php b/src/Viserio/Contract/Session/Exception/Exception.php index 09c527671..7d9506892 100644 --- a/src/Viserio/Contract/Session/Exception/Exception.php +++ b/src/Viserio/Contract/Session/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Session/Exception/InvalidArgumentException.php index 6155556de..b11fb7bf9 100644 --- a/src/Viserio/Contract/Session/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Session/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/LogicException.php b/src/Viserio/Contract/Session/Exception/LogicException.php index 732792d5d..46bec1ab6 100644 --- a/src/Viserio/Contract/Session/Exception/LogicException.php +++ b/src/Viserio/Contract/Session/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/RuntimeException.php b/src/Viserio/Contract/Session/Exception/RuntimeException.php index 8f975ee62..b31cabcf9 100644 --- a/src/Viserio/Contract/Session/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Session/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/SessionNotStartedException.php b/src/Viserio/Contract/Session/Exception/SessionNotStartedException.php index 331e446c7..8e00b85f4 100644 --- a/src/Viserio/Contract/Session/Exception/SessionNotStartedException.php +++ b/src/Viserio/Contract/Session/Exception/SessionNotStartedException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/SuspiciousOperationException.php b/src/Viserio/Contract/Session/Exception/SuspiciousOperationException.php index d0c2e22ea..5288f87d6 100644 --- a/src/Viserio/Contract/Session/Exception/SuspiciousOperationException.php +++ b/src/Viserio/Contract/Session/Exception/SuspiciousOperationException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Exception/TokenMismatchException.php b/src/Viserio/Contract/Session/Exception/TokenMismatchException.php index 08d9e13fe..d4dce402c 100644 --- a/src/Viserio/Contract/Session/Exception/TokenMismatchException.php +++ b/src/Viserio/Contract/Session/Exception/TokenMismatchException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session\Exception; diff --git a/src/Viserio/Contract/Session/Fingerprint.php b/src/Viserio/Contract/Session/Fingerprint.php index b8cff225f..c1f1ddd88 100644 --- a/src/Viserio/Contract/Session/Fingerprint.php +++ b/src/Viserio/Contract/Session/Fingerprint.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session; @@ -20,8 +20,6 @@ interface Fingerprint * * Fingerprint is additional data (eg. user agent info) to ensure very same * client is using session. - * - * @return string */ public function generate(): string; } diff --git a/src/Viserio/Contract/Session/Store.php b/src/Viserio/Contract/Session/Store.php index 524dc57e5..e9c618d0e 100644 --- a/src/Viserio/Contract/Session/Store.php +++ b/src/Viserio/Contract/Session/Store.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Session; @@ -43,10 +43,6 @@ public function open(): bool; /** * Sets the session ID. - * - * @param string $id - * - * @return void */ public function setId(string $id): void; @@ -60,11 +56,7 @@ public function getId(): ?string; /** * Sets the session name. * - * @param string $name - * * @throws \Viserio\Contract\Session\Exception\InvalidArgumentException - * - * @return void */ public function setName(string $name): void; @@ -77,15 +69,11 @@ public function getName(): string; /** * Time after session is regenerated (in seconds). - * - * @return int */ public function getTtl(): int; /** * Is session expired? - * - * @return bool */ public function isExpired(): bool; @@ -115,8 +103,6 @@ public function migrate(bool $destroy = false): bool; * This method is generally not required for real sessions as * the session will be automatically saved at the end of * code execution. - * - * @return void */ public function save(): void; @@ -134,36 +120,22 @@ public function has(string $name): bool; * * @param string $name The attribute name * @param mixed $default the default value if not found - * - * @return mixed */ public function get(string $name, $default = null); /** * Sets an attribute. - * - * @param string $name - * @param mixed $value - * - * @return void */ public function set(string $name, $value): void; /** * Push a value onto a session array. - * - * @param string $key - * @param mixed $value - * - * @return void */ public function push(string $key, $value): void; /** * Removes an attribute. * - * @param string $name - * * @return mixed The removed value or null when it does not exist */ public function remove(string $name); @@ -177,97 +149,63 @@ public function getAll(): array; /** * Clears all attributes. - * - * @return void */ public function clear(): void; /** * Checks if the session was started. - * - * @return bool */ public function isStarted(): bool; /** * Set the request limit for a session. - * - * @param int $limit - * - * @return void */ public function setIdRequestsLimit(int $limit): void; /** * Shows the counted request for session. - * - * @return int */ public function getRequestsCount(): int; /** * Specifies the number of seconds after which session * will be automatically expired. - * - * @param int $ttl - * - * @return void */ public function setIdLiveTime(int $ttl): void; /** * Gets last trace timestamp. - * - * @return null|int */ public function getLastTrace(): ?int; /** * Gets first trace timestamp. - * - * @return null|int */ public function getFirstTrace(): ?int; /** * Gets last (id) regeneration timestamp. - * - * @return null|int */ public function getRegenerationTrace(): ?int; /** * Age the flash data for the session. - * - * @return void */ public function ageFlashData(): void; /** * Flash a key / value pair to the session. - * - * @param string $key - * @param mixed $value - * - * @return void */ public function flash(string $key, $value): void; /** * Flash a key / value pair to the session * for immediate use. - * - * @param string $key - * @param mixed $value - * - * @return void */ public function now(string $key, $value): void; /** * Reflash all of the session flash data. - * - * @return void */ public function reflash(): void; @@ -275,70 +213,46 @@ public function reflash(): void; * Reflash a subset of the current flash data. * * @param array|mixed $keys - * - * @return void */ public function keep($keys = null): void; /** * Add a new Fingerprint generator. - * - * @param Fingerprint $fingerprintGenerator - * - * @return void */ public function addFingerprintGenerator(Fingerprint $fingerprintGenerator): void; /** * Get the session handler instance. - * - * @return SessionHandlerInterface */ public function getHandler(): SessionHandlerInterface; /** * Determine if the session handler needs a request. - * - * @return bool */ public function handlerNeedsRequest(): bool; /** * Set the request on the handler instance. - * - * @param ServerRequestInterface $request - * - * @return void */ public function setRequestOnHandler(ServerRequestInterface $request): void; /** * Get used fingerprint. - * - * @return string */ public function getFingerprint(): string; /** * Get the CSRF token value. - * - * @return string */ public function getToken(): string; /** * Set the "previous" URL in the session. - * - * @param string $url - * - * @return void */ public function setPreviousUrl(string $url): void; /** * Get the previous URL from the session. - * - * @return null|string */ public function getPreviousUrl(): ?string; } diff --git a/src/Viserio/Contract/Support/Arrayable.php b/src/Viserio/Contract/Support/Arrayable.php index 00dfa29da..23b66138b 100644 --- a/src/Viserio/Contract/Support/Arrayable.php +++ b/src/Viserio/Contract/Support/Arrayable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support; @@ -17,8 +17,6 @@ interface Arrayable { /** * Get the instance as an array. - * - * @return array */ public function toArray(): array; } diff --git a/src/Viserio/Contract/Support/CharacterType.php b/src/Viserio/Contract/Support/CharacterType.php index 8fd7a3036..c2f887e33 100644 --- a/src/Viserio/Contract/Support/CharacterType.php +++ b/src/Viserio/Contract/Support/CharacterType.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support; diff --git a/src/Viserio/Contract/Support/Exception/Exception.php b/src/Viserio/Contract/Support/Exception/Exception.php index 9b7a8830c..7a9a70d01 100644 --- a/src/Viserio/Contract/Support/Exception/Exception.php +++ b/src/Viserio/Contract/Support/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support\Exception; diff --git a/src/Viserio/Contract/Support/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Support/Exception/InvalidArgumentException.php index 7df5b721b..509b8e5aa 100644 --- a/src/Viserio/Contract/Support/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Support/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support\Exception; diff --git a/src/Viserio/Contract/Support/Exception/LogicException.php b/src/Viserio/Contract/Support/Exception/LogicException.php index 142e068b8..d2f98f63e 100644 --- a/src/Viserio/Contract/Support/Exception/LogicException.php +++ b/src/Viserio/Contract/Support/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support\Exception; diff --git a/src/Viserio/Contract/Support/Exception/MissingPackageException.php b/src/Viserio/Contract/Support/Exception/MissingPackageException.php index b92f9af58..22ed429ef 100644 --- a/src/Viserio/Contract/Support/Exception/MissingPackageException.php +++ b/src/Viserio/Contract/Support/Exception/MissingPackageException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support\Exception; @@ -20,8 +20,6 @@ class MissingPackageException extends BaseRuntimeException implements Exception /** * {@inheritdoc} * - * @param array $missingPackages - * @param string $className * @param string $message */ public function __construct(array $missingPackages, string $className, ?string $message = null) diff --git a/src/Viserio/Contract/Support/Jsonable.php b/src/Viserio/Contract/Support/Jsonable.php index b9675dc60..543632da8 100644 --- a/src/Viserio/Contract/Support/Jsonable.php +++ b/src/Viserio/Contract/Support/Jsonable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support; @@ -17,10 +17,6 @@ interface Jsonable { /** * Convert the object to its JSON representation. - * - * @param int $options - * - * @return string */ public function toJson(int $options = 0): string; } diff --git a/src/Viserio/Contract/Support/Renderable.php b/src/Viserio/Contract/Support/Renderable.php index f3a40e8b0..646a20bcc 100644 --- a/src/Viserio/Contract/Support/Renderable.php +++ b/src/Viserio/Contract/Support/Renderable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support; @@ -17,8 +17,6 @@ interface Renderable { /** * Get the evaluated contents of the object. - * - * @return string */ public function render(): string; } diff --git a/src/Viserio/Contract/Support/Resettable.php b/src/Viserio/Contract/Support/Resettable.php index 77a0f5fd9..cb9e60e67 100644 --- a/src/Viserio/Contract/Support/Resettable.php +++ b/src/Viserio/Contract/Support/Resettable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support; @@ -22,8 +22,6 @@ interface Resettable * initial state. This usually means clearing any internal buffers and forwarding * the call to internal dependencies. All properties of the object should be put * back to the same state it had when it was first ready to use. - * - * @return void */ public function reset(): void; } diff --git a/src/Viserio/Contract/Support/Stringable.php b/src/Viserio/Contract/Support/Stringable.php index ff83ce7fc..53f4f928c 100644 --- a/src/Viserio/Contract/Support/Stringable.php +++ b/src/Viserio/Contract/Support/Stringable.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Support; @@ -17,8 +17,6 @@ interface Stringable { /** * Get the instance as an string. - * - * @return string */ public function __toString(): string; } diff --git a/src/Viserio/Contract/Tests/Cache/Traits/CacheItemPoolAwareTraitTest.php b/src/Viserio/Contract/Tests/Cache/Traits/CacheItemPoolAwareTraitTest.php index b2b84ed61..6c6c39615 100644 --- a/src/Viserio/Contract/Tests/Cache/Traits/CacheItemPoolAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/Cache/Traits/CacheItemPoolAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cache\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class CacheItemPoolAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/Cache/Traits/CacheManagerAwareTraitTest.php b/src/Viserio/Contract/Tests/Cache/Traits/CacheManagerAwareTraitTest.php index 64163dca4..507e4e514 100644 --- a/src/Viserio/Contract/Tests/Cache/Traits/CacheManagerAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/Cache/Traits/CacheManagerAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Cache\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class CacheManagerAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/Container/Traits/ContainerAwareTraitTest.php b/src/Viserio/Contract/Tests/Container/Traits/ContainerAwareTraitTest.php index 5d9bb8e3c..c162e0659 100644 --- a/src/Viserio/Contract/Tests/Container/Traits/ContainerAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/Container/Traits/ContainerAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Container\Tests\Traits; @@ -21,6 +21,7 @@ * @internal * * @small + * @coversNothing */ final class ContainerAwareTraitTest extends TestCase { diff --git a/src/Viserio/Contract/Tests/Events/Traits/EventsAwareTraitTest.php b/src/Viserio/Contract/Tests/Events/Traits/EventsAwareTraitTest.php index 597ca4daf..0b0c728f0 100644 --- a/src/Viserio/Contract/Tests/Events/Traits/EventsAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/Events/Traits/EventsAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Events\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class EventsAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/Filesystem/Exception/IOExceptionTest.php b/src/Viserio/Contract/Tests/Filesystem/Exception/IOExceptionTest.php index 44014cad7..f045e3464 100644 --- a/src/Viserio/Contract/Tests/Filesystem/Exception/IOExceptionTest.php +++ b/src/Viserio/Contract/Tests/Filesystem/Exception/IOExceptionTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Tests\Filesystem\Exception; @@ -20,6 +20,7 @@ * @internal * * @small + * @coversNothing */ final class IOExceptionTest extends TestCase { diff --git a/src/Viserio/Contract/Tests/HttpFactory/Traits/RequestFactoryAwareTraitTest.php b/src/Viserio/Contract/Tests/HttpFactory/Traits/RequestFactoryAwareTraitTest.php index ca7c1d311..75e19a681 100644 --- a/src/Viserio/Contract/Tests/HttpFactory/Traits/RequestFactoryAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/HttpFactory/Traits/RequestFactoryAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class RequestFactoryAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/HttpFactory/Traits/ResponseFactoryAwareTraitTest.php b/src/Viserio/Contract/Tests/HttpFactory/Traits/ResponseFactoryAwareTraitTest.php index 1bd65b673..b179bd4a7 100644 --- a/src/Viserio/Contract/Tests/HttpFactory/Traits/ResponseFactoryAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/HttpFactory/Traits/ResponseFactoryAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ResponseFactoryAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/HttpFactory/Traits/ServerRequestFactoryAwareTraitTest.php b/src/Viserio/Contract/Tests/HttpFactory/Traits/ServerRequestFactoryAwareTraitTest.php index 8c9d7ac58..b1e1e0039 100644 --- a/src/Viserio/Contract/Tests/HttpFactory/Traits/ServerRequestFactoryAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/HttpFactory/Traits/ServerRequestFactoryAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ServerRequestFactoryAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/HttpFactory/Traits/StreamFactoryAwareTraitTest.php b/src/Viserio/Contract/Tests/HttpFactory/Traits/StreamFactoryAwareTraitTest.php index e512f744d..cc32e4271 100644 --- a/src/Viserio/Contract/Tests/HttpFactory/Traits/StreamFactoryAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/HttpFactory/Traits/StreamFactoryAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class StreamFactoryAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/HttpFactory/Traits/UploadedFileFactoryAwareTraitTest.php b/src/Viserio/Contract/Tests/HttpFactory/Traits/UploadedFileFactoryAwareTraitTest.php index e82a34ff4..2aee99348 100644 --- a/src/Viserio/Contract/Tests/HttpFactory/Traits/UploadedFileFactoryAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/HttpFactory/Traits/UploadedFileFactoryAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class UploadedFileFactoryAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/HttpFactory/Traits/UriFactoryAwareTraitTest.php b/src/Viserio/Contract/Tests/HttpFactory/Traits/UriFactoryAwareTraitTest.php index 5437c1cc1..18f14f9c2 100644 --- a/src/Viserio/Contract/Tests/HttpFactory/Traits/UriFactoryAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/HttpFactory/Traits/UriFactoryAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\HttpFactory\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class UriFactoryAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/Parsers/Traits/LoaderAwareTraitTest.php b/src/Viserio/Contract/Tests/Parsers/Traits/LoaderAwareTraitTest.php index f1b061ea9..12a34fd7c 100644 --- a/src/Viserio/Contract/Tests/Parsers/Traits/LoaderAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/Parsers/Traits/LoaderAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Parser\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class LoaderAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/Translation/Traits/TranslationAwareTraitTest.php b/src/Viserio/Contract/Tests/Translation/Traits/TranslationAwareTraitTest.php index cee3636d4..aee50ae00 100644 --- a/src/Viserio/Contract/Tests/Translation/Traits/TranslationAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/Translation/Traits/TranslationAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class TranslationAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Tests/View/Traits/ViewAwareTraitTest.php b/src/Viserio/Contract/Tests/View/Traits/ViewAwareTraitTest.php index d994264ec..1a74b00c7 100644 --- a/src/Viserio/Contract/Tests/View/Traits/ViewAwareTraitTest.php +++ b/src/Viserio/Contract/Tests/View/Traits/ViewAwareTraitTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Tests\Traits; @@ -22,6 +22,7 @@ * @internal * * @small + * @coversNothing */ final class ViewAwareTraitTest extends MockeryTestCase { diff --git a/src/Viserio/Contract/Translation/Exception/CannotFormatException.php b/src/Viserio/Contract/Translation/Exception/CannotFormatException.php index 86dbac2bd..bae3c841c 100644 --- a/src/Viserio/Contract/Translation/Exception/CannotFormatException.php +++ b/src/Viserio/Contract/Translation/Exception/CannotFormatException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Exception/CannotInstantiateFormatterException.php b/src/Viserio/Contract/Translation/Exception/CannotInstantiateFormatterException.php index ce493497a..374c93526 100644 --- a/src/Viserio/Contract/Translation/Exception/CannotInstantiateFormatterException.php +++ b/src/Viserio/Contract/Translation/Exception/CannotInstantiateFormatterException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Exception/Exception.php b/src/Viserio/Contract/Translation/Exception/Exception.php index f833b4205..1d32384e3 100644 --- a/src/Viserio/Contract/Translation/Exception/Exception.php +++ b/src/Viserio/Contract/Translation/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Exception/FormatException.php b/src/Viserio/Contract/Translation/Exception/FormatException.php index 5d17ddad7..ef7997bc7 100644 --- a/src/Viserio/Contract/Translation/Exception/FormatException.php +++ b/src/Viserio/Contract/Translation/Exception/FormatException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Translation/Exception/InvalidArgumentException.php index 634ab5c12..5c986a076 100644 --- a/src/Viserio/Contract/Translation/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Translation/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Exception/LogicException.php b/src/Viserio/Contract/Translation/Exception/LogicException.php index c240ffbf0..f6f02d0a9 100644 --- a/src/Viserio/Contract/Translation/Exception/LogicException.php +++ b/src/Viserio/Contract/Translation/Exception/LogicException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Exception/RuntimeException.php b/src/Viserio/Contract/Translation/Exception/RuntimeException.php index 3b96d01cd..eabb85636 100644 --- a/src/Viserio/Contract/Translation/Exception/RuntimeException.php +++ b/src/Viserio/Contract/Translation/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Exception; diff --git a/src/Viserio/Contract/Translation/Extractor.php b/src/Viserio/Contract/Translation/Extractor.php index d5bcf985b..ec4c257cf 100644 --- a/src/Viserio/Contract/Translation/Extractor.php +++ b/src/Viserio/Contract/Translation/Extractor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation; @@ -19,15 +19,11 @@ interface Extractor * Extracts translation messages from files, a file or a directory to a array. * * @param array|string $resource Files, a file or a directory - * - * @return array */ public function extract($resource): array; /** * Sets the prefix that should be used for new found messages. - * - * @param string $prefix */ public function setPrefix(string $prefix): void; } diff --git a/src/Viserio/Contract/Translation/MessageCatalogue.php b/src/Viserio/Contract/Translation/MessageCatalogue.php index 75a78a995..af9f427dc 100644 --- a/src/Viserio/Contract/Translation/MessageCatalogue.php +++ b/src/Viserio/Contract/Translation/MessageCatalogue.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation; @@ -46,8 +46,6 @@ public function getAll(?string $domain = null): array; * @param string $id The message id * @param string $translation The messages translation * @param string $domain The domain name - * - * @return void */ public function set(string $id, string $translation, string $domain = 'messages'): void; @@ -86,18 +84,11 @@ public function get(string $id, string $domain = 'messages'): string; * * @param array $messages An array of translations * @param string $domain The domain name - * - * @return void */ public function replace(array $messages, string $domain = 'messages'): void; /** * Removes a record. - * - * @param string $messages - * @param string $domain - * - * @return void */ public function remove(string $messages, string $domain = 'messages'): void; @@ -106,8 +97,6 @@ public function remove(string $messages, string $domain = 'messages'): void; * * @param array $messages An array of translations * @param string $domain The domain name - * - * @return void */ public function add(array $messages, string $domain = 'messages'): void; @@ -119,8 +108,6 @@ public function add(array $messages, string $domain = 'messages'): void; * @param self $catalogue A MessageCatalogue instance * * @throws \Viserio\Contract\Translation\Exception\LogicException - * - * @return void */ public function addCatalogue(MessageCatalogue $catalogue): void; @@ -133,8 +120,6 @@ public function addCatalogue(MessageCatalogue $catalogue): void; * @param self $catalogue A MessageCatalogue instance * * @throws \Viserio\Contract\Translation\Exception\LogicException - * - * @return void */ public function addFallbackCatalogue(MessageCatalogue $catalogue): void; @@ -149,8 +134,6 @@ public function getFallbackCatalogue(): ?self; * Set parent. * * @param self $parent - * - * @return self */ public function setParent(MessageCatalogue $parent): self; } diff --git a/src/Viserio/Contract/Translation/MessageFormatter.php b/src/Viserio/Contract/Translation/MessageFormatter.php index 44f4a7064..82e507f69 100644 --- a/src/Viserio/Contract/Translation/MessageFormatter.php +++ b/src/Viserio/Contract/Translation/MessageFormatter.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation; @@ -21,8 +21,6 @@ interface MessageFormatter * @param string $message The message (may also be an object that can be cast to string) * @param string $locale The message locale * @param array $parameters An array of parameters for the message - * - * @return string */ public function format(string $message, string $locale, array $parameters = []): string; } diff --git a/src/Viserio/Contract/Translation/Traits/TranslatorAwareTrait.php b/src/Viserio/Contract/Translation/Traits/TranslatorAwareTrait.php index 871523ac1..3b13733da 100644 --- a/src/Viserio/Contract/Translation/Traits/TranslatorAwareTrait.php +++ b/src/Viserio/Contract/Translation/Traits/TranslatorAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation\Traits; @@ -27,8 +27,6 @@ trait TranslatorAwareTrait /** * Set a translation instance. * - * @param \Viserio\Contract\Translation\Translator $translator - * * @return static */ public function setTranslator(TranslatorContract $translator): self diff --git a/src/Viserio/Contract/Translation/TransChecker.php b/src/Viserio/Contract/Translation/TransChecker.php index 1a1787ea7..a12874d4e 100644 --- a/src/Viserio/Contract/Translation/TransChecker.php +++ b/src/Viserio/Contract/Translation/TransChecker.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation; @@ -17,47 +17,35 @@ interface TransChecker { /** * Get the default locale being used. - * - * @return string */ public function getDefaultLocale(): string; /** * Set the locales that need to be checked. * - * @param array $locales - * * @return static */ public function setLocales(array $locales); /** * Get the locales to check. - * - * @return array */ public function getLocales(): array; /** * Set the locals that are ignored on the check. * - * @param array $ignored - * * @return static */ public function setIgnoredTranslations(array $ignored); /** * Get the ignored translation attributes. - * - * @return array */ public function getIgnoredTranslations(): array; /** * Check the missing translations. - * - * @return array */ public function check(): array; } diff --git a/src/Viserio/Contract/Translation/TranslationManager.php b/src/Viserio/Contract/Translation/TranslationManager.php index 8dbd350e7..3ed3d5a09 100644 --- a/src/Viserio/Contract/Translation/TranslationManager.php +++ b/src/Viserio/Contract/Translation/TranslationManager.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation; @@ -18,8 +18,6 @@ interface TranslationManager /** * Get a language translator instance. * - * @param null|string $locale - * * @throws \Viserio\Contract\Translation\Exception\RuntimeException * * @return \Viserio\Contract\Translation\Translator diff --git a/src/Viserio/Contract/Translation/Translator.php b/src/Viserio/Contract/Translation/Translator.php index 0fc748722..30841bca7 100644 --- a/src/Viserio/Contract/Translation/Translator.php +++ b/src/Viserio/Contract/Translation/Translator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Translation; @@ -23,8 +23,6 @@ interface Translator /** * Gets the string dictating the default language to translate into. (e.g. 'en'). - * - * @return string */ public function getLocale(): string; @@ -34,8 +32,6 @@ public function getLocale(): string; * @param string $locale A string representing the default language to translate into. (e.g. 'en'). * * @throws InvalidArgumentException If the locale contains invalid characters - * - * @return self */ public function setLocale(string $locale): self; @@ -68,20 +64,11 @@ public function trans(string $id, array $parameters = [], string $domain = 'mess /** * Add helper. - * - * @param string $name - * @param callable $helper - * - * @return self */ public function addHelper(string $name, callable $helper): self; /** * Add filter. - * - * @param callable $filter - * - * @return self */ public function addFilter(callable $filter): self; } diff --git a/src/Viserio/Contract/Validation/Exception/Exception.php b/src/Viserio/Contract/Validation/Exception/Exception.php index 7bc533945..f5d552b11 100644 --- a/src/Viserio/Contract/Validation/Exception/Exception.php +++ b/src/Viserio/Contract/Validation/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Validation\Exception; diff --git a/src/Viserio/Contract/Validation/Exception/InvalidArgumentException.php b/src/Viserio/Contract/Validation/Exception/InvalidArgumentException.php index 196d240dc..99fe9c923 100644 --- a/src/Viserio/Contract/Validation/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/Validation/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Validation\Exception; diff --git a/src/Viserio/Contract/Validation/Validator.php b/src/Viserio/Contract/Validation/Validator.php index 2fd8cf0a9..29d58a0df 100644 --- a/src/Viserio/Contract/Validation/Validator.php +++ b/src/Viserio/Contract/Validation/Validator.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\Validation; @@ -17,48 +17,31 @@ interface Validator { /** * Add your own rule's namespace. - * - * @param string $namespace - * - * @return void */ public function with(string $namespace): void; /** * Run the validator rules against given data. - * - * @param array $data - * @param array $rules - * - * @return self */ public function validate(array $data, array $rules): self; /** * Determine if the data passes the validation rules. - * - * @return bool */ public function passes(): bool; /** * Returns the data which was valid. - * - * @return array */ public function valid(): array; /** * Determine if the data fails the validation rules. - * - * @return bool */ public function fails(): bool; /** * Returns the data which was invalid. - * - * @return array */ public function invalid(): array; } diff --git a/src/Viserio/Contract/View/Engine.php b/src/Viserio/Contract/View/Engine.php index 95229c15b..cda4c2233 100644 --- a/src/Viserio/Contract/View/Engine.php +++ b/src/Viserio/Contract/View/Engine.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View; @@ -17,18 +17,11 @@ interface Engine { /** * Returns the engine names. - * - * @return array */ public static function getDefaultNames(): array; /** * Get the evaluated contents of the view. - * - * @param array $fileInfo - * @param array $data - * - * @return string */ public function get(array $fileInfo, array $data = []): string; } diff --git a/src/Viserio/Contract/View/EngineResolver.php b/src/Viserio/Contract/View/EngineResolver.php index 22833a044..11477f01a 100644 --- a/src/Viserio/Contract/View/EngineResolver.php +++ b/src/Viserio/Contract/View/EngineResolver.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View; @@ -19,31 +19,18 @@ interface EngineResolver { /** * Set a new view engine. - * - * @param string $name - * @param \Viserio\Contract\View\Engine $engine - * - * @return void */ public function set(string $name, EngineContract $engine): void; /** * Loads a view engine. * - * @param string $name - * * @throws \Viserio\Contract\View\Exception\ViewEngineNotFoundException - * - * @return \Viserio\Contract\View\Engine */ public function get(string $name): EngineContract; /** * Checks if a view engine exists. - * - * @param string $name - * - * @return bool */ public function has(string $name): bool; diff --git a/src/Viserio/Contract/View/Exception/Exception.php b/src/Viserio/Contract/View/Exception/Exception.php index a396cbf7f..55f292832 100644 --- a/src/Viserio/Contract/View/Exception/Exception.php +++ b/src/Viserio/Contract/View/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Exception; diff --git a/src/Viserio/Contract/View/Exception/IOException.php b/src/Viserio/Contract/View/Exception/IOException.php index e1ff55fe0..facc54f50 100644 --- a/src/Viserio/Contract/View/Exception/IOException.php +++ b/src/Viserio/Contract/View/Exception/IOException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Exception; @@ -22,11 +22,6 @@ class IOException extends RuntimeException /** * Create a new IO exception. - * - * @param string $message - * @param mixed $code - * @param null|Throwable $previous - * @param null|string $path */ public function __construct(string $message, $code = 0, ?Throwable $previous = null, ?string $path = null) { @@ -37,8 +32,6 @@ public function __construct(string $message, $code = 0, ?Throwable $previous = n /** * Get the file path. - * - * @return null|string */ public function getPath(): ?string { diff --git a/src/Viserio/Contract/View/Exception/InvalidArgumentException.php b/src/Viserio/Contract/View/Exception/InvalidArgumentException.php index c63fb8c78..8864625c8 100644 --- a/src/Viserio/Contract/View/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/View/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Exception; diff --git a/src/Viserio/Contract/View/Exception/RuntimeException.php b/src/Viserio/Contract/View/Exception/RuntimeException.php index ab9420071..8e2abb1b9 100644 --- a/src/Viserio/Contract/View/Exception/RuntimeException.php +++ b/src/Viserio/Contract/View/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Exception; diff --git a/src/Viserio/Contract/View/Exception/ViewEngineNotFoundException.php b/src/Viserio/Contract/View/Exception/ViewEngineNotFoundException.php index ec44dbc15..51486bd91 100644 --- a/src/Viserio/Contract/View/Exception/ViewEngineNotFoundException.php +++ b/src/Viserio/Contract/View/Exception/ViewEngineNotFoundException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Exception; diff --git a/src/Viserio/Contract/View/Factory.php b/src/Viserio/Contract/View/Factory.php index 77d7e71a8..da787951f 100644 --- a/src/Viserio/Contract/View/Factory.php +++ b/src/Viserio/Contract/View/Factory.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View; @@ -21,20 +21,12 @@ interface Factory { /** * Determine if a given view exists. - * - * @param string $view - * - * @return bool */ public function exists(string $view): bool; /** * Get the evaluated view contents for the given path. * - * @param string $path - * @param array $data - * @param array $mergeData - * * @return \Viserio\Contract\View\View */ public function file(string $path, array $data = [], array $mergeData = []): View; @@ -42,10 +34,6 @@ public function file(string $path, array $data = [], array $mergeData = []): Vie /** * Get the evaluated view contents for the given view. * - * @param string $view - * @param array $data - * @param array $mergeData - * * @return \Viserio\Contract\View\View */ public function create(string $view, array $data = [], array $mergeData = []): View; @@ -53,7 +41,6 @@ public function create(string $view, array $data = [], array $mergeData = []): V /** * Get the evaluated view contents for a named view. * - * @param string $view * @param string[] $data * * @return \Viserio\Contract\View\View @@ -62,41 +49,22 @@ public function of(string $view, array $data = []): View; /** * Register a named view. - * - * @param string $view - * @param string $name - * - * @return self */ public function name(string $view, string $name): self; /** * Add an alias for a view. - * - * @param string $view - * @param string $alias - * - * @return self */ public function alias(string $view, string $alias): self; /** * Get the rendered contents of a partial from a loop. - * - * @param string $view - * @param array $data - * @param string $iterator - * @param string $empty - * - * @return string */ public function renderEach(string $view, array $data, string $iterator, string $empty = 'raw|'): string; /** * Get the appropriate view engine for the given path. * - * @param string $path - * * @throws InvalidArgumentException * * @return \Viserio\Contract\View\Engine @@ -107,73 +75,49 @@ public function getEngineFromPath(string $path): Engine; * Add a piece of shared data to the environment. * * @param array|string $key - * @param mixed $value - * - * @return mixed */ public function share($key, $value = null); /** * Add a location to the array of view locations. - * - * @param string $location - * - * @return self */ public function addLocation(string $location): self; /** * Add a new namespace to the loader. * - * @param string $namespace * @param array|string $hints - * - * @return self */ public function addNamespace(string $namespace, $hints): self; /** * Replace the namespace hints for the given namespace. * - * @param string $namespace * @param array|string $hints - * - * @return self */ public function replaceNamespace(string $namespace, $hints): self; /** * Prepend a new namespace to the loader. * - * @param string $namespace * @param array|string $hints - * - * @return self */ public function prependNamespace(string $namespace, $hints): self; /** * Register a valid view extension and its engine. * - * @param string $extension - * @param string $engineName * @param \Viserio\Contract\View\Engine $engine - * - * @return self */ public function addExtension(string $extension, string $engineName, ?EngineContract $engine = null): self; /** * Get the extension to engine bindings. - * - * @return array */ public function getExtensions(): array; /** * Get the engine resolver instance. - * - * @return \Viserio\Contract\View\EngineResolver */ public function getEngineResolver(): EngineResolverContract; @@ -186,25 +130,16 @@ public function getFinder(): Finder; /** * Get an item from the shared data. - * - * @param string $key - * @param mixed $default - * - * @return mixed */ public function shared(string $key, $default = null); /** * Get all of the shared data for the environment. - * - * @return array */ public function getShared(): array; /** * Get all of the registered named views in environment. - * - * @return array */ public function getNames(): array; } diff --git a/src/Viserio/Contract/View/Finder.php b/src/Viserio/Contract/View/Finder.php index febab552d..6600b28a4 100644 --- a/src/Viserio/Contract/View/Finder.php +++ b/src/Viserio/Contract/View/Finder.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View; @@ -24,73 +24,45 @@ interface Finder /** * Get the fully qualified location of the view. - * - * @param string $view - * - * @return array */ public function find(string $view): array; /** * Add a location to the finder. - * - * @param string $location - * - * @return self */ public function addLocation(string $location): self; /** * Prepend a location to the finder. - * - * @param string $location - * - * @return void */ public function prependLocation(string $location): void; /** * Add a namespace hint to the finder. * - * @param string $namespace * @param array|string $hints - * - * @return self */ public function addNamespace(string $namespace, $hints): self; /** * Prepend a namespace hint to the finder. * - * @param string $namespace * @param array|string $hints - * - * @return self */ public function prependNamespace(string $namespace, $hints): self; /** * Register an extension with the view finder. - * - * @param string $extension - * - * @return self */ public function addExtension(string $extension): self; /** * Returns whether or not the view specify a hint information. - * - * @param string $name - * - * @return bool */ public function hasHintInformation(string $name): bool; /** * Get the active view paths. - * - * @return array */ public function getPaths(): array; @@ -98,39 +70,28 @@ public function getPaths(): array; * Set the active view paths. * * @param string[] $paths - * - * @return self */ public function setPaths(array $paths): self; /** * Get the namespace to file path hints. - * - * @return array */ public function getHints(): array; /** * Get registered extensions. - * - * @return array */ public function getExtensions(): array; /** * Replace the namespace hints for the given namespace. * - * @param string $namespace * @param array|string $hints - * - * @return self */ public function replaceNamespace(string $namespace, $hints): self; /** * Flush the cache of located views. - * - * @return void */ public function reset(): void; } diff --git a/src/Viserio/Contract/View/Traits/ViewAwareTrait.php b/src/Viserio/Contract/View/Traits/ViewAwareTrait.php index d2e4f22e2..2a059775e 100644 --- a/src/Viserio/Contract/View/Traits/ViewAwareTrait.php +++ b/src/Viserio/Contract/View/Traits/ViewAwareTrait.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View\Traits; @@ -27,8 +27,6 @@ trait ViewAwareTrait /** * Set a view factory instance. * - * @param \Viserio\Contract\View\Factory $viewFactory - * * @return static */ public function setViewFactory(ViewFactoryContract $viewFactory): self diff --git a/src/Viserio/Contract/View/View.php b/src/Viserio/Contract/View/View.php index ed789b9ab..5cad3315a 100644 --- a/src/Viserio/Contract/View/View.php +++ b/src/Viserio/Contract/View/View.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\View; @@ -19,31 +19,21 @@ interface View extends Renderable { /** * Get the name of the view. - * - * @return string */ public function getName(): string; /** * Get the array of view data. - * - * @return array */ public function getData(): array; /** * Get the path to the view file. - * - * @return string */ public function getPath(): string; /** * Set the path to the view. - * - * @param string $path - * - * @return self */ public function setPath(string $path): self; @@ -51,18 +41,11 @@ public function setPath(string $path): self; * Add a piece of data to the view. * * @param array|string $key - * @param mixed $value - * - * @return self */ public function with($key, $value = null): self; /** * Get the string contents of the view. - * - * @param null|callable $callback - * - * @return string */ public function render(?callable $callback = null): string; @@ -70,10 +53,7 @@ public function render(?callable $callback = null): string; * Add a view instance to the view data. * * @param string $key - * @param string $view * @param string[] $data - * - * @return self */ public function nest($key, string $view, array $data = []): self; diff --git a/src/Viserio/Contract/WebServer/Exception/Exception.php b/src/Viserio/Contract/WebServer/Exception/Exception.php index 0a5c37153..eecfd4e56 100644 --- a/src/Viserio/Contract/WebServer/Exception/Exception.php +++ b/src/Viserio/Contract/WebServer/Exception/Exception.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\WebServer\Exception; diff --git a/src/Viserio/Contract/WebServer/Exception/InvalidArgumentException.php b/src/Viserio/Contract/WebServer/Exception/InvalidArgumentException.php index fc9af53cd..823141f4a 100644 --- a/src/Viserio/Contract/WebServer/Exception/InvalidArgumentException.php +++ b/src/Viserio/Contract/WebServer/Exception/InvalidArgumentException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\WebServer\Exception; diff --git a/src/Viserio/Contract/WebServer/Exception/RuntimeException.php b/src/Viserio/Contract/WebServer/Exception/RuntimeException.php index ad66e1774..c385f6f4e 100644 --- a/src/Viserio/Contract/WebServer/Exception/RuntimeException.php +++ b/src/Viserio/Contract/WebServer/Exception/RuntimeException.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Contract\WebServer\Exception; diff --git a/src/Viserio/Contract/composer.json b/src/Viserio/Contract/composer.json index a58fa4c56..b08f4f1f2 100644 --- a/src/Viserio/Contract/composer.json +++ b/src/Viserio/Contract/composer.json @@ -58,8 +58,7 @@ "require-dev": { "mockery/mockery": "^1.2.4", "narrowspark/testing-helper": "^8.0.2", - "narrowspark/coding-standard": "^3.4.0", - "slam/phpstan-extensions": "^4.0.0", + "narrowspark/coding-standard": "^4.0.0", "phpunit/phpunit": "8.2.*", "psr/cache": "^1.0.1", "psr/container": "^1.0.0", diff --git a/src/Viserio/Contract/phpstan.neon b/src/Viserio/Contract/phpstan.neon index b3603d7ea..1bfed1eed 100644 --- a/src/Viserio/Contract/phpstan.neon +++ b/src/Viserio/Contract/phpstan.neon @@ -1,26 +1,16 @@ includes: -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon - - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Fixture/ + - vendor + - Tests/Fixture ignoreErrors: diff --git a/src/Viserio/Contract/phpunit.xml b/src/Viserio/Contract/phpunit.xml new file mode 100644 index 000000000..fe86a3035 --- /dev/null +++ b/src/Viserio/Contract/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Contract/phpunit.xml.dist b/src/Viserio/Contract/phpunit.xml.dist deleted file mode 100644 index 3a989d5c7..000000000 --- a/src/Viserio/Contract/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Provider/Debug/.gitignore b/src/Viserio/Provider/Debug/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Provider/Debug/.gitignore +++ b/src/Viserio/Provider/Debug/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Provider/Debug/Container/Provider/DebugServiceProvider.php b/src/Viserio/Provider/Debug/Container/Provider/DebugServiceProvider.php index 4605e7128..4e8e9b484 100644 --- a/src/Viserio/Provider/Debug/Container/Provider/DebugServiceProvider.php +++ b/src/Viserio/Provider/Debug/Container/Provider/DebugServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Debug\Container\Provider; diff --git a/src/Viserio/Provider/Debug/HtmlDumper.php b/src/Viserio/Provider/Debug/HtmlDumper.php index e60871264..ce002931a 100644 --- a/src/Viserio/Provider/Debug/HtmlDumper.php +++ b/src/Viserio/Provider/Debug/HtmlDumper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Debug; @@ -20,9 +20,6 @@ class HtmlDumper extends SymfonyHtmlDumper /** * Add a new theme to the html dumper. * - * @param string $name - * @param array $options - * * @return static */ public function addTheme(string $name, array $options): HtmlDumper diff --git a/src/Viserio/Provider/Debug/Style.php b/src/Viserio/Provider/Debug/Style.php index 96156e65e..21c51d904 100644 --- a/src/Viserio/Provider/Debug/Style.php +++ b/src/Viserio/Provider/Debug/Style.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Debug; diff --git a/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderTest.php b/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderTest.php index 61cd07c8e..4ac82ae2e 100644 --- a/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderTest.php +++ b/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Debug\Tests\Container\Provider; @@ -29,6 +29,7 @@ * @internal * * @small + * @coversNothing */ final class DebugServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderWithTwigTest.php b/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderWithTwigTest.php index 1ae9463e7..23bc6c068 100644 --- a/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderWithTwigTest.php +++ b/src/Viserio/Provider/Debug/Tests/Container/Provider/DebugServiceProviderWithTwigTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Debug\Tests\Container\Provider; @@ -34,6 +34,7 @@ * @internal * * @small + * @coversNothing */ final class DebugServiceProviderWithTwigTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Provider/Debug/composer.json b/src/Viserio/Provider/Debug/composer.json index bdf9590dc..98b461199 100644 --- a/src/Viserio/Provider/Debug/composer.json +++ b/src/Viserio/Provider/Debug/composer.json @@ -29,10 +29,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Provider/Debug/helper.php b/src/Viserio/Provider/Debug/helper.php index 0d6c1ced1..07dd0344c 100644 --- a/src/Viserio/Provider/Debug/helper.php +++ b/src/Viserio/Provider/Debug/helper.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use Symfony\Component\VarDumper\Cloner\VarCloner; diff --git a/src/Viserio/Provider/Debug/phpstan.neon b/src/Viserio/Provider/Debug/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Provider/Debug/phpstan.neon +++ b/src/Viserio/Provider/Debug/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Provider/Debug/phpunit.xml b/src/Viserio/Provider/Debug/phpunit.xml new file mode 100644 index 000000000..f6ee6d064 --- /dev/null +++ b/src/Viserio/Provider/Debug/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Provider/Debug/phpunit.xml.dist b/src/Viserio/Provider/Debug/phpunit.xml.dist deleted file mode 100644 index 6fa5a038c..000000000 --- a/src/Viserio/Provider/Debug/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Provider/Framework/.gitignore b/src/Viserio/Provider/Framework/.gitignore index c49a5d8df..d1502b087 100644 --- a/src/Viserio/Provider/Framework/.gitignore +++ b/src/Viserio/Provider/Framework/.gitignore @@ -1,3 +1,2 @@ vendor/ composer.lock -phpunit.xml diff --git a/src/Viserio/Provider/Framework/Bootstrap/Cache/AbstractCache.php b/src/Viserio/Provider/Framework/Bootstrap/Cache/AbstractCache.php index 9a586433e..433720f63 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/Cache/AbstractCache.php +++ b/src/Viserio/Provider/Framework/Bootstrap/Cache/AbstractCache.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap\Cache; @@ -24,8 +24,6 @@ abstract class AbstractCache /** * Get cache file path. - * - * @return string */ public function getPath(): string { @@ -35,8 +33,6 @@ public function getPath(): string /** * Set the patch for the cache file. * - * @param string $path - * * @return static */ public function setPath(string $path) @@ -50,8 +46,6 @@ public function setPath(string $path) * Write content to a cache file. * * @param string $content The content to write in the cache - * - * @return void */ abstract public function write(string $content): void; } diff --git a/src/Viserio/Provider/Framework/Bootstrap/Cache/FileSystemCache.php b/src/Viserio/Provider/Framework/Bootstrap/Cache/FileSystemCache.php index 3e5e847cd..e650dd374 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/Cache/FileSystemCache.php +++ b/src/Viserio/Provider/Framework/Bootstrap/Cache/FileSystemCache.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap\Cache; diff --git a/src/Viserio/Provider/Framework/Bootstrap/Cache/StreamCache.php b/src/Viserio/Provider/Framework/Bootstrap/Cache/StreamCache.php index 7e29a9cd3..82ee0e09f 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/Cache/StreamCache.php +++ b/src/Viserio/Provider/Framework/Bootstrap/Cache/StreamCache.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap\Cache; @@ -21,7 +21,6 @@ final class StreamCache extends AbstractCache /** * Create a StreamCache instance. * - * @param string $path * @param resource $lock */ public function __construct(string $path, $lock) diff --git a/src/Viserio/Provider/Framework/Bootstrap/ConfigurationLoaderBootstrap.php b/src/Viserio/Provider/Framework/Bootstrap/ConfigurationLoaderBootstrap.php index 707e1d58a..6b40b9963 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/ConfigurationLoaderBootstrap.php +++ b/src/Viserio/Provider/Framework/Bootstrap/ConfigurationLoaderBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap; @@ -94,8 +94,6 @@ public static function bootstrap(KernelContract $kernel): void } /** - * @param string $path - * * @return array */ protected static function load(string $path): array @@ -106,10 +104,7 @@ protected static function load(string $path): array /** * Load parameter into container from a given path. * - * @param string $path * @param \Viserio\Contract\Container\ContainerBuilder&\Viserio\Contract\Container\ServiceProvider\ContainerBuilder $containerBuilder - * - * @return void */ private static function setParameters(string $path, $containerBuilder): void { diff --git a/src/Viserio/Provider/Framework/Bootstrap/ConfigureKernelBootstrap.php b/src/Viserio/Provider/Framework/Bootstrap/ConfigureKernelBootstrap.php index 06df8b491..d0a2d0282 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/ConfigureKernelBootstrap.php +++ b/src/Viserio/Provider/Framework/Bootstrap/ConfigureKernelBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap; diff --git a/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBootstrap.php b/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBootstrap.php index a5e587098..c13971e1c 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBootstrap.php +++ b/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap; @@ -86,7 +86,7 @@ public static function bootstrap(KernelContract $kernel): void try { \is_dir($cacheDir) ?: \mkdir($cacheDir, 0777, true); - if ($lock = \fopen($containerFile, 'w')) { + if ($lock = \fopen($containerFile, 'wb')) { \chmod($containerFile, 0666 & ~\umask()); \flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock); @@ -167,8 +167,6 @@ public static function bootstrap(KernelContract $kernel): void /** * Gets the container class. * - * @param \Viserio\Contract\Foundation\Kernel $kernel - * * @return string The container class */ protected static function getContainerClass(KernelContract $kernel): string @@ -182,10 +180,6 @@ protected static function getContainerClass(KernelContract $kernel): string /** * Builds the service container. * - * @param string $cacheDir - * @param string $logDir - * @param \Viserio\Contract\Foundation\Kernel $kernel - * * @throws \RuntimeException * * @return \Viserio\Contract\Container\ContainerBuilder&\Viserio\Contract\Container\ServiceProvider\ContainerBuilder The compiled service container @@ -211,15 +205,10 @@ protected static function buildContainer( /** * Dumps the service container to PHP code in the cache. * - * @param \Viserio\Provider\Framework\Bootstrap\Cache\AbstractCache $cache - * @param \Viserio\Contract\Container\ContainerBuilder $container The service container - * @param string $class The name of the class to generate - * @param \Viserio\Contract\Foundation\Kernel $kernel - * @param \Viserio\Contract\Filesystem\Filesystem $filesystem + * @param \Viserio\Contract\Container\ContainerBuilder $container The service container + * @param string $class The name of the class to generate * * @throws \Viserio\Contract\Container\Exception\CircularDependencyException - * - * @return void */ protected static function dumpContainer( AbstractCache $cache, @@ -279,11 +268,6 @@ protected static function dumpContainer( $cache->write($rootCode); } - /** - * @param mixed $collectedLogs - * - * @return null|array - */ protected static function collectContainerLogs(&$collectedLogs): ?array { $previousHandler = \set_error_handler(static function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { diff --git a/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBuilderBootstrap.php b/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBuilderBootstrap.php index 86fbe54d3..bc7560f90 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBuilderBootstrap.php +++ b/src/Viserio/Provider/Framework/Bootstrap/InitializeContainerBuilderBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap; diff --git a/src/Viserio/Provider/Framework/Bootstrap/LoadServiceProviderBootstrap.php b/src/Viserio/Provider/Framework/Bootstrap/LoadServiceProviderBootstrap.php index 4e38baec9..c85efbd77 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/LoadServiceProviderBootstrap.php +++ b/src/Viserio/Provider/Framework/Bootstrap/LoadServiceProviderBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap; diff --git a/src/Viserio/Provider/Framework/Bootstrap/PrepareContainerBuilderBootstrap.php b/src/Viserio/Provider/Framework/Bootstrap/PrepareContainerBuilderBootstrap.php index 4fc97b93c..d5090cb2b 100644 --- a/src/Viserio/Provider/Framework/Bootstrap/PrepareContainerBuilderBootstrap.php +++ b/src/Viserio/Provider/Framework/Bootstrap/PrepareContainerBuilderBootstrap.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Bootstrap; diff --git a/src/Viserio/Provider/Framework/Container/Processor/ComposerExtraProcessor.php b/src/Viserio/Provider/Framework/Container/Processor/ComposerExtraProcessor.php index e7428c6c8..7f001b573 100644 --- a/src/Viserio/Provider/Framework/Container/Processor/ComposerExtraProcessor.php +++ b/src/Viserio/Provider/Framework/Container/Processor/ComposerExtraProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Container\Processor; @@ -29,9 +29,6 @@ class ComposerExtraProcessor extends AbstractParameterProcessor /** * Create a new ComposerExtraProcessor instance. - * - * @param string $dirPath - * @param string $composerJsonName */ public function __construct(string $dirPath, string $composerJsonName = 'composer.json') { diff --git a/src/Viserio/Provider/Framework/Container/Processor/DirectoryParameterProcessor.php b/src/Viserio/Provider/Framework/Container/Processor/DirectoryParameterProcessor.php index 7779e60d2..235d71abb 100644 --- a/src/Viserio/Provider/Framework/Container/Processor/DirectoryParameterProcessor.php +++ b/src/Viserio/Provider/Framework/Container/Processor/DirectoryParameterProcessor.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Container\Processor; @@ -32,8 +32,7 @@ final class DirectoryParameterProcessor extends AbstractParameterProcessor imple /** * Create a new DirectoryParameterProcessor instance. * - * @param array> $mappers - * @param \Viserio\Contract\Container\CompiledContainer $compiledContainer + * @param array> $mappers */ public function __construct(array $mappers, CompiledContainerContract $compiledContainer) { diff --git a/src/Viserio/Provider/Framework/Container/Provider/FrameworkServiceProvider.php b/src/Viserio/Provider/Framework/Container/Provider/FrameworkServiceProvider.php index 088b6fbec..d1cf19732 100644 --- a/src/Viserio/Provider/Framework/Container/Provider/FrameworkServiceProvider.php +++ b/src/Viserio/Provider/Framework/Container/Provider/FrameworkServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Container\Provider; diff --git a/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigurationLoaderBootstrapTest.php b/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigurationLoaderBootstrapTest.php index 863d9fcf2..93437de54 100644 --- a/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigurationLoaderBootstrapTest.php +++ b/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigurationLoaderBootstrapTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Bootstrap; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ConfigurationLoaderBootstrapTest extends MockeryTestCase { diff --git a/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigureKernelBootstrapTest.php b/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigureKernelBootstrapTest.php index f5ac2697e..cd1b4a6be 100644 --- a/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigureKernelBootstrapTest.php +++ b/src/Viserio/Provider/Framework/Tests/Bootstrap/ConfigureKernelBootstrapTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Bootstrap; @@ -25,6 +25,7 @@ * @internal * * @small + * @coversNothing */ final class ConfigureKernelBootstrapTest extends MockeryTestCase { diff --git a/src/Viserio/Provider/Framework/Tests/Bootstrap/LoadServiceProviderBootstrapTest.php b/src/Viserio/Provider/Framework/Tests/Bootstrap/LoadServiceProviderBootstrapTest.php index ade16e4bd..119425a0f 100644 --- a/src/Viserio/Provider/Framework/Tests/Bootstrap/LoadServiceProviderBootstrapTest.php +++ b/src/Viserio/Provider/Framework/Tests/Bootstrap/LoadServiceProviderBootstrapTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Bootstrap; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class LoadServiceProviderBootstrapTest extends MockeryTestCase { diff --git a/src/Viserio/Provider/Framework/Tests/Container/Processor/ComposerExtraProcessorTest.php b/src/Viserio/Provider/Framework/Tests/Container/Processor/ComposerExtraProcessorTest.php index 1e9718145..1ba5c0065 100644 --- a/src/Viserio/Provider/Framework/Tests/Container/Processor/ComposerExtraProcessorTest.php +++ b/src/Viserio/Provider/Framework/Tests/Container/Processor/ComposerExtraProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Container\Processor; diff --git a/src/Viserio/Provider/Framework/Tests/Container/Processor/DirectoryParameterProcessorTest.php b/src/Viserio/Provider/Framework/Tests/Container/Processor/DirectoryParameterProcessorTest.php index e056946e3..7f1955628 100644 --- a/src/Viserio/Provider/Framework/Tests/Container/Processor/DirectoryParameterProcessorTest.php +++ b/src/Viserio/Provider/Framework/Tests/Container/Processor/DirectoryParameterProcessorTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Container\Processor; @@ -91,7 +91,6 @@ public function testProcess(): void ->with('foo') ->andReturn(__DIR__); - $processor = new DirectoryParameterProcessor($this->data, $this->containerMock); self::assertSame($kernel->getConfigPath(), $processor->process('config|directory')); diff --git a/src/Viserio/Provider/Framework/Tests/Container/Provider/FrameworkServiceProviderTest.php b/src/Viserio/Provider/Framework/Tests/Container/Provider/FrameworkServiceProviderTest.php index 07b734625..fbe05e987 100644 --- a/src/Viserio/Provider/Framework/Tests/Container/Provider/FrameworkServiceProviderTest.php +++ b/src/Viserio/Provider/Framework/Tests/Container/Provider/FrameworkServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Container\Provider; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class FrameworkServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Provider/Framework/Tests/Fixture/Provider/FixtureServiceProvider.php b/src/Viserio/Provider/Framework/Tests/Fixture/Provider/FixtureServiceProvider.php index 23b1c42b9..f1b3978f0 100644 --- a/src/Viserio/Provider/Framework/Tests/Fixture/Provider/FixtureServiceProvider.php +++ b/src/Viserio/Provider/Framework/Tests/Fixture/Provider/FixtureServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Framework\Tests\Fixture\Provider; diff --git a/src/Viserio/Provider/Framework/Tests/Fixture/config/packages/test1.php b/src/Viserio/Provider/Framework/Tests/Fixture/config/packages/test1.php index f35b59bee..2db434c9f 100644 --- a/src/Viserio/Provider/Framework/Tests/Fixture/config/packages/test1.php +++ b/src/Viserio/Provider/Framework/Tests/Fixture/config/packages/test1.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return [ diff --git a/src/Viserio/Provider/Framework/Tests/Fixture/config/test2.php b/src/Viserio/Provider/Framework/Tests/Fixture/config/test2.php index ba696371e..e6d282fc8 100644 --- a/src/Viserio/Provider/Framework/Tests/Fixture/config/test2.php +++ b/src/Viserio/Provider/Framework/Tests/Fixture/config/test2.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ return [ diff --git a/src/Viserio/Provider/Framework/Tests/Fixture/serviceproviders.php b/src/Viserio/Provider/Framework/Tests/Fixture/serviceproviders.php index 2ea18129e..ce5ce9992 100644 --- a/src/Viserio/Provider/Framework/Tests/Fixture/serviceproviders.php +++ b/src/Viserio/Provider/Framework/Tests/Fixture/serviceproviders.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ use Viserio\Provider\Framework\Tests\Fixture\Provider\FixtureServiceProvider; diff --git a/src/Viserio/Provider/Framework/composer.json b/src/Viserio/Provider/Framework/composer.json index b5bbb3f8e..27b114d8d 100644 --- a/src/Viserio/Provider/Framework/composer.json +++ b/src/Viserio/Provider/Framework/composer.json @@ -30,10 +30,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/parser": "^1.0@dev", "viserio/phpstan-bridge": "^1.0@dev" }, diff --git a/src/Viserio/Provider/Framework/phpstan.neon b/src/Viserio/Provider/Framework/phpstan.neon index 42f670713..aa4f19f01 100644 --- a/src/Viserio/Provider/Framework/phpstan.neon +++ b/src/Viserio/Provider/Framework/phpstan.neon @@ -1,43 +1,7 @@ includes: - - vendor/viserio/phpstan-bridge/viserio.extensions.neon - - vendor/viserio/phpstan-bridge/viserio.rules.neon - - vendor/phpstan/phpstan-deprecation-rules/rules.neon - - vendor/phpstan/phpstan-mockery/extension.neon - - vendor/phpstan/phpstan-phpunit/extension.neon - - vendor/phpstan/phpstan-phpunit/rules.neon - - vendor/phpstan/phpstan-strict-rules/rules.neon - - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - vendor/phpstan/phpstan/conf/bleedingEdge.neon - -services: - - - class: SlamPhpStan\ClassNotationRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\GotoRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\PhpUnitFqcnAnnotationRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\StringToClassRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\UnusedVariableRule - tags: - - phpstan.rules.rule - - - class: SlamPhpStan\MissingClosureParameterTypehintRule - tags: - - phpstan.rules.rule + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - ./ @@ -45,8 +9,8 @@ parameters: - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Provider/Framework/phpunit.xml b/src/Viserio/Provider/Framework/phpunit.xml new file mode 100644 index 000000000..477a6bcc2 --- /dev/null +++ b/src/Viserio/Provider/Framework/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Provider/Framework/phpunit.xml.dist b/src/Viserio/Provider/Framework/phpunit.xml.dist deleted file mode 100644 index bffb60f72..000000000 --- a/src/Viserio/Provider/Framework/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - - diff --git a/src/Viserio/Provider/Twig/.gitignore b/src/Viserio/Provider/Twig/.gitignore index 8e6a2d602..235d278fd 100644 --- a/src/Viserio/Provider/Twig/.gitignore +++ b/src/Viserio/Provider/Twig/.gitignore @@ -1,4 +1,3 @@ vendor/ composer.lock -phpunit.xml /Tests/Cache/ diff --git a/src/Viserio/Provider/Twig/Command/CleanCommand.php b/src/Viserio/Provider/Twig/Command/CleanCommand.php index fd3a19057..34ae1d4b7 100644 --- a/src/Viserio/Provider/Twig/Command/CleanCommand.php +++ b/src/Viserio/Provider/Twig/Command/CleanCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Command; @@ -34,23 +34,16 @@ class CleanCommand extends AbstractCommand implements RequiresComponentConfigCon /** * The cache folder path. - * - * @var string */ protected string $cacheDir; /** * A Filesystem instance. - * - * @var \Viserio\Contract\Filesystem\Filesystem */ private FilesystemContract $filesystem; /** * Create a new CleanCommand instance. - * - * @param \Viserio\Contract\Filesystem\Filesystem $filesystem - * @param string $cache */ public function __construct(FilesystemContract $filesystem, string $cache) { diff --git a/src/Viserio/Provider/Twig/Command/LintCommand.php b/src/Viserio/Provider/Twig/Command/LintCommand.php index b8658a6e4..9cdb791f5 100644 --- a/src/Viserio/Provider/Twig/Command/LintCommand.php +++ b/src/Viserio/Provider/Twig/Command/LintCommand.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Command; @@ -47,17 +47,11 @@ class LintCommand extends BaseLintCommand implements ProvidesDefaultConfigContra /** * Twig file extension name. - * - * @var string */ private string $fileExtension; /** * Create a DebugCommand instance. - * - * @param \Twig\Environment $environment - * @param \Viserio\Contract\View\Finder $finder - * @param string $fileExtension */ public function __construct(Environment $environment, FinderContract $finder, string $fileExtension) { @@ -157,12 +151,6 @@ protected function getFiles(array $files, array $directories): array /** * Gets an array of argument files to lint. - * - * @param array $paths - * @param array $searchDirectories - * @param array $files - * - * @return array */ protected function findArgumentFiles(array $paths, array $searchDirectories, array $files): array { diff --git a/src/Viserio/Provider/Twig/Container/Pipeline/RuntimeLoaderPipe.php b/src/Viserio/Provider/Twig/Container/Pipeline/RuntimeLoaderPipe.php index 9ecef41ea..0a29f7eaa 100644 --- a/src/Viserio/Provider/Twig/Container/Pipeline/RuntimeLoaderPipe.php +++ b/src/Viserio/Provider/Twig/Container/Pipeline/RuntimeLoaderPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Container\Pipeline; diff --git a/src/Viserio/Provider/Twig/Container/Pipeline/TwigLoaderPipe.php b/src/Viserio/Provider/Twig/Container/Pipeline/TwigLoaderPipe.php index aa66d2cbc..d2a114c87 100644 --- a/src/Viserio/Provider/Twig/Container/Pipeline/TwigLoaderPipe.php +++ b/src/Viserio/Provider/Twig/Container/Pipeline/TwigLoaderPipe.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Container\Pipeline; diff --git a/src/Viserio/Provider/Twig/Container/Provider/TwigServiceProvider.php b/src/Viserio/Provider/Twig/Container/Provider/TwigServiceProvider.php index 4b33f93d1..c12b1fb4a 100644 --- a/src/Viserio/Provider/Twig/Container/Provider/TwigServiceProvider.php +++ b/src/Viserio/Provider/Twig/Container/Provider/TwigServiceProvider.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Container\Provider; diff --git a/src/Viserio/Provider/Twig/Engine/TwigEngine.php b/src/Viserio/Provider/Twig/Engine/TwigEngine.php index 918a59cd3..3ab8de5da 100644 --- a/src/Viserio/Provider/Twig/Engine/TwigEngine.php +++ b/src/Viserio/Provider/Twig/Engine/TwigEngine.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Engine; @@ -26,8 +26,6 @@ class TwigEngine extends AbstractBaseEngine implements ProvidesDefaultConfigCont /** * Twig environment. - * - * @var \Twig\Environment */ protected Environment $twig; @@ -41,7 +39,6 @@ class TwigEngine extends AbstractBaseEngine implements ProvidesDefaultConfigCont /** * Create a new engine instance. * - * @param \Twig\Environment $twig * @param array $extensions */ public function __construct(Environment $twig, array $extensions = []) @@ -52,8 +49,6 @@ public function __construct(Environment $twig, array $extensions = []) /** * Returns the engine names. - * - * @return array */ public static function getDefaultNames(): array { diff --git a/src/Viserio/Provider/Twig/Loader.php b/src/Viserio/Provider/Twig/Loader.php index 51c65f4b3..76dceadd6 100644 --- a/src/Viserio/Provider/Twig/Loader.php +++ b/src/Viserio/Provider/Twig/Loader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig; @@ -53,9 +53,6 @@ class Loader implements LoaderInterface /** * Create a new twig loader instance. - * - * @param \Viserio\Contract\View\Finder $finder - * @param \Viserio\Contract\Filesystem\Filesystem $filesystem */ public function __construct(FinderContract $finder, ContractFilesystem $filesystem) { @@ -66,10 +63,6 @@ public function __construct(FinderContract $finder, ContractFilesystem $filesyst /** * Set file extension for the twig loader. * - * @param string $extension - * - * @return \Twig\Loader\LoaderInterface - * * @codeCoverageIgnore */ public function setExtension(string $extension): LoaderInterface @@ -134,11 +127,7 @@ public function isFresh($name, $time): bool /** * Return path to template without the need for the extension. * - * @param string $name - * * @throws \Twig\Error\LoaderError - * - * @return string */ public function findTemplate(string $name): string { @@ -164,10 +153,6 @@ public function findTemplate(string $name): string /** * Normalize the Twig template name to a name the ViewFinder can use. - * - * @param string $name - * - * @return string */ protected function normalizeName(string $name): string { diff --git a/src/Viserio/Provider/Twig/RuntimeLoader/IteratorRuntimeLoader.php b/src/Viserio/Provider/Twig/RuntimeLoader/IteratorRuntimeLoader.php index 455868195..2783bce8d 100644 --- a/src/Viserio/Provider/Twig/RuntimeLoader/IteratorRuntimeLoader.php +++ b/src/Viserio/Provider/Twig/RuntimeLoader/IteratorRuntimeLoader.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\RuntimeLoader; diff --git a/src/Viserio/Provider/Twig/Tests/Command/CleanCommandTest.php b/src/Viserio/Provider/Twig/Tests/Command/CleanCommandTest.php index 3502c1c9d..67bb2659c 100644 --- a/src/Viserio/Provider/Twig/Tests/Command/CleanCommandTest.php +++ b/src/Viserio/Provider/Twig/Tests/Command/CleanCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Tests\Command; @@ -23,6 +23,7 @@ * @internal * * @small + * @coversNothing */ final class CleanCommandTest extends MockeryTestCase { diff --git a/src/Viserio/Provider/Twig/Tests/Command/LintCommandTest.php b/src/Viserio/Provider/Twig/Tests/Command/LintCommandTest.php index 190cb238a..d3e70edee 100644 --- a/src/Viserio/Provider/Twig/Tests/Command/LintCommandTest.php +++ b/src/Viserio/Provider/Twig/Tests/Command/LintCommandTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Tests\Commands; @@ -30,6 +30,7 @@ * @internal * * @small + * @coversNothing */ final class LintCommandTest extends MockeryTestCase { @@ -149,8 +150,6 @@ public function testTwigLintWithDeprecations(): void /** * @param null|mixed $path - * - * @return \Symfony\Component\Console\Tester\CommandTester */ private function createCommandTester($path = null): CommandTester { diff --git a/src/Viserio/Provider/Twig/Tests/Container/Provider/TwigServiceProviderTest.php b/src/Viserio/Provider/Twig/Tests/Container/Provider/TwigServiceProviderTest.php index 4574ae58d..5026645b1 100644 --- a/src/Viserio/Provider/Twig/Tests/Container/Provider/TwigServiceProviderTest.php +++ b/src/Viserio/Provider/Twig/Tests/Container/Provider/TwigServiceProviderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Tests\Container\Provider; @@ -38,6 +38,7 @@ * @internal * * @small + * @coversNothing */ final class TwigServiceProviderTest extends AbstractContainerTestCase { diff --git a/src/Viserio/Provider/Twig/Tests/Engine/TwigEngineTest.php b/src/Viserio/Provider/Twig/Tests/Engine/TwigEngineTest.php index bbdcfb1d6..216980662 100644 --- a/src/Viserio/Provider/Twig/Tests/Engine/TwigEngineTest.php +++ b/src/Viserio/Provider/Twig/Tests/Engine/TwigEngineTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Tests\Engine; @@ -24,6 +24,7 @@ * @internal * * @small + * @coversNothing */ final class TwigEngineTest extends MockeryTestCase { diff --git a/src/Viserio/Provider/Twig/Tests/LoaderTest.php b/src/Viserio/Provider/Twig/Tests/LoaderTest.php index 57f996ef3..5d39d16a0 100644 --- a/src/Viserio/Provider/Twig/Tests/LoaderTest.php +++ b/src/Viserio/Provider/Twig/Tests/LoaderTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); /** - * This file is part of Narrowspark Framework. + * Copyright (c) 2018-2020 Daniel Bannert * - * (c) Daniel Bannert + * For the full copyright and license information, please view + * the LICENSE.md file that was distributed with this source code. * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * @see https://github.com/narrowspark/automatic */ namespace Viserio\Provider\Twig\Tests; @@ -27,6 +27,7 @@ * @internal * * @small + * @coversNothing */ final class LoaderTest extends MockeryTestCase { diff --git a/src/Viserio/Provider/Twig/composer.json b/src/Viserio/Provider/Twig/composer.json index 13ec497a2..13fd58e17 100644 --- a/src/Viserio/Provider/Twig/composer.json +++ b/src/Viserio/Provider/Twig/composer.json @@ -31,10 +31,9 @@ }, "require-dev": { "mockery/mockery": "^1.2.4", - "narrowspark/coding-standard": "^3.4.0", + "narrowspark/coding-standard": "^4.0.0", "narrowspark/testing-helper": "^8.0.2", "phpunit/phpunit": "8.2.*", - "slam/phpstan-extensions": "^4.0.0", "viserio/config": "^1.0@dev", "viserio/console": "^1.0@dev", "viserio/container": "^1.0@dev", diff --git a/src/Viserio/Provider/Twig/phpstan.neon b/src/Viserio/Provider/Twig/phpstan.neon index e76a76f23..e41b1b64c 100644 --- a/src/Viserio/Provider/Twig/phpstan.neon +++ b/src/Viserio/Provider/Twig/phpstan.neon @@ -1,28 +1,18 @@ includes: - - %rootDir%/../../viserio/phpstan-bridge/viserio.extensions.neon - - %rootDir%/../../viserio/phpstan-bridge/viserio.rules.neon -# - %rootDir%/vendor/pepakriz/phpstan-exception-rules/extension.neon - - %rootDir%/../phpstan-deprecation-rules/rules.neon - - %rootDir%/../phpstan-mockery/extension.neon - - %rootDir%/../phpstan-phpunit/extension.neon - - %rootDir%/../phpstan-phpunit/rules.neon - - %rootDir%/../phpstan-strict-rules/rules.neon -# - %rootDir%/../../thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon - - %rootDir%/../phpstan/conf/bleedingEdge.neon - - %rootDir%/../../slam/phpstan-extensions/conf/slam-rules.neon + - vendor/viserio/phpstan-bridge/viserio.extensions.neon + - vendor/viserio/phpstan-bridge/viserio.rules.neon + - vendor/narrowspark/coding-standard/base_rules.neon parameters: - level: max - inferPrivatePropertyTypeFromConstructor: true paths: - - %rootDir%/../../.. + - ./ autoload_directories: - - %rootDir%/../../.. + - ./ excludes_analyse: - - vendor/ - - Tests/Fixture/ + - vendor + - Tests/Fixture - Tests/Container/Provider/Compiled ignoreErrors: diff --git a/src/Viserio/Provider/Twig/phpunit.xml b/src/Viserio/Provider/Twig/phpunit.xml new file mode 100644 index 000000000..dcc1f574d --- /dev/null +++ b/src/Viserio/Provider/Twig/phpunit.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./vendor + ./Tests + + + + + diff --git a/src/Viserio/Provider/Twig/phpunit.xml.dist b/src/Viserio/Provider/Twig/phpunit.xml.dist deleted file mode 100644 index 7ad7da004..000000000 --- a/src/Viserio/Provider/Twig/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./vendor - ./Tests - - - - -