@@ -328,6 +328,7 @@ |
||
| 328 | 328 | |
| 329 | 329 | /** |
| 330 | 330 | * HTTP POST |
| 331 | + * @param string $uri |
|
| 331 | 332 | */ |
| 332 | 333 | public function _post( $uri, $options = array() ) { |
| 333 | 334 | return $this->_http($uri, $options + array('method' => 'POST')); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use InvalidArgumentException; |
| 6 | 6 | use rdx\fuelly\FuelUp; |
| 7 | -use rdx\fuelly\UnitConversion; |
|
| 8 | 7 | use rdx\fuelly\Vehicle; |
| 9 | 8 | use rdx\fuelly\WebAuth; |
| 10 | 9 | use rdx\http\HTTP; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | foreach ( $matches as $match ) { |
| 53 | 53 | if ( in_array($match[1], array('_token', 'miles_last_fuelup', 'price_per_unit', 'amount', 'fuelup_date')) ) { |
| 54 | 54 | preg_match('#value="([^"]+)"#', $match[0], $match2); |
| 55 | - $fuelup[ $match[1] ] = $match2[1]; |
|
| 55 | + $fuelup[$match[1]] = $match2[1]; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | 'amount' => $fuelup[4][0], |
| 133 | 133 | ); |
| 134 | 134 | |
| 135 | - $fuelups[ $fuelup['id'] ] = FuelUp::createFromDetail($vehicle, $fuelup); |
|
| 135 | + $fuelups[$fuelup['id']] = FuelUp::createFromDetail($vehicle, $fuelup); |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | * HTTP REQUEST |
| 358 | 358 | */ |
| 359 | 359 | public function _http( $uri, $options = array() ) { |
| 360 | - if ($this->auth->session) { |
|
| 360 | + if ( $this->auth->session ) { |
|
| 361 | 361 | $options['cookies'][] = array('fuelly_session', $this->auth->session); |
| 362 | 362 | } |
| 363 | 363 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | |
| 10 | 10 | echo "Vehicle:\n"; |
| 11 | 11 | $vehicles = $client->vehicles; |
| 12 | -$vehicle = $vehicles[ array_rand($vehicles) ]; |
|
| 12 | +$vehicle = $vehicles[array_rand($vehicles)]; |
|
| 13 | 13 | print_r($vehicle); |
| 14 | 14 | echo "\n\n"; |
| 15 | 15 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | if ( isset($vehicle['trend']) ) { |
| 30 | 30 | $input = $client->createTrendInputConversion(); |
| 31 | 31 | |
| 32 | - foreach ( $vehicle['trend'] as $fuelup) { |
|
| 32 | + foreach ( $vehicle['trend'] as $fuelup ) { |
|
| 33 | 33 | $this->trend[] = FuelUp::createFromTrend($this, $fuelup, $input); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | |
| 10 | 10 | echo "Vehicle:\n"; |
| 11 | 11 | $vehicles = $client->vehicles; |
| 12 | -$vehicle = $vehicles[ array_rand($vehicles) ]; |
|
| 12 | +$vehicle = $vehicles[array_rand($vehicles)]; |
|
| 13 | 13 | print_r($vehicle); |
| 14 | 14 | echo "\n\n"; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | use rdx\fuelly\Client; |
| 10 | 10 | use rdx\fuelly\WebAuth; |
| 11 | 11 | |
| 12 | -function getTestClient($mail, $pass, $session) { |
|
| 12 | +function getTestClient( $mail, $pass, $session ) { |
|
| 13 | 13 | $auth = new WebAuth($mail, $pass, $session); |
| 14 | 14 | $input = new InputConversion('km', 'l', 'kmpl', ',', '.'); |
| 15 | 15 | $client = new Client($auth, $input); |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | |
| 10 | 10 | echo "Vehicle:\n"; |
| 11 | 11 | $vehicles = $client->vehicles; |
| 12 | -$vehicle = $vehicles[ array_rand($vehicles) ]; |
|
| 12 | +$vehicle = $vehicles[array_rand($vehicles)]; |
|
| 13 | 13 | print_r($vehicle); |
| 14 | 14 | echo "\n\n"; |
| 15 | 15 | |