Issues (19)

.phpstorm.meta.php/gson.meta.php (7 issues)

1
<?php
2
/*
3
 * Copyright (c) Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
7
namespace PHPSTORM_META;
8
9
use Tebru\AnnotationReader\AnnotationCollection;
10
use Tebru\Gson\ClassMetadata;
11
use Tebru\Gson\Gson;
12
use Tebru\Gson\PropertyMetadata;
13
14
override(Gson::fromJson(1), map(['' => '@']));
0 ignored issues
show
Bug Best Practice introduced by
The method Tebru\Gson\Gson::fromJson() is not static, but was called statically. ( Ignorable by Annotation )

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

14
override(Gson::/** @scrutinizer ignore-call */ fromJson(1), map(['' => '@']));
Loading history...
The call to Tebru\Gson\Gson::fromJson() has too few arguments starting with type. ( Ignorable by Annotation )

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

14
override(Gson::/** @scrutinizer ignore-call */ fromJson(1), map(['' => '@']));

This check compares calls to functions or methods with their respective definitions. If the call has less 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. Please note the @ignore annotation hint above.

Loading history...
15
override(Gson::fromArray(1), map(['' => '@']));
0 ignored issues
show
The method fromArray() does not exist on Tebru\Gson\Gson. ( Ignorable by Annotation )

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

15
override(Gson::/** @scrutinizer ignore-call */ fromArray(1), map(['' => '@']));

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
16
override(AnnotationCollection::get(0), map(['' => '@']));
0 ignored issues
show
Bug Best Practice introduced by
The method Tebru\AnnotationReader\AnnotationCollection::get() is not static, but was called statically. ( Ignorable by Annotation )

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

16
override(AnnotationCollection::/** @scrutinizer ignore-call */ get(0), map(['' => '@']));
Loading history...
It seems like Tebru\AnnotationReader\A...ationCollection::get(0) can also be of type Tebru\AnnotationReader\AbstractAnnotation; however, parameter $callable of PHPSTORM_META\override() does only seem to accept callable, 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

16
override(/** @scrutinizer ignore-type */ AnnotationCollection::get(0), map(['' => '@']));
Loading history...
17
override(ClassMetadata::getAnnotation(0), map(['' => '@']));
0 ignored issues
show
Bug Best Practice introduced by
The method Tebru\Gson\ClassMetadata::getAnnotation() is not static, but was called statically. ( Ignorable by Annotation )

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

17
override(ClassMetadata::/** @scrutinizer ignore-call */ getAnnotation(0), map(['' => '@']));
Loading history...
18
override(PropertyMetadata::getAnnotation(0), map(['' => '@']));
0 ignored issues
show
Bug Best Practice introduced by
The method Tebru\Gson\PropertyMetadata::getAnnotation() is not static, but was called statically. ( Ignorable by Annotation )

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

18
override(PropertyMetadata::/** @scrutinizer ignore-call */ getAnnotation(0), map(['' => '@']));
Loading history...
19