LaravelTraitNamespaceDetector::detect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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