Skip to content

Commit 5cbeb6a

Browse files
committed
Remove the invoke() method, not required. Remove extraneous doc block info
1 parent 068940e commit 5cbeb6a

File tree

3 files changed

+1
-28
lines changed

3 files changed

+1
-28
lines changed

src/AntiMattr/MongoDB/Migrations/Configuration/Timestamp.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class Timestamp
2222
private $t;
2323

2424
/**
25-
* __construct.
26-
*
2725
* @param mixed $t
2826
*/
2927
public function __construct($t)
@@ -32,22 +30,8 @@ public function __construct($t)
3230
}
3331

3432
/**
35-
* __invoke.
36-
*
37-
* @param mixed $t
38-
*
39-
* @return int
40-
*/
41-
public function __invoke($t): int
42-
{
43-
return (new static($t))->getTimestamp();
44-
}
45-
46-
/**
47-
* getTimestamp.
48-
*
4933
* Normalise based on the different options for backward/forward
50-
* compatibility
34+
* compatibility.
5135
*
5236
* @return int Time in seconds since 1970
5337
*/
@@ -94,8 +78,6 @@ public function getTimestamp(): int
9478
}
9579

9680
/**
97-
* __toString.
98-
*
9981
* @return string
10082
*/
10183
public function __toString(): string

tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/ConfigurationTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ public function testValidate()
271271
}
272272

273273
/**
274-
* testDuplicateInGetMigratedTimestampThrowsException.
275-
*
276274
* @expectedException \DomainException
277275
* @expectedExceptionMessage Unexpected duplicate version records in the database
278276
*/
@@ -340,7 +338,6 @@ public function testGetMigratedTimestamp()
340338
$this->assertTrue(is_numeric($this->configuration->getMigratedTimestamp('1')));
341339
}
342340

343-
344341
private function prepareValidConfiguration()
345342
{
346343
$directory = dirname(__DIR__) . '/Resources/Migrations/';

tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/TimestampTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
class TimestampTest extends AntiMattrTestCase
99
{
1010
/**
11-
* testTimestamp.
12-
*
1311
* @dataProvider provideTimestamps
1412
*/
1513
public function testTimestamp($ts, $expected)
@@ -59,8 +57,6 @@ public function provideTimestamps(): array
5957
}
6058

6159
/**
62-
* testWillThrowAnExceptionForUnknownClass.
63-
*
6460
* @expectedException \DomainException
6561
*/
6662
public function testWillThrowAnExceptionForUnknownClass()
@@ -69,8 +65,6 @@ public function testWillThrowAnExceptionForUnknownClass()
6965
}
7066

7167
/**
72-
* testWillThrowAnExceptionForNull.
73-
*
7468
* @expectedException \DomainException
7569
*/
7670
public function testWillThrowAnExceptionForNull()

0 commit comments

Comments
 (0)