Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
3 / 3 |
| GetNameWithVisibilityTrait | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
3 / 3 |
| getName | |
100.00% |
1 / 1 |
2 | |
100.00% |
3 / 3 |
|||
| <?php | |
| declare(strict_types=1); | |
| namespace Korobochkin\WPKit\DataComponents\Traits\PostMeta; | |
| use Korobochkin\WPKit\PostMeta\PostMetaInterface; | |
| /** | |
| * Trait GetNameWithVisibilityTrait | |
| * @package Korobochkin\WPKit\DataComponents\Traits\PostMeta | |
| */ | |
| trait GetNameWithVisibilityTrait | |
| { | |
| public function getName() | |
| { | |
| /** | |
| * @var $this PostMetaInterface | |
| */ | |
| if (!$this->isVisible()) { | |
| return '_'.$this->name; | |
| } | |
| return $this->name; | |
| } | |
| } |