This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
42
$data = array(
43
'mimetype' => $mimetype,
44
'content' => $content
45
);
46
47
if (isset(self::$filters[$mimetype])){
48
$data = call_user_func(
49
array(
50
self::$filters[$mimetype],
51
'write'
52
),
53
$data
54
);
55
}
56
57
return $data;
58
}
59
60
public static function getAll(){
61
return array_keys(self::$filters);
62
}
63
64
/**
65
* Checks if mimetype is supported by the app
66
* @param string $mimetype - checked mimetype
67
* @return bool
68
*/
69
public static function isSupportedMimetype($mimetype){
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.