@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | public function dataProvider(): array |
71 | 71 | { |
72 | - return ["abc", "adef",]; |
|
72 | + return ["abc", "adef", ]; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -67,8 +67,8 @@ |
||
67 | 67 | public function dataSource(): array |
68 | 68 | { |
69 | 69 | return [ |
70 | - ["abc",], |
|
71 | - ["def",], |
|
70 | + ["abc", ], |
|
71 | + ["def", ], |
|
72 | 72 | ]; |
73 | 73 | } |
74 | 74 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | $coverage = new CodeCoverage((new Selector())->forLineCoverage($filter), $filter); |
16 | 16 | $coverage->start("My Tester"); |
17 | -register_shutdown_function(function () use ($coverage) { |
|
17 | +register_shutdown_function(function() use ($coverage) { |
|
18 | 18 | $coverage->stop(); |
19 | 19 | (new Clover())->process($coverage, __DIR__ . "/coverage.xml"); |
20 | 20 | }); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | static $jobs = []; |
58 | 58 | if (count($jobs) === 0) { |
59 | 59 | $r = new ReflectionClass(static::class); |
60 | - $methods = array_values(preg_grep(static::METHOD_PATTERN, array_map(function (ReflectionMethod $rm) { |
|
60 | + $methods = array_values(preg_grep(static::METHOD_PATTERN, array_map(function(ReflectionMethod $rm) { |
|
61 | 61 | return $rm->getName(); |
62 | 62 | }, $r->getMethods()))); |
63 | 63 | foreach ($methods as $method) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | if ($success) { |
23 | 23 | return; |
24 | 24 | } |
25 | - echo "Test $this->taskCount failed. $text\n"; |
|
25 | + echo "test $this->taskCount failed. $text\n"; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -39,7 +39,8 @@ |
||
39 | 39 | $this->onExecute[] = [$this, "setup"]; |
40 | 40 | $this->onExecute[] = [$this, "printInfo"]; |
41 | 41 | $this->testsSuitesFinder = $testsSuitesFinder ?? new TestSuitesFinder(); |
42 | - $this->testSuiteFactory = $testSuiteFactory ?? new class implements ITestSuiteFactory { |
|
42 | + $this->testSuiteFactory = $testSuiteFactory ?? new class implements ITestSuiteFactory |
|
43 | + { |
|
43 | 44 | public function create(string $className): TestCase |
44 | 45 | { |
45 | 46 | return new $className(); |
@@ -130,7 +130,7 @@ |
||
130 | 130 | if ($skipped->reason) { |
131 | 131 | $reason = ": {$skipped->reason}"; |
132 | 132 | } |
133 | - echo "Skipped $skipped->name$reason\n"; |
|
133 | + echo "skipped $skipped->name$reason\n"; |
|
134 | 134 | } |
135 | 135 | } |
136 | 136 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | function findVendorDirectory(): string |
6 | 6 | { |
7 | 7 | $recursionLimit = 10; |
8 | - $findVendor = function ($dirName = "vendor/bin", $dir = __DIR__) use (&$findVendor, &$recursionLimit) { |
|
8 | + $findVendor = function($dirName = "vendor/bin", $dir = __DIR__) use (&$findVendor, &$recursionLimit) { |
|
9 | 9 | if (!$recursionLimit--) { |
10 | 10 | throw new Exception("Cannot find vendor directory."); |
11 | 11 | } |
@@ -42,15 +42,15 @@ |
||
42 | 42 | try { |
43 | 43 | $reflection = new ReflectionMethod($class, $dataProvider); |
44 | 44 | if (!$reflection->isPublic()) { |
45 | - throw new InvalidDataProviderException("Method $className::$dataProvider is not public."); |
|
45 | + throw new InvalidDataProviderException("method $className::$dataProvider is not public."); |
|
46 | 46 | } |
47 | 47 | $result = call_user_func([$class, $dataProvider]); |
48 | 48 | if (!is_array($result)) { |
49 | - throw new InvalidDataProviderException("Method $className::$dataProvider has to return an array."); |
|
49 | + throw new InvalidDataProviderException("method $className::$dataProvider has to return an array."); |
|
50 | 50 | } |
51 | 51 | return $result; |
52 | 52 | } catch (\ReflectionException $e) { |
53 | - throw new InvalidDataProviderException("Method $className::$dataProvider does not exist.", 0, $e); |
|
53 | + throw new InvalidDataProviderException("method $className::$dataProvider does not exist.", 0, $e); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | return []; |