Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyso authored and github-actions[bot] committed Oct 3, 2022
1 parent f77ca7e commit 1ceeb24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/Helpers/SSResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
class SSResponse
{
private int $code = 200;

private string|array $content = '';

private array $headers = [];

public static function make(): self
Expand All @@ -27,8 +29,8 @@ public static function error($message = '', string|array $content = '', $code =
{
return (new self)
->content([
"errors" => $content,
"message" => $content
'errors' => $content,
'message' => $content,
])
->code($code)
->headers($headers)
Expand All @@ -38,19 +40,21 @@ public static function error($message = '', string|array $content = '', $code =
public function content(string|array $content = ''): static
{
$this->content = $content;

return $this;
}

public function getContent(): array
{
return [
'data' => $this->content
'data' => $this->content,
];
}

public function code($code = 200): static
{
$this->code = $code;

return $this;
}

Expand All @@ -62,6 +66,7 @@ public function getCode(): int
public function headers(array $headers = []): static
{
$this->headers = $headers;

return $this;
}

Expand Down
3 changes: 1 addition & 2 deletions src/SatSetServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

namespace Konnco\SatSet;

use Konnco\SatSet\Commands\SatSetCommand;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Konnco\SatSet\Commands\SatSetCommand;
use Illuminate\Support\Facades\Response;

class SatSetServiceProvider extends PackageServiceProvider
{
Expand Down

0 comments on commit 1ceeb24

Please sign in to comment.