Job   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
c 2
b 1
f 0
lcom 1
cbo 1
dl 0
loc 30
ccs 0
cts 9
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A run() 0 5 1
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
		// Must cast to array since it is a Volatile
35
		call_user_func_array([$this->node, 'process'], (array)$this->arguments);
36
	}
37
}
38