Skip to content

Commit

Permalink
phpDoc: added $var name to @param
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jun 7, 2018
1 parent 321e46a commit f78a4bf
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 38 deletions.
4 changes: 2 additions & 2 deletions src/CodeCoverage/Generators/AbstractGenerator.php
Expand Up @@ -37,8 +37,8 @@ abstract class AbstractGenerator


/**
* @param string path to coverage.dat file
* @param string path to covered source file or directory
* @param string $file path to coverage.dat file
* @param string $source path to covered source file or directory
*/
public function __construct(string $file, string $source = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/CodeCoverage/Generators/HtmlGenerator.php
Expand Up @@ -30,8 +30,8 @@ class HtmlGenerator extends AbstractGenerator


/**
* @param string path to coverage.dat file
* @param string path to source file/directory
* @param string $file path to coverage.dat file
* @param string $source file/directory
*/
public function __construct(string $file, string $source = null, string $title = null)
{
Expand Down
33 changes: 13 additions & 20 deletions src/Framework/Assert.php
Expand Up @@ -137,8 +137,7 @@ public static function notContains($needle, $actual, string $description = null)

/**
* Checks TRUE assertion.
* @param mixed actual
* @param string fail message
* @param mixed $actual
*/
public static function true($actual, string $description = null): void
{
Expand All @@ -151,8 +150,7 @@ public static function true($actual, string $description = null): void

/**
* Checks FALSE assertion.
* @param mixed actual
* @param string fail message
* @param mixed $actual
*/
public static function false($actual, string $description = null): void
{
Expand All @@ -165,8 +163,7 @@ public static function false($actual, string $description = null): void

/**
* Checks NULL assertion.
* @param mixed actual
* @param string fail message
* @param mixed $actual
*/
public static function null($actual, string $description = null): void
{
Expand All @@ -179,8 +176,7 @@ public static function null($actual, string $description = null): void

/**
* Checks Not a Number assertion.
* @param mixed actual
* @param string fail message
* @param mixed $actual
*/
public static function nan($actual, string $description = null): void
{
Expand All @@ -193,8 +189,7 @@ public static function nan($actual, string $description = null): void

/**
* Checks truthy assertion.
* @param mixed actual
* @param string fail message
* @param mixed $actual
*/
public static function truthy($actual, string $description = null): void
{
Expand All @@ -207,8 +202,7 @@ public static function truthy($actual, string $description = null): void

/**
* Checks falsey (empty) assertion.
* @param mixed actual
* @param string fail message
* @param mixed $actual
*/
public static function falsey($actual, string $description = null): void
{
Expand All @@ -221,9 +215,7 @@ public static function falsey($actual, string $description = null): void

/**
* Checks if subject has expected count.
* @param int expected count
* @param mixed subject
* @param string fail message
* @param mixed $value
*/
public static function count(int $count, $value, string $description = null): void
{
Expand All @@ -239,6 +231,8 @@ public static function count(int $count, $value, string $description = null): vo

/**
* Checks assertion.
* @param string|object $type
* @param mixed $value
*/
public static function type($type, $value, string $description = null): void
{
Expand Down Expand Up @@ -303,9 +297,9 @@ public static function throws(callable $function, string $class, string $message

/**
* Checks if the function generates PHP error or throws exception.
* @param callable
* @param int|string|array
* @param string message
* @param int|string|array $expectedType
* @param string $expectedMessage message
* @throws \Exception
* @throws \Exception
*/
public static function error(callable $function, $expectedType, string $expectedMessage = null): ?\Throwable
Expand Down Expand Up @@ -387,8 +381,7 @@ public static function noError(callable $function): void
* %i% signed integer value
* %f% floating point number
* %h% one or more HEX digits
* @param string mask|regexp; only delimiters ~ and # are supported for regexp
* @param string $description fail message
* @param string $pattern mask|regexp; only delimiters ~ and # are supported for regexp
*/
public static function match(string $pattern, $actual, string $description = null): void
{
Expand Down
6 changes: 0 additions & 6 deletions src/Framework/DataProvider.php
Expand Up @@ -16,8 +16,6 @@
class DataProvider
{
/**
* @param string path to data provider file
* @param string filtering condition
* @throws \Exception
*/
public static function load(string $file, string $query = ''): array
Expand Down Expand Up @@ -57,10 +55,6 @@ public static function load(string $file, string $query = ''): array
}


/**
* @param string tested subject
* @param string condition
*/
public static function testQuery(string $input, string $query): bool
{
static $replaces = ['' => '=', '=>' => '>=', '=<' => '<='];
Expand Down
8 changes: 4 additions & 4 deletions src/Framework/Dumper.php
Expand Up @@ -26,7 +26,7 @@ class Dumper

/**
* Dumps information about a variable in readable format.
* @param mixed variable to dump
* @param mixed $var variable to dump
*/
public static function toLine($var): string
{
Expand Down Expand Up @@ -93,7 +93,7 @@ public static function toLine($var): string

/**
* Formats object to line.
* @param object
* @param object $object
*/
private static function objectToLine($object): string
{
Expand All @@ -108,7 +108,7 @@ private static function objectToLine($object): string

/**
* Dumps variable in PHP format.
* @param mixed variable to dump
* @param mixed $var variable to dump
*/
public static function toPhp($var): string
{
Expand All @@ -118,7 +118,7 @@ public static function toPhp($var): string

/**
* Returns object's stripped hash.
* @param object
* @param object $object
*/
private static function hash($object): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Environment.php
Expand Up @@ -143,7 +143,7 @@ public static function skip(string $message = ''): void

/**
* Locks the parallel tests.
* @param string $path lock store directory
* @param string $path lock store directory
*/
public static function lock(string $name = '', string $path = ''): void
{
Expand Down
3 changes: 1 addition & 2 deletions src/Framework/TestCase.php
Expand Up @@ -60,8 +60,7 @@ public function run(): void

/**
* Runs the test method.
* @param string test method name
* @param array test method parameters (dataprovider bypass)
* @param array $args test method parameters (dataprovider bypass)
*/
public function runTest(string $method, array $args = null): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Job.php
Expand Up @@ -85,7 +85,7 @@ public function getEnvironmentVariable(string $name): string

/**
* Runs single test.
* @param int self::RUN_ASYNC | self::RUN_COLLECT_ERRORS
* @param int $flags self::RUN_ASYNC | self::RUN_COLLECT_ERRORS
*/
public function run(int $flags = 0): void
{
Expand Down

0 comments on commit f78a4bf

Please sign in to comment.