Skip to content

Commit a64ba2d

Browse files
committed
Fix styling
1 parent a687609 commit a64ba2d

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"spatie/laravel-package-tools": "^1.14"
2323
},
2424
"require-dev": {
25+
"laravel/pint": "^1.6",
2526
"nunomaduro/collision": "^7.0",
2627
"nunomaduro/larastan": "^2.4",
2728
"orchestra/testbench": "^8.0",
@@ -50,6 +51,7 @@
5051
"scripts": {
5152
"analyse": "vendor/bin/phpstan analyse",
5253
"test": "vendor/bin/pest",
54+
"format": "vendor/bin/pint",
5355
"test-coverage": "vendor/bin/pest coverage"
5456
},
5557
"config": {

config/running-number.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
|--------------------------------------------------------------------------
1010
|
1111
| These value is the types of the running number you would like to create.
12-
| The values can be any list of strings. As long listed here, the types
12+
| The values can be any list of strings. As long listed here, the types
1313
| are supported by your application to generate the running number.
1414
| It is recommended to use Laravel Spatie Enum for these values.
1515
|
@@ -45,11 +45,11 @@
4545
| Running Number Concatenator
4646
|--------------------------------------------------------------------------
4747
|
48-
| This class how you expect the output of the running number after it
49-
| was created. The desire format can be C0005, C-0005.
48+
| This class how you expect the output of the running number after it
49+
| was created. The desire format can be C0005, C-0005.
5050
|
5151
*/
52-
52+
5353
'presenter' => \CleaniqueCoders\RunningNumber\Presenter::class,
5454

5555
/*

src/Generator.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
class Generator implements GeneratorContract
1010
{
1111
protected $toUpperCase = true;
12+
1213
protected $presenter;
14+
1315
protected $type;
1416

1517
public function __construct()
@@ -48,7 +50,7 @@ public function toUpperCase($value)
4850
public function generate(): string
4951
{
5052
if (! in_array($this->type, config('running-number.types'))) {
51-
throw new InvalidRunningNumberTypeException('Unsupported ' . $this->type);
53+
throw new InvalidRunningNumberTypeException('Unsupported '.$this->type);
5254
}
5355

5456
$this->createRunningNumberTypeIfNotExists();

src/Presenter.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ class Presenter implements Contract
99
public function format($type, $number): string
1010
{
1111
return $type.str_pad($number, config('running-number.padding'), '0', STR_PAD_LEFT);
12-
;
1312
}
1413
}

support/helpers.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
use CleaniqueCoders\RunningNumber\Generator;
44

5-
if(! function_exists('running_number')) {
5+
if (! function_exists('running_number')) {
66
function running_number()
77
{
88
return Generator::make();
99
}
10-
}
10+
}

tests/RunningNumberTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
uses(RefreshDatabase::class);
99

1010
beforeEach(function () {
11-
include_once __DIR__ . '/../database/migrations/create_running_number_table.php.stub';
11+
include_once __DIR__.'/../database/migrations/create_running_number_table.php.stub';
1212

1313
(new \CreateRunningNumberTable())->up();
1414
});

0 commit comments

Comments
 (0)