1 | <?php namespace Neomerx\JsonApi\Http\Headers; |
||
25 | class AcceptMediaType extends MediaType implements AcceptMediaTypeInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var float [0..1] |
||
29 | */ |
||
30 | private $quality; |
||
31 | |||
32 | /** |
||
33 | * @var array<string,string>|null |
||
34 | */ |
||
35 | private $extensions; |
||
36 | |||
37 | /** |
||
38 | * @var int |
||
39 | */ |
||
40 | private $position; |
||
41 | |||
42 | /** |
||
43 | * @param int $position |
||
44 | * @param string $type |
||
45 | * @param string $subType |
||
46 | * @param array<string,string>|null $parameters |
||
47 | * @param float $quality |
||
48 | * @param array<string,string>|null $extensions |
||
49 | */ |
||
50 | 54 | public function __construct($position, $type, $subType, $parameters = null, $quality = 1.0, $extensions = null) |
|
72 | |||
73 | /** |
||
74 | * @inheritdoc |
||
75 | */ |
||
76 | 3 | public function getPosition() |
|
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | 34 | public function getQuality() |
|
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | */ |
||
92 | 2 | public function getExtensions() |
|
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | * |
||
100 | * @return AcceptMediaTypeInterface |
||
1 ignored issue
–
show
|
|||
101 | */ |
||
102 | 51 | public static function parse($position, $mediaType) |
|
115 | |||
116 | /** |
||
117 | * @param array $fields |
||
118 | * |
||
119 | * @return array |
||
1 ignored issue
–
show
|
|||
120 | */ |
||
121 | 49 | private static function parseQualityAndParameters(array $fields) |
|
156 | } |
||
157 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.