Skip to content

Commit 66f8d2a

Browse files
committed
Revert faulty CS fixes
1 parent df2a2fb commit 66f8d2a

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/OpenAPIFaker.php

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

6262
/**
63+
* @return mixed
64+
*
6365
* @throws NoPath
6466
* @throws NoRequest
6567
*/
6668
public function mockRequest(
6769
string $path,
6870
string $method,
6971
string $contentType = 'application/json'
70-
): mixed {
72+
) {
7173
$operation = $this->findOperation($path, $method);
7274

7375
if ($operation->requestBody === null) {
@@ -86,6 +88,8 @@ public function mockRequest(
8688
}
8789

8890
/**
91+
* @return mixed
92+
*
8993
* @throws NoPath
9094
* @throws NoResponse
9195
*/
@@ -94,7 +98,7 @@ public function mockResponse(
9498
string $method,
9599
string $statusCode = '200',
96100
string $contentType = 'application/json'
97-
): mixed {
101+
) {
98102
$operation = $this->findOperation($path, $method);
99103

100104
if ($operation->responses === null) {
@@ -120,9 +124,11 @@ public function mockResponse(
120124
}
121125

122126
/**
127+
* @return mixed
128+
*
123129
* @throws Exception
124130
*/
125-
public function mockComponentSchema(string $schemaName): mixed
131+
public function mockComponentSchema(string $schemaName)
126132
{
127133
if ($this->openAPISchema->components === null) {
128134
throw NoSchema::forZeroComponents();

src/SchemaFaker/NumberFaker.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
*/
1515
final class NumberFaker
1616
{
17-
public static function generate(Schema $schema): int|float
17+
/**
18+
* @return int|float
19+
*/
20+
public static function generate(Schema $schema)
1821
{
1922
if ($schema->enum !== null) {
2023
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(): array|string|bool|int|float
39+
public function generate()
4040
{
4141
if ($this->schema->type === 'array') {
4242
return ArrayFaker::generate($this->schema, $this->options);

0 commit comments

Comments
 (0)