Skip to content

Commit

Permalink
Update to php 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriBouteille committed Dec 14, 2024
1 parent d864ac2 commit c827c46
Show file tree
Hide file tree
Showing 20 changed files with 18 additions and 73 deletions.
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
codeQuality: true,
)
->withSets([
SetList::PHP_81,
SetList::PHP_82,
]);
3 changes: 0 additions & 3 deletions src/Api/CustomModelTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Dbout\WpOrm\Api;

/**
* @since 3.0.0
*/
interface CustomModelTypeInterface
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Api/WithMetaModelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

use Dbout\WpOrm\MetaMappingConfig;

/**
* @since 3.0.0
*/
interface WithMetaModelInterface
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Builders/AbstractWithMetaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
use Dbout\WpOrm\Orm\Database;
use Illuminate\Database\Eloquent\Model;

/**
* @since 3.0.0
*/
abstract class AbstractWithMetaBuilder extends AbstractBuilder
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Enums/PingStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Dbout\WpOrm\Enums;

/**
* @since 3.0.0
*/
enum PingStatus: string
{
case Closed = 'closed';
Expand Down
1 change: 0 additions & 1 deletion src/Enums/PostStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

/**
* @see https://wordpress.org/documentation/article/post-status/
* @since 3.0.0
*/
enum PostStatus: string
{
Expand Down
3 changes: 0 additions & 3 deletions src/Enums/YesNo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Dbout\WpOrm\Enums;

/**
* @since 3.0.0
*/
enum YesNo: string
{
case Yes = 'yes';
Expand Down
3 changes: 0 additions & 3 deletions src/Exceptions/CannotOverrideCustomTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Dbout\WpOrm\Exceptions;

/**
* @since 3.0.0
*/
class CannotOverrideCustomTypeException extends NotAllowedException
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Exceptions/WpOrmException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Dbout\WpOrm\Exceptions;

/**
* @since 3.0.0
*/
class WpOrmException extends \Exception
{
}
3 changes: 0 additions & 3 deletions src/MetaMappingConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

namespace Dbout\WpOrm;

/**
* @since 3.0.0
*/
class MetaMappingConfig
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Scopes/CustomModelTypeScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;

/**
* @since 3.0.0
*/
class CustomModelTypeScope implements Scope
{
/**
Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Attachment/IsMimeTypeTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
use Dbout\WpOrm\Builders\PostBuilder;
use Dbout\WpOrm\Models\Post;

/**
* @since 3.0.0
*/
class IsMimeTypeTap
readonly class IsMimeTypeTap
{
/**
* @param string $mimeType
*/
public function __construct(
protected readonly string $mimeType
protected string $mimeType
) {
}

Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Comment/IsApprovedTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
use Dbout\WpOrm\Builders\CommentBuilder;
use Dbout\WpOrm\Models\Comment;

/**
* @since 3.0.0
*/
class IsApprovedTap
readonly class IsApprovedTap
{
/**
* @param bool $isApproved
*/
public function __construct(
protected readonly bool $isApproved = true
protected bool $isApproved = true
) {
}

Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Comment/IsCommentTypeTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
use Dbout\WpOrm\Builders\CommentBuilder;
use Dbout\WpOrm\Models\Comment;

/**
* @since 3.0.0
*/
class IsCommentTypeTap
readonly class IsCommentTypeTap
{
/**
* @param string $commentType
*/
public function __construct(
protected readonly string $commentType
protected string $commentType
) {
}

Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Comment/IsUserTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
use Dbout\WpOrm\Models\Comment;
use Dbout\WpOrm\Models\User;

/**
* @since 3.0.0
*/
class IsUserTap
readonly class IsUserTap
{
/**
* @param int|User $user
*/
public function __construct(
protected readonly int|User $user
protected int|User $user
) {
}

Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Option/IsAutoloadTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
use Dbout\WpOrm\Enums\YesNo;
use Dbout\WpOrm\Models\Option;

/**
* @since 3.0.0
*/
class IsAutoloadTap
readonly class IsAutoloadTap
{
public function __construct(
protected readonly bool|YesNo $autoload = YesNo::Yes
protected bool|YesNo $autoload = YesNo::Yes
) {
}

Expand Down
5 changes: 1 addition & 4 deletions src/Taps/Post/IsAuthorTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
use Dbout\WpOrm\Models\Post;
use Dbout\WpOrm\Models\User;

/**
* @since 3.0.0
*/
class IsAuthorTap
readonly class IsAuthorTap
{
/**
* @param int|User $author
Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Post/IsPingStatusTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
use Dbout\WpOrm\Enums\PingStatus;
use Dbout\WpOrm\Models\Post;

/**
* @since 3.0.0
*/
class IsPingStatusTap
readonly class IsPingStatusTap
{
/**
* @param string|PingStatus $status
*/
public function __construct(
protected readonly string|PingStatus $status
protected string|PingStatus $status
) {
}

Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Post/IsPostTypeTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
use Dbout\WpOrm\Builders\PostBuilder;
use Dbout\WpOrm\Models\Post;

/**
* @since 3.0.0
*/
class IsPostTypeTap
readonly class IsPostTypeTap
{
/**
* @param string $postType
*/
public function __construct(
protected readonly string $postType
protected string $postType
) {
}

Expand Down
7 changes: 2 additions & 5 deletions src/Taps/Post/IsStatusTap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
use Dbout\WpOrm\Enums\PostStatus;
use Dbout\WpOrm\Models\Post;

/**
* @since 3.0.0
*/
class IsStatusTap
readonly class IsStatusTap
{
/**
* @param string|PostStatus $status
*/
public function __construct(
protected readonly string|PostStatus $status
protected string|PostStatus $status
) {
}

Expand Down

0 comments on commit c827c46

Please sign in to comment.