Completed
Pull Request — 1.3.x (#71)
by Grégoire
06:05
created

PersistentObject::add()   A

Complexity

Conditions 6
Paths 4

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 6

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 15
rs 9.2222
c 0
b 0
f 0
ccs 10
cts 10
cp 1
cc 6
nc 4
nop 2
crap 6
1
<?php
2
3
namespace Doctrine\Common\Persistence;
4
5
use const E_USER_DEPRECATED;
6
use function class_alias;
7
use function class_exists;
8
use function sprintf;
9
use function trigger_error;
10
11 1
if (! class_exists(\Doctrine\Persistence\PersistentObject::class, false)) {
12
    @trigger_error(sprintf(
13
        'The %s\PersistentObject class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0.'
14
        . ' Use \Doctrine\Persistence\PersistentObject instead.',
15
        __NAMESPACE__
16
    ), E_USER_DEPRECATED);
17
}
18
19 1
class_alias(
20 1
    \Doctrine\Persistence\PersistentObject::class,
21 1
    __NAMESPACE__ . '\PersistentObject'
22
);
23
24 1
if (false) {
25
    /**
26
     * @deprecated 1.3 Use Doctrine\Persistence\PersistentObject
27
     */
28
    abstract class PersistentObject extends \Doctrine\Persistence\PersistentObject
0 ignored issues
show
Deprecated Code introduced by
The class Doctrine\Persistence\PersistentObject has been deprecated: Deprecated `PersistentObject` class in 1.2. Please implement this functionality directly in your application if you want ActiveRecord style functionality. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

28
    abstract class PersistentObject extends /** @scrutinizer ignore-deprecated */ \Doctrine\Persistence\PersistentObject
Loading history...
29
    {
30
    }
31
}
32