| Conditions | 2 |
| Paths | 2 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function invoke(FunctionModelInterface $function): string |
||
| 26 | { |
||
| 27 | $this->begin(); |
||
| 28 | |||
| 29 | $parent = $function->getParentNode(); |
||
| 30 | /** @var PhpFileModelInterface $phpFile */ |
||
| 31 | $phpFile = $this->getRoot($parent); |
||
| 32 | |||
| 33 | if ($phpFile === $parent) { |
||
| 34 | $this->doc([sprintf('Covers global method "%s"', $function->getName())]); |
||
| 35 | } else { |
||
| 36 | /** @var NameInterface $parent */ |
||
| 37 | $namespace = $phpFile->getFullnameFor($parent->getName()); |
||
| 38 | $this->doc([ |
||
| 39 | sprintf( |
||
| 40 | '@covers \\%s::%s', |
||
| 41 | $namespace, |
||
| 42 | $function->getName() |
||
| 43 | ) |
||
| 44 | ]); |
||
| 45 | } |
||
| 46 | $this->add( |
||
| 47 | sprintf('public function test%s()', ucfirst($function->getName())) |
||
| 48 | )->add('{')->add('// Some content')->add('}')->add(); |
||
| 49 | |||
| 50 | return $this->get(); |
||
| 51 | } |
||
| 53 |