Completed
Push — feature/controller ( 534c3a...e4e086 )
by René
02:20
created

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Zortje\MVC\User;
5
6
use Zortje\MVC\Model\Table\Entity\Entity;
7
8
/**
9
 * Class User
10
 *
11
 * @package Zortje\MVC\Model
12
 */
13
class User extends Entity
14
{
15
16
    protected static $columns = [
17
        'email'         => 'string',
18
        'password_hash' => 'string',
19
    ];
20
21
    /**
22
     * User constructor.
23
     *
24
     * @param string $email
25
     * @param string $passwordHash
26
     */
27
    public function __construct(string $email, string $passwordHash)
28
    {
29
        parent::__construct(null, new \DateTime(), new \DateTime());
30
31
        $this->set('email', $email);
32
        $this->set('password_hash', $passwordHash);
33
    }
34
}
35