Expect::string('mysql'), 'user' => Expect::type('?string')->required(), 'password' => Expect::type('?string'), 'options' => Expect::array(), 'debugger' => Expect::bool(true), 'mixed' => Expect::mixed(), 'arr' => Expect::type('array')->default([1]), ], $schema->items); Assert::type($obj, (new Processor)->process($schema, ['user' => ''])); });