Skip to content

Commit

Permalink
chore: style fixes
Browse files Browse the repository at this point in the history
Co-authored-by: atymic <atymic@users.noreply.github.com>
  • Loading branch information
atymic and atymic authored Mar 21, 2021
1 parent 05eddfe commit 847fee8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Exception/RequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function fromClientResponse(
Throwable $previousException = null
): TwitterException {
$responseStatusCode = $response->getStatusCode();
$responseData = json_decode((string)$response->getBody(), true, 512, JSON_THROW_ON_ERROR);
$responseData = json_decode((string) $response->getBody(), true, 512, JSON_THROW_ON_ERROR);
$instance = new static(self::DEFAULT_ERROR_MESSAGE, $response->getStatusCode(), $previousException);

if (empty($responseData[self::KEY_ERRORS])) {
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceProviders/PhpDiTwitterServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use Atymic\Twitter\TwitterServiceProvider;
use DI\Container;
use DI\ContainerBuilder;
use function DI\get;
use Exception;
use Psr\Container\ContainerExceptionInterface;
use function DI\get;

/**
* @codeCoverageIgnore
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/FormattingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function linkify($tweet): string
// todo figure out how this is used and refactor
public function ago($timestamp): string
{
if (is_numeric($timestamp) && (int)$timestamp === $timestamp) {
if (is_numeric($timestamp) && (int) $timestamp === $timestamp) {
$carbon = Carbon::createFromTimeStamp($timestamp);
} else {
$dt = new \DateTime($timestamp);
Expand Down
2 changes: 1 addition & 1 deletion src/Twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private function transformClientException(GuzzleException $exception): TwitterRe
*/
private function formatResponse(Response $response, string $format)
{
$body = (string)$response->getBody();
$body = (string) $response->getBody();

switch ($format) {
case self::RESPONSE_FORMAT_JSON:
Expand Down

0 comments on commit 847fee8

Please sign in to comment.