Update CS Fixer conf

This commit is contained in:
Aleksander Machniak
2025-09-27 17:57:00 +02:00
parent ef3053198c
commit 1582d3f0ec
3 changed files with 10 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ return (new Config())
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP81Migration' => true,
'@PHP8x1Migration' => true,
// required by PSR-12
'concat_space' => [

View File

@@ -19,8 +19,8 @@
*/
/**
* @const array Supported file types/extensions. If file type is not on the list
* it will have to be served by custom code in your plugin.
* @var array Supported file types/extensions. If file type is not on the list
* it will have to be served by custom code in your plugin.
*/
const SUPPORTED_TYPES = [
'avif' => 'image/avif',
@@ -45,7 +45,7 @@ const SUPPORTED_TYPES = [
];
/**
* @const array Path prefixes to look for the requested files
* @var array Path prefixes to look for the requested files
*/
const ALLOWED_PATHS = [
'installer/',

View File

@@ -398,6 +398,12 @@ class MimeTest extends TestCase
$content = file_get_contents($file);
$this->assertSame('image/gif', \rcube_mime::file_content_type($content, 'blocked.gif', 'application/octet-stream', true, true));
$this->assertSame('image/gif', \rcube_mime::file_content_type($content, 'blocked.gif', 'application/octet-stream', true, false));
// Test pdf file
$file = INSTALL_PATH . 'program/resources/dummy.pdf';
$content = file_get_contents($file);
$this->assertSame('application/pdf', \rcube_mime::file_content_type($content, '', 'application/octet-stream', true, true));
$this->assertSame('application/pdf', \rcube_mime::file_content_type($file, '', 'application/octet-stream', false, true));
}
/**