Skip to content

Commit

Permalink
Cleanup fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Feb 5, 2024
1 parent eddb235 commit 966f978
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/AiImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function upscaleAction(File $file): void
$this->redirect('filelist');
}

public function extendAction(string $direction, File $file = null, string $base64 = ''): void
public function extendAction(string $direction, ?File $file = null, string $base64 = ''): void
{
try {
$filePath = '';
Expand Down
4 changes: 2 additions & 2 deletions Classes/Http/Client/AltTextClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private function getAuthorizationHeader(): array
];
}

public function getAltTextForFile(File $file, string $languageIsoCode = null): string
public function getAltTextForFile(File $file, ?string $languageIsoCode = null): string
{
$localFile = $file->getOriginalResource()->getForLocalProcessing();

Expand Down Expand Up @@ -81,7 +81,7 @@ public function getAltTextForFile(File $file, string $languageIsoCode = null): s
return $response->alt_text;
}

public function getByAssetId(int $assetId, string $languageIsoCode = null): string
public function getByAssetId(int $assetId, ?string $languageIsoCode = null): string
{
if (null === $languageIsoCode) {
$languageIsoCode = $this->siteLanguageService->getLanguage();
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/AiAltTextService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(AltTextClient $altTextClient)
/**
* @throws \Exception
*/
public function getAltText(File $file, string $languageIsoCode = null): string
public function getAltText(File $file, ?string $languageIsoCode = null): string
{
try {
$altText = $this->altTextClient->getByAssetId($file->getOriginalResource()->getUid(), $languageIsoCode);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/ExtendService.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function resolutionForExtendedImage(string $sourceImagePath, string $dire
*
* @throws \Exception
*/
private function getImageDimensions($source = null, string $imagePath = null): array
private function getImageDimensions($source = null, ?string $imagePath = null): array
{
$width = null;
$height = null;
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FileService

private string $path = 'mkcontentai';

public function __construct(string $folder = null)
public function __construct(?string $folder = null)
{
$this->path = 'mkcontentai/'.$folder;
$this->storageRepository = GeneralUtility::makeInstance(StorageRepository::class);
Expand Down

0 comments on commit 966f978

Please sign in to comment.