Total Complexity | 5 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 92.86% |
Changes | 0 |
1 | <?php |
||
9 | class Comment extends ActiveRecordModel |
||
10 | { |
||
11 | /** |
||
12 | * @var string $tableName name of the database table. |
||
13 | */ |
||
14 | protected $tableName = "Comment"; |
||
15 | |||
16 | /** |
||
17 | * Columns in the table. |
||
18 | * |
||
19 | * @var integer $id primary key auto incremented. |
||
20 | */ |
||
21 | public $id; |
||
22 | public $text; |
||
23 | public $heading; |
||
24 | public $created; |
||
25 | public $tags; |
||
26 | public $userId; |
||
27 | |||
28 | |||
29 | |||
30 | 1 | public function getAllComments() |
|
31 | { |
||
32 | 1 | return $this->db->connect() |
|
|
|||
33 | 1 | ->select(" |
|
34 | Comment.id, |
||
35 | Comment.text, |
||
36 | Comment.heading, |
||
37 | Comment.created, |
||
38 | Comment.tags, |
||
39 | Comment.userId, |
||
40 | User.email |
||
41 | ") |
||
42 | 1 | ->from($this->tableName) |
|
43 | 1 | ->where("Comment.deleted IS NULL") |
|
44 | 1 | ->join("User", "User.id = Comment.userId") |
|
45 | // ->getSQL(); |
||
46 | 1 | ->execute() |
|
47 | 1 | ->fetchAllClass(get_class($this)); |
|
48 | |||
49 | // debug($t); |
||
50 | // return $this->db->connect() |
||
51 | // ->select() |
||
52 | // ->from($this->tableName) |
||
53 | // ->where("deleted IS NULL") |
||
54 | // ->execute() |
||
55 | // ->fetchAllClass(get_class($this)); |
||
56 | } |
||
57 | |||
58 | |||
59 | |||
60 | 3 | public function getComment($col = null, $val = null) |
|
72 | } |
||
73 | } |
||
74 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.