LaravelTraitNamespaceDetector   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A detect() 0 6 1
1
<?php namespace Cerbero\Workflow\Wrappers;
2
3
use Illuminate\Console\AppNamespaceDetectorTrait;
4
5
/**
6
 * Detector that uses a Laravel trait to detect the namespace.
7
 *
8
 * @author	Andrea Marco Sartori
9
 */
10
class LaravelTraitNamespaceDetector implements NamespaceDetectorInterface {
11
12
	use AppNamespaceDetectorTrait;
13
14
	/**
15
	 * Detect the namespace used by an application.
16
	 *
17
	 * @author	Andrea Marco Sartori
18
	 * @return	string
19
	 */
20
	public function detect()
21
	{
22
		$namespace = $this->getAppNamespace();
23
24
		return rtrim($namespace, '\\');
25
	}
26
27
}
28