File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ class DbModel extends BaseObject
92
92
* Here, you can set your own default description for the scenario.
93
93
* AcceptedInputs: {scenarioName}, {scenarioConst}, {modelName}.
94
94
*/
95
- public string $ scenarioDefaultDescription = " Scenario {scenarioName} " ;
95
+ public string $ scenarioDefaultDescription = "Scenario {scenarioName} " ;
96
96
97
97
public function getTableAlias ():string
98
98
{
@@ -234,19 +234,19 @@ private function getScenariosByOpenapiSchema(): array
234
234
235
235
foreach ($ scenarios as $ key => $ scenario ) {
236
236
$ scenarios [$ key ]['const ' ] = 'SCENARIO_ ' . strtoupper (implode ('_ ' , preg_split ('/(?=[A-Z])/ ' , $ scenario ['name ' ])));
237
+ $ description = !empty ($ scenario ['description ' ]) ?
238
+ $ scenario ['description ' ] : $ this ->scenarioDefaultDescription ;
237
239
$ scenarios [$ key ]['description ' ] = FormatHelper::getFormattedDescription (
238
- !empty ($ scenario ['description ' ]) ?
239
- $ scenario ['description ' ]
240
- : str_replace ([
240
+ str_replace ([
241
241
'{scenarioName} ' ,
242
242
'{scenarioConst} ' ,
243
243
'{modelName} ' ,
244
244
], [
245
245
$ scenario ['name ' ],
246
246
$ scenarios [$ key ]['const ' ],
247
247
$ this ->name ,
248
- ], $ this -> scenarioDefaultDescription ),
249
- 5 );
248
+ ], $ description ),
249
+ 5 );
250
250
}
251
251
252
252
return $ scenarios ;
You can’t perform that action at this time.
0 commit comments