Total Lines | 71 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | interface IConfig |
||
|
|||
14 | { |
||
15 | const CONFIG_REL_PATH = '../config/'; |
||
16 | const CONFIG_ERROR_MISSING = 'Missing config env for '; |
||
17 | const ENV_DEV = 'dev'; |
||
18 | const ENV_TEST = 'test'; |
||
19 | const ENV_INT = 'int'; |
||
20 | const ENV_PROD = 'prod'; |
||
21 | const ENV_CLI = 'cli'; |
||
22 | const _MIDDLEWARES = 'middlewares'; |
||
23 | const _LOGGER = 'logger'; |
||
24 | const _NAME = 'name'; |
||
25 | const _PATH = 'path'; |
||
26 | const _ROUTES = 'routes'; |
||
27 | const _SERVICES = 'services'; |
||
28 | const _ACCOUNTS = 'accounts'; |
||
29 | const _DB = 'db'; |
||
30 | |||
31 | /** |
||
32 | * set config environment |
||
33 | * |
||
34 | * @param string $env |
||
35 | * @return Config |
||
36 | */ |
||
37 | public function setEnv(string $env = self::ENV_DEV): Config; |
||
38 | |||
39 | /** |
||
40 | * returns env |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getEnv(): string; |
||
45 | |||
46 | /** |
||
47 | * set config path |
||
48 | * |
||
49 | * @param string $path |
||
50 | * @return Config |
||
51 | */ |
||
52 | public function setPath(string $path): Config; |
||
53 | |||
54 | /** |
||
55 | * returns config path |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getPath(): string; |
||
60 | |||
61 | /** |
||
62 | * return config array for a main entry key |
||
63 | * |
||
64 | * @param string $key |
||
65 | * @return array |
||
66 | */ |
||
67 | public function getSettings(string $key = ''): array; |
||
68 | |||
69 | /** |
||
70 | * return true if config main entry for a key exists |
||
71 | * |
||
72 | * @param string $key |
||
73 | * @return boolean |
||
74 | */ |
||
75 | public function hasEntry(string $key): bool; |
||
76 | |||
77 | /** |
||
78 | * load config for a given env |
||
79 | * |
||
80 | * @return Config |
||
81 | */ |
||
82 | public function load(): Config; |
||
83 | } |
||
84 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.