ResolverMux::getSchemaData()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 5
c 1
b 0
f 0
nc 3
nop 1
dl 0
loc 10
rs 10
1
<?php
2
3
namespace Swaggest\JsonCli\JsonSchema;
4
5
use Swaggest\JsonSchema\RemoteRefProvider;
6
7
class ResolverMux implements RemoteRefProvider
8
{
9
    /** @var RemoteRefProvider[] */
10
    public $resolvers;
11
12
    public function getSchemaData($url)
13
    {
14
        foreach ($this->resolvers as $resolver) {
15
            $data = $resolver->getSchemaData($url);
16
            if (false !== $data) {
17
                return $data;
18
            }
19
        }
20
21
        return false;
22
    }
23
}