PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / task-list / domain / components / abstract-task-analyzer.php

abstract-task-analyzer.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/task-list/domain/components/abstract-task-analyzer.php

54 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4 namespace Yoast\WP\SEO\Task_List\Domain\Components;
5
6 /**
7 * Abstract class for a task analyzer.
8 */
9 abstract class Abstract_Task_Analyzer implements Task_Analyzer_Interface {
10
11 /**
12 * The title of the analyzer (e.g. "SEO analysis").
13 *
14 * @var string
15 */
16 protected $title;
17
18 /**
19 * The result of the analyzer.
20 *
21 * @var string
22 */
23 protected $result;
24
25 /**
26 * The human-readable label for the result (e.g. "Needs improvement").
27 *
28 * @var string
29 */
30 protected $result_label;
31
32 /**
33 * The description text explaining the result.
34 *
35 * @var string
36 */
37 protected $result_description;
38
39 /**
40 * Returns an array representation of the analyzer data.
41 *
42 * @return array<string, string> Returns in an array format.
43 */
44 public function to_array(): array {
45 return [
46 'type' => $this->get_type(),
47 'title' => $this->title,
48 'result' => $this->result,
49 'resultLabel' => $this->result_label,
50 'resultDescription' => $this->result_description,
51 ];
52 }
53 }
54