Completed
Push — master ( 017d24...1ddffe )
by ARCANEDEV
04:32
created

RolesTableSeeder::syncRoles()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
ccs 0
cts 12
cp 0
rs 9.4285
cc 3
eloc 8
nc 3
nop 1
crap 12
1
<?php namespace Arcanesoft\Blog\Seeds;
2
3
use Arcanesoft\Auth\Seeds\RolesSeeder;
4
5
/**
6
 * Class     RolesTableSeeder
7
 *
8
 * @package  Arcanesoft\Blog\Seeds
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class RolesTableSeeder extends RolesSeeder
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Methods
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Run the database seeds.
20
     */
21
    public function run()
22
    {
23
        $this->seed([
24
            [
25
                'name'        => 'Blog Moderators',
26
                'description' => 'The Blog moderators role.',
27
                'is_locked'   => true,
28
            ],
29
            [
30
                'name'        => 'Blog Authors',
31
                'description' => 'The Blog authors role.',
32
                'is_locked'   => true,
33
            ],
34
        ]);
35
36
        $this->syncAdminRole();
37
        $this->syncRoles([
0 ignored issues
show
Bug introduced by
The method syncRoles() does not seem to exist on object<Arcanesoft\Blog\Seeds\RolesTableSeeder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
38
            'blog-moderators' => 'blog.',
39
            'blog-authors'    => 'blog.posts.',
40
        ]);
41
    }
42
}
43