Skip to content

Commit

Permalink
Remove the invoke() method, not required. Remove extraneous doc block…
Browse files Browse the repository at this point in the history
… info
  • Loading branch information
redthor committed Apr 12, 2018
1 parent 068940e commit 5cbeb6a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
20 changes: 1 addition & 19 deletions src/AntiMattr/MongoDB/Migrations/Configuration/Timestamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class Timestamp
private $t;

/**
* __construct.
*
* @param mixed $t
*/
public function __construct($t)
Expand All @@ -32,22 +30,8 @@ public function __construct($t)
}

/**
* __invoke.
*
* @param mixed $t
*
* @return int
*/
public function __invoke($t): int
{
return (new static($t))->getTimestamp();
}

/**
* getTimestamp.
*
* Normalise based on the different options for backward/forward
* compatibility
* compatibility.
*
* @return int Time in seconds since 1970
*/
Expand Down Expand Up @@ -94,8 +78,6 @@ public function getTimestamp(): int
}

/**
* __toString.
*
* @return string
*/
public function __toString(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ public function testValidate()
}

/**
* testDuplicateInGetMigratedTimestampThrowsException.
*
* @expectedException \DomainException
* @expectedExceptionMessage Unexpected duplicate version records in the database
*/
Expand Down Expand Up @@ -340,7 +338,6 @@ public function testGetMigratedTimestamp()
$this->assertTrue(is_numeric($this->configuration->getMigratedTimestamp('1')));
}


private function prepareValidConfiguration()
{
$directory = dirname(__DIR__) . '/Resources/Migrations/';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
class TimestampTest extends AntiMattrTestCase
{
/**
* testTimestamp.
*
* @dataProvider provideTimestamps
*/
public function testTimestamp($ts, $expected)
Expand Down Expand Up @@ -59,8 +57,6 @@ public function provideTimestamps(): array
}

/**
* testWillThrowAnExceptionForUnknownClass.
*
* @expectedException \DomainException
*/
public function testWillThrowAnExceptionForUnknownClass()
Expand All @@ -69,8 +65,6 @@ public function testWillThrowAnExceptionForUnknownClass()
}

/**
* testWillThrowAnExceptionForNull.
*
* @expectedException \DomainException
*/
public function testWillThrowAnExceptionForNull()
Expand Down

0 comments on commit 5cbeb6a

Please sign in to comment.