File tree Expand file tree Collapse file tree
docs/examples/processors/schema-query-parameter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323};
2424
2525$ openapi = (new Generator ())
26- <<<<<<< HEAD
27- ->withProcessorPipeline (function (Pipeline $ pipeline ) use ($ insertMatch ) {
28- $ pipeline ->insert (new SchemaQueryParameter (), $ insertMatch );
29- })
30- =======
3126 ->withProcessorPipeline (fn (Pipeline $ pipeline ) => $ pipeline ->insert (new SchemaQueryParameter (), $ insertMatch ))
32- >>>>>>> 0 9610 b2 (Add `Schema::hasType() ` to encapsulate `string|array ` duality of schema type (#1936))
3327 ->generate ([__DIR__ . '/app ' ]);
3428// file_put_contents(__DIR__ . '/schema-query-parameter.yaml', $openapi->toYaml());
3529echo $ openapi ->toYaml ();
Original file line number Diff line number Diff line change @@ -515,21 +515,18 @@ public function isNullable(): bool
515515 }
516516
517517 /**
518- <<<<<<< HEAD
519- * @inheritdoc
520- */
521- #[\ReturnTypeWillChange]
522- public function jsonSerialize ()
523- =======
524518 * Check if the given type is valid for this schema.
525519 */
526520 public function hasType (string $ type ): bool
527521 {
528522 return in_array ($ type , (array ) $ this ->type , true );
529523 }
530524
531- public function jsonSerialize (): \stdClass
532- >>>>>>> 0 9610 b2 (Add `Schema::hasType()` to encapsulate `string|array` duality of schema type (#1936))
525+ /**
526+ * @inheritdoc
527+ */
528+ #[\ReturnTypeWillChange]
529+ public function jsonSerialize ()
533530 {
534531 $ data = parent ::jsonSerialize ();
535532
Original file line number Diff line number Diff line change @@ -33,15 +33,7 @@ public function testCustomAttachableImplementationsAreAttached(): void
3333 ->setTypeResolver ($ this ->getTypeResolver ())
3434 ->addAlias ('oaf ' , 'OpenApi\Tests\Fixtures\Annotations ' )
3535 ->addNamespace ('OpenApi\Tests\Fixtures\Annotations \\' )
36- <<<<<<< HEAD
37- ->withProcessorPipeline (function (Pipeline $ processor ) {
38- $ processor ->remove (null , function ($ pipe ) {
39- return !$ pipe instanceof CleanUnusedComponents;
40- });
41- })
42- =======
4336 ->withProcessorPipeline (fn (Pipeline $ processor ) => $ processor ->remove (null , fn ($ pipe ) => !$ pipe instanceof CleanUnusedComponents))
44- >>>>>>> 0 9610 b2 (Add `Schema::hasType() ` to encapsulate `string|array ` duality of schema type (#1936))
4537 ->generate ($ this ->fixtures (['UsingCustomAttachables.php ' ]), $ analysis );
4638
4739 $ schemas = $ analysis ->getAnnotationsOfType (OA \Schema::class, true );
Original file line number Diff line number Diff line change @@ -71,13 +71,7 @@ public function testRemoveMatcher()
7171 $ pipeline ->add ($ this ->pipe ('d ' ));
7272 $ this ->assertEquals ('cd ' , $ pipeline ->process ('' ));
7373
74- <<<<<<< HEAD
75- $ pipeline->remove (null , function ($ pipe ) use ($ pipec ) {
76- return $ pipe !== $ pipec ;
77- });
78- =======
7974 $ pipeline ->remove (null , fn ($ pipe ) => $ pipe !== $ pipec );
80- >>>>>>> 0 9610 b2 (Add `Schema::hasType() ` to encapsulate `string|array ` duality of schema type (#1936))
8175 $ this ->assertEquals ('d ' , $ pipeline ->process ('' ));
8276 }
8377
@@ -101,13 +95,7 @@ public function testInsertMatcher()
10195 $ pipeline ->add ($ this ->pipe ('z ' ));
10296 $ this ->assertEquals ('xz ' , $ pipeline ->process ('' ));
10397
104- <<<<<<< HEAD
105- $ pipeline->insert ($ this ->pipe ('y ' ), function ($ pipes ) {
106- return 1 ;
107- });
108- =======
10998 $ pipeline ->insert ($ this ->pipe ('y ' ), fn ($ pipes ) => 1 );
110- >>>>>>> 0 9610 b2 (Add `Schema::hasType() ` to encapsulate `string|array ` duality of schema type (#1936))
11199 $ this ->assertEquals ('xyz ' , $ pipeline ->process ('' ));
112100 }
113101
You can’t perform that action at this time.
0 commit comments