These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Copyright (c) 2013-2017 |
||
4 | * |
||
5 | * @category Library |
||
6 | * @package Dwoo\Plugins\Functions |
||
7 | * @author Jordi Boggiano <[email protected]> |
||
8 | * @author David Sanchez <[email protected]> |
||
9 | * @copyright 2008-2013 Jordi Boggiano |
||
10 | * @copyright 2013-2017 David Sanchez |
||
11 | * @license http://dwoo.org/LICENSE Modified BSD License |
||
12 | * @version 1.3.2 |
||
13 | * @date 2017-01-06 |
||
14 | * @link http://dwoo.org/ |
||
15 | */ |
||
16 | |||
17 | namespace Dwoo\Plugins\Functions; |
||
18 | |||
19 | use Dwoo\Compiler; |
||
20 | use Dwoo\ICompilable; |
||
21 | use Dwoo\Plugin; |
||
22 | |||
23 | /** |
||
24 | * Checks whether a variable is not null |
||
25 | * <pre> |
||
26 | * * var : variable to check |
||
27 | * </pre> |
||
28 | * This software is provided 'as-is', without any express or implied warranty. |
||
29 | * In no event will the authors be held liable for any damages arising from the use of this software. |
||
30 | */ |
||
31 | class PluginIsset extends Plugin implements ICompilable |
||
32 | { |
||
33 | /** |
||
34 | * @param Compiler $compiler |
||
35 | * @param mixed $var |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public static function compile(Compiler $compiler, $var) |
||
0 ignored issues
–
show
|
|||
40 | { |
||
41 | return '(' . $var . ' !== null)'; |
||
42 | } |
||
43 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.