Passed
Push — master ( 241d97...92d87b )
by Julito
09:22
created

SettingsResolver::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Settings;
6
7
use Doctrine\ORM\NonUniqueResultException;
8
use Sylius\Bundle\SettingsBundle\Resolver\SettingsResolverInterface;
9
10
class SettingsResolver implements SettingsResolverInterface
11
{
12
    public function resolve($schemaAlias, $namespace = null)
13
    {
14
        /*try {
15
            $criteria = [];
16
            if (null !== $namespace) {
17
                $criteria['category'] = $namespace;
18
            }
19
20
            return $this->settingsRepository->findBy($criteria);
21
        } catch (NonUniqueResultException $e) {
22
            $message = sprintf(
23
                'Multiple schemas found for "%s". You should probably define a custom settings resolver for this schema.',
24
                $schemaAlias
25
            );
26
            throw new \LogicException($message);
27
        }*/
28
    }
29
}
30