mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-09 04:29:30 +00:00
Fixed phpstan issues
This commit is contained in:
parent
07db1554c7
commit
1bfea3c48a
6 changed files with 22 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue