Completed
Push — master ( bd60ab...c7f462 )
by T
02:13
created

Job::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 4
cp 0
rs 9.4286
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace tomzx\Dataflow\Processor\Parallel;
4
5
use tomzx\Dataflow\Node;
6
use tomzx\Dataflow\Processor\Parallel\Threaded;
7
8
class Job extends Threaded {
9
	/**
10
	 * @var \tomzx\Dataflow\Node
11
	 */
12
	private $node;
13
14
	/**
15
	 * @var array
16
	 */
17
	private $arguments;
18
19
	/**
20
	 * @param \tomzx\Dataflow\Node $node
21
	 * @param array                $arguments
22
	 */
23
	public function __construct(Node $node, array $arguments = [])
24
	{
25
		$this->node = $node;
26
		$this->arguments = $arguments;
27
	}
28
29
	/**
30
	 * @return void
31
	 */
32
	public function run()
33
	{
34
		// var_dump($this->node, $this->arguments);
0 ignored issues
show
Unused Code Comprehensibility introduced by
62% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
35
		// Must cast to array since it is a Volatile
36
		call_user_func_array([$this->node, 'process'], (array)$this->arguments);
37
	}
38
}
39