@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Test; |
| 4 | 4 | |
| 5 | 5 | use Basis\Test; |
| 6 | -use Basis\Filesystem; |
|
| 7 | 6 | |
| 8 | 7 | class BootstrapTest extends Test |
| 9 | 8 | { |
@@ -8,6 +8,9 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | use Toolkit; |
| 10 | 10 | |
| 11 | + /** |
|
| 12 | + * @param string $name |
|
| 13 | + */ |
|
| 11 | 14 | protected function require($name) |
| 12 | 15 | { |
| 13 | 16 | if (!$this->$name) { |
@@ -15,6 +18,9 @@ discard block |
||
| 15 | 18 | } |
| 16 | 19 | } |
| 17 | 20 | |
| 21 | + /** |
|
| 22 | + * @param string $message |
|
| 23 | + */ |
|
| 18 | 24 | protected function confirm($message) |
| 19 | 25 | { |
| 20 | 26 | $hash = md5($message); |
@@ -35,6 +35,9 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param string $key |
|
| 40 | + */ |
|
| 38 | 41 | public function get($key) |
| 39 | 42 | { |
| 40 | 43 | if ($this->exists($key)) { |
@@ -42,6 +45,9 @@ discard block |
||
| 42 | 45 | } |
| 43 | 46 | } |
| 44 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $key |
|
| 50 | + */ |
|
| 45 | 51 | public function set($key, $value) |
| 46 | 52 | { |
| 47 | 53 | $filename = $this->path . '/' . $key; |
@@ -55,6 +61,10 @@ discard block |
||
| 55 | 61 | $this->cache[$key] = $data; |
| 56 | 62 | } |
| 57 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $key |
|
| 66 | + * @param \Closure $callback |
|
| 67 | + */ |
|
| 58 | 68 | public function wrap($key, $callback) |
| 59 | 69 | { |
| 60 | 70 | if (!is_string($key)) { |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace Basis; |
| 4 | 4 | |
| 5 | 5 | use Carbon\Carbon; |
| 6 | -use Exception; |
|
| 7 | -use stdClass; |
|
| 8 | 6 | use Tarantool\Mapper\Entity; |
| 9 | 7 | |
| 10 | 8 | class Converter |
@@ -91,6 +91,9 @@ |
||
| 91 | 91 | return parent::get($alias, $new); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $id |
|
| 96 | + */ |
|
| 94 | 97 | public function hasInstance($id) : bool |
| 95 | 98 | { |
| 96 | 99 | if ($this->definitions->has($id)) { |
@@ -18,6 +18,9 @@ |
||
| 18 | 18 | $this->serviceName = $service; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param string $space |
|
| 23 | + */ |
|
| 21 | 24 | public function create($space, $params) |
| 22 | 25 | { |
| 23 | 26 | $key = $this->serviceName.'.'.$space; |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Basis; |
| 4 | 4 | |
| 5 | -use Carbon\Carbon; |
|
| 6 | - |
|
| 7 | 5 | class Context |
| 8 | 6 | { |
| 9 | 7 | public $access; |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Basis; |
| 4 | 4 | |
| 5 | -use Tarantool\Mapper\Entity; |
|
| 6 | 5 | use Tarantool\Mapper\Mapper; |
| 7 | 6 | use Tarantool\Mapper\Pool; |
| 8 | 7 | use Tarantool\Queue\Queue; |
@@ -66,6 +66,9 @@ discard block |
||
| 66 | 66 | return $this->get(Mapper::class); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | + /** |
|
| 70 | + * @param string $space |
|
| 71 | + */ |
|
| 69 | 72 | protected function getRepository($space) |
| 70 | 73 | { |
| 71 | 74 | if (strpos($space, '.') !== false) { |
@@ -74,6 +77,9 @@ discard block |
||
| 74 | 77 | return $this->get(Mapper::class)->getRepository($space); |
| 75 | 78 | } |
| 76 | 79 | |
| 80 | + /** |
|
| 81 | + * @param string $tube |
|
| 82 | + */ |
|
| 77 | 83 | public function getQueue($tube) |
| 78 | 84 | { |
| 79 | 85 | $alias = "queue.$tube"; |
@@ -100,6 +106,9 @@ discard block |
||
| 100 | 106 | return $this->getRepository($space)->remove($params); |
| 101 | 107 | } |
| 102 | 108 | |
| 109 | + /** |
|
| 110 | + * @param string $fields |
|
| 111 | + */ |
|
| 103 | 112 | protected function select($fields, string $table, array $params) |
| 104 | 113 | { |
| 105 | 114 | return $this->get(Clickhouse::class)->select($fields, $table, $params); |
@@ -110,6 +119,9 @@ discard block |
||
| 110 | 119 | return $this->get(Clickhouse::class)->insert($table, $data, $headers); |
| 111 | 120 | } |
| 112 | 121 | |
| 122 | + /** |
|
| 123 | + * @param string $contents |
|
| 124 | + */ |
|
| 113 | 125 | protected function upload(string $filename, $contents) : string |
| 114 | 126 | { |
| 115 | 127 | return $this->get(Storage::class)->upload($filename, $contents); |
@@ -6,10 +6,8 @@ |
||
| 6 | 6 | use Basis\Cache; |
| 7 | 7 | use Basis\Config; |
| 8 | 8 | use Basis\Event; |
| 9 | -use Basis\Filesystem; |
|
| 10 | 9 | use Basis\Service; |
| 11 | 10 | use League\Container\ServiceProvider\AbstractServiceProvider; |
| 12 | -use Tarantool\Mapper\Pool; |
|
| 13 | 11 | |
| 14 | 12 | class ServiceProvider extends AbstractServiceProvider |
| 15 | 13 | { |