Skip to content

Commit

Permalink
refctor: adjust child classes after adding options-helper to the parent
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Sep 16, 2024
1 parent 0a7eb2d commit db295e4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/editors/framework/site/base-site-information.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class Base_Site_Information {
*
* @var Options_Helper $options_helper
*/
protected $optios_helper;
protected $options_helper;

/**
* The constructor.
Expand Down
7 changes: 0 additions & 7 deletions src/editors/framework/site/post-site-information.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ class Post_Site_Information extends Base_Site_Information {
*/
private $promotion_manager;

/**
* The options helper.
*
* @var Options_Helper $options_helper
*/
protected $options_helper;

/**
* Constructs the class.
*
Expand Down
33 changes: 0 additions & 33 deletions src/editors/framework/site/term-site-information.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,12 @@

use WP_Taxonomy;
use WP_Term;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Product_Helper;
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
use Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository;
use Yoast\WP\SEO\Surfaces\Meta_Surface;

/**
* The Term_Site_Information class.
*/
class Term_Site_Information extends Base_Site_Information {

/**
* The options helper.
*
* @var Options_Helper
*/
protected $options_helper;

/**
* The taxonomy.
*
Expand All @@ -36,27 +24,6 @@ class Term_Site_Information extends Base_Site_Information {
*/
private $term;

/**
* The constructor.
*
* @param Options_Helper $options_helper The options helper.
* @param Short_Link_Helper $short_link_helper The short link helper.
* @param Wistia_Embed_Permission_Repository $wistia_embed_permission_repository The wistia embed permission
* repository.
* @param Meta_Surface $meta The meta surface.
* @param Product_Helper $product_helper The product helper.
*/
public function __construct(
Options_Helper $options_helper,
Short_Link_Helper $short_link_helper,
Wistia_Embed_Permission_Repository $wistia_embed_permission_repository,
Meta_Surface $meta,
Product_Helper $product_helper
) {
parent::__construct( $short_link_helper, $wistia_embed_permission_repository, $meta, $product_helper, $options_helper );
$this->options_helper = $options_helper;
}

/**
* Sets the term for the information object and retrieves its taxonomy.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function set_up() {
$this->meta_surface = Mockery::mock( Meta_Surface::class );
$this->product_helper = Mockery::mock( Product_Helper::class );

$this->instance = new Term_Site_Information( $this->options_helper, $this->short_link_helper, $this->wistia_embed_repo, $this->meta_surface, $this->product_helper );
$this->instance = new Term_Site_Information( $this->short_link_helper, $this->wistia_embed_repo, $this->meta_surface, $this->product_helper, $this->options_helper );
$taxonomy = Mockery::mock( WP_Taxonomy::class )->makePartial();
$taxonomy->rewrite = false;
$mock_term = Mockery::mock( WP_Term::class )->makePartial();
Expand Down

0 comments on commit db295e4

Please sign in to comment.