From 94e1cb6e0cd3e0dc7650df501f500ab8904b8599 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sat, 17 Aug 2024 18:19:15 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- wip/php/access/AbstractAccess.php | 4 ---- wip/php/access/KeyAccess.php | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wip/php/access/AbstractAccess.php b/wip/php/access/AbstractAccess.php index 848f4d9..a58fbed 100644 --- a/wip/php/access/AbstractAccess.php +++ b/wip/php/access/AbstractAccess.php @@ -4,10 +4,6 @@ namespace nur\sery\wip\php\access; use nur\sery\cl; abstract class AbstractAccess implements IAccess { - function available(): bool { - return $this->exists() && $this->get() !== false; - } - function inc(): int { $value = (int)$this->get(); $this->set(++$value); diff --git a/wip/php/access/KeyAccess.php b/wip/php/access/KeyAccess.php index 545d6e2..8f3e485 100644 --- a/wip/php/access/KeyAccess.php +++ b/wip/php/access/KeyAccess.php @@ -23,6 +23,10 @@ class KeyAccess extends AbstractAccess { return $this->key !== null && cl::has($this->dest, $this->key); } + function available(): bool { + return $this->exists() && $this->get() !== false; + } + function get($default=null) { if ($this->key === null) return $default; return cl::get($this->dest, $this->key, $default);