Passed
Push — master ( 7add85...9336e3 )
by Viacheslav
18:01 queued 08:00
created

SchemaResolver::setUpProperties()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 2
dl 0
loc 6
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Swaggest\JsonCli;
4
5
use Swaggest\JsonSchema\Constraint\Properties;
6
use Swaggest\JsonSchema\Schema;
7
use Swaggest\JsonSchema\Structure\ClassStructure;
8
9
class SchemaResolver extends ClassStructure
10
{
11
    public $schemaData = [];
12
13
    public $schemaFiles = [];
14
15
    /**
16
     * @param Properties|static $properties
17
     * @param Schema $ownerSchema
18
     */
19
    public static function setUpProperties($properties, Schema $ownerSchema)
20
    {
21
        $properties->schemaData = Schema::object()->setAdditionalProperties(Schema::object())
22
            ->setDescription('Map of schema url to schema data.');
23
        $properties->schemaFiles = Schema::object()->setAdditionalProperties(Schema::string())
24
            ->setDescription('Map of schema url to file path containing schema data.');
25
    }
26
}