diff --git a/mu-plugins/mantle-app/app/jobs/class-example-job.php b/mu-plugins/mantle-app/app/jobs/class-example-job.php index 743f5fee..cd3e1882 100644 --- a/mu-plugins/mantle-app/app/jobs/class-example-job.php +++ b/mu-plugins/mantle-app/app/jobs/class-example-job.php @@ -16,7 +16,8 @@ * Example Job that can be queued. */ class Example_Job implements Job, Can_Queue { - use Queueable, Dispatchable; + use Queueable; + use Dispatchable; /** * Handle the job. diff --git a/mu-plugins/mantle-app/app/models/class-category.php b/mu-plugins/mantle-app/app/models/class-category.php index b9b2064e..cf76586c 100644 --- a/mu-plugins/mantle-app/app/models/class-category.php +++ b/mu-plugins/mantle-app/app/models/class-category.php @@ -26,7 +26,7 @@ class Category extends Term { * * @return Has_Many */ - public function posts() : Has_Many { + public function posts(): Has_Many { return $this->has_many( Post::class ); } } diff --git a/mu-plugins/mantle-app/app/models/class-post.php b/mu-plugins/mantle-app/app/models/class-post.php index b3df29a6..75ea691b 100644 --- a/mu-plugins/mantle-app/app/models/class-post.php +++ b/mu-plugins/mantle-app/app/models/class-post.php @@ -35,7 +35,7 @@ public function category() { * * @return Has_Many */ - public function tags() : Has_Many { + public function tags(): Has_Many { return $this->has_many( Tag::class ); } } diff --git a/mu-plugins/mantle-app/app/models/class-tag.php b/mu-plugins/mantle-app/app/models/class-tag.php index c6b63e2b..126e5bf3 100644 --- a/mu-plugins/mantle-app/app/models/class-tag.php +++ b/mu-plugins/mantle-app/app/models/class-tag.php @@ -26,7 +26,7 @@ class Tag extends Term { * * @return Has_Many */ - public function posts() : Has_Many { + public function posts(): Has_Many { return $this->has_many( Post::class ); } } diff --git a/mu-plugins/mantle-app/app/providers/class-asset-service-provider.php b/mu-plugins/mantle-app/app/providers/class-asset-service-provider.php index e9cbee80..94c8ab73 100644 --- a/mu-plugins/mantle-app/app/providers/class-asset-service-provider.php +++ b/mu-plugins/mantle-app/app/providers/class-asset-service-provider.php @@ -45,12 +45,12 @@ public function boot() { | | Enqueue a raw asset using the asset() helper: | - | asset()->script( 'example-entry' )->async()->src( asset_loader( '/app.js' ) ); - | asset()->style( 'example-entry' )->condition( 'single' )->src( asset_loader( '/app.css' ) ); + | asset()->script( 'example-entry' )->async()->src( asset_loader( '/app.js' ) ); + | asset()->style( 'example-entry' )->condition( 'single' )->src( asset_loader( '/app.css' ) ); | | Enqueue an asset with dependencies from @wordpress/dependency-extraction-webpack-plugin: | - | asset()->script( 'example-block' )->src( asset_loader( '/example-block.js' ) )->dependencies( asset_loader()->dependencies( '/example-block.js' ) ); + | asset()->script( 'example-block' )->src( asset_loader( '/example-block.js' ) )->dependencies( asset_loader()->dependencies( '/example-block.js' ) ); | | Get cookin'! | diff --git a/mu-plugins/mantle-app/composer.json b/mu-plugins/mantle-app/composer.json index 1a4b9a86..18c316ef 100644 --- a/mu-plugins/mantle-app/composer.json +++ b/mu-plugins/mantle-app/composer.json @@ -15,12 +15,11 @@ "fakerphp/faker": "^1.23" }, "require-dev": { - "alleyinteractive/alley-coding-standards": "^1.0", + "alleyinteractive/alley-coding-standards": "^2.0", "nunomaduro/collision": "^6.4", "phpstan/phpstan": "1.10.15", "phpunit/phpunit": "^9.6.10", - "szepeviktor/phpstan-wordpress": "^1.3", - "wp-coding-standards/wpcs": "dev-php-8-1 as 2.3.x-dev" + "szepeviktor/phpstan-wordpress": "^1.3" }, "config": { "allow-plugins": { @@ -44,12 +43,6 @@ }, "minimum-stability": "dev", "prefer-stable": true, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/alleyinteractive/WordPress-Coding-Standards" - } - ], "scripts": { "post-autoload-dump": [ "bin/mantle package:discover", diff --git a/mu-plugins/mantle-app/database/factory/class-category-factory.php b/mu-plugins/mantle-app/database/factory/class-category-factory.php index 1e0d59fe..9c66523d 100644 --- a/mu-plugins/mantle-app/database/factory/class-category-factory.php +++ b/mu-plugins/mantle-app/database/factory/class-category-factory.php @@ -15,13 +15,13 @@ /** * Category Factory * - * @extends \Mantle\Database\Factory\Term_Factory<\App\Models\Category> + * @extends \Mantle\Database\Factory\Term_Factory<\App\Models\Category, \WP_Term, \App\Models\Category> */ class Category_Factory extends \Mantle\Database\Factory\Term_Factory { /** * Model to use when creating objects. * - * @var class-string<\Mantle\Database\Model\Model> + * @var class-string<\App\Models\Category> */ protected string $model = Category::class; diff --git a/mu-plugins/mantle-app/database/factory/class-post-factory.php b/mu-plugins/mantle-app/database/factory/class-post-factory.php index dab44256..246077c7 100644 --- a/mu-plugins/mantle-app/database/factory/class-post-factory.php +++ b/mu-plugins/mantle-app/database/factory/class-post-factory.php @@ -15,13 +15,13 @@ /** * Post Factory * - * @extends \Mantle\Database\Factory\Post_Factory<\App\Models\Post> + * @extends \Mantle\Database\Factory\Post_Factory<\App\Models\Post, \WP_Post, \App\Models\Post> */ class Post_Factory extends \Mantle\Database\Factory\Post_Factory { /** * Model to use when creating objects. * - * @var class-string<\Mantle\Database\Model\Model> + * @var class-string<\App\Models\Post> */ protected string $model = Post::class; @@ -33,7 +33,7 @@ class Post_Factory extends \Mantle\Database\Factory\Post_Factory { public function definition(): array { return [ 'post_title' => $this->faker->sentence(), - 'post_content' => trim( $this->faker->paragraph_blocks( 3 ) ), + 'post_content' => trim( $this->faker->paragraph_blocks( 3 ) ), // @phpstan-ignore-line undefined method 'post_status' => 'publish', 'post_type' => 'post', ]; diff --git a/mu-plugins/mantle-app/database/factory/class-tag-factory.php b/mu-plugins/mantle-app/database/factory/class-tag-factory.php index 0a975ed1..e4504881 100644 --- a/mu-plugins/mantle-app/database/factory/class-tag-factory.php +++ b/mu-plugins/mantle-app/database/factory/class-tag-factory.php @@ -15,13 +15,13 @@ /** * Tag Factory * - * @extends \Mantle\Database\Factory\Term_Factory<\App\Models\Tag> + * @extends \Mantle\Database\Factory\Term_Factory<\App\Models\Tag, \WP_Term, \App\Models\Tag> */ class Tag_Factory extends \Mantle\Database\Factory\Term_Factory { /** * Model to use when creating objects. * - * @var class-string<\Mantle\Database\Model\Model> + * @var class-string<\App\Models\Tag> */ protected string $model = Tag::class; diff --git a/mu-plugins/mantle-app/mantle.php b/mu-plugins/mantle-app/mantle.php index 43d7e990..4f6ad610 100644 --- a/mu-plugins/mantle-app/mantle.php +++ b/mu-plugins/mantle-app/mantle.php @@ -54,7 +54,7 @@ if ( ! file_exists( __DIR__ . '/vendor/wordpress-autoload.php' ) ) { add_action( 'admin_notices', - function() { + function () { printf( '
%s