@@ -30,20 +30,20 @@ |
||
30 | 30 | array $exactContentTypes, |
31 | 31 | $inexactContentType |
32 | 32 | ): ?string { |
33 | - $selectedContentType = null; |
|
33 | + $selectedContentType = null; |
|
34 | 34 | |
35 | 35 | if (null === $acceptTypesText) { |
36 | 36 | throw new HttpHeaderFailure(Messages::unsupportedMediaType(), 415); |
37 | 37 | } |
38 | 38 | |
39 | 39 | $acceptTypes = self::mimeTypesFromAcceptHeaders($acceptTypesText); |
40 | - if(empty($acceptTypes)){ |
|
40 | + if (empty($acceptTypes)) { |
|
41 | 41 | return $inexactContentType; |
42 | 42 | } |
43 | - $exactMatchs = array_uintersect($acceptTypes, $exactContentTypes, function(MediaType $acceptType, $exactType){ |
|
43 | + $exactMatchs = array_uintersect($acceptTypes, $exactContentTypes, function (MediaType $acceptType, $exactType) { |
|
44 | 44 | return strcasecmp($acceptType->getMimeType(), $exactType) && 0 !== $acceptType->getQualityValue(); |
45 | 45 | }); |
46 | - if(count($exactMatchs)!== 0){ |
|
46 | + if (count($exactMatchs) !== 0) { |
|
47 | 47 | return $exactMatchs[0]->getMimeType(); |
48 | 48 | } |
49 | 49 |
@@ -37,13 +37,13 @@ |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | $acceptTypes = self::mimeTypesFromAcceptHeaders($acceptTypesText); |
40 | - if(empty($acceptTypes)){ |
|
40 | + if(empty($acceptTypes)) { |
|
41 | 41 | return $inexactContentType; |
42 | 42 | } |
43 | - $exactMatchs = array_uintersect($acceptTypes, $exactContentTypes, function(MediaType $acceptType, $exactType){ |
|
43 | + $exactMatchs = array_uintersect($acceptTypes, $exactContentTypes, function(MediaType $acceptType, $exactType) { |
|
44 | 44 | return strcasecmp($acceptType->getMimeType(), $exactType) && 0 !== $acceptType->getQualityValue(); |
45 | 45 | }); |
46 | - if(count($exactMatchs)!== 0){ |
|
46 | + if(count($exactMatchs)!== 0) { |
|
47 | 47 | return $exactMatchs[0]->getMimeType(); |
48 | 48 | } |
49 | 49 |