Increase warning level of PHPStan

This commit is contained in:
Timothy Warren 2021-02-12 17:52:58 -05:00
parent e59b1ffc57
commit c03bd4c040
3 changed files with 4 additions and 18 deletions

View File

@ -2,7 +2,7 @@ parameters:
checkGenericClassInNonGenericObjectType: false checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false checkMissingIterableValueType: false
inferPrivatePropertyTypeFromConstructor: true inferPrivatePropertyTypeFromConstructor: true
level: 7 level: 8
paths: paths:
- src - src
- ./console - ./console

View File

@ -26,10 +26,6 @@ use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
use Aviat\Ion\Di\Exception\{ContainerException, NotFoundException}; use Aviat\Ion\Di\Exception\{ContainerException, NotFoundException};
use Aviat\Ion\Event; use Aviat\Ion\Event;
use Psr\SimpleCache\InvalidArgumentException;
use Throwable;
/** /**
* Kitsu API Authentication * Kitsu API Authentication
*/ */
@ -55,8 +51,6 @@ final class Auth {
* Constructor * Constructor
* *
* @param ContainerInterface $container * @param ContainerInterface $container
* @throws ContainerException
* @throws NotFoundException
*/ */
public function __construct(ContainerInterface $container) public function __construct(ContainerInterface $container)
{ {
@ -75,8 +69,6 @@ final class Auth {
* *
* @param string $password * @param string $password
* @return boolean * @return boolean
* @throws Throwable
* @throws InvalidArgumentException
*/ */
public function authenticate(string $password): bool public function authenticate(string $password): bool
{ {
@ -93,8 +85,6 @@ final class Auth {
* *
* @param string|null $refreshToken * @param string|null $refreshToken
* @return boolean * @return boolean
* @throws InvalidArgumentException
* @throws Throwable
*/ */
public function reAuthenticate(?string $refreshToken = NULL): bool public function reAuthenticate(?string $refreshToken = NULL): bool
{ {
@ -114,7 +104,6 @@ final class Auth {
* Check whether the current user is authenticated * Check whether the current user is authenticated
* *
* @return boolean * @return boolean
* @throws InvalidArgumentException
*/ */
public function isAuthenticated(): bool public function isAuthenticated(): bool
{ {
@ -135,7 +124,6 @@ final class Auth {
* Retrieve the authentication token from the session * Retrieve the authentication token from the session
* *
* @return string * @return string
* @throws InvalidArgumentException
*/ */
public function getAuthToken(): ?string public function getAuthToken(): ?string
{ {
@ -152,7 +140,6 @@ final class Auth {
* Retrieve the refresh token * Retrieve the refresh token
* *
* @return string|null * @return string|null
* @throws InvalidArgumentException
*/ */
private function getRefreshToken(): ?string private function getRefreshToken(): ?string
{ {
@ -168,11 +155,10 @@ final class Auth {
/** /**
* Save the new authentication information * Save the new authentication information
* *
* @param $auth * @param array|false $auth
* @return bool * @return bool
* @throws InvalidArgumentException
*/ */
private function storeAuth($auth): bool private function storeAuth(array|false $auth): bool
{ {
if (FALSE !== $auth) if (FALSE !== $auth)
{ {

View File

@ -71,7 +71,7 @@ class HtmlView extends HttpView {
// Very basic html minify, that won't affect content between html tags // Very basic html minify, that won't affect content between html tags
return preg_replace('/>\s+</', '> <', $buffer); return preg_replace('/>\s+</', '> <', $buffer) ?? $buffer;
} }
} }
// End of HtmlView.php // End of HtmlView.php