Completed
Push — apply-code-style ( 1a43bf...37cc85 )
by
unknown
45:48
created

AssignSectionToSubtree::receive()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Search\Common\Slot;
10
11
use eZ\Publish\Core\SignalSlot\Signal;
12
use eZ\Publish\Core\SignalSlot\Signal\SectionService\AssignSectionToSubtreeSignal;
13
14
class AssignSectionToSubtree extends AbstractSubtree
15
{
16
    public function receive(Signal $signal)
17
    {
18
        if (!$signal instanceof AssignSectionToSubtreeSignal) {
19
            return;
20
        }
21
22
        $this->indexSubtree($signal->locationId);
23
    }
24
}
25