Skip to content

Commit fc01eef

Browse files
committed
phpDoc: added $var name to @param
1 parent 339a55d commit fc01eef

File tree

7 files changed

+27
-38
lines changed

7 files changed

+27
-38
lines changed

src/Bridges/CacheLatte/CacheMacro.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ public static function initRuntime(Latte\Runtime\Template $template)
9393

9494
/**
9595
* Starts the output cache. Returns Nette\Caching\OutputHelper object if buffering was started.
96-
* @param Nette\Caching\IStorage
97-
* @param string
98-
* @param Nette\Caching\OutputHelper[]
99-
* @param array
96+
* @param string $key
97+
* @param Nette\Caching\OutputHelper[] $parents
10098
* @return Nette\Caching\OutputHelper|\stdClass
10199
*/
102100
public static function createCache(Nette\Caching\IStorage $cacheStorage, $key, &$parents, array $args = null)
@@ -121,7 +119,7 @@ public static function createCache(Nette\Caching\IStorage $cacheStorage, $key, &
121119

122120
/**
123121
* Ends the output cache.
124-
* @param Nette\Caching\OutputHelper[]
122+
* @param Nette\Caching\OutputHelper[] $parents
125123
* @return void
126124
*/
127125
public static function endCache(&$parents, array $args = null)

src/Caching/Cache.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getNamespace()
6969

7070
/**
7171
* Returns new nested cache object.
72-
* @param string
72+
* @param string $namespace
7373
* @return static
7474
*/
7575
public function derive($namespace)
@@ -81,7 +81,7 @@ public function derive($namespace)
8181

8282
/**
8383
* Reads the specified item from the cache or generate it.
84-
* @param mixed
84+
* @param mixed $key
8585
* @return mixed
8686
*/
8787
public function load($key, callable $fallback = null)
@@ -98,7 +98,6 @@ public function load($key, callable $fallback = null)
9898

9999
/**
100100
* Reads multiple items from the cache.
101-
* @param array
102101
* @return array
103102
*/
104103
public function bulkLoad(array $keys, callable $fallback = null)
@@ -155,10 +154,9 @@ public function bulkLoad(array $keys, callable $fallback = null)
155154
* - Cache::ITEMS => (array|string) cache items
156155
* - Cache::CONSTS => (array|string) cache items
157156
*
158-
* @param mixed
159-
* @param mixed
157+
* @param mixed $key
158+
* @param mixed $data
160159
* @return mixed value itself
161-
* @throws Nette\InvalidArgumentException
162160
*/
163161
public function save($key, $data, array $dependencies = null)
164162
{
@@ -241,7 +239,7 @@ private function completeDependencies($dp)
241239

242240
/**
243241
* Removes item from the cache.
244-
* @param mixed
242+
* @param mixed $key
245243
* @return void
246244
*/
247245
public function remove($key)
@@ -306,7 +304,7 @@ public function wrap(callable $function, array $dependencies = null)
306304

307305
/**
308306
* Starts the output cache.
309-
* @param mixed
307+
* @param mixed $key
310308
* @return OutputHelper|null
311309
*/
312310
public function start($key)
@@ -321,7 +319,7 @@ public function start($key)
321319

322320
/**
323321
* Generates internal cache key.
324-
* @param mixed
322+
* @param mixed $key
325323
* @return string
326324
*/
327325
protected function generateKey($key)
@@ -335,10 +333,9 @@ protected function generateKey($key)
335333

336334
/**
337335
* Checks CALLBACKS dependencies.
338-
* @param array
339336
* @return bool
340337
*/
341-
public static function checkCallbacks($callbacks)
338+
public static function checkCallbacks(array $callbacks)
342339
{
343340
foreach ($callbacks as $callback) {
344341
if (!call_user_func_array(array_shift($callback), $callback)) {
@@ -351,8 +348,8 @@ public static function checkCallbacks($callbacks)
351348

352349
/**
353350
* Checks CONSTS dependency.
354-
* @param string
355-
* @param mixed
351+
* @param string $const
352+
* @param mixed $value
356353
* @return bool
357354
*/
358355
private static function checkConst($const, $value)
@@ -363,8 +360,8 @@ private static function checkConst($const, $value)
363360

364361
/**
365362
* Checks FILES dependency.
366-
* @param string
367-
* @param int|null
363+
* @param string $file
364+
* @param int|null $time
368365
* @return bool
369366
*/
370367
private static function checkFile($file, $time)

src/Caching/IBulkReader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ interface IBulkReader
1616

1717
/**
1818
* Reads from cache in bulk.
19-
* @param string
2019
* @return array key => value pairs, missing items are omitted
2120
*/
2221
function bulkRead(array $keys);

src/Caching/IStorage.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,35 @@ interface IStorage
1616

1717
/**
1818
* Read from cache.
19-
* @param string
19+
* @param string $key
2020
* @return mixed
2121
*/
2222
function read($key);
2323

2424
/**
2525
* Prevents item reading and writing. Lock is released by write() or remove().
26-
* @param string
26+
* @param string $key
2727
* @return void
2828
*/
2929
function lock($key);
3030

3131
/**
3232
* Writes item into the cache.
33-
* @param string
34-
* @param mixed
33+
* @param string $key
34+
* @param mixed $data
3535
* @return void
3636
*/
3737
function write($key, $data, array $dependencies);
3838

3939
/**
4040
* Removes item from the cache.
41-
* @param string
41+
* @param string $key
4242
* @return void
4343
*/
4444
function remove($key);
4545

4646
/**
4747
* Removes items from the cache by conditions.
48-
* @param array conditions
4948
* @return void
5049
*/
5150
function clean(array $conditions);

src/Caching/Storages/FileStorage.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public function read($key)
9292

9393
/**
9494
* Verifies dependencies.
95-
* @param array
9695
* @return bool
9796
*/
9897
private function verify(array $meta)
@@ -294,8 +293,8 @@ public function clean(array $conditions)
294293

295294
/**
296295
* Reads cache data from disk.
297-
* @param string file path
298-
* @param int lock mode
296+
* @param string $file
297+
* @param int $lock
299298
* @return array|null
300299
*/
301300
protected function readMetaAndLock($file, $lock)
@@ -325,7 +324,6 @@ protected function readMetaAndLock($file, $lock)
325324

326325
/**
327326
* Reads cache data from disk and closes cache file handle.
328-
* @param array
329327
* @return mixed
330328
*/
331329
protected function readData(array $meta)
@@ -344,7 +342,7 @@ protected function readData(array $meta)
344342

345343
/**
346344
* Returns file name.
347-
* @param string
345+
* @param string $key
348346
* @return string
349347
*/
350348
protected function getCacheFile($key)
@@ -359,8 +357,8 @@ protected function getCacheFile($key)
359357

360358
/**
361359
* Deletes and closes file.
362-
* @param string
363-
* @param resource
360+
* @param string $file
361+
* @param resource $handle
364362
* @return void
365363
*/
366364
private static function delete($file, $handle = null)

src/Caching/Storages/IJournal.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ interface IJournal
1616

1717
/**
1818
* Writes entry information into the journal.
19-
* @param string
20-
* @param array
19+
* @param string $key
2120
* @return void
2221
*/
2322
function write($key, array $dependencies);
2423

2524
/**
2625
* Cleans entries from journal.
27-
* @param array
2826
* @return array|null of removed items or null when performing a full cleanup
2927
*/
3028
function clean(array $conditions);

src/Caching/Storages/SQLiteJournal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SQLiteJournal implements IJournal
2626

2727

2828
/**
29-
* @param string
29+
* @param string $path
3030
*/
3131
public function __construct($path)
3232
{

0 commit comments

Comments
 (0)