Comment   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 27
ccs 0
cts 9
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A findAllWhereDouble() 0 10 2
1
<?php
2
3
namespace Aiur18\Question;
4
5
use Anax\DatabaseActiveRecord\ActiveRecordModel;
6
7
/**
8
 * A database driven model using the Active Record design pattern.
9
 */
10
class Comment extends ActiveRecordModel
11
{
12
    /** 
13
     * @var string $tableName name of the database table.
14
     */
15
    protected $tableName = "Comment";
16
17
18
19
    /** variable
20
     */
21
    public $id;
22
    public $comment;
23
    public $user_id;
24
25
    /** Method
26
     */
27
    public function findAllWhereDouble($where, $value)
28
    {
29
        $this->checkDb();
30
        $params = is_array($value) ? $value : [$value];
31
        return $this->db->connect()
32
                        ->select()
33
                        ->from($this->tableName)
34
                        ->where($where)
35
                        ->execute($params)
36
                        ->fetchAllClass(get_class($this));
37
    }
38
}
39