| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 1 | public static function getMetadata() |
|
| 16 | { |
||
| 17 | 1 | $fqcnParts = explode('\\', get_called_class()); |
|
| 18 | 1 | $name = Inflector::convertToSnakeCase(end($fqcnParts)); |
|
| 19 | 1 | $description = null; |
|
| 20 | |||
| 21 | 1 | if (defined('self::DESCRIPTION')) { |
|
| 22 | 1 | $description = self::DESCRIPTION; |
|
| 23 | 1 | } |
|
| 24 | |||
| 25 | 1 | return Metadata::create($name, $description); |
|
| 26 | } |
||
| 27 | } |
||
| 28 |