Completed
Push — develop ( 37d930...67f542 )
by Zack
19:37
created
future/includes/class-gv-field-gravityforms.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,17 +27,17 @@  discard block
 block discarded – undo
27 27
 	 * @return \GV\GF_Field|null The field implementation or null on error.
28 28
 	 */
29 29
 	public static function from_configuration( $configuration ) {
30
-		if ( empty( $configuration['id'] ) || ! is_numeric( $configuration['id'] ) ) {
30
+		if ( empty( $configuration[ 'id' ] ) || ! is_numeric( $configuration[ 'id' ] ) ) {
31 31
 			gravityview()->log->error( 'Invalid configuration[id] supplied: {id}', array( 'data' => $configuration, 'id' => \GV\Utils::get( $configuration, 'id' ) ) );
32 32
 			return null;
33 33
 		}
34 34
 
35
-		if ( empty( $configuration['form_id'] ) || ! $form = \GV\GF_Form::by_id( $configuration['form_id'] )  ) {
35
+		if ( empty( $configuration[ 'form_id' ] ) || ! $form = \GV\GF_Form::by_id( $configuration[ 'form_id' ] ) ) {
36 36
 			gravityview()->log->error( 'Invalid configuration[form_id] supplied: {form_id}', array( 'data' => $configuration, 'form_id' => \GV\Utils::get( $configuration, 'form_id' ) ) );
37 37
 			return null;
38 38
 		}
39 39
 
40
-		$field = self::by_id( $form, $configuration['id'] );
40
+		$field = self::by_id( $form, $configuration[ 'id' ] );
41 41
 
42 42
 		if ( ! $field ) {
43 43
 			gravityview()->log->error( 'Invalid configuration: Field not found by [id] supplied: {id}', array( 'data' => $configuration, 'id' => \GV\Utils::get( $configuration, 'id' ) ) );
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
 		/** This is a complex Gravity Forms input. */
118 118
 		if ( $input = \GFFormsModel::get_input( $this->field, $this->ID ) ) {
119
-			$label = ! empty( $input['customLabel'] ) ? $input['customLabel'] : $input['label'];
119
+			$label = ! empty( $input[ 'customLabel' ] ) ? $input[ 'customLabel' ] : $input[ 'label' ];
120 120
 		} else {
121 121
 			/** This is a field with one label. */
122 122
 			$label = $this->field->get_field_label( true, $this->label );
Please login to merge, or discard this patch.
future/includes/class-gv-field-internal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
 	 */
30 30
 	public static function from_configuration( $configuration ) {
31 31
 
32
-		if ( empty( $configuration['id'] ) || ! is_string( $configuration['id'] ) ) {
32
+		if ( empty( $configuration[ 'id' ] ) || ! is_string( $configuration[ 'id' ] ) ) {
33 33
 			gravityview()->log->error( 'Invalid configuration[id] supplied for internal field: {id}', array( 'data' => $configuration, 'id' => \GV\Utils::get( $configuration, 'id' ) ) );
34 34
 			return null;
35 35
 		}
36 36
 
37
-		$field = self::by_id( $configuration['id'] );
37
+		$field = self::by_id( $configuration[ 'id' ] );
38 38
 
39 39
 		$field->update_configuration( $configuration );
40 40
 
Please login to merge, or discard this patch.