|
@@ -39,10 +39,10 @@ discard block |
|
|
block discarded – undo |
|
39
|
39
|
} |
|
40
|
40
|
|
|
41
|
41
|
$acceptTypes = self::mimeTypesFromAcceptHeaders($acceptTypesText); |
|
42
|
|
- $exactMatchs = array_uintersect($acceptTypes, $exactContentTypes, function(MediaType $acceptType, $exactType){ |
|
|
42
|
+ $exactMatchs = array_uintersect($acceptTypes, $exactContentTypes, function(MediaType $acceptType, $exactType) { |
|
43
|
43
|
return strcasecmp($acceptType->getMimeType(), $exactType) && 0 !== $acceptType->getQualityValue(); |
|
44
|
44
|
}); |
|
45
|
|
- if(count($exactMatchs)!== 0){ |
|
|
45
|
+ if(count($exactMatchs)!== 0) { |
|
46
|
46
|
return $exactMatchs[0]->getMimeType(); |
|
47
|
47
|
} |
|
48
|
48
|
|
|
@@ -57,7 +57,7 @@ discard block |
|
|
block discarded – undo |
|
57
|
57
|
|
|
58
|
58
|
return $aQual <=> $bQual; |
|
59
|
59
|
}); |
|
60
|
|
- if(0 <= $acceptTypes[0]->getMatchingRating($inexactContentType)){ |
|
|
60
|
+ if(0 <= $acceptTypes[0]->getMatchingRating($inexactContentType)) { |
|
61
|
61
|
$selectedContentType = $inexactContentType; |
|
62
|
62
|
$selectedQualityValue = $acceptTypes[0]->getQualityValue(); |
|
63
|
63
|
} |
Please login to merge, or discard this patch.