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

AnySchema   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
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