| Total Complexity | 6 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 83.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | trait HasSupportedTrait |
||
| 12 | { |
||
| 13 | protected $supported; |
||
| 14 | |||
| 15 | 1 | public function getSupported() |
|
| 16 | { |
||
| 17 | 1 | if (!$this->supported) { |
|
| 18 | 1 | $iterator = new DirectoryIterator($this->getDataFolder()); |
|
|
|
|||
| 19 | 1 | foreach ($iterator as $file) { |
|
| 20 | 1 | if ($file->isFile()) { |
|
| 21 | 1 | $fileName = $file->getFilename(); |
|
| 22 | 1 | if (substr($fileName, 0, 1) != '_') { |
|
| 23 | 1 | $name = str_replace('.php', '', $fileName); |
|
| 24 | 1 | $this->supported[] = $name; |
|
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 | 1 | return $this->supported; |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param $name |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function isSupported($name) |
||
| 39 | } |
||
| 40 | } |
||
| 41 |