Completed
Push — master ( 81b739...8e6e04 )
by Matthieu
01:47
created

DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace DeepCopy\Matcher\Doctrine;
4
5
use DeepCopy\Matcher\Matcher;
6
use Doctrine\Common\Persistence\Proxy;
7
8
/**
9
 * Match a Doctrine Proxy class.
10
 */
11
class DoctrineProxyMatcher implements Matcher
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function matches($object, $property)
17
    {
18
        return $object instanceof Proxy;
0 ignored issues
show
The class Doctrine\Common\Persistence\Proxy 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...
19
    }
20
}
21