DynamicEntity   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

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