Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | private function getTestCategoryExist($name) { |
||
24 | $dbc = App::getDb(); |
||
25 | |||
26 | $query = $dbc->select()->from("_blog_category")->where("category", "=", $name)->get(); |
||
27 | |||
28 | if (count($query) > 0) { |
||
29 | foreach ($query as $obj) { |
||
30 | |||
31 | return $obj->ID_category; |
||
32 | } |
||
33 | } |
||
34 | |||
35 | return false; |
||
36 | } |
||
37 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
||
59 | } |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.