Skip to content

Commit

Permalink
Merge pull request #49 from saloonphp/fix/v3-fix-stubs
Browse files Browse the repository at this point in the history
Fix | V3 Update Stubs
  • Loading branch information
Sammyjo20 authored Sep 30, 2023
2 parents 92599e3 + 29b7b4d commit af9090d
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 25 deletions.
5 changes: 3 additions & 2 deletions config/saloon.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
|--------------------------------------------------------------------------
|
| By default, this package will create any classes within
| /app/Http/Integrations directory. If you're using
| `/app/Http/Integrations` directory. If you're using
| a different design approach, then your classes
| may be in a different place. You can change
| that location so that the saloon:list
| command will still find your files
|
*/
'integrations_path' => 'App/Http/Integrations',

'integrations_path' => base_path('App/Http/Integrations'),
];
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class MakeCommand extends GeneratorCommand
*/
protected function getStub()
{
return $this->resolveStubPath('/stubs/' . $this->resolveStubName());
return $this->resolveStubPath('/../../../stubs/' . $this->resolveStubName());
}

protected function resolveStubName(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace {{ namespace }};

use Saloon\Contracts\PendingRequest;
use Saloon\Http\PendingRequest;
use Saloon\Contracts\Authenticator;

class {{ class }} implements Authenticator
Expand All @@ -14,9 +14,6 @@ class {{ class }} implements Authenticator

/**
* Apply the authentication to the request.
*
* @param PendingRequest $pendingRequest
* @return void
*/
public function set(PendingRequest $pendingRequest): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class {{ class }} extends Connector

/**
* The Base URL of the API
*
* @return string
*/
public function resolveBaseUrl(): string
{
Expand All @@ -21,8 +19,6 @@ class {{ class }} extends Connector

/**
* Default headers for every request
*
* @return string[]
*/
protected function defaultHeaders(): array
{
Expand All @@ -31,8 +27,6 @@ class {{ class }} extends Connector

/**
* Default HTTP client options
*
* @return string[]
*/
protected function defaultConfig(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ class {{ class }} extends Connector

/**
* The Base URL of the API.
*
* @return string
*/
public function resolveBaseUrl(): string
{
return '';
}

/**
* Define the default OAuth2 Config.
*
* @return OAuthConfig
* The OAuth2 configuration
*/
protected function defaultOauthConfig(): OAuthConfig
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace {{ namespace }};

use Saloon\Contracts\PendingRequest;
use Saloon\Http\PendingRequest;

trait {{ class }}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ use Saloon\Http\Request;
class {{ class }} extends Request
{
/**
* Define the HTTP method
*
* @var Method
* The HTTP method of the request
*/
protected Method $method = Method::GET;

/**
* Define the endpoint for the request
*
* @return string
* The endpoint for the request
*/
public function resolveEndpoint(): string
{
Expand Down
File renamed without changes.

0 comments on commit af9090d

Please sign in to comment.