Skip to content

Commit

Permalink
chore: use const for maxSize
Browse files Browse the repository at this point in the history
  • Loading branch information
PoulainMaxime committed Sep 11, 2024
1 parent 8b11867 commit f2409d5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

class GeneralSettings extends TranslatorAwareType
{
private const MAX_IMAGE_SIZE_IN_BYTES = 8 * 1000000;

public function __construct(
TranslatorInterface $translator,
array $locales,
Expand All @@ -53,7 +55,7 @@ public function __construct(

public function buildForm(FormBuilderInterface $builder, array $options)
{
$maximumFileSize = (int) str_replace('M', '', ini_get('upload_max_filesize'));
$maximumFileSize = (int) str_replace('M', '', self::MAX_IMAGE_SIZE_IN_BYTES);

Check failure on line 58 in src/PrestaShopBundle/Form/Admin/Improve/Shipping/Carrier/GeneralSettings.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Parameter #3 $subject of function str_replace expects array|string, int given.

Check failure on line 58 in src/PrestaShopBundle/Form/Admin/Improve/Shipping/Carrier/GeneralSettings.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.2)

Parameter #3 $subject of function str_replace expects array|string, int given.

Check failure on line 58 in src/PrestaShopBundle/Form/Admin/Improve/Shipping/Carrier/GeneralSettings.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.3)

Parameter #3 $subject of function str_replace expects array|string, int given.

parent::buildForm($builder, $options);
$builder
Expand Down

0 comments on commit f2409d5

Please sign in to comment.