It seems like you are loosely comparing $arg of type GitElephant\Objects\TreeishInterface|string|null against null; this is ambiguous if the string can be empty. Consider using a strict comparison !== instead.
It seems like $arg defined by parameter $arg on line 42 can also be of type object<GitElephant\Objects\TreeishInterface>; however, GitElephant\Command\Base...d::addCommandSubject2() does only seem to accept string, maybe add an additional type check?
This check looks at variables that have been passed in as parameters and are passed out again
to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.
Loading history...
54
}
55
56
3
return $this->getCommand();
57
}
58
59
/**
60
* @param Repository $repository
61
* @return ResetCommand
62
*/
63
3
public static function getInstance(Repository $repository=null)