Skip to content

Commit 05a0f45

Browse files
committed
cleanup
1 parent 067c48b commit 05a0f45

File tree

8 files changed

+15
-239
lines changed

8 files changed

+15
-239
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"support": {
2222
"email": "[email protected]"
2323
},
24-
"minimum-stability": "dev",
2524
"prefer-stable": true,
2625
"autoload": {
2726
"psr-4": {

src/Base.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/InvalidValue.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44

55
class InvalidValue extends \Exception
66
{
7-
private $path;
8-
97
public function addPath($path)
108
{
119
$this->message .= ' at ' . $path;
1210
}
1311

14-
public function getPath()
15-
{
16-
return $this->path;
17-
}
18-
1912
const INVALID_VALUE = 1;
2013
const NOT_IMPLEMENTED = 2;
2114
}

src/SchemaLoader.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Swaggest\JsonSchema\Constraint\Type;
99
use Swaggest\JsonSchema\RemoteRef\BasicFetcher;
1010

11-
class SchemaLoader extends Base
11+
class SchemaLoader
1212
{
1313
const ID = 'id';
1414

@@ -306,17 +306,11 @@ private function resolveReference($referencePath)
306306
return $this->refs[$referencePath];
307307
}
308308

309-
310-
public function writeSchema()
309+
/**
310+
* @return static
311+
*/
312+
static function create()
311313
{
312-
314+
return new static;
313315
}
314-
315316
}
316-
317-
/**
318-
* @property $minimum
319-
*/
320-
class __stubJsonSchema
321-
{
322-
}

src/StackTraceStorage.php

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/Structure/ClassStructure.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Swaggest\JsonSchema\Schema;
99
use Swaggest\JsonSchema\OldSchema;
1010

11-
abstract class ClassStructure extends Base implements ClassStructureContract
11+
abstract class ClassStructure implements ClassStructureContract
1212
{
1313
/**
1414
* @return Schema
@@ -43,4 +43,12 @@ public static function export($data)
4343
{
4444
return static::makeSchema()->export($data);
4545
}
46+
47+
/**
48+
* @return static
49+
*/
50+
static function create()
51+
{
52+
return new static;
53+
}
4654
}

src/TODO.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
* implement go-unnamed-style structures
22
* separate `additionalProperties` to an unnamed structure
3-
* check export
4-
* add constraint to stack-trace during import
5-
* check against spec test cases
63
* avoid `(array)` cast in `SchemaLoader`, getaway from `const` fields?
7-
* different exceptions

tests/src/PHPUnit/Misc/StackTraceStorageTest.php

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)