1 | <?php |
||
7 | class PluggableSchemaManagerFactory { |
||
8 | |||
9 | /** |
||
10 | * Static cache of created schema managers. |
||
11 | * |
||
12 | * @var \Drupal\graphql\Plugin\GraphQL\PluggableSchemaManagerInterface[] |
||
13 | */ |
||
14 | protected $schemaManagers = []; |
||
15 | |||
16 | /** |
||
17 | * Plugin managers, used to collect GraphQL schema plugins. |
||
18 | * |
||
19 | * @var \Drupal\Component\Plugin\PluginManagerInterface[] |
||
20 | */ |
||
21 | protected $pluginManagers = []; |
||
22 | |||
23 | /** |
||
24 | * Add a plugin manager. |
||
25 | * |
||
26 | * @param \Drupal\Component\Plugin\PluginManagerInterface $pluginManager |
||
27 | * The plugin manager to attach. |
||
28 | */ |
||
29 | public function addPluginManager(PluginManagerInterface $pluginManager) { |
||
32 | |||
33 | /** |
||
34 | * Add a plugin manager. |
||
35 | * |
||
36 | * @param string $schema |
||
37 | * The name of the schema to fetch the schema manager for. |
||
38 | * |
||
39 | * @return \Drupal\graphql\Plugin\GraphQL\PluggableSchemaManagerInterface |
||
40 | * The dedicated pluggable schema manager instance for the given schema. |
||
41 | */ |
||
42 | public function getSchemaManager($schema) { |
||
49 | |||
50 | } |
||
51 |
This check marks calls to
isset(...)
orempty(...)
that are found before the variable itself is defined. These will always have the same result.This is likely the result of code being shifted around. Consider removing these calls.