PublisherSetter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 17
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setPublisher() 0 4 1
1
<?php
2
/**
3
 * Caridea
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
 * use this file except in compliance with the License. You may obtain a copy of
7
 * the License at
8
 *
9
 * http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
 * License for the specific language governing permissions and limitations under
15
 * the License.
16
 *
17
 * @copyright 2015-2018 LibreWorks contributors
18
 * @license   Apache-2.0
19
 */
20
21
namespace Caridea\Event;
22
23
/**
24
 * Easy implementation of `PublisherAware`.
25
 */
26
trait PublisherSetter
27
{
28
    /**
29
     * @var \Caridea\Event\Publisher
30
     */
31
    protected $publisher;
32
33
    /**
34
     * Sets the publisher.
35
     *
36
     * @param \Caridea\Event\Publisher$ publisher The publisher
37
     */
38 1
    public function setPublisher(Publisher $publisher)
39
    {
40 1
        $this->publisher = $publisher;
41 1
    }
42
}
43