Various code cleanup.

This commit is contained in:
James Cole
2017-12-22 18:32:43 +01:00
parent f13a93348f
commit 8bd76d1ff0
188 changed files with 383 additions and 396 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}
}

View File

@@ -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));
}