diff --git a/README.md b/README.md index f59f784..37f70a5 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,24 @@ Example component for OXID eShop 6.2 Services ### Install as package -`composer require michaelkeiluweit/random-integer-number` +`composer require michaelkeiluweit/random-number` ### Example usage ```php getContainer()->get(RandomIntegerNumberInterface::class); +$randomNumber = ContainerFactory::getInstance()->getContainer()->get(RandomNumberInterface::class); -echo 'random_number: ' . $randomIntegerNumber->shuffle(); +$number = $randomNumber->shuffle(); +echo 'random_number: ' . $number; +echo PHP_EOL; +echo 'type: ' . gettype($number); echo PHP_EOL; ``` diff --git a/composer.json b/composer.json index d7ee625..c4b6c23 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "michaelkeiluweit/random-integer-number", + "name": "michaelkeiluweit/random-number", "type": "oxideshop-component", "require": { "php": ">=7.4", @@ -7,7 +7,7 @@ }, "autoload": { "psr-4": { - "MichaelKeiluweit\\RandomIntegerNumber\\": "src/" + "MichaelKeiluweit\\RandomNumber\\": "src/" } }, "extra": { diff --git a/services.yaml b/services.yaml index e4889ed..471ae44 100644 --- a/services.yaml +++ b/services.yaml @@ -1,5 +1,5 @@ services: - MichaelKeiluweit\RandomIntegerNumber\RandomIntegerNumberInterface: - class: MichaelKeiluweit\RandomIntegerNumber\RandomIntegerNumber + MichaelKeiluweit\RandomNumber\RandomNumberInterface: + class: MichaelKeiluweit\RandomNumber\RandomIntegerNumber autowire: true public: true diff --git a/src/RandomIntegerNumber.php b/src/RandomIntegerNumber.php index 805ccc0..a0d5828 100644 --- a/src/RandomIntegerNumber.php +++ b/src/RandomIntegerNumber.php @@ -1,12 +1,12 @@