1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
namespace AutomateWoo\Exceptions;
use LogicException;
/** * InvalidIntegration exception class. * * Thrown when a required integration is invalid. * * @version 5.3.0 */ class InvalidIntegration extends LogicException implements Exception {
/** * Create exception for when an integration plugin is not active. * * @param string $name * * @return static */ public static function plugin_not_active( string $name ): InvalidIntegration { return new static( sprintf( '%s plugin is not active.', $name ) ); }
/** * Create exception for when an integration plugin version is not supported. * * @param string $name * @param string $min_required_version * * @return static */ public static function plugin_version_not_supported( string $name, string $min_required_version ): InvalidIntegration { return new static( sprintf( 'The version of %s is not supported. The minimum required version is %s.', $name, $min_required_version ) ); } }
|