Skip to content

Commit

Permalink
Merge pull request #93 from laminas/4.4.x-merge-up-into-4.5.x_81Sfg3MR
Browse files Browse the repository at this point in the history
Merge release 4.4.2 into 4.5.x
  • Loading branch information
Ocramius authored Jul 9, 2021
2 parents e29ca9d + 54251ab commit 17fd2af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Generator/MethodGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use function strtolower;
use function substr;
use function trim;
use function usort;
use function uasort;

class MethodGenerator extends AbstractMemberGenerator
{
Expand Down Expand Up @@ -315,7 +315,7 @@ public function setReturnsReference($returnsReference)
*/
private function sortParameters(): void
{
usort($this->parameters, static function (ParameterGenerator $item1, ParameterGenerator $item2) {
uasort($this->parameters, static function (ParameterGenerator $item1, ParameterGenerator $item2) {
return $item1->getPosition() <=> $item2->getPosition();
});
}
Expand Down
2 changes: 1 addition & 1 deletion test/Generator/MethodGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function testSetMethodParameters()
return $parameter->getName();
}, $params);

self::assertEquals(['foo', 'baz', 'bar'], $sorting);
self::assertEquals(['foo' => 'foo', 'baz' => 'baz', 'bar' => 'bar'], $sorting);
}

public function testMethodBodyGetterAndSetter()
Expand Down

0 comments on commit 17fd2af

Please sign in to comment.