BaseResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A toArray() 0 4 1
1
<?php
2
namespace Jleagle\BattleNet\Responses;
3
4
abstract class BaseResponse
5
{
6
  public function __construct(array $data)
7
  {
8
    foreach($data as $field => $value)
9
    {
10
      $this->$field = $value;
11
    }
12
  }
13
14
  public function toArray()
15
  {
16
    return get_object_vars($this);
17
  }
18
}
19