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..8e153c4 100644 --- a/src/Codeception/Module/Memcache.php +++ b/src/Codeception/Module/Memcache.php @@ -10,7 +10,7 @@ use Memcached; /** - * Connects to [memcached](http://www.memcached.org/) using either _Memcache_ or _Memcached_ extension. + * Connects to [memcached](https://www.memcached.org/) using either _Memcache_ or _Memcached_ extension. * * Performs a cleanup by flushing all values after each test run. * @@ -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)); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy