From c0e8a2b59a4945aa12eb77eb7c593b96adb1f974 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Mon, 12 Feb 2024 17:20:12 +0100 Subject: [PATCH] Change namespace for interface traits --- .phpdoc/template/index.html.twig | 11 ++++++----- README.md | 2 +- .../ArrayAccessTrait.php | 4 ++-- .../CountableTrait.php | 4 ++-- .../IteratorAggregateTrait.php | 4 ++-- src/{InterfaceTraits => Interfaces}/IteratorTrait.php | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-) rename src/{InterfaceTraits => Interfaces}/ArrayAccessTrait.php (97%) rename src/{InterfaceTraits => Interfaces}/CountableTrait.php (95%) rename src/{InterfaceTraits => Interfaces}/IteratorAggregateTrait.php (95%) rename src/{InterfaceTraits => Interfaces}/IteratorTrait.php (97%) diff --git a/.phpdoc/template/index.html.twig b/.phpdoc/template/index.html.twig index 1dc4618..3c519ac 100644 --- a/.phpdoc/template/index.html.twig +++ b/.phpdoc/template/index.html.twig @@ -10,11 +10,12 @@

A collection of generic classes and useful traits for PHP projects.

-

The package currently contains classes for type-sensitive data - structures, error and exception handlers, multiple - traits implementing standard interfaces, and more generic - traits for common use cases. They share the same design principles like - property and method naming schema, highest Psalm and PHPStan coding standards and full PSR-12 +

The package currently contains classes for type-sensitive + data structures, error and exception handlers, multiple + traits implementing standard interfaces, and more generic + traits for common use cases. They share the same design principles + like property and method naming schema, highest coding standards of PHPStan + and Psalm, and full PSR-12 compliance to make sure they can be combined and easily re-used in other projects.

Table of Contents

diff --git a/README.md b/README.md index 1d056e4..b6c4484 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ***A collection of generic classes and useful traits for PHP projects.*** -The package currently contains classes for [type-sensitive data structures](src/DataStructures/), [error and exception handlers](src/ErrorHandlers/), multiple [traits implementing standard interfaces](src/InterfaceTraits/), and more generic [traits for common use cases](src/Traits/). They share the same design principles like property and method naming schema, highest [Psalm](https://psalm.dev/) and [PHPStan](https://phpstan.org/) coding standards and full [PSR-12](https://www.php-fig.org/psr/psr-12/) compliance to make sure they can be combined and easily re-used in other projects. +The package currently contains classes for [type-sensitive data structures](src/DataStructures/), [error and exception handlers](src/ErrorHandlers/), multiple [traits implementing standard interfaces](src/Interfaces/), and more generic [traits for common use cases](src/Traits/). They share the same design principles like property and method naming schema, highest [Psalm](https://psalm.dev/) and [PHPStan](https://phpstan.org/) coding standards and full [PSR-12](https://www.php-fig.org/psr/psr-12/) compliance to make sure they can be combined and easily re-used in other projects. ## Quick Start diff --git a/src/InterfaceTraits/ArrayAccessTrait.php b/src/Interfaces/ArrayAccessTrait.php similarity index 97% rename from src/InterfaceTraits/ArrayAccessTrait.php rename to src/Interfaces/ArrayAccessTrait.php index 1b99e2c..2cc109d 100644 --- a/src/InterfaceTraits/ArrayAccessTrait.php +++ b/src/Interfaces/ArrayAccessTrait.php @@ -21,7 +21,7 @@ declare(strict_types=1); -namespace OCC\Basics\InterfaceTraits; +namespace OCC\Basics\Interfaces; use ArrayAccess; @@ -31,7 +31,7 @@ use ArrayAccess; * Internally it accesses the protected `$_data` array. * * @author Sebastian Meyer - * @package Basics\InterfaceTraits + * @package Basics\Interfaces * * @api * diff --git a/src/InterfaceTraits/CountableTrait.php b/src/Interfaces/CountableTrait.php similarity index 95% rename from src/InterfaceTraits/CountableTrait.php rename to src/Interfaces/CountableTrait.php index 3c231cc..039a725 100644 --- a/src/InterfaceTraits/CountableTrait.php +++ b/src/Interfaces/CountableTrait.php @@ -21,7 +21,7 @@ declare(strict_types=1); -namespace OCC\Basics\InterfaceTraits; +namespace OCC\Basics\Interfaces; use Countable; @@ -31,7 +31,7 @@ use Countable; * Internally it counts the values of the protected `$_data` array. * * @author Sebastian Meyer - * @package Basics\InterfaceTraits + * @package Basics\Interfaces * * @api * diff --git a/src/InterfaceTraits/IteratorAggregateTrait.php b/src/Interfaces/IteratorAggregateTrait.php similarity index 95% rename from src/InterfaceTraits/IteratorAggregateTrait.php rename to src/Interfaces/IteratorAggregateTrait.php index 934fffe..d9d23bb 100644 --- a/src/InterfaceTraits/IteratorAggregateTrait.php +++ b/src/Interfaces/IteratorAggregateTrait.php @@ -21,7 +21,7 @@ declare(strict_types=1); -namespace OCC\Basics\InterfaceTraits; +namespace OCC\Basics\Interfaces; use ArrayIterator; use IteratorAggregate; @@ -32,7 +32,7 @@ use IteratorAggregate; * Internally it iterates over the protected `$_data` array. * * @author Sebastian Meyer - * @package Basics\InterfaceTraits + * @package Basics\Interfaces * * @api * diff --git a/src/InterfaceTraits/IteratorTrait.php b/src/Interfaces/IteratorTrait.php similarity index 97% rename from src/InterfaceTraits/IteratorTrait.php rename to src/Interfaces/IteratorTrait.php index 576e165..f29c5ae 100644 --- a/src/InterfaceTraits/IteratorTrait.php +++ b/src/Interfaces/IteratorTrait.php @@ -21,7 +21,7 @@ declare(strict_types=1); -namespace OCC\Basics\InterfaceTraits; +namespace OCC\Basics\Interfaces; use Iterator; @@ -31,7 +31,7 @@ use Iterator; * Internally it iterates over the protected `$_data` array. * * @author Sebastian Meyer - * @package Basics\InterfaceTraits + * @package Basics\Interfaces * * @api *