Code Duplication    Length = 7-8 lines in 2 locations

src/OpenApi/OpenApiSchema.php 1 location

@@ 19-25 (lines=7) @@
16
    protected $serverVariables = [];
17
18
19
    public function __construct($jsonFile)
20
    {
21
        if (!is_array($jsonFile)) {
22
            $jsonFile = json_decode($jsonFile, true);
23
        }
24
        $this->jsonFile = $jsonFile;
25
    }
26
27
    public function getServerUrl()
28
    {

src/Swagger/SwaggerSchema.php 1 location

@@ 14-21 (lines=8) @@
11
12
class SwaggerSchema extends Schema
13
{
14
    public function __construct($jsonFile, $allowNullValues = false)
15
    {
16
        if (!is_array($jsonFile)) {
17
            $jsonFile = json_decode($jsonFile, true);
18
        }
19
        $this->jsonFile = $jsonFile;
20
        $this->allowNullValues = (bool) $allowNullValues;
21
    }
22
23
    public function getHttpSchema()
24
    {