diff --git a/.editorconfig b/.editorconfig
index a7c44dd..dd9a2b5 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,9 +2,9 @@ root = true
[*]
charset = utf-8
+end_of_line = lf
indent_size = 4
indent_style = space
-end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
diff --git a/.gitattributes b/.gitattributes
index 9e9519b..1d9c7d2 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,18 +2,19 @@
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# Ignore all test and documentation with "export-ignore".
-/.github export-ignore
-/.gitattributes export-ignore
-/.gitignore export-ignore
-/phpunit.xml.dist export-ignore
-/art export-ignore
-/docs export-ignore
-/tests export-ignore
-/.editorconfig export-ignore
-/.php_cs.dist.php export-ignore
-/psalm.xml export-ignore
-/psalm.xml.dist export-ignore
-/testbench.yaml export-ignore
-/UPGRADING.md export-ignore
-/phpstan.neon.dist export-ignore
+/.github export-ignore
+/.gitattributes export-ignore
+/.gitignore export-ignore
+/phpunit.xml.dist export-ignore
+/art export-ignore
+/docs export-ignore
+/tests export-ignore
+/workbench export-ignore
+/.editorconfig export-ignore
+/.php_cs.dist.php export-ignore
+/psalm.xml export-ignore
+/psalm.xml.dist export-ignore
+/testbench.yaml export-ignore
+/UPGRADING.md export-ignore
+/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
new file mode 100644
index 0000000..e5a9a46
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -0,0 +1,66 @@
+name: Bug Report
+description: Report an Issue or Bug with the Package
+title: "[Bug]: "
+labels: ["bug"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
+ - type: textarea
+ id: what-happened
+ attributes:
+ label: What happened?
+ description: What did you expect to happen?
+ placeholder: I cannot currently do X thing because when I do, it breaks X thing.
+ validations:
+ required: true
+ - type: textarea
+ id: how-to-reproduce
+ attributes:
+ label: How to reproduce the bug
+ description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
+ placeholder: When I do X I see Y.
+ validations:
+ required: true
+ - type: input
+ id: package-version
+ attributes:
+ label: Package Version
+ description: What version of our Package are you running? Please be as specific as possible
+ placeholder: 2.0.0
+ validations:
+ required: true
+ - type: input
+ id: php-version
+ attributes:
+ label: PHP Version
+ description: What version of PHP are you running? Please be as specific as possible
+ placeholder: 8.3.0
+ validations:
+ required: true
+ - type: input
+ id: laravel-version
+ attributes:
+ label: Laravel Version
+ description: What version of Laravel are you running? Please be as specific as possible
+ placeholder: 10.0.0
+ validations:
+ required: true
+ - type: dropdown
+ id: operating-systems
+ attributes:
+ label: Which operating systems does with happen with?
+ description: You may select more than one.
+ multiple: true
+ options:
+ - macOS
+ - Windows
+ - Linux
+ - type: textarea
+ id: notes
+ attributes:
+ label: Notes
+ description: Use this field to provide any other notes that you feel might be relevant to the issue.
+ validations:
+ required: false
diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
new file mode 100644
index 0000000..c761624
--- /dev/null
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -0,0 +1,34 @@
+name: "Dependabot Auto-Merge"
+
+on: pull_request_target
+
+permissions:
+ pull-requests: write
+ contents: write
+
+jobs:
+ dependabot:
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ if: ${{ github.actor == 'dependabot[bot]' }}
+ steps:
+
+ - name: Dependabot metadata
+ id: metadata
+ uses: dependabot/fetch-metadata@v1.6.0
+ with:
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
+
+ - name: Auto-merge Dependabot PRs for semver-minor updates
+ if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
+ run: gh pr merge --auto --merge "$PR_URL"
+ env:
+ PR_URL: ${{github.event.pull_request.html_url}}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+
+ - name: Auto-merge Dependabot PRs for semver-patch updates
+ if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
+ run: gh pr merge --auto --merge "$PR_URL"
+ env:
+ PR_URL: ${{github.event.pull_request.html_url}}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml
new file mode 100644
index 0000000..4d6aa81
--- /dev/null
+++ b/.github/workflows/fix-php-code-style-issues.yml
@@ -0,0 +1,28 @@
+name: Fix PHP code style issues
+
+on:
+ push:
+ paths:
+ - '**.php'
+
+permissions:
+ contents: write
+
+jobs:
+ php-code-styling:
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ github.head_ref }}
+
+ - name: Fix PHP code style issues
+ uses: aglipanci/laravel-pint-action@2.3.1
+
+ - name: Commit changes
+ uses: stefanzweifel/git-auto-commit-action@v5
+ with:
+ commit_message: "chore: fix code styling"
diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml
deleted file mode 100644
index 25e5926..0000000
--- a/.github/workflows/php-cs-fixer.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Check & fix styling
-
-on: [push]
-
-jobs:
- php-cs-fixer:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- ref: ${{ github.head_ref }}
-
- - name: Run PHP CS Fixer
- uses: docker://oskarstark/php-cs-fixer-ga
- with:
- args: --config=.php_cs.dist.php --allow-risky=yes
-
- - name: Commit changes
- uses: stefanzweifel/git-auto-commit-action@v5
- with:
- commit_message: "fix: apply php-cs-fixer changes"
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 4f3f936..f495e76 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -5,18 +5,20 @@ on:
paths:
- '**.php'
- 'phpstan.neon.dist'
+ - '.github/workflows/phpstan.yml'
jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
+ timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.0'
+ php-version: '8.1'
coverage: none
- name: Install composer dependencies
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index a83271c..9ed20b0 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -9,16 +9,15 @@ on:
jobs:
test:
runs-on: ${{ matrix.os }}
+ timeout-minutes: 5
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
- php: [8.1, 8.2]
- laravel: [9.*, 10.*]
+ php: [8.1, 8.2, 8.3]
+ laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- - laravel: 9.*
- testbench: ^7.1
- laravel: 10.*
testbench: ^8.0.10
@@ -45,5 +44,8 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
+ - name: List Installed Dependencies
+ run: composer show -D
+
- name: Execute tests
- run: vendor/bin/pest
+ run: vendor/bin/pest --ci
diff --git a/.gitignore b/.gitignore
index 59f6d20..9567878 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,5 @@
.idea
-.php_cs
-.php_cs.cache
-.phpunit.result.cache
+.phpunit.cache
build
composer.lock
coverage
@@ -11,5 +9,4 @@ phpstan.neon
testbench.yaml
vendor
node_modules
-.php-cs-fixer.cache
coverage.xml
diff --git a/.php_cs.dist.php b/.php_cs.dist.php
deleted file mode 100644
index 8d8a790..0000000
--- a/.php_cs.dist.php
+++ /dev/null
@@ -1,40 +0,0 @@
-in([
- __DIR__ . '/src',
- __DIR__ . '/tests',
- ])
- ->name('*.php')
- ->notName('*.blade.php')
- ->ignoreDotFiles(true)
- ->ignoreVCS(true);
-
-return (new PhpCsFixer\Config())
- ->setRules([
- '@PSR12' => true,
- 'array_syntax' => ['syntax' => 'short'],
- 'ordered_imports' => ['sort_algorithm' => 'alpha'],
- 'no_unused_imports' => true,
- 'not_operator_with_successor_space' => true,
- 'trailing_comma_in_multiline' => true,
- 'phpdoc_scalar' => true,
- 'unary_operator_spaces' => true,
- 'binary_operator_spaces' => true,
- 'blank_line_before_statement' => [
- 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
- ],
- 'phpdoc_single_line_var_spacing' => true,
- 'phpdoc_var_without_name' => true,
- 'class_attributes_separation' => [
- 'elements' => [
- 'method' => 'one',
- ],
- ],
- 'method_argument_space' => [
- 'on_multiline' => 'ensure_fully_multiline',
- 'keep_multiple_spaces_after_comma' => true,
- ],
- 'single_trait_insert_per_statement' => true,
- ])
- ->setFinder($finder);
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d00c512..6996435 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,11 +2,22 @@
All notable changes to `laravel-specification-pattern` will be documented in this file.
+## Unreleased
+
+### Added
+
+- Support for PHP 8.3.
+
+### Removed
+
+- Support for Laravel 9.
+- Support for PHP 8.0.
+
## [v2.0.0] - 2023-03-21
### Added
-- Support from Laravel 10.
+- Support for Laravel 10.
### Changed
diff --git a/README.md b/README.md
index ff29179..bd2990e 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@ use Maartenpaauw\Specifications\Specification;
class AdultSpecification implements Specification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
@@ -87,7 +87,7 @@ use Maartenpaauw\Specifications\Specification;
class AdultSpecification implements Specification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/composer.json b/composer.json
index 7c8d53c..d5fab31 100644
--- a/composer.json
+++ b/composer.json
@@ -16,22 +16,23 @@
}
],
"require": {
- "php": "^8.0",
- "spatie/laravel-package-tools": "^1.9.2",
- "illuminate/contracts": "^9.33|^10.4"
+ "php": "^8.1",
+ "spatie/laravel-package-tools": "^1.14.0",
+ "illuminate/contracts": "^10.0"
},
"require-dev": {
- "larastan/larastan": "^1.0|^2.1",
- "nunomaduro/collision": "^5.11|^6.1",
- "orchestra/testbench": "^6.22|^7.0",
- "pestphp/pest": "^1.21",
- "pestphp/pest-plugin-laravel": "^1.1",
+ "larastan/larastan": "^2.0.1",
+ "laravel/pint": "^1.0",
+ "nunomaduro/collision": "^7.8",
+ "orchestra/testbench": "^8.8",
+ "pestphp/pest": "^2.20",
+ "pestphp/pest-plugin-arch": "^2.5",
+ "pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
- "phpunit/phpunit": "^9.5",
"spatie/laravel-ray": "^1.26",
- "spatie/phpunit-snapshot-assertions": "^4.2"
+ "spatie/phpunit-snapshot-assertions": "^5.1"
},
"autoload": {
"psr-4": {
@@ -40,13 +41,27 @@
},
"autoload-dev": {
"psr-4": {
- "Maartenpaauw\\Specifications\\Tests\\": "tests"
+ "Maartenpaauw\\Specifications\\Tests\\": "tests",
+ "Workbench\\App\\": "workbench/app"
}
},
"scripts": {
+ "post-autoload-dump": "@composer run prepare",
+ "clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
+ "prepare": "@php vendor/bin/testbench package:discover --ansi",
+ "build": [
+ "@composer run prepare",
+ "@php vendor/bin/testbench workbench:build --ansi"
+ ],
+ "start": [
+ "Composer\\Config::disableProcessTimeout",
+ "@composer run build",
+ "@php vendor/bin/testbench serve"
+ ],
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
- "test-coverage": "vendor/bin/pest --coverage"
+ "test-coverage": "vendor/bin/pest --coverage",
+ "format": "vendor/bin/pint"
},
"config": {
"sort-packages": true,
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 6f72802..b65e2d9 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,32 +1,26 @@
-
+
tests
-
- ./src
-
@@ -36,4 +30,9 @@
+
+
+ ./src
+
+
diff --git a/pint.json b/pint.json
new file mode 100644
index 0000000..c6ddb49
--- /dev/null
+++ b/pint.json
@@ -0,0 +1,14 @@
+{
+ "preset": "laravel",
+ "rules": {
+ "blank_line_before_statement": true,
+ "concat_space": {
+ "spacing": "one"
+ },
+ "method_argument_space": true,
+ "single_trait_insert_per_statement": true,
+ "types_spaces": {
+ "space": "single"
+ }
+ }
+}
diff --git a/src/AndSpecification.php b/src/AndSpecification.php
index 54889d8..dc8a7cb 100644
--- a/src/AndSpecification.php
+++ b/src/AndSpecification.php
@@ -12,10 +12,10 @@
final class AndSpecification extends CompositeSpecification
{
/**
- * @param array> $specifications
+ * @param array> $specifications
*/
public function __construct(
- private array $specifications,
+ private readonly array $specifications,
) {
}
diff --git a/src/Commands/MakeSpecificationCommand.php b/src/Commands/MakeSpecificationCommand.php
index d3cbcf8..7aba80b 100644
--- a/src/Commands/MakeSpecificationCommand.php
+++ b/src/Commands/MakeSpecificationCommand.php
@@ -38,7 +38,7 @@ protected function getStub(): string
}
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
protected function getDefaultNamespace($rootNamespace): string
{
@@ -46,7 +46,7 @@ protected function getDefaultNamespace($rootNamespace): string
}
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
protected function buildClass($name): string
{
diff --git a/src/Commands/stubs/specification-composite.stub b/src/Commands/stubs/specification-composite.stub
index 88eeacd..81c2018 100644
--- a/src/Commands/stubs/specification-composite.stub
+++ b/src/Commands/stubs/specification-composite.stub
@@ -12,7 +12,7 @@ use Maartenpaauw\Specifications\CompositeSpecification;
class {{ class }} extends CompositeSpecification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/src/Commands/stubs/specification.stub b/src/Commands/stubs/specification.stub
index fafbc46..6eb7678 100644
--- a/src/Commands/stubs/specification.stub
+++ b/src/Commands/stubs/specification.stub
@@ -12,7 +12,7 @@ use Maartenpaauw\Specifications\Specification;
class {{ class }} implements Specification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/src/CompositeSpecification.php b/src/CompositeSpecification.php
index dea2336..c9b65c7 100644
--- a/src/CompositeSpecification.php
+++ b/src/CompositeSpecification.php
@@ -20,8 +20,7 @@ public function not(): CompositeSpecification
}
/**
- * @param Specification $specification
- *
+ * @param Specification $specification
* @return CompositeSpecification
*/
public function or(Specification $specification): CompositeSpecification
@@ -33,8 +32,7 @@ public function or(Specification $specification): CompositeSpecification
}
/**
- * @param Specification $specification
- *
+ * @param Specification $specification
* @return CompositeSpecification
*/
public function orNot(Specification $specification): CompositeSpecification
@@ -43,8 +41,7 @@ public function orNot(Specification $specification): CompositeSpecification
}
/**
- * @param Specification $specification
- *
+ * @param Specification $specification
* @return CompositeSpecification
*/
public function and(Specification $specification): CompositeSpecification
@@ -56,8 +53,7 @@ public function and(Specification $specification): CompositeSpecification
}
/**
- * @param Specification $specification
- *
+ * @param Specification $specification
* @return CompositeSpecification
*/
public function andNot(Specification $specification): CompositeSpecification
diff --git a/src/NotSpecification.php b/src/NotSpecification.php
index b650b6b..7f18703 100644
--- a/src/NotSpecification.php
+++ b/src/NotSpecification.php
@@ -12,10 +12,10 @@
final class NotSpecification extends CompositeSpecification
{
/**
- * @param Specification $specification
+ * @param Specification $specification
*/
public function __construct(
- private Specification $specification,
+ private readonly Specification $specification,
) {
}
diff --git a/src/OrSpecification.php b/src/OrSpecification.php
index 5c23e71..8b46e13 100644
--- a/src/OrSpecification.php
+++ b/src/OrSpecification.php
@@ -12,10 +12,10 @@
final class OrSpecification extends CompositeSpecification
{
/**
- * @param array> $specifications
+ * @param array> $specifications
*/
public function __construct(
- private array $specifications,
+ private readonly array $specifications,
) {
}
diff --git a/src/Specification.php b/src/Specification.php
index 25a13c6..df4cbc6 100644
--- a/src/Specification.php
+++ b/src/Specification.php
@@ -10,7 +10,7 @@
interface Specification
{
/**
- * @param TCandidate $candidate
+ * @param TCandidate $candidate
*/
public function isSatisfiedBy(mixed $candidate): bool;
}
diff --git a/src/VerboseSpecification.php b/src/VerboseSpecification.php
index 6242d79..786d579 100644
--- a/src/VerboseSpecification.php
+++ b/src/VerboseSpecification.php
@@ -12,11 +12,11 @@
final class VerboseSpecification extends CompositeSpecification
{
/**
- * @param Specification $origin
+ * @param Specification $origin
*/
public function __construct(
- private Specification $origin,
- private string $message = '',
+ private readonly Specification $origin,
+ private readonly string $message = '',
) {
}
@@ -37,7 +37,7 @@ public function message(): string
}
/**
- * @param TCandidate $candidate
+ * @param TCandidate $candidate
*
* @throws DissatisfiedSpecification
*/
diff --git a/tests/AndSpecificationTest.php b/tests/AndSpecificationTest.php
index 6dc4d5c..1ecf2f4 100644
--- a/tests/AndSpecificationTest.php
+++ b/tests/AndSpecificationTest.php
@@ -5,8 +5,8 @@
namespace Maartenpaauw\Specifications\Tests;
use Maartenpaauw\Specifications\AndSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\LengthSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\UppercaseSpecification;
+use Workbench\App\LengthSpecification;
+use Workbench\App\UppercaseSpecification;
class AndSpecificationTest extends TestCase
{
diff --git a/tests/CollectionTest.php b/tests/CollectionTest.php
index 442623c..818e6d0 100644
--- a/tests/CollectionTest.php
+++ b/tests/CollectionTest.php
@@ -5,7 +5,7 @@
namespace Maartenpaauw\Specifications\Tests;
use Illuminate\Support\Collection;
-use Maartenpaauw\Specifications\Tests\Dummy\UppercaseSpecification;
+use Workbench\App\UppercaseSpecification;
class CollectionTest extends TestCase
{
diff --git a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_class__1.php b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_class__1.php
index a33e7f7..10f2d78 100644
--- a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_class__1.php
+++ b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_class__1.php
@@ -12,7 +12,7 @@
class MyBasicSpecification implements Specification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_with_a_candidate_type__1.php b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_with_a_candidate_type__1.php
index 4ce9d82..49c6ec3 100644
--- a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_with_a_candidate_type__1.php
+++ b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_basic_specification_with_a_candidate_type__1.php
@@ -12,7 +12,7 @@
class MyStrictBasicSpecification implements Specification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_class__1.php b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_class__1.php
index 9da1bef..fa70058 100644
--- a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_class__1.php
+++ b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_class__1.php
@@ -12,7 +12,7 @@
class MyCompositeSpecification extends CompositeSpecification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_with_a_candidate_type__1.php b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_with_a_candidate_type__1.php
index 0c31efb..7513874 100644
--- a/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_with_a_candidate_type__1.php
+++ b/tests/Commands/__snapshots__/files/MakeSpecificationCommandTest__it_should_be_possible_to_create_a_composite_specification_with_a_candidate_type__1.php
@@ -12,7 +12,7 @@
class MyStrictCompositeSpecification extends CompositeSpecification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/CompositeSpecificationTest.php b/tests/CompositeSpecificationTest.php
index b879780..91262a4 100644
--- a/tests/CompositeSpecificationTest.php
+++ b/tests/CompositeSpecificationTest.php
@@ -4,8 +4,8 @@
namespace Maartenpaauw\Specifications\Tests;
-use Maartenpaauw\Specifications\Tests\Dummy\NegativeSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\PositiveSpecification;
+use Workbench\App\NegativeSpecification;
+use Workbench\App\PositiveSpecification;
class CompositeSpecificationTest extends TestCase
{
diff --git a/tests/Dummy/LengthSpecificationTest.php b/tests/LengthSpecificationTest.php
similarity index 89%
rename from tests/Dummy/LengthSpecificationTest.php
rename to tests/LengthSpecificationTest.php
index add32b7..bea4e2d 100644
--- a/tests/Dummy/LengthSpecificationTest.php
+++ b/tests/LengthSpecificationTest.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Maartenpaauw\Specifications\Tests;
-use Maartenpaauw\Specifications\Tests\TestCase;
+use Workbench\App\LengthSpecification;
class LengthSpecificationTest extends TestCase
{
diff --git a/tests/Dummy/NegativeSpecificationTest.php b/tests/NegativeSpecificationTest.php
similarity index 83%
rename from tests/Dummy/NegativeSpecificationTest.php
rename to tests/NegativeSpecificationTest.php
index f0c1895..31e57ad 100644
--- a/tests/Dummy/NegativeSpecificationTest.php
+++ b/tests/NegativeSpecificationTest.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Maartenpaauw\Specifications\Tests;
-use Maartenpaauw\Specifications\Tests\TestCase;
+use Workbench\App\NegativeSpecification;
class NegativeSpecificationTest extends TestCase
{
diff --git a/tests/NotSpecificationTest.php b/tests/NotSpecificationTest.php
index 1195acc..bd89814 100644
--- a/tests/NotSpecificationTest.php
+++ b/tests/NotSpecificationTest.php
@@ -5,7 +5,7 @@
namespace Maartenpaauw\Specifications\Tests;
use Maartenpaauw\Specifications\NotSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\UppercaseSpecification;
+use Workbench\App\UppercaseSpecification;
class NotSpecificationTest extends TestCase
{
diff --git a/tests/OrSpecificationTest.php b/tests/OrSpecificationTest.php
index dbd16e0..5280422 100644
--- a/tests/OrSpecificationTest.php
+++ b/tests/OrSpecificationTest.php
@@ -5,8 +5,8 @@
namespace Maartenpaauw\Specifications\Tests;
use Maartenpaauw\Specifications\OrSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\LengthSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\UppercaseSpecification;
+use Workbench\App\LengthSpecification;
+use Workbench\App\UppercaseSpecification;
class OrSpecificationTest extends TestCase
{
diff --git a/tests/Dummy/PositiveSpecificationTest.php b/tests/PositiveSpecificationTest.php
similarity index 83%
rename from tests/Dummy/PositiveSpecificationTest.php
rename to tests/PositiveSpecificationTest.php
index 1bde649..fde7cd0 100644
--- a/tests/Dummy/PositiveSpecificationTest.php
+++ b/tests/PositiveSpecificationTest.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Maartenpaauw\Specifications\Tests;
-use Maartenpaauw\Specifications\Tests\TestCase;
+use Workbench\App\PositiveSpecification;
class PositiveSpecificationTest extends TestCase
{
diff --git a/tests/Dummy/UppercaseSpecificationTest.php b/tests/UppercaseSpecificationTest.php
similarity index 89%
rename from tests/Dummy/UppercaseSpecificationTest.php
rename to tests/UppercaseSpecificationTest.php
index 5a72740..f044e17 100644
--- a/tests/Dummy/UppercaseSpecificationTest.php
+++ b/tests/UppercaseSpecificationTest.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Maartenpaauw\Specifications\Tests;
-use Maartenpaauw\Specifications\Tests\TestCase;
+use Workbench\App\UppercaseSpecification;
class UppercaseSpecificationTest extends TestCase
{
diff --git a/tests/VerboseSpecificationTest.php b/tests/VerboseSpecificationTest.php
index 212cfdb..410e8a4 100644
--- a/tests/VerboseSpecificationTest.php
+++ b/tests/VerboseSpecificationTest.php
@@ -5,8 +5,8 @@
namespace Maartenpaauw\Specifications\Tests;
use Maartenpaauw\Specifications\DissatisfiedSpecification;
-use Maartenpaauw\Specifications\Tests\Dummy\LengthSpecification;
use Maartenpaauw\Specifications\VerboseSpecification;
+use Workbench\App\LengthSpecification;
class VerboseSpecificationTest extends TestCase
{
diff --git a/tests/Dummy/LengthSpecification.php b/workbench/app/LengthSpecification.php
similarity index 79%
rename from tests/Dummy/LengthSpecification.php
rename to workbench/app/LengthSpecification.php
index 0fa7cff..a4a10ea 100644
--- a/tests/Dummy/LengthSpecification.php
+++ b/workbench/app/LengthSpecification.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Workbench\App;
use Maartenpaauw\Specifications\CompositeSpecification;
@@ -12,12 +12,12 @@
class LengthSpecification extends CompositeSpecification
{
public function __construct(
- private int $length,
+ private readonly int $length,
) {
}
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/Dummy/NegativeSpecification.php b/workbench/app/NegativeSpecification.php
similarity index 81%
rename from tests/Dummy/NegativeSpecification.php
rename to workbench/app/NegativeSpecification.php
index 9ea0489..fc79e01 100644
--- a/tests/Dummy/NegativeSpecification.php
+++ b/workbench/app/NegativeSpecification.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Workbench\App;
use Maartenpaauw\Specifications\CompositeSpecification;
@@ -12,7 +12,7 @@
class NegativeSpecification extends CompositeSpecification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/Dummy/PositiveSpecification.php b/workbench/app/PositiveSpecification.php
similarity index 81%
rename from tests/Dummy/PositiveSpecification.php
rename to workbench/app/PositiveSpecification.php
index c24bb17..0719fbd 100644
--- a/tests/Dummy/PositiveSpecification.php
+++ b/workbench/app/PositiveSpecification.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Workbench\App;
use Maartenpaauw\Specifications\CompositeSpecification;
@@ -12,7 +12,7 @@
class PositiveSpecification extends CompositeSpecification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{
diff --git a/tests/Dummy/UppercaseSpecification.php b/workbench/app/UppercaseSpecification.php
similarity index 83%
rename from tests/Dummy/UppercaseSpecification.php
rename to workbench/app/UppercaseSpecification.php
index 826bd89..6be160a 100644
--- a/tests/Dummy/UppercaseSpecification.php
+++ b/workbench/app/UppercaseSpecification.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace Maartenpaauw\Specifications\Tests\Dummy;
+namespace Workbench\App;
use Maartenpaauw\Specifications\CompositeSpecification;
@@ -12,7 +12,7 @@
class UppercaseSpecification extends CompositeSpecification
{
/**
- * @inheritDoc
+ * {@inheritDoc}
*/
public function isSatisfiedBy(mixed $candidate): bool
{