conjecto / nemrod

Nemrod is a framework providing an abstraction layer for handling (consuming and producing) RDF in a Symfony2 project
http://conjecto.github.io/nemrod
Other
23 stars 6 forks source link

[Insight] Missing use statement should be avoided - in src/…/ResourcePropertyPathMapper.php, line 142 #4

Closed bdecarne closed 8 years ago

bdecarne commented 9 years ago

in src/Conjecto/Nemrod/Form/Extension/Core/DataMapper/ResourcePropertyPathMapper.php, line 142

The PropertyPath class resolves to the following classes: Symfony\Component\PropertyAccess\PropertyPath or Symfony\Component\Validator\Util\PropertyPath. Did you forget to add a corresponding use statement for one of them?

        if (!is_a($objectOrArray, 'EasyRdf\Resource')) {
            throw new UnexpectedTypeException($objectOrArray, 'EasyRdf\Resource');
        }

        if (is_string($propertyPath)) {
            $propertyPath = new PropertyPath($propertyPath);
        } elseif (!$propertyPath instanceof PropertyPathInterface) {
            throw new UnexpectedTypeException($propertyPath, 'string or Symfony\Component\PropertyAccess\PropertyPathInterface');
        }

        //$objectOrArray = new \EasyRdf_Resource();

Posted from SensioLabsInsight