Completed
Push — master ( d916f4...696ec4 )
by Nekrasov
02:00
created

BladeCompiler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A compileString() 0 7 1
1
<?php
2
3
namespace Arrilot\BitrixBlade;
4
5
use Illuminate\View\Compilers\BladeCompiler as BaseCompiler;
6
7
class BladeCompiler extends BaseCompiler
8
{
9
    /**
10
     * Compile the given Blade template contents.
11
     *
12
     * @param string $value
13
     *
14
     * @return string
15
     */
16
    public function compileString($value)
17
    {
18
        $result = '<?if(!defined("B_PROLOG_INCLUDED")||B_PROLOG_INCLUDED!==true) die();?>';
19
        $result .= '<?if(!empty($arResult)) extract($arResult, EXTR_SKIP);?>';
20
21
        return $result . parent::compileString($value);
22
    }
23
}
24