File tree Expand file tree Collapse file tree 4 files changed +6
-34
lines changed Expand file tree Collapse file tree 4 files changed +6
-34
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,6 @@ public function __construct($type)
22
22
$ this ->types = is_array ($ type ) ? $ type : array ($ type );
23
23
}
24
24
25
- public function has ($ type )
26
- {
27
- return in_array ($ type , $ this ->types );
28
- }
29
-
30
25
public function isValid ($ data )
31
26
{
32
27
$ ok = false ;
Original file line number Diff line number Diff line change @@ -406,17 +406,6 @@ public function setProperties($properties)
406
406
return $ this ;
407
407
}
408
408
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
-
420
409
public function setProperty ($ name , Schema $ schema )
421
410
{
422
411
if (null === $ this ->properties ) {
Original file line number Diff line number Diff line change @@ -43,11 +43,4 @@ public static function export($data)
43
43
{
44
44
return static ::makeSchema ()->export ($ data );
45
45
}
46
-
47
- public static function getAdditionalProperties (OldSchema $ ownerSchema )
48
- {
49
- return null ;
50
- }
51
-
52
-
53
46
}
Original file line number Diff line number Diff line change @@ -11,18 +11,14 @@ class CreateTest extends \PHPUnit_Framework_TestCase
11
11
{
12
12
public function testCreate ()
13
13
{
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 ()
21
17
->setProperty ('two ' , Schema::create ()
22
- ->setProperty ('three ' , Schema::number ()));
18
+ ->setProperty ('three ' , Schema::number ())
19
+ )
20
+ );
23
21
24
-
25
- $ schema ->properties = $ properties ;
26
22
$ rawData = (object )array (
27
23
'stringValue ' => 'abc ' ,
28
24
'one ' => (object )array (
@@ -36,7 +32,6 @@ public function testCreate()
36
32
$ this ->assertSame ('abc ' , $ data ->stringValue );
37
33
$ this ->assertSame (3 , $ data ->one ->two ->three );
38
34
39
-
40
35
$ rawDataTwo = $ schema ->export ($ data );
41
36
$ this ->assertEquals ($ rawData , $ rawDataTwo );
42
37
}
You can’t perform that action at this time.
0 commit comments