| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | public function userDetails($details, $para) |
||
| 70 | { |
||
| 71 | if ($para == true) { |
||
| 72 | $this->query = "SELECT * from login where login_id = '$details'"; |
||
| 73 | } else { |
||
| 74 | $this->query = "SELECT * from login where username = '$details'"; |
||
| 75 | } |
||
| 76 | $this->result = $this->connect->query($this->query); |
||
| 77 | if ($this->result->num_rows > 0) { |
||
| 78 | $this->details = $this->result->fetch_assoc(); |
||
| 79 | return $this->details; |
||
| 80 | } else { |
||
| 81 | return null; |
||
| 82 | } |
||
| 83 | } |
||
| 84 | } |
||
| 85 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.