Skip to content

Commit

Permalink
Saloon 3 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysLees authored Dec 14, 2023
1 parent 60873f4 commit ddf10c0
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 64 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"guzzlehttp/guzzle": "^7.5",
"illuminate/contracts": "^10.0",
"spatie/laravel-package-tools": "^1.9.2",
"saloonphp/laravel-plugin": "^2.1",
"saloonphp/saloon": "^2.11"
"saloonphp/laravel-plugin": "^3.0",
"saloonphp/saloon": "^3.0"
},
"require-dev": {
"laravel/pint": "^1.5",
Expand Down
12 changes: 6 additions & 6 deletions src/DTO/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public function url(): string
}

public static function fake(
int $id = null,
int $ticketId = null,
int $commentId = null,
int $size = null,
string $name = null,
string $type = null,
?int $id = null,
?int $ticketId = null,
?int $commentId = null,
?int $size = null,
?string $name = null,
?string $type = null,
): self {
return new self(
id: $id ?? random_int(1, 9999),
Expand Down
32 changes: 16 additions & 16 deletions src/DTO/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ public function __construct(
}

public static function fake(
int $id = null,
int $type_id = null,
int $ticket_id = null,
int $sender_id = null,
string $sender = null,
string $subject = null,
string $body = null,
string $content_type = null,
string $from = null,
string $to = null,
bool $internal = null,
int $created_by_id = null,
int $updated_by_id = null,
int $origin_by_id = null,
Carbon $updated_at = null,
Carbon $created_at = null,
?int $id = null,
?int $type_id = null,
?int $ticket_id = null,
?int $sender_id = null,
?string $sender = null,
?string $subject = null,
?string $body = null,
?string $content_type = null,
?string $from = null,
?string $to = null,
?bool $internal = null,
?int $created_by_id = null,
?int $updated_by_id = null,
?int $origin_by_id = null,
?Carbon $updated_at = null,
?Carbon $created_at = null,
): self {
return new self(
id: $id ?? random_int(1, 1000),
Expand Down
18 changes: 9 additions & 9 deletions src/DTO/ObjectAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public function __construct(
}

public static function fake(
int $id = null,
int $name = null,
int $object_lookup_id = null,
string $display = null,
string $data_type = null,
int $position = null,
array $data_option = null,
array $data_option_new = null,
?int $id = null,
?int $name = null,
?int $object_lookup_id = null,
?string $display = null,
?string $data_type = null,
?int $position = null,
?array $data_option = null,
?array $data_option_new = null,
): self {
return new self(
id: $id ?? random_int(1, 1000),
Expand All @@ -61,7 +61,7 @@ public static function fakeCreateToArray(
?string $object = 'Ticket',
?string $display = 'Sample Object',
?bool $active = true,
int $position = null,
?int $position = null,
?string $data_type = 'select',
?array $data_options = [
'options' => [
Expand Down
24 changes: 12 additions & 12 deletions src/DTO/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ public function isInactive(): bool
}

public static function fake(
int $id = null,
int $number = null,
int $customer_id = null,
int $group_id = null,
int $state_id = null,
string $subject = null,
int $comments_count = null,
Carbon $updated_at = null,
Carbon $created_at = null,
Collection $comments = null,
array $properties = null,
array $expanded = null,
?int $id = null,
?int $number = null,
?int $customer_id = null,
?int $group_id = null,
?int $state_id = null,
?string $subject = null,
?int $comments_count = null,
?Carbon $updated_at = null,
?Carbon $created_at = null,
?Collection $comments = null,
?array $properties = null,
?array $expanded = null,
): self {
return new self(
id: $id ?? random_int(1, 1000),
Expand Down
18 changes: 9 additions & 9 deletions src/DTO/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public function __construct(
}

public static function fake(
int $id = null,
string $first_name = null,
string $last_name = null,
string $login = null,
string $email = null,
Carbon $last_login_at = null,
Carbon $updated_at = null,
Carbon $created_at = null,
array $expanded = null,
?int $id = null,
?string $first_name = null,
?string $last_name = null,
?string $login = null,
?string $email = null,
?Carbon $last_login_at = null,
?Carbon $updated_at = null,
?Carbon $created_at = null,
?array $expanded = null,
): self {
return new self(
id: $id ?? random_int(1, 1000),
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Comments/CreateCommentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zammad\DTO\Comment;
use Saloon\Contracts\Body\HasBody;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;

class CreateCommentRequest extends Request implements HasBody
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Comments/GetCommentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace CodebarAg\Zammad\Requests\Comments;

use CodebarAg\Zammad\DTO\Comment;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;

class GetCommentRequest extends Request
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zammad\DTO\ObjectAttribute;
use Saloon\Contracts\Body\HasBody;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;

class CreateObjectAttributeRequest extends Request implements HasBody
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/ObjectAttribute/GetObjectAttributeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace CodebarAg\Zammad\Requests\ObjectAttribute;

use CodebarAg\Zammad\DTO\ObjectAttribute;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;

class GetObjectAttributeRequest extends Request
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zammad\DTO\ObjectAttribute;
use Saloon\Contracts\Body\HasBody;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;

class UpdateObjectAttributeRequest extends Request implements HasBody
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Tickets/CreateTicketRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zammad\DTO\Ticket;
use Saloon\Contracts\Body\HasBody;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;

class CreateTicketRequest extends Request implements HasBody
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Tickets/GetTicketRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace CodebarAg\Zammad\Requests\Tickets;

use CodebarAg\Zammad\DTO\Ticket;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;

class GetTicketRequest extends Request
{
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Users/CreateUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zammad\DTO\User;
use Saloon\Contracts\Body\HasBody;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;

class CreateUserRequest extends Request implements HasBody
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Users/GetUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace CodebarAg\Zammad\Requests\Users;

use CodebarAg\Zammad\DTO\User;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;

class GetUserRequest extends Request
{
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Users/UpdateUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use CodebarAg\Zammad\DTO\User;
use Saloon\Contracts\Body\HasBody;
use Saloon\Contracts\Response;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;

class UpdateUserRequest extends Request implements HasBody
Expand Down

0 comments on commit ddf10c0

Please sign in to comment.