Skip to content

Commit 37bb2a2

Browse files
committed
cleanup
1 parent 06c2aa9 commit 37bb2a2

File tree

4 files changed

+6
-34
lines changed

4 files changed

+6
-34
lines changed

src/Constraint/Type.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ public function __construct($type)
2222
$this->types = is_array($type) ? $type : array($type);
2323
}
2424

25-
public function has($type)
26-
{
27-
return in_array($type, $this->types);
28-
}
29-
3025
public function isValid($data)
3126
{
3227
$ok = false;

src/Schema.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -406,17 +406,6 @@ public function setProperties($properties)
406406
return $this;
407407
}
408408

409-
/**
410-
* @param Type $type
411-
* @return Schema
412-
*/
413-
public function setType($type)
414-
{
415-
$this->type = $type;
416-
return $this;
417-
}
418-
419-
420409
public function setProperty($name, Schema $schema)
421410
{
422411
if (null === $this->properties) {

src/Structure/ClassStructure.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,4 @@ public static function export($data)
4343
{
4444
return static::makeSchema()->export($data);
4545
}
46-
47-
public static function getAdditionalProperties(OldSchema $ownerSchema)
48-
{
49-
return null;
50-
}
51-
52-
5346
}

tests/src/PHPUnit/Schema/CreateTest.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@ class CreateTest extends \PHPUnit_Framework_TestCase
1111
{
1212
public function testCreate()
1313
{
14-
$schema = new Schema();
15-
16-
$properties = new Properties();
17-
$properties['stringValue'] = Schema::string();
18-
19-
$properties['one'] =
20-
Schema::create()
14+
$schema = Schema::create()
15+
->setProperty('stringValue', Schema::string())
16+
->setProperty('one', Schema::create()
2117
->setProperty('two', Schema::create()
22-
->setProperty('three', Schema::number()));
18+
->setProperty('three', Schema::number())
19+
)
20+
);
2321

24-
25-
$schema->properties = $properties;
2622
$rawData = (object)array(
2723
'stringValue' => 'abc',
2824
'one' => (object)array(
@@ -36,7 +32,6 @@ public function testCreate()
3632
$this->assertSame('abc', $data->stringValue);
3733
$this->assertSame(3, $data->one->two->three);
3834

39-
4035
$rawDataTwo = $schema->export($data);
4136
$this->assertEquals($rawData, $rawDataTwo);
4237
}

0 commit comments

Comments
 (0)