Skip to content

Commit

Permalink
chore: update boilerplate to 0.1.0 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine authored Apr 6, 2024
1 parent 3d7a197 commit a849533
Show file tree
Hide file tree
Showing 23 changed files with 87 additions and 101 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- chore!: Refactor plugin entrypoint to use `WPGraphQL\FacetWP` namespace.
- chore: Implement strict phpstan rules and lint.
- chore: Update Composer dependencies and lint.
- chore: Update WPGraphQL Plugin Boilerplate to v0.1.0.
- ci: Test against WP 6.5.
- ci: Update GitHub Workflows.
- ci: Update Strauss to v0.17.0.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
"require": {
"php": ">=7.4",
"axepress/wp-graphql-plugin-boilerplate": "0.0.9"
"axepress/wp-graphql-plugin-boilerplate": "^0.1.0"
},
"require-dev": {
"codeception/lib-innerbrowser": "^1.0",
Expand Down
19 changes: 10 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\GraphQLType;
Expand All @@ -19,22 +21,21 @@
/**
* Class - ConnectionType
*
* @phpstan-type ConnectionConfig array{
* fromType: string,
* @phpstan-type ConnectionConfig array{fromType:string,
* fromFieldName: string,
* resolve: callable,
* oneToOne?: bool,
* toType?: string,
* connectionArgs?: array<string, array{
* type: string|array<string, string | array<string, string>>,
* connectionArgs?: array<string,array{
* type: string|array<string,string | array<string,string>>,
* description: string,
* defaultValue?: mixed
* }>,
* connectionFields?: array<string, array{
* type: string|array<string, string | array<string, string>>,
* connectionFields?: array<string,array{
* type: string|array<string,string | array<string,string>>,
* description: string,
* args?: array<string, array{
* type: string|array<string, string | array<string, string>>,
* args?: array<string,array{
* type: string|array<string,string | array<string,string>>,
* description: string,
* defaultValue?: mixed,
* }>,
Expand All @@ -56,11 +57,7 @@ public static function init(): void {
/**
* Defines all possible connection args for the GraphQL type.
*
* @return array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: mixed
* }>,
* @return array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:mixed}>
*/
abstract protected static function connection_args(): array;

Expand All @@ -85,11 +82,7 @@ protected static function get_connection_config( $config ): array {
*
* @param ?string[] $filter_by an array of specific connections to return.
*
* @return array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: mixed
* }>
* @return array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:mixed}>
*/
final public static function get_connection_args( ?array $filter_by = null ): array {
$connection_args = static::connection_args();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

if ( ! class_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts\EnumType' ) ) {
Expand All @@ -19,11 +21,7 @@ abstract class EnumType extends Type {
/**
* Gets the Enum values configuration array.
*
* @return array<string, array{
* description: string,
* value: mixed,
* deprecationReason?: string
* }>
* @return array<string,array{description:string,value:mixed,deprecationReason?:string}>
*/
abstract public static function get_values(): array;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\GraphQLType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithInputFields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithFields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

if ( ! class_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts\MutationType' ) ) {
Expand All @@ -19,28 +21,14 @@ abstract class MutationType extends Type {
/**
* Gets the input fields for the mutation.
*
* @return array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: string
* }>
* @return array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:string}>
*/
abstract public static function get_input_fields(): array;

/**
* Gets the fields for the type.
*
* @return array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* args?: array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: mixed
* }>,
* resolve?: callable,
* deprecationReason?: string,
* }>
* @return array<string,array{type:string|array<string,string|array<string,string>>,description:string,args?:array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:mixed}>,resolve?:callable,deprecationReason?:string}>
*/
abstract public static function get_output_fields(): array;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithFields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\GraphQLType;
Expand Down Expand Up @@ -42,7 +44,7 @@ abstract public static function get_description(): string;
/**
* Gets the $config array used to register the type to WPGraphQL.
*
* @return array<string, mixed>
* @return array<string,mixed>
*/
protected static function get_type_config(): array {
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Abstracts;

use WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Traits\TypeResolverTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Helper;

if ( ! class_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Helper\Helper' ) ) {
Expand All @@ -16,11 +18,11 @@
* Class - Helper
*/
class Helper {
/**
* The hook prefix for the plugin.
*
* @var string
*/
/**
* The hook prefix for the plugin.
*
* @var string
*/
public static string $hook_prefix;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces;

if ( ! interface_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\GraphQLType' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces;

if ( ! interface_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\Registrable' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces;

if ( ! interface_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithConnections' ) ) {
Expand All @@ -19,18 +21,7 @@ interface TypeWithConnections extends GraphQLType {
/**
* Gets the properties for the type.
*
* @return array<string, array{
* toType: string,
* description: string,
* args?: array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: mixed
* }>,
* connectionInterfaces?: string[],
* oneToOne?: bool,
* resolve?: callable,
* }>
* @return array<string,array{toType:string,description:string,args?:array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:mixed}>,connectionInterfaces?:string[],oneToOne?:bool,resolve?:callable}>
*/
public static function get_connections(): array;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces;

if ( ! interface_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithFields' ) ) {
Expand All @@ -19,17 +21,7 @@ interface TypeWithFields extends GraphQLType {
/**
* Gets the fields for the type.
*
* @return array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* args?: array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: mixed
* }>,
* resolve?: callable,
* deprecationReason?: string,
* }>
* @return array<string,array{type:string|array<string,string|array<string,string>>,description:string,args?:array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:mixed}>,resolve?:callable,deprecationReason?:string}>
*/
public static function get_fields(): array;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces;

if ( ! interface_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithInputFields' ) ) {
Expand All @@ -19,11 +21,7 @@ interface TypeWithInputFields extends GraphQLType {
/**
* Gets the input fields for the type.
*
* @return array<string, array{
* type: string|array<string, string | array<string, string>>,
* description: string,
* defaultValue?: string
* }>
* @return array<string,array{type:string|array<string,string|array<string,string>>,description:string,defaultValue?:string}>
*/
public static function get_fields(): array;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Modified by AxePress Development using {@see https://github.com/BrianHenryIE/strauss}.
*/

declare( strict_types=1 );

namespace WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces;

if ( ! interface_exists( '\WPGraphQL\FacetWP\Vendor\AxeWP\GraphQL\Interfaces\TypeWithInterfaces' ) ) {
Expand Down
Loading

0 comments on commit a849533

Please sign in to comment.