Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
33.33% |
4 / 12 |
CRAP | |
40.00% |
6 / 15 |
| DefinedTargetClass | |
0.00% |
0 / 1 |
|
33.33% |
4 / 12 |
43.10 | |
40.00% |
6 / 15 |
| __construct(\ReflectionClass $rfc) | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| factory($name) | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| getName() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| isAbstract() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| isFinal() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| getMethods() | |
0.00% |
0 / 1 |
1.12 | |
50.00% |
1 / 2 |
|||
| anonymous function ($interface) use ($class) | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getInterfaces() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| __toString() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| getNamespaceName() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| inNamespace() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| getShortName() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace Mockery\Generator; | |
| class DefinedTargetClass | |
| { | |
| private $rfc; | |
| public function __construct(\ReflectionClass $rfc) | |
| { | |
| $this->rfc = $rfc; | |
| } | |
| public static function factory($name) | |
| { | |
| return new self(new \ReflectionClass($name)); | |
| } | |
| public function getName() | |
| { | |
| return $this->rfc->getName(); | |
| } | |
| public function isAbstract() | |
| { | |
| return $this->rfc->isAbstract(); | |
| } | |
| public function isFinal() | |
| { | |
| return $this->rfc->isFinal(); | |
| } | |
| public function getMethods() | |
| { | |
| return array_map(function ($method) { | |
| return new Method($method); | |
| }, $this->rfc->getMethods()); | |
| } | |
| public function getInterfaces() | |
| { | |
| $class = __CLASS__; | |
| return array_map(function ($interface) use ($class) { | |
| return new $class($interface); | |
| }, $this->rfc->getInterfaces()); | |
| } | |
| public function __toString() | |
| { | |
| return $this->getName(); | |
| } | |
| public function getNamespaceName() | |
| { | |
| return $this->rfc->getNamespaceName(); | |
| } | |
| public function inNamespace() | |
| { | |
| return $this->rfc->inNamespace(); | |
| } | |
| public function getShortName() | |
| { | |
| return $this->rfc->getShortName(); | |
| } | |
| } |