BattleNetTrait   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setJsonp() 0 4 1
A _makeApiUrl() 0 4 1
1
<?php
2
namespace Jleagle\BattleNet\Request;
3
4
trait BattleNetTrait
5
{
6
  protected $_jsonP;
7
  protected $_serverLocation;
8
9
  public function setJsonp($callback)
10
  {
11
    $this->_jsonP = $callback;
12
  }
13
14
  /**
15
   * @param string $path
16
   *
17
   * @return string
18
   */
19
  private function _makeApiUrl($path)
20
  {
21
    return 'https://' . $this->_serverLocation . '.api.battle.net/' . $path;
22
  }
23
}
24