Skip to content

Commit f78a4bf

Browse files
committed
phpDoc: added $var name to @param
1 parent 321e46a commit f78a4bf

File tree

8 files changed

+24
-38
lines changed

8 files changed

+24
-38
lines changed

src/CodeCoverage/Generators/AbstractGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ abstract class AbstractGenerator
3737

3838

3939
/**
40-
* @param string path to coverage.dat file
41-
* @param string path to covered source file or directory
40+
* @param string $file path to coverage.dat file
41+
* @param string $source path to covered source file or directory
4242
*/
4343
public function __construct(string $file, string $source = null)
4444
{

src/CodeCoverage/Generators/HtmlGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class HtmlGenerator extends AbstractGenerator
3030

3131

3232
/**
33-
* @param string path to coverage.dat file
34-
* @param string path to source file/directory
33+
* @param string $file path to coverage.dat file
34+
* @param string $source file/directory
3535
*/
3636
public function __construct(string $file, string $source = null, string $title = null)
3737
{

src/Framework/Assert.php

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ public static function notContains($needle, $actual, string $description = null)
137137

138138
/**
139139
* Checks TRUE assertion.
140-
* @param mixed actual
141-
* @param string fail message
140+
* @param mixed $actual
142141
*/
143142
public static function true($actual, string $description = null): void
144143
{
@@ -151,8 +150,7 @@ public static function true($actual, string $description = null): void
151150

152151
/**
153152
* Checks FALSE assertion.
154-
* @param mixed actual
155-
* @param string fail message
153+
* @param mixed $actual
156154
*/
157155
public static function false($actual, string $description = null): void
158156
{
@@ -165,8 +163,7 @@ public static function false($actual, string $description = null): void
165163

166164
/**
167165
* Checks NULL assertion.
168-
* @param mixed actual
169-
* @param string fail message
166+
* @param mixed $actual
170167
*/
171168
public static function null($actual, string $description = null): void
172169
{
@@ -179,8 +176,7 @@ public static function null($actual, string $description = null): void
179176

180177
/**
181178
* Checks Not a Number assertion.
182-
* @param mixed actual
183-
* @param string fail message
179+
* @param mixed $actual
184180
*/
185181
public static function nan($actual, string $description = null): void
186182
{
@@ -193,8 +189,7 @@ public static function nan($actual, string $description = null): void
193189

194190
/**
195191
* Checks truthy assertion.
196-
* @param mixed actual
197-
* @param string fail message
192+
* @param mixed $actual
198193
*/
199194
public static function truthy($actual, string $description = null): void
200195
{
@@ -207,8 +202,7 @@ public static function truthy($actual, string $description = null): void
207202

208203
/**
209204
* Checks falsey (empty) assertion.
210-
* @param mixed actual
211-
* @param string fail message
205+
* @param mixed $actual
212206
*/
213207
public static function falsey($actual, string $description = null): void
214208
{
@@ -221,9 +215,7 @@ public static function falsey($actual, string $description = null): void
221215

222216
/**
223217
* Checks if subject has expected count.
224-
* @param int expected count
225-
* @param mixed subject
226-
* @param string fail message
218+
* @param mixed $value
227219
*/
228220
public static function count(int $count, $value, string $description = null): void
229221
{
@@ -239,6 +231,8 @@ public static function count(int $count, $value, string $description = null): vo
239231

240232
/**
241233
* Checks assertion.
234+
* @param string|object $type
235+
* @param mixed $value
242236
*/
243237
public static function type($type, $value, string $description = null): void
244238
{
@@ -303,9 +297,9 @@ public static function throws(callable $function, string $class, string $message
303297

304298
/**
305299
* Checks if the function generates PHP error or throws exception.
306-
* @param callable
307-
* @param int|string|array
308-
* @param string message
300+
* @param int|string|array $expectedType
301+
* @param string $expectedMessage message
302+
* @throws \Exception
309303
* @throws \Exception
310304
*/
311305
public static function error(callable $function, $expectedType, string $expectedMessage = null): ?\Throwable
@@ -387,8 +381,7 @@ public static function noError(callable $function): void
387381
* %i% signed integer value
388382
* %f% floating point number
389383
* %h% one or more HEX digits
390-
* @param string mask|regexp; only delimiters ~ and # are supported for regexp
391-
* @param string $description fail message
384+
* @param string $pattern mask|regexp; only delimiters ~ and # are supported for regexp
392385
*/
393386
public static function match(string $pattern, $actual, string $description = null): void
394387
{

src/Framework/DataProvider.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
class DataProvider
1717
{
1818
/**
19-
* @param string path to data provider file
20-
* @param string filtering condition
2119
* @throws \Exception
2220
*/
2321
public static function load(string $file, string $query = ''): array
@@ -57,10 +55,6 @@ public static function load(string $file, string $query = ''): array
5755
}
5856

5957

60-
/**
61-
* @param string tested subject
62-
* @param string condition
63-
*/
6458
public static function testQuery(string $input, string $query): bool
6559
{
6660
static $replaces = ['' => '=', '=>' => '>=', '=<' => '<='];

src/Framework/Dumper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Dumper
2626

2727
/**
2828
* Dumps information about a variable in readable format.
29-
* @param mixed variable to dump
29+
* @param mixed $var variable to dump
3030
*/
3131
public static function toLine($var): string
3232
{
@@ -93,7 +93,7 @@ public static function toLine($var): string
9393

9494
/**
9595
* Formats object to line.
96-
* @param object
96+
* @param object $object
9797
*/
9898
private static function objectToLine($object): string
9999
{
@@ -108,7 +108,7 @@ private static function objectToLine($object): string
108108

109109
/**
110110
* Dumps variable in PHP format.
111-
* @param mixed variable to dump
111+
* @param mixed $var variable to dump
112112
*/
113113
public static function toPhp($var): string
114114
{
@@ -118,7 +118,7 @@ public static function toPhp($var): string
118118

119119
/**
120120
* Returns object's stripped hash.
121-
* @param object
121+
* @param object $object
122122
*/
123123
private static function hash($object): string
124124
{

src/Framework/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static function skip(string $message = ''): void
143143

144144
/**
145145
* Locks the parallel tests.
146-
* @param string $path lock store directory
146+
* @param string $path lock store directory
147147
*/
148148
public static function lock(string $name = '', string $path = ''): void
149149
{

src/Framework/TestCase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ public function run(): void
6060

6161
/**
6262
* Runs the test method.
63-
* @param string test method name
64-
* @param array test method parameters (dataprovider bypass)
63+
* @param array $args test method parameters (dataprovider bypass)
6564
*/
6665
public function runTest(string $method, array $args = null): void
6766
{

src/Runner/Job.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getEnvironmentVariable(string $name): string
8585

8686
/**
8787
* Runs single test.
88-
* @param int self::RUN_ASYNC | self::RUN_COLLECT_ERRORS
88+
* @param int $flags self::RUN_ASYNC | self::RUN_COLLECT_ERRORS
8989
*/
9090
public function run(int $flags = 0): void
9191
{

0 commit comments

Comments
 (0)