Skip to content

Commit b665d26

Browse files
committed
Changed scope of Schema props (and some others) to private
1 parent 16bfc12 commit b665d26

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

src/Schema.php

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,37 @@ class Schema
4444
/**
4545
* @var ObjectType
4646
*/
47-
protected $queryType;
47+
private $queryType;
4848

4949
/**
5050
* @var ObjectType
5151
*/
52-
protected $mutationType;
52+
private $mutationType;
5353

5454
/**
5555
* @var ObjectType
5656
*/
57-
protected $subscriptionType;
57+
private $subscriptionType;
5858

5959
/**
6060
* @var Directive[]
6161
*/
62-
protected $directives;
62+
private $directives;
6363

6464
/**
6565
* @var Type[]
6666
*/
67-
protected $typeMap;
67+
private $typeMap;
6868

6969
/**
7070
* @var array<string, ObjectType[]>
7171
*/
72-
protected $implementations;
72+
private $implementations;
7373

7474
/**
7575
* @var array<string, array<string, boolean>>
7676
*/
77-
protected $possibleTypeMap;
77+
private $possibleTypeMap;
7878

7979
/**
8080
* Schema constructor.
@@ -103,7 +103,7 @@ public function __construct($config = null)
103103
/**
104104
* @param array $config
105105
*/
106-
protected function init(array $config)
106+
private function init(array $config)
107107
{
108108
$config += [
109109
'query' => null,
@@ -294,20 +294,9 @@ public function getDirective($name)
294294

295295
/**
296296
* @param $type
297-
* @deprecated since 17.10.2016 in favor of $this->extractTypes
298297
* @return array
299298
*/
300-
protected function _extractTypes($type)
301-
{
302-
trigger_error(__METHOD__ . ' is deprecated in favor of ' . __CLASS__ . '::extractTypes', E_USER_DEPRECATED);
303-
return $this->extractTypes($type);
304-
}
305-
306-
/**
307-
* @param $type
308-
* @return array
309-
*/
310-
protected function extractTypes($type)
299+
private function extractTypes($type)
311300
{
312301
if (!$type) {
313302
return $this->typeMap;

src/Type/Definition/NonNull.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NonNull extends Type implements WrappingType, OutputType, InputType
1414
/**
1515
* @var callable|Type
1616
*/
17-
protected $ofType;
17+
private $ofType;
1818

1919
/**
2020
* @param callable|Type|DefinitionContainer $type

src/Type/SchemaValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static function interfacesAreCorrectlyImplemented()
193193
* @param InterfaceType $iface
194194
* @throws \Exception
195195
*/
196-
protected static function assertObjectImplementsInterface(Schema $schema, ObjectType $object, InterfaceType $iface)
196+
private static function assertObjectImplementsInterface(Schema $schema, ObjectType $object, InterfaceType $iface)
197197
{
198198
$objectFieldMap = $object->getFields();
199199
$ifaceFieldMap = $iface->getFields();

0 commit comments

Comments
 (0)