Skip to content

Commit

Permalink
PHP Linting (Pint) - Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi authored and github-actions[bot] committed Aug 10, 2024
1 parent cbf8907 commit b97bf84
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Classes/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function coveredArea()
}

if (!$area || !$area instanceof AreaInterface) {
return new CoveredArea(new LocationArea());
return new CoveredArea(new LocationArea);
}

$coveredArea = new CoveredArea($area);
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function createLocationModel(): LocationInterface
{
$class = '\\'.ltrim($this->locationModel, '\\');

return new $class();
return new $class;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/WorkingPeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WorkingPeriod implements ArrayAccess, Countable, IteratorAggregate

public static function create($times)
{
$period = new static();
$period = new static;

$timeRanges = array_map(function($times) {
return WorkingRange::create($times);
Expand Down
12 changes: 6 additions & 6 deletions src/Classes/WorkingSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,17 @@ public function forDate(DateTimeInterface $date): WorkingPeriod

public function isOpen()
{
return $this->isOpenAt(new DateTime());
return $this->isOpenAt(new DateTime);
}

public function isOpening()
{
return (bool)$this->nextOpenAt(new DateTime());
return (bool)$this->nextOpenAt(new DateTime);
}

public function isClosed()
{
return $this->isClosedAt(new DateTime());
return $this->isClosedAt(new DateTime);
}

public function isOpenOn(string $day): bool
Expand Down Expand Up @@ -283,14 +283,14 @@ public function getPeriods()

public function getOpenTime($format = null)
{
$time = $this->nextOpenAt(new DateTime());
$time = $this->nextOpenAt(new DateTime);

return ($time && $format) ? $time->format($format) : $time;
}

public function getCloseTime($format = null)
{
$time = $this->nextCloseAt(new DateTime());
$time = $this->nextCloseAt(new DateTime);

return ($time && $format) ? $time->format($format) : $time;
}
Expand Down Expand Up @@ -389,7 +389,7 @@ public function setExceptions(array $exceptions)
protected function parseDate($start = null)
{
if (!$start) {
return new DateTime();
return new DateTime;
}

if (is_string($start)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function getSaleTypeModel($saleType)
throw new ModelNotFoundException;
}

return new $model();
return new $model;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Models/WorkingHour.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getWeekDaysOptions()

public function getTimesheetOptions($value, $data)
{
$result = new \stdClass();
$result = new \stdClass;
$result->timesheet = $value ?? [];

$result->daysOfWeek = [];
Expand Down
4 changes: 2 additions & 2 deletions tests/AutomationRules/Conditions/ReviewCountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Igniter\Local\AutomationRules\Conditions\ReviewCount;

it('defines model attributes correctly', function() {
$reviewCount = new ReviewCount();
$reviewCount = new ReviewCount;

$attributes = $reviewCount->defineModelAttributes();

Expand All @@ -19,7 +19,7 @@
it('counts reviews correctly', function() {
$order = Order::factory()->hasReview(1)->create();

$reviewCount = new ReviewCount();
$reviewCount = new ReviewCount;

expect($reviewCount->getReviewCountAttribute(null, $order))->toBe(1);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/FormWidgets/MapAreaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@
});

it('gets map shape attributes correctly', function() {
expect($this->mapAreaWidget->getMapShapeAttributes(new LocationArea()))->toBeString();
expect($this->mapAreaWidget->getMapShapeAttributes(new LocationArea))->toBeString();
});
2 changes: 1 addition & 1 deletion tests/Models/LocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
});

it('configures location model correctly', function() {
$location = new Location();
$location = new Location;

expect(class_uses_recursive($location))
->toContain(Defaultable::class)
Expand Down

0 comments on commit b97bf84

Please sign in to comment.