From 47388b219f4b4c443c76748af1c20c768fdd241e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pel=C3=AD=C5=A1ek?= Date: Mon, 7 Jun 2021 18:57:04 +0200 Subject: [PATCH] Resolved namespace adjustements --- composer.json | 2 +- composer.lock | 53 ++++++++++++++------------- src/AlphabeticalSorter.php | 6 +-- src/HtmlVisitor.php | 46 +++++++++++------------ src/Printer.php | 2 +- src/Sorter.php | 6 +-- src/TextVisitor.php | 36 +++++++++--------- src/TypeKindSorter.php | 6 +-- tests/Integration/HtmlPrinterTest.php | 4 +- tests/Integration/PrintTest.php | 4 +- 10 files changed, 84 insertions(+), 81 deletions(-) diff --git a/composer.json b/composer.json index f6e5ba4..da2972f 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "infinityloop-dev/graphpinator": "^1.0-rc27", + "infinityloop-dev/graphpinator": "^1.0-rc28", "infinityloop-dev/utils": "^2.1.2", "nette/utils": "^3.2" }, diff --git a/composer.lock b/composer.lock index bc3b356..1e9069c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9d55da9e9901810caaf10fb751b13589", + "content-hash": "6f95c3aadaa175cd93ad52c30f759ae7", "packages": [ { "name": "infinityloop-dev/graphpinator", - "version": "v1.0-rc27", + "version": "v1.0-rc28", "source": { "type": "git", "url": "https://github.com/infinityloop-dev/graphpinator.git", - "reference": "2b782698f791c31435d48f7f5df429a5e4c88feb" + "reference": "3b218944f11125410da45f693e77d73d4e43af34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infinityloop-dev/graphpinator/zipball/2b782698f791c31435d48f7f5df429a5e4c88feb", - "reference": "2b782698f791c31435d48f7f5df429a5e4c88feb", + "url": "https://api.github.com/repos/infinityloop-dev/graphpinator/zipball/3b218944f11125410da45f693e77d73d4e43af34", + "reference": "3b218944f11125410da45f693e77d73d4e43af34", "shasum": "" }, "require": { @@ -49,7 +49,10 @@ "type": "library", "autoload": { "psr-4": { - "Graphpinator\\": "src/" + "Graphpinator\\": [ + "src/", + "bc_aliases/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -67,9 +70,9 @@ "homepage": "https://www.infinityloop.dev/", "support": { "issues": "https://github.com/infinityloop-dev/graphpinator/issues", - "source": "https://github.com/infinityloop-dev/graphpinator/tree/v1.0-rc27" + "source": "https://github.com/infinityloop-dev/graphpinator/tree/v1.0-rc28" }, - "time": "2021-06-05T00:04:23+00:00" + "time": "2021-06-07T14:57:22+00:00" }, { "name": "infinityloop-dev/graphpinator-common", @@ -2113,16 +2116,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.4", + "version": "9.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", "shasum": "" }, "require": { @@ -2152,7 +2155,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3", + "sebastian/type": "^2.3.2", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -2200,7 +2203,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" }, "funding": [ { @@ -2212,7 +2215,7 @@ "type": "github" } ], - "time": "2021-03-23T07:16:29+00:00" + "time": "2021-06-05T04:49:07+00:00" }, { "name": "psr/container", @@ -3414,16 +3417,16 @@ }, { "name": "slevomat/coding-standard", - "version": "7.0.8", + "version": "7.0.9", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932" + "reference": "d59652e000bcde019459dcba677de030867d0232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/48141737f9e5ed701ef8bcea2027e701b50bd932", - "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/d59652e000bcde019459dcba677de030867d0232", + "reference": "d59652e000bcde019459dcba677de030867d0232", "shasum": "" }, "require": { @@ -3435,16 +3438,16 @@ "require-dev": { "phing/phing": "2.16.4", "php-parallel-lint/php-parallel-lint": "1.3.0", - "phpstan/phpstan": "0.12.86", + "phpstan/phpstan": "0.12.88", "phpstan/phpstan-deprecation-rules": "0.12.6", - "phpstan/phpstan-phpunit": "0.12.18", + "phpstan/phpstan-phpunit": "0.12.19", "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "7.5.20|8.5.5|9.5.4" + "phpunit/phpunit": "7.5.20|8.5.5|9.5.5" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -3459,7 +3462,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.0.8" + "source": "https://github.com/slevomat/coding-standard/tree/7.0.9" }, "funding": [ { @@ -3471,7 +3474,7 @@ "type": "tidelift" } ], - "time": "2021-05-10T08:51:20+00:00" + "time": "2021-06-07T10:08:42+00:00" }, { "name": "squizlabs/php_codesniffer", diff --git a/src/AlphabeticalSorter.php b/src/AlphabeticalSorter.php index 46b2132..855e495 100644 --- a/src/AlphabeticalSorter.php +++ b/src/AlphabeticalSorter.php @@ -7,9 +7,9 @@ final class AlphabeticalSorter implements \Graphpinator\Printer\Sorter { /** - * @param array<\Graphpinator\Type\Contract\NamedDefinition> $types - * @param array<\Graphpinator\Directive\Contract\Definition> $directives - * @return array<\Graphpinator\Type\Contract\NamedDefinition|\Graphpinator\Directive\Contract\Definition> + * @param array<\Graphpinator\Typesystem\Contract\NamedType> $types + * @param array<\Graphpinator\Typesystem\Contract\Directive> $directives + * @return array<\Graphpinator\Typesystem\Contract\NamedType|\Graphpinator\Typesystem\Contract\Directive> */ public function sort(array $types, array $directives) : array { diff --git a/src/HtmlVisitor.php b/src/HtmlVisitor.php index 212f31a..ebf0f2d 100644 --- a/src/HtmlVisitor.php +++ b/src/HtmlVisitor.php @@ -11,14 +11,14 @@ final class HtmlVisitor implements PrintComponentVisitor private const LINK_TEXTS = ['Q', 'M', 'S']; private const LINK_TITLES = ['Go to query root type', 'Go to mutation root type', 'Go to subscription root type']; - public function visitSchema(\Graphpinator\Type\Schema $schema) : string + public function visitSchema(\Graphpinator\Typesystem\Schema $schema) : string { $query = '' . self::printTypeLink($schema->getQuery()) . ''; - $mutation = $schema->getMutation() instanceof \Graphpinator\Type\Type + $mutation = $schema->getMutation() instanceof \Graphpinator\Typesystem\Type ? '' . self::printTypeLink($schema->getMutation()) . '' : 'null'; - $subscription = $schema->getSubscription() instanceof \Graphpinator\Type\Type + $subscription = $schema->getSubscription() instanceof \Graphpinator\Typesystem\Type ? '' . self::printTypeLink($schema->getSubscription()) . '' : 'null'; @@ -56,7 +56,7 @@ public function visitSchema(\Graphpinator\Type\Schema $schema) : string EOL; } - public function visitType(\Graphpinator\Type\Type $type) : string + public function visitType(\Graphpinator\Typesystem\Type $type) : string { return << @@ -80,7 +80,7 @@ public function visitType(\Graphpinator\Type\Type $type) : string EOL; } - public function visitInterface(\Graphpinator\Type\InterfaceType $interface) : string + public function visitInterface(\Graphpinator\Typesystem\InterfaceType $interface) : string { return << @@ -104,7 +104,7 @@ public function visitInterface(\Graphpinator\Type\InterfaceType $interface) : st EOL; } - public function visitUnion(\Graphpinator\Type\UnionType $union) : string + public function visitUnion(\Graphpinator\Typesystem\UnionType $union) : string { $typeNames = []; @@ -129,7 +129,7 @@ public function visitUnion(\Graphpinator\Type\UnionType $union) : string EOL; } - public function visitInput(\Graphpinator\Type\InputType $input) : string + public function visitInput(\Graphpinator\Typesystem\InputType $input) : string { return << @@ -152,7 +152,7 @@ public function visitInput(\Graphpinator\Type\InputType $input) : string EOL; } - public function visitScalar(\Graphpinator\Type\ScalarType $scalar) : string + public function visitScalar(\Graphpinator\Typesystem\ScalarType $scalar) : string { return << @@ -168,7 +168,7 @@ public function visitScalar(\Graphpinator\Type\ScalarType $scalar) : string EOL; } - public function visitEnum(\Graphpinator\Type\EnumType $enum) : string + public function visitEnum(\Graphpinator\Typesystem\EnumType $enum) : string { return << @@ -191,7 +191,7 @@ public function visitEnum(\Graphpinator\Type\EnumType $enum) : string EOL; } - public function visitDirective(\Graphpinator\Directive\Directive $directive) : string + public function visitDirective(\Graphpinator\Typesystem\Directive $directive) : string { $repeatable = $directive->isRepeatable() ? ' repeatable' @@ -216,7 +216,7 @@ public function visitDirective(\Graphpinator\Directive\Directive $directive) : s EOL; } - public function visitField(\Graphpinator\Field\Field $field) : string + public function visitField(\Graphpinator\Typesystem\Field\Field $field) : string { $link = self::printTypeLink($field->getType()); @@ -232,7 +232,7 @@ public function visitField(\Graphpinator\Field\Field $field) : string EOL; } - public function visitArgument(\Graphpinator\Argument\Argument $argument) : string + public function visitArgument(\Graphpinator\Typesystem\Argument\Argument $argument) : string { $defaultValue = ''; $link = '' . self::printTypeLink($argument->getType()) . ''; @@ -306,7 +306,7 @@ public function glue(array $entries) : string /** * @return array */ - private static function recursiveGetInterfaces(\Graphpinator\Type\InterfaceSet $implements) : array + private static function recursiveGetInterfaces(\Graphpinator\Typesystem\InterfaceSet $implements) : array { $return = []; @@ -318,13 +318,13 @@ private static function recursiveGetInterfaces(\Graphpinator\Type\InterfaceSet $ return $return; } - private static function printTypeLink(\Graphpinator\Type\Contract\Definition $type) : string + private static function printTypeLink(\Graphpinator\Typesystem\Contract\Type $type) : string { return match ($type::class) { - \Graphpinator\Type\NotNullType::class => + \Graphpinator\Typesystem\NotNullType::class => self::printTypeLink($type->getInnerType()) . '!', - \Graphpinator\Type\ListType::class => + \Graphpinator\Typesystem\ListType::class => '[' . self::printTypeLink($type->getInnerType()) . ']', @@ -332,9 +332,9 @@ private static function printTypeLink(\Graphpinator\Type\Contract\Definition $ty }; } - private static function printNamedTypeLink(\Graphpinator\Type\Contract\NamedDefinition $type) : string + private static function printNamedTypeLink(\Graphpinator\Typesystem\Contract\NamedType $type) : string { - $href = \str_starts_with($type->getNamedType()::class, 'Graphpinator\Type\Spec') + $href = \str_starts_with($type->getNamedType()::class, 'Graphpinator\Typesystem\Spec') ? '' : 'href="#graphql-type-' . $type->getNamedType()->getName() . '"'; $description = self::normalizeString($type->getNamedType()->getDescription()); @@ -346,7 +346,7 @@ private static function printNamedTypeLink(\Graphpinator\Type\Contract\NamedDefi private static function printDirectiveLink(\Graphpinator\DirectiveUsage\DirectiveUsage $directiveUsage) : string { - $href = \str_starts_with($directiveUsage->getDirective()::class, 'Graphpinator\Directive\Spec') + $href = \str_starts_with($directiveUsage->getDirective()::class, 'Graphpinator\Typesystem\Spec') ? '' : 'href="#graphql-directive-' . $directiveUsage->getDirective()->getName() . '"'; $description = self::normalizeString($directiveUsage->getDirective()->getDescription()); @@ -389,7 +389,7 @@ private static function emptyLine() : string return '
 
'; } - private function printImplements(\Graphpinator\Type\InterfaceSet $implements) : string + private function printImplements(\Graphpinator\Typesystem\InterfaceSet $implements) : string { if (\count($implements) === 0) { return ''; @@ -399,7 +399,7 @@ private function printImplements(\Graphpinator\Type\InterfaceSet $implements) : . \implode(' & ', self::recursiveGetInterfaces($implements)); } - private function printDirectiveUsages(\Graphpinator\DirectiveUsage\DirectiveUsageSet $set) : string + private function printDirectiveUsages(\Graphpinator\Typesystem\DirectiveUsage\DirectiveUsageSet $set) : string { $return = ''; @@ -411,7 +411,7 @@ private function printDirectiveUsages(\Graphpinator\DirectiveUsage\DirectiveUsag } private function printItems( - \Graphpinator\Field\FieldSet|\Graphpinator\Argument\ArgumentSet|\Graphpinator\EnumItem\EnumItemSet $set, + \Graphpinator\Typesystem\Field\FieldSet|\Graphpinator\Typesystem\Argument\ArgumentSet|\Graphpinator\Typesystem\EnumItem\EnumItemSet $set, ) : string { $result = ''; @@ -489,7 +489,7 @@ private function printValue(\Graphpinator\Value\InputedValue $value) : string return $openingChar . '' . $components . '' . $closingChar; } - private function printArguments(\Graphpinator\Directive\Directive|\Graphpinator\Field\Field $component) : string + private function printArguments(\Graphpinator\Typesystem\Directive|\Graphpinator\Typesystem\Field\Field $component) : string { if ($component->getArguments()->count() === 0) { return ''; diff --git a/src/Printer.php b/src/Printer.php index d969ce5..ec85fa9 100644 --- a/src/Printer.php +++ b/src/Printer.php @@ -22,7 +22,7 @@ public function __construct( ?? new AlphabeticalSorter(); } - public function printSchema(\Graphpinator\Type\Schema $schema) : string + public function printSchema(\Graphpinator\Typesystem\Schema $schema) : string { $entries = [$schema->accept($this->visitor)]; $printables = $this->sorter->sort($schema->getContainer()->getTypes(), $schema->getContainer()->getDirectives()); diff --git a/src/Sorter.php b/src/Sorter.php index 3a4a5d9..7858df0 100644 --- a/src/Sorter.php +++ b/src/Sorter.php @@ -7,9 +7,9 @@ interface Sorter { /** - * @param array<\Graphpinator\Type\Contract\NamedDefinition> $types - * @param array<\Graphpinator\Directive\Contract\Definition> $directives - * @return array<\Graphpinator\Type\Contract\NamedDefinition|\Graphpinator\Directive\Contract\Definition> + * @param array<\Graphpinator\Typesystem\Contract\NamedType> $types + * @param array<\Graphpinator\Typesystem\Contract\Directive> $directives + * @return array<\Graphpinator\Typesystem\Contract\NamedType|\Graphpinator\Typesystem\Contract\Directive> */ public function sort(array $types, array $directives) : array; } diff --git a/src/TextVisitor.php b/src/TextVisitor.php index b757dd8..c556c17 100644 --- a/src/TextVisitor.php +++ b/src/TextVisitor.php @@ -8,12 +8,12 @@ final class TextVisitor implements PrintComponentVisitor { private const INDENT_SPACES = 2; - public function visitSchema(\Graphpinator\Type\Schema $schema) : string + public function visitSchema(\Graphpinator\Typesystem\Schema $schema) : string { - $mutationName = $schema->getMutation() instanceof \Graphpinator\Type\Type + $mutationName = $schema->getMutation() instanceof \Graphpinator\Typesystem\Type ? $schema->getMutation()->getName() : 'null'; - $subscriptionName = $schema->getSubscription() instanceof \Graphpinator\Type\Type + $subscriptionName = $schema->getSubscription() instanceof \Graphpinator\Typesystem\Type ? $schema->getSubscription()->getName() : 'null'; $indentation = \str_repeat(' ', self::INDENT_SPACES); @@ -27,7 +27,7 @@ public function visitSchema(\Graphpinator\Type\Schema $schema) : string . '}'; } - public function visitType(\Graphpinator\Type\Type $type) : string + public function visitType(\Graphpinator\Typesystem\Type $type) : string { return $this->printDescription($type->getDescription()) . 'type ' . $type->getName() @@ -37,7 +37,7 @@ public function visitType(\Graphpinator\Type\Type $type) : string . '}'; } - public function visitInterface(\Graphpinator\Type\InterfaceType $interface) : string + public function visitInterface(\Graphpinator\Typesystem\InterfaceType $interface) : string { return $this->printDescription($interface->getDescription()) . 'interface ' . $interface->getName() @@ -47,7 +47,7 @@ public function visitInterface(\Graphpinator\Type\InterfaceType $interface) : st . '}'; } - public function visitUnion(\Graphpinator\Type\UnionType $union) : string + public function visitUnion(\Graphpinator\Typesystem\UnionType $union) : string { $typeNames = []; @@ -61,7 +61,7 @@ public function visitUnion(\Graphpinator\Type\UnionType $union) : string . ' = ' . \implode(' | ', $typeNames); } - public function visitInput(\Graphpinator\Type\InputType $input) : string + public function visitInput(\Graphpinator\Typesystem\InputType $input) : string { return $this->printDescription($input->getDescription()) . 'input ' . $input->getName() @@ -70,14 +70,14 @@ public function visitInput(\Graphpinator\Type\InputType $input) : string . '}'; } - public function visitScalar(\Graphpinator\Type\ScalarType $scalar) : string + public function visitScalar(\Graphpinator\Typesystem\ScalarType $scalar) : string { return $this->printDescription($scalar->getDescription()) . 'scalar ' . $scalar->getName() . $this->printDirectiveUsages($scalar->getDirectiveUsages()); } - public function visitEnum(\Graphpinator\Type\EnumType $enum) : string + public function visitEnum(\Graphpinator\Typesystem\EnumType $enum) : string { return $this->printDescription($enum->getDescription()) . 'enum ' . $enum->getName() @@ -86,7 +86,7 @@ public function visitEnum(\Graphpinator\Type\EnumType $enum) : string . '}'; } - public function visitDirective(\Graphpinator\Directive\Directive $directive) : string + public function visitDirective(\Graphpinator\Typesystem\Directive $directive) : string { $schema = $this->printDescription($directive->getDescription()) . 'directive @' . $directive->getName(); @@ -102,7 +102,7 @@ public function visitDirective(\Graphpinator\Directive\Directive $directive) : s return $schema . ' on ' . \implode(' | ', $directive->getLocations()); } - public function visitField(\Graphpinator\Field\Field $field) : string + public function visitField(\Graphpinator\Typesystem\Field\Field $field) : string { $schema = $this->printItemDescription($field->getDescription()) . $field->getName(); @@ -114,7 +114,7 @@ public function visitField(\Graphpinator\Field\Field $field) : string return $schema . ': ' . $field->getType()->printName() . $this->printDirectiveUsages($field->getDirectiveUsages()); } - public function visitArgument(\Graphpinator\Argument\Argument $argument) : string + public function visitArgument(\Graphpinator\Typesystem\Argument\Argument $argument) : string { $schema = $this->printItemDescription($argument->getDescription()) . $argument->getName() . ': ' . $argument->getType()->printName(); @@ -126,7 +126,7 @@ public function visitArgument(\Graphpinator\Argument\Argument $argument) : strin return $schema . $this->printDirectiveUsages($argument->getDirectiveUsages()); } - public function visitDirectiveUsage(\Graphpinator\DirectiveUsage\DirectiveUsage $directiveUsage) : string + public function visitDirectiveUsage(\Graphpinator\Typesystem\DirectiveUsage\DirectiveUsage $directiveUsage) : string { $schema = '@' . $directiveUsage->getDirective()->getName(); $printableArguments = []; @@ -147,7 +147,7 @@ public function visitDirectiveUsage(\Graphpinator\DirectiveUsage\DirectiveUsage return $schema; } - public function visitEnumItem(\Graphpinator\EnumItem\EnumItem $enumItem) : string + public function visitEnumItem(\Graphpinator\Typesystem\EnumItem\EnumItem $enumItem) : string { return $this->printItemDescription($enumItem->getDescription()) . $enumItem->getName() . $this->printDirectiveUsages($enumItem->getDirectiveUsages()); @@ -161,7 +161,7 @@ public function glue(array $entries) : string /** * @return array */ - private static function recursiveGetInterfaces(\Graphpinator\Type\InterfaceSet $implements) : array + private static function recursiveGetInterfaces(\Graphpinator\Typesystem\InterfaceSet $implements) : array { $return = []; @@ -195,7 +195,7 @@ private function printItemDescription(?string $description) : string return '"""' . \PHP_EOL . $description . \PHP_EOL . '"""' . \PHP_EOL; } - private function printImplements(\Graphpinator\Type\InterfaceSet $implements) : string + private function printImplements(\Graphpinator\Typesystem\InterfaceSet $implements) : string { if (\count($implements) === 0) { return ''; @@ -204,7 +204,7 @@ private function printImplements(\Graphpinator\Type\InterfaceSet $implements) : return ' implements ' . \implode(' & ', self::recursiveGetInterfaces($implements)); } - private function printDirectiveUsages(\Graphpinator\DirectiveUsage\DirectiveUsageSet $set) : string + private function printDirectiveUsages(\Graphpinator\Typesystem\DirectiveUsage\DirectiveUsageSet $set) : string { $return = ''; @@ -216,7 +216,7 @@ private function printDirectiveUsages(\Graphpinator\DirectiveUsage\DirectiveUsag } private function printItems( - \Graphpinator\Field\FieldSet|\Graphpinator\Argument\ArgumentSet|\Graphpinator\EnumItem\EnumItemSet $set, + \Graphpinator\Typesystem\Field\FieldSet|\Graphpinator\Typesystem\Argument\ArgumentSet|\Graphpinator\Typesystem\EnumItem\EnumItemSet $set, ) : string { $result = ''; diff --git a/src/TypeKindSorter.php b/src/TypeKindSorter.php index 4ad57cb..09c351a 100644 --- a/src/TypeKindSorter.php +++ b/src/TypeKindSorter.php @@ -7,9 +7,9 @@ class TypeKindSorter implements \Graphpinator\Printer\Sorter { /** - * @param array<\Graphpinator\Type\Contract\NamedDefinition> $types - * @param array<\Graphpinator\Directive\Contract\Definition> $directives - * @return array<\Graphpinator\Type\Contract\NamedDefinition|\Graphpinator\Directive\Contract\Definition> + * @param array<\Graphpinator\Typesystem\Contract\NamedType> $types + * @param array<\Graphpinator\Typesystem\Contract\Directive> $directives + * @return array<\Graphpinator\Typesystem\Contract\NamedType|\Graphpinator\Typesystem\Contract\Directive> */ public function sort(array $types, array $directives) : array { diff --git a/tests/Integration/HtmlPrinterTest.php b/tests/Integration/HtmlPrinterTest.php index 71532f9..e287c2f 100644 --- a/tests/Integration/HtmlPrinterTest.php +++ b/tests/Integration/HtmlPrinterTest.php @@ -410,10 +410,10 @@ public function simpleDataProvider() : array /** * @dataProvider simpleDataProvider - * @param \Graphpinator\Type\Contract\Definition $type + * @param \Graphpinator\Typesystem\Entity $type * @param string $print */ - public function testSimple(\Graphpinator\Typesystem\Entity $type, string $print) : void + public function testSimple(\Graphpinator\Typesystem\Contract\Entity $type, string $print) : void { $visitor = new \Graphpinator\Printer\HtmlVisitor(); self::assertSame($print, $type->accept($visitor)); diff --git a/tests/Integration/PrintTest.php b/tests/Integration/PrintTest.php index 09575bd..540f624 100644 --- a/tests/Integration/PrintTest.php +++ b/tests/Integration/PrintTest.php @@ -123,10 +123,10 @@ enumValues( /** * @dataProvider simpleDataProvider - * @param \Graphpinator\Type\Contract\Definition $type + * @param \Graphpinator\Typesystem\Contract\Entity $type * @param string $print */ - public function testSimple(\Graphpinator\Typesystem\Entity $type, string $print) : void + public function testSimple(\Graphpinator\Typesystem\Contract\Entity $type, string $print) : void { $visitor = new \Graphpinator\Printer\TextVisitor(); self::assertSame($print, $type->accept($visitor));