Skip to content

Commit d04e1d4

Browse files
committed
Also fix argument order & tests
1 parent e8345af commit d04e1d4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/JsonSchema/Constraints/TypeConstraint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public function check(&$value = null, $schema = null, JsonPointer $path = null,
6969
$wording[] = self::$wording[$type];
7070
}
7171
$this->addError(ConstraintError::TYPE(), $path, array(
72-
'expected' => $this->implodeWith($wording, ', ', 'or'),
73-
'found' => gettype($value)
72+
'found' => gettype($value),
73+
'expected' => $this->implodeWith($wording, ', ', 'or')
7474
));
7575
}
7676
}

tests/Constraints/OfPropertiesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public function getInvalidTests()
7878
'constraint' => array(
7979
'name' => 'type',
8080
'params' => array(
81-
'expected' => 'array',
82-
'found' => 'a string'
81+
'expected' => 'a string',
82+
'found' => 'array'
8383
)
8484
)
8585
),
@@ -90,8 +90,8 @@ public function getInvalidTests()
9090
'constraint' => array(
9191
'name' => 'type',
9292
'params' => array(
93-
'expected' => 'array',
94-
'found' => 'a number'
93+
'expected' => 'a number',
94+
'found' => 'array'
9595
)
9696
)
9797
),

0 commit comments

Comments
 (0)