| Total Complexity | 5 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class FrontMatterCreator |
||
| 10 | { |
||
| 11 | private $matter = []; |
||
| 12 | |||
| 13 | private $content = ''; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * FrontMatterCreator constructor. |
||
| 17 | * @param array $matter |
||
| 18 | * @param string $content |
||
| 19 | */ |
||
| 20 | 52 | private function __construct(array $matter, string $content) |
|
| 21 | { |
||
| 22 | 52 | $this->matter = $matter; |
|
| 23 | 52 | $this->content = $content; |
|
| 24 | 52 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * Provide the front matter and file content |
||
| 28 | * |
||
| 29 | * @param array $matter |
||
| 30 | * @param string $content |
||
| 31 | * @return static |
||
| 32 | */ |
||
| 33 | 52 | public static function seed(array $matter, string $content) |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Create a data file including the front matter |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | 52 | public function create(): string |
|
| 66 |