@@ 185-190 (lines=6) @@ | ||
182 | private function parseEntityIds( array $params ) { |
|
183 | $ids = $params[self::PARAM_ID]; |
|
184 | ||
185 | if ( $ids === null ) { |
|
186 | return []; |
|
187 | } elseif ( $ids === [] ) { |
|
188 | $this->errorReporter->dieError( |
|
189 | 'If ' . self::PARAM_ID . ' is specified, it must be nonempty.', 'no-data' ); |
|
190 | } |
|
191 | ||
192 | return array_map( function ( $id ) { |
|
193 | try { |
|
@@ 210-215 (lines=6) @@ | ||
207 | private function parseClaimIds( array $params ) { |
|
208 | $ids = $params[self::PARAM_CLAIM_ID]; |
|
209 | ||
210 | if ( $ids === null ) { |
|
211 | return []; |
|
212 | } elseif ( $ids === [] ) { |
|
213 | $this->errorReporter->dieError( |
|
214 | 'If ' . self::PARAM_CLAIM_ID . ' is specified, it must be nonempty.', 'no-data' ); |
|
215 | } |
|
216 | ||
217 | foreach ( $ids as $id ) { |
|
218 | if ( !$this->statementGuidValidator->validate( $id ) ) { |