PageRenderTime 24ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/src/Oro/Bundle/UIBundle/Twig/CeilExtension.php

https://github.com/diimpp/platform
PHP | 35 lines | 19 code | 4 blank | 12 comment | 0 complexity | 836ca83e6c8b90abecae7e25fcfd991b MD5 | raw file
  1. <?php
  2. namespace Oro\Bundle\UIBundle\Twig;
  3. class CeilExtension extends \Twig_Extension
  4. {
  5. /**
  6. * {@inheritdoc}
  7. */
  8. public function getFilters()
  9. {
  10. return array(
  11. 'ceil' => new \Twig_Filter_Method($this, 'ceil'),
  12. );
  13. }
  14. /**
  15. * PHP ceil wrapper
  16. *
  17. * @param float $number
  18. * @return int
  19. */
  20. public function ceil($number)
  21. {
  22. return ceil($number);
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function getName()
  28. {
  29. return 'oro_ceil';
  30. }
  31. }