@@ -72,7 +72,7 @@ |
||
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @param string $verificationCode |
75 | - * @return mixed |
|
75 | + * @return string |
|
76 | 76 | */ |
77 | 77 | public function verification_check(string $verificationCode) { |
78 | 78 | //user is trying to validate their email for signup, check if verification code is still valid/exists |
@@ -88,6 +88,9 @@ |
||
88 | 88 | return $arr; |
89 | 89 | } |
90 | 90 | |
91 | + /** |
|
92 | + * @return string |
|
93 | + */ |
|
91 | 94 | public function getSiteDataFromURL(string $site_url) { |
92 | 95 | $query = $this->db->select('id, site_class') |
93 | 96 | ->from('tracker_sites') |
@@ -144,6 +144,10 @@ |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | //utility functions |
147 | + |
|
148 | + /** |
|
149 | + * @param string $field |
|
150 | + */ |
|
147 | 151 | function get_error_message(/*str*/$field, /*obj*/ $customObj = FALSE) { |
148 | 152 | $obj = $customObj ?: $this->form_validation; |
149 | 153 | $error_messages = ReflectionHelper::getPrivateProperty( |
@@ -73,11 +73,15 @@ discard block |
||
73 | 73 | /** |
74 | 74 | * Get user option, or default option if it does not exist. |
75 | 75 | * @param string $option |
76 | - * @return mixed Returns option value as STRING, or FALSE if option does not exist. |
|
76 | + * @return string Returns option value as STRING, or FALSE if option does not exist. |
|
77 | 77 | */ |
78 | 78 | public function get(string $option) { |
79 | 79 | return $this->get_by_userid($option, (int) $this->User->id); |
80 | 80 | } |
81 | + |
|
82 | + /** |
|
83 | + * @return string |
|
84 | + */ |
|
81 | 85 | public function get_by_userid(string $option, int $userID) { |
82 | 86 | //Check if option is valid |
83 | 87 | if(array_key_exists($option, $this->options)) { |
@@ -135,6 +139,9 @@ discard block |
||
135 | 139 | return $success; |
136 | 140 | } |
137 | 141 | |
142 | + /** |
|
143 | + * @return string |
|
144 | + */ |
|
138 | 145 | private function get_db(string $option, int $userID) { |
139 | 146 | //This function assumes we've already done some basic validation. |
140 | 147 | $query = $this->db->select('value_str, value_int') |