Completed
Push — master ( b0764c...fc8584 )
by he
07:50
created

GenerateTask::getSolution()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace App\Console\Commands\Once;
4
5
use App\Entities\Solution;
6
use App\Task\SolutionServer;
7
use Illuminate\Console\Command;
8
9
class GenerateTask extends Command
10
{
11
    protected $signature = 'task:make {id}';
12
13
    protected $description = 'Generate Task by Solution Id';
14
15
    public function handle()
16
    {
17
        $id = $this->argument('id');
18
        $solution = Solution::query()->findOrFail($id);
19
        app(SolutionServer::class)->add($solution)->send();
20
    }
21
}
22