WpBridgeTrait::setWpBridge()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
namespace Gwa\Wordpress\WpBridge\Traits;
3
4
use Gwa\Wordpress\WpBridge\Contracts\WpBridgeInterface;
5
6
/**
7
 * Trait to be used by all classes that use WpBridge
8
 */
9
trait WpBridgeTrait
10
{
11
    /**
12
     * WpBridge instance.
13
     *
14
     * @var \Gwa\Wordpress\WpBridge\Contracts\WpBridgeInterface $wpbridge
15
     */
16
    private $wpbridge;
17
18
    /**
19
     * Set WpBridge.
20
     *
21
     * @param WpBridgeInterface $wpbridge
22
     */
23
    public function setWpBridge(WpBridgeInterface $wpbridge)
24
    {
25
        $this->wpbridge = $wpbridge;
26
27
        return $this;
28
    }
29
30
    /**
31
     * Get WpBridge.
32
     *
33
     * @return WpBridge
34
     */
35
    public function getWpBridge()
36
    {
37
        return $this->wpbridge;
38
    }
39
}
40