1 | <?php |
||
16 | class admin_helper |
||
17 | { |
||
18 | /** @var \phpbb\user */ |
||
19 | protected $user; |
||
20 | |||
21 | /** @var \phpbb\template\template */ |
||
22 | protected $template; |
||
23 | |||
24 | /** @var \phpbb\log\log */ |
||
25 | protected $log; |
||
26 | |||
27 | /** @var \phpbb\ads\location\manager */ |
||
28 | protected $location_manager; |
||
29 | |||
30 | /** @var string root_path */ |
||
31 | protected $root_path; |
||
32 | |||
33 | /** @var string php_ext */ |
||
34 | protected $php_ext; |
||
35 | |||
36 | /** |
||
37 | * Constructor |
||
38 | * |
||
39 | * @param \phpbb\user $user User object |
||
40 | * @param \phpbb\template\template $template Template object |
||
41 | * @param \phpbb\log\log $log The phpBB log system |
||
42 | * @param \phpbb\ads\location\manager $location_manager Template location manager object |
||
43 | * @param string $root_path phpBB root path |
||
44 | * @param string $php_ext PHP extension |
||
45 | */ |
||
46 | public function __construct(\phpbb\user $user, \phpbb\template\template $template, \phpbb\log\log $log, \phpbb\ads\location\manager $location_manager, $root_path, $php_ext) |
||
55 | |||
56 | /** |
||
57 | * Assign template locations data to the template. |
||
58 | * |
||
59 | * @param mixed $ad_locations The form data or nothing. |
||
60 | * @return void |
||
61 | */ |
||
62 | public function assign_locations($ad_locations = false) |
||
74 | |||
75 | /** |
||
76 | * Assign form data to the template. |
||
77 | * |
||
78 | * @param array $data The form data. |
||
79 | * @return void |
||
80 | */ |
||
81 | public function assign_form_data($data) |
||
95 | |||
96 | public function assign_errors(array $errors) |
||
103 | |||
104 | /** |
||
105 | * Log action |
||
106 | * |
||
107 | * @param string $action Performed action in uppercase |
||
108 | * @param string $ad_name Advertisement name |
||
109 | * @return void |
||
110 | */ |
||
111 | public function log($action, $ad_name) |
||
115 | |||
116 | public function get_find_username_link() |
||
120 | |||
121 | |||
122 | /** |
||
123 | * Prepare end date for display |
||
124 | * |
||
125 | * @param mixed $end_date End date. |
||
126 | * @return string End date prepared for display. |
||
127 | */ |
||
128 | protected function prepare_end_date($end_date) |
||
142 | |||
143 | /** |
||
144 | * Prepare ad owner for display. Method takes user_id |
||
145 | * of the ad owner and returns his/her username. |
||
146 | * |
||
147 | * @param int $ad_owner User ID |
||
148 | * @return string Username belonging to $ad_owner. |
||
149 | */ |
||
150 | protected function prepare_ad_owner($ad_owner) |
||
163 | } |
||
164 |
This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.
The variable may have been renamed without also renaming all references.