Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e7a03b

Browse files
committed
minor #24622 declare type AcceptHeaderItem for array_map (DQNEO)
This PR was merged into the 2.7 branch. Discussion ---------- declare type AcceptHeaderItem for array_map | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | In `array_filter` , argument type is declared. https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/HttpFoundation/AcceptHeader.php#L133 So It's natural to do so in `array_map` too. Commits ------- ab8f5be declare argument type
2 parents 0cd8759 + ab8f5be commit 5e7a03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/AcceptHeader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function first()
153153
private function sort()
154154
{
155155
if (!$this->sorted) {
156-
uasort($this->items, function ($a, $b) {
156+
uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) {
157157
$qA = $a->getQuality();
158158
$qB = $b->getQuality();
159159

0 commit comments

Comments
 (0)