Fixed phpstan issues

This commit is contained in:
Jan Böhmer 2025-09-21 23:27:56 +02:00
parent 07db1554c7
commit 1bfea3c48a
6 changed files with 22 additions and 2 deletions

View file

@ -57,6 +57,9 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
*/
class AttachmentSubmitHandler
{
/**
* @var array<string, string> The mapping used to determine which folder will be used for an attachment type
*/
protected array $folder_mapping;
private ?int $max_upload_size_bytes = null;
@ -160,6 +163,7 @@ class AttachmentSubmitHandler
} else {
//If not, check for instance of:
foreach ($this->folder_mapping as $class => $folder) {
/** @var string $class */
if ($attachment instanceof $class) {
$prefix = $folder;
break;

View file

@ -95,6 +95,11 @@ final class BarcodeContentGenerator
return $prefix.$id;
}
/**
* @param array<string, string> $map
* @param object $target
* @return string
*/
private function classToString(array $map, object $target): string
{
$class = $target::class;