Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
3 / 3 |
| MacroDirectives | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
3 / 3 |
| directiveMacro | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| directiveEndmacro | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| directiveMacrodef | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| <?php | |
| /** | |
| * Directives: macro, endmacro, domacro | |
| */ | |
| namespace Radic\BladeExtensions\Directives; | |
| use Illuminate\Contracts\Foundation\Application; | |
| use Illuminate\View\Compilers\BladeCompiler as Compiler; | |
| use Radic\BladeExtensions\Traits\BladeExtenderTrait; | |
| /** | |
| * Directives: macro, endmacro, domacro | |
| * | |
| * @package Radic\BladeExtensions | |
| * @subpackage Directives | |
| * @version 2.1.0 | |
| * @author Robin Radic | |
| * @license MIT License - http://radic.mit-license.org | |
| * @copyright 2011-2015, Robin Radic | |
| * @link http://robin.radic.nl/blade-extensions | |
| * | |
| */ | |
| class MacroDirectives | |
| { | |
| use BladeExtenderTrait; | |
| /** | |
| * directiveMacro | |
| * | |
| * @param $value | |
| * @param $pattern | |
| * @param $replacement | |
| * @param \Illuminate\Contracts\Foundation\Application $app | |
| * @param \Illuminate\View\Compilers\BladeCompiler $blade | |
| * @return mixed | |
| */ | |
| public function directiveMacro($value, $pattern, $replacement, Application $app, Compiler $blade) | |
| { | |
| return preg_replace($pattern, $replacement, $value); | |
| } | |
| /** | |
| * directiveEndmacro | |
| * | |
| * @param $value | |
| * @param $pattern | |
| * @param $replacement | |
| * @param \Illuminate\Contracts\Foundation\Application $app | |
| * @param \Illuminate\View\Compilers\BladeCompiler $blade | |
| * @return mixed | |
| */ | |
| public function directiveEndmacro($value, $pattern, $replacement, Application $app, Compiler $blade) | |
| { | |
| return preg_replace($pattern, $replacement, $value); | |
| } | |
| /** | |
| * directiveMacrodef | |
| * | |
| * @param $value | |
| * @param $pattern | |
| * @param $replacement | |
| * @param \Illuminate\Contracts\Foundation\Application $app | |
| * @param \Illuminate\View\Compilers\BladeCompiler $blade | |
| * @return mixed | |
| */ | |
| public function directiveMacrodef($value, $pattern, $replacement, Application $app, Compiler $blade) | |
| { | |
| return preg_replace($pattern, $replacement, $value); | |
| } | |
| } |