Passed
Push — master ( d2471f...db91d7 )
by Magnus
02:02
created

Post   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 52
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInformation() 0 5 1
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
    // /**
32
    //  * Set the password.
33
    //  *
34
    //  * @param string $password the password to use.
35
    //  *
36
    //  * @return void
37
    //  */
38
    // public function setPassword($password)
0 ignored issues
show
Unused Code Comprehensibility introduced by
56% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
39
    // {
40
    //     $this->password = password_hash($password, PASSWORD_DEFAULT);
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
41
    // }
42
    //
43
    //
44
    // /**
45
    //  * Verify the email and the password, if successful the object contains
46
    //  * all details from the database row.
47
    //  *
48
    //  * @param        $email
49
    //  * @param string $password the password to use.
50
    //  * @return bool true if email and password matches, else false.
51
    //  * @internal param string $email email to check.
52
    //  */
53
    // public function verifyPassword($email, $password)
0 ignored issues
show
Unused Code Comprehensibility introduced by
59% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
54
    // {
55
    //     $this->find("email", $email);
0 ignored issues
show
Unused Code Comprehensibility introduced by
73% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
56
    //     return password_verify($password, $this->password);
0 ignored issues
show
Unused Code Comprehensibility introduced by
62% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
57
    // }
58
59 1
    public function getInformation($name)
60
    {
61 1
        $res = $this->find("postname", $name);
62 1
        return $res;
63
    }
64
}
65