Skip to content

Commit

Permalink
#11 - Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Mar 22, 2020
1 parent 88e6644 commit 632bfd3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Version/IncrementalItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public static function between($initialVersion, $finalVersion, $versions)
foreach ($versions as $version) {
/** @var ItemInterface $version */
if (
($version->getStamp() >= $initialVersion->getStamp())
&& ($version->getStamp() <= $finalVersion->getStamp())
$version->getStamp() >= $initialVersion->getStamp() &&
$version->getStamp() <= $finalVersion->getStamp()
) {
$betweenVersions[] = $version;
}
Expand All @@ -149,7 +149,7 @@ public static function between($initialVersion, $finalVersion, $versions)
* @param ItemInterface[] $versions
* @return array ItemInterface[]
*/
public static function sortAsc($versions)
public static function sortAsc(array $versions): array
{
$sortData = [];
foreach ($versions as $version) {
Expand Down
9 changes: 9 additions & 0 deletions tests/integration/Migration/Action/GenerateCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public function construct(IntegrationTester $I): void
$I->assertNull($class->getPrimaryColumnName());
}

/**
* @param IntegrationTester $I
*/
public function getReferences(IntegrationTester $I): void
{
$I->wantToTest('Migration\Action\Generate - getReferences()');
Expand Down Expand Up @@ -69,6 +72,9 @@ public function getReferences(IntegrationTester $I): void
$I->assertNotFalse(array_search("'referencedSchema' => 'public'", current($generatedReferences)));
}

/**
* @param IntegrationTester $I
*/
public function getReferencesWithoutSchema(IntegrationTester $I): void
{
$I->wantToTest('Migration\Action\Generate - getReferences() without schema');
Expand Down Expand Up @@ -140,6 +146,9 @@ public function getReferencesWithoutSchema(IntegrationTester $I): void
$I->assertFalse($schemaFound2);
}

/**
* @param IntegrationTester $I
*/
public function getReferencesWithSchema(IntegrationTester $I): void
{
$I->wantToTest('Migration\Action\Generate - getReferences() with schema');
Expand Down

0 comments on commit 632bfd3

Please sign in to comment.