Skip to content

Commit

Permalink
chore: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Katalam committed Jun 29, 2024
1 parent e911568 commit ddb32e4
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 67 deletions.
4 changes: 1 addition & 3 deletions src/Exceptions/OnOfficeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use Exception;

class OnOfficeException extends Exception
{
}
class OnOfficeException extends Exception {}
4 changes: 1 addition & 3 deletions src/Facades/Testing/RecordFactories/BaseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ abstract class BaseFactory
/**
* Final to solve Unsafe usage of new static()
*/
final public function __construct()
{
}
final public function __construct() {}

public function id(int $id): static
{
Expand Down
4 changes: 1 addition & 3 deletions src/Facades/Testing/RecordFactories/ImprintFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Katalam\OnOfficeAdapter\Facades\Testing\RecordFactories;

class ImprintFactory extends BaseFactory
{
}
class ImprintFactory extends BaseFactory {}
3 changes: 1 addition & 2 deletions src/Query/ActivityBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class ActivityBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/AddressBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class AddressBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/EstateBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class EstateBuilder extends Builder
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/FieldBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class FieldBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/ImprintBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class ImprintBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/MarketplaceBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class MarketplaceBuilder extends Builder
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* @throws OnOfficeException
Expand Down
3 changes: 1 addition & 2 deletions src/Query/RegionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class RegionBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/RelationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class RelationBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Query/Testing/BaseFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class BaseFake extends Builder
{
public function __construct(
public Collection $fakeResponses
) {
}
) {}

/**
* @throws Throwable
Expand Down
4 changes: 1 addition & 3 deletions src/Query/Testing/EstateBuilderFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Katalam\OnOfficeAdapter\Query\Testing;

class EstateBuilderFake extends BaseFake
{
}
class EstateBuilderFake extends BaseFake {}
4 changes: 1 addition & 3 deletions src/Query/Testing/ImprintBuilderFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Katalam\OnOfficeAdapter\Query\Testing;

class ImprintBuilderFake extends BaseFake
{
}
class ImprintBuilderFake extends BaseFake {}
4 changes: 1 addition & 3 deletions src/Query/Testing/RegionBuilderFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Katalam\OnOfficeAdapter\Query\Testing;

class RegionBuilderFake extends BaseFake
{
}
class RegionBuilderFake extends BaseFake {}
4 changes: 1 addition & 3 deletions src/Query/Testing/UserBuilderFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Katalam\OnOfficeAdapter\Query\Testing;

class UserBuilderFake extends BaseFake
{
}
class UserBuilderFake extends BaseFake {}
3 changes: 1 addition & 2 deletions src/Query/UploadBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class UploadBuilder extends Builder

public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* @throws OnOfficeException
Expand Down
3 changes: 1 addition & 2 deletions src/Query/UserBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class UserBuilder extends Builder
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

public function get(): Collection
{
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/ActivityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class ActivityRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new address builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/AddressRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class AddressRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new address builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/EstateRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class EstateRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new estate builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/FieldRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class FieldRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new field builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/FileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class FileRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new upload builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/MarketplaceRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class MarketplaceRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new marketplace builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/RelationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class RelationRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new relation builder instance.
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/SettingRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ class SettingRepository
{
public function __construct(
private readonly OnOfficeService $onOfficeService,
) {
}
) {}

/**
* Returns a new user builder instance.
Expand Down
4 changes: 1 addition & 3 deletions tests/Query/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ public function find(int $id): array
return [];
}

public function each(callable $callback): void
{
}
public function each(callable $callback): void {}

public function modify(int $id): bool
{
Expand Down
3 changes: 1 addition & 2 deletions tests/Services/OnOfficeServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@
OnOfficeAction::Get,
OnOfficeResourceType::Estate,
);
}, function () {
});
}, function () {});
})->with([300, 301, 400, 401, 500, 501]);

it('will call the callback', function () {
Expand Down
4 changes: 1 addition & 3 deletions tests/Testing/Factories/BaseFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

use Katalam\OnOfficeAdapter\Facades\Testing\RecordFactories\BaseFactory;

class Factory extends BaseFactory
{
}
class Factory extends BaseFactory {}

describe('construct', function () {
it('builds', function () {
Expand Down

0 comments on commit ddb32e4

Please sign in to comment.