Passed
Push — develop ( e82010...92e6cb )
by Paul
02:44
created
src/MetaBox/MetaBox.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,8 @@  discard block
 block discarded – undo
142 142
 	 */
143 143
 	protected function normalizeFields( array $fields, array $data, $parentId )
144 144
 	{
145
-		return array_map( function( $id, $field ) use( $parentId ) {
145
+		return array_map( function( $id, $field ) use( $parentId )
146
+		{
146 147
 			$defaults =  [
147 148
 				'attributes' => [],
148 149
 				'class' => '',
@@ -182,8 +183,11 @@  discard block
 block discarded – undo
182 183
 	{
183 184
 		$fields = &$metabox['fields'];
184 185
 		$depends = array_column( $fields, 'depends' );
185
-		array_walk( $depends, function( $value, $index ) use( &$fields, $metabox ) {
186
-			if( empty( $value ))return;
186
+		array_walk( $depends, function( $value, $index ) use( &$fields, $metabox )
187
+		{
188
+			if( empty( $value )) {
189
+				return;
190
+			}
187 191
 			$dependency = array_search( $value, array_column( $fields, 'id' ));
188 192
 			$fields[$index]['attributes']['data-depends'] = $value;
189 193
 			if( !$this->getValue( $fields[$dependency]['slug'], $metabox['slug'] )) {
Please login to merge, or discard this patch.