Completed
Push — develop ( 840c69...29c45a )
by René
03:26
created

InArrayViewHelper::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 2
eloc 4
nc 2
nop 4
1
<?php
2
3
/**
4
 * Class InArrayViewHelper
5
 */
6
7
namespace HDNET\OnpageIntegration\ViewHelpers;
8
9
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
10
11
/**
12
 * Class InArrayViewHelper
13
 */
14
class InArrayViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
15
{
16
17
    /**
18
     * Look at the php docs for in_array
19
     *
20
     * @param array  $array
21
     * @param string $value
22
     * @param string $key
23
     * @param int $negate
24
     */
25
    public function render($array, $value, $key, $negate = 0)
0 ignored issues
show
Unused Code introduced by
The parameter $negate is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
26
    {
27
        if (in_array($key, $array)) {
28
            return '';
29
        }
30
        return $value;
31
    }
32
}
33