Threaded
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 0
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 3
ccs 0
cts 0
cp 0
1
<?php
2
3
namespace tomzx\Dataflow\Processor\Parallel;
4
5 1
if (extension_loaded('pthreads')) {
6
	class Threaded extends \Threaded {
7
8
	}
9
} else {
10
	class Threaded {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type tomzx\Dataflow\Processor\Parallel\Threaded has been defined more than once; this definition is ignored, only the first definition in this file (L6-8) is considered.

This check looks for classes that have been defined more than once in the same file.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
11
12
	}
13
}
14