Fix cs
modifié: core/lib/Thelia/Controller/Admin/FileController.php modifié: core/lib/Thelia/Tests/Tools/MimeTypesToolsTest.php modifié: core/lib/Thelia/Tools/MimeTypeTools.php
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
/* file that was distributed with this source code. */
|
/* file that was distributed with this source code. */
|
||||||
/*************************************************************************************/
|
/*************************************************************************************/
|
||||||
|
|
||||||
namespace Thelia\Tests\Type;
|
namespace Thelia\Tests\Tools;
|
||||||
use Symfony\Component\DependencyInjection\Container;
|
use Symfony\Component\DependencyInjection\Container;
|
||||||
use Thelia\Core\Translation\Translator;
|
use Thelia\Core\Translation\Translator;
|
||||||
use Thelia\Tools\MimeTypeTools;
|
use Thelia\Tools\MimeTypeTools;
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ class MimeTypeTools
|
|||||||
* @param $fileName
|
* @param $fileName
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateMimeTypeExtension($mimeType, $fileName) {
|
public function validateMimeTypeExtension($mimeType, $fileName)
|
||||||
|
{
|
||||||
$mimeType = strtolower($mimeType);
|
$mimeType = strtolower($mimeType);
|
||||||
|
|
||||||
$extensions = $this->guessExtensionsFromMimeType($mimeType);
|
$extensions = $this->guessExtensionsFromMimeType($mimeType);
|
||||||
@@ -79,7 +80,7 @@ class MimeTypeTools
|
|||||||
$oneMatch &= !!preg_match("#\.$extension$#i", $fileName);
|
$oneMatch &= !!preg_match("#\.$extension$#i", $fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (bool)$oneMatch ? static::TYPE_MATCH : static::TYPE_NOT_MATCH;
|
return (bool) $oneMatch ? static::TYPE_MATCH : static::TYPE_NOT_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user