Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Commit

Permalink
🐛 Fix getChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
hansott committed Sep 23, 2017
1 parent 4fbac4e commit dca9cd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Schema/Argument.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ public function __construct($name, Type $type, Value $defaultValue = null, Locat
$this->type = $type;
$this->defaultValue = $defaultValue;
}

public function getChildren()
{
return array($this->type, $this->defaultValue);
}
}
5 changes: 4 additions & 1 deletion src/Schema/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public function __construct($name, Type $type, array $arguments = array(), Locat

public function getChildren()
{
return $this->arguments;
return array_merge(
array($this->type),
$this->arguments
);
}
}

0 comments on commit dca9cd2

Please sign in to comment.