Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
peldax committed Sep 18, 2021
1 parent 6276c15 commit f13192a
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions tests/Feature/SingleExecutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,44 @@ final class SingleExecutionTest extends \PHPUnit\Framework\TestCase
{
public static int $execCount;

public static function getCompositeType() : \Graphpinator\Typesystem\Type
{
return new class () extends \Graphpinator\Typesystem\Type
{
protected const NAME = 'CompositeType';

public function __construct()
{
parent::__construct();
}

public function validateNonNullValue($rawValue) : bool
{
return true;
}

protected function getFieldDefinition() : \Graphpinator\Typesystem\Field\ResolvableFieldSet
{
return new \Graphpinator\Typesystem\Field\ResolvableFieldSet([
\Graphpinator\Typesystem\Field\ResolvableField::create(
'firstField',
\Graphpinator\Typesystem\Container::Int(),
static function($parent) : int {
return 123;
},
),
\Graphpinator\Typesystem\Field\ResolvableField::create(
'secondField',
\Graphpinator\Typesystem\Container::Int(),
static function($parent) : int {
return 456;
},
),
]);
}
};
}

public function testSimple() : void
{
self::$execCount = 0;
Expand Down Expand Up @@ -138,42 +176,4 @@ static function($parent) : int {
}
};
}

public static function getCompositeType() : \Graphpinator\Typesystem\Type
{
return new class () extends \Graphpinator\Typesystem\Type
{
protected const NAME = 'CompositeType';

public function __construct()
{
parent::__construct();
}

public function validateNonNullValue($rawValue) : bool
{
return true;
}

protected function getFieldDefinition() : \Graphpinator\Typesystem\Field\ResolvableFieldSet
{
return new \Graphpinator\Typesystem\Field\ResolvableFieldSet([
\Graphpinator\Typesystem\Field\ResolvableField::create(
'firstField',
\Graphpinator\Typesystem\Container::Int(),
static function($parent) : int {
return 123;
},
),
\Graphpinator\Typesystem\Field\ResolvableField::create(
'secondField',
\Graphpinator\Typesystem\Container::Int(),
static function($parent) : int {
return 456;
},
),
]);
}
};
}
}

0 comments on commit f13192a

Please sign in to comment.