Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
punyflash committed Jul 24, 2023
1 parent 9084fb9 commit dfeab7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Contracts/StorageContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
interface StorageContract
{
public function get(string $key, $default = null): mixed;
public function set(string $key, $value): true;
public function delete(string $key): true;
public function set(string $key, $value): bool;
public function delete(string $key): bool;
}
4 changes: 2 additions & 2 deletions src/Storage/JsonStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public function get(string $key, $default = null): mixed
return $this->data[$key] ?? $default;
}

public function set(string $key, $value): true
public function set(string $key, $value): bool
{
$this->data[$key] = $value;
return $this->changed = true;
}

public function delete(string $key): true
public function delete(string $key): bool
{
unset($this->data[$key]);
return $this->changed = true;
Expand Down

0 comments on commit dfeab7d

Please sign in to comment.