mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
21 lines
246 B
PHP
21 lines
246 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace ZM\Store;
|
||
|
|
|
||
|
|
class MockAtomic
|
||
|
|
{
|
||
|
|
private int $num = 0;
|
||
|
|
|
||
|
|
public function set(int $num)
|
||
|
|
{
|
||
|
|
$this->num = $num;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function get(): int
|
||
|
|
{
|
||
|
|
return $this->num;
|
||
|
|
}
|
||
|
|
}
|