Completed
Push — master ( 1641b0...f58ee6 )
by
unknown
05:15
created

src/Guesser/AbstractTypeGuesser.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
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\DoctrineMongoDBAdminBundle\Guesser;
13
14
use Doctrine\ORM\Mapping\MappingException;
15
use Sonata\AdminBundle\Guesser\TypeGuesserInterface;
16
use Sonata\DoctrineMongoDBAdminBundle\Model\ModelManager;
17
18
abstract class AbstractTypeGuesser implements TypeGuesserInterface
19
{
20
    /**
21
     * @param string                                                $baseClass
22
     * @param string                                                $propertyFullName
23
     * @param \Sonata\DoctrineMongoDBAdminBundle\Model\ModelManager $modelManager
24
     *
25
     * @return array|null
26
     */
27
    protected function getParentMetadataForProperty($baseClass, $propertyFullName, ModelManager $modelManager)
28
    {
29
        try {
30
            return $modelManager->getParentMetadataForProperty($baseClass, $propertyFullName);
31
        } catch (MappingException $e) {
0 ignored issues
show
The class Doctrine\ORM\Mapping\MappingException does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
32
            // no metadata not found.
33
            return;
34
        }
35
    }
36
}
37