Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 20, 2017
1 parent bf91dd7 commit dd94c63
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/CodeCoverage/Generators/AbstractGenerator.php
Expand Up @@ -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;
Expand Down Expand Up @@ -103,7 +103,7 @@ public function getCoveredPercent()


/**
* @return \CallbackFilterIterator
* @return \Iterator
*/
protected function getSourceIterator()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Framework/Assert.php
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Environment.php
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/FileMock.php
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/Framework/TestCase.php
Expand Up @@ -159,7 +159,7 @@ public function runTest($method, array $args = null)


/**
* @return array
* @return mixed
*/
protected function getData($provider)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/CliTester.php
Expand Up @@ -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']);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Job.php
Expand Up @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions src/Runner/Runner.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/Test.php
Expand Up @@ -126,7 +126,7 @@ public function withArguments(array $args)

/**
* @param int
* @param string
* @param string|null
* @return static
*/
public function withResult($result, $message)
Expand Down

0 comments on commit dd94c63

Please sign in to comment.