| Total Complexity | 9 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class Key |
||
| 8 | { |
||
| 9 | const KEYS_IN_FILES = 'files'; |
||
| 10 | const KEYS_IN_VALUES = 'values'; |
||
| 11 | |||
| 12 | private $type; |
||
| 13 | |||
| 14 | public function __construct($type = null) { |
||
| 15 | $this->type = empty($type) ? self::KEYS_IN_FILES : $type; |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Get content of key file |
||
| 20 | * @param string $fname |
||
| 21 | * @param string $type |
||
| 22 | * @return string |
||
| 23 | * @throws Exception\Runtime |
||
| 24 | */ |
||
| 25 | public function get($fname, $type) |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Check if exist key file |
||
| 47 | * |
||
| 48 | * @param string $fname |
||
| 49 | * @throws Exception\Runtime |
||
| 50 | */ |
||
| 51 | protected function check_exists($fname) |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Load key file |
||
| 61 | * |
||
| 62 | * @param string $fname |
||
| 63 | * @return string |
||
| 64 | * @throws Exception\Runtime |
||
| 65 | */ |
||
| 66 | protected function load($fname) |
||
| 77 |