PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.5
YayMail – WooCommerce Email Customizer v4.4.5
4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 All 57 releases
← All changes | vendor-prefixed/src/Registry/LicenseRegistry.php +10 -10 4.4.1 → 4.4.5 View file →
@@ -14,12 +14,12 @@
14 14 private array $plugins = [];
15 15 /**
16 16 * Register a plugin's license info. Applies the decoration filter before storing.
17 17 */
18 - public function register($info) : void
18 + public function register($info): void
19 19 {
20 20 /** @var PluginLicenseInfo $info */
21 - $info = \apply_filters('yaycommerce_admin_shell_plugin_info', $info, $info->slug);
21 + $info = apply_filters('yaycommerce_admin_shell_plugin_info', $info, $info->slug);
22 22 $this->plugins[$info->slug] = $info;
23 23 }
24 24 /**
25 25 * Return all registered PluginLicenseInfo objects, keyed by slug.
@@ -25,27 +25,27 @@
25 25 * Return all registered PluginLicenseInfo objects, keyed by slug.
26 26 *
27 27 * @return PluginLicenseInfo[]
28 28 */
29 - public function all() : array
29 + public function all(): array
30 30 {
31 31 // Refactor old licensing plugin integration
32 32 $old_plugins = [];
33 - $handlers = ['YayMailScoped\\YAYDP\\License\\License_Handler', 'YayMailScoped\\YayMail\\License\\LicenseHandler', 'YayMailScoped\\Yay_Currency\\License\\LicenseHandler', 'YayMailScoped\\Yay_Swatches\\License\\LicenseHandler', 'YayMailScoped\\YayExtra\\License\\LicenseHandler', 'YayMailScoped\\YayRev\\License\\LicenseHandler', 'YayMailScoped\\YayWholesaleB2B\\License\\LicenseHandler', 'YayMailScoped\\YaySMTP\\License\\LicenseHandler'];
33 + $handlers = ['YayMailScoped\YAYDP\License\License_Handler', 'YayMailScoped\YayMail\License\LicenseHandler', 'YayMailScoped\Yay_Currency\License\LicenseHandler', 'YayMailScoped\Yay_Swatches\License\LicenseHandler', 'YayMailScoped\YayExtra\License\LicenseHandler', 'YayMailScoped\YayRev\License\LicenseHandler', 'YayMailScoped\YayWholesaleB2B\License\LicenseHandler', 'YayMailScoped\YaySMTP\License\LicenseHandler'];
34 34 foreach ($handlers as $handler) {
35 - if (\class_exists($handler) && \method_exists($handler, 'get_licensing_plugins')) {
35 + if (class_exists($handler) && method_exists($handler, 'get_licensing_plugins')) {
36 36 $plugins = $handler::get_licensing_plugins();
37 - if (\is_array($plugins)) {
38 - $old_plugins = \array_merge($old_plugins, $plugins);
37 + if (is_array($plugins)) {
38 + $old_plugins = array_merge($old_plugins, $plugins);
39 39 }
40 40 }
41 41 }
42 - return \array_merge($this->plugins, $old_plugins);
42 + return array_merge($this->plugins, $old_plugins);
43 43 }
44 44 /**
45 45 * Return a single PluginLicenseInfo by slug, or null if not registered.
46 46 */
47 - public function get(string $slug) : ?PluginLicenseInfo
47 + public function get(string $slug): ?PluginLicenseInfo
48 48 {
49 49 return $this->plugins[$slug] ?? null;
50 50 }
51 51 /**
@@ -50,9 +50,9 @@
50 50 }
51 51 /**
52 52 * Check if a slug is registered.
53 53 */
54 - public function has(string $slug) : bool
54 + public function has(string $slug): bool
55 55 {
56 56 return isset($this->plugins[$slug]);
57 57 }
58 58 }