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

BladeCompiler::compileString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
rs 9.4285
c 1
b 0
f 0
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