@@ -212,8 +212,6 @@ protected function getOptions()
212
212
213
213
protected function generateDocs ($ loadModels , $ ignore = '' )
214
214
{
215
-
216
-
217
215
$ output = "<?php
218
216
219
217
// @formatter:off
@@ -313,7 +311,6 @@ protected function loadModels()
313
311
314
312
$ dirs = glob ($ dir , GLOB_ONLYDIR );
315
313
foreach ($ dirs as $ dir ) {
316
-
317
314
if (!is_dir ($ dir )) {
318
315
$ this ->error ("Cannot locate directory '{' $ dir}' " );
319
316
continue ;
@@ -757,7 +754,6 @@ protected function setMethod($name, $type = '', $arguments = [])
757
754
*/
758
755
protected function createPhpDocs ($ class )
759
756
{
760
-
761
757
$ reflection = new ReflectionClass ($ class );
762
758
$ namespace = $ reflection ->getNamespaceName ();
763
759
$ classname = $ reflection ->getShortName ();
@@ -1019,7 +1015,7 @@ protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?
1019
1015
1020
1016
$ type = implode ('| ' , $ types );
1021
1017
1022
- if ($ returnType ->allowsNull ()){
1018
+ if ($ returnType ->allowsNull ()) {
1023
1019
$ type .='|null ' ;
1024
1020
}
1025
1021
@@ -1050,7 +1046,7 @@ protected function getSoftDeleteMethods($model)
1050
1046
*/
1051
1047
protected function getFactoryMethods ($ model )
1052
1048
{
1053
- if (!class_exists (Factory::class)) {
1049
+ if (!class_exists (Factory::class)) {
1054
1050
return ;
1055
1051
}
1056
1052
@@ -1128,7 +1124,7 @@ protected function checkForCustomLaravelCasts(string $type): ?string
1128
1124
$ reflectionType = $ this ->getReturnTypeFromDocBlock ($ methodReflection );
1129
1125
}
1130
1126
1131
- if ($ reflectionType === 'static ' || $ reflectionType === '$this ' ) {
1127
+ if ($ reflectionType === 'static ' || $ reflectionType === '$this ' ) {
1132
1128
$ reflectionType = $ type ;
1133
1129
}
1134
1130
@@ -1217,10 +1213,10 @@ protected function getParamType(\ReflectionMethod $method, \ReflectionParameter
1217
1213
1218
1214
$ type = implode ('| ' , $ types );
1219
1215
1220
- if ($ paramType ->allowsNull ()){
1221
- if (count ($ types )==1 ){
1216
+ if ($ paramType ->allowsNull ()) {
1217
+ if (count ($ types )==1 ) {
1222
1218
$ type = '? ' . $ type ;
1223
- }else {
1219
+ } else {
1224
1220
$ type .='|null ' ;
1225
1221
}
1226
1222
}
@@ -1293,12 +1289,12 @@ protected function getParamType(\ReflectionMethod $method, \ReflectionParameter
1293
1289
1294
1290
protected function extractReflectionTypes (ReflectionType $ reflection_type )
1295
1291
{
1296
- if ($ reflection_type instanceof ReflectionNamedType){
1292
+ if ($ reflection_type instanceof ReflectionNamedType) {
1297
1293
$ types [] = $ this ->getReflectionNamedType ($ reflection_type );
1298
- }else {
1294
+ } else {
1299
1295
$ types = [];
1300
- foreach ($ reflection_type ->getTypes () as $ named_type ){
1301
- if ($ named_type ->getName ()==='null ' ){
1296
+ foreach ($ reflection_type ->getTypes () as $ named_type ) {
1297
+ if ($ named_type ->getName ()==='null ' ) {
1302
1298
continue ;
1303
1299
}
1304
1300
0 commit comments