I want to configure phpstan such that it reports use of undefined method calls
<?php
namespace App;
class Testeroni
{
public function asdf()
{
$this->iDoNotExist(); // Ok
self::whatIsThat(); // OK
$me = new self();
$me->iDoNotExist(); // does not get reported!! why?
}
}
But it does not report the last method call. Anybody an idea?
this is the config used
parameters:
customRulesetUsed: true
paths:
- src
- libs
services:
-
class: PHPStanRulesMethodsCallMethodsRule
tags: [phpstan.rules.rule]
-
class: PHPStanRulesMethodsCallStaticMethodsRule
tags: [phpstan.rules.rule]
-
class: PHPStanRulesMethodsExistingClassesInTypehintsRule
tags: [phpstan.rules.rule]
It also reports an error Parameter has invalid Type
. How can I disable that?