File tree Expand file tree Collapse file tree 6 files changed +20
-40
lines changed
Expand file tree Collapse file tree 6 files changed +20
-40
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff line change 55use Micro \Plugin \Uuid \Business \UuidExtractorFactoryInterface ;
66use 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 /**
Original file line number Diff line number Diff line change 55use Micro \Plugin \Uuid \Business \UuidExtractorFactoryInterface ;
66use 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 }
Original file line number Diff line number Diff line change 1414 */
1515class UuidPlugin implements DependencyProviderInterface
1616{
17- /**
18- * {@inheritDoc}
19- */
2017 public function provideDependencies (Container $ container ): void
2118 {
2219 $ container ->register (UuidFacadeInterface::class, function () {
Original file line number Diff line number Diff line change 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" ,
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}
You can’t perform that action at this time.
0 commit comments