Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix | V2 - Fixed Tests #34

Merged
merged 14 commits into from
Jan 2, 2023
Prev Previous commit
Next Next commit
Fixing stubs
  • Loading branch information
Sammyjo20 committed Dec 11, 2022
commit c958b767dca2db8a3f709c393aad7f46201bcfa6
4 changes: 2 additions & 2 deletions src/Console/Commands/stubs/saloon.authenticator.stub
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace {{ namespace }};

use Saloon\Contracts\PendingRequest;
use Saloon\Contracts\AuthenticatorInterface;
use Saloon\Contracts\Authenticator;

class {{ class }} implements AuthenticatorInterface
class {{ class }} implements Authenticator
{
public function __construct()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Commands/stubs/saloon.connector.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace {{ namespace }};
use Saloon\Http\Connector;
use Saloon\Traits\Plugins\AcceptsJson;

class {{ class }} extends SaloonConnector
class {{ class }} extends Connector
{
use AcceptsJson;

Expand All @@ -14,7 +14,7 @@ class {{ class }} extends SaloonConnector
*
* @return string
*/
public function defineBaseUrl(): string
public function resolveBaseUrl(): string
{
return '';
}
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/stubs/saloon.oauth-connector.stub
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class {{ class }} extends Connector
*
* @return string
*/
public function defineBaseUrl(): string
public function resolveBaseUrl(): string
{
return '';
}
Expand Down
16 changes: 5 additions & 11 deletions src/Console/Commands/stubs/saloon.request.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,25 @@

namespace {{ namespace }};

use Saloon\Enums\Method;
use Saloon\Http\Request;

class {{ class }} extends Request
{
/**
* Define the connector.
*
* @var string
*/
protected string $connector = '';

/**
* Define the HTTP method.
*
* @var string
* @var Method
*/
protected string $method = 'GET';
protected Method $method = Method::GET;

/**
* Define the endpoint for the request.
*
* @return string
*/
protected function defineEndpoint(): string
protected function resolveEndpoint(): string
{
return '/api/v1/user';
return '/example';
}
}