| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class CustomModule extends AbstractCustomExtension |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $camelCaseMachineName; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | */ |
||
| 28 | 9 | public function __construct(string $rootPath, string $machineName) |
|
| 29 | { |
||
| 30 | 9 | parent::__construct($rootPath, $machineName); |
|
| 31 | |||
| 32 | // The same camelize function is used in the Drupal kernel. |
||
| 33 | 9 | $this->camelCaseMachineName = ContainerBuilder::camelize($machineName); |
|
| 34 | 9 | } |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 1 | public function getCamelCaseMachineName(): string |
|
| 40 | { |
||
| 41 | 1 | return $this->camelCaseMachineName; |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | 3 | public function serialize(): ?string |
|
| 48 | { |
||
| 49 | 3 | return \serialize(array( |
|
| 50 | 3 | $this->rootPath, |
|
| 51 | 3 | $this->machineName, |
|
| 52 | 3 | $this->camelCaseMachineName, |
|
| 53 | )); |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | 3 | public function unserialize($serialized): void |
|
| 62 | 3 | } |
|
| 63 | } |
||
| 64 |