Skip to content

Commit 43cf4c0

Browse files
committed
Update
1 parent 6195449 commit 43cf4c0

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/Dashboards/Memcached/MemcacheCompatibility/Memcache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace RobiNN\Pca\Dashboards\Memcached\MemcacheCompatibility;
1414

1515
class Memcache extends \Memcache implements MemcacheInterface {
16-
use GetKeysTrait;
16+
use RunCommandTrait;
1717

1818
/**
1919
* @var array<string, mixed>

src/Dashboards/Memcached/MemcacheCompatibility/Memcached.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace RobiNN\Pca\Dashboards\Memcached\MemcacheCompatibility;
1414

1515
class Memcached extends \Memcached implements MemcacheInterface {
16-
use GetKeysTrait;
16+
use RunCommandTrait;
1717

1818
/**
1919
* @var array<string, mixed>

src/Dashboards/Memcached/MemcacheCompatibility/GetKeysTrait.php renamed to src/Dashboards/Memcached/MemcacheCompatibility/RunCommandTrait.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@
1212

1313
namespace RobiNN\Pca\Dashboards\Memcached\MemcacheCompatibility;
1414

15-
trait GetKeysTrait {
15+
trait RunCommandTrait {
1616
/**
1717
* Run command.
1818
*
19+
* https://github.com/memcached/memcached/wiki/Commands
20+
*
1921
* @param string $command
2022
*
2123
* @return ?array<mixed, mixed>
2224
*/
23-
private function runCommand(string $command): ?array {
24-
static $data = [];
25+
public function runCommand(string $command): ?array {
26+
$data = [];
2527

2628
$fp = @fsockopen($this->server['host'], (int) $this->server['port'], $error_code, $error_message, 3);
2729

@@ -35,7 +37,6 @@ private function runCommand(string $command): ?array {
3537

3638
while (true) {
3739
$part .= fgets($fp, 1024);
38-
3940
$lines = explode("\n", $part);
4041
$part = array_pop($lines);
4142

0 commit comments

Comments
 (0)