@@ -42,14 +42,14 @@ public function __construct(ConsoleIO $io, CodeCoverage $coverage, array $report
42
42
$ this ->io = $ io ;
43
43
$ this ->coverage = $ coverage ;
44
44
$ this ->reports = $ reports ;
45
- $ this ->options = array (
46
- 'whitelist ' => array ( 'src ' , 'lib ' ) ,
47
- 'blacklist ' => array ( 'test ' , 'vendor ' , 'spec ' ) ,
48
- 'whitelist_files ' => array () ,
49
- 'blacklist_files ' => array () ,
50
- 'output ' => array ( 'html ' => 'coverage ' ) ,
51
- 'format ' => array ( 'html ' ) ,
52
- ) ;
45
+ $ this ->options = [
46
+ 'whitelist ' => [ 'src ' , 'lib ' ] ,
47
+ 'blacklist ' => [ 'test ' , 'vendor ' , 'spec ' ] ,
48
+ 'whitelist_files ' => [] ,
49
+ 'blacklist_files ' => [] ,
50
+ 'output ' => [ 'html ' => 'coverage ' ] ,
51
+ 'format ' => [ 'html ' ] ,
52
+ ] ;
53
53
54
54
$ this ->enabled = extension_loaded ('xdebug ' ) || (PHP_SAPI === 'phpdbg ' );
55
55
$ this ->skipCoverage = $ skipCoverage ;
@@ -61,7 +61,7 @@ public function __construct(ConsoleIO $io, CodeCoverage $coverage, array $report
61
61
*
62
62
* @param SuiteEvent $event
63
63
*/
64
- public function beforeSuite (SuiteEvent $ event )
64
+ public function beforeSuite (SuiteEvent $ event ) : void
65
65
{
66
66
if (!$ this ->enabled || $ this ->skipCoverage ) {
67
67
return ;
@@ -90,26 +90,26 @@ public function beforeSuite(SuiteEvent $event)
90
90
/**
91
91
* @param ExampleEvent $event
92
92
*/
93
- public function beforeExample (ExampleEvent $ event )
93
+ public function beforeExample (ExampleEvent $ event ): void
94
94
{
95
95
if (!$ this ->enabled || $ this ->skipCoverage ) {
96
96
return ;
97
97
}
98
98
99
99
$ example = $ event ->getExample ();
100
100
101
- $ name = strtr ('%spec%::%example% ' , array (
101
+ $ name = strtr ('%spec%::%example% ' , [
102
102
'%spec% ' => $ example ->getSpecification ()->getClassReflection ()->getName (),
103
103
'%example% ' => $ example ->getFunctionReflection ()->getName (),
104
- ) );
104
+ ] );
105
105
106
106
$ this ->coverage ->start ($ name );
107
107
}
108
108
109
109
/**
110
110
* @param ExampleEvent $event
111
111
*/
112
- public function afterExample (ExampleEvent $ event )
112
+ public function afterExample (ExampleEvent $ event ): void
113
113
{
114
114
if (!$ this ->enabled || $ this ->skipCoverage ) {
115
115
return ;
@@ -121,7 +121,7 @@ public function afterExample(ExampleEvent $event)
121
121
/**
122
122
* @param SuiteEvent $event
123
123
*/
124
- public function afterSuite (SuiteEvent $ event )
124
+ public function afterSuite (SuiteEvent $ event ): void
125
125
{
126
126
if (!$ this ->enabled || $ this ->skipCoverage ) {
127
127
if ($ this ->io && $ this ->io ->isVerbose ()) {
@@ -156,7 +156,7 @@ public function afterSuite(SuiteEvent $event)
156
156
/**
157
157
* @param array $options
158
158
*/
159
- public function setOptions (array $ options )
159
+ public function setOptions (array $ options ): void
160
160
{
161
161
$ this ->options = $ options + $ this ->options ;
162
162
}
0 commit comments