| Total Complexity | 4 | 
| Total Lines | 50 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1);  | 
            ||
| 8 | class DmsTable implements DmsTableInterface  | 
            ||
| 9 | { | 
            ||
| 10 | /**  | 
            ||
| 11 | * @var string  | 
            ||
| 12 | */  | 
            ||
| 13 | protected $name;  | 
            ||
| 14 | |||
| 15 | /**  | 
            ||
| 16 | * @var DmsColumnInterface[]  | 
            ||
| 17 | */  | 
            ||
| 18 | protected $dmsColumns = [];  | 
            ||
| 19 | |||
| 20 | /**  | 
            ||
| 21 | * @param string $name  | 
            ||
| 22 | * @param DmsColumnInterface[] $dmsColumns  | 
            ||
| 23 | */  | 
            ||
| 24 | public function __construct(string $name, array $dmsColumns)  | 
            ||
| 25 |     { | 
            ||
| 26 | $this->name = $name;  | 
            ||
| 27 | $this->dmsColumns = $dmsColumns;  | 
            ||
| 28 | }  | 
            ||
| 29 | |||
| 30 | /**  | 
            ||
| 31 | * @return string  | 
            ||
| 32 | */  | 
            ||
| 33 | public function getName(): string  | 
            ||
| 34 |     { | 
            ||
| 35 | return $this->name;  | 
            ||
| 36 | }  | 
            ||
| 37 | |||
| 38 | /**  | 
            ||
| 39 | * @return string  | 
            ||
| 40 | */  | 
            ||
| 41 | public function getPhpName(): string  | 
            ||
| 42 |     { | 
            ||
| 43 | return \ucfirst(\preg_replace_callback(  | 
            ||
| 44 |             '/[^a-z0-9]+(?<name>\w{1})/i', | 
            ||
| 45 |             function ($matches) { | 
            ||
| 46 | return \strtoupper($matches['name']);  | 
            ||
| 47 | },  | 
            ||
| 48 | $this->getName()  | 
            ||
| 49 | ));  | 
            ||
| 50 | }  | 
            ||
| 51 | |||
| 52 | /**  | 
            ||
| 53 | * @return DmsColumnInterface[]  | 
            ||
| 54 | */  | 
            ||
| 55 | public function getDmsColumns(): array  | 
            ||
| 58 | }  | 
            ||
| 59 | }  | 
            ||
| 60 |