mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-12-01 09:26:01 +03:00
24 lines
412 B
PHP
24 lines
412 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace GraphQL\Tests\Executor\TestClasses;
|
|
|
|
class Adder
|
|
{
|
|
/** @var float */
|
|
public $num;
|
|
|
|
/** @var callable */
|
|
public $test;
|
|
|
|
public function __construct(float $num)
|
|
{
|
|
$this->num = $num;
|
|
|
|
$this->test = function ($objectValue, $args, $context) {
|
|
return $this->num + $args['addend1'] + $context['addend2'];
|
|
};
|
|
}
|
|
}
|