Skip to content

Commit 699462f

Browse files
spawniaStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 9d8cbb6 commit 699462f

File tree

11 files changed

+0
-150
lines changed

11 files changed

+0
-150
lines changed

src/Email.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class Email extends StringScalar
1818

1919
/**
2020
* Check if the given string is a valid email.
21-
*
22-
* @param string $stringValue
23-
*
24-
* @return bool
2521
*/
2622
protected function isValid(string $stringValue): bool
2723
{

src/JSON.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class JSON extends ScalarType
2222

2323
/**
2424
* Serializes an internal value to include in a response.
25-
*
26-
* @param mixed $value
27-
*
28-
* @return string
2925
*/
3026
public function serialize($value): string
3127
{
@@ -37,11 +33,8 @@ public function serialize($value): string
3733
*
3834
* In the case of an invalid value this method must throw an Exception
3935
*
40-
* @param mixed $value
4136
*
4237
* @throws Error
43-
*
44-
* @return mixed
4538
*/
4639
public function parseValue($value)
4740
{
@@ -57,8 +50,6 @@ public function parseValue($value)
5750
* @param mixed[]|null $variables
5851
*
5952
* @throws Exception
60-
*
61-
* @return mixed
6253
*/
6354
public function parseLiteral($valueNode, ?array $variables = null)
6455
{
@@ -74,11 +65,8 @@ public function parseLiteral($valueNode, ?array $variables = null)
7465
/**
7566
* Try to decode a user-given value into JSON.
7667
*
77-
* @param mixed $value
7868
*
7969
* @throws Error
80-
*
81-
* @return mixed
8270
*/
8371
protected function decodeJSON($value)
8472
{

src/Mixed.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ class Mixed extends ScalarType
2323

2424
/**
2525
* Serializes an internal value to include in a response.
26-
*
27-
* @param mixed $value
28-
*
29-
* @return mixed
3026
*/
3127
public function serialize($value)
3228
{
@@ -37,10 +33,6 @@ public function serialize($value)
3733
* Parses an externally provided value (query variable) to use as an input.
3834
*
3935
* In the case of an invalid value this method must throw an Exception
40-
*
41-
* @param mixed $value
42-
*
43-
* @return mixed
4436
*/
4537
public function parseValue($value)
4638
{
@@ -56,8 +48,6 @@ public function parseValue($value)
5648
* @param mixed[]|null $variables
5749
*
5850
* @throws \Exception
59-
*
60-
* @return mixed
6151
*/
6252
public function parseLiteral($valueNode, ?array $variables = null)
6353
{

src/Regex.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,11 @@ public static function regex(): string
4949

5050
/**
5151
* Return the Regex that the values are validated against.
52-
*
53-
* @return string
5452
*/
5553
abstract public static function regex(): string;
5654

5755
/**
5856
* Serializes an internal value to include in a response.
59-
*
60-
* @param mixed $value
61-
*
62-
* @return string
6357
*/
6458
public function serialize($value): string
6559
{
@@ -76,10 +70,6 @@ public function serialize($value): string
7670

7771
/**
7872
* Determine if the given string matches the regex defined in this class.
79-
*
80-
* @param string $value
81-
*
82-
* @return bool
8373
*/
8474
protected static function matchesRegex(string $value): bool
8575
{
@@ -94,11 +84,8 @@ protected static function matchesRegex(string $value): bool
9484
/**
9585
* Parses an externally provided value (query variable) to use as an input.
9686
*
97-
* @param mixed $value
9887
*
9988
* @throws Error
100-
*
101-
* @return string
10289
*/
10390
public function parseValue($value): string
10491
{
@@ -120,8 +107,6 @@ public function parseValue($value): string
120107
* @param mixed[]|null $variables
121108
*
122109
* @throws Error
123-
*
124-
* @return string
125110
*/
126111
public function parseLiteral($valueNode, ?array $variables = null): string
127112
{
@@ -139,10 +124,6 @@ public function parseLiteral($valueNode, ?array $variables = null): string
139124

140125
/**
141126
* Construct the error message that occurs when the given string does not match the regex.
142-
*
143-
* @param string $value
144-
*
145-
* @return string
146127
*/
147128
public static function unmatchedRegexMessage(string $value): string
148129
{

src/StringScalar.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ public static function make(string $name, ?string $description, callable $isVali
3131

3232
/**
3333
* Check if the given string is a valid email.
34-
*
35-
* @param string $stringValue
36-
*
37-
* @return bool
3834
*/
3935
protected function isValid(string $stringValue): bool
4036
{
@@ -51,21 +47,14 @@ protected function isValid(string $stringValue): bool
5147

5248
/**
5349
* Check if the given string is valid.
54-
*
55-
* @param string $stringValue
56-
*
57-
* @return bool
5850
*/
5951
abstract protected function isValid(string $stringValue): bool;
6052

6153
/**
6254
* Serializes an internal value to include in a response.
6355
*
64-
* @param mixed $value
6556
*
6657
* @throws InvariantViolation
67-
*
68-
* @return string
6958
*/
7059
public function serialize($value): string
7160
{
@@ -82,10 +71,6 @@ public function serialize($value): string
8271

8372
/**
8473
* Construct an error message that occurs when an invalid string is passed.
85-
*
86-
* @param string $stringValue
87-
*
88-
* @return string
8974
*/
9075
public function invalidStringMessage(string $stringValue): string
9176
{
@@ -97,11 +82,8 @@ public function invalidStringMessage(string $stringValue): string
9782
/**
9883
* Parses an externally provided value (query variable) to use as an input.
9984
*
100-
* @param mixed $value
10185
*
10286
* @throws Error
103-
*
104-
* @return string
10587
*/
10688
public function parseValue($value): string
10789
{
@@ -128,8 +110,6 @@ public function parseValue($value): string
128110
* @param mixed[]|null $variables
129111
*
130112
* @throws Error
131-
*
132-
* @return string
133113
*/
134114
public function parseLiteral($valueNode, ?array $variables = null): string
135115
{

src/utils.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
/**
1212
* Check if a value can be serialized to a string.
13-
*
14-
* @param mixed $value
15-
*
16-
* @return bool
1713
*/
1814
function canBeString($value): bool
1915
{
@@ -25,11 +21,8 @@ function canBeString($value): bool
2521
/**
2622
* Get the underlying string from a GraphQL literal and throw if Literal is not a string.
2723
*
28-
* @param mixed $valueNode
2924
*
3025
* @throws Error
31-
*
32-
* @return string
3326
*/
3427
function extractStringFromLiteral($valueNode): string
3528
{
@@ -45,12 +38,8 @@ function extractStringFromLiteral($valueNode): string
4538
/**
4639
* Convert the value to a string and throw an exception if it is not possible.
4740
*
48-
* @param mixed $value
49-
* @param string $exceptionClass
5041
*
5142
* @throws \Exception of type $exceptionClass
52-
*
53-
* @return string
5443
*/
5544
function coerceToString($value, string $exceptionClass): string
5645
{

tests/MixedTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ public function singleValues(): array
9797
/**
9898
* @dataProvider literalToPhpMap
9999
*
100-
* @param string $graphQLLiteral
101-
* @param string $jsonLiteral
102100
* @param mixed $expected
103101
*/
104102
public function testCastsValuesIntoAppropriatePhpValue(string $graphQLLiteral, string $jsonLiteral, $expected): void
@@ -165,11 +163,6 @@ public function literalToPhpMap(): array
165163
];
166164
}
167165

168-
/**
169-
* @param string $literal
170-
*
171-
* @return ExecutionResult
172-
*/
173166
protected function executeQueryWithLiteral(string $literal): ExecutionResult
174167
{
175168
$query = "
@@ -184,11 +177,6 @@ protected function executeQueryWithLiteral(string $literal): ExecutionResult
184177
);
185178
}
186179

187-
/**
188-
* @param string $jsonLiteral
189-
*
190-
* @return ExecutionResult
191-
*/
192180
protected function executeQueryWithJsonVariable(string $jsonLiteral): ExecutionResult
193181
{
194182
$query = '

tests/MyRegex.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class MyRegex extends Regex
1515

1616
/**
1717
* Return the Regex that the values are validated against.
18-
*
19-
* @return string
2018
*/
2119
public static function regex(): string
2220
{

tests/MyStringScalar.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ class MyStringScalar extends StringScalar
1515

1616
/**
1717
* Check if the given string is exactly "foo".
18-
*
19-
* @param string $stringValue
20-
*
21-
* @return bool
2218
*/
2319
protected function isValid(string $stringValue): bool
2420
{

0 commit comments

Comments
 (0)