gravataLonga /
framework
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Gravatalonga\Framework\Testing; |
||
| 4 | |||
| 5 | use Nyholm\Psr7\Factory\Psr17Factory; |
||
| 6 | use PHPUnit\Framework\TestCase as BaseTestCase; |
||
| 7 | use Gravatalonga\Framework\Testing\Traits\MakeRequestTrait; |
||
| 8 | |||
| 9 | abstract class TestCase extends BaseTestCase |
||
| 10 | { |
||
| 11 | use MakeRequestTrait; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var \Gravatalonga\Application |
||
|
0 ignored issues
–
show
|
|||
| 15 | */ |
||
| 16 | protected $app; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var Psr17Factory |
||
| 20 | */ |
||
| 21 | private $psr17; |
||
| 22 | |||
| 23 | public function setUp(): void |
||
| 24 | { |
||
| 25 | if (!isset($this->app)) { |
||
| 26 | $this->refreshApplication(); |
||
| 27 | } |
||
| 28 | |||
| 29 | $this->psr17 = new Psr17Factory(); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function refreshApplication() |
||
| 33 | { |
||
| 34 | $this->app = $this->createApplication(); |
||
|
0 ignored issues
–
show
It seems like
$this->createApplication() of type Slim\App is incompatible with the declared type Gravatalonga\Application of property $app.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property. Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.. Loading history...
|
|||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return \Slim\App; |
||
| 39 | */ |
||
| 40 | abstract public function createApplication(); |
||
| 41 | } |
||
| 42 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths