| Total Complexity | 8 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class HtmlSplitter |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * The list of html tags. |
||
| 22 | * |
||
| 23 | * @var string[] |
||
| 24 | */ |
||
| 25 | protected $tags = [ |
||
| 26 | 'h1', |
||
| 27 | 'h2', |
||
| 28 | 'h3', |
||
| 29 | 'h4', |
||
| 30 | 'h5', |
||
| 31 | 'p', |
||
| 32 | ]; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Creates a new instance of the class. |
||
| 36 | * |
||
| 37 | * @param array $tags |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function __construct(array $tags = null) |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Acts a static factory. |
||
| 50 | * |
||
| 51 | * @param string|array $tags |
||
| 52 | * |
||
| 53 | * @return static |
||
| 54 | */ |
||
| 55 | public static function by($tags) |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Splits the given value. |
||
| 62 | * |
||
| 63 | * @param string $value |
||
| 64 | * |
||
| 65 | * @return array |
||
| 66 | */ |
||
| 67 | public function __invoke($value): array |
||
| 86 |