lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

Add return types to jsonSerialize to suppress deprecation message. #507

Closed mrunkel closed 1 year ago

mrunkel commented 1 year ago

Fixes issue #506.

As a side note, my IDE complained about two things while committing.

In src/Issue/IssueField.php

Error:(5, 5) 'AllowDynamicProperties' is available starting with 8.2 PHP version. The project lists 8.0 as the minimum PHP version

and

Warning:(125, 13) Statement has empty body I wasn't entirely clear on what should be happening, but inverting the logic of the first if expression and anding the second expression should result in the same thing?

        if ($this->assignee->isWantUnassigned() !== true && $this->assignee->isEmpty()) {
            unset($vars['assignee']);
        }

But that goes against what the comment says "do nothing" so I'm not sure what the intent is here.

If you want, I can open new issues for these two items.

mrunkel commented 1 year ago

I fixed the style issue, and rewrote the if block in IssueField.

It looks like Scrutinizer is broken.