Passed
Push — master ( 6c42be...776013 )
by Igor
02:03
created

DynamicEntity   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 9 2
1
<?php
2
/**
3
 * This class represents Dynamic Call Entity
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  MessageEntity
8
 * @package   Payever\Core
9
 * @author    payever GmbH <[email protected]>
10
 * @copyright 2017-2018 payever GmbH
11
 * @license   MIT <https://opensource.org/licenses/MIT>
12
 * @link      https://getpayever.com/shopsystem/
13
 */
14
15
namespace Payever\ExternalIntegration\Core\Http\MessageEntity;
16
17
use Payever\ExternalIntegration\Core\Helper\StringHelper;
18
19
/**
20
 * This class represents Dynamic Call Entity
21
 *
22
 * PHP version 5.4
23
 *
24
 * @category  MessageEntity
25
 * @package   Payever\Core
26
 * @author    payever GmbH <[email protected]>
27
 * @copyright 2017-2018 payever GmbH
28
 * @license   MIT <https://opensource.org/licenses/MIT>
29
 * @link      https://getpayever.com/shopsystem/
30
 */
31
class DynamicEntity extends CallEntity
32
{
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function load($data)
37
    {
38
        foreach ($data as $key => $value) {
39
            $property = StringHelper::camelize($key);
40
41
            $this->{$property} = $value;
42
        }
43
44
        return $this;
45
    }
46
}
47