Thread::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 2
rs 9.4285
1
<?php
2
namespace StarCitizen\Models;
3
4
/**
5
 * Class Thread
6
 *
7
 * @package StarCitizen\Models
8
 */
9
class Thread extends Model
10
{
11
    public $thread_title;
12
    public $thread_id;
13
    public $thread_replies;
14
    public $thread_views;
15
    public $original_poster=[];
16
    public $original_post = [];
17
    public $recent_poster = [];
18
    public $recent_post;
19
20
    /**
21
     * Thread constructor.
22
     *
23
     * @param $threadData
24
     */
25 4
    public function __construct($threadData)
26
    {
27 4
        foreach ($threadData as $key => $value) {
28 4
            $this->$key = $value;
29
        }
30
    }
31
}