Increase warning level of PHPStan
This commit is contained in:
parent
77f314ee55
commit
44a7d36174
@ -2,7 +2,7 @@ parameters:
|
||||
checkGenericClassInNonGenericObjectType: false
|
||||
checkMissingIterableValueType: false
|
||||
inferPrivatePropertyTypeFromConstructor: true
|
||||
level: 7
|
||||
level: 8
|
||||
paths:
|
||||
- src
|
||||
- ./console
|
||||
|
@ -26,10 +26,6 @@ use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
|
||||
use Aviat\Ion\Di\Exception\{ContainerException, NotFoundException};
|
||||
use Aviat\Ion\Event;
|
||||
|
||||
use Psr\SimpleCache\InvalidArgumentException;
|
||||
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Kitsu API Authentication
|
||||
*/
|
||||
@ -55,8 +51,6 @@ final class Auth {
|
||||
* Constructor
|
||||
*
|
||||
* @param ContainerInterface $container
|
||||
* @throws ContainerException
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
public function __construct(ContainerInterface $container)
|
||||
{
|
||||
@ -75,8 +69,6 @@ final class Auth {
|
||||
*
|
||||
* @param string $password
|
||||
* @return boolean
|
||||
* @throws Throwable
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function authenticate(string $password): bool
|
||||
{
|
||||
@ -93,8 +85,6 @@ final class Auth {
|
||||
*
|
||||
* @param string|null $refreshToken
|
||||
* @return boolean
|
||||
* @throws InvalidArgumentException
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function reAuthenticate(?string $refreshToken = NULL): bool
|
||||
{
|
||||
@ -114,7 +104,6 @@ final class Auth {
|
||||
* Check whether the current user is authenticated
|
||||
*
|
||||
* @return boolean
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function isAuthenticated(): bool
|
||||
{
|
||||
@ -135,7 +124,6 @@ final class Auth {
|
||||
* Retrieve the authentication token from the session
|
||||
*
|
||||
* @return string
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function getAuthToken(): ?string
|
||||
{
|
||||
@ -152,7 +140,6 @@ final class Auth {
|
||||
* Retrieve the refresh token
|
||||
*
|
||||
* @return string|null
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function getRefreshToken(): ?string
|
||||
{
|
||||
@ -168,11 +155,10 @@ final class Auth {
|
||||
/**
|
||||
* Save the new authentication information
|
||||
*
|
||||
* @param $auth
|
||||
* @param array|false $auth
|
||||
* @return bool
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function storeAuth($auth): bool
|
||||
private function storeAuth(array|false $auth): bool
|
||||
{
|
||||
if (FALSE !== $auth)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ class HtmlView extends HttpView {
|
||||
|
||||
|
||||
// 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
|
Loading…
Reference in New Issue
Block a user