1 | <?php |
||
32 | class Plugin { |
||
33 | |||
34 | /** |
||
35 | * The loader that's responsible for maintaining and registering all hooks that power |
||
36 | * the plugin. |
||
37 | * |
||
38 | * @since 1.0.0 |
||
39 | * @access protected |
||
40 | * @var PluginName_Loader $loader Maintains and registers all hooks for the plugin. |
||
41 | */ |
||
42 | private $loader; |
||
43 | |||
44 | /** |
||
45 | * The unique identifier of this plugin. |
||
46 | * |
||
47 | * @since 1.0.0 |
||
48 | * @access private |
||
49 | * @var string $name The string used to uniquely identify this plugin. |
||
50 | */ |
||
51 | private $name = 'redmine-embed'; |
||
52 | |||
53 | /** |
||
54 | * The current version of the plugin. |
||
55 | * |
||
56 | * @since 1.0.0 |
||
57 | * @access private |
||
58 | * @var string $version The current version of the plugin. |
||
59 | */ |
||
60 | private $version = '1.0.0'; |
||
61 | |||
62 | /** |
||
63 | * Option key for the plugin. |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | private $option_key = 'redmine-embed'; |
||
68 | |||
69 | /** |
||
70 | * Define the core functionality of the plugin. |
||
71 | * |
||
72 | * Create an instance of the loader which will be used to register the hooks |
||
73 | * with WordPress. |
||
74 | * |
||
75 | * @since 1.0.0 |
||
76 | */ |
||
77 | public function __construct() { |
||
80 | |||
81 | /** |
||
82 | * Define the locale for this plugin for internationalization. |
||
83 | * |
||
84 | * Uses the I18n class in order to set the domain and to register the hook |
||
85 | * with WordPress. |
||
86 | * |
||
87 | * @since 1.0.0 |
||
88 | * @access private |
||
89 | */ |
||
90 | private function set_locale() { |
||
97 | |||
98 | /** |
||
99 | * Register all of the hooks related to the dashboard functionality |
||
100 | * of the plugin. |
||
101 | * |
||
102 | * @since 1.0.0 |
||
103 | * @access private |
||
104 | */ |
||
105 | private function define_admin_hooks() { |
||
117 | |||
118 | /** |
||
119 | * Register all of the hooks related to the public-facing functionality |
||
120 | * of the plugin. |
||
121 | * |
||
122 | * @since 1.0.0 |
||
123 | * @access private |
||
124 | */ |
||
125 | private function define_frontend_hooks() { |
||
131 | |||
132 | /** |
||
133 | * Run the loader to execute all of the hooks with WordPress. |
||
134 | * |
||
135 | * Load the dependencies, define the locale, and set the hooks for the Dashboard and |
||
136 | * the public-facing side of the site. |
||
137 | * |
||
138 | * @since 1.0.0 |
||
139 | */ |
||
140 | public function run() { |
||
146 | |||
147 | /** |
||
148 | * The name of the plugin used to uniquely identify it within the context of |
||
149 | * WordPress and to define internationalization functionality. |
||
150 | * |
||
151 | * @since 1.0.0 |
||
152 | * @return string The name of the plugin. |
||
153 | */ |
||
154 | public function get_name() { |
||
157 | |||
158 | /** |
||
159 | * The reference to the class that orchestrates the hooks with the plugin. |
||
160 | * |
||
161 | * @since 1.0.0 |
||
162 | * @return PluginName_Loader Orchestrates the hooks of the plugin. |
||
163 | */ |
||
164 | public function get_loader() { |
||
167 | |||
168 | /** |
||
169 | * Retrieve the version number of the plugin. |
||
170 | * |
||
171 | * @since 1.0.0 |
||
172 | * @return string The version number of the plugin. |
||
173 | */ |
||
174 | public function get_version() { |
||
177 | |||
178 | /** |
||
179 | * The name of the option key used to uniquely identify it in the database. |
||
180 | * |
||
181 | * @since 1.0.0 |
||
182 | * @return string The option key name. |
||
183 | */ |
||
184 | public function get_option_key() { |
||
187 | |||
188 | /** |
||
189 | * Get a plugin option by name. |
||
190 | * |
||
191 | * @param string $name Option name. |
||
192 | * @param mixed $default Option default if not set. |
||
193 | * @return mixed Option value. |
||
194 | */ |
||
195 | public function get_option( $name = null, $default = null ) { |
||
204 | |||
205 | /** |
||
206 | * Set a plugin option. |
||
207 | * |
||
208 | * @param string $name Option name. |
||
209 | * @param mixed $value Option value. |
||
210 | */ |
||
211 | public function set_option( $name, $value ) { |
||
216 | |||
217 | } |
||
218 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..