diff --git a/phpstan.neon b/phpstan.neon index c68958d..a0554d6 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,3 +4,4 @@ parameters: paths: - src + - tests diff --git a/tests/GitPhp/bootstrap.php b/tests/GitPhp/bootstrap.php index cbf8934..435374c 100644 --- a/tests/GitPhp/bootstrap.php +++ b/tests/GitPhp/bootstrap.php @@ -5,8 +5,10 @@ Tester\Environment::setup(); - -function test($cb) +/** + * @return void + */ +function test(callable $cb) { try { $cb(); diff --git a/tests/libs/AssertRunner.php b/tests/libs/AssertRunner.php index 9dbb457..db7d1e2 100644 --- a/tests/libs/AssertRunner.php +++ b/tests/libs/AssertRunner.php @@ -16,7 +16,7 @@ class AssertRunner implements \CzProject\GitPhp\IRunner /** @var CommandProcessor */ private $commandProcessor; - /** @var array [command => RunnerResult] */ + /** @var RunnerResult[] */ private $asserts = []; @@ -30,6 +30,14 @@ public function __construct($cwd) } + /** + * @param mixed[] $expectedArgs + * @param array $expectedEnv + * @param string[] $resultOutput + * @param string[] $resultErrorOutput + * @param int $resultExitCode + * @return self + */ public function assert(array $expectedArgs, array $expectedEnv = [], array $resultOutput = [], array $resultErrorOutput = [], $resultExitCode = 0) { $cmd = $this->commandProcessor->process('git', $expectedArgs, $expectedEnv); @@ -38,6 +46,9 @@ public function assert(array $expectedArgs, array $expectedEnv = [], array $resu } + /** + * @return self + */ public function resetAsserts() { $this->asserts = [];