ArrayListenerBuilder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setData() 0 4 1
A getMessageFactory() 0 4 1
1
<?php
2
3
namespace Mdb\PayPal\Ipn\ListenerBuilder\Guzzle;
4
5
use Mdb\PayPal\Ipn\ListenerBuilder\GuzzleListenerBuilder;
6
use Mdb\PayPal\Ipn\MessageFactory;
7
use Mdb\PayPal\Ipn\MessageFactory\ArrayMessageFactory;
8
9
class ArrayListenerBuilder extends GuzzleListenerBuilder
10
{
11
    /**
12
     * @var array
13
     */
14
    private $data = [];
15
16
    public function setData(array $data) : void
17
    {
18
        $this->data = $data;
19
    }
20
21
    protected function getMessageFactory() : MessageFactory
22
    {
23
        return new ArrayMessageFactory($this->data);
24
    }
25
}
26