public function validate($input) { if (!$this->hasValidStructure($input)) { return false; } return parent::validate($input); }
public function testShouldValidateKeysWhenEmpty() { $input = []; $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), true); $keySet = new KeySet($key1, $key2); $this->assertFalse($keySet->validate($input)); }