Should the return type not be \AframeVR\Interfaces\Assets\MixinInterface?
This check compares the return type specified in the @return annotation of a function
or method doc comment with the types returned by the function and raises an issue if they
mismatch.
Loading history...
51
*/
52
1
public function mixin(string $name = 'untitled'): MixinInterface
53
{
54
1
return $this->assets[$name] ?? $this->assets[$name] = new Mixin($name);
The call to Mixin::__construct() has too many arguments starting with $name.
This check compares calls to functions or methods with their respective definitions.
If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress.
In this case you can add the @ignorePhpDoc
annotation to the duplicate definition and it will be ignored.
Should the return type not be \AframeVR\Interfaces\Assets\ItemInterface?
This check compares the return type specified in the @return annotation of a function
or method doc comment with the types returned by the function and raises an issue if they
mismatch.
Loading history...
62
*/
63
4
public function item(string $name = 'untitled'): ItemInterface
64
{
65
4
return $this->assets[$name] ?? $this->assets[$name] = new Item($name);
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.