Conversation
Collaborator
Author
|
(The addition of a seemingly-unused |
ef512fb to
6d60bf7
Compare
I'm trying to figure out why some functions claim to take a `resource` when they actually take a `FTP\Connection` or a `GdImage` -- this CLI command helps with debugging.
### Example:
```php
$ php ./generator/safe.php function-info ftp_alloc
Params:
ftp
ParameterType: FTP\Connection
SignatureType:
DocBlockType: resource
size
ParameterType: int
SignatureType: int
DocBlockType: int
response
ParameterType: string
SignatureType: ?string
DocBlockType: string|null
/**
* Sends an ALLO command to the remote FTP server to
* allocate space for a file to be uploaded.
*
* @param resource $ftp An FTP\Connection instance.
* @param int $size The number of bytes to allocate.
* @param string|null $response A textual representation of the servers response will be returned by
* reference in response if a variable is provided.
* @throws FtpException
*
*/
function ftp_alloc($ftp, int $size, ?string &$response = null): void
{
error_clear_last();
$safeResult = \ftp_alloc($ftp, $size, $response);
if ($safeResult === false) {
throw FtpException::createFromPhpError();
}
}
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm trying to figure out why some functions claim to take a
resourcewhen they actually take aFTP\Connectionor aGdImage-- this CLI command helps with debugging.Example: