Skip to content

Commit 8487e44

Browse files
committed
added declare strict types using pint
1 parent af2aa7a commit 8487e44

11 files changed

+30
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ All notable changes to `laravel-secure-random-number-generator` will be document
2121
## 0.0.5 - 2023-06-20
2222

2323
- added a feature to generate a random unique number for a model with a default value set in the configuration file
24+
25+
## 0.0.6 - 2023-06-20
26+
27+
- added declare strict types using pint

config/secure-random-number-generator.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
return [
46
/** This is the start of the random number range */
57
'from_number_range' => 1000,

database/factories/ModelFactory.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CreativeCrafts\SecureRandomNumberGenerator\Database\Factories;
46

57
use Illuminate\Database\Eloquent\Factories\Factory;

pint.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"preset": "psr12",
3+
"rules": {
4+
"declare_strict_types": true,
5+
"strict_comparison": true,
6+
"strict_param": true
7+
}
8+
}

src/SecureRandomNumberGenerator.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CreativeCrafts\SecureRandomNumberGenerator;
46

57
use Illuminate\Support\Facades\Validator;

src/SecureRandomNumberGeneratorServiceProvider.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CreativeCrafts\SecureRandomNumberGenerator;
46

57
use Spatie\LaravelPackageTools\Package;

tests/ArchTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
it('will not use debugging functions')
46
->expect(['dd', 'dump', 'ray'])
57
->each->not->toBeUsed();

tests/ExampleTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
it('can test', function () {
46
expect(true)->toBeTrue();
57
});

tests/Pest.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use CreativeCrafts\SecureRandomNumberGenerator\Tests\TestCase;
46

57
uses(TestCase::class)->in(__DIR__);

tests/SecureRandomNumberGeneratorTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use CreativeCrafts\SecureRandomNumberGenerator\SecureRandomNumberGenerator;
46

57
it('can generate a secure random number', function () {

tests/TestCase.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace CreativeCrafts\SecureRandomNumberGenerator\Tests;
46

57
use CreativeCrafts\SecureRandomNumberGenerator\SecureRandomNumberGeneratorServiceProvider;

0 commit comments

Comments
 (0)