| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Document |
||
| 12 | { |
||
| 13 | protected $options; |
||
| 14 | |||
| 15 | 50 | public function __construct(array $options = null) |
|
| 18 | 50 | } |
|
| 19 | |||
| 20 | 50 | public static function createFromArray($values, array $options = []) |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Set a document attribute. |
||
| 32 | * |
||
| 33 | * The key (attribute name) must be a string. |
||
| 34 | * This will validate the value of the attribute and might throw an |
||
| 35 | * exception if the value is invalid. |
||
| 36 | * |
||
| 37 | * |
||
| 38 | * @param string $key - attribute name |
||
| 39 | * @param mixed $value - value for attribute |
||
| 40 | * |
||
| 41 | * @return void |
||
| 42 | */ |
||
| 43 | 50 | public function set($key, $value) |
|
| 48 |