1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | namespace AlgoWeb\ODataMetadata\ModelVisitorConcerns; |
||||
6 | |||||
7 | use AlgoWeb\ODataMetadata\EdmModelVisitor; |
||||
8 | use AlgoWeb\ODataMetadata\Interfaces\ISchemaElement; |
||||
9 | use AlgoWeb\ODataMetadata\Interfaces\ITerm; |
||||
10 | use AlgoWeb\ODataMetadata\Interfaces\ITypeReference; |
||||
11 | use AlgoWeb\ODataMetadata\Interfaces\IValueTerm; |
||||
12 | |||||
13 | trait ProcessTerms |
||||
14 | { |
||||
15 | protected function processTerm(ITerm $term): void |
||||
0 ignored issues
–
show
|
|||||
16 | { |
||||
17 | // Do not visit NamedElement as that gets visited by other means. |
||||
18 | } |
||||
19 | |||||
20 | protected function processValueTerm(IValueTerm $term): void |
||||
21 | { |
||||
22 | /** @var EdmModelVisitor $this */ |
||||
23 | $this->processSchemaElement($term); |
||||
24 | $this->processTerm($term); |
||||
25 | $this->visitTypeReference($term->getType()); |
||||
0 ignored issues
–
show
It seems like
$term->getType() can also be of type null ; however, parameter $reference of AlgoWeb\ODataMetadata\Ed...r::visitTypeReference() does only seem to accept AlgoWeb\ODataMetadata\Interfaces\ITypeReference , 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
![]() |
|||||
26 | } |
||||
27 | } |
||||
28 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.