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

View File

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

View File

@ -193,7 +193,7 @@ class SchemaValidator
* @param InterfaceType $iface * @param InterfaceType $iface
* @throws \Exception * @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(); $objectFieldMap = $object->getFields();
$ifaceFieldMap = $iface->getFields(); $ifaceFieldMap = $iface->getFields();