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.../public_h.../wp-conte.../plugins/wordpres.../src/editors/framewor...
File: readability-analysis.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Editors\Framework;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Editors\Domain\Analysis_Features\Analysis_Feature_Interface;
[4] Fix | Delete
use Yoast\WP\SEO\Helpers\Options_Helper;
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* This class describes the Readability analysis feature.
[8] Fix | Delete
*/
[9] Fix | Delete
class Readability_Analysis implements Analysis_Feature_Interface {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* The options helper.
[13] Fix | Delete
*
[14] Fix | Delete
* @var Options_Helper
[15] Fix | Delete
*/
[16] Fix | Delete
private $options_helper;
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* The constructor.
[20] Fix | Delete
*
[21] Fix | Delete
* @param Options_Helper $options_helper The options helper.
[22] Fix | Delete
*/
[23] Fix | Delete
public function __construct( Options_Helper $options_helper ) {
[24] Fix | Delete
$this->options_helper = $options_helper;
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* If this analysis is enabled.
[29] Fix | Delete
*
[30] Fix | Delete
* @return bool If this analysis is enabled.
[31] Fix | Delete
*/
[32] Fix | Delete
public function is_enabled(): bool {
[33] Fix | Delete
return $this->is_globally_enabled() && $this->is_user_enabled();
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* If this analysis is enabled by the user.
[38] Fix | Delete
*
[39] Fix | Delete
* @return bool If this analysis is enabled by the user.
[40] Fix | Delete
*/
[41] Fix | Delete
private function is_user_enabled(): bool {
[42] Fix | Delete
return ! \get_user_meta( \get_current_user_id(), 'wpseo_content_analysis_disable', true );
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
/**
[46] Fix | Delete
* If this analysis is enabled globally.
[47] Fix | Delete
*
[48] Fix | Delete
* @return bool If this analysis is enabled globally.
[49] Fix | Delete
*/
[50] Fix | Delete
private function is_globally_enabled(): bool {
[51] Fix | Delete
return (bool) $this->options_helper->get( 'content_analysis_active', true );
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
/**
[55] Fix | Delete
* Gets the name.
[56] Fix | Delete
*
[57] Fix | Delete
* @return string The name.
[58] Fix | Delete
*/
[59] Fix | Delete
public function get_name(): string {
[60] Fix | Delete
return 'readabilityAnalysis';
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Gets the legacy key.
[65] Fix | Delete
*
[66] Fix | Delete
* @return string The legacy key.
[67] Fix | Delete
*/
[68] Fix | Delete
public function get_legacy_key(): string {
[69] Fix | Delete
return 'contentAnalysisActive';
[70] Fix | Delete
}
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function