Passed
Push — feature/rebusify ( 0fe5b2...103190 )
by Paul
08:37 queued 03:55
created
plugin/Commands/RegisterTaxonomy.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 class RegisterTaxonomy
6 6
 {
7
-    public $args;
7
+	public $args;
8 8
 
9
-    public function __construct($input)
10
-    {
11
-        $this->args = $input;
12
-    }
9
+	public function __construct($input)
10
+	{
11
+		$this->args = $input;
12
+	}
13 13
 }
Please login to merge, or discard this patch.
plugin/Commands/CreateReview.php 1 patch
Indentation   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -4,131 +4,131 @@
 block discarded – undo
4 4
 
5 5
 class CreateReview
6 6
 {
7
-    public $ajax_request;
8
-    public $assigned_to;
9
-    public $author;
10
-    public $avatar;
11
-    public $blacklisted;
12
-    public $category;
13
-    public $content;
14
-    public $custom;
15
-    public $date;
16
-    public $email;
17
-    public $form_id;
18
-    public $ip_address;
19
-    public $post_id;
20
-    public $rating;
21
-    public $referer;
22
-    public $request;
23
-    public $response;
24
-    public $terms;
25
-    public $title;
26
-    public $url;
7
+	public $ajax_request;
8
+	public $assigned_to;
9
+	public $author;
10
+	public $avatar;
11
+	public $blacklisted;
12
+	public $category;
13
+	public $content;
14
+	public $custom;
15
+	public $date;
16
+	public $email;
17
+	public $form_id;
18
+	public $ip_address;
19
+	public $post_id;
20
+	public $rating;
21
+	public $referer;
22
+	public $request;
23
+	public $response;
24
+	public $terms;
25
+	public $title;
26
+	public $url;
27 27
 
28
-    public function __construct($input)
29
-    {
30
-        $this->request = $input;
31
-        $this->ajax_request = isset($input['_ajax_request']);
32
-        $this->assigned_to = $this->getNumeric('assign_to');
33
-        $this->author = sanitize_text_field($this->getUser('name'));
34
-        $this->avatar = $this->getAvatar();
35
-        $this->blacklisted = isset($input['blacklisted']);
36
-        $this->category = sanitize_key($this->get('category'));
37
-        $this->content = sanitize_textarea_field($this->get('content'));
38
-        $this->custom = $this->getCustom();
39
-        $this->date = $this->getDate('date');
40
-        $this->email = sanitize_email($this->getUser('email'));
41
-        $this->form_id = sanitize_key($this->get('form_id'));
42
-        $this->ip_address = $this->get('ip_address');
43
-        $this->post_id = intval($this->get('_post_id'));
44
-        $this->rating = intval($this->get('rating'));
45
-        $this->referer = $this->get('_referer');
46
-        $this->response = sanitize_textarea_field($this->get('response'));
47
-        $this->terms = !empty($input['terms']);
48
-        $this->title = sanitize_text_field($this->get('title'));
49
-        $this->url = esc_url_raw($this->get('url'));
50
-    }
28
+	public function __construct($input)
29
+	{
30
+		$this->request = $input;
31
+		$this->ajax_request = isset($input['_ajax_request']);
32
+		$this->assigned_to = $this->getNumeric('assign_to');
33
+		$this->author = sanitize_text_field($this->getUser('name'));
34
+		$this->avatar = $this->getAvatar();
35
+		$this->blacklisted = isset($input['blacklisted']);
36
+		$this->category = sanitize_key($this->get('category'));
37
+		$this->content = sanitize_textarea_field($this->get('content'));
38
+		$this->custom = $this->getCustom();
39
+		$this->date = $this->getDate('date');
40
+		$this->email = sanitize_email($this->getUser('email'));
41
+		$this->form_id = sanitize_key($this->get('form_id'));
42
+		$this->ip_address = $this->get('ip_address');
43
+		$this->post_id = intval($this->get('_post_id'));
44
+		$this->rating = intval($this->get('rating'));
45
+		$this->referer = $this->get('_referer');
46
+		$this->response = sanitize_textarea_field($this->get('response'));
47
+		$this->terms = !empty($input['terms']);
48
+		$this->title = sanitize_text_field($this->get('title'));
49
+		$this->url = esc_url_raw($this->get('url'));
50
+	}
51 51
 
52
-    /**
53
-     * @param string $key
54
-     * @return string
55
-     */
56
-    protected function get($key)
57
-    {
58
-        return (string) glsr_get($this->request, $key);
59
-    }
52
+	/**
53
+	 * @param string $key
54
+	 * @return string
55
+	 */
56
+	protected function get($key)
57
+	{
58
+		return (string) glsr_get($this->request, $key);
59
+	}
60 60
 
61
-    /**
62
-     * @return string
63
-     */
64
-    protected function getAvatar()
65
-    {
66
-        $avatar = $this->get('avatar');
67
-        return !filter_var($avatar, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)
68
-            ? (string) get_avatar_url($this->get('email'))
69
-            : $avatar;
70
-    }
61
+	/**
62
+	 * @return string
63
+	 */
64
+	protected function getAvatar()
65
+	{
66
+		$avatar = $this->get('avatar');
67
+		return !filter_var($avatar, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)
68
+			? (string) get_avatar_url($this->get('email'))
69
+			: $avatar;
70
+	}
71 71
 
72
-    /**
73
-     * @return array
74
-     */
75
-    protected function getCustom()
76
-    {
77
-        $unset = [
78
-            '_action', '_ajax_request', '_counter', '_nonce', '_post_id', '_recaptcha-token',
79
-            '_referer', 'assign_to', 'category', 'content', 'date', 'email', 'excluded', 'form_id',
80
-            'gotcha', 'ip_address', 'name', 'rating', 'response', 'terms', 'title', 'url',
81
-        ];
82
-        $unset = apply_filters('site-reviews/create/unset-keys-from-custom', $unset);
83
-        $custom = $this->request;
84
-        foreach ($unset as $value) {
85
-            unset($custom[$value]);
86
-        }
87
-        return $custom;
88
-    }
72
+	/**
73
+	 * @return array
74
+	 */
75
+	protected function getCustom()
76
+	{
77
+		$unset = [
78
+			'_action', '_ajax_request', '_counter', '_nonce', '_post_id', '_recaptcha-token',
79
+			'_referer', 'assign_to', 'category', 'content', 'date', 'email', 'excluded', 'form_id',
80
+			'gotcha', 'ip_address', 'name', 'rating', 'response', 'terms', 'title', 'url',
81
+		];
82
+		$unset = apply_filters('site-reviews/create/unset-keys-from-custom', $unset);
83
+		$custom = $this->request;
84
+		foreach ($unset as $value) {
85
+			unset($custom[$value]);
86
+		}
87
+		return $custom;
88
+	}
89 89
 
90
-    /**
91
-     * @param string $key
92
-     * @return string
93
-     */
94
-    protected function getDate($key)
95
-    {
96
-        $date = strtotime($this->get($key));
97
-        if (false === $date) {
98
-            $date = time();
99
-        }
100
-        return get_date_from_gmt(gmdate('Y-m-d H:i:s', $date));
101
-    }
90
+	/**
91
+	 * @param string $key
92
+	 * @return string
93
+	 */
94
+	protected function getDate($key)
95
+	{
96
+		$date = strtotime($this->get($key));
97
+		if (false === $date) {
98
+			$date = time();
99
+		}
100
+		return get_date_from_gmt(gmdate('Y-m-d H:i:s', $date));
101
+	}
102 102
 
103
-    /**
104
-     * @param string $key
105
-     * @return string
106
-     */
107
-    protected function getUser($key)
108
-    {
109
-        $value = $this->get($key);
110
-        if (empty($value)) {
111
-            $user = wp_get_current_user();
112
-            $userValues = [
113
-                'email' => 'user_email',
114
-                'name' => 'display_name',
115
-            ];
116
-            if ($user->exists() && array_key_exists($key, $userValues)) {
117
-                return $user->{$userValues[$key]};
118
-            }
119
-        }
120
-        return $value;
121
-    }
103
+	/**
104
+	 * @param string $key
105
+	 * @return string
106
+	 */
107
+	protected function getUser($key)
108
+	{
109
+		$value = $this->get($key);
110
+		if (empty($value)) {
111
+			$user = wp_get_current_user();
112
+			$userValues = [
113
+				'email' => 'user_email',
114
+				'name' => 'display_name',
115
+			];
116
+			if ($user->exists() && array_key_exists($key, $userValues)) {
117
+				return $user->{$userValues[$key]};
118
+			}
119
+		}
120
+		return $value;
121
+	}
122 122
 
123
-    /**
124
-     * @param string $key
125
-     * @return string
126
-     */
127
-    protected function getNumeric($key)
128
-    {
129
-        $value = $this->get($key);
130
-        return is_numeric($value)
131
-            ? $value
132
-            : '';
133
-    }
123
+	/**
124
+	 * @param string $key
125
+	 * @return string
126
+	 */
127
+	protected function getNumeric($key)
128
+	{
129
+		$value = $this->get($key);
130
+		return is_numeric($value)
131
+			? $value
132
+			: '';
133
+	}
134 134
 }
Please login to merge, or discard this patch.
plugin/Commands/EnqueueAdminAssets.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 class EnqueueAdminAssets
6 6
 {
7
-    public $pointers;
7
+	public $pointers;
8 8
 
9
-    public function __construct(array $input)
10
-    {
11
-        $this->pointers = $input['pointers'];
12
-    }
9
+	public function __construct(array $input)
10
+	{
11
+		$this->pointers = $input['pointers'];
12
+	}
13 13
 }
Please login to merge, or discard this patch.
plugin/Commands/RegisterPostType.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -9,77 +9,77 @@
 block discarded – undo
9 9
 
10 10
 class RegisterPostType
11 11
 {
12
-    public $args;
13
-    public $columns;
14
-    public $plural;
15
-    public $postType;
16
-    public $single;
12
+	public $args;
13
+	public $columns;
14
+	public $plural;
15
+	public $postType;
16
+	public $single;
17 17
 
18
-    public function __construct($input)
19
-    {
20
-        $args = glsr(PostTypeDefaults::class)->merge($input);
21
-        $this->normalize($args);
22
-        $this->normalizeColumns();
23
-        $this->normalizeLabels();
24
-    }
18
+	public function __construct($input)
19
+	{
20
+		$args = glsr(PostTypeDefaults::class)->merge($input);
21
+		$this->normalize($args);
22
+		$this->normalizeColumns();
23
+		$this->normalizeLabels();
24
+	}
25 25
 
26
-    /**
27
-     * @return void
28
-     */
29
-    protected function normalize(array $args)
30
-    {
31
-        foreach ($args as $key => $value) {
32
-            $property = glsr(Helper::class)->buildPropertyName($key);
33
-            if (!property_exists($this, $property)) {
34
-                continue;
35
-            }
36
-            $this->$property = $value;
37
-            unset($args[$key]);
38
-        }
39
-        $this->args = wp_parse_args($args, [
40
-            'menu_name' => $this->plural,
41
-        ]);
42
-    }
26
+	/**
27
+	 * @return void
28
+	 */
29
+	protected function normalize(array $args)
30
+	{
31
+		foreach ($args as $key => $value) {
32
+			$property = glsr(Helper::class)->buildPropertyName($key);
33
+			if (!property_exists($this, $property)) {
34
+				continue;
35
+			}
36
+			$this->$property = $value;
37
+			unset($args[$key]);
38
+		}
39
+		$this->args = wp_parse_args($args, [
40
+			'menu_name' => $this->plural,
41
+		]);
42
+	}
43 43
 
44
-    /**
45
-     * @return void
46
-     */
47
-    protected function normalizeLabels()
48
-    {
49
-        $this->args['labels'] = wp_parse_args($this->args['labels'], [
50
-            'add_new_item' => sprintf(_x('Add New %s', 'Add New Post', 'site-reviews'), $this->plural),
51
-            'all_items' => sprintf(_x('All %s', 'All Posts', 'site-reviews'), $this->plural),
52
-            'archives' => sprintf(_x('%s Archives', 'Post Archives', 'site-reviews'), $this->single),
53
-            'edit_item' => sprintf(_x('Edit %s', 'Edit Post', 'site-reviews'), $this->single),
54
-            'insert_into_item' => sprintf(_x('Insert into %s', 'Insert into Post', 'site-reviews'), $this->single),
55
-            'menu_name' => $this->args['menu_name'],
56
-            'name' => $this->plural,
57
-            'new_item' => sprintf(_x('New %s', 'New Post', 'site-reviews'), $this->single),
58
-            'not_found' => sprintf(_x('No %s found', 'No Posts found', 'site-reviews'), $this->plural),
59
-            'not_found_in_trash' => sprintf(_x('No %s found in Trash', 'No Posts found in Trash', 'site-reviews'), $this->plural),
60
-            'search_items' => sprintf(_x('Search %s', 'Search Posts', 'site-reviews'), $this->plural),
61
-            'singular_name' => $this->single,
62
-            'uploaded_to_this_item' => sprintf(_x('Uploaded to this %s', 'Uploaded to this Post', 'site-reviews'), $this->single),
63
-            'view_item' => sprintf(_x('View %s', 'View Post', 'site-reviews'), $this->single),
64
-        ]);
65
-        unset($this->args['menu_name']);
66
-    }
44
+	/**
45
+	 * @return void
46
+	 */
47
+	protected function normalizeLabels()
48
+	{
49
+		$this->args['labels'] = wp_parse_args($this->args['labels'], [
50
+			'add_new_item' => sprintf(_x('Add New %s', 'Add New Post', 'site-reviews'), $this->plural),
51
+			'all_items' => sprintf(_x('All %s', 'All Posts', 'site-reviews'), $this->plural),
52
+			'archives' => sprintf(_x('%s Archives', 'Post Archives', 'site-reviews'), $this->single),
53
+			'edit_item' => sprintf(_x('Edit %s', 'Edit Post', 'site-reviews'), $this->single),
54
+			'insert_into_item' => sprintf(_x('Insert into %s', 'Insert into Post', 'site-reviews'), $this->single),
55
+			'menu_name' => $this->args['menu_name'],
56
+			'name' => $this->plural,
57
+			'new_item' => sprintf(_x('New %s', 'New Post', 'site-reviews'), $this->single),
58
+			'not_found' => sprintf(_x('No %s found', 'No Posts found', 'site-reviews'), $this->plural),
59
+			'not_found_in_trash' => sprintf(_x('No %s found in Trash', 'No Posts found in Trash', 'site-reviews'), $this->plural),
60
+			'search_items' => sprintf(_x('Search %s', 'Search Posts', 'site-reviews'), $this->plural),
61
+			'singular_name' => $this->single,
62
+			'uploaded_to_this_item' => sprintf(_x('Uploaded to this %s', 'Uploaded to this Post', 'site-reviews'), $this->single),
63
+			'view_item' => sprintf(_x('View %s', 'View Post', 'site-reviews'), $this->single),
64
+		]);
65
+		unset($this->args['menu_name']);
66
+	}
67 67
 
68
-    /**
69
-     * @return void
70
-     */
71
-    protected function normalizeColumns()
72
-    {
73
-        $this->columns = ['cb' => ''] + $this->columns;
74
-        if (array_key_exists('category', $this->columns)) {
75
-            $keys = array_keys($this->columns);
76
-            $keys[array_search('category', $keys)] = 'taxonomy-'.Application::TAXONOMY;
77
-            $this->columns = array_combine($keys, $this->columns);
78
-        }
79
-        if (array_key_exists('pinned', $this->columns)) {
80
-            $this->columns['pinned'] = glsr(Builder::class)->span('<span>'.$this->columns['pinned'].'</span>',
81
-                ['class' => 'pinned-icon']
82
-            );
83
-        }
84
-    }
68
+	/**
69
+	 * @return void
70
+	 */
71
+	protected function normalizeColumns()
72
+	{
73
+		$this->columns = ['cb' => ''] + $this->columns;
74
+		if (array_key_exists('category', $this->columns)) {
75
+			$keys = array_keys($this->columns);
76
+			$keys[array_search('category', $keys)] = 'taxonomy-'.Application::TAXONOMY;
77
+			$this->columns = array_combine($keys, $this->columns);
78
+		}
79
+		if (array_key_exists('pinned', $this->columns)) {
80
+			$this->columns['pinned'] = glsr(Builder::class)->span('<span>'.$this->columns['pinned'].'</span>',
81
+				['class' => 'pinned-icon']
82
+			);
83
+		}
84
+	}
85 85
 }
Please login to merge, or discard this patch.
plugin/Commands/RegisterShortcodes.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 class RegisterShortcodes
6 6
 {
7
-    public $shortcodes;
7
+	public $shortcodes;
8 8
 
9
-    public function __construct($input)
10
-    {
11
-        $this->shortcodes = $input;
12
-    }
9
+	public function __construct($input)
10
+	{
11
+		$this->shortcodes = $input;
12
+	}
13 13
 }
Please login to merge, or discard this patch.
config/forms/submission-form.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,33 +1,33 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'rating' => [
5
-        'label' => __('Your overall rating', 'site-reviews'),
6
-        'type' => 'rating',
7
-    ],
8
-    'title' => [
9
-        'label' => __('Title of your review', 'site-reviews'),
10
-        'placeholder' => __('Summarize your review or highlight an interesting detail', 'site-reviews'),
11
-        'type' => 'text',
12
-    ],
13
-    'content' => [
14
-        'label' => __('Your review', 'site-reviews'),
15
-        'placeholder' => __('Tell people your review', 'site-reviews'),
16
-        'rows' => 5,
17
-        'type' => 'textarea',
18
-    ],
19
-    'name' => [
20
-        'label' => __('Your name', 'site-reviews'),
21
-        'placeholder' => __('Tell us your name', 'site-reviews'),
22
-        'type' => 'text',
23
-    ],
24
-    'email' => [
25
-        'label' => __('Your email', 'site-reviews'),
26
-        'placeholder' => __('Tell us your email', 'site-reviews'),
27
-        'type' => 'email',
28
-    ],
29
-    'terms' => [
30
-        'label' => __('This review is based on my own experience and is my genuine opinion.', 'site-reviews'),
31
-        'type' => 'checkbox',
32
-    ],
4
+	'rating' => [
5
+		'label' => __('Your overall rating', 'site-reviews'),
6
+		'type' => 'rating',
7
+	],
8
+	'title' => [
9
+		'label' => __('Title of your review', 'site-reviews'),
10
+		'placeholder' => __('Summarize your review or highlight an interesting detail', 'site-reviews'),
11
+		'type' => 'text',
12
+	],
13
+	'content' => [
14
+		'label' => __('Your review', 'site-reviews'),
15
+		'placeholder' => __('Tell people your review', 'site-reviews'),
16
+		'rows' => 5,
17
+		'type' => 'textarea',
18
+	],
19
+	'name' => [
20
+		'label' => __('Your name', 'site-reviews'),
21
+		'placeholder' => __('Tell us your name', 'site-reviews'),
22
+		'type' => 'text',
23
+	],
24
+	'email' => [
25
+		'label' => __('Your email', 'site-reviews'),
26
+		'placeholder' => __('Tell us your email', 'site-reviews'),
27
+		'type' => 'email',
28
+	],
29
+	'terms' => [
30
+		'label' => __('This review is based on my own experience and is my genuine opinion.', 'site-reviews'),
31
+		'type' => 'checkbox',
32
+	],
33 33
 ];
Please login to merge, or discard this patch.
config/styles/ninja_forms.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'fields' => [
5
-        'input' => 'ninja-forms-field nf-element',
6
-        'textarea' => 'ninja-forms-field nf-element',
7
-    ],
4
+	'fields' => [
5
+		'input' => 'ninja-forms-field nf-element',
6
+		'textarea' => 'ninja-forms-field nf-element',
7
+	],
8 8
 ];
Please login to merge, or discard this patch.
config/styles/contact_form_7.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'fields' => [
5
-        'input' => 'wpcf7-form-control',
6
-        'input_text' => 'wpcf7-form-control wpcf7-text',
7
-        'input_email' => 'wpcf7-form-control wpcf7-text wpcf7-email',
8
-        'select' => 'wpcf7-form-control wpcf7-select',
9
-        'textarea' => 'wpcf7-form-control wpcf7-textarea',
10
-    ],
11
-    'validation' => [
12
-        'error_tag' => 'span',
13
-        'error_tag_class' => 'wpcf7-not-valid-tip',
14
-        'input_error_class' => 'wpcf7-not-valid',
15
-        'message_initial_class' => 'wpcf7-display-none',
16
-        'message_success_class' => 'wpcf7-mail-sent-ok',
17
-        'message_tag_class' => 'wpcf7-response-output',
18
-    ],
4
+	'fields' => [
5
+		'input' => 'wpcf7-form-control',
6
+		'input_text' => 'wpcf7-form-control wpcf7-text',
7
+		'input_email' => 'wpcf7-form-control wpcf7-text wpcf7-email',
8
+		'select' => 'wpcf7-form-control wpcf7-select',
9
+		'textarea' => 'wpcf7-form-control wpcf7-textarea',
10
+	],
11
+	'validation' => [
12
+		'error_tag' => 'span',
13
+		'error_tag_class' => 'wpcf7-not-valid-tip',
14
+		'input_error_class' => 'wpcf7-not-valid',
15
+		'message_initial_class' => 'wpcf7-display-none',
16
+		'message_success_class' => 'wpcf7-mail-sent-ok',
17
+		'message_tag_class' => 'wpcf7-response-output',
18
+	],
19 19
 ];
Please login to merge, or discard this patch.
config/styles/wpforms.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'fields' => [
5
-        'input' => 'wpforms-field-large',
6
-        'label' => 'wpforms-field-label',
7
-        'label_checkbox' => 'wpforms-field-label-inline',
8
-        'label_radio' => 'wpforms-field-label-inline',
9
-        'select' => 'wpforms-field-large',
10
-        'textarea' => 'wpforms-field-large',
11
-    ],
4
+	'fields' => [
5
+		'input' => 'wpforms-field-large',
6
+		'label' => 'wpforms-field-label',
7
+		'label_checkbox' => 'wpforms-field-label-inline',
8
+		'label_radio' => 'wpforms-field-label-inline',
9
+		'select' => 'wpforms-field-large',
10
+		'textarea' => 'wpforms-field-large',
11
+	],
12 12
 ];
Please login to merge, or discard this patch.