Skip to content

Commit

Permalink
Merge pull request #4 from spatie/analysis-XkeM0j
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
freekmurze authored Nov 29, 2018
2 parents 3524665 + 24d1e3e commit af753de
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/IterableImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->periods[] = $value;

return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Period.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Spatie\Period;

use DateInterval;
use DateTime;
use DateInterval;
use DateTimeImmutable;
use DateTimeInterface;
use Spatie\Period\Exceptions\InvalidDate;
Expand Down
4 changes: 2 additions & 2 deletions src/PeriodCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Spatie\Period;

use ArrayAccess;
use Countable;
use Iterator;
use Countable;
use ArrayAccess;

class PeriodCollection implements ArrayAccess, Iterator, Countable
{
Expand Down
2 changes: 1 addition & 1 deletion tests/PeriodCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Spatie\Tests\Period;

use PHPUnit\Framework\TestCase;
use Spatie\Period\Period;
use PHPUnit\Framework\TestCase;
use Spatie\Period\PeriodCollection;

class PeriodCollectionTest extends TestCase
Expand Down
16 changes: 8 additions & 8 deletions tests/PeriodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Carbon\Carbon;
use DateTimeImmutable;
use PHPUnit\Framework\TestCase;
use Spatie\Period\Period;
use PHPUnit\Framework\TestCase;

class PeriodTest extends TestCase
{
Expand Down Expand Up @@ -62,31 +62,31 @@ public function it_can_determine_that_two_periods_do_not_overlap_with_each_other
public function overlappingDates(): array
{
return [
/**
/*
* A [=====]
* B [=====]
*/
[Period::make('2018-01-01', '2018-02-01'), Period::make('2018-01-15', '2018-02-15')],

/**
/*
* A [=====]
* B [=============]
*/
[Period::make('2018-01-01', '2018-02-01'), Period::make('2017-01-01', '2019-01-01')],

/**
/*
* A [=====]
* B [=====]
*/
[Period::make('2018-01-01', '2018-02-01'), Period::make('2017-12-01', '2018-01-15')],

/**
/*
* A [=============]
* B [=====]
*/
[Period::make('2017-01-01', '2019-01-01'), Period::make('2018-01-01', '2018-02-01')],

/**
/*
* A [====]
* B [====]
*/
Expand All @@ -97,13 +97,13 @@ public function overlappingDates(): array
public function noOverlappingDates()
{
return [
/**
/*
* A [===]
* B [===]
*/
[Period::make('2018-01-01', '2018-01-31'), Period::make('2018-02-01', '2018-02-28')],

/**
/*
* A [===]
* B [===]
*/
Expand Down

0 comments on commit af753de

Please sign in to comment.