Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordpres.../src/surfaces
File: open-graph-helpers-surface.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Surfaces;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Exceptions\Forbidden_Property_Mutation_Exception;
[4] Fix | Delete
use Yoast\WP\SEO\Helpers\Open_Graph;
[5] Fix | Delete
use YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface;
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Class Open_Graph_Helpers_Surface.
[9] Fix | Delete
*
[10] Fix | Delete
* Surface for the indexables.
[11] Fix | Delete
*
[12] Fix | Delete
* @property Open_Graph\Image_Helper $image
[13] Fix | Delete
*/
[14] Fix | Delete
class Open_Graph_Helpers_Surface {
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* The DI container.
[18] Fix | Delete
*
[19] Fix | Delete
* @var ContainerInterface
[20] Fix | Delete
*/
[21] Fix | Delete
private $container;
[22] Fix | Delete
[23] Fix | Delete
/**
[24] Fix | Delete
* Loader constructor.
[25] Fix | Delete
*
[26] Fix | Delete
* @param ContainerInterface $container The dependency injection container.
[27] Fix | Delete
*/
[28] Fix | Delete
public function __construct( ContainerInterface $container ) {
[29] Fix | Delete
$this->container = $container;
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* Magic getter for getting helper classes.
[34] Fix | Delete
*
[35] Fix | Delete
* @param string $helper The helper to get.
[36] Fix | Delete
*
[37] Fix | Delete
* @return mixed The helper class.
[38] Fix | Delete
*/
[39] Fix | Delete
public function __get( $helper ) {
[40] Fix | Delete
return $this->container->get( $this->get_helper_class( $helper ) );
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
/**
[44] Fix | Delete
* Magic isset for ensuring helper exists.
[45] Fix | Delete
*
[46] Fix | Delete
* @param string $helper The helper to get.
[47] Fix | Delete
*
[48] Fix | Delete
* @return bool Whether the helper exists.
[49] Fix | Delete
*/
[50] Fix | Delete
public function __isset( $helper ) {
[51] Fix | Delete
return $this->container->has( $this->get_helper_class( $helper ) );
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
/**
[55] Fix | Delete
* Prevents setting dynamic properties and unsetting declared properties
[56] Fix | Delete
* from an inaccessible context.
[57] Fix | Delete
*
[58] Fix | Delete
* @param string $name The property name.
[59] Fix | Delete
* @param mixed $value The property value.
[60] Fix | Delete
*
[61] Fix | Delete
* @return void
[62] Fix | Delete
*
[63] Fix | Delete
* @throws Forbidden_Property_Mutation_Exception Set is never meant to be called.
[64] Fix | Delete
*/
[65] Fix | Delete
public function __set( $name, $value ) { // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed -- __set must have a name and value - PHPCS #3715.
[66] Fix | Delete
throw Forbidden_Property_Mutation_Exception::cannot_set_because_property_is_immutable( $name );
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
/**
[70] Fix | Delete
* Prevents unsetting dynamic properties and unsetting declared properties
[71] Fix | Delete
* from an inaccessible context.
[72] Fix | Delete
*
[73] Fix | Delete
* @param string $name The property name.
[74] Fix | Delete
*
[75] Fix | Delete
* @return void
[76] Fix | Delete
*
[77] Fix | Delete
* @throws Forbidden_Property_Mutation_Exception Unset is never meant to be called.
[78] Fix | Delete
*/
[79] Fix | Delete
public function __unset( $name ) {
[80] Fix | Delete
throw Forbidden_Property_Mutation_Exception::cannot_unset_because_property_is_immutable( $name );
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
/**
[84] Fix | Delete
* Get the class name from a helper slug
[85] Fix | Delete
*
[86] Fix | Delete
* @param string $helper The name of the helper.
[87] Fix | Delete
*
[88] Fix | Delete
* @return string
[89] Fix | Delete
*/
[90] Fix | Delete
protected function get_helper_class( $helper ) {
[91] Fix | Delete
$helper = \implode( '_', \array_map( 'ucfirst', \explode( '_', $helper ) ) );
[92] Fix | Delete
return "Yoast\WP\SEO\Helpers\Open_Graph\\{$helper}_Helper";
[93] Fix | Delete
}
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function