diff --git a/core/lib/Thelia/Controller/Admin/FileController.php b/core/lib/Thelia/Controller/Admin/FileController.php index 393bb5f2f..d571d491f 100644 --- a/core/lib/Thelia/Controller/Admin/FileController.php +++ b/core/lib/Thelia/Controller/Admin/FileController.php @@ -57,11 +57,11 @@ class FileController extends BaseAdminController /** * Manage how a file collection has to be saved * - * @param int $parentId Parent id owning files being saved - * @param string $parentType Parent Type owning files being saved (product, category, content, etc.) - * @param string $objectType Object type, e.g. image or document - * @param array $validMimeTypes an array of valid mime types. If empty, any mime type is allowed. - * @param array $blackList an array of blacklisted mime types. + * @param int $parentId Parent id owning files being saved + * @param string $parentType Parent Type owning files being saved (product, category, content, etc.) + * @param string $objectType Object type, e.g. image or document + * @param array $validMimeTypes an array of valid mime types. If empty, any mime type is allowed. + * @param array $blackList an array of blacklisted mime types. * @return Response */ public function saveFileAjaxAction( diff --git a/core/lib/Thelia/Tests/Tools/MimeTypesToolsTest.php b/core/lib/Thelia/Tests/Tools/MimeTypesToolsTest.php index 4e4cd8208..e52e8c809 100644 --- a/core/lib/Thelia/Tests/Tools/MimeTypesToolsTest.php +++ b/core/lib/Thelia/Tests/Tools/MimeTypesToolsTest.php @@ -10,7 +10,7 @@ /* file that was distributed with this source code. */ /*************************************************************************************/ -namespace Thelia\Tests\Type; +namespace Thelia\Tests\Tools; use Symfony\Component\DependencyInjection\Container; use Thelia\Core\Translation\Translator; use Thelia\Tools\MimeTypeTools; @@ -113,4 +113,4 @@ class MimeTypesToolsTest extends \PHPUnit_Framework_TestCase "thismimetype/doesntexists", "foo.bar" )); } -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Tools/MimeTypeTools.php b/core/lib/Thelia/Tools/MimeTypeTools.php index 1b3defe3c..8430059a9 100644 --- a/core/lib/Thelia/Tools/MimeTypeTools.php +++ b/core/lib/Thelia/Tools/MimeTypeTools.php @@ -19,7 +19,7 @@ use Thelia\Exception\FileException; * @package Thelia\Tools * @author Benjamin Perche */ -class MimeTypeTools +class MimeTypeTools { const TYPES_FILE = "local/config/mime.types"; @@ -65,7 +65,8 @@ class MimeTypeTools * @param $fileName * @return bool */ - public function validateMimeTypeExtension($mimeType, $fileName) { + public function validateMimeTypeExtension($mimeType, $fileName) + { $mimeType = strtolower($mimeType); $extensions = $this->guessExtensionsFromMimeType($mimeType); @@ -79,11 +80,11 @@ class MimeTypeTools $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; } /** - * @param null $filePath + * @param null $filePath * @return array * @throws \Thelia\Exception\FileException */ @@ -138,7 +139,7 @@ class MimeTypeTools /** * @param $string - * @param string $characterMask + * @param string $characterMask * @return mixed|string */ public function realTrim($string, $characterMask = "\t\n\r ") @@ -154,4 +155,4 @@ class MimeTypeTools return $string; } -} \ No newline at end of file +}