1 | <?php |
||
25 | class Frontend { |
||
26 | |||
27 | /** |
||
28 | * The plugin's instance. |
||
29 | * |
||
30 | * @since 1.0.0 |
||
31 | * @access private |
||
32 | * @var Plugin $plugin This plugin's instance. |
||
33 | */ |
||
34 | private $plugin; |
||
35 | |||
36 | /** |
||
37 | * Redmine. |
||
38 | * |
||
39 | * @since 1.0.0 |
||
40 | * @access private |
||
41 | * @var Redmine API client object. |
||
42 | */ |
||
43 | private $api; |
||
44 | |||
45 | /** |
||
46 | * Textile parser. |
||
47 | * |
||
48 | * @since 1.0.0 |
||
49 | * @access private |
||
50 | * @var \Netcarver\Textile |
||
51 | */ |
||
52 | private $textile; |
||
|
|||
53 | |||
54 | /** |
||
55 | * Initialize the class and set its properties. |
||
56 | * |
||
57 | * @since 1.0.0 |
||
58 | * |
||
59 | * @param Plugin $plugin This plugin's instance. |
||
60 | */ |
||
61 | public function __construct( Plugin $plugin ) { |
||
64 | |||
65 | /** |
||
66 | * Initialize dependencies. |
||
67 | */ |
||
68 | private function initialize() { |
||
81 | |||
82 | /** |
||
83 | * Register the stylesheets for the public-facing side of the site. |
||
84 | * |
||
85 | * @since 1.0.0 |
||
86 | */ |
||
87 | public function enqueue_styles() { |
||
108 | |||
109 | /** |
||
110 | * Register URL embed handler. |
||
111 | */ |
||
112 | public function register_embed_handlers () { |
||
121 | |||
122 | /** |
||
123 | * Outputs Redmine issue details. |
||
124 | * |
||
125 | * @param array $matches [description] |
||
126 | * @param array $attr [description] |
||
127 | * @param string $url [description] |
||
128 | * @param array $rawattr [description] |
||
129 | */ |
||
130 | public function embed_issue( $matches, $attr, $url, $rawattr ) { |
||
162 | |||
163 | /** |
||
164 | * Get template file path. |
||
165 | * |
||
166 | * @param string $template Template file (without the extension) to include. |
||
167 | * @return string Absolute path to the requested template file. |
||
168 | */ |
||
169 | private function get_template( $template ) { |
||
172 | |||
173 | /** |
||
174 | * Render error message. |
||
175 | * |
||
176 | * @param string $error Error message. |
||
177 | */ |
||
178 | private function render_issue( $issue ) { |
||
183 | |||
184 | /** |
||
185 | * Render error message. |
||
186 | * |
||
187 | * @param string $error Error message. |
||
188 | */ |
||
189 | private function render_error( $error ) { |
||
194 | |||
195 | /** |
||
196 | * Add rendered fields to the data object. |
||
197 | * @param object $data Issue data. |
||
198 | * @return object Issue data with added fields. |
||
199 | */ |
||
200 | private function prepare_issue( $data ) { |
||
215 | |||
216 | /** |
||
217 | * Format date. |
||
218 | * @param int $timestamp Timestamp. |
||
219 | * @return string Formatted date based on the timestamp. |
||
220 | */ |
||
221 | private function get_formatted_date( $timestamp = 0 ) { |
||
230 | |||
231 | /** |
||
232 | * Get object link. |
||
233 | * |
||
234 | * @param object $attribute Attribute containing name and link properties. |
||
235 | * @return string Link markup. |
||
236 | */ |
||
237 | private function get_attribute_link( $attribute ) { |
||
252 | |||
253 | } |
||
254 |
This check marks private properties in classes that are never used. Those properties can be removed.