Passed
Push — master ( 68443e...939347 )
by Mihail
04:31
created

FeedbackAnswer::getFeedbackPost()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Apps\ActiveRecord;
4
5
6
use Ffcms\Core\Arch\ActiveModel;
7
8
/**
9
 * Class FeedbackAnswer. Answers relation to feedback request posts.
10
 * @package Apps\ActiveRecord
11
 * @property int $id
12
 * @property int $feedback_id
13
 * @property string $name
14
 * @property string $email
15
 * @property string $message
16
 * @property int $is_admin
17
 * @property int $user_id
18
 * @property string $ip
19
 * @property string $created_at
20
 * @property string $updated_at
21
 */
22
class FeedbackAnswer extends ActiveModel
23
{
24
    /**
25
     * Get post relation
26
     * @return ActiveModel|null
27
     */
28
    public function getFeedbackPost()
29
    {
30
        return FeedbackPost::find($this->feedback_id);
31
    }
32
}