| Total Complexity | 5 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 84.62% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class Badge implements BadgeInterface |
||
| 22 | { |
||
| 23 | |||
| 24 | protected $namespace; |
||
| 25 | protected $name; |
||
| 26 | protected $data; |
||
| 27 | |||
| 28 | 2 | public function __construct($namespace, $name, $data = null) |
|
| 29 | { |
||
| 30 | 2 | $this->namespace = $namespace; |
|
| 31 | 2 | $this->name = $name; |
|
| 32 | 2 | $this->data = $data; |
|
| 33 | 2 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @JMS\Groups({"public_profile"}) |
||
| 37 | * @JMS\VirtualProperty |
||
| 38 | * @JMS\SerializedName("data") |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | 1 | public function getData() |
|
| 42 | { |
||
| 43 | 1 | return $this->data; |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @JMS\Groups({"public_profile"}) |
||
| 48 | * @JMS\VirtualProperty |
||
| 49 | * @JMS\SerializedName("name") |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 1 | public function getName() |
|
| 53 | { |
||
| 54 | 1 | return $this->name; |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @JMS\Groups({"public_profile"}) |
||
| 59 | * @JMS\VirtualProperty |
||
| 60 | * @JMS\SerializedName("namespace") |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | 1 | public function getNamespace() |
|
| 64 | { |
||
| 65 | 1 | return $this->namespace; |
|
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @inheritDoc |
||
| 70 | */ |
||
| 71 | public function __toString(): string |
||
| 74 | } |
||
| 75 | |||
| 76 | |||
| 77 | } |
||
| 78 |