Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public static function db_survey_insert($announce_id, $survey_question_unsafe, $survey_until) { |
||
13 | classSupernova::$db->doInsertSet(TABLE_SURVEY, array( |
||
14 | 'survey_announce_id' => $announce_id, |
||
15 | 'survey_question' => $survey_question_unsafe, |
||
16 | 'survey_until' => $survey_until, |
||
17 | )); |
||
18 | } |
||
19 | |||
20 | } |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: