for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of Railt package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Railt\SDL\Compiler\Ast\Dependent;
use Railt\Parser\Ast\NodeInterface;
use Railt\Parser\Ast\Rule;
use Railt\Parser\Ast\RuleInterface;
use Railt\SDL\Compiler\Ast\Common\DescriptionProvider;
use Railt\SDL\Compiler\Ast\TypeHintNode;
* Class FieldDefinitionNode
class FieldDefinitionNode extends Rule
{
use DescriptionProvider;
* @return TypeHintNode|NodeInterface
public function getTypeHint(): TypeHintNode
return $this->first('TypeHint', 1);
}
* @return string
public function getFieldName(): string
return $this->first('T_NAME', 1)->getValue();
getValue()
Railt\Parser\Ast\NodeInterface
getValues()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
* @return iterable|ArgumentDefinitionNode[]
public function getArguments(): iterable
$arguments = $this->first('FieldArguments', 1);
if ($arguments) {
/** @var RuleInterface $argument */
foreach ($arguments as $argument) {
$arguments
object<Railt\Parser\Ast\NodeInterface>
yield $argument->getChild(0);
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.