Completed
Push — master ( 4b53bc...63f157 )
by John
02:34
created

AnySchema::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\PhpApi\Descriptions package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
namespace KleijnWeb\PhpApi\Descriptions\Description\Schema;
9
10
/**
11
 * @author John Kleijn <[email protected]>
12
 */
13
class AnySchema extends Schema
14
{
15
    /**
16
     * ScalarSchema constructor.
17
     *
18
     * @param \stdClass $definition
19
     */
20
    public function __construct(\stdClass $definition = null)
21
    {
22
        $definition = $definition ?: (object)[];
23
        $definition->type = Schema::TYPE_ANY;
24
        parent::__construct($definition);
25
    }
26
}
27