Code Duplication    Length = 7-7 lines in 2 locations

src/BladeProvider.php 2 locations

@@ 274-280 (lines=7) @@
271
        $simpleDirectives = [
272
            'actionAddForIBlock' => 'addForIBlock',
273
        ];
274
        foreach ($simpleDirectives as $directive => $action) {
275
            $compiler->directive($directive, function ($expression) use ($action) {
276
                $expression = rtrim($expression, ')');
277
                $expression = ltrim($expression, '(');
278
                return '<?php \Arrilot\BitrixHermitage\Action::' . $action . '($template, ' . $expression . '); ?>';
279
            });
280
        }
281
282
        $echoDirectives = [
283
            'actionEditIBlockElement' => 'editIBlockElement',
@@ 295-301 (lines=7) @@
292
            'actionDeleteHLBlockElement' => 'deleteHLBlockElement',
293
            'actionEditAndDeleteHLBlockElement' => 'editAndDeleteHLBlockElement',
294
        ];
295
        foreach ($echoDirectives as $directive => $action) {
296
            $compiler->directive($directive, function ($expression) use ($action) {
297
                $expression = rtrim($expression, ')');
298
                $expression = ltrim($expression, '(');
299
                return '<?= \Arrilot\BitrixHermitage\Action::' . $action . '($template, ' . $expression . '); ?>';
300
            });
301
        }
302
    }
303
304
    /**