Improve command signature logic
This commit is contained in:
		@@ -53,13 +53,13 @@ class Command
 | 
				
			|||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                $type = $parameter->getType();
 | 
					                $type = $parameter->getType();
 | 
				
			||||||
                if ($type instanceof ReflectionNamedType && $type->isBuiltin()) {
 | 
					                if ($type instanceof ReflectionNamedType && $type->isBuiltin()) {
 | 
				
			||||||
                    $type = $type->getName();
 | 
					                    $type = ($type->allowsNull() ? "?" : "") . $type->getName();
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    $type = null;
 | 
					                    $type = null;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            if ($parameter->isOptional()) $type = "?{$type}";
 | 
					            if ($parameter->isDefaultValueAvailable()) $type = "{$type}=".\json_encode($parameter->getDefaultValue(),\JSON_UNESCAPED_SLASHES);
 | 
				
			||||||
            if ($type !== null) $args[$name] = $type;
 | 
					            if ($type !== null) $args[$name] = $type;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user