| Total Complexity | 10 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class CssStyle |
||
| 20 | { |
||
| 21 | /** |
||
|
1 ignored issue
–
show
|
|||
| 22 | * @var BibliographyOptions |
||
| 23 | */ |
||
| 24 | private $bibliographyOptions; |
||
| 25 | |||
| 26 | /** |
||
|
1 ignored issue
–
show
|
|||
| 27 | * @var CssRules |
||
| 28 | */ |
||
| 29 | private $cssRules = null; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * CssStyle constructor. |
||
| 33 | * @param BibliographyOptions $bibliographyOptions |
||
|
2 ignored issues
–
show
|
|||
| 34 | */ |
||
| 35 | public function __construct(BibliographyOptions $bibliographyOptions) |
||
| 36 | { |
||
| 37 | $this->bibliographyOptions = $bibliographyOptions; |
||
| 38 | $this->cssRules = new CssRules(); |
||
| 39 | $this->init(); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * renders CSS output |
||
| 44 | * @return string |
||
|
1 ignored issue
–
show
|
|||
| 45 | */ |
||
| 46 | public function render() |
||
| 47 | { |
||
| 48 | return implode("\n", $this->cssRules->toArray()); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * initialize CSS rules |
||
| 53 | */ |
||
| 54 | private function init() |
||
| 83 | } |
||
| 84 | } |
||
| 85 | } |
||
| 86 |