@@ -164,7 +164,7 @@ public function __construct(
164
164
) {
165
165
}
166
166
167
- public function getEntity (): PhpFile
167
+ public function getEntity (): ? PhpFile
168
168
{
169
169
$ this ->checkEntityExists ();
170
170
@@ -231,7 +231,7 @@ public function addMorph(Snippet $snippet, string $table, bool $skipRefSchema =
231
231
. $ snippet ->definitionToString ('options ' , $ options )
232
232
);
233
233
234
- $ this ->class ->addMethod ('morph ' )
234
+ $ this ->class ? ->addMethod('morph ' )
235
235
->addComment ("Define the table structure \n" )
236
236
->addComment ('@return void ' )
237
237
->addComment ('@throws Exception ' )
@@ -254,7 +254,7 @@ public function addUp(string $table, $exportData = null, bool $shouldExportDataF
254
254
$ body = "\$this->batchInsert(' $ table', [ {$ quoteWrappedColumns }]); " ;
255
255
}
256
256
257
- $ this ->class ->addMethod ('up ' )
257
+ $ this ->class ? ->addMethod('up ' )
258
258
->addComment ("Run the migrations \n" )
259
259
->addComment ('@return void ' )
260
260
->setReturnType ('void ' )
@@ -272,7 +272,7 @@ public function addDown(string $table, $exportData = null, bool $shouldExportDat
272
272
$ body = "\$this->batchDelete(' $ table'); " ;
273
273
}
274
274
275
- $ this ->class ->addMethod ('down ' )
275
+ $ this ->class ? ->addMethod('down ' )
276
276
->addComment ("Reverse the migrations \n" )
277
277
->addComment ('@return void ' )
278
278
->setReturnType ('void ' )
@@ -292,7 +292,7 @@ public function addAfterCreateTable(string $table, $exportData = null): self
292
292
}
293
293
$ body = "\$this->batchInsert(' $ table', [ {$ quoteWrappedColumns }]); " ;
294
294
295
- $ this ->class ->addMethod ('afterCreateTable ' )
295
+ $ this ->class ? ->addMethod('afterCreateTable ' )
296
296
->addComment ("This method is called after the table was created \n" )
297
297
->addComment ('@return void ' )
298
298
->setReturnType ('void ' )
0 commit comments