GulpPlugin::activate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the puli/gulp-plugin package.
5
 *
6
 * (c) Bernhard Schussek <[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 Puli\GulpPlugin;
13
14
use Puli\Manager\Api\Event\PuliEvents;
15
use Puli\Manager\Api\Puli;
16
use Puli\Manager\Api\PuliPlugin;
17
18
/**
19
 * Integrates Puli with the Gulp frontend workflow tool.
20
 *
21
 * @since  1.0
22
 *
23
 * @author Bernhard Schussek <[email protected]>
24
 */
25
class GulpPlugin implements PuliPlugin
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function activate(Puli $puli)
31
    {
32
        $dispatcher = $puli->getEventDispatcher();
33
34
        // Add event listeners that generate the JSON file here
35
        $dispatcher->addListener(PuliEvents::XXX, array($this, 'handleXxx'));
36
    }
37
}
38