| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class AttrGet implements JsonSerializable, Stringable |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The attribute name |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $sAttrName; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The constructor. |
||
| 19 | * |
||
| 20 | * @param string $sAttrName The attribute name |
||
| 21 | */ |
||
| 22 | public function __construct(string $sAttrName) |
||
| 23 | { |
||
| 24 | $this->sAttrName = $sAttrName; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Convert this call to array, when converting the response into json. |
||
| 29 | * |
||
| 30 | * @return array |
||
| 31 | */ |
||
| 32 | public function jsonSerialize(): array |
||
| 37 | ]; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Returns a string representation of the script output (javascript) from this call |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function __toString(): string |
||
| 48 | } |
||
| 49 | } |
||
| 50 |