Passed
Push — master ( 59c1b9...1f2705 )
by Paul
04:56
created
plugin/Modules/Html/Field.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public function build()
44 44
 	{
45
-		if( !$this->field['is_valid'] )return;
45
+		if( !$this->field['is_valid'] ) {
46
+			return;
47
+		}
46 48
 		if( $this->field['is_raw'] ) {
47 49
 			return glsr( Builder::class )->hidden( $this->field );
48 50
 		}
@@ -153,7 +155,9 @@  discard block
 block discarded – undo
153 155
 			'name', 'type',
154 156
 		];
155 157
 		foreach( $requiredValues as $value ) {
156
-			if( isset( $this->field[$value] ))continue;
158
+			if( isset( $this->field[$value] )) {
159
+				continue;
160
+			}
157 161
 			$missingValues[] = $value;
158 162
 			$this->field['is_valid'] = false;
159 163
 		}
@@ -170,7 +174,9 @@  discard block
 block discarded – undo
170 174
 	 */
171 175
 	protected function normalize()
172 176
 	{
173
-		if( !$this->isFieldValid() )return;
177
+		if( !$this->isFieldValid() ) {
178
+			return;
179
+		}
174 180
 		$this->field['path'] = $this->field['name'];
175 181
 		$className = glsr( Helper::class )->buildClassName( $this->field['type'], __NAMESPACE__.'\Fields' );
176 182
 		if( class_exists( $className )) {
@@ -188,7 +194,9 @@  discard block
 block discarded – undo
188 194
 	 */
189 195
 	protected function normalizeId()
190 196
 	{
191
-		if( isset( $this->field['id'] ) || $this->field['is_raw'] )return;
197
+		if( isset( $this->field['id'] ) || $this->field['is_raw'] ) {
198
+			return;
199
+		}
192 200
 		$this->field['id'] = glsr( Helper::class )->convertPathToId(
193 201
 			$this->field['path'],
194 202
 			$this->getFieldPrefix()
Please login to merge, or discard this patch.
plugin/Modules/Html/Builder.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,9 @@  discard block
 block discarded – undo
80 80
 		];
81 81
 		if( !isset( $properties[$property] )
82 82
 			|| empty( array_filter( [$value], $properties[$property] ))
83
-		)return;
83
+		) {
84
+			return;
85
+		}
84 86
 		$this->$property = $value;
85 87
 	}
86 88
 
@@ -129,7 +131,9 @@  discard block
 block discarded – undo
129 131
 	 */
130 132
 	protected function buildFieldDescription()
131 133
 	{
132
-		if( empty( $this->args['description'] ))return;
134
+		if( empty( $this->args['description'] )) {
135
+			return;
136
+		}
133 137
 		if( $this->args['is_widget'] ) {
134 138
 			return $this->small( $this->args['description'] );
135 139
 		}
@@ -184,7 +188,9 @@  discard block
 block discarded – undo
184 188
 	 */
185 189
 	protected function buildFormLabel()
186 190
 	{
187
-		if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' )return;
191
+		if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' ) {
192
+			return;
193
+		}
188 194
 		return $this->label([
189 195
 			'for' => $this->args['id'],
190 196
 			'text' => $this->args['label'],
Please login to merge, or discard this patch.