Skip to content

Commit

Permalink
Fix object model of AcceptHeader interface
Browse files Browse the repository at this point in the history
Fixes willdurand#89 - IDEs and PHPStan are happy with this implementation
  • Loading branch information
g105b committed Feb 15, 2022
1 parent d8a356a commit e3d8b4c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Negotiation/AbstractNegotiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ abstract class AbstractNegotiator
* @param string $header A string containing an `Accept|Accept-*` header.
* @param array $priorities A set of server priorities.
*
* @return AcceptHeader|null best matching type
* @return BaseAccept|null best matching type
*/
public function getBest($header, array $priorities, $strict = false)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Negotiation/Accept.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Negotiation\Exception\InvalidMediaType;

final class Accept extends BaseAccept implements AcceptHeader
final class Accept extends BaseAccept
{
private $basePart;

Expand Down
2 changes: 1 addition & 1 deletion src/Negotiation/AcceptCharset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace Negotiation;

final class AcceptCharset extends BaseAccept implements AcceptHeader
final class AcceptCharset extends BaseAccept
{
}
2 changes: 1 addition & 1 deletion src/Negotiation/AcceptEncoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace Negotiation;

final class AcceptEncoding extends BaseAccept implements AcceptHeader
final class AcceptEncoding extends BaseAccept
{
}
2 changes: 1 addition & 1 deletion src/Negotiation/AcceptLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Negotiation\Exception\InvalidLanguage;

final class AcceptLanguage extends BaseAccept implements AcceptHeader
final class AcceptLanguage extends BaseAccept
{
private $language;
private $script;
Expand Down
2 changes: 1 addition & 1 deletion src/Negotiation/BaseAccept.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Negotiation;

abstract class BaseAccept
abstract class BaseAccept implements AcceptHeader
{
/**
* @var float
Expand Down

0 comments on commit e3d8b4c

Please # to comment.