Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Failed Conditions
Pull Request — master (#1025)
by Dan
04:46
created

test/SmrTest/PhpFileInspectionTest.php (2 issues)

Labels
Severity
1
<?php declare(strict_types=1);
2
3
namespace SmrTest;
4
5
use PHPUnit\Framework\TestCase;
6
use Overtrue\PHPLint\Linter;
7
8
/**
9
 * @coversNothing
10
 */
11
class PhpFileInspectionTest extends TestCase {
12
13
	public function test_all_files_use_strict_type() {
14
		$exit_code = 1;
15
		$output = [];
16
		exec(ROOT . 'test/strict_types.sh', $output, $exit_code);
17
		$this->assertSame(0, $exit_code, join("\n", $output));
18
		$this->assertEquals('Success! No strict_type errors.', end($output));
19
	}
20
21
	public function test_all_files_pass_phplint() {
22
		$paths = [ROOT];
23
		$excludes = ['vendor'];
24
		$linter = new Linter($paths, $excludes, warning: true);
0 ignored issues
show
true of type true is incompatible with the type array expected by parameter $extensions of Overtrue\PHPLint\Linter::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

24
		$linter = new Linter($paths, $excludes, /** @scrutinizer ignore-type */ warning: true);
Loading history...
25
		$linter->setProcessLimit(8); // multiprocessing
26
27
		// get errors
28
		$errors = $linter->lint();
29
		$this->assertEmpty($errors, print_r($errors, true));
0 ignored issues
show
It seems like print_r($errors, true) can also be of type true; however, parameter $message of PHPUnit\Framework\Assert::assertEmpty() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

29
		$this->assertEmpty($errors, /** @scrutinizer ignore-type */ print_r($errors, true));
Loading history...
30
	}
31
32
}
33