GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 9e7309...ca86c4 )
by Aden
39:37 queued 06:18
created

ModelCloning::excludeOnClone()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace LaravelFlare\Flare\Admin\Models\Traits;
4
5
trait ModelCloning
6
{
7
    /**
8
     * An Array of Fields to Exclude on Clone.
9
     *
10
     * When cloning a Model ceratin data might need to be skipped
11
     * either because it is irrelevant (such as datestamps) or
12
     * because it is primary or unique data in the database.
13
     * 
14
     * @return array
15
     */
16
    public function excludeOnClone()
17
    {
18
        return [
19
            $this->model->getKeyName(),
20
            $this->model->getCreatedAtColumn(),
21
            $this->model->getUpdatedAtColumn(),
22
        ];
23
    }
24
25
    /**
26
     * 
27
     */
28
    public function unCloneableColumns()
29
    {
30
        // We will use this: SHOW INDEXES FROM users WHERE Non_unique != 0 AND Column_name != 'id'
31
        // To determine if there are unCloneable Columns and if that is the case, we will render
32
        // the clone view and validate the unCloneable Columns to be unique before saving.
33
    }
34
}
35