Problem/Motivation
The docs for WorkflowTypeInterface::getTransitionsForState() say:
* @return array
* The transition IDs for a state for the provided direction.
But what is actually returned is an array of objects, same as getTransitions().
The docs should also say the array is keyed by transition ID (unlike the docs for getTransitions()).
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3346099
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
rohan-sinha commentedmake a little change to the doc comment
Comment #5
joachim commented> * The array is keyed by transition IDs for a state for the provided direction.
This says what the keys are, but doesn't say what the values are.
Also, the sentence doesn't read right. @return docs typically start with a noun phrase. This should say something like:
> An array of the transition objects for the state in the given direction, keyed by transition ID.
Comment #6
rohan-sinha commentedComment #7
smustgrave commentedDo think that reads better.
Comment #8
smustgrave commentedComment #9
dwwAdded some MR review points that should be fixed before this is committed.
Thanks!
-Derek
Comment #10
dwwPushed a commit to fix my concerns. Also rebased to 10.1.x and wrapped the
@returndocs to 80 chars. Needs re-review.Comment #11
smustgrave commentedEven better! Thanks for taking a look @dww
Comment #12
dwwThanks for re-review! Also, tagging for bugsmash. 😉
Comment #16
larowlanCommitted to 10.1.x and backported to 10.0.x and 9.5.x
Thanks