PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.2.0
Defender Security – Malware Scanner, Login Security & Firewall v6.2.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / model / notification / class-free-report.php

class-free-report.php in Defender Security – Malware Scanner, Login Security & Firewall 6.2.0, at src/model/notification/class-free-report.php

60 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Abstract base class for free-version report stubs.
4 *
5 * @package WP_Defender\Model\Notification
6 */
7
8 namespace WP_Defender\Model\Notification;
9
10 /**
11 * Abstract base class for free-version report stubs.
12 */
13 abstract class Free_Report extends \WP_Defender\Model\Notification {
14
15 /**
16 * Returns the default fields shared by all report notifications.
17 *
18 * @return array
19 */
20 protected function base_defaults(): array {
21 return array(
22 'status' => self::STATUS_DISABLED,
23 'in_house_recipients' => array(),
24 'out_house_recipients' => array(),
25 'type' => 'report',
26 'frequency' => 'weekly',
27 'day' => 'sunday',
28 'day_n' => 1,
29 'time' => '4:00',
30 'dry_run' => false,
31 'configs' => array(),
32 );
33 }
34
35 /**
36 * Never dispatches a report in the free version.
37 *
38 * @return bool Always false.
39 */
40 public function maybe_send(): bool {
41 return false;
42 }
43
44 /**
45 * No-op: report sending is a Pro-only feature.
46 */
47 public function send(): void {}
48
49 /**
50 * Additional converting rules.
51 *
52 * @param array $configs The configuration data.
53 *
54 * @return array The type-casted configuration data.
55 */
56 public function type_casting( $configs ): array {
57 return is_array( $configs ) ? $configs : array();
58 }
59 }
60