Test Failed
Push — master ( 8e3065...29b5e3 )
by Magnus
02:11
created

Post::getAllInformationWhere()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 0
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: root
5
 * Date: 2017-09-27
6
 * Time: 10:27
7
 */
8
9
namespace Radchasay\Comment;
10
11
use \Anax\Database\ActiveRecordModel;
12
13
class Post extends ActiveRecordModel
14
{
15
16
    /**
17
     * @var string $tableName name of the database table.
18
     */
19
    protected $tableName = "Posts";
20
21
    /**
22
     * Columns in the table.
23
     *
24
     * @var integer $id primary key auto incremented.
25
     */
26
    public $id;
27
    public $posttitle;
28
    public $postname;
29
    public $posttext;
30
31
    public function getInformation($name)
32
    {
33
        $res = $this->find("postname", $name);
34
        return $res;
35
    }
36
37
    public function getAllInformationWhere($name)
38
    {
39
        $res = $this->findAllWhere("postname = ?", $name);
40
        return $res;
41
    }
42
}
43