Skip to content

Commit f187a08

Browse files
author
Jeremiah VALERIE
committed
Fix CS
1 parent 32cb734 commit f187a08

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Transformer/ArgumentsTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ public function getInstanceAndValidate(string $argType, $data, ResolveInfo $info
144144
$isMultiple = '[' === $argType[0];
145145
$isStrictMultiple = false;
146146
if ($isMultiple) {
147-
$isStrictMultiple = '!' === $argType[strpos($argType, ']') - 1];
147+
$isStrictMultiple = '!' === $argType[\strpos($argType, ']') - 1];
148148
}
149149

150150
$endIndex = ($isRequired ? 1 : 0) + ($isMultiple ? 1 : 0) + ($isStrictMultiple ? 1 : 0);
151-
$type = \substr($argType, $isMultiple ? 1 : 0, $endIndex > 0 ? -$endIndex : strlen($argType));
151+
$type = \substr($argType, $isMultiple ? 1 : 0, $endIndex > 0 ? -$endIndex : \strlen($argType));
152152

153153
$result = $this->populateObject($this->getType($type, $info), $data, $isMultiple, $info);
154154
$errors = [];

tests/Transformer/ArgumentsTransformerTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Overblog\GraphQLBundle\Tests\Transformer;
66

7-
use Exception;
87
use Generator;
98
use GraphQL\Type\Definition\EnumType;
109
use GraphQL\Type\Definition\InputObjectType;
@@ -212,7 +211,7 @@ public function testInputObjectWithWrappingType(Type $type): void
212211

213212
$inputValue = $transformer->getInstanceAndValidate($type->toString(), $data, $info, 'input1');
214213

215-
/** @var InputType1 $inputValue */
214+
/* @var InputType1 $inputValue */
216215
$this->assertInstanceOf(InputType1::class, $inputValue);
217216
$this->assertEquals($inputValue->field1, $data['field1']);
218217
$this->assertEquals($inputValue->field2, $data['field2']);
@@ -247,9 +246,9 @@ public function testInputObjectWithWrappingTypeList(Type $type): void
247246
$data = ['field1' => 'hello', 'field2' => 12, 'field3' => true];
248247

249248
$inputValue = $transformer->getInstanceAndValidate($type->toString(), [$data], $info, 'input1');
250-
$inputValue = reset($inputValue);
249+
$inputValue = \reset($inputValue);
251250

252-
/** @var InputType1 $inputValue */
251+
/* @var InputType1 $inputValue */
253252
$this->assertInstanceOf(InputType1::class, $inputValue);
254253
$this->assertEquals($inputValue->field1, $data['field1']);
255254
$this->assertEquals($inputValue->field2, $data['field2']);

0 commit comments

Comments
 (0)