| Total Complexity | 6 |
| Total Lines | 83 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | abstract class Block extends Payload |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * Block type. |
||
| 10 | * |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $type; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Block identifier. |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $block_id; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Get the block type. |
||
| 24 | * |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | 23 | public function getType() |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the block identifier. |
||
| 34 | * |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 16 | public function getBlockId() |
|
| 38 | { |
||
| 39 | 16 | return $this->block_id; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Set the block identifier. |
||
| 44 | * |
||
| 45 | * @param string $blockId |
||
| 46 | * |
||
| 47 | * @return $this |
||
| 48 | */ |
||
| 49 | 8 | public function setBlockId($blockId) |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Create a Block element from a keyed array of attributes. |
||
| 58 | * |
||
| 59 | * @param array $attributes |
||
| 60 | * |
||
| 61 | * @return Block |
||
| 62 | * |
||
| 63 | * @throws \InvalidArgumentException |
||
| 64 | */ |
||
| 65 | 5 | public static function factory(array $attributes) |
|
| 91 |