File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -111,26 +111,9 @@ protected static function getContainer(): ContainerInterface
111
111
protected static function createKernel (array $ options = []): KernelInterface
112
112
{
113
113
static ::$ class ??= static ::getKernelClass ();
114
-
115
- if (isset ($ options ['environment ' ])) {
116
- $ env = $ options ['environment ' ];
117
- } elseif (isset ($ _ENV ['APP_ENV ' ])) {
118
- $ env = $ _ENV ['APP_ENV ' ];
119
- } elseif (isset ($ _SERVER ['APP_ENV ' ])) {
120
- $ env = $ _SERVER ['APP_ENV ' ];
121
- } else {
122
- $ env = 'test ' ;
123
- }
124
-
125
- if (isset ($ options ['debug ' ])) {
126
- $ debug = $ options ['debug ' ];
127
- } elseif (isset ($ _ENV ['APP_DEBUG ' ])) {
128
- $ debug = $ _ENV ['APP_DEBUG ' ];
129
- } elseif (isset ($ _SERVER ['APP_DEBUG ' ])) {
130
- $ debug = $ _SERVER ['APP_DEBUG ' ];
131
- } else {
132
- $ debug = true ;
133
- }
114
+
115
+ $ env = $ options ['environment ' ] ?? $ _ENV ['APP_ENV ' ] ?? $ _SERVER ['APP_ENV ' ] ?? 'test ' ;
116
+ $ debug = $ options ['debug ' ] ?? $ _ENV ['APP_DEBUG ' ] ?? $ _SERVER ['APP_DEBUG ' ] ?? true ;
134
117
135
118
return new static::$ class ($ env , $ debug );
136
119
}
You can’t perform that action at this time.
0 commit comments