Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
3 / 3 |
| PostIdTrait | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
3 / 3 |
| getPostId | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| setPostId | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| <?php | |
| declare(strict_types=1); | |
| namespace Korobochkin\WPKit\DataComponents\Traits; | |
| trait PostIdTrait | |
| { | |
| /** | |
| * @var int Unique Post ID. | |
| */ | |
| protected $postId; | |
| /** | |
| * Returns the post ID. | |
| * | |
| * @return int Post ID. | |
| */ | |
| public function getPostId() | |
| { | |
| return $this->postId; | |
| } | |
| /** | |
| * Set the post ID. | |
| * | |
| * @param int $id | |
| * | |
| * @return $this For chain calls. | |
| */ | |
| public function setPostId($id) | |
| { | |
| $this->postId = $id; | |
| return $this; | |
| } | |
| } |