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/wp-conte.../plugins/wordpres.../src/user-met.../applicat...
File: custom-meta-collector.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\User_Meta\Application;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\User_Meta\Domain\Custom_Meta_Interface;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* The collector to get custom user meta.
[7] Fix | Delete
*
[8] Fix | Delete
* @makePublic
[9] Fix | Delete
*/
[10] Fix | Delete
class Custom_Meta_Collector {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* All custom meta.
[14] Fix | Delete
*
[15] Fix | Delete
* @var array<Custom_Meta_Interface> $custom_meta
[16] Fix | Delete
*/
[17] Fix | Delete
private $custom_meta;
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* The constructor.
[21] Fix | Delete
*
[22] Fix | Delete
* @param Custom_Meta_Interface ...$custom_meta All custom meta.
[23] Fix | Delete
*/
[24] Fix | Delete
public function __construct( Custom_Meta_Interface ...$custom_meta ) {
[25] Fix | Delete
$this->custom_meta = $custom_meta;
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
/**
[29] Fix | Delete
* Returns all the custom meta.
[30] Fix | Delete
*
[31] Fix | Delete
* @return array<Custom_Meta_Interface> All the custom meta.
[32] Fix | Delete
*/
[33] Fix | Delete
public function get_custom_meta(): array {
[34] Fix | Delete
return $this->custom_meta;
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Returns the custom meta that can't be empty.
[39] Fix | Delete
*
[40] Fix | Delete
* @return array<string> The custom meta that can't be empty.
[41] Fix | Delete
*/
[42] Fix | Delete
public function get_non_empty_custom_meta(): array {
[43] Fix | Delete
$non_empty_custom_meta = [];
[44] Fix | Delete
foreach ( $this->custom_meta as $custom_meta ) {
[45] Fix | Delete
if ( ! $custom_meta->is_empty_allowed() ) {
[46] Fix | Delete
$non_empty_custom_meta[] = $custom_meta->get_key();
[47] Fix | Delete
}
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
return $non_empty_custom_meta;
[51] Fix | Delete
}
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function