From ac6da7c38a347491b67f38a863d866d77174ea34 Mon Sep 17 00:00:00 2001 From: Sean Tymon Date: Mon, 20 Jan 2025 23:23:22 +0000 Subject: [PATCH] fix mistakes --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 716df79..5801447 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ $schema = SchemaFactory::object('user') ->default(true), SchemaFactory::object('settings') ->additionalProperties(false) - ->properties([ + ->properties( SchemaFactory::string('theme') ->enum(['light', 'dark']), - ]), + ), ); ``` @@ -571,7 +571,7 @@ $schema = SchemaFactory::object('user') // allOf - all schemas must match $schema = SchemaFactory::object() - ->allOf([ + ->allOf( SchemaFactory::object() ->properties( SchemaFactory::string('name')->required(), @@ -582,11 +582,11 @@ $schema = SchemaFactory::object() ->minimum(18) ->required(), ), - ]); + ); // anyOf - at least one schema must match $schema = SchemaFactory::object('payment') - ->anyOf([ + ->anyOf( SchemaFactory::object() ->properties( SchemaFactory::string('credit_card') @@ -599,11 +599,11 @@ $schema = SchemaFactory::object('payment') ->pattern('^\w{8,}$') ->required(), ), - ]); + ); // oneOf - exactly one schema must match $schema = SchemaFactory::object('contact') - ->oneOf([ + ->oneOf( SchemaFactory::object() ->properties( SchemaFactory::string('email') @@ -616,7 +616,7 @@ $schema = SchemaFactory::object('contact') ->pattern('^\+\d{10,}$') ->required(), ), - ]); + ); // not - schema must not match $schema = SchemaFactory::string('status')