mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-25 15:01:16 +02:00
Standardized view functions to use underscores
This commit is contained in:
@@ -7,7 +7,7 @@ use Symfony\Component\Finder\SplFileInfo;
|
||||
class SizeForHumans extends ViewFunction
|
||||
{
|
||||
/** @var string The function name */
|
||||
protected $name = 'sizeForHumans';
|
||||
protected $name = 'size_for_humans';
|
||||
|
||||
/**
|
||||
* Get the human readable file size from a file object.
|
||||
|
@@ -31,7 +31,7 @@
|
||||
{% if parentDir or file.isDir %}
|
||||
—
|
||||
{% else %}
|
||||
{{ sizeForHumans(file) }}
|
||||
{{ size_for_humans(file) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@@ -64,7 +64,7 @@ class TwigFactoryTest extends TestCase
|
||||
|
||||
$this->assertInstanceOf(
|
||||
ViewFunctions\SizeForHumans::class,
|
||||
$twig->getEnvironment()->getFunction('sizeForHumans')->getCallable()
|
||||
$twig->getEnvironment()->getFunction('size_for_humans')->getCallable()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(
|
||||
|
Reference in New Issue
Block a user