Plugin::bootstrap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 4
c 3
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * BEdita, API-first content management framework
6
 * Copyright 2022 Atlas Srl, Chialab Srl
7
 *
8
 * This file is part of BEdita: you can redistribute it and/or modify
9
 * it under the terms of the GNU Lesser General Public License as published
10
 * by the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * See LICENSE.LGPL or <http://gnu.org/licenses/lgpl-3.0.html> for more details.
14
 */
15
16
namespace BEdita\Placeholders;
17
18
use BEdita\Placeholders\Event\BootstrapEventHandler;
19
use BEdita\Placeholders\Event\JsonSchemaEventHandler;
20
use Cake\Core\BasePlugin;
21
use Cake\Core\PluginApplicationInterface;
22
use Cake\Event\EventManager;
23
24
/**
25
 * Plugin for BEdita\Placeholders
26
 */
27
class Plugin extends BasePlugin
28
{
29
    /**
30
     * {@inheritDoc}
31
     *
32
     * @codeCoverageIgnore
33
     */
34
    public function bootstrap(PluginApplicationInterface $app): void
35
    {
36
        parent::bootstrap($app);
37
38
        EventManager::instance()
39
            ->on(new BootstrapEventHandler())
40
            ->on(new JsonSchemaEventHandler());
41
    }
42
}
43