Skip to content

Commit 572d71c

Browse files
committed
cs fixes applied
1 parent 38b0274 commit 572d71c

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function getMigratedVersions()
304304
* @return string
305305
*
306306
* @throws AntiMattr\MongoDB\Migrations\Exception\UnknownVersionException Throws exception if migration version does not exist
307-
* @throws DomainException If more than one version exists
307+
* @throws DomainException If more than one version exists
308308
*/
309309
public function getMigratedTimestamp($version)
310310
{

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
/**
1515
* This class is to normalise the potential values from the 't' version
16-
* attribute
16+
* attribute.
1717
*
1818
* @author Douglas Reith <douglas@reith.com.au>
1919
*/
@@ -22,7 +22,7 @@ class Timestamp
2222
private $t;
2323

2424
/**
25-
* __construct
25+
* __construct.
2626
*
2727
* @param mixed $t
2828
*/
@@ -32,9 +32,10 @@ public function __construct($t)
3232
}
3333

3434
/**
35-
* __invoke
35+
* __invoke.
3636
*
3737
* @param mixed $t
38+
*
3839
* @return int
3940
*/
4041
public function __invoke($t): int
@@ -43,7 +44,7 @@ public function __invoke($t): int
4344
}
4445

4546
/**
46-
* getTimestamp
47+
* getTimestamp.
4748
*
4849
* Normalise based on the different options for backward/forward
4950
* compatibility
@@ -69,7 +70,7 @@ public function getTimestamp(): int
6970
);
7071
}
7172

72-
switch(get_class($this->t)) {
73+
switch (get_class($this->t)) {
7374
case 'MongoTimestamp':
7475
return (int) $this->t->__toString();
7576

@@ -93,7 +94,7 @@ public function getTimestamp(): int
9394
}
9495

9596
/**
96-
* __toString
97+
* __toString.
9798
*
9899
* @return string
99100
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function testValidate()
271271
}
272272

273273
/**
274-
* testDuplicateThrowsException
274+
* testDuplicateThrowsException.
275275
*
276276
* @expectedException \DomainException
277277
* @expectedExceptionMessage Unexpected duplicate version records in the database
@@ -340,7 +340,6 @@ public function testGetMigratedTimestamp()
340340
$this->assertTrue(is_numeric($this->configuration->getMigratedTimestamp('1')));
341341
}
342342

343-
344343
private function prepareValidConfiguration()
345344
{
346345
$directory = dirname(__DIR__) . '/Resources/Migrations/';

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class TimestampTest extends AntiMattrTestCase
99
{
1010
/**
11-
* testTimestamp
11+
* testTimestamp.
1212
*
1313
* @dataProvider provideTimestamps
1414
*/
@@ -24,42 +24,42 @@ public function provideTimestamps(): array
2424
$millisecondsSince1970 = $secondsSince1970 * 1000;
2525

2626
$timestamps = [
27-
[$rightNow, $secondsSince1970]
27+
[$rightNow, $secondsSince1970],
2828
];
2929

3030
if (class_exists('\MongoDB\BSON\Timestamp')) {
3131
$timestamps[] = [
3232
new \MongoDB\BSON\Timestamp(0, $secondsSince1970),
33-
$secondsSince1970
33+
$secondsSince1970,
3434
];
3535
}
3636

3737
if (class_exists('\MongoDB\BSON\UTCDateTime')) {
3838
$timestamps[] = [
3939
new \MongoDB\BSON\UTCDateTime($millisecondsSince1970),
40-
$secondsSince1970
40+
$secondsSince1970,
4141
];
4242
}
4343

4444
if (class_exists('\MongoDate')) {
4545
$timestamps[] = [
4646
new \MongoDate($secondsSince1970),
47-
$secondsSince1970
47+
$secondsSince1970,
4848
];
4949
}
5050

5151
if (class_exists('\MongoTimestamp')) {
5252
$timestamps[] = [
5353
new \MongoTimestamp($secondsSince1970),
54-
$secondsSince1970
54+
$secondsSince1970,
5555
];
5656
}
5757

5858
return $timestamps;
5959
}
6060

6161
/**
62-
* testWillThrowAnExceptionForUnknownClass
62+
* testWillThrowAnExceptionForUnknownClass.
6363
*
6464
* @expectedException \DomainException
6565
*/
@@ -69,7 +69,7 @@ public function testWillThrowAnExceptionForUnknownClass()
6969
}
7070

7171
/**
72-
* testWillThrowAnExceptionForNull
72+
* testWillThrowAnExceptionForNull.
7373
*
7474
* @expectedException \DomainException
7575
*/

0 commit comments

Comments
 (0)