Permalink
Browse files

small fixes

  • Loading branch information...
dg committed Aug 18, 2017
1 parent bf91dd7 commit dd94c63d25a1743e8e34598a7081bd3cf8262cc7
@@ -19,7 +19,7 @@ abstract class AbstractGenerator
CODE_TESTED = 1;
/** @var array */
public $acceptFiles = ['php', 'phpc', 'phpt', 'phtml'];
public $acceptFiles = ['php', 'phpt', 'phtml'];
/** @var array */
protected $data;
@@ -103,7 +103,7 @@ public function getCoveredPercent()
/**
* @return \CallbackFilterIterator
* @return \Iterator
*/
protected function getSourceIterator()
{
@@ -283,7 +283,7 @@ public static function type($type, $value, $description = null)
* @param string class
* @param string message
* @param int code
* @return \Exception
* @return \Exception|\Throwable
*/
public static function exception(callable $function, $class, $message = null, $code = null)
{
@@ -312,7 +312,7 @@ public static function exception(callable $function, $class, $message = null, $c
/**
* Checks if the function throws exception, alias for exception().
* @return \Exception
* @return \Exception|\Throwable
*/
public static function throws(callable $function, $class, $message = null, $code = null)
{
@@ -325,7 +325,7 @@ public static function throws(callable $function, $class, $message = null, $code
* @param callable
* @param int|string|array
* @param string message
* @return null|\Exception
* @return null|\Exception|\Throwable
*/
public static function error(callable $function, $expectedType, $expectedMessage = null)
{
@@ -85,7 +85,7 @@ public static function setupColors()
*/
public static function setupErrors()
{
error_reporting(E_ALL | E_STRICT);
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('html_errors', '0');
ini_set('log_errors', '0');
@@ -40,7 +40,7 @@ class FileMock
/**
* @return string file name
*/
public static function create($content, $extension = null)
public static function create($content = '', $extension = null)
{
self::register();
@@ -159,7 +159,7 @@ public function runTest($method, array $args = null)
/**
* @return array
* @return mixed
*/
protected function getData($provider)
{
@@ -207,7 +207,7 @@ private function createRunner()
$runner->outputHandlers[] = new Output\JUnitPrinter;
break;
default:
$runner->outputHandlers[] = new Output\ConsolePrinter($runner, $this->options['-s']);
$runner->outputHandlers[] = new Output\ConsolePrinter($runner, (bool) $this->options['-s']);
}
}
@@ -95,7 +95,7 @@ public function getEnvironmentVariable($name)
* @param int self::RUN_ASYNC | self::RUN_COLLECT_ERRORS
* @return void
*/
public function run($flags = null)
public function run($flags = 0)
{
foreach ($this->envVars as $name => $value) {
putenv("$name=$value");
@@ -131,7 +131,7 @@ public function run()
$running[] = $job = array_shift($this->jobs);
$async = $this->threadCount > 1 && (count($running) + count($this->jobs) > 1);
$job->setEnvironmentVariable(Environment::THREAD, array_shift($threads));
$job->run($async ? $job::RUN_ASYNC : null);
$job->run($async ? $job::RUN_ASYNC : 0);
}
if (count($running) > 1) {
@@ -203,7 +203,7 @@ public function addJob(Job $job)
public function prepareTest(Test $test)
{
foreach ($this->outputHandlers as $handler) {
$handler->prepare(clone $test);
$handler->prepare($test);
}
}
@@ -217,7 +217,7 @@ public function finishTest(Test $test)
$this->result = $this->result && ($test->getResult() !== Test::FAILED);
foreach ($this->outputHandlers as $handler) {
$handler->finish(clone $test);
$handler->finish($test);
}
if ($this->tempDir) {
@@ -126,7 +126,7 @@ public function withArguments(array $args)
/**
* @param int
* @param string
* @param string|null
* @return static
*/
public function withResult($result, $message)

0 comments on commit dd94c63

Please sign in to comment.