Skip to content

Commit 3166931

Browse files
authored
Merge Release v2.x-automation-test
1 parent 84db667 commit 3166931

File tree

6 files changed

+20
-40
lines changed

6 files changed

+20
-40
lines changed

Business/UuidExtractorInterface.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,21 @@ interface UuidExtractorInterface
66
{
77
/**
88
* Creates a UUID from a string UUID.
9-
*
10-
* @param string $source
11-
*
12-
* @return string
139
*/
14-
public function fromString(string $source): string;
10+
public function fromString(string $uuid): string;
1511

1612
/**
1713
* Creates a UUID from a 16-byte string.
18-
*
19-
* @param string $bytes
20-
*
21-
* @return string
2214
*/
2315
public function fromBytes(string $bytes): string;
2416

2517
/**
2618
* Creates a UUID from a string integer.
27-
*
28-
* @param string $integer
29-
*
30-
* @return string
3119
*/
3220
public function fromInteger(string $integer): string;
3321

3422
/**
3523
* Creates a UUID from a DateTimeInterface instance
36-
*
37-
* @param \DateTimeInterface $dateTime
38-
*
39-
* @return string
4024
*/
4125
public function fromDatetime(\DateTimeInterface $dateTime): string;
4226
}

Business/UuidGenerator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ public function v5(string $namespace): string
3838
return Uuid::uuid5($this->getUuidConstant($namespace), php_uname('n'))->toString();
3939
}
4040

41-
/**
42-
* {@inheritDoc}
43-
*/
4441
public function v6(): string
4542
{
4643
return Uuid::uuid6()->toString();

UuidFacade.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
use Micro\Plugin\Uuid\Business\UuidExtractorFactoryInterface;
66
use Micro\Plugin\Uuid\Business\UuidGeneratorFactoryInterface;
77

8-
class UuidFacade implements UuidFacadeInterface
8+
readonly class UuidFacade implements UuidFacadeInterface
99
{
1010
/**
1111
* @param UuidGeneratorFactoryInterface $generatorFactory
1212
* @param UuidExtractorFactoryInterface $extractorFactory
1313
*/
1414
public function __construct(
15-
private readonly UuidGeneratorFactoryInterface $generatorFactory,
16-
private readonly UuidExtractorFactoryInterface $extractorFactory
17-
)
18-
{
15+
private UuidGeneratorFactoryInterface $generatorFactory,
16+
private UuidExtractorFactoryInterface $extractorFactory
17+
) {
1918
}
2019

2120
/**
@@ -53,9 +52,9 @@ public function v5(string $namespace): string
5352
/**
5453
* {@inheritDoc}
5554
*/
56-
public function fromString(string $source): string
55+
public function fromString(string $uuid): string
5756
{
58-
return $this->extractorFactory->create()->fromString($source);
57+
return $this->extractorFactory->create()->fromString($uuid);
5958
}
6059

6160
/**

UuidFacadeFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
use Micro\Plugin\Uuid\Business\UuidExtractorFactoryInterface;
66
use Micro\Plugin\Uuid\Business\UuidGeneratorFactoryInterface;
77

8-
class UuidFacadeFactory implements UuidFacadeFactoryInterface
8+
readonly class UuidFacadeFactory implements UuidFacadeFactoryInterface
99
{
1010
/**
1111
* @param UuidGeneratorFactoryInterface $generatorFactory
1212
* @param UuidExtractorFactoryInterface $extractorFactory
1313
*/
1414
public function __construct(
15-
private readonly UuidGeneratorFactoryInterface $generatorFactory,
16-
private readonly UuidExtractorFactoryInterface $extractorFactory
15+
private UuidGeneratorFactoryInterface $generatorFactory,
16+
private UuidExtractorFactoryInterface $extractorFactory
1717
)
1818
{
1919
}

UuidPlugin.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
*/
1515
class UuidPlugin implements DependencyProviderInterface
1616
{
17-
/**
18-
* {@inheritDoc}
19-
*/
2017
public function provideDependencies(Container $container): void
2118
{
2219
$container->register(UuidFacadeInterface::class, function() {

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
22
"name": "micro/plugin-uuid",
33
"description": "Micro Framework - plugin for UUID support",
4-
"type": "micro-plugin",
54
"license": "MIT",
6-
"autoload": {
7-
"psr-4": {
8-
"Micro\\Plugin\\Uuid\\": "/"
9-
}
10-
},
5+
"type": "micro-plugin",
116
"authors": [
127
{
138
"name": "Stanislau.Komar",
@@ -18,5 +13,13 @@
1813
"micro/kernel": "^2.0",
1914
"ramsey/uuid": "^4.2"
2015
},
21-
"minimum-stability": "dev"
16+
"minimum-stability": "dev",
17+
"autoload": {
18+
"psr-4": {
19+
"Micro\\Plugin\\Uuid\\": "/"
20+
}
21+
},
22+
"config": {
23+
"sort-packages": true
24+
}
2225
}

0 commit comments

Comments
 (0)