Completed
Branch FET/11399/verify-paypal-creden... (c7ad03)
by
unknown
66:22 queued 52:43
created

EE_Recommended_Versions::displayUpcomingRequiredVersion()   B

Complexity

Conditions 4
Paths 2

Size

Total Lines 23
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 16
nc 2
nop 0
dl 0
loc 23
rs 8.7972
c 0
b 0
f 0
1
<?php
2
3
use EventEspresso\core\services\request\middleware\RecommendedVersions;
4
5
defined('EVENT_ESPRESSO_VERSION') || exit('No direct script access allowed');
6
7
8
9
/**
10
 * Class EE_Recommended_Versions
11
 * checks required and recommended versions for both WP and PHP
12
 * terminates the request if minimum required versions are not met
13
 *
14
 * @deprecated
15
 * @package       Event Espresso
16
 * @subpackage    core
17
 * @author        Brent Christensen
18
 * @since         4.8.20
19
 */
20
class EE_Recommended_Versions extends EE_Middleware
0 ignored issues
show
Deprecated Code introduced by
The class EE_Middleware has been deprecated.

This class, trait or interface has been deprecated.

Loading history...
21
{
22
23
24
    /**
25
     * @deprecated
26
     * @param EE_Request $request
27
     * @param EE_Response   $response
28
     * @return EE_Response
29
     */
30
    public function handle_request(EE_Request $request, EE_Response $response)
31
    {
32
        EE_Error::doing_it_wrong(
33
            __METHOD__,
34
            sprintf(
35
                esc_html__(
36
                    'This class is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace',
37
                    'event_espresso'
38
                ),
39
                'EventEspresso\core\services\request\middleware\RecommendedVersions',
40
                '\core\services\request',
41
                'EventEspresso\core\services\request'
42
            ),
43
            '4.9.52'
44
        );
45
        return $response;
46
    }
47
48
49
    /**
50
     * @deprecated
51
     * @param string $version_to_check
52
     * @param string $operator
53
     * @return bool
54
     */
55
    public static function check_wp_version($version_to_check = EE_MIN_WP_VER_REQUIRED, $operator = '>=')
56
    {
57
        EE_Error::doing_it_wrong(
58
            __METHOD__,
59
            sprintf(
60
                esc_html__(
61
                    'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace',
62
                    'event_espresso'
63
                ),
64
                'EventEspresso\core\services\request\middleware\RecommendedVersions::compareWordPressVersion()',
65
                '\core\services\request',
66
                'EventEspresso\core\services\request'
67
            ),
68
            '4.9.52',
69
            '5.0.0'
70
        );
71
        return RecommendedVersions::compareWordPressVersion($version_to_check, $operator);
72
    }
73
74
75
76
    /**
77
     * @deprecated
78
     * @return void
79
     */
80
    public function minimum_wp_version_error()
81
    {
82
        EE_Error::doing_it_wrong(
83
            __METHOD__,
84
            sprintf(
85
                esc_html__(
86
                    'This method is deprecated. Please use %1$s instead. All Event Espresso request stack classes have been moved to %2$s and are now under the %3$s namespace',
87
                    'event_espresso'
88
                ),
89
                'EventEspresso\core\services\request\middleware\RecommendedVersions::minimumWpVersionError()',
90
                '\core\services\request',
91
                'EventEspresso\core\services\request'
92
            ),
93
            '4.9.52'
94
        );
95
    }
96
97
}
98