Skip to content

Commit

Permalink
Merge pull request #1 from yourjhay/v2beta
Browse files Browse the repository at this point in the history
V2beta
  • Loading branch information
yourjhay committed Oct 3, 2020
2 parents 9a07db4 + 82d5078 commit 5f8f29c
Show file tree
Hide file tree
Showing 12 changed files with 1,571 additions and 1,494 deletions.
3 changes: 1 addition & 2 deletions app/Controllers/HomeController.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace App\Controllers;

class HomeController extends Controller
{

public function index()
{
/**
Expand All @@ -17,6 +17,5 @@ public function index()
'name' => APP_NAME,
'description' => APP_DESCRIPTION
]);

}
}
2 changes: 0 additions & 2 deletions app/Helper/SampleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class SampleHelper
{

/**
* @param null $var - string to be uppercase
* @return string
Expand All @@ -13,5 +12,4 @@ public static function uppercase($var = null)
{
return strtoupper($var);
}

}
8 changes: 3 additions & 5 deletions app/Helper/Twig/FunctionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
use function Simple\alias;

class FunctionExtension extends AbstractExtension
{

/**
* Extension for twig functions
* Read Documentation at: https://twig.symfony.com/doc/2.x/advanced.html
Expand All @@ -21,11 +21,9 @@ public function getFunctions()
* new TwigFunction($function_name_to_be_called_in_template, [$callable, method_name])
*/
new TwigFunction('phpinfo', [$this,'phpinfo']),
new TwigFunction('alias', [$this,'alias']),

new TwigFunction('alias', [$this,'alias']),
];
}


/**
* Methods for Twig Functions
Expand All @@ -43,4 +41,4 @@ public function alias($var, $param=null)
return alias($var, $param);
}

}
}
2 changes: 0 additions & 2 deletions app/Helper/Twig/GlobalExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@

class GlobalExtension extends AbstractExtension implements GlobalsInterface
{

public function getGlobals()
{
return [
'text' => 'sample text',
];
}

}
Loading

0 comments on commit 5f8f29c

Please sign in to comment.