1 | <?php |
||
28 | class Yikes_Inc_Easy_Mailchimp_Extender { |
||
29 | /** |
||
30 | * The loader that's responsible for maintaining and registering all hooks that power |
||
31 | * the plugin. |
||
32 | * |
||
33 | * @since 1.0.0 |
||
34 | * @access protected |
||
35 | * @var Yikes_Inc_Easy_Mailchimp_Extender_Loader $loader Maintains and registers all hooks for the plugin. |
||
36 | */ |
||
37 | protected $loader; |
||
38 | /** |
||
39 | * The unique identifier of this plugin. |
||
40 | * |
||
41 | * @since 1.0.0 |
||
42 | * @access protected |
||
43 | * @var string $yikes_inc_easy_mailchimp_extender The string used to uniquely identify this plugin. |
||
44 | */ |
||
45 | protected $yikes_inc_easy_mailchimp_extender = 'yikes-inc-easy-mailchimp-extender'; |
||
46 | /** |
||
47 | * The current version of the plugin. |
||
48 | * |
||
49 | * @since 1.0.0 |
||
50 | * @access protected |
||
51 | * @var string $version The current version of the plugin. |
||
52 | */ |
||
53 | protected $version; |
||
54 | |||
55 | /** |
||
56 | * Our form interface instance. |
||
57 | * |
||
58 | * @var Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface |
||
59 | */ |
||
60 | protected $form_interface; |
||
61 | |||
62 | /** |
||
63 | * Define the core functionality of the plugin. |
||
64 | * |
||
65 | * Set the plugin name and the plugin version that can be used throughout the plugin. |
||
66 | * Load the dependencies, and set the hooks for the admin area and |
||
67 | * the public-facing side of the site. |
||
68 | * |
||
69 | * @since 1.0.0 |
||
70 | * |
||
71 | * @param Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface $form_interface |
||
72 | */ |
||
73 | public function __construct( Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface $form_interface ) { |
||
80 | /** |
||
81 | * Load the required dependencies for this plugin. |
||
82 | * |
||
83 | * Include the following files that make up the plugin: |
||
84 | * |
||
85 | * - Yikes_Inc_Easy_Mailchimp_Extender_Loader. Orchestrates the hooks of the plugin. |
||
86 | * - Yikes_Inc_Easy_Mailchimp_Extender_i18n. Defines internationalization functionality. |
||
87 | * - Yikes_Inc_Easy_Mailchimp_Extender_Admin. Defines all hooks for the admin area. |
||
88 | * - Yikes_Inc_Easy_Mailchimp_Extender_Public. Defines all hooks for the public side of the site. |
||
89 | * |
||
90 | * Create an instance of the loader which will be used to register the hooks |
||
91 | * with WordPress. |
||
92 | * |
||
93 | * @since 1.0.0 |
||
94 | * @access private |
||
95 | */ |
||
96 | private function load_dependencies() { |
||
117 | /** |
||
118 | * Register all of the hooks related to the admin area functionality |
||
119 | * of the plugin. |
||
120 | * |
||
121 | * @since 1.0.0 |
||
122 | * @access private |
||
123 | */ |
||
124 | private function define_admin_hooks() { |
||
130 | /** |
||
131 | * Register all of the hooks related to the public-facing functionality |
||
132 | * of the plugin. |
||
133 | * |
||
134 | * @since 1.0.0 |
||
135 | * @access private |
||
136 | */ |
||
137 | private function define_public_hooks() { |
||
140 | /** |
||
141 | * Run the loader to execute all of the hooks with WordPress. |
||
142 | * |
||
143 | * @since 1.0.0 |
||
144 | */ |
||
145 | public function run() { |
||
148 | /** |
||
149 | * The name of the plugin used to uniquely identify it within the context of |
||
150 | * WordPress and to define internationalization functionality. |
||
151 | * |
||
152 | * @since 1.0.0 |
||
153 | * @return string The name of the plugin. |
||
154 | */ |
||
155 | public function get_yikes_inc_easy_mailchimp_extender() { |
||
158 | /** |
||
159 | * The reference to the class that orchestrates the hooks with the plugin. |
||
160 | * |
||
161 | * @since 1.0.0 |
||
162 | * @return Yikes_Inc_Easy_Mailchimp_Extender_Loader Orchestrates the hooks of the plugin. |
||
163 | */ |
||
164 | public function get_loader() { |
||
167 | /** |
||
168 | * Retrieve the version number of the plugin. |
||
169 | * |
||
170 | * @since 1.0.0 |
||
171 | * @return string The version number of the plugin. |
||
172 | */ |
||
173 | public function get_version() { |
||
176 | } |
||
177 |
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.