- Issue created by @taraskorpach
- @taraskorpach opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:37pm 11 August 2023
We can simplify how we retrieve the state value. Instead of using $payment->getState()->getValue()['value']
, why not use $payment->getState()->getId()
?
For clarification, the getState method returns an object that implements the StateItemInterface. This interface is, in turn, implemented by the StateItem class, which possesses the getId method. This method essentially achieves what the current module does but in a more straightforward manner. I hope this clarifies things.
Needs review
1.0
Code