mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Code cleanup and realign.
This commit is contained in:
@@ -28,6 +28,7 @@ use Carbon\Carbon;
|
||||
/**
|
||||
*
|
||||
* Class Attempt
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @SuppressWarnings(PHPMD.ShortVariable)
|
||||
* @SuppressWarnings(PHPMD.TooManyFields)
|
||||
|
||||
@@ -28,6 +28,7 @@ use Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* Class Login
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @SuppressWarnings(PHPMD.ShortVariable)
|
||||
* @SuppressWarnings(PHPMD.TooManyFields)
|
||||
|
||||
@@ -27,6 +27,7 @@ use Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* Class Transaction
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.ShortVariable)
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace FireflyIII\Services\Spectre\Request;
|
||||
|
||||
use FireflyIII\Services\Spectre\Object\Customer;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class NewCustomerRequest
|
||||
*/
|
||||
@@ -37,12 +38,12 @@ class NewCustomerRequest extends SpectreRequest
|
||||
*/
|
||||
public function call(): void
|
||||
{
|
||||
$data = [
|
||||
$data = [
|
||||
'data' => [
|
||||
'identifier' => 'default_ff3_customer',
|
||||
],
|
||||
];
|
||||
$uri = '/api/v4/customers/';
|
||||
$uri = '/api/v4/customers/';
|
||||
Log::debug(sprintf('Going to call %s with info:', $uri), $data);
|
||||
$response = $this->sendSignedSpectrePost($uri, $data);
|
||||
// create customer:
|
||||
|
||||
@@ -211,7 +211,7 @@ abstract class SpectreRequest
|
||||
$statusCode = $res->getStatusCode();
|
||||
try {
|
||||
$returnBody = $res->getBody()->getContents();
|
||||
} catch (RunTimeException $e) {
|
||||
} catch (RuntimeException $e) {
|
||||
Log::error(sprintf('Could not get body from SpectreRequest::GET result: %s', $e->getMessage()));
|
||||
$returnBody = '';
|
||||
}
|
||||
@@ -261,7 +261,7 @@ abstract class SpectreRequest
|
||||
|
||||
try {
|
||||
$body = $res->getBody()->getContents();
|
||||
} catch (RunTimeException $e) {
|
||||
} catch (RuntimeException $e) {
|
||||
Log::error(sprintf('Could not get body from SpectreRequest::POST result: %s', $e->getMessage()));
|
||||
$body = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user