Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 90bcfa2

Browse files
Merge pull request #188 from package-wizard/code-style-w96un67
The code style has been fixed
2 parents c74d136 + 8cd0f49 commit 90bcfa2

3 files changed

Lines changed: 70 additions & 19 deletions

File tree

app/Data/Casts/ValidationCast.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PackageWizard\Installer\Data\Casts;
46

57
use Illuminate\Support\Str;

resources/schemas/example-v2.json

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@
1010
"clean": true
1111
},
1212
"authors": [
13-
{ },
13+
[],
1414
{
1515
"name": "John Doe",
1616
"email": "john@example.com",
1717
"replace": ":author:",
1818
"with": ":name: <:email:>"
1919
},
2020
{
21-
"replace": [":foo:", ":bar:"],
21+
"replace": [
22+
":foo:",
23+
":bar:"
24+
],
2225
"with": ":name: <:email:>"
2326
}
2427
],
@@ -58,7 +61,11 @@
5861
"with": "bar"
5962
},
6063
{
61-
"replace": ["qwe", "rty", 123],
64+
"replace": [
65+
"qwe",
66+
"rty",
67+
123
68+
],
6269
"with": 12345
6370
}
6471
],
@@ -68,7 +75,10 @@
6875
},
6976
{
7077
"type": "year",
71-
"replace": ["%year%", "2021-:year:"]
78+
"replace": [
79+
"%year%",
80+
"2021-:year:"
81+
]
7282
},
7383
{
7484
"type": "yearRange",
@@ -82,7 +92,10 @@
8292
{
8393
"type": "yearRange",
8494
"start": 2021,
85-
"replace": ["%year%", 1970]
95+
"replace": [
96+
"%year%",
97+
1970
98+
]
8699
},
87100
{
88101
"type": "date"
@@ -130,7 +143,10 @@
130143
"name": "John Doe",
131144
"email": "john@example.com"
132145
},
133-
"replace": [":author:", ":foo:"],
146+
"replace": [
147+
":author:",
148+
":foo:"
149+
],
134150
"with": ":name: <:email:>"
135151
},
136152
{
@@ -141,7 +157,10 @@
141157
"replace": ":licenseKey:"
142158
},
143159
"file": {
144-
"replace": [":licensePath:", "(LICENSE)"],
160+
"replace": [
161+
":licensePath:",
162+
"(LICENSE)"
163+
],
145164
"path": "LICENSE.md"
146165
}
147166
},
@@ -178,14 +197,24 @@
178197
"type": "ask",
179198
"prompt": "select",
180199
"question": "Select one of the options",
181-
"options": [100, 200, "300", "400"],
200+
"options": [
201+
100,
202+
200,
203+
"300",
204+
"400"
205+
],
182206
"replace": ":foo:"
183207
},
184208
{
185209
"type": "ask",
186210
"prompt": "select",
187211
"question": "Select one of the options",
188-
"options": [100, 200, 300, 400],
212+
"options": [
213+
100,
214+
200,
215+
300,
216+
400
217+
],
189218
"replace": ":foo:"
190219
},
191220
{

resources/schemas/schema-v2.json

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,12 @@
466466
},
467467
"default": {
468468
"oneOf": [
469-
{ "type": "string" },
470-
{ "type": "integer" }
469+
{
470+
"type": "string"
471+
},
472+
{
473+
"type": "integer"
474+
}
471475
],
472476
"default": ""
473477
},
@@ -515,11 +519,17 @@
515519
"options": {
516520
"type": "array",
517521
"anyOf": [
518-
{ "type": "string" },
519-
{ "type": "integer" },
522+
{
523+
"type": "string"
524+
},
525+
{
526+
"type": "integer"
527+
},
520528
{
521529
"type": "object",
522-
"propertyNames": { "type": "string" },
530+
"propertyNames": {
531+
"type": "string"
532+
},
523533
"additionalProperties": false
524534
}
525535
],
@@ -529,8 +539,12 @@
529539
},
530540
"default": {
531541
"oneOf": [
532-
{ "type": "string" },
533-
{ "type": "integer" }
542+
{
543+
"type": "string"
544+
},
545+
{
546+
"type": "integer"
547+
}
534548
]
535549
},
536550
"replace": {
@@ -558,8 +572,12 @@
558572
"type": "array",
559573
"items": {
560574
"anyOf": [
561-
{ "type": "string" },
562-
{ "type": "number" }
575+
{
576+
"type": "string"
577+
},
578+
{
579+
"type": "number"
580+
}
563581
]
564582
},
565583
"uniqueItems": true,
@@ -572,7 +590,9 @@
572590
"validation": {
573591
"type": "array",
574592
"items": [
575-
{ "type": "string" }
593+
{
594+
"type": "string"
595+
}
576596
],
577597
"default": null,
578598
"uniqueItems": true,

0 commit comments

Comments
 (0)