Completed
Pull Request — master (#951)
by David
01:49
created

ContainerAwareEntityListenerResolver::clear()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 16
rs 9.7333
cc 3
nc 3
nop 1
1
<?php
2
3
namespace Doctrine\Bundle\DoctrineBundle\Mapping;
4
5
use Symfony\Component\DependencyInjection\ContainerInterface;
6
7
/**
8
 * @deprecated since 1.11 and will be removed in 2.0. Use ContainerEntityListenerResolver instead.
9
 */
10
class ContainerAwareEntityListenerResolver extends ContainerEntityListenerResolver
11
{
12
    public function __construct(ContainerInterface $container)
13
    {
14
        @trigger_error(sprintf('The class "%s" is deprecated since 1.11 and will be removed in 2.0. Use "%s" instead.', self::class, 'Doctrine\Bundle\DoctrineBundle\Mapping\ContainerEntityListenerResolver'), E_USER_DEPRECATED);
0 ignored issues
show
Security Best Practice introduced by
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.

If you suppress an error, we recommend checking for the error condition explicitly:

// For example instead of
@mkdir($dir);

// Better use
if (@mkdir($dir) === false) {
    throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
Loading history...
15
        parent::__construct($container);
16
    }
17
}
18