mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-19 17:11:20 +01:00
Update CS Fixer conf
This commit is contained in:
@@ -26,7 +26,7 @@ return (new Config())
|
||||
->setRules([
|
||||
'@PhpCsFixer' => true,
|
||||
'@PhpCsFixer:risky' => true,
|
||||
'@PHP81Migration' => true,
|
||||
'@PHP8x1Migration' => true,
|
||||
|
||||
// required by PSR-12
|
||||
'concat_space' => [
|
||||
|
||||
@@ -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/',
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user