Skip to content

Commit dd94c63

Browse files
committed
small fixes
1 parent bf91dd7 commit dd94c63

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

src/CodeCoverage/Generators/AbstractGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ abstract class AbstractGenerator
1919
CODE_TESTED = 1;
2020

2121
/** @var array */
22-
public $acceptFiles = ['php', 'phpc', 'phpt', 'phtml'];
22+
public $acceptFiles = ['php', 'phpt', 'phtml'];
2323

2424
/** @var array */
2525
protected $data;
@@ -103,7 +103,7 @@ public function getCoveredPercent()
103103

104104

105105
/**
106-
* @return \CallbackFilterIterator
106+
* @return \Iterator
107107
*/
108108
protected function getSourceIterator()
109109
{

src/Framework/Assert.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public static function type($type, $value, $description = null)
283283
* @param string class
284284
* @param string message
285285
* @param int code
286-
* @return \Exception
286+
* @return \Exception|\Throwable
287287
*/
288288
public static function exception(callable $function, $class, $message = null, $code = null)
289289
{
@@ -312,7 +312,7 @@ public static function exception(callable $function, $class, $message = null, $c
312312

313313
/**
314314
* Checks if the function throws exception, alias for exception().
315-
* @return \Exception
315+
* @return \Exception|\Throwable
316316
*/
317317
public static function throws(callable $function, $class, $message = null, $code = null)
318318
{
@@ -325,7 +325,7 @@ public static function throws(callable $function, $class, $message = null, $code
325325
* @param callable
326326
* @param int|string|array
327327
* @param string message
328-
* @return null|\Exception
328+
* @return null|\Exception|\Throwable
329329
*/
330330
public static function error(callable $function, $expectedType, $expectedMessage = null)
331331
{

src/Framework/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function setupColors()
8585
*/
8686
public static function setupErrors()
8787
{
88-
error_reporting(E_ALL | E_STRICT);
88+
error_reporting(E_ALL);
8989
ini_set('display_errors', '1');
9090
ini_set('html_errors', '0');
9191
ini_set('log_errors', '0');

src/Framework/FileMock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class FileMock
4040
/**
4141
* @return string file name
4242
*/
43-
public static function create($content, $extension = null)
43+
public static function create($content = '', $extension = null)
4444
{
4545
self::register();
4646

src/Framework/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function runTest($method, array $args = null)
159159

160160

161161
/**
162-
* @return array
162+
* @return mixed
163163
*/
164164
protected function getData($provider)
165165
{

src/Runner/CliTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private function createRunner()
207207
$runner->outputHandlers[] = new Output\JUnitPrinter;
208208
break;
209209
default:
210-
$runner->outputHandlers[] = new Output\ConsolePrinter($runner, $this->options['-s']);
210+
$runner->outputHandlers[] = new Output\ConsolePrinter($runner, (bool) $this->options['-s']);
211211
}
212212
}
213213

src/Runner/Job.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getEnvironmentVariable($name)
9595
* @param int self::RUN_ASYNC | self::RUN_COLLECT_ERRORS
9696
* @return void
9797
*/
98-
public function run($flags = null)
98+
public function run($flags = 0)
9999
{
100100
foreach ($this->envVars as $name => $value) {
101101
putenv("$name=$value");

src/Runner/Runner.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function run()
131131
$running[] = $job = array_shift($this->jobs);
132132
$async = $this->threadCount > 1 && (count($running) + count($this->jobs) > 1);
133133
$job->setEnvironmentVariable(Environment::THREAD, array_shift($threads));
134-
$job->run($async ? $job::RUN_ASYNC : null);
134+
$job->run($async ? $job::RUN_ASYNC : 0);
135135
}
136136

137137
if (count($running) > 1) {
@@ -203,7 +203,7 @@ public function addJob(Job $job)
203203
public function prepareTest(Test $test)
204204
{
205205
foreach ($this->outputHandlers as $handler) {
206-
$handler->prepare(clone $test);
206+
$handler->prepare($test);
207207
}
208208
}
209209

@@ -217,7 +217,7 @@ public function finishTest(Test $test)
217217
$this->result = $this->result && ($test->getResult() !== Test::FAILED);
218218

219219
foreach ($this->outputHandlers as $handler) {
220-
$handler->finish(clone $test);
220+
$handler->finish($test);
221221
}
222222

223223
if ($this->tempDir) {

src/Runner/Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function withArguments(array $args)
126126

127127
/**
128128
* @param int
129-
* @param string
129+
* @param string|null
130130
* @return static
131131
*/
132132
public function withResult($result, $message)

0 commit comments

Comments
 (0)