Skip to content

Commit

Permalink
api trait
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed May 13, 2024
1 parent d0e1791 commit fa2c839
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Tarantool\Client\Schema\Criteria;
use Tarantool\Client\Schema\Operations;

abstract class Api
trait Api
{
abstract public function getSpace(string $name): Space;

Expand Down
4 changes: 3 additions & 1 deletion src/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
use Tarantool\Client\Schema\Criteria;
use Tarantool\Client\Schema\Space as ClientSpace;

class Mapper extends Api
class Mapper
{
use Api;

private array $spaceId = [];
private array $spaces = [];
private int $schemaId = 0;
Expand Down
4 changes: 3 additions & 1 deletion src/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

use Closure;

class Pool extends Api
class Pool
{
use Api;

private array $mappers = [];

public function __construct(
Expand Down

0 comments on commit fa2c839

Please sign in to comment.