Test Setup Failed
Push — master ( 93675a...ba3342 )
by Mohamed
14:07 queued 12s
created

ExaminationStudentMigrate::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 2
b 0
f 0
1
<?php
2
3
namespace App\Console\Commands;
4
5
use Illuminate\Console\Command;
6
use App\Http\Controllers\ExaminationStudentsController;
7
8
class ExaminationStudentMigrate extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'examination:migrate {year} {grade}';
16
17
    /**
18
     * This will migrate set of examination student's from DoE to SIS.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'This command designed to map and produce new students id for examination';
23
24
    /**
25
     * Create a new command instance.
26
     *
27
     * @return void
28
     */
29
    public function __construct()
30
    {
31
        parent::__construct();
32
    }
33
34
    /**
35
     * Execute the console command.
36
     *
37
     * @return mixed
38
     */
39
    public function handle()
40
    {
41
        $output = new \Symfony\Component\Console\Output\ConsoleOutput();
42
        $output->writeln('###########################################------Inserting file records------###########################################');
43
        $this->examinationController = new ExaminationStudentsController($this->argument('year'),$this->argument('grade'));
0 ignored issues
show
Bug Best Practice introduced by
The property examinationController does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
44
        $this->examinationController->doMatch();
45
        $output->writeln('###########################################------Finished inserting file records------###########################################');
46
    }
47
}
48