Completed
Push — master ( b64705...d28813 )
by Abdelrahman
08:12
created

Testimonial::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Testimonials\Models;
6
7
use Rinvex\Tenants\Traits\Tenantable;
8
use Cortex\Foundation\Traits\Auditable;
9
use Rinvex\Support\Traits\HashidsTrait;
10
use Spatie\Activitylog\Traits\LogsActivity;
11
use Rinvex\Testimonials\Models\Testimonial as BaseTestimonial;
12
13
/**
14
 * Cortex\Testimonials\Models\Testimonial.
15
 *
16
 * @property int                                                                             $id
17
 * @property int                                                                             $subject_id
18
 * @property string                                                                          $subject_type
19
 * @property int                                                                             $attestant_id
20
 * @property string                                                                          $attestant_type
21
 * @property bool                                                                            $is_approved
22
 * @property string                                                                          $body
23
 * @property \Carbon\Carbon|null                                                             $created_at
24
 * @property \Carbon\Carbon|null                                                             $updated_at
25
 * @property \Carbon\Carbon|null                                                             $deleted_at
26
 * @property-read \Cortex\Auth\Models\User|\Illuminate\Database\Eloquent\Model|\Eloquent     $attestant
27
 * @property-read \Illuminate\Database\Eloquent\Model|\Eloquent                              $subject
28
 * @property \Illuminate\Database\Eloquent\Collection|\Cortex\Tenants\Models\Tenant[]        $tenants
29
 *
30
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial approved()
31
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial disapproved()
32
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereAttestantId($value)
33
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereAttestantType($value)
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 122 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
34
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereBody($value)
35
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereCreatedAt($value)
36
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereDeletedAt($value)
37
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereId($value)
38
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereIsApproved($value)
39
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereSubjectId($value)
40
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereSubjectType($value)
41
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereUpdatedAt($value)
42
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withAllTenants($tenants, $group = null)
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 135 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
43
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withAnyTenants($tenants, $group = null)
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 135 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
44
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withTenants($tenants, $group = null)
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 132 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
45
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withoutAnyTenants()
46
 * @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withoutTenants($tenants, $group = null)
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 135 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
47
 * @mixin \Eloquent
48
 */
49
class Testimonial extends BaseTestimonial
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: created, deleted, updated
Loading history...
50
{
51
    use Auditable;
52
    use Tenantable;
53
    use HashidsTrait;
54
    use LogsActivity;
55
56
    /**
57
     * Indicates whether to log only dirty attributes or all.
58
     *
59
     * @var bool
60
     */
61
    protected static $logOnlyDirty = true;
62
63
    /**
64
     * The attributes that are logged on change.
65
     *
66
     * @var array
67
     */
68
    protected static $logFillable = true;
69
70
    /**
71
     * The attributes that are ignored on change.
72
     *
73
     * @var array
74
     */
75
    protected static $ignoreChangedAttributes = [
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $ignoreChangedAttributes exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
76
        'created_at',
77
        'updated_at',
78
        'deleted_at',
79
    ];
80
}
81