diff --git a/composer.json b/composer.json index 76960cf..583d111 100644 --- a/composer.json +++ b/composer.json @@ -32,10 +32,10 @@ "adamwojs/php-cs-fixer-phpdoc-force-fqcn": "^2.0", "codeception/module-asserts": "^2.0", "codeception/module-phpbrowser": "^2.0", - "friendsofphp/php-cs-fixer": "^3.8", - "phpstan/phpstan": "^1.5", - "rector/rector": "^0.15.21", - "squizlabs/php_codesniffer": "^3.6" + "friendsofphp/php-cs-fixer": "^3.22", + "phpstan/phpstan": "^1.10", + "rector/rector": "^0.17.10", + "squizlabs/php_codesniffer": "^3.7" }, "config": { "optimize-autoloader": true, diff --git a/src/Codeception/Module/Percy.php b/src/Codeception/Module/Percy.php index 72f3052..016e74b 100644 --- a/src/Codeception/Module/Percy.php +++ b/src/Codeception/Module/Percy.php @@ -46,8 +46,8 @@ class Percy extends Module /** * Percy constructor. * - * @throws \Codeception\Exception\ModuleException * @param array|null $config + * @throws \Codeception\Exception\ModuleException */ public function __construct( ModuleContainer $moduleContainer, @@ -78,8 +78,8 @@ public function __construct( /** * Take snapshot of DOM and send to https://percy.io * - * @throws \Throwable * @param array $snapshotConfig + * @throws \Throwable */ public function takeAPercySnapshot( string $name, @@ -143,9 +143,8 @@ public function _afterSuite(): void * * Clear payload cache on failure * + * @param \Exception $fail * @throws \Throwable - * @param \Exception $fail - * @param \Codeception\TestInterface $test */ public function _failed(TestInterface $test, $fail): void { diff --git a/src/Codeception/Module/Percy/ConfigManagement.php b/src/Codeception/Module/Percy/ConfigManagement.php index a998d03..ba8f50a 100644 --- a/src/Codeception/Module/Percy/ConfigManagement.php +++ b/src/Codeception/Module/Percy/ConfigManagement.php @@ -46,11 +46,7 @@ public function get(string $key = null) return $this->config; } - if (isset($this->config[$key])) { - return $this->config[$key]; - } - - return null; + return $this->config[$key] ?? null; } /**