Passed
Push — master ( 8926af...beb5fc )
by Anton
02:16
created

AnnotatedBootloader::defineDependencies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
declare(strict_types=1);
9
10
namespace Spiral\Bootloader\Cycle;
11
12
use Cycle\Annotated;
13
use Doctrine\Common\Annotations\AnnotationRegistry;
14
use Spiral\Boot\Bootloader\Bootloader;
15
16
final class AnnotatedBootloader extends Bootloader
17
{
18
    const DEPENDENCIES = [
19
        SchemaBootloader::class
20
    ];
21
22
    /**
23
     * @param SchemaBootloader $schema
24
     */
25
    public function boot(SchemaBootloader $schema)
26
    {
27
        AnnotationRegistry::registerLoader('class_exists');
0 ignored issues
show
Deprecated Code introduced by
The function Doctrine\Common\Annotati...istry::registerLoader() has been deprecated: this method is deprecated and will be removed in doctrine/annotations 2.0 autoloading should be deferred to the globally registered autoloader by then. For now, use @example AnnotationRegistry::registerLoader('class_exists') ( Ignorable by Annotation )

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

27
        /** @scrutinizer ignore-deprecated */ AnnotationRegistry::registerLoader('class_exists');

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
28
29
        $schema->addGenerator(SchemaBootloader::GROUP_INDEX, Annotated\Embeddings::class);
30
        $schema->addGenerator(SchemaBootloader::GROUP_INDEX, Annotated\Entities::class);
31
        $schema->addGenerator(SchemaBootloader::GROUP_INDEX, Annotated\MergeColumns::class);
32
        $schema->addGenerator(SchemaBootloader::GROUP_RENDER, Annotated\MergeIndexes::class);
33
    }
34
}
35