Fix up to level 3

This commit is contained in:
James Cole
2023-11-05 10:16:53 +01:00
parent 2d5790c417
commit c0cc896102
18 changed files with 35 additions and 90 deletions

View File

@@ -40,10 +40,8 @@ use Psr\Container\NotFoundExceptionInterface;
class RemoteUserGuard implements Guard
{
protected Application $application;
/** @var UserProvider */
protected $provider;
/** @var User|null */
protected $user;
protected UserProvider $provider;
protected User|null $user;
/**
* Create a new authentication guard.
@@ -159,10 +157,10 @@ class RemoteUserGuard implements Guard
/**
* @inheritDoc
*/
public function id(): ?User
public function id(): int|string|null
{
app('log')->debug(sprintf('Now at %s', __METHOD__));
return $this->user;
return $this->user?->id;
}
/**

View File

@@ -40,7 +40,7 @@ use Twig\TwigFunction;
class General extends AbstractExtension
{
/**
* @return array
* @inheritDoc
*/
public function getFilters(): array
{
@@ -114,7 +114,7 @@ class General extends AbstractExtension
return 'fa-file-o';
case 'application/pdf':
return 'fa-file-pdf-o';
/* image */
/* image */
case 'image/png':
case 'image/jpeg':
case 'image/svg+xml':
@@ -122,7 +122,7 @@ class General extends AbstractExtension
case 'image/heic-sequence':
case 'application/vnd.oasis.opendocument.image':
return 'fa-file-image-o';
/* MS word */
/* MS word */
case 'application/msword':
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.template':
@@ -137,7 +137,7 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.text-web':
case 'application/vnd.oasis.opendocument.text-master':
return 'fa-file-word-o';
/* MS excel */
/* MS excel */
case 'application/vnd.ms-excel':
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.template':
@@ -147,7 +147,7 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.spreadsheet':
case 'application/vnd.oasis.opendocument.spreadsheet-template':
return 'fa-file-excel-o';
/* MS powerpoint */
/* MS powerpoint */
case 'application/vnd.ms-powerpoint':
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
case 'application/vnd.openxmlformats-officedocument.presentationml.template':
@@ -158,7 +158,7 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.presentation':
case 'application/vnd.oasis.opendocument.presentation-template':
return 'fa-file-powerpoint-o';
/* calc */
/* calc */
case 'application/vnd.sun.xml.draw':
case 'application/vnd.sun.xml.draw.template':
case 'application/vnd.stardivision.draw':

View File

@@ -33,7 +33,7 @@ use Twig\TwigFunction;
class Rule extends AbstractExtension
{
/**
* @return array
* @inheritDoc
*/
public function getFunctions(): array
{

View File

@@ -38,8 +38,7 @@ use Twig\TwigFunction;
class TransactionGroupTwig extends AbstractExtension
{
/**
* @return array
*
* @inheritDoc
*/
public function getFunctions(): array
{

View File

@@ -33,7 +33,7 @@ use Twig\TwigFunction;
class Translation extends AbstractExtension
{
/**
* @return array
* @inheritDoc
*/
public function getFilters(): array
{