Skip to content

Commit 35728f0

Browse files
committed
Fix CS
1 parent 78b9a2b commit 35728f0

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/OpenAPIFaker.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,14 @@ public static function createFromYaml(string $yaml): self
6060
}
6161

6262
/**
63-
* @return mixed
64-
*
6563
* @throws NoPath
6664
* @throws NoRequest
6765
*/
6866
public function mockRequest(
6967
string $path,
7068
string $method,
7169
string $contentType = 'application/json'
72-
) {
70+
): mixed {
7371
$operation = $this->findOperation($path, $method);
7472

7573
if ($operation->requestBody === null) {
@@ -88,8 +86,6 @@ public function mockRequest(
8886
}
8987

9088
/**
91-
* @return mixed
92-
*
9389
* @throws NoPath
9490
* @throws NoResponse
9591
*/
@@ -98,7 +94,7 @@ public function mockResponse(
9894
string $method,
9995
string $statusCode = '200',
10096
string $contentType = 'application/json'
101-
) {
97+
): mixed {
10298
$operation = $this->findOperation($path, $method);
10399

104100
if ($operation->responses === null) {
@@ -124,11 +120,9 @@ public function mockResponse(
124120
}
125121

126122
/**
127-
* @return mixed
128-
*
129123
* @throws Exception
130124
*/
131-
public function mockComponentSchema(string $schemaName)
125+
public function mockComponentSchema(string $schemaName): mixed
132126
{
133127
if ($this->openAPISchema->components === null) {
134128
throw NoSchema::forZeroComponents();

src/SchemaFaker/NumberFaker.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
*/
1515
final class NumberFaker
1616
{
17-
/**
18-
* @return int|float
19-
*/
20-
public static function generate(Schema $schema)
17+
public static function generate(Schema $schema): int|float
2118
{
2219
if ($schema->enum !== null) {
2320
return Base::randomElement($schema->enum);

src/SchemaFaker/SchemaFaker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(Schema $schema, Options $options, bool $request = fa
3636
/**
3737
* @return array<mixed>|string|bool|int|float
3838
*/
39-
public function generate()
39+
public function generate(): array|string|bool|int|float
4040
{
4141
if ($this->schema->type === 'array') {
4242
return ArrayFaker::generate($this->schema, $this->options);

0 commit comments

Comments
 (0)