WpBridgeTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 31
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setWpBridge() 0 6 1
A getWpBridge() 0 4 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