1 | <?php |
||
19 | class image extends \uix\ui\control { |
||
20 | |||
21 | /** |
||
22 | * The type of object |
||
23 | * |
||
24 | * @since 1.0.0 |
||
25 | * @access public |
||
26 | * @var string |
||
27 | */ |
||
28 | public $type = 'image'; |
||
29 | |||
30 | /** |
||
31 | * Checks if the current control is active. |
||
32 | * |
||
33 | * @since 1.0.0 |
||
34 | * @access public |
||
35 | */ |
||
36 | public function is_active() { |
||
45 | |||
46 | /** |
||
47 | * Define core UIX scripts - override to register core ( common scripts for |
||
48 | * uix type ) |
||
49 | * |
||
50 | * @since 1.0.0 |
||
51 | * @access public |
||
52 | */ |
||
53 | 1 | public function set_assets() { |
|
62 | |||
63 | /** |
||
64 | * Returns the main input field for rendering |
||
65 | * |
||
66 | * @since 1.0.0 |
||
67 | * @see \uix\ui\uix |
||
68 | * @access public |
||
69 | * @return string Input field HTML string |
||
70 | */ |
||
71 | 1 | public function input() { |
|
87 | |||
88 | /** |
||
89 | * Render the Control preview. |
||
90 | * |
||
91 | * @since 1.0.0 |
||
92 | * @access public |
||
93 | * |
||
94 | * @param string $preview_size The size of the preview. |
||
95 | * |
||
96 | 1 | * @return string HTML of rendered preview |
|
97 | 1 | */ |
|
98 | 1 | private function get_preview( $preview_size ) { |
|
112 | } |
||
113 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.