*/ namespace RankMath\SEO_Analysis; defined( 'ABSPATH' ) || exit; /** * Result class. */ class Result { /** * Result id. * * @var string */ private $id; /** * Hold result data. * * @var array */ private $result; /** * Is sub-page. * * @var array */ private $is_subpage; /** * The Constructor. * * @param string $id Result id. * @param array $data Result data. * @param bool $is_subpage Is sub-page result. */ public function __construct( $id, $data, $is_subpage ) { $this->id = $id; $this->result = $data; $this->is_subpage = $is_subpage; } /** * Magic method. * * @param string $method Method name. * @param array $arguments Argument array. * * @return mixed */ public function __call( $method, $arguments ) { $property = substr( $method, 4 ); if ( 'id' === $property ) { return $this->id; } if ( array_key_exists( $property, $this->result ) ) { return $this->result[ $property ]; } return $this->$method(); } /** * Magic method. */ public function __toString() { ob_start(); ?>
' . join( ', ', (array) $data ) . '';
return;
}
}
/**
* Render tag cloud
*
* @param array $data Keywords.
*/
private function render_tag_cloud( $data ) {
$font_size_max = 22;
$font_size_min = 10;
$max = max( $data );
echo '