Conditions | 7 |
Paths | 33 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function configure(AbstractSeoGenerator $generator) |
||
20 | { |
||
21 | if (!($generator instanceof BasicSeoGenerator)) { |
||
22 | throw new InvalidSeoGeneratorException(__CLASS__, BasicSeoGenerator::class, get_class($generator)); |
||
23 | } |
||
24 | if (null !== $title = $this->getConfig('title')) { |
||
25 | $generator->setTitle($title); |
||
26 | } |
||
27 | if (null !== $description = $this->getConfig('description')) { |
||
28 | $generator->setDescription($description); |
||
29 | } |
||
30 | if (null !== $keywords = $this->getConfig('keywords')) { |
||
31 | $generator->setKeywords($keywords); |
||
32 | } |
||
33 | if (null !== $robots = $this->getConfig('robots')) { |
||
34 | $generator->setRobots($robots['index'], $robots['follow']); |
||
35 | } |
||
36 | if (null !== $canonical = $this->getConfig('canonical')) { |
||
37 | $generator->setCanonical($canonical); |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 |