@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @api |
| 38 | 38 | * @since future |
| 39 | - * @return \GV\Entry|null An instance of this entry or null if not found. |
|
| 39 | + * @return null|GF_Entry An instance of this entry or null if not found. |
|
| 40 | 40 | */ |
| 41 | 41 | public static function by_id( $entry_id ) { |
| 42 | 42 | $entry = \GFAPI::get_entry( $entry_id ); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @param array $entry The array ID. |
| 54 | 54 | * |
| 55 | - * @return \GV\Entry|null An instance of this entry or null if not found. |
|
| 55 | + * @return null|GF_Entry An instance of this entry or null if not found. |
|
| 56 | 56 | */ |
| 57 | 57 | public static function from_entry( $entry ) { |
| 58 | 58 | if ( empty( $entry['id'] ) ) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public static function by_id( $entry_id ) { |
| 42 | 42 | $entry = \GFAPI::get_entry( $entry_id ); |
| 43 | - if ( !$entry ) { |
|
| 43 | + if ( ! $entry ) { |
|
| 44 | 44 | return null; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | * @return \GV\Entry|null An instance of this entry or null if not found. |
| 56 | 56 | */ |
| 57 | 57 | public static function from_entry( $entry ) { |
| 58 | - if ( empty( $entry['id'] ) ) { |
|
| 58 | + if ( empty( $entry[ 'id' ] ) ) { |
|
| 59 | 59 | return null; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | $self = new self(); |
| 63 | 63 | $self->entry = $entry; |
| 64 | 64 | |
| 65 | - $self->ID = $self->entry['id']; |
|
| 65 | + $self->ID = $self->entry[ 'id' ]; |
|
| 66 | 66 | |
| 67 | 67 | return $self; |
| 68 | 68 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @return bool Whether the offset exists or not. |
| 77 | 77 | */ |
| 78 | 78 | public function offsetExists( $offset ) { |
| 79 | - return isset( $this->entry[$offset] ); |
|
| 79 | + return isset( $this->entry[ $offset ] ); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @return mixed The value of the requested entry data. |
| 92 | 92 | */ |
| 93 | 93 | public function offsetGet( $offset ) { |
| 94 | - return $this->entry[$offset]; |
|
| 94 | + return $this->entry[ $offset ]; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -40,14 +40,14 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public static function by_id( $form_id ) { |
| 42 | 42 | $form = \GFAPI::get_form( $form_id ); |
| 43 | - if ( !$form ) { |
|
| 43 | + if ( ! $form ) { |
|
| 44 | 44 | return null; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $self = new self(); |
| 48 | 48 | $self->form = $form; |
| 49 | 49 | |
| 50 | - $self->ID = $self->form['id']; |
|
| 50 | + $self->ID = $self->form[ 'id' ]; |
|
| 51 | 51 | |
| 52 | 52 | return $self; |
| 53 | 53 | } |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | /** The offset and limit */ |
| 92 | 92 | if ( ! empty( $offset->limit ) ) { |
| 93 | - $paging['page_size'] = $offset->limit; |
|
| 93 | + $paging[ 'page_size' ] = $offset->limit; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | if ( ! empty( $offset->offset ) ) { |
| 97 | - $paging['offset'] = $offset->offset; |
|
| 97 | + $paging[ 'offset' ] = $offset->offset; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | foreach ( \GFAPI::get_entries( $form->ID, $search_criteria, $sorting, $paging ) as $entry ) { |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @return bool Whether the offset exists or not. |
| 131 | 131 | */ |
| 132 | 132 | public function offsetExists( $offset ) { |
| 133 | - return isset( $this->form[$offset] ); |
|
| 133 | + return isset( $this->form[ $offset ] ); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * @return mixed The value of the requested form data. |
| 146 | 146 | */ |
| 147 | 147 | public function offsetGet( $offset ) { |
| 148 | - return $this->form[$offset]; |
|
| 148 | + return $this->form[ $offset ]; |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |