HelloHandler::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace JCIT\jobqueue\jobHandlers;
5
6
use JCIT\jobqueue\interfaces\JobHandlerInterface;
7
use JCIT\jobqueue\interfaces\JobInterface;
8
use JCIT\jobqueue\jobs\HelloJob;
9
10
class HelloHandler implements JobHandlerInterface
11
{
12
    /**
13
     * @param HelloJob $job
14
     */
15 1
    public function handle(JobInterface $job): void
16
    {
17 1
        echo 'Hello ' . $job->getName();
0 ignored issues
show
Bug introduced by
The method getName() does not exist on JCIT\jobqueue\interfaces\JobInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to JCIT\jobqueue\interfaces\JobInterface. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        echo 'Hello ' . $job->/** @scrutinizer ignore-call */ getName();
Loading history...
18 1
    }
19
}
20