Standardized view functions to use underscores

This commit is contained in:
Chris Kankiewicz
2020-04-06 16:18:00 -07:00
parent 81d70c81f8
commit 56cc465501
3 changed files with 3 additions and 3 deletions

View File

@@ -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.

View File

@@ -31,7 +31,7 @@
{% if parentDir or file.isDir %}
{% else %}
{{ sizeForHumans(file) }}
{{ size_for_humans(file) }}
{% endif %}
</div>

View File

@@ -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(