mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Various code cleanup.
This commit is contained in:
@@ -46,7 +46,7 @@ abstract class BunqRequest
|
||||
* @var array
|
||||
*/
|
||||
private $upperCaseHeaders
|
||||
= [
|
||||
= [
|
||||
'x-bunq-client-response-id' => 'X-Bunq-Client-Response-Id',
|
||||
'x-bunq-client-request-id' => 'X-Bunq-Client-Request-Id',
|
||||
];
|
||||
@@ -330,6 +330,7 @@ abstract class BunqRequest
|
||||
* @param array $headers
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function sendUnsignedBunqDelete(string $uri, array $headers): array
|
||||
@@ -360,6 +361,7 @@ abstract class BunqRequest
|
||||
* @param array $headers
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function sendUnsignedBunqPost(string $uri, array $data, array $headers): array
|
||||
|
||||
@@ -34,7 +34,6 @@ class DeleteDeviceSessionRequest extends BunqRequest
|
||||
private $sessionToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -40,7 +40,6 @@ class DeviceServerRequest extends BunqRequest
|
||||
private $permittedIps = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -46,7 +46,6 @@ class DeviceSessionRequest extends BunqRequest
|
||||
private $userPerson;
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -40,7 +40,6 @@ class InstallationTokenRequest extends BunqRequest
|
||||
private $publicKey = '';
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -43,7 +43,6 @@ class ListDeviceServerRequest extends BunqRequest
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -39,7 +39,6 @@ class ListMonetaryAccountRequest extends BunqRequest
|
||||
private $userId = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -42,7 +42,6 @@ class ListUserRequest extends BunqRequest
|
||||
private $userPerson;
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
|
||||
@@ -29,8 +29,6 @@ use FireflyIII\User;
|
||||
|
||||
/**
|
||||
* Interface ExchangeRateInterface
|
||||
*
|
||||
* @package FireflyIII\Services\Currency
|
||||
*/
|
||||
interface ExchangeRateInterface
|
||||
{
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Spectre\Object;
|
||||
@@ -82,9 +81,4 @@ class Customer extends SpectreObject
|
||||
{
|
||||
$this->secret = $secret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Spectre\Object;
|
||||
@@ -28,5 +27,4 @@ namespace FireflyIII\Services\Spectre\Object;
|
||||
*/
|
||||
class SpectreObject
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ class ListProvidersRequest extends SpectreRequest
|
||||
protected $providers = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function call(): void
|
||||
@@ -79,6 +78,4 @@ class ListProvidersRequest extends SpectreRequest
|
||||
{
|
||||
return $this->providers;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Spectre\Request;
|
||||
@@ -32,7 +31,6 @@ class NewCustomerRequest extends SpectreRequest
|
||||
protected $customer = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
public function call(): void
|
||||
@@ -58,6 +56,4 @@ class NewCustomerRequest extends SpectreRequest
|
||||
{
|
||||
return $this->customer;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Spectre\Request;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
@@ -232,7 +231,6 @@ abstract class SpectreRequest
|
||||
$this->detectError($response);
|
||||
$statusCode = intval($response->status_code);
|
||||
|
||||
|
||||
$body = $response->body;
|
||||
$array = json_decode($body, true);
|
||||
$responseHeaders = $response->headers->getAll();
|
||||
@@ -299,7 +297,7 @@ abstract class SpectreRequest
|
||||
}
|
||||
|
||||
$statusCode = intval($response->status_code);
|
||||
if ($statusCode !== 200) {
|
||||
if (200 !== $statusCode) {
|
||||
throw new FireflyException(sprintf('Status code %d: %s', $statusCode, $response->body));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user