Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
58 | public function parseAsync( $value, $parser ) { |
||
59 | $promise = $this->api->getRequestAsync( |
||
60 | new SimpleRequest( |
||
61 | 'wbparsevalue', |
||
62 | array( 'parser' => $parser, 'values' => $value ) |
||
63 | ) |
||
64 | ); |
||
65 | |||
66 | return $promise->then( |
||
67 | function ( $result ) { |
||
68 | return $this->dataValueDeserializer->deserialize( $result['results'][0] ); |
||
69 | } |
||
70 | ); |
||
71 | } |
||
72 | |||
74 |