| Conditions | 6 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 19 | public static function makeFactory($line) |
||
| 20 | { |
||
| 21 | $words = explode(' ', $line); |
||
| 22 | $firstWord = $words[0]; |
||
| 23 | |||
| 24 | switch ($firstWord) { |
||
| 25 | case Sections::SECTION_GLOBAL: |
||
| 26 | return new GlobalSection(); |
||
| 27 | case Sections::SECTION_DEFAULTS: |
||
| 28 | return new DefaultsSection(); |
||
| 29 | case Sections::SECTION_FRONTEND: |
||
| 30 | return new FrontendSection($line); |
||
| 31 | case Sections::SECTION_BACKEND: |
||
| 32 | return new BackendSection($line); |
||
| 33 | case Sections::SECTION_LISTEN: |
||
| 34 | return new ListenSection($line); |
||
| 35 | } |
||
| 36 | |||
| 37 | return null; |
||
| 38 | } |
||
| 39 | |||
| 41 |