Completed
Push — master ( ad017e...43c479 )
by Rudie
02:43
created
lib/fuelly/src/WebAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 	/**
12 12
 	 * Dependency constructor
13 13
 	 */
14
-	public function __construct( $mail, $pass, $session = '' ) {
14
+	public function __construct($mail, $pass, $session = '') {
15 15
 		$this->mail = $mail;
16 16
 		$this->pass = $pass;
17 17
 		$this->session = $session;
Please login to merge, or discard this patch.
test.session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,4 +17,4 @@
 block discarded – undo
17 17
 echo "\n\n";
18 18
 
19 19
 echo "\n\n";
20
-echo "To save this session, go to\n\n" . basename(__FILE__) . '?session=' . $client->auth->session;
20
+echo "To save this session, go to\n\n".basename(__FILE__).'?session='.$client->auth->session;
Please login to merge, or discard this patch.
bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__ . '/env.php';
3
+require __DIR__.'/env.php';
4 4
 
5
-require __DIR__ . '/vendor/autoload.php';
5
+require __DIR__.'/vendor/autoload.php';
6 6
 
7 7
 header('Content-type: text/plain; charset=utf-8');
8 8
 
Please login to merge, or discard this patch.
test.fuelup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@  discard block
 block discarded – undo
5 5
 $client = getTestClient(FUELLY_TEST_MAIL, FUELLY_TEST_PASS, @$_GET['session']);
6 6
 
7 7
 $client->ensureSession();
8
-echo $client->auth->session . "\n\n\n";
8
+echo $client->auth->session."\n\n\n";
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
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	'amount' => 10,
21 21
 	'note' => 'TEST TEST TEST',
22 22
 ));
23
-if ( !empty($response->fuelup_id) ) {
23
+if (!empty($response->fuelup_id)) {
24 24
 	var_dump($response->fuelup_id);
25 25
 }
26 26
 else {
Please login to merge, or discard this patch.
test.fuelups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@
 block discarded – undo
5 5
 $client = getTestClient(FUELLY_TEST_MAIL, FUELLY_TEST_PASS, @$_GET['session']);
6 6
 
7 7
 $client->ensureSession();
8
-echo $client->auth->session . "\n\n\n";
8
+echo $client->auth->session."\n\n\n";
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
 
Please login to merge, or discard this patch.
test.vehicles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $client = getTestClient(FUELLY_TEST_MAIL, FUELLY_TEST_PASS, @$_GET['session']);
6 6
 
7 7
 $client->ensureSession();
8
-echo $client->auth->session . "\n\n\n";
8
+echo $client->auth->session."\n\n\n";
9 9
 
10 10
 echo "Vehicles:\n";
11 11
 $vehicles = $client->vehicles;
Please login to merge, or discard this patch.
lib/fuelly/src/FuelUp.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	/**
18 18
 	 *
19 19
 	 */
20
-	public static function createFromTrend( Vehicle $vehicle, array $fuelup, InputConversion $input = null ) {
20
+	public static function createFromTrend(Vehicle $vehicle, array $fuelup, InputConversion $input = null) {
21 21
 		// Trend is always in real numbers, and only its natives are reliable so use those
22 22
 		$input or $input = $client->createTrendInputConversion();
23 23
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	/**
30 30
 	 *
31 31
 	 */
32
-	public static function createFromDetail( Vehicle $vehicle, array $fuelup, InputConversion $input = null ) {
32
+	public static function createFromDetail(Vehicle $vehicle, array $fuelup, InputConversion $input = null) {
33 33
 		// @todo Parse date correctly
34 34
 		$date = DateTime::createFromFormat('d-m-y', $fuelup['fuelup_date']);
35 35
 		return new static($vehicle, $date, $fuelup['miles_last_fuelup'], $fuelup['amount']);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	/**
39 39
 	 *
40 40
 	 */
41
-	protected function __construct( Vehicle $vehicle, DateTime $date, $raw_distance, $raw_amount, InputConversion $input = null ) {
41
+	protected function __construct(Vehicle $vehicle, DateTime $date, $raw_distance, $raw_amount, InputConversion $input = null) {
42 42
 		$this->vehicle = $vehicle;
43 43
 
44 44
 		$input or $input = $vehicle->client->input;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	/**
60 60
 	 *
61 61
 	 */
62
-	public static function createMileage( Length $distance, Volume $amount ) {
62
+	public static function createMileage(Length $distance, Volume $amount) {
63 63
 		// Since we don't know the original mileage from here, we'll construct a known unit from known values
64 64
 		return new Mileage($distance->to('km') / $amount->to('l'), 'kmpl');
65 65
 	}
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	/**
68 68
 	 *
69 69
 	 */
70
-	public static function dateCmp( FuelUp $a, FuelUp $b ) {
70
+	public static function dateCmp(FuelUp $a, FuelUp $b) {
71 71
 		return $b->date->getTimestamp() - $a->date->getTimestamp();
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
lib/fuelly/src/Vehicle.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	/**
19 19
 	 *
20 20
 	 */
21
-	public function __construct( Client $client, array $vehicle ) {
21
+	public function __construct(Client $client, array $vehicle) {
22 22
 		$this->client = $client;
23 23
 
24 24
 		$this->id = $vehicle['id'];
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 		$this->name = $vehicle['name'];
27 27
 		$this->image = $vehicle['image'];
28 28
 
29
-		if ( isset($vehicle['trend']) ) {
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
 
Please login to merge, or discard this patch.
lib/fuelly/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-spl_autoload_register(function( $class ) {
3
+spl_autoload_register(function($class) {
4 4
 	$ns = explode('\\', $class);
5 5
 	$lib = array_splice($ns, 0, 2);
6
-	if ( $lib == array('rdx', 'fuelly') ) {
7
-		if ( file_exists($file = __DIR__ . '/src/' . implode('/', $ns) . '.php') ) {
6
+	if ($lib == array('rdx', 'fuelly')) {
7
+		if (file_exists($file = __DIR__.'/src/'.implode('/', $ns).'.php')) {
8 8
 			include $file;
9 9
 		}
10 10
 	}
Please login to merge, or discard this patch.