Completed
Push — master ( 7ec402...2e144b )
by Manel
12:30
created

EnrollmentMobileSeeder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0
ccs 0
cts 11
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A run() 0 5 1
A seedStudies() 0 3 1
1
<?php
2
3
namespace Scool\EnrollmentMobile\Database\Seeds;
4
5
use Illuminate\Database\Seeder;
6
7
8
/**
9
 * Class EnrollmentSeeder
10
 */
11
class EnrollmentMobileSeeder extends Seeder
12
{
13
    /**
14
     * Run the database Seeds.
15
     *
16
     * @return void
17
     */
18
    public function run()
19
    {
20
        $this->seedStudies();
0 ignored issues
show
Unused Code introduced by
The call to the method Scool\EnrollmentMobile\D...leSeeder::seedStudies() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
21
        $this->seedCourses();
0 ignored issues
show
Unused Code introduced by
The call to the method Scool\EnrollmentMobile\D...leSeeder::seedCourses() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
22
    }
23
24
    private function seedStudies()
25
    {
26
    }
27
28
    private function seedCourses()
29
    {
30
    }
31
}
32