Skip to content

Commit

Permalink
fix: error in auth trait import (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
atymic authored Apr 15, 2021
1 parent fec288a commit 90978dd
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.4]

### Fixed

Fixed incorrect import in `AuthTrait` [#347](https://github.com/atymic/twitter/pull/347)


## [3.1.3]

### Fixed
Expand Down
9 changes: 9 additions & 0 deletions src/ApiV1/Service/Twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,13 @@ public function post(string $endpoint, array $parameters = [], bool $multipart =
{
return $this->query($endpoint, self::REQUEST_METHOD_POST, $parameters, $multipart);
}

/**
* @return mixed
* @throws TwitterClientException
*/
public function delete(string $endpoint, array $parameters = [])
{
return $this->query($endpoint, self::REQUEST_METHOD_DELETE, $parameters);
}
}
2 changes: 1 addition & 1 deletion src/ApiV1/Traits/AuthTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Atymic\Twitter\ApiV1\Traits;

use Atymic\Twitter\ApiV1\Twitter;
use Atymic\Twitter\ApiV1\Service\Twitter;
use Atymic\Twitter\Exception\AuthException;

trait AuthTrait
Expand Down
2 changes: 1 addition & 1 deletion src/ApiV1/Traits/DirectMessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Atymic\Twitter\ApiV1\Traits;

use Atymic\Twitter\ApiV1\Twitter;
use Atymic\Twitter\ApiV1\Service\Twitter;
use BadMethodCallException;

trait DirectMessageTrait
Expand Down
2 changes: 2 additions & 0 deletions src/ApiV1/Traits/TrendTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Atymic\Twitter\ApiV1\Traits;

use BadMethodCallException;

trait TrendTrait
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Http/Client/SyncClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ final class SyncClient extends Client implements SyncClientContract
{
private ClientInterface $client;

/**
* @param ClientInterface $client
*/
public function __construct(ClientInterface $client, bool $debug = false, ?LoggerInterface $logger = null)
{
parent::__construct($debug, $logger);
Expand Down
1 change: 1 addition & 0 deletions src/Twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ interface Twitter

public const REQUEST_METHOD_GET = Querier::REQUEST_METHOD_GET;
public const REQUEST_METHOD_POST = Querier::REQUEST_METHOD_POST;
public const REQUEST_METHOD_DELETE = Querier::REQUEST_METHOD_DELETE;

/**
* @throws InvalidArgumentException
Expand Down

0 comments on commit 90978dd

Please sign in to comment.