@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace WebStream\Cache\Driver; |
| 3 | 3 | |
| 4 | -use WebStream\DI\Injector; |
|
| 5 | 4 | use WebStream\Module\Container; |
| 6 | 5 | |
| 7 | 6 | /** |
@@ -43,8 +43,7 @@ |
||
| 43 | 43 | } |
| 44 | 44 | $key = $this->cachePrefix . $key; |
| 45 | 45 | |
| 46 | - $result = $overwrite ? $this->cacheContainer->driver->delegate("apcu_store", [$key, $value, $ttl]) : |
|
| 47 | - $this->cacheContainer->driver->delegate("apcu_add", [$key, $value, $ttl]); |
|
| 46 | + $result = $overwrite ? $this->cacheContainer->driver->delegate("apcu_store", [$key, $value, $ttl]) : $this->cacheContainer->driver->delegate("apcu_add", [$key, $value, $ttl]); |
|
| 48 | 47 | $this->logger->info("Execute cache save: " . $key); |
| 49 | 48 | |
| 50 | 49 | return $result; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * APCuオブジェクトを返却する |
| 47 | - * @param Container $container 依存コンテナ |
|
| 47 | + * @param null|Container $container 依存コンテナ |
|
| 48 | 48 | * @return Container キャッシュ依存コンテナ |
| 49 | 49 | */ |
| 50 | 50 | private function getApcuContainer(Container $container): Container |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * Memcachedオブジェクトを返却する |
| 69 | - * @param Container $container 依存コンテナ |
|
| 69 | + * @param null|Container $container 依存コンテナ |
|
| 70 | 70 | * @return Container キャッシュ依存コンテナ |
| 71 | 71 | */ |
| 72 | 72 | private function getMemcachedContainer(Container $container): Container |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Redisオブジェクトを返却する |
| 110 | - * @param Container $container 依存コンテナ |
|
| 110 | + * @param null|Container $container 依存コンテナ |
|
| 111 | 111 | * @return Container キャッシュ依存コンテナ |
| 112 | 112 | */ |
| 113 | 113 | private function getRedisContainer(Container $container): Container |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | 153 | * TemporaryFileオブジェクトを返却する |
| 154 | - * @param Container $container 依存コンテナ |
|
| 154 | + * @param null|Container $container 依存コンテナ |
|
| 155 | 155 | * @return Container キャッシュ依存コンテナ |
| 156 | 156 | */ |
| 157 | 157 | private function getTemporaryFileContainer(Container $container): Container |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace WebStream\Cache\Driver; |
| 3 | 3 | |
| 4 | -use WebStream\DI\Injector; |
|
| 5 | 4 | use WebStream\Module\Container; |
| 6 | 5 | |
| 7 | 6 | /** |
@@ -72,8 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * キーの値を設定する |
| 75 | - * @param string $name メソッド名 |
|
| 76 | - * @param array $arguments 引数リスト |
|
| 75 | + * @param string $key |
|
| 77 | 76 | * @return void |
| 78 | 77 | */ |
| 79 | 78 | public function set($key, $value) |
@@ -18,6 +18,8 @@ |
||
| 18 | 18 | * オブジェクトを注入する |
| 19 | 19 | * @param string プロパティ名 |
| 20 | 20 | * @param mixed オブジェクト |
| 21 | + * @param string $name |
|
| 22 | + * @param string $object |
|
| 21 | 23 | * @return Injector |
| 22 | 24 | */ |
| 23 | 25 | public function inject($name, $object) |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * constructor |
| 33 | - * @param string $filepath ファイルパス |
|
| 33 | + * @param string $filePath ファイルパス |
|
| 34 | 34 | */ |
| 35 | 35 | public function __construct(string $filePath) |
| 36 | 36 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace WebStream\IO; |
| 3 | 3 | |
| 4 | 4 | use WebStream\Exception\Extend\InvalidArgumentException; |
| 5 | -use WebStream\Exception\Extend\IOException; |
|
| 6 | 5 | |
| 7 | 6 | /** |
| 8 | 7 | * StringInputStream |
@@ -14,21 +14,21 @@ discard block |
||
| 14 | 14 | public function fileProvider() |
| 15 | 15 | { |
| 16 | 16 | return [ |
| 17 | - [new File(dirname(__FILE__) . "/../Fixtures/file-test1.txt")] |
|
| 17 | + [new File(dirname(__FILE__) . "/../Fixtures/file-test1.txt")] |
|
| 18 | 18 | ]; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function directoryProvider() |
| 22 | 22 | { |
| 23 | 23 | return [ |
| 24 | - [new File(dirname(__FILE__) . "/../Fixtures/file-test/")] |
|
| 24 | + [new File(dirname(__FILE__) . "/../Fixtures/file-test/")] |
|
| 25 | 25 | ]; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | public function fileLinkProvider() |
| 29 | 29 | { |
| 30 | 30 | return [ |
| 31 | - [new File(dirname(__FILE__) . "/../Fixtures/file-test1.txt"), "/tmp/file-test-link"] |
|
| 31 | + [new File(dirname(__FILE__) . "/../Fixtures/file-test1.txt"), "/tmp/file-test-link"] |
|
| 32 | 32 | ]; |
| 33 | 33 | } |
| 34 | 34 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function renameFailureProvider() |
| 50 | 50 | { |
| 51 | 51 | return [ |
| 52 | - [new File(dirname(__FILE__) . "/../Fixtures/file-test/file-test2.txt")] |
|
| 52 | + [new File(dirname(__FILE__) . "/../Fixtures/file-test/file-test2.txt")] |
|
| 53 | 53 | ]; |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function readProvider() |
| 13 | 13 | { |
| 14 | 14 | return [ |
| 15 | - [dirname(__FILE__) . "/../Fixtures/filereader-test1.txt", "test1\n" . "test2\n"] |
|
| 15 | + [dirname(__FILE__) . "/../Fixtures/filereader-test1.txt", "test1\n" . "test2\n"] |
|
| 16 | 16 | ]; |
| 17 | 17 | } |
| 18 | 18 | } |