Changed scope of Schema props (and some others) to private

This commit is contained in:
vladar 2016-11-25 16:35:46 +07:00
parent 16bfc12ab1
commit b665d267c3
3 changed files with 11 additions and 22 deletions

View File

@ -44,37 +44,37 @@ class Schema
/**
* @var ObjectType
*/
protected $queryType;
private $queryType;
/**
* @var ObjectType
*/
protected $mutationType;
private $mutationType;
/**
* @var ObjectType
*/
protected $subscriptionType;
private $subscriptionType;
/**
* @var Directive[]
*/
protected $directives;
private $directives;
/**
* @var Type[]
*/
protected $typeMap;
private $typeMap;
/**
* @var array<string, ObjectType[]>
*/
protected $implementations;
private $implementations;
/**
* @var array<string, array<string, boolean>>
*/
protected $possibleTypeMap;
private $possibleTypeMap;
/**
* Schema constructor.
@ -103,7 +103,7 @@ class Schema
/**
* @param array $config
*/
protected function init(array $config)
private function init(array $config)
{
$config += [
'query' => null,
@ -294,20 +294,9 @@ class Schema
/**
* @param $type
* @deprecated since 17.10.2016 in favor of $this->extractTypes
* @return array
*/
protected function _extractTypes($type)
{
trigger_error(__METHOD__ . ' is deprecated in favor of ' . __CLASS__ . '::extractTypes', E_USER_DEPRECATED);
return $this->extractTypes($type);
}
/**
* @param $type
* @return array
*/
protected function extractTypes($type)
private function extractTypes($type)
{
if (!$type) {
return $this->typeMap;

View File

@ -14,7 +14,7 @@ class NonNull extends Type implements WrappingType, OutputType, InputType
/**
* @var callable|Type
*/
protected $ofType;
private $ofType;
/**
* @param callable|Type|DefinitionContainer $type

View File

@ -193,7 +193,7 @@ class SchemaValidator
* @param InterfaceType $iface
* @throws \Exception
*/
protected static function assertObjectImplementsInterface(Schema $schema, ObjectType $object, InterfaceType $iface)
private static function assertObjectImplementsInterface(Schema $schema, ObjectType $object, InterfaceType $iface)
{
$objectFieldMap = $object->getFields();
$ifaceFieldMap = $iface->getFields();