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

Job   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A run() 0 6 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
		// 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