@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Gaufrette\Adapter; |
4 | 4 | |
5 | -use Gaufrette\File; |
|
6 | 5 | use Gaufrette\Adapter; |
7 | 6 | use Gaufrette\Adapter\InMemory as InMemoryAdapter; |
8 | 7 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | use Gaufrette\Adapter; |
7 | 7 | use Gaufrette\Adapter\InMemory as InMemoryAdapter; |
8 | 8 | |
9 | -@trigger_error('The ' . __NAMESPACE__ . '\Cache adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED); |
|
9 | +@trigger_error('The '.__NAMESPACE__.'\Cache adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED); |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Cache adapter. |
@@ -152,6 +152,10 @@ |
||
152 | 152 | return false; |
153 | 153 | } |
154 | 154 | |
155 | + /** |
|
156 | + * @param string $key |
|
157 | + * @param string $column |
|
158 | + */ |
|
155 | 159 | private function getColumnValue($key, $column) |
156 | 160 | { |
157 | 161 | $value = $this->connection->fetchColumn( |
@@ -184,7 +184,7 @@ |
||
184 | 184 | |
185 | 185 | return [ |
186 | 186 | 'dirs' => [], |
187 | - 'keys' => array_map(function ($value) { |
|
187 | + 'keys' => array_map(function($value) { |
|
188 | 188 | return $value['_key']; |
189 | 189 | }, |
190 | 190 | $keys), |
@@ -162,6 +162,9 @@ |
||
162 | 162 | } |
163 | 163 | } |
164 | 164 | |
165 | + /** |
|
166 | + * @param string $key |
|
167 | + */ |
|
165 | 168 | private function getDropboxMetadata($key) |
166 | 169 | { |
167 | 170 | try { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | use Dropbox_API as DropboxApi; |
9 | 9 | use Dropbox_Exception_NotFound as DropboxNotFoundException; |
10 | 10 | |
11 | -@trigger_error('The ' . __NAMESPACE__ . '\Dropbox adapter is deprecated since version 0.4 and will be removed in 1.0. You can move to our Flysystem adapter and use their Dropbox adapter if needed.', E_USER_DEPRECATED); |
|
11 | +@trigger_error('The '.__NAMESPACE__.'\Dropbox adapter is deprecated since version 0.4 and will be removed in 1.0. You can move to our Flysystem adapter and use their Dropbox adapter if needed.', E_USER_DEPRECATED); |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Dropbox adapter. |
@@ -349,6 +349,9 @@ |
||
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
352 | + /** |
|
353 | + * @param string $key |
|
354 | + */ |
|
352 | 355 | protected function computePath($key) |
353 | 356 | { |
354 | 357 | if (empty($this->options['directory'])) { |
@@ -270,7 +270,7 @@ |
||
270 | 270 | */ |
271 | 271 | public function isDirectory($key) |
272 | 272 | { |
273 | - if ($this->exists($key . '/')) { |
|
273 | + if ($this->exists($key.'/')) { |
|
274 | 274 | return true; |
275 | 275 | } |
276 | 276 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | - return $prefix . implode('/', $tokens); |
|
44 | + return $prefix.implode('/', $tokens); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -205,7 +205,7 @@ |
||
205 | 205 | { |
206 | 206 | $this->ensureDirectoryExists($this->directory, $this->create); |
207 | 207 | |
208 | - return $this->normalizePath($this->directory . '/' . $key); |
|
208 | + return $this->normalizePath($this->directory.'/'.$key); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * |
85 | 85 | * @param string $key |
86 | 86 | * |
87 | - * @return string|bool if cannot read content |
|
87 | + * @return string if cannot read content |
|
88 | 88 | */ |
89 | 89 | public function read($key) |
90 | 90 | { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * |
157 | 157 | * @param string $key |
158 | 158 | * |
159 | - * @return int|bool An UNIX like timestamp or false |
|
159 | + * @return string|false An UNIX like timestamp or false |
|
160 | 160 | */ |
161 | 161 | public function mtime($key) |
162 | 162 | { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | */ |
59 | 59 | public function keys() |
60 | 60 | { |
61 | - return array_map(function ($content) { |
|
61 | + return array_map(function($content) { |
|
62 | 62 | return $content['path']; |
63 | 63 | }, $this->adapter->listContents()); |
64 | 64 | } |
@@ -138,7 +138,7 @@ |
||
138 | 138 | * @param string $key - by default '' |
139 | 139 | * @param int $format - by default APC_ITER_NONE |
140 | 140 | * |
141 | - * @return \APCIterator |
|
141 | + * @return \Traversable |
|
142 | 142 | */ |
143 | 143 | protected function getCachedKeysIterator($key = '', $format = APC_ITER_NONE) |
144 | 144 | { |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use Gaufrette\Adapter; |
6 | 6 | use Gaufrette\Util; |
7 | 7 | |
8 | -@trigger_error('The ' . __NAMESPACE__ . '\Apc adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED); |
|
8 | +@trigger_error('The '.__NAMESPACE__.'\Apc adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED); |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Apc adapter, a non-persistent adapter for when this sort of thing is appropriate. |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function computePath($key) |
137 | 137 | { |
138 | - return $this->prefix . $key; |
|
138 | + return $this->prefix.$key; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | protected function getCachedKeysIterator($key = '', $format = APC_ITER_NONE) |
148 | 148 | { |
149 | - $pattern = sprintf('/^%s/', preg_quote($this->prefix . $key, '/')); |
|
149 | + $pattern = sprintf('/^%s/', preg_quote($this->prefix.$key, '/')); |
|
150 | 150 | |
151 | 151 | return new \APCIterator('user', $pattern, $format); |
152 | 152 | } |