Completed
Push — master ( 8af693...a60473 )
by Enrico
03:36
created

AbstractResourceController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Resourceful\Controller;
4
use Silex\Application;
5
6
7
class AbstractResourceController
8
{
9
    protected $schema;
10
11
    use \Resourceful\StoreHelpers\StoreHelpers;
12
13 17
    public function __construct($schema=null)
14
    {
15 17
        $this->schema = $schema;
16 17
    }
17
18 15
	protected function getStore(Application $app)
19
    {
20 15
    	$type = $this->schema?basename($this->schema):'schema';
21
		
22 15
		return $this->getStoreForType($type, $app);
23
    }
24
}
25