diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab7eb8b..e16675b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: [7.4, 8.0, 8.1] + php: [8.0, 8.1] steps: - name: Checkout code diff --git a/composer.json b/composer.json index 1ce465e..929683b 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ ], "minimum-stability": "RC", "require": { - "php": "^7.4 | ^8.0", - "codeception/codeception": "^4.0" + "php": "^8.0", + "codeception/codeception": "^5.0" }, "require-dev": { "ext-memcache": "*", diff --git a/src/Codeception/Module/Memcache.php b/src/Codeception/Module/Memcache.php index 52b804f..e2d7fd6 100644 --- a/src/Codeception/Module/Memcache.php +++ b/src/Codeception/Module/Memcache.php @@ -42,15 +42,12 @@ */ class Memcache extends Module { - /** - * @var \Memcache|Memcached|null - */ - public $memcache = null; + public \Memcache|Memcached|null $memcache = null; /** * @var array */ - protected $config = [ + protected array $config = [ 'host' => 'localhost', 'port' => 11211 ]; @@ -99,10 +96,8 @@ public function _after(TestInterface $test): void * grabValueFromMemcached('users_count'); * ``` - * - * @return mixed */ - public function grabValueFromMemcached(string $key) + public function grabValueFromMemcached(string $key): mixed { $value = $this->memcache->get($key); $this->debugSection("Value", $value); @@ -123,10 +118,8 @@ public function grabValueFromMemcached(string $key) * // Checks a 'users_count' exists and has the value 200 * $I->seeInMemcached('users_count', 200); * ``` - * - * @param mixed $value */ - public function seeInMemcached(string $key, $value = null): void + public function seeInMemcached(string $key, mixed $value = null): void { $actual = $this->memcache->get($key); $this->debugSection("Value", $actual); @@ -151,10 +144,8 @@ public function seeInMemcached(string $key, $value = null): void * // Checks a 'users_count' exists does not exist or its value is not the one provided * $I->dontSeeInMemcached('users_count', 200); * ``` - * - * @param mixed $value */ - public function dontSeeInMemcached(string $key, $value = null): void + public function dontSeeInMemcached(string $key, mixed $value = null): void { $actual = $this->memcache->get($key); $this->debugSection("Value", $actual); @@ -168,10 +159,8 @@ public function dontSeeInMemcached(string $key, $value = null): void /** * Stores an item `$value` with `$key` on the Memcached server. - * - * @param mixed $value */ - public function haveInMemcached(string $key, $value, int $expiration = 0): void + public function haveInMemcached(string $key, mixed $value, int $expiration = 0): void { if (get_class($this->memcache) == 'Memcache') { $this->assertTrue($this->memcache->set($key, $value, 0, $expiration));