| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 21 | public function process() |
|
| 43 | { |
||
| 44 | 21 | if (!($this->cssgenerator instanceof CSSGenerator)) { |
|
| 45 | 3 | throw new \Exception('CSSGenerator not set'); |
|
| 46 | } |
||
| 47 | |||
| 48 | 18 | $this->content = str_replace( |
|
| 49 | 18 | ['{{selector}}', '{{prefix}}'], |
|
| 50 | 18 | [$this->cssgenerator->getSelector(), $this->cssgenerator->getPrefix()], |
|
| 51 | 18 | $this->content |
|
| 52 | 18 | ); |
|
| 53 | 18 | $this->content = str_replace( |
|
| 54 | 18 | ['{{stylesheet}}', '{{content}}'], |
|
| 55 | 18 | [pathinfo($this->cssgenerator->getFilePath(), PATHINFO_BASENAME), rtrim($this->content)], |
|
| 56 | 18 | $this->template |
|
| 57 | 18 | ); |
|
| 58 | |||
| 59 | 18 | return $this->content; |
|
| 60 | } |
||
| 61 | |||
| 71 |