Skip to content

Update ext/imap parameter names #6299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Update ext/imap parameter names #6299

wants to merge 3 commits into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Oct 8, 2020

This one was a big struggle :/

/** @param resource $stream_id */
function imap_listscan($stream_id, string $ref, string $pattern, string $content): array|false {}
/** @param resource $imap */
function imap_listscan($imap, string $reference, string $pattern, string $content): array|false {}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I managed to track the $ref parameter all the way down to https://github.com/uw-imap/imap/blob/22f316e36dc00e445408f7a47750b7fa9c3ce369/src/c-client/imap4r1.c#L518, and I still have no clue what it does. The docs say:

ref should normally be just the server specification as described in imap_open()

So maybe it is the "server part" of $mailbox? I have no idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to be another IMAP mailbox, but that doesn't make a lot of sense as we are already passing a mailbox.. I have no idea either.

/** @param resource $stream_id */
function imap_setflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}
/** @param resource $imap */
function imap_setflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dilemma: This has an integer flags argument, but also a $flag argument ... I kept the $options name to avoid confusion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like a big problem, so I agree with the approach taken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants