Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Update CupsExtension.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Szabolcs Surányi committed Feb 4, 2020
1 parent 030e32c commit 6e728c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Twig/CupsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
namespace d3vy\Cups\Twig;

use d3vy\Cups\Cups;
use Twig_SimpleFunction;
use Twig\TwigFunction;

class CupsExtension extends \Twig_Extension {
class CupsExtension extends \Twig\Extension\AbstractExtension; {

/**
* @return [Twig_SimpleFunction]
* @return TwigFunction[]
*/
public function getFunctions() {
return array(
new Twig_SimpleFunction('cups', function($startDate, $endDate, $dailyCups, $projectWeight = 100, $excludedDays = [0, 6]) {
new TwigFunction('cups', function($startDate, $endDate, $dailyCups, $projectWeight = 100, $excludedDays = [0, 6]) {
return Cups::calculate($startDate, $endDate, $dailyCups, $projectWeight, $excludedDays);
})
);
Expand All @@ -21,4 +21,4 @@ public function getFunctions() {
public function getName() {
return 'd3vy_twig_cups_extension';
}
}
}

0 comments on commit 6e728c5

Please sign in to comment.