Completed
Branch dependabot/npm_and_yarn/@wordp... (e9f48b)
by
unknown
60:52 queued 52:34
created
core/services/cache/CacheStorageInterface.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -11,50 +11,50 @@
 block discarded – undo
11 11
 interface CacheStorageInterface
12 12
 {
13 13
 
14
-    /**
15
-     * Saves supplied data
16
-     * if an expiration is set, then it automatically schedules the cache for deletion
17
-     *
18
-     * @param string $key        [required]
19
-     * @param string $data       [required]
20
-     * @param int    $expiration number of seconds until the cache expires
21
-     * @return bool
22
-     */
23
-    public function add($key, $data, $expiration = 0);
24
-
25
-
26
-
27
-    /**
28
-     * retrieves cache data
29
-     * should automatically trigger early cache refresh for standard cache items
30
-     * in order to avoid cache stampedes on busy sites.
31
-     * For non-standard cache items like PHP Session data where early refreshing is not wanted,
32
-     * the $standard_cache parameter should be set to false when retrieving data
33
-     *
34
-     * @param string $key [required]
35
-     * @param bool   $standard_cache
36
-     * @return mixed
37
-     */
38
-    public function get($key, $standard_cache = true);
39
-
40
-
41
-
42
-    /**
43
-     * delete a single cached item
44
-     *
45
-     * @param string $key [required] full or partial cache key to be deleted
46
-     */
47
-    public function delete($key);
48
-
49
-
50
-
51
-    /**
52
-     * delete multiple cached items
53
-     *
54
-     * @param array $keys           [required] array of full or partial cache keys to be deleted
55
-     * @param bool  $force_delete   [optional] if true, then will not check incoming keys against those being tracked
56
-     *                              and proceed directly to deleting those entries from the cache storage
57
-     * @return
58
-     */
59
-    public function deleteMany(array $keys, $force_delete = false);
14
+	/**
15
+	 * Saves supplied data
16
+	 * if an expiration is set, then it automatically schedules the cache for deletion
17
+	 *
18
+	 * @param string $key        [required]
19
+	 * @param string $data       [required]
20
+	 * @param int    $expiration number of seconds until the cache expires
21
+	 * @return bool
22
+	 */
23
+	public function add($key, $data, $expiration = 0);
24
+
25
+
26
+
27
+	/**
28
+	 * retrieves cache data
29
+	 * should automatically trigger early cache refresh for standard cache items
30
+	 * in order to avoid cache stampedes on busy sites.
31
+	 * For non-standard cache items like PHP Session data where early refreshing is not wanted,
32
+	 * the $standard_cache parameter should be set to false when retrieving data
33
+	 *
34
+	 * @param string $key [required]
35
+	 * @param bool   $standard_cache
36
+	 * @return mixed
37
+	 */
38
+	public function get($key, $standard_cache = true);
39
+
40
+
41
+
42
+	/**
43
+	 * delete a single cached item
44
+	 *
45
+	 * @param string $key [required] full or partial cache key to be deleted
46
+	 */
47
+	public function delete($key);
48
+
49
+
50
+
51
+	/**
52
+	 * delete multiple cached items
53
+	 *
54
+	 * @param array $keys           [required] array of full or partial cache keys to be deleted
55
+	 * @param bool  $force_delete   [optional] if true, then will not check incoming keys against those being tracked
56
+	 *                              and proceed directly to deleting those entries from the cache storage
57
+	 * @return
58
+	 */
59
+	public function deleteMany(array $keys, $force_delete = false);
60 60
 }
Please login to merge, or discard this patch.
core/services/formatters/FormatterInterface.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,21 +12,21 @@
 block discarded – undo
12 12
 interface FormatterInterface
13 13
 {
14 14
 
15
-    /**
16
-     * Applies the formatting to all items in the array
17
-     *
18
-     * @param array $input accepts a multi-dimensional array, but all "leaf nodes" are easily cast to a string
19
-     * @return array
20
-     */
21
-    public function formatArray($input);
15
+	/**
16
+	 * Applies the formatting to all items in the array
17
+	 *
18
+	 * @param array $input accepts a multi-dimensional array, but all "leaf nodes" are easily cast to a string
19
+	 * @return array
20
+	 */
21
+	public function formatArray($input);
22 22
 
23 23
 
24 24
 
25
-    /**
26
-     * Formats the string
27
-     *
28
-     * @param string|int|float $input anything easily cast into a string
29
-     * @return string
30
-     */
31
-    public function format($input);
25
+	/**
26
+	 * Formats the string
27
+	 *
28
+	 * @param string|int|float $input anything easily cast into a string
29
+	 * @return string
30
+	 */
31
+	public function format($input);
32 32
 }
Please login to merge, or discard this patch.
core/services/shortcodes/ShortcodeInterface.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -4,50 +4,50 @@
 block discarded – undo
4 4
 interface ShortcodeInterface
5 5
 {
6 6
 
7
-    /**
8
-     * the actual shortcode tag that gets registered with WordPress
9
-     *
10
-     * @return string
11
-     */
12
-    public function getTag();
13
-
14
-    /**
15
-     * the length of time in seconds to cache the results of the processShortcode() method
16
-     * 0 means the processShortcode() results will NOT be cached at all
17
-     *
18
-     * @return int
19
-     */
20
-    public function cacheExpiration();
21
-
22
-    /**
23
-     * a place for adding any initialization code that needs to run prior to wp_header().
24
-     * this may be required for shortcodes that utilize a corresponding module,
25
-     * and need to enqueue assets for that module
26
-     *
27
-     * !!! IMPORTANT !!!
28
-     * After performing any logic within this method required for initialization
29
-     *         $this->shortcodeHasBeenInitialized();
30
-     * should be called to ensure that the shortcode is setup correctly.
31
-     *
32
-     * @return void
33
-     */
34
-    public function initializeShortcode();
35
-
36
-    /**
37
-     * callback that runs when the shortcode is encountered in post content.
38
-     * IMPORTANT !!!
39
-     * remember that shortcode content should be RETURNED and NOT echoed out
40
-     *
41
-     * @param array $attributes
42
-     * @return string
43
-     */
44
-    public function processShortcode($attributes = array());
45
-
46
-
47
-
48
-    /**
49
-     * Returns whether or not this shortcode class has already been initialized
50
-     * @return boolean
51
-     */
52
-    public function initialized();
7
+	/**
8
+	 * the actual shortcode tag that gets registered with WordPress
9
+	 *
10
+	 * @return string
11
+	 */
12
+	public function getTag();
13
+
14
+	/**
15
+	 * the length of time in seconds to cache the results of the processShortcode() method
16
+	 * 0 means the processShortcode() results will NOT be cached at all
17
+	 *
18
+	 * @return int
19
+	 */
20
+	public function cacheExpiration();
21
+
22
+	/**
23
+	 * a place for adding any initialization code that needs to run prior to wp_header().
24
+	 * this may be required for shortcodes that utilize a corresponding module,
25
+	 * and need to enqueue assets for that module
26
+	 *
27
+	 * !!! IMPORTANT !!!
28
+	 * After performing any logic within this method required for initialization
29
+	 *         $this->shortcodeHasBeenInitialized();
30
+	 * should be called to ensure that the shortcode is setup correctly.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function initializeShortcode();
35
+
36
+	/**
37
+	 * callback that runs when the shortcode is encountered in post content.
38
+	 * IMPORTANT !!!
39
+	 * remember that shortcode content should be RETURNED and NOT echoed out
40
+	 *
41
+	 * @param array $attributes
42
+	 * @return string
43
+	 */
44
+	public function processShortcode($attributes = array());
45
+
46
+
47
+
48
+	/**
49
+	 * Returns whether or not this shortcode class has already been initialized
50
+	 * @return boolean
51
+	 */
52
+	public function initialized();
53 53
 }
Please login to merge, or discard this patch.
core/services/shortcodes/EspressoShortcode.php 2 patches
Indentation   +217 added lines, -217 removed lines patch added patch discarded remove patch
@@ -19,221 +19,221 @@
 block discarded – undo
19 19
 abstract class EspressoShortcode implements ShortcodeInterface
20 20
 {
21 21
 
22
-    /**
23
-     * transient prefix
24
-     *
25
-     * @type string
26
-     */
27
-    const CACHE_TRANSIENT_PREFIX = 'ee_sc_';
28
-
29
-    /**
30
-     * @var PostRelatedCacheManager $cache_manager
31
-     */
32
-    private $cache_manager;
33
-
34
-    /**
35
-     * true if ShortcodeInterface::initializeShortcode() has been called
36
-     * if false, then that will get called before processing
37
-     *
38
-     * @var boolean $initialized
39
-     */
40
-    private $initialized = false;
41
-
42
-
43
-    /**
44
-     * EspressoShortcode constructor
45
-     *
46
-     * @param PostRelatedCacheManager $cache_manager
47
-     */
48
-    public function __construct(PostRelatedCacheManager $cache_manager)
49
-    {
50
-        $this->cache_manager = $cache_manager;
51
-    }
52
-
53
-
54
-    /**
55
-     * @return void
56
-     */
57
-    public function shortcodeHasBeenInitialized()
58
-    {
59
-        $this->initialized = true;
60
-    }
61
-
62
-
63
-    /**
64
-     * enqueues scripts then processes the shortcode
65
-     *
66
-     * @param array $attributes
67
-     * @return string
68
-     * @throws EE_Error
69
-     */
70
-    final public function processShortcodeCallback($attributes = array())
71
-    {
72
-        if ($this instanceof EnqueueAssetsInterface) {
73
-            if (is_admin()) {
74
-                $this->enqueueAdminScripts();
75
-            } else {
76
-                $this->enqueueScripts();
77
-            }
78
-        }
79
-        return $this->shortcodeContent(
80
-            $this->sanitizeAttributes((array) $attributes)
81
-        );
82
-    }
83
-
84
-
85
-    /**
86
-     * If shortcode caching is enabled for the shortcode,
87
-     * and cached results exist, then that will be returned
88
-     * else new content will be generated.
89
-     * If caching is enabled, then the new content will be cached for later.
90
-     *
91
-     * @param array $attributes
92
-     * @return mixed|string
93
-     * @throws EE_Error
94
-     */
95
-    private function shortcodeContent(array $attributes)
96
-    {
97
-        $shortcode = $this;
98
-        $post_ID = $this->currentPostID();
99
-        // something like "SC_EVENTS-123"
100
-        $cache_ID = $this->shortcodeCacheID($post_ID);
101
-        $this->cache_manager->clearPostRelatedCacheOnUpdate($post_ID, $cache_ID);
102
-        return $this->cache_manager->get(
103
-            $cache_ID,
104
-            // serialized attributes
105
-            wp_json_encode($attributes),
106
-            // Closure for generating content if cache is expired
107
-            function () use ($shortcode, $attributes) {
108
-                if ($shortcode->initialized() === false) {
109
-                    $shortcode->initializeShortcode();
110
-                }
111
-                return $shortcode->processShortcode($attributes);
112
-            },
113
-            // filterable cache expiration set by each shortcode
114
-            apply_filters(
115
-                'FHEE__EventEspresso_core_services_shortcodes_EspressoShortcode__shortcodeContent__cache_expiration',
116
-                $this->cacheExpiration(),
117
-                $this->getTag(),
118
-                $this
119
-            )
120
-        );
121
-    }
122
-
123
-
124
-    /**
125
-     * @return int
126
-     * @throws EE_Error
127
-     */
128
-    private function currentPostID()
129
-    {
130
-        // try to get EE_Event any way we can
131
-        $event = EEH_Event_View::get_event();
132
-        // then get some kind of ID
133
-        if ($event instanceof EE_Event) {
134
-            return $event->ID();
135
-        }
136
-        global $post;
137
-        if ($post instanceof WP_Post) {
138
-            return $post->ID;
139
-        }
140
-        return 0;
141
-    }
142
-
143
-
144
-    /**
145
-     * @param int $post_ID
146
-     * @return string
147
-     * @throws EE_Error
148
-     */
149
-    private function shortcodeCacheID($post_ID)
150
-    {
151
-        $tag = str_replace('ESPRESSO_', '', $this->getTag());
152
-        return "SC_{$tag}-{$post_ID}";
153
-    }
154
-
155
-
156
-    /**
157
-     * array for defining custom attribute sanitization callbacks,
158
-     * where keys match keys in your attributes array,
159
-     * and values represent the sanitization function you wish to be applied to that attribute.
160
-     * So for example, if you had an integer attribute named "event_id"
161
-     * that you wanted to be sanitized using absint(),
162
-     * then you would return the following:
163
-     *      array('event_id' => 'absint')
164
-     * Entering 'skip_sanitization' for the callback value
165
-     * means that no sanitization will be applied
166
-     * on the assumption that the attribute
167
-     * will be sanitized at some point... right?
168
-     * You wouldn't pass around unsanitized attributes would you?
169
-     * That would be very Tom Foolery of you!!!
170
-     *
171
-     * @return array
172
-     */
173
-    protected function customAttributeSanitizationMap()
174
-    {
175
-        return array();
176
-    }
177
-
178
-
179
-    /**
180
-     * Performs basic sanitization on shortcode attributes
181
-     * Since incoming attributes from the shortcode usage in the WP editor will all be strings,
182
-     * most attributes will by default be sanitized using the sanitize_text_field() function.
183
-     * This can be overridden using the customAttributeSanitizationMap() method (see above),
184
-     * all other attributes would be sanitized using the defaults in the switch statement below
185
-     *
186
-     * @param array $attributes
187
-     * @return array
188
-     */
189
-    private function sanitizeAttributes(array $attributes)
190
-    {
191
-        $custom_sanitization = $this->customAttributeSanitizationMap();
192
-        foreach ($attributes as $key => $value) {
193
-            // is a custom sanitization callback specified ?
194
-            if (isset($custom_sanitization[ $key ])) {
195
-                $callback = $custom_sanitization[ $key ];
196
-                if ($callback === 'skip_sanitization') {
197
-                    $attributes[ $key ] = $value;
198
-                    continue;
199
-                }
200
-                if (function_exists($callback)) {
201
-                    $attributes[ $key ] = $callback($value);
202
-                    continue;
203
-                }
204
-            }
205
-            switch (true) {
206
-                case $value === null:
207
-                case is_int($value):
208
-                case is_float($value):
209
-                    // typical booleans
210
-                case in_array($value, array(true, 'true', '1', 'on', 'yes', false, 'false', '0', 'off', 'no'), true):
211
-                    $attributes[ $key ] = $value;
212
-                    break;
213
-                case is_string($value):
214
-                    $attributes[ $key ] = sanitize_text_field($value);
215
-                    break;
216
-                case is_array($value):
217
-                    $attributes[ $key ] = $this->sanitizeAttributes($value);
218
-                    break;
219
-                default:
220
-                    // only remaining data types are Object and Resource
221
-                    // which are not allowed as shortcode attributes
222
-                    $attributes[ $key ] = null;
223
-                    break;
224
-            }
225
-        }
226
-        return $attributes;
227
-    }
228
-
229
-
230
-    /**
231
-     * Returns whether or not this shortcode has been initialized
232
-     *
233
-     * @return boolean
234
-     */
235
-    public function initialized()
236
-    {
237
-        return $this->initialized;
238
-    }
22
+	/**
23
+	 * transient prefix
24
+	 *
25
+	 * @type string
26
+	 */
27
+	const CACHE_TRANSIENT_PREFIX = 'ee_sc_';
28
+
29
+	/**
30
+	 * @var PostRelatedCacheManager $cache_manager
31
+	 */
32
+	private $cache_manager;
33
+
34
+	/**
35
+	 * true if ShortcodeInterface::initializeShortcode() has been called
36
+	 * if false, then that will get called before processing
37
+	 *
38
+	 * @var boolean $initialized
39
+	 */
40
+	private $initialized = false;
41
+
42
+
43
+	/**
44
+	 * EspressoShortcode constructor
45
+	 *
46
+	 * @param PostRelatedCacheManager $cache_manager
47
+	 */
48
+	public function __construct(PostRelatedCacheManager $cache_manager)
49
+	{
50
+		$this->cache_manager = $cache_manager;
51
+	}
52
+
53
+
54
+	/**
55
+	 * @return void
56
+	 */
57
+	public function shortcodeHasBeenInitialized()
58
+	{
59
+		$this->initialized = true;
60
+	}
61
+
62
+
63
+	/**
64
+	 * enqueues scripts then processes the shortcode
65
+	 *
66
+	 * @param array $attributes
67
+	 * @return string
68
+	 * @throws EE_Error
69
+	 */
70
+	final public function processShortcodeCallback($attributes = array())
71
+	{
72
+		if ($this instanceof EnqueueAssetsInterface) {
73
+			if (is_admin()) {
74
+				$this->enqueueAdminScripts();
75
+			} else {
76
+				$this->enqueueScripts();
77
+			}
78
+		}
79
+		return $this->shortcodeContent(
80
+			$this->sanitizeAttributes((array) $attributes)
81
+		);
82
+	}
83
+
84
+
85
+	/**
86
+	 * If shortcode caching is enabled for the shortcode,
87
+	 * and cached results exist, then that will be returned
88
+	 * else new content will be generated.
89
+	 * If caching is enabled, then the new content will be cached for later.
90
+	 *
91
+	 * @param array $attributes
92
+	 * @return mixed|string
93
+	 * @throws EE_Error
94
+	 */
95
+	private function shortcodeContent(array $attributes)
96
+	{
97
+		$shortcode = $this;
98
+		$post_ID = $this->currentPostID();
99
+		// something like "SC_EVENTS-123"
100
+		$cache_ID = $this->shortcodeCacheID($post_ID);
101
+		$this->cache_manager->clearPostRelatedCacheOnUpdate($post_ID, $cache_ID);
102
+		return $this->cache_manager->get(
103
+			$cache_ID,
104
+			// serialized attributes
105
+			wp_json_encode($attributes),
106
+			// Closure for generating content if cache is expired
107
+			function () use ($shortcode, $attributes) {
108
+				if ($shortcode->initialized() === false) {
109
+					$shortcode->initializeShortcode();
110
+				}
111
+				return $shortcode->processShortcode($attributes);
112
+			},
113
+			// filterable cache expiration set by each shortcode
114
+			apply_filters(
115
+				'FHEE__EventEspresso_core_services_shortcodes_EspressoShortcode__shortcodeContent__cache_expiration',
116
+				$this->cacheExpiration(),
117
+				$this->getTag(),
118
+				$this
119
+			)
120
+		);
121
+	}
122
+
123
+
124
+	/**
125
+	 * @return int
126
+	 * @throws EE_Error
127
+	 */
128
+	private function currentPostID()
129
+	{
130
+		// try to get EE_Event any way we can
131
+		$event = EEH_Event_View::get_event();
132
+		// then get some kind of ID
133
+		if ($event instanceof EE_Event) {
134
+			return $event->ID();
135
+		}
136
+		global $post;
137
+		if ($post instanceof WP_Post) {
138
+			return $post->ID;
139
+		}
140
+		return 0;
141
+	}
142
+
143
+
144
+	/**
145
+	 * @param int $post_ID
146
+	 * @return string
147
+	 * @throws EE_Error
148
+	 */
149
+	private function shortcodeCacheID($post_ID)
150
+	{
151
+		$tag = str_replace('ESPRESSO_', '', $this->getTag());
152
+		return "SC_{$tag}-{$post_ID}";
153
+	}
154
+
155
+
156
+	/**
157
+	 * array for defining custom attribute sanitization callbacks,
158
+	 * where keys match keys in your attributes array,
159
+	 * and values represent the sanitization function you wish to be applied to that attribute.
160
+	 * So for example, if you had an integer attribute named "event_id"
161
+	 * that you wanted to be sanitized using absint(),
162
+	 * then you would return the following:
163
+	 *      array('event_id' => 'absint')
164
+	 * Entering 'skip_sanitization' for the callback value
165
+	 * means that no sanitization will be applied
166
+	 * on the assumption that the attribute
167
+	 * will be sanitized at some point... right?
168
+	 * You wouldn't pass around unsanitized attributes would you?
169
+	 * That would be very Tom Foolery of you!!!
170
+	 *
171
+	 * @return array
172
+	 */
173
+	protected function customAttributeSanitizationMap()
174
+	{
175
+		return array();
176
+	}
177
+
178
+
179
+	/**
180
+	 * Performs basic sanitization on shortcode attributes
181
+	 * Since incoming attributes from the shortcode usage in the WP editor will all be strings,
182
+	 * most attributes will by default be sanitized using the sanitize_text_field() function.
183
+	 * This can be overridden using the customAttributeSanitizationMap() method (see above),
184
+	 * all other attributes would be sanitized using the defaults in the switch statement below
185
+	 *
186
+	 * @param array $attributes
187
+	 * @return array
188
+	 */
189
+	private function sanitizeAttributes(array $attributes)
190
+	{
191
+		$custom_sanitization = $this->customAttributeSanitizationMap();
192
+		foreach ($attributes as $key => $value) {
193
+			// is a custom sanitization callback specified ?
194
+			if (isset($custom_sanitization[ $key ])) {
195
+				$callback = $custom_sanitization[ $key ];
196
+				if ($callback === 'skip_sanitization') {
197
+					$attributes[ $key ] = $value;
198
+					continue;
199
+				}
200
+				if (function_exists($callback)) {
201
+					$attributes[ $key ] = $callback($value);
202
+					continue;
203
+				}
204
+			}
205
+			switch (true) {
206
+				case $value === null:
207
+				case is_int($value):
208
+				case is_float($value):
209
+					// typical booleans
210
+				case in_array($value, array(true, 'true', '1', 'on', 'yes', false, 'false', '0', 'off', 'no'), true):
211
+					$attributes[ $key ] = $value;
212
+					break;
213
+				case is_string($value):
214
+					$attributes[ $key ] = sanitize_text_field($value);
215
+					break;
216
+				case is_array($value):
217
+					$attributes[ $key ] = $this->sanitizeAttributes($value);
218
+					break;
219
+				default:
220
+					// only remaining data types are Object and Resource
221
+					// which are not allowed as shortcode attributes
222
+					$attributes[ $key ] = null;
223
+					break;
224
+			}
225
+		}
226
+		return $attributes;
227
+	}
228
+
229
+
230
+	/**
231
+	 * Returns whether or not this shortcode has been initialized
232
+	 *
233
+	 * @return boolean
234
+	 */
235
+	public function initialized()
236
+	{
237
+		return $this->initialized;
238
+	}
239 239
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             // serialized attributes
105 105
             wp_json_encode($attributes),
106 106
             // Closure for generating content if cache is expired
107
-            function () use ($shortcode, $attributes) {
107
+            function() use ($shortcode, $attributes) {
108 108
                 if ($shortcode->initialized() === false) {
109 109
                     $shortcode->initializeShortcode();
110 110
                 }
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
         $custom_sanitization = $this->customAttributeSanitizationMap();
192 192
         foreach ($attributes as $key => $value) {
193 193
             // is a custom sanitization callback specified ?
194
-            if (isset($custom_sanitization[ $key ])) {
195
-                $callback = $custom_sanitization[ $key ];
194
+            if (isset($custom_sanitization[$key])) {
195
+                $callback = $custom_sanitization[$key];
196 196
                 if ($callback === 'skip_sanitization') {
197
-                    $attributes[ $key ] = $value;
197
+                    $attributes[$key] = $value;
198 198
                     continue;
199 199
                 }
200 200
                 if (function_exists($callback)) {
201
-                    $attributes[ $key ] = $callback($value);
201
+                    $attributes[$key] = $callback($value);
202 202
                     continue;
203 203
                 }
204 204
             }
@@ -208,18 +208,18 @@  discard block
 block discarded – undo
208 208
                 case is_float($value):
209 209
                     // typical booleans
210 210
                 case in_array($value, array(true, 'true', '1', 'on', 'yes', false, 'false', '0', 'off', 'no'), true):
211
-                    $attributes[ $key ] = $value;
211
+                    $attributes[$key] = $value;
212 212
                     break;
213 213
                 case is_string($value):
214
-                    $attributes[ $key ] = sanitize_text_field($value);
214
+                    $attributes[$key] = sanitize_text_field($value);
215 215
                     break;
216 216
                 case is_array($value):
217
-                    $attributes[ $key ] = $this->sanitizeAttributes($value);
217
+                    $attributes[$key] = $this->sanitizeAttributes($value);
218 218
                     break;
219 219
                 default:
220 220
                     // only remaining data types are Object and Resource
221 221
                     // which are not allowed as shortcode attributes
222
-                    $attributes[ $key ] = null;
222
+                    $attributes[$key] = null;
223 223
                     break;
224 224
             }
225 225
         }
Please login to merge, or discard this patch.
core/services/notices/NoticeInterface.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -13,38 +13,38 @@
 block discarded – undo
13 13
 interface NoticeInterface
14 14
 {
15 15
 
16
-    /**
17
-     * @return string
18
-     */
19
-    public function type();
16
+	/**
17
+	 * @return string
18
+	 */
19
+	public function type();
20 20
 
21 21
 
22
-    /**
23
-     * @return string
24
-     */
25
-    public function message();
22
+	/**
23
+	 * @return string
24
+	 */
25
+	public function message();
26 26
 
27 27
 
28
-    /**
29
-     * @return bool
30
-     */
31
-    public function isDismissible();
28
+	/**
29
+	 * @return bool
30
+	 */
31
+	public function isDismissible();
32 32
 
33 33
 
34
-    /**
35
-     * @return string
36
-     */
37
-    public function file();
34
+	/**
35
+	 * @return string
36
+	 */
37
+	public function file();
38 38
 
39 39
 
40
-    /**
41
-     * @return string
42
-     */
43
-    public function func();
40
+	/**
41
+	 * @return string
42
+	 */
43
+	public function func();
44 44
 
45 45
 
46
-    /**
47
-     * @return string
48
-     */
49
-    public function line();
46
+	/**
47
+	 * @return string
48
+	 */
49
+	public function line();
50 50
 }
Please login to merge, or discard this patch.
core/services/locators/LocatorInterface.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 interface LocatorInterface
10 10
 {
11 11
 
12
-    /**
13
-     * given a string or an array of information for where to look,
14
-     * will find all files in that location
15
-     *
16
-     * @access public
17
-     * @param array|string $location
18
-     * @return \FilesystemIterator
19
-     */
20
-    public function locate($location);
12
+	/**
13
+	 * given a string or an array of information for where to look,
14
+	 * will find all files in that location
15
+	 *
16
+	 * @access public
17
+	 * @param array|string $location
18
+	 * @return \FilesystemIterator
19
+	 */
20
+	public function locate($location);
21 21
 }
Please login to merge, or discard this patch.
core/services/loaders/LoaderInterface.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -8,49 +8,49 @@
 block discarded – undo
8 8
 interface LoaderInterface
9 9
 {
10 10
 
11
-    /**
12
-     * Can be for instantiating a new instance of a class,
13
-     * or for getting a shared instance of a class (default)
14
-     *
15
-     * @param FullyQualifiedName|string $fqcn
16
-     * @param array                     $arguments
17
-     * @param bool                      $shared
18
-     * @return mixed
19
-     */
20
-    public function load($fqcn, array $arguments = array(), $shared = true);
21
-
22
-
23
-    /**
24
-     * Used for instantiating a new instance of a class
25
-     *
26
-     * @param FullyQualifiedName|string $fqcn
27
-     * @param array                     $arguments
28
-     * @return mixed
29
-     */
30
-    public function getNew($fqcn, array $arguments = array());
31
-
32
-
33
-    /**
34
-     * Used for getting a shared instance of a class
35
-     *
36
-     * @param FullyQualifiedName|string $fqcn
37
-     * @param array                     $arguments
38
-     * @return mixed
39
-     */
40
-    public function getShared($fqcn, array $arguments = array());
41
-
42
-
43
-    /**
44
-     * @param FullyQualifiedName|string $fqcn
45
-     * @param mixed                     $object
46
-     * @return bool
47
-     * @throws InvalidArgumentException
48
-     */
49
-    public function share($fqcn, $object);
50
-
51
-
52
-    /**
53
-     * calls reset() on loader if method exists
54
-     */
55
-    public function reset();
11
+	/**
12
+	 * Can be for instantiating a new instance of a class,
13
+	 * or for getting a shared instance of a class (default)
14
+	 *
15
+	 * @param FullyQualifiedName|string $fqcn
16
+	 * @param array                     $arguments
17
+	 * @param bool                      $shared
18
+	 * @return mixed
19
+	 */
20
+	public function load($fqcn, array $arguments = array(), $shared = true);
21
+
22
+
23
+	/**
24
+	 * Used for instantiating a new instance of a class
25
+	 *
26
+	 * @param FullyQualifiedName|string $fqcn
27
+	 * @param array                     $arguments
28
+	 * @return mixed
29
+	 */
30
+	public function getNew($fqcn, array $arguments = array());
31
+
32
+
33
+	/**
34
+	 * Used for getting a shared instance of a class
35
+	 *
36
+	 * @param FullyQualifiedName|string $fqcn
37
+	 * @param array                     $arguments
38
+	 * @return mixed
39
+	 */
40
+	public function getShared($fqcn, array $arguments = array());
41
+
42
+
43
+	/**
44
+	 * @param FullyQualifiedName|string $fqcn
45
+	 * @param mixed                     $object
46
+	 * @return bool
47
+	 * @throws InvalidArgumentException
48
+	 */
49
+	public function share($fqcn, $object);
50
+
51
+
52
+	/**
53
+	 * calls reset() on loader if method exists
54
+	 */
55
+	public function reset();
56 56
 }
Please login to merge, or discard this patch.
core/services/loaders/CachingLoaderDecoratorInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 interface CachingLoaderDecoratorInterface extends LoaderDecoratorInterface
12 12
 {
13 13
 
14
-    /**
15
-     * @param string $fqcn
16
-     * @param mixed  $object
17
-     * @return bool
18
-     * @throws InvalidArgumentException
19
-     */
20
-    public function share($fqcn, $object);
14
+	/**
15
+	 * @param string $fqcn
16
+	 * @param mixed  $object
17
+	 * @return bool
18
+	 * @throws InvalidArgumentException
19
+	 */
20
+	public function share($fqcn, $object);
21 21
 }
Please login to merge, or discard this patch.
core/services/loaders/LoaderDecoratorInterface.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@
 block discarded – undo
5 5
 interface LoaderDecoratorInterface
6 6
 {
7 7
 
8
-    /**
9
-     * @param string $fqcn
10
-     * @param array  $arguments
11
-     * @param bool   $shared
12
-     * @return mixed
13
-     */
14
-    public function load($fqcn, $arguments = array(), $shared = true);
8
+	/**
9
+	 * @param string $fqcn
10
+	 * @param array  $arguments
11
+	 * @param bool   $shared
12
+	 * @return mixed
13
+	 */
14
+	public function load($fqcn, $arguments = array(), $shared = true);
15 15
 
16 16
 
17 17
 
18
-    /**
19
-     * calls reset() on loader if method exists
20
-     */
21
-    public function reset();
18
+	/**
19
+	 * calls reset() on loader if method exists
20
+	 */
21
+	public function reset();
22 22
 }
Please login to merge, or discard this patch.