-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rewrite all classes to php 7.4 and apply new lint styles
BREAKING CHANGE: Support only PHP 7.4+, Rename almost all classes, Fix some bugs
- Loading branch information
1 parent
d8a0ec8
commit f477622
Showing
31 changed files
with
301 additions
and
925 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace WPSteak\Entities; | ||
|
||
interface IEntity { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace WPSteak\Entities; | ||
|
||
interface IPost extends IEntity { | ||
|
||
public function get_post(): \WP_Post; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace WPSteak\Entities; | ||
|
||
interface ITerm extends IEntity { | ||
|
||
public function get_term(): \WP_Term; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace WPSteak\Entities; | ||
|
||
abstract class Post implements IPost { | ||
|
||
public const POST_TYPE = 'post'; | ||
|
||
protected \WP_Post $post; | ||
|
||
public function __construct( \WP_Post $post ) { | ||
$this->post = $post; | ||
} | ||
|
||
public function get_post(): \WP_Post { | ||
return $this->post; | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace WPSteak\Entities; | ||
|
||
abstract class Term implements ITerm { | ||
|
||
public const TAXONOMY = 'category'; | ||
|
||
protected \WP_Term $term; | ||
|
||
public function __construct( \WP_Term $term ) { | ||
$this->term = $term; | ||
} | ||
|
||
public function get_term(): \WP_Term { | ||
return $this->term; | ||
} | ||
|
||
} |
Oops, something went wrong.