Completed
Pull Request — develop (#575)
by
unknown
102:40 queued 37:52
created

SchemaService::buildSchemaTree()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: taachja1
5
 * Date: 04.04.17
6
 * Time: 09:50
7
 */
8
namespace Graviton\ApiBundle\Service;
9
10
11
use Graviton\ApiBundle\Manager\DatabaseManager;
12
use Graviton\ExceptionBundle\Exception\NotFoundException;
13
use Graviton\JsonSchemaBundle\Validator\InvalidJsonException;
14
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
15
use Symfony\Component\HttpFoundation\RequestStack;
16
17
class SchemaService
18
{
19
    /** @var ConfigService */
20
    protected $configService;
21
22
    public function __construct(
23
        $configService
24
    ) {
25
        $this->configService = $configService;
26
    }
27
28
    /**
29
     * Should return the full schema tree from cached location, build and save.
30
     *
31
     * @param $classId
32
     * @return mixed
33
     */
34
    public function getSchema($classId)
35
    {
36
        $mainSchema = $this->configService->getJsonFromFile('schema/' . $classId .'.json');
37
            // we should load several levels ...
38
        return $mainSchema;
39
    }
40
41
    /**
42
     * Should build a full schema tree
43
     * @param $classId
44
     */
45
    private function buildSchemaTree($classId)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
Unused Code introduced by
The parameter $classId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
46
    {
47
48
    }
49
50
}