@@ -141,6 +141,7 @@ private function process($data, $import = true, $path = '#')
141141 try {
142142 $ this ->not ->process ($ data , $ import , $ path . '->not ' );
143143 } catch (InvalidValue $ exception ) {
144+ // Expected exception
144145 }
145146 if ($ exception === false ) {
146147 $ this ->fail (new LogicException ('Failed due to logical constraint: not ' ), $ path );
@@ -157,6 +158,7 @@ private function process($data, $import = true, $path = '#')
157158 break ;
158159 }
159160 } catch (InvalidValue $ exception ) {
161+ // Expected exception
160162 }
161163 }
162164 if ($ successes !== 1 ) {
@@ -174,6 +176,7 @@ private function process($data, $import = true, $path = '#')
174176 break ;
175177 }
176178 } catch (InvalidValue $ exception ) {
179+ // Expected exception
177180 }
178181 }
179182 if (!$ successes ) {
@@ -269,6 +272,7 @@ private function process($data, $import = true, $path = '#')
269272 if ($ result instanceof ClassStructure) {
270273 if ($ result ->__validateOnSet ) {
271274 $ result ->__validateOnSet = false ;
275+ /** @noinspection PhpUnusedLocalVariableInspection */
272276 $ validateOnSetHandler = new ScopeExit (function ()use ($ result ){
273277 $ result ->__validateOnSet = true ;
274278 });
@@ -352,7 +356,7 @@ private function process($data, $import = true, $path = '#')
352356 $ pathItems = 'additionalItems ' ;
353357 }
354358
355- if ($ items || $ additionalItems !== null ) {
359+ if ($ items !== null || $ additionalItems !== null ) {
356360 $ itemsLen = is_array ($ items ) ? count ($ items ) : 0 ;
357361 $ index = 0 ;
358362 foreach ($ data as &$ value ) {
0 commit comments