Skip to content

Commit

Permalink
refactor: code style improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed May 16, 2024
1 parent 1fc0391 commit 9e73893
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions phpmyfaq/src/phpMyFAQ/Attachment/AttachmentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

namespace phpMyFAQ\Attachment;

use phpMyFAQ\Attachment;
use phpMyFAQ\Configuration;
use phpMyFAQ\Database;
use phpMyFAQ\Enums\AttachmentStorageType;
Expand Down Expand Up @@ -86,14 +85,7 @@ public static function fetchByRecordId(Configuration $configuration, int $record
$files = [];

$sql = sprintf(
"SELECT
id
FROM
%sfaqattachment
WHERE
record_id = %d
AND
record_lang = '%s'",
"SELECT id FROM %sfaqattachment WHERE record_id = %d AND record_lang = '%s'",
Database::getTablePrefix(),
$recordId,
Language::$language
Expand Down Expand Up @@ -130,9 +122,10 @@ public static function init(string $defaultKey, bool $encryptionEnabled): void
/**
* Re-arranges the $_FILES array for multiple file uploads.
*
* @param $filePost
* @param array $filePost
* @return array
*/
public static function rearrangeUploadedFiles(&$filePost): array
public static function rearrangeUploadedFiles(array $filePost): array
{
$filesArray = [];
$filesCount = is_countable($filePost['name']) ? count($filePost['name']) : 0;
Expand Down

0 comments on commit 9e73893

Please sign in to comment.