This class 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...
24
{
25
/**
26
* @return array
27
*/
28
public function getFilters()
29
{
30
return array(
31
new \Twig_SimpleFilter('sizeFormat', [$this, 'size_format']),
32
);
33
}
34
/**
35
* @param int $bytes Bytes/Octets
36
* @param int $decimals Number for decimals to return
37
* @param bool $octetFormat Use Octet notation instead of Bytes
38
*
39
* @return string
40
*/
41
public function size_format($bytes, $decimals = 2, $octetFormat = false)
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.