Completed
Branch dependabot/composer/tijsverkoy... (491ea6)
by
unknown
32:00 queued 25:42
created
core/middleware/EE_Detect_File_Editor_Request.core.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -11,27 +11,27 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Detect_File_Editor_Request extends EE_Middleware
13 13
 {
14
-    /**
15
-     * @deprecated
16
-     * @param EE_Request  $request
17
-     * @param EE_Response $response
18
-     * @return EE_Response
19
-     */
20
-    public function handle_request(EE_Request $request, EE_Response $response)
21
-    {
22
-        EE_Error::doing_it_wrong(
23
-            __METHOD__,
24
-            sprintf(
25
-                esc_html__(
26
-                    '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',
27
-                    'event_espresso'
28
-                ),
29
-                'EventEspresso\core\services\request\middleware\DetectFileEditorRequest',
30
-                '\core\services\request',
31
-                'EventEspresso\core\services\request'
32
-            ),
33
-            '4.9.52'
34
-        );
35
-        return $response;
36
-    }
14
+	/**
15
+	 * @deprecated
16
+	 * @param EE_Request  $request
17
+	 * @param EE_Response $response
18
+	 * @return EE_Response
19
+	 */
20
+	public function handle_request(EE_Request $request, EE_Response $response)
21
+	{
22
+		EE_Error::doing_it_wrong(
23
+			__METHOD__,
24
+			sprintf(
25
+				esc_html__(
26
+					'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',
27
+					'event_espresso'
28
+				),
29
+				'EventEspresso\core\services\request\middleware\DetectFileEditorRequest',
30
+				'\core\services\request',
31
+				'EventEspresso\core\services\request'
32
+			),
33
+			'4.9.52'
34
+		);
35
+		return $response;
36
+	}
37 37
 }
Please login to merge, or discard this patch.
core/middleware/EE_Middleware.core.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,27 +19,27 @@
 block discarded – undo
19 19
  */
20 20
 abstract class EE_Middleware implements EEI_Request_Decorator
21 21
 {
22
-    /**
23
-     * @deprecated
24
-     * @param    EE_Request  $request
25
-     * @param    EE_Response $response
26
-     * @return    EE_Response
27
-     */
28
-    protected function process_request_stack(EE_Request $request, EE_Response $response)
29
-    {
30
-        EE_Error::doing_it_wrong(
31
-            __METHOD__,
32
-            sprintf(
33
-                esc_html__(
34
-                    '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',
35
-                    'event_espresso'
36
-                ),
37
-                'EventEspresso\core\services\request\middleware\Middleware',
38
-                '\core\services\request',
39
-                'EventEspresso\core\services\request'
40
-            ),
41
-            '4.9.52'
42
-        );
43
-        return $response;
44
-    }
22
+	/**
23
+	 * @deprecated
24
+	 * @param    EE_Request  $request
25
+	 * @param    EE_Response $response
26
+	 * @return    EE_Response
27
+	 */
28
+	protected function process_request_stack(EE_Request $request, EE_Response $response)
29
+	{
30
+		EE_Error::doing_it_wrong(
31
+			__METHOD__,
32
+			sprintf(
33
+				esc_html__(
34
+					'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',
35
+					'event_espresso'
36
+				),
37
+				'EventEspresso\core\services\request\middleware\Middleware',
38
+				'\core\services\request',
39
+				'EventEspresso\core\services\request'
40
+			),
41
+			'4.9.52'
42
+		);
43
+		return $response;
44
+	}
45 45
 }
Please login to merge, or discard this patch.
core/EE_Bootstrap.core.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -12,78 +12,78 @@
 block discarded – undo
12 12
  */
13 13
 class EE_Bootstrap
14 14
 {
15
-    /**
16
-     * load_espresso_addons
17
-     * runs during the WP 'plugins_loaded' action at priority 1
18
-     * and is the initial loading phase for EE addons
19
-     * no other logic should be performed at this point
20
-     */
21
-    public static function load_espresso_addons()
22
-    {
23
-        do_action('AHEE__EE_Bootstrap__load_espresso_addons');
24
-    }
15
+	/**
16
+	 * load_espresso_addons
17
+	 * runs during the WP 'plugins_loaded' action at priority 1
18
+	 * and is the initial loading phase for EE addons
19
+	 * no other logic should be performed at this point
20
+	 */
21
+	public static function load_espresso_addons()
22
+	{
23
+		do_action('AHEE__EE_Bootstrap__load_espresso_addons');
24
+	}
25 25
 
26 26
 
27
-    /**
28
-     * detect_activations_or_upgrades
29
-     * runs during the WP 'plugins_loaded' action at priority 3
30
-     * Now that all of the addons have been loaded,
31
-     * we can determine if anything needs activating or upgrading
32
-     */
33
-    public static function detect_activations_or_upgrades()
34
-    {
35
-        do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades');
36
-    }
27
+	/**
28
+	 * detect_activations_or_upgrades
29
+	 * runs during the WP 'plugins_loaded' action at priority 3
30
+	 * Now that all of the addons have been loaded,
31
+	 * we can determine if anything needs activating or upgrading
32
+	 */
33
+	public static function detect_activations_or_upgrades()
34
+	{
35
+		do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades');
36
+	}
37 37
 
38 38
 
39
-    /**
40
-     * load_core_configuration
41
-     * runs during the WP 'plugins_loaded' action at priority 5
42
-     * Now that the database is assumed to be at the correct version
43
-     * we can load and set all of the system configurations
44
-     */
45
-    public static function load_core_configuration()
46
-    {
47
-        do_action('AHEE__EE_Bootstrap__load_core_configuration');
48
-    }
39
+	/**
40
+	 * load_core_configuration
41
+	 * runs during the WP 'plugins_loaded' action at priority 5
42
+	 * Now that the database is assumed to be at the correct version
43
+	 * we can load and set all of the system configurations
44
+	 */
45
+	public static function load_core_configuration()
46
+	{
47
+		do_action('AHEE__EE_Bootstrap__load_core_configuration');
48
+	}
49 49
 
50 50
 
51
-    /**
52
-     * register_shortcodes_modules_and_widgets
53
-     * runs during the WP 'plugins_loaded' action at priority 7
54
-     * and handles registering all o four shortcodes, modules and widgets
55
-     * so that they are ready to be used throughout the system
56
-     */
57
-    public static function register_shortcodes_modules_and_widgets()
58
-    {
59
-        do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets');
60
-    }
51
+	/**
52
+	 * register_shortcodes_modules_and_widgets
53
+	 * runs during the WP 'plugins_loaded' action at priority 7
54
+	 * and handles registering all o four shortcodes, modules and widgets
55
+	 * so that they are ready to be used throughout the system
56
+	 */
57
+	public static function register_shortcodes_modules_and_widgets()
58
+	{
59
+		do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets');
60
+	}
61 61
 
62 62
 
63
-    /**
64
-     * brew_espresso
65
-     * runs during the WP 'plugins_loaded' action at priority 9
66
-     * bootstrapping is considered complete at this point,
67
-     * so let the fun begin...
68
-     */
69
-    public static function brew_espresso()
70
-    {
71
-        do_action('AHEE__EE_Bootstrap__brew_espresso');
72
-    }
63
+	/**
64
+	 * brew_espresso
65
+	 * runs during the WP 'plugins_loaded' action at priority 9
66
+	 * bootstrapping is considered complete at this point,
67
+	 * so let the fun begin...
68
+	 */
69
+	public static function brew_espresso()
70
+	{
71
+		do_action('AHEE__EE_Bootstrap__brew_espresso');
72
+	}
73 73
 
74 74
 
75
-    /**
76
-     * @deprecated 4.9.53
77
-     */
78
-    public function run_request_stack()
79
-    {
80
-    }
75
+	/**
76
+	 * @deprecated 4.9.53
77
+	 */
78
+	public function run_request_stack()
79
+	{
80
+	}
81 81
 
82 82
 
83
-    /**
84
-     * @deprecated 4.9.53
85
-     */
86
-    public function build_request_stack()
87
-    {
88
-    }
83
+	/**
84
+	 * @deprecated 4.9.53
85
+	 */
86
+	public function build_request_stack()
87
+	{
88
+	}
89 89
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_Simple_HTML_Field.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  */
8 8
 class EE_Simple_HTML_Field extends EE_Text_Field_Base
9 9
 {
10
-    /**
11
-     * removes all tags which a WP Post wouldn't allow in its content normally
12
-     *
13
-     * @param string $value
14
-     * @return string
15
-     */
16
-    public function prepare_for_set($value)
17
-    {
18
-        return parent::prepare_for_set(wp_kses("$value", EEH_HTML::get_simple_tags()));
19
-    }
10
+	/**
11
+	 * removes all tags which a WP Post wouldn't allow in its content normally
12
+	 *
13
+	 * @param string $value
14
+	 * @return string
15
+	 */
16
+	public function prepare_for_set($value)
17
+	{
18
+		return parent::prepare_for_set(wp_kses("$value", EEH_HTML::get_simple_tags()));
19
+	}
20 20
 }
Please login to merge, or discard this patch.
core/db_models/strategies/EE_Return_None_Where_Conditions.strategy.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@
 block discarded – undo
10 10
  */
11 11
 class EE_Return_None_Where_Conditions extends EE_Default_Where_Conditions
12 12
 {
13
-    /**
14
-     * @return array[]
15
-     * @throws EE_Error
16
-     */
17
-    protected function _get_default_where_conditions(): array
18
-    {
19
-        if ($this->_model->has_primary_key_field()) {
20
-            return [$this->_model->primary_key_name() => ['<', 0]];
21
-        }
22
-        $fk_field = $this->_model->get_a_field_of_type('EE_Foreign_Key_Field_Base');
23
-        return [
24
-            'AND*impossible' => [
25
-                $fk_field->get_name() => ['IS_NULL'],
26
-                $fk_field->get_name() => 'IS_NOT_NULL',
27
-            ],
28
-        ];
29
-    }
13
+	/**
14
+	 * @return array[]
15
+	 * @throws EE_Error
16
+	 */
17
+	protected function _get_default_where_conditions(): array
18
+	{
19
+		if ($this->_model->has_primary_key_field()) {
20
+			return [$this->_model->primary_key_name() => ['<', 0]];
21
+		}
22
+		$fk_field = $this->_model->get_a_field_of_type('EE_Foreign_Key_Field_Base');
23
+		return [
24
+			'AND*impossible' => [
25
+				$fk_field->get_name() => ['IS_NULL'],
26
+				$fk_field->get_name() => 'IS_NOT_NULL',
27
+			],
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.
core/db_models/strategies/EE_CPT_Where_Conditions.strategy.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@
 block discarded – undo
11 11
  */
12 12
 class EE_CPT_Where_Conditions extends EE_CPT_Minimum_Where_Conditions
13 13
 {
14
-    /**
15
-     * Gets the where default where conditions for a custom post type model
16
-     *
17
-     * @return array
18
-     * @throws EE_Error
19
-     * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
20
-     */
21
-    protected function _get_default_where_conditions(): array
22
-    {
23
-        $status_field = $this->_get_field_on_column('post_status');
24
-        return array_merge(
25
-            parent::_get_default_where_conditions(),
26
-            [
27
-                $status_field->get_name() => ['NOT IN', ['auto-draft', 'trash']]
28
-            ]
29
-        );
30
-    }
14
+	/**
15
+	 * Gets the where default where conditions for a custom post type model
16
+	 *
17
+	 * @return array
18
+	 * @throws EE_Error
19
+	 * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
20
+	 */
21
+	protected function _get_default_where_conditions(): array
22
+	{
23
+		$status_field = $this->_get_field_on_column('post_status');
24
+		return array_merge(
25
+			parent::_get_default_where_conditions(),
26
+			[
27
+				$status_field->get_name() => ['NOT IN', ['auto-draft', 'trash']]
28
+			]
29
+		);
30
+	}
31 31
 }
Please login to merge, or discard this patch.
core/db_models/strategies/EE_Soft_Delete_Where_Conditions.strategy.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -15,45 +15,45 @@
 block discarded – undo
15 15
  */
16 16
 class EE_Soft_Delete_Where_Conditions extends EE_Default_Where_Conditions
17 17
 {
18
-    /**
19
-     * Gets the where default where conditions for a custom post type model
20
-     *
21
-     * @return array
22
-     * @throws EE_Error
23
-     * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
24
-     */
25
-    protected function _get_default_where_conditions(): array
26
-    {
27
-        $trashed_field_name = $this->deleted_field_name();
28
-        return [
29
-            $trashed_field_name => false,
30
-        ];
31
-    }
18
+	/**
19
+	 * Gets the where default where conditions for a custom post type model
20
+	 *
21
+	 * @return array
22
+	 * @throws EE_Error
23
+	 * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
24
+	 */
25
+	protected function _get_default_where_conditions(): array
26
+	{
27
+		$trashed_field_name = $this->deleted_field_name();
28
+		return [
29
+			$trashed_field_name => false,
30
+		];
31
+	}
32 32
 
33 33
 
34
-    /**
35
-     * Searches for field on the model of type 'deleted_flag'. if it is found,
36
-     * returns it's name.
37
-     *
38
-     * @return string
39
-     * @throws EE_Error
40
-     */
41
-    private function deleted_field_name(): string
42
-    {
43
-        $field = $this->_model->get_a_field_of_type('EE_Trashed_Flag_Field');
44
-        if ($field) {
45
-            return $field->get_name();
46
-        } else {
47
-            throw new EE_Error(
48
-                sprintf(
49
-                    esc_html__(
50
-                        'We are trying to find the deleted flag field on %s, but none was found. Are you sure there is a field of type EE_Trashed_Flag_Field in %s constructor?',
51
-                        'event_espresso'
52
-                    ),
53
-                    get_class($this),
54
-                    get_class($this)
55
-                )
56
-            );
57
-        }
58
-    }
34
+	/**
35
+	 * Searches for field on the model of type 'deleted_flag'. if it is found,
36
+	 * returns it's name.
37
+	 *
38
+	 * @return string
39
+	 * @throws EE_Error
40
+	 */
41
+	private function deleted_field_name(): string
42
+	{
43
+		$field = $this->_model->get_a_field_of_type('EE_Trashed_Flag_Field');
44
+		if ($field) {
45
+			return $field->get_name();
46
+		} else {
47
+			throw new EE_Error(
48
+				sprintf(
49
+					esc_html__(
50
+						'We are trying to find the deleted flag field on %s, but none was found. Are you sure there is a field of type EE_Trashed_Flag_Field in %s constructor?',
51
+						'event_espresso'
52
+					),
53
+					get_class($this),
54
+					get_class($this)
55
+				)
56
+			);
57
+		}
58
+	}
59 59
 }
Please login to merge, or discard this patch.
core/db_models/strategies/EE_Restriction_Generator_WP_User.strategy.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Restriction_Generator_WP_User extends EE_Restriction_Generator_Base
13 13
 {
14
-    /**
15
-     * @return EE_Default_Where_Conditions[]
16
-     * @throws EE_Error
17
-     */
18
-    protected function _generate_restrictions(): array
19
-    {
20
-        return [
21
-            // if they can't access users, they can still access themselves
22
-            EE_Restriction_Generator_Base::get_cap_name(
23
-                $this->model(),
24
-                $this->action()
25
-            ) => new EE_Default_Where_Conditions(
26
-                [
27
-                    EE_QUERY_PLACEHOLDER_USER_FIELD_NAME => EE_QUERY_PLACEHOLDER_CURRENT_USER,
28
-                ]
29
-            ),
14
+	/**
15
+	 * @return EE_Default_Where_Conditions[]
16
+	 * @throws EE_Error
17
+	 */
18
+	protected function _generate_restrictions(): array
19
+	{
20
+		return [
21
+			// if they can't access users, they can still access themselves
22
+			EE_Restriction_Generator_Base::get_cap_name(
23
+				$this->model(),
24
+				$this->action()
25
+			) => new EE_Default_Where_Conditions(
26
+				[
27
+					EE_QUERY_PLACEHOLDER_USER_FIELD_NAME => EE_QUERY_PLACEHOLDER_CURRENT_USER,
28
+				]
29
+			),
30 30
 
31
-        ];
32
-    }
31
+		];
32
+	}
33 33
 }
Please login to merge, or discard this patch.
core/db_models/strategies/EE_CPT_Minimum_Where_Conditions.strategy.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -12,73 +12,73 @@
 block discarded – undo
12 12
  */
13 13
 class EE_CPT_Minimum_Where_Conditions extends EE_Default_Where_Conditions
14 14
 {
15
-    /**
16
-     * @var string
17
-     */
18
-    protected $_post_type;
15
+	/**
16
+	 * @var string
17
+	 */
18
+	protected $_post_type;
19 19
 
20
-    /**
21
-     * @var string
22
-     */
23
-    protected $_meta_field;
20
+	/**
21
+	 * @var string
22
+	 */
23
+	protected $_meta_field;
24 24
 
25 25
 
26
-    /**
27
-     * EE_CPT_Minimum_Where_Conditions constructor.
28
-     *
29
-     * @param string $post_type
30
-     * @param string $meta_field_to_chk
31
-     */
32
-    public function __construct(string $post_type, string $meta_field_to_chk = '')
33
-    {
34
-        $this->_post_type  = $post_type;
35
-        $this->_meta_field = $meta_field_to_chk;
36
-        parent::__construct();
37
-    }
26
+	/**
27
+	 * EE_CPT_Minimum_Where_Conditions constructor.
28
+	 *
29
+	 * @param string $post_type
30
+	 * @param string $meta_field_to_chk
31
+	 */
32
+	public function __construct(string $post_type, string $meta_field_to_chk = '')
33
+	{
34
+		$this->_post_type  = $post_type;
35
+		$this->_meta_field = $meta_field_to_chk;
36
+		parent::__construct();
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * Gets the field with the specified column. Note, this function might not
42
-     * work properly if two fields refer to columns with the same name on
43
-     * different tables
44
-     *
45
-     * @param string $column column name
46
-     * @return EE_Model_Field_Base
47
-     * @throws EE_Error
48
-     */
49
-    protected function _get_field_on_column(string $column): EE_Model_Field_Base
50
-    {
51
-        $all_fields = $this->_model->field_settings(true);
52
-        foreach ($all_fields as $field_name => $field_obj) {
53
-            if ($column == $field_obj->get_table_column()) {
54
-                return $field_obj;
55
-            }
56
-        }
57
-        throw new EE_Error(
58
-            sprintf(
59
-                esc_html__(
60
-                    'Could not find a valid field for the supplied "" column.',
61
-                    'event_espresso'
62
-                ),
63
-                $column
64
-            )
65
-        );
66
-    }
40
+	/**
41
+	 * Gets the field with the specified column. Note, this function might not
42
+	 * work properly if two fields refer to columns with the same name on
43
+	 * different tables
44
+	 *
45
+	 * @param string $column column name
46
+	 * @return EE_Model_Field_Base
47
+	 * @throws EE_Error
48
+	 */
49
+	protected function _get_field_on_column(string $column): EE_Model_Field_Base
50
+	{
51
+		$all_fields = $this->_model->field_settings(true);
52
+		foreach ($all_fields as $field_name => $field_obj) {
53
+			if ($column == $field_obj->get_table_column()) {
54
+				return $field_obj;
55
+			}
56
+		}
57
+		throw new EE_Error(
58
+			sprintf(
59
+				esc_html__(
60
+					'Could not find a valid field for the supplied "" column.',
61
+					'event_espresso'
62
+				),
63
+				$column
64
+			)
65
+		);
66
+	}
67 67
 
68 68
 
69
-    /**
70
-     * Gets the where default where conditions for a custom post type model
71
-     *
72
-     * @return array
73
-     * @throws EE_Error
74
-     * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
75
-     */
76
-    protected function _get_default_where_conditions(): array
77
-    {
78
-        // find post_type field
79
-        $post_type_field = $this->_get_field_on_column('post_type');
80
-        return [
81
-            $post_type_field->get_name() => $this->_post_type
82
-        ];
83
-    }
69
+	/**
70
+	 * Gets the where default where conditions for a custom post type model
71
+	 *
72
+	 * @return array
73
+	 * @throws EE_Error
74
+	 * @see https://github.com/eventespresso/event-espresso-core/tree/master/docs/G--Model-System/model-query-params.md#0-where-conditions
75
+	 */
76
+	protected function _get_default_where_conditions(): array
77
+	{
78
+		// find post_type field
79
+		$post_type_field = $this->_get_field_on_column('post_type');
80
+		return [
81
+			$post_type_field->get_name() => $this->_post_type
82
+		];
83
+	}
84 84
 }
Please login to merge, or discard this patch.