GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#11)
by
unknown
01:34
created

RichText   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A supports() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\Bundle\OpenGraphBundle\Handler\FieldType;
6
7
use eZ\Publish\API\Repository\Values\Content\Field;
8
use eZ\Publish\Core\FieldType\RichText\Value;
9
use Netgen\Bundle\OpenGraphBundle\Exception\FieldEmptyException;
10
11
class RichText extends XmlText
12
{
13
    protected function supports(Field $field): bool
14
    {
15
        return $field->value instanceof Value;
0 ignored issues
show
Bug introduced by
The class eZ\Publish\Core\FieldType\RichText\Value does not exist. Did you forget a USE statement, or did you not list all dependencies?

This error could be the result of:

1. Missing dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
16
    }
17
}
18