Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| Types | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Config; |
| 6 | |
| 7 | /** |
| 8 | * @psalm-type SessionOptions = array{ |
| 9 | * cookie_httponly: bool, |
| 10 | * cookie_samesite: string, |
| 11 | * cookie_secure: bool, |
| 12 | * cookie_lifetime: int, |
| 13 | * gc_maxlifetime: int, |
| 14 | * cache_expire: int, |
| 15 | * ...<string, mixed> |
| 16 | * } |
| 17 | * |
| 18 | * @psalm-type MimeMap = array<string, non-empty-list<string>> |
| 19 | * @psalm-type DbPlaceholders = array<non-empty-string, array<non-empty-string, string>> |
| 20 | * |
| 21 | * @psalm-type BuiltinConfig = array{ |
| 22 | * 'app.name': string, |
| 23 | * 'app.debug': bool, |
| 24 | * 'app.env': string, |
| 25 | * 'app.secret': ?string, |
| 26 | * 'app.timezone': string, |
| 27 | * |
| 28 | * 'auth.remember_lifetime': int, |
| 29 | * |
| 30 | * 'path.root': string, |
| 31 | * 'path.public': string, |
| 32 | * 'path.prefix': string, |
| 33 | * 'path.assets': string, |
| 34 | * 'path.cache': string, |
| 35 | * 'path.views': string, |
| 36 | * 'path.panel': string, |
| 37 | * 'path.api': ?string, |
| 38 | * |
| 39 | * 'panel.theme': null|string|list<string>, |
| 40 | * 'panel.logo': ?string, |
| 41 | * |
| 42 | * 'error.enabled': bool, |
| 43 | * 'error.renderer': null|class-string<\Celemas\Core\Error\Renderer>|\Celemas\Core\Error\Renderer, |
| 44 | * 'error.trusted': list<class-string>, |
| 45 | * 'error.views': null|string|list<string>, |
| 46 | * 'error.whoops': bool, |
| 47 | * |
| 48 | * 'icons.local.paths': string|list<string>, |
| 49 | * 'icons.iconify.base_url': string, |
| 50 | * 'icons.iconify.timeout': int, |
| 51 | * 'icons.iconify.user_agent': string, |
| 52 | * |
| 53 | * 'db.dsn': ?string, |
| 54 | * 'db.sql': string|list<string>, |
| 55 | * 'db.migrations': string|list<string>, |
| 56 | * 'db.placeholders': DbPlaceholders, |
| 57 | * 'db.print': bool, |
| 58 | * 'db.options': array<string, mixed>, |
| 59 | * |
| 60 | * 'session.enabled': bool, |
| 61 | * 'session.options': SessionOptions, |
| 62 | * 'session.handler': ?\SessionHandlerInterface, |
| 63 | * |
| 64 | * 'media.fileserver': null|'apache'|'nginx', |
| 65 | * |
| 66 | * 'upload.mimetypes.file': MimeMap, |
| 67 | * 'upload.mimetypes.image': MimeMap, |
| 68 | * 'upload.mimetypes.video': MimeMap, |
| 69 | * 'upload.maxsize': int, |
| 70 | * |
| 71 | * 'uid.alphabet': non-empty-string, |
| 72 | * 'uid.length': positive-int, |
| 73 | * |
| 74 | * 'password.entropy': float|int, |
| 75 | * 'password.algorithm': int|string|null |
| 76 | * } |
| 77 | * |
| 78 | * @psalm-type BuiltinConfigInput = array{ |
| 79 | * 'app.name'?: string, |
| 80 | * 'app.debug'?: bool, |
| 81 | * 'app.env'?: string, |
| 82 | * 'app.secret'?: null|string, |
| 83 | * 'app.timezone'?: string, |
| 84 | * 'auth.remember_lifetime'?: int, |
| 85 | * 'path.root'?: string, |
| 86 | * 'path.public'?: string, |
| 87 | * 'path.prefix'?: string, |
| 88 | * 'path.assets'?: string, |
| 89 | * 'path.cache'?: string, |
| 90 | * 'path.views'?: string, |
| 91 | * 'path.panel'?: string, |
| 92 | * 'path.api'?: null|string, |
| 93 | * 'panel.theme'?: null|string|list<string>, |
| 94 | * 'panel.logo'?: null|string, |
| 95 | * 'error.enabled'?: bool, |
| 96 | * 'error.renderer'?: mixed, |
| 97 | * 'error.trusted'?: list<class-string>, |
| 98 | * 'error.views'?: null|string|list<string>, |
| 99 | * 'error.whoops'?: bool, |
| 100 | * 'icons.local.paths'?: string|list<string>, |
| 101 | * 'icons.iconify.base_url'?: string, |
| 102 | * 'icons.iconify.timeout'?: int, |
| 103 | * 'icons.iconify.user_agent'?: string, |
| 104 | * 'db.dsn'?: null|string, |
| 105 | * 'db.sql'?: string|list<string>, |
| 106 | * 'db.migrations'?: string|list<string>, |
| 107 | * 'db.placeholders'?: DbPlaceholders, |
| 108 | * 'db.print'?: bool, |
| 109 | * 'db.options'?: array<string, mixed>, |
| 110 | * 'session.enabled'?: bool, |
| 111 | * 'session.options'?: array<string, mixed>, |
| 112 | * 'session.handler'?: ?\SessionHandlerInterface, |
| 113 | * 'media.fileserver'?: null|'apache'|'nginx', |
| 114 | * 'upload.mimetypes.file'?: MimeMap, |
| 115 | * 'upload.mimetypes.image'?: MimeMap, |
| 116 | * 'upload.mimetypes.video'?: MimeMap, |
| 117 | * 'upload.maxsize'?: int, |
| 118 | * 'uid.alphabet'?: non-empty-string, |
| 119 | * 'uid.length'?: positive-int, |
| 120 | * 'password.entropy'?: float|int, |
| 121 | * 'password.algorithm'?: int|string|null |
| 122 | * } |
| 123 | */ |
| 124 | final class Types {} |