Skip to content

Commit 3f73f72

Browse files
Fix lint
1 parent 2bd9051 commit 3f73f72

File tree

7 files changed

+61
-37
lines changed

7 files changed

+61
-37
lines changed

src/Extension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ private function resolveMaximumDuration(string $test): MaximumDuration
358358
'::',
359359
$test
360360
);
361-
$testMethodName = explode(' with data set ', $testMethodName)[0];
361+
$testMethodName = \explode(' with data set ', $testMethodName)[0];
362362

363363
$annotations = [
364364
'maximumDuration',

test/EndToEnd/Version06/TestMethod/WithMaximumDurationAnnotation/SleeperTest.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
6363
self::assertSame($milliseconds, $sleeper->milliseconds());
6464
}
6565

66-
public function mockDataProvider() {
67-
return array(array('mockArgument'));
68-
}
69-
7066
/**
7167
* @maximumDuration 200
68+
*
7269
* @dataProvider mockDataProvider
7370
*/
7471
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider()
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
8279
self::assertSame($milliseconds, $sleeper->milliseconds());
8380
}
8481

85-
public function mockDataProviderWithAssociativeArray() {
86-
return array('mockTest' => ['mockData']);
82+
public static function mockDataProvider()
83+
{
84+
return [['mockArgument']];
8785
}
8886

8987
/**
9088
* @maximumDuration 200
89+
*
9190
* @dataProvider mockDataProviderWithAssociativeArray
9291
*/
9392
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider()
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101100
self::assertSame($milliseconds, $sleeper->milliseconds());
102101
}
103102

103+
public static function mockDataProviderWithAssociativeArray()
104+
{
105+
return ['mockTest' => ['mockData']];
106+
}
107+
104108
/**
105109
* @maximumDuration 200
106110
*/

test/EndToEnd/Version07/TestMethod/WithMaximumDurationAnnotation/SleeperTest.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
6363
self::assertSame($milliseconds, $sleeper->milliseconds());
6464
}
6565

66-
public function mockDataProvider() {
67-
return array(array('mockArgument'));
68-
}
69-
7066
/**
7167
* @maximumDuration 200
68+
*
7269
* @dataProvider mockDataProvider
7370
*/
7471
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider(): void
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
8279
self::assertSame($milliseconds, $sleeper->milliseconds());
8380
}
8481

85-
public function mockDataProviderWithAssociativeArray() {
86-
return array('mockTest' => ['mockData']);
82+
public static function mockDataProvider()
83+
{
84+
return [['mockArgument']];
8785
}
8886

8987
/**
9088
* @maximumDuration 200
89+
*
9190
* @dataProvider mockDataProviderWithAssociativeArray
9291
*/
9392
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider(): void
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101100
self::assertSame($milliseconds, $sleeper->milliseconds());
102101
}
103102

103+
public static function mockDataProviderWithAssociativeArray()
104+
{
105+
return ['mockTest' => ['mockData']];
106+
}
107+
104108
/**
105109
* @maximumDuration 200
106110
*/

test/EndToEnd/Version08/TestMethod/WithMaximumDurationAnnotation/SleeperTest.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
6363
self::assertSame($milliseconds, $sleeper->milliseconds());
6464
}
6565

66-
public function mockDataProvider() {
67-
return array(array('mockArgument'));
68-
}
69-
7066
/**
7167
* @maximumDuration 200
68+
*
7269
* @dataProvider mockDataProvider
7370
*/
7471
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider(): void
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
8279
self::assertSame($milliseconds, $sleeper->milliseconds());
8380
}
8481

85-
public function mockDataProviderWithAssociativeArray() {
86-
return array('mockTest' => ['mockData']);
82+
public static function mockDataProvider()
83+
{
84+
return [['mockArgument']];
8785
}
8886

8987
/**
9088
* @maximumDuration 200
89+
*
9190
* @dataProvider mockDataProviderWithAssociativeArray
9291
*/
9392
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider(): void
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101100
self::assertSame($milliseconds, $sleeper->milliseconds());
102101
}
103102

103+
public static function mockDataProviderWithAssociativeArray()
104+
{
105+
return ['mockTest' => ['mockData']];
106+
}
107+
104108
/**
105109
* @maximumDuration 200
106110
*/

test/EndToEnd/Version09/TestMethod/WithMaximumDurationAnnotation/SleeperTest.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
6363
self::assertSame($milliseconds, $sleeper->milliseconds());
6464
}
6565

66-
public function mockDataProvider() {
67-
return array(array('mockArgument'));
68-
}
69-
7066
/**
7167
* @maximumDuration 200
68+
*
7269
* @dataProvider mockDataProvider
7370
*/
7471
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider(): void
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
8279
self::assertSame($milliseconds, $sleeper->milliseconds());
8380
}
8481

85-
public function mockDataProviderWithAssociativeArray() {
86-
return array('mockTest' => ['mockData']);
82+
public static function mockDataProvider()
83+
{
84+
return [['mockArgument']];
8785
}
8886

8987
/**
9088
* @maximumDuration 200
89+
*
9190
* @dataProvider mockDataProviderWithAssociativeArray
9291
*/
9392
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider(): void
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101100
self::assertSame($milliseconds, $sleeper->milliseconds());
102101
}
103102

103+
public static function mockDataProviderWithAssociativeArray()
104+
{
105+
return ['mockTest' => ['mockData']];
106+
}
107+
104108
/**
105109
* @maximumDuration 200
106110
*/

test/EndToEnd/Version10/TestMethod/WithMaximumDurationAnnotation/SleeperTest.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
6161
self::assertSame($milliseconds, $sleeper->milliseconds());
6262
}
6363

64-
public function mockDataProvider() {
65-
return array(array('mockArgument'));
66-
}
67-
6864
/**
6965
* @maximumDuration 200
66+
*
7067
* @dataProvider mockDataProvider
7168
*/
7269
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider(): void
@@ -80,12 +77,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
8077
self::assertSame($milliseconds, $sleeper->milliseconds());
8178
}
8279

83-
public function mockDataProviderWithAssociativeArray() {
84-
return array('mockTest' => ['mockData']);
80+
public static function mockDataProvider()
81+
{
82+
return [['mockArgument']];
8583
}
8684

8785
/**
8886
* @maximumDuration 200
87+
*
8988
* @dataProvider mockDataProviderWithAssociativeArray
9089
*/
9190
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider(): void
@@ -99,6 +98,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
9998
self::assertSame($milliseconds, $sleeper->milliseconds());
10099
}
101100

101+
public static function mockDataProviderWithAssociativeArray()
102+
{
103+
return ['mockTest' => ['mockData']];
104+
}
105+
102106
/**
103107
* @maximumDuration 200
104108
*/

test/EndToEnd/Version11/TestMethod/WithMaximumDurationAnnotation/SleeperTest.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
6161
self::assertSame($milliseconds, $sleeper->milliseconds());
6262
}
6363

64-
public function mockDataProvider() {
65-
return array(array('mockArgument'));
66-
}
67-
6864
/**
6965
* @maximumDuration 200
66+
*
7067
* @dataProvider mockDataProvider
7168
*/
7269
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider(): void
@@ -80,12 +77,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
8077
self::assertSame($milliseconds, $sleeper->milliseconds());
8178
}
8279

83-
public function mockDataProviderWithAssociativeArray() {
84-
return array('mockTest' => ['mockData']);
80+
public static function mockDataProvider()
81+
{
82+
return [['mockArgument']];
8583
}
8684

8785
/**
8886
* @maximumDuration 200
87+
*
8988
* @dataProvider mockDataProviderWithAssociativeArray
9089
*/
9190
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider(): void
@@ -99,6 +98,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
9998
self::assertSame($milliseconds, $sleeper->milliseconds());
10099
}
101100

101+
public static function mockDataProviderWithAssociativeArray()
102+
{
103+
return ['mockTest' => ['mockData']];
104+
}
105+
102106
/**
103107
* @maximumDuration 200
104108
*/

0 commit comments

Comments
 (0)