From 7bef10a2a58a0a6c615fb53e3a329a4f8902768a Mon Sep 17 00:00:00 2001 From: sikofitt Date: Thu, 29 Nov 2018 10:05:38 -0800 Subject: [PATCH] Readme formatting --- README.md | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f156eda..2a96f18 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ -## Small library to generate unique private mac addresses +# sikofitt/generate-mac -### Usage +### Small library to generate unique private mac addresses + +#### Install +[composer](https://getcomposer.org) +```bash +composer require sikofitt/generate-mac +``` + +#### Usage ```php use Sikofitt\GenerateMac\Mac; @@ -17,11 +25,11 @@ $address = $mac->getAddress(); // abcdef012345 If you don't care that it is unique you can remove the check for private mac prefixes. ```php - $mac = new Mac(':', false); - $address = $mac->getAddress(); +$mac = new Mac(':', false); +$address = $mac->getAddress(); - // '52:54:00:ab:cd:ef', QEMU virtual NIC prefix 52:54:00 - // It's really not likely there will be a collision though. +// '52:54:00:ab:cd:ef', QEMU virtual NIC prefix 52:54:00 +// It's really not likely there will be a collision though. ``` Generate multiple mac addresses @@ -43,4 +51,14 @@ var_dump($addresses); * 9 => '32:73:c0:b3:62:27', * ); */ -``` \ No newline at end of file +``` + +#### Test + +```bash +user@localhost:~/generate-mac$ vendor/phpunit +``` + +#### License + +[GPL-3.0](LICENSE) \ No newline at end of file