Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| Data_Point_Literal | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| get_value | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Class Data Point Literal. |
| 4 | * |
| 5 | * @package automattic/jetpack-mu-wpcom |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\Jetpack_Mu_Wpcom\Global_Styles; |
| 9 | |
| 10 | require_once __DIR__ . '/interface-data-point.php'; |
| 11 | |
| 12 | /** |
| 13 | * Literal Data Point. |
| 14 | */ |
| 15 | class Data_Point_Literal implements Data_Point { |
| 16 | |
| 17 | /** |
| 18 | * Holds the literal value. |
| 19 | * |
| 20 | * @var mixed |
| 21 | */ |
| 22 | private $value; |
| 23 | |
| 24 | /** |
| 25 | * Constructor. |
| 26 | * |
| 27 | * @param array $meta Data point description. |
| 28 | */ |
| 29 | public function __construct( $meta ) { |
| 30 | if ( array_key_exists( 'default', $meta ) ) { |
| 31 | $this->value = $meta['default']; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Implements \Automattic\Jetpack\Jetpack_Mu_Wpcom\Global_Styles\Data_Point interface. |
| 37 | * |
| 38 | * @return mixed The literal value. |
| 39 | */ |
| 40 | public function get_value() { |
| 41 | return $this->value; |
| 42 | } |
| 43 | } |