Closed technodelight closed 8 years ago
Thank you for this request! :) I think merging this is not a easy decision. E.g. in my use cases, no JIRA is ever used. Hence the getJiraId method does not return anything and the method-docs will mislead developers. In addition to this, you don't provide return types for the methods. Do you have any other pro-arguments on this?
Hi @nepda !
Well, hahah, sorry about that. It looks like I somehow left rubbish methods which doesn't even required nor makes sense. I declared the return values as mixed, however it would be string|null
in most cases.
Let me fix that and let's continue the discussion.
Hi there - I've added the field doc blocks as per current documentation. I guess this looks a lot better now.
Regarding not-so-commonly used fields: as this is a general library for the YouTrack REST API, I think adding the method declarations (with an explanation for each field) will definitely avoid confusion.
Also, without this change it's impossible to mock the Issue
object in a phpspec
test. This is due to a limitation in phpspec/prophecy
, which only allows you to use magic methods when they are defined as @method
declarations.
There were some fields which I wasn't able to check properly, like the permittedUserGroup
or the tag
. I would appreciate any further advise on this :)
I hope this explanation convinces you somewhat better :) Cheers
I've discovered tags don't work at all currently :( Yes, this looks much better. I'll just merge this and wait for further feedback of the community.
Nice one, thanks! Happy to resolve if something comes up.
You're welcome, thank you too! :)
This list is not full, but your IDE will still benefit from it. It will also help you
phpspec
-ing when using this class.