Skip to content

Commit

Permalink
Merge pull request #7 from seisigmasrl/feature/rnc-type
Browse files Browse the repository at this point in the history
Fixing Package Namespace
  • Loading branch information
ricardov03 authored Feb 7, 2023
2 parents 4e815bf + 7f378ee commit f5f5fa4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ Just in case you need a few extra tools, here's a list of utility functions:
### getNumbers
This function returns all numbers from any provided string.<br>
__How to use it:__

```php
require Seisigma\DgiiRncValidator\Helpers\Utils;
require Seisigma\DgiiRncValidator\helpers\Utils;
...
$results = Utils::getNumbers("abc123456");
var_dump($results); // string(6) "123456"
Expand All @@ -97,8 +98,9 @@ var_dump($results); // bool(false)
### luhnAlgorithmValidation
This function validates if the given sequence of digits has a valid key (checksum).<br>
__How to use it:__

```php
require Seisigma\DgiiRncValidator\Helpers\Utils;
require Seisigma\DgiiRncValidator\helpers\Utils;
...
$result = Utils::luhnAlgorithmValidation("79927398713");
var_dump($result); // bool(true)
Expand All @@ -110,8 +112,9 @@ var_dump($result); // bool(false)
### validateDominicanCitizenId
This function validates if the given sequence of digits is a valid Dominican Citizen Id.<br>
__How to use it:__

```php
require Seisigma\DgiiRncValidator\Helpers\Utils;
require Seisigma\DgiiRncValidator\helpers\Utils;
...
$result = Utils::validateDominicanCitizenId("04800009575");
var_dump($result); // bool(true)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"autoload": {
"psr-4": {
"Seisigma\\DgiiRncValidator\\": "src",
"Seisigma\\DgiiRncValidator\\Helpers\\": "src\\Helpers"
"Seisigma\\DgiiRncValidator\\helpers\\": "src\\helpers"
}
},
"autoload-dev": {
Expand Down
6 changes: 3 additions & 3 deletions src/DgiiRncValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Seisigma\DgiiRncValidator;

use Seisigma\DgiiRncValidator\Helpers\Status;
use Seisigma\DgiiRncValidator\Helpers\Types;
use Seisigma\DgiiRncValidator\Helpers\Utils;
use Seisigma\DgiiRncValidator\helpers\Status;
use Seisigma\DgiiRncValidator\helpers\Types;
use Seisigma\DgiiRncValidator\helpers\Utils;
use SoapClient;

class DgiiRncValidator
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Status.php → src/helpers/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Seisigma\DgiiRncValidator\Helpers;
namespace Seisigma\DgiiRncValidator\helpers;

enum Status: int
{
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Types.php → src/helpers/Types.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Seisigma\DgiiRncValidator\Helpers;
namespace Seisigma\DgiiRncValidator\helpers;

enum Types: int
{
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Utils.php → src/helpers/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with the source code.
*/

namespace Seisigma\DgiiRncValidator\Helpers;
namespace Seisigma\DgiiRncValidator\helpers;

final class Utils
{
Expand Down
2 changes: 1 addition & 1 deletion tests/UtilsTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Seisigma\DgiiRncValidator\Helpers\Utils;
use Seisigma\DgiiRncValidator\helpers\Utils;

test('return a number from a given string', function () {
expect(Utils::getNumbers('123456789'))->toBeString()
Expand Down

0 comments on commit f5f5fa4

Please sign in to comment.