mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 11:31:06 +00:00
Various code cleanup.
This commit is contained in:
@@ -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