| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class AttrSet |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The attribute name |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $sAttrName; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The attribute value |
||
| 18 | * |
||
| 19 | * @var mixed |
||
| 20 | */ |
||
| 21 | private $xAttrValue; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The constructor. |
||
| 25 | * |
||
| 26 | * @param string $sAttrName The attribute name |
||
| 27 | * @param mixed $xAttrValue The attribute value |
||
| 28 | */ |
||
| 29 | public function __construct(string $sAttrName, $xAttrValue) |
||
| 30 | { |
||
| 31 | $this->sAttrName = $sAttrName; |
||
| 32 | $this->xAttrValue = Parameter::make($xAttrValue); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Returns a string representation of this call |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getScript(): string |
||
| 41 | { |
||
| 42 | return $this->sAttrName . ' = ' . $this->xAttrValue; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Convert this call to string |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function __toString() |
||
| 53 | } |
||
| 54 | } |
||
| 55 |