Completed
Branch master (16f63d)
by
unknown
05:48
created
core/services/graphql/TypesManager.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
             $config = $field->toArray();
76 76
             if ($field->useForInput()) {
77 77
                 // Register input fields for existing mutations.
78
-                register_graphql_field('Update' . $typeName . 'Input', $fieldName, $config);
79
-                register_graphql_field('Create' . $typeName . 'Input', $fieldName, $config);
78
+                register_graphql_field('Update'.$typeName.'Input', $fieldName, $config);
79
+                register_graphql_field('Create'.$typeName.'Input', $fieldName, $config);
80 80
             }
81 81
             if ($field->useForOutput()) {
82 82
                 $config['resolve'] = [$type, 'resolveField'];
@@ -102,15 +102,15 @@  discard block
 block discarded – undo
102 102
             $fieldName = $field->name();
103 103
             $config = $field->toArray();
104 104
             if ($field->useForInput()) {
105
-                $inputFields[ $fieldName ] = $config;
105
+                $inputFields[$fieldName] = $config;
106 106
             }
107 107
             if ($field->useForOutput()) {
108 108
                 $config['resolve'] = [$type, 'resolveField'];
109
-                $outputFields[ $fieldName ] = $config;
109
+                $outputFields[$fieldName] = $config;
110 110
             }
111 111
         }
112 112
         $typeName = $type->name();
113
-        if (! empty($outputFields)) {
113
+        if ( ! empty($outputFields)) {
114 114
             // Register the object type.
115 115
             register_graphql_object_type(
116 116
                 $typeName,
Please login to merge, or discard this patch.
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -17,113 +17,113 @@
 block discarded – undo
17 17
  */
18 18
 class TypesManager implements GQLManagerInterface
19 19
 {
20
-    /**
21
-     * @var TypeCollection|TypeInterface[] $types
22
-     */
23
-    private $types;
20
+	/**
21
+	 * @var TypeCollection|TypeInterface[] $types
22
+	 */
23
+	private $types;
24 24
 
25 25
 
26
-    /**
27
-     * TypesManager constructor.
28
-     *
29
-     * @param TypeCollection|TypeInterface[] $types
30
-     */
31
-    public function __construct(TypeCollection $types)
32
-    {
33
-        $this->types = $types;
34
-    }
26
+	/**
27
+	 * TypesManager constructor.
28
+	 *
29
+	 * @param TypeCollection|TypeInterface[] $types
30
+	 */
31
+	public function __construct(TypeCollection $types)
32
+	{
33
+		$this->types = $types;
34
+	}
35 35
 
36 36
 
37
-    /**
38
-     * @throws CollectionDetailsException
39
-     * @throws CollectionLoaderException
40
-     * @since 5.0.0.p
41
-     */
42
-    public function init()
43
-    {
44
-        $this->types->loadTypes();
45
-        add_action('graphql_register_types', [$this, 'configureTypes'], 10);
46
-    }
37
+	/**
38
+	 * @throws CollectionDetailsException
39
+	 * @throws CollectionLoaderException
40
+	 * @since 5.0.0.p
41
+	 */
42
+	public function init()
43
+	{
44
+		$this->types->loadTypes();
45
+		add_action('graphql_register_types', [$this, 'configureTypes'], 10);
46
+	}
47 47
 
48 48
 
49
-    /**
50
-     * @since 5.0.0.p
51
-     */
52
-    public function configureTypes()
53
-    {
54
-        // loop through the collection of types and register their fields
55
-        foreach ($this->types as $type) {
56
-            if ($type->isCustomPostType()) {
57
-                $this->extendCustomPostType($type);
58
-            } else {
59
-                $this->registerType($type);
60
-            }
61
-        }
62
-    }
49
+	/**
50
+	 * @since 5.0.0.p
51
+	 */
52
+	public function configureTypes()
53
+	{
54
+		// loop through the collection of types and register their fields
55
+		foreach ($this->types as $type) {
56
+			if ($type->isCustomPostType()) {
57
+				$this->extendCustomPostType($type);
58
+			} else {
59
+				$this->registerType($type);
60
+			}
61
+		}
62
+	}
63 63
 
64 64
 
65
-    /**
66
-     * @param TypeInterface $type
67
-     * @since 5.0.0.p
68
-     */
69
-    public function extendCustomPostType(TypeInterface $type)
70
-    {
71
-        $typeName = $type->name();
72
-        foreach ($type->fields() as $field) {
73
-            $fieldName = $field->name();
74
-            $config = $field->toArray();
75
-            if ($field->useForInput()) {
76
-                // Register input fields for existing mutations.
77
-                register_graphql_field('Update' . $typeName . 'Input', $fieldName, $config);
78
-                register_graphql_field('Create' . $typeName . 'Input', $fieldName, $config);
79
-            }
80
-            if ($field->useForOutput()) {
81
-                $config['resolve'] = [$type, 'resolveField'];
82
-                // Register fields for queries.
83
-                register_graphql_field($typeName, $fieldName, $config);
84
-            }
85
-        }
86
-        if (is_callable([$type, 'extendMutations'])) {
87
-            /** @disregard P1013 */
88
-            $type->extendMutations();
89
-        }
90
-    }
65
+	/**
66
+	 * @param TypeInterface $type
67
+	 * @since 5.0.0.p
68
+	 */
69
+	public function extendCustomPostType(TypeInterface $type)
70
+	{
71
+		$typeName = $type->name();
72
+		foreach ($type->fields() as $field) {
73
+			$fieldName = $field->name();
74
+			$config = $field->toArray();
75
+			if ($field->useForInput()) {
76
+				// Register input fields for existing mutations.
77
+				register_graphql_field('Update' . $typeName . 'Input', $fieldName, $config);
78
+				register_graphql_field('Create' . $typeName . 'Input', $fieldName, $config);
79
+			}
80
+			if ($field->useForOutput()) {
81
+				$config['resolve'] = [$type, 'resolveField'];
82
+				// Register fields for queries.
83
+				register_graphql_field($typeName, $fieldName, $config);
84
+			}
85
+		}
86
+		if (is_callable([$type, 'extendMutations'])) {
87
+			/** @disregard P1013 */
88
+			$type->extendMutations();
89
+		}
90
+	}
91 91
 
92 92
 
93
-    /**
94
-     * @param TypeInterface $type
95
-     * @since 5.0.0.p
96
-     */
97
-    public function registerType(TypeInterface $type)
98
-    {
99
-        $outputFields = [];
100
-        $inputFields = [];
101
-        foreach ($type->fields() as $field) {
102
-            $fieldName = $field->name();
103
-            $config = $field->toArray();
104
-            if ($field->useForInput()) {
105
-                $inputFields[ $fieldName ] = $config;
106
-            }
107
-            if ($field->useForOutput()) {
108
-                $config['resolve'] = [$type, 'resolveField'];
109
-                $outputFields[ $fieldName ] = $config;
110
-            }
111
-        }
112
-        $typeName = $type->name();
113
-        if (! empty($outputFields)) {
114
-            // Register the object type.
115
-            register_graphql_object_type(
116
-                $typeName,
117
-                [
118
-                    'description' => $type->description(),
119
-                    'fields'      => $outputFields,
120
-                    'interfaces'  => $type->interfaces(),
121
-                ]
122
-            );
123
-        }
124
-        if (is_callable([$type, 'registerMutations'])) {
125
-            /** @disregard P1013 */
126
-            $type->registerMutations($inputFields);
127
-        }
128
-    }
93
+	/**
94
+	 * @param TypeInterface $type
95
+	 * @since 5.0.0.p
96
+	 */
97
+	public function registerType(TypeInterface $type)
98
+	{
99
+		$outputFields = [];
100
+		$inputFields = [];
101
+		foreach ($type->fields() as $field) {
102
+			$fieldName = $field->name();
103
+			$config = $field->toArray();
104
+			if ($field->useForInput()) {
105
+				$inputFields[ $fieldName ] = $config;
106
+			}
107
+			if ($field->useForOutput()) {
108
+				$config['resolve'] = [$type, 'resolveField'];
109
+				$outputFields[ $fieldName ] = $config;
110
+			}
111
+		}
112
+		$typeName = $type->name();
113
+		if (! empty($outputFields)) {
114
+			// Register the object type.
115
+			register_graphql_object_type(
116
+				$typeName,
117
+				[
118
+					'description' => $type->description(),
119
+					'fields'      => $outputFields,
120
+					'interfaces'  => $type->interfaces(),
121
+				]
122
+			);
123
+		}
124
+		if (is_callable([$type, 'registerMutations'])) {
125
+			/** @disregard P1013 */
126
+			$type->registerMutations($inputFields);
127
+		}
128
+	}
129 129
 }
Please login to merge, or discard this patch.
core/services/graphql/resolvers/ResolverCollection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     private function loadCollection()
51 51
     {
52
-        if (! $this->loader instanceof CollectionLoader) {
52
+        if ( ! $this->loader instanceof CollectionLoader) {
53 53
             $this->loader = new CollectionLoader(
54 54
                 new CollectionDetails(
55 55
                     // collection name
Please login to merge, or discard this patch.
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -20,86 +20,86 @@
 block discarded – undo
20 20
  */
21 21
 class ResolverCollection extends Collection
22 22
 {
23
-    const COLLECTION_NAME = 'espresso_graphql_resolvers';
23
+	const COLLECTION_NAME = 'espresso_graphql_resolvers';
24 24
 
25
-    /**
26
-     * @var CollectionLoader $loader
27
-     */
28
-    protected $loader;
25
+	/**
26
+	 * @var CollectionLoader $loader
27
+	 */
28
+	protected $loader;
29 29
 
30
-    /**
31
-     * ResolverCollection constructor
32
-     *
33
-     * @throws InvalidInterfaceException
34
-     */
35
-    public function __construct()
36
-    {
37
-        parent::__construct(
38
-            'EventEspresso\core\services\graphql\ResolverInterface',
39
-            ResolverCollection::COLLECTION_NAME
40
-        );
41
-    }
30
+	/**
31
+	 * ResolverCollection constructor
32
+	 *
33
+	 * @throws InvalidInterfaceException
34
+	 */
35
+	public function __construct()
36
+	{
37
+		parent::__construct(
38
+			'EventEspresso\core\services\graphql\ResolverInterface',
39
+			ResolverCollection::COLLECTION_NAME
40
+		);
41
+	}
42 42
 
43 43
 
44
-    /**
45
-     * @throws CollectionDetailsException
46
-     * @throws CollectionLoaderException
47
-     * @since 5.0.0.p
48
-     */
49
-    private function loadCollection()
50
-    {
51
-        if (! $this->loader instanceof CollectionLoader) {
52
-            $this->loader = new CollectionLoader(
53
-                new CollectionDetails(
54
-                    // collection name
55
-                    ResolverCollection::COLLECTION_NAME,
56
-                    // collection interface
57
-                    'EventEspresso\core\services\graphql\ResolverInterface',
58
-                    // FQCNs for classes to add (all classes within each namespace will be loaded)
59
-                    apply_filters(
60
-                        'FHEE__EventEspresso_core_services_graphql_ResolverCollection__loadCollection__collection_FQCNs',
61
-                        ['EventEspresso\core\domain\services\graphql\resolvers']
62
-                    ),
63
-                    // filepaths to classes to add
64
-                    array(),
65
-                    // file mask to use if parsing folder for files to add
66
-                    '',
67
-                    // what to use as identifier for collection entities
68
-                    // using CLASS NAME prevents duplicates (works like a singleton)
69
-                    CollectionDetails::ID_CLASS_NAME
70
-                ),
71
-                $this
72
-            );
73
-        }
74
-    }
44
+	/**
45
+	 * @throws CollectionDetailsException
46
+	 * @throws CollectionLoaderException
47
+	 * @since 5.0.0.p
48
+	 */
49
+	private function loadCollection()
50
+	{
51
+		if (! $this->loader instanceof CollectionLoader) {
52
+			$this->loader = new CollectionLoader(
53
+				new CollectionDetails(
54
+					// collection name
55
+					ResolverCollection::COLLECTION_NAME,
56
+					// collection interface
57
+					'EventEspresso\core\services\graphql\ResolverInterface',
58
+					// FQCNs for classes to add (all classes within each namespace will be loaded)
59
+					apply_filters(
60
+						'FHEE__EventEspresso_core_services_graphql_ResolverCollection__loadCollection__collection_FQCNs',
61
+						['EventEspresso\core\domain\services\graphql\resolvers']
62
+					),
63
+					// filepaths to classes to add
64
+					array(),
65
+					// file mask to use if parsing folder for files to add
66
+					'',
67
+					// what to use as identifier for collection entities
68
+					// using CLASS NAME prevents duplicates (works like a singleton)
69
+					CollectionDetails::ID_CLASS_NAME
70
+				),
71
+				$this
72
+			);
73
+		}
74
+	}
75 75
 
76 76
 
77
-    /**
78
-     * @return CollectionInterface
79
-     * @throws CollectionDetailsException
80
-     * @throws CollectionLoaderException
81
-     * @since 5.0.0.p
82
-     */
83
-    public function loadResolvers()
84
-    {
85
-        $this->loadCollection();
86
-        return $this->loader->getCollection();
87
-    }
77
+	/**
78
+	 * @return CollectionInterface
79
+	 * @throws CollectionDetailsException
80
+	 * @throws CollectionLoaderException
81
+	 * @since 5.0.0.p
82
+	 */
83
+	public function loadResolvers()
84
+	{
85
+		$this->loadCollection();
86
+		return $this->loader->getCollection();
87
+	}
88 88
 
89 89
 
90
-    /**
91
-     * getIdentifier
92
-     * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
-     * If no $identifier is supplied, then the  fully qualified class name is used
94
-     *
95
-     * @param        $object
96
-     * @param mixed  $identifier
97
-     * @return bool
98
-     */
99
-    public function getIdentifier($object, $identifier = null)
100
-    {
101
-        return ! empty($identifier)
102
-            ? $identifier
103
-            : get_class($object);
104
-    }
90
+	/**
91
+	 * getIdentifier
92
+	 * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
+	 * If no $identifier is supplied, then the  fully qualified class name is used
94
+	 *
95
+	 * @param        $object
96
+	 * @param mixed  $identifier
97
+	 * @return bool
98
+	 */
99
+	public function getIdentifier($object, $identifier = null)
100
+	{
101
+		return ! empty($identifier)
102
+			? $identifier
103
+			: get_class($object);
104
+	}
105 105
 }
Please login to merge, or discard this patch.
core/services/graphql/enums/EnumCollection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     private function loadCollection()
51 51
     {
52
-        if (! $this->loader instanceof CollectionLoader) {
52
+        if ( ! $this->loader instanceof CollectionLoader) {
53 53
             $this->loader = new CollectionLoader(
54 54
                 new CollectionDetails(
55 55
                     // collection name
Please login to merge, or discard this patch.
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -20,86 +20,86 @@
 block discarded – undo
20 20
  */
21 21
 class EnumCollection extends Collection
22 22
 {
23
-    const COLLECTION_NAME = 'espresso_graphql_enums';
23
+	const COLLECTION_NAME = 'espresso_graphql_enums';
24 24
 
25
-    /**
26
-     * @var CollectionLoader $loader
27
-     */
28
-    protected $loader;
25
+	/**
26
+	 * @var CollectionLoader $loader
27
+	 */
28
+	protected $loader;
29 29
 
30
-    /**
31
-     * EnumCollection constructor
32
-     *
33
-     * @throws InvalidInterfaceException
34
-     */
35
-    public function __construct()
36
-    {
37
-        parent::__construct(
38
-            'EventEspresso\core\services\graphql\enums\EnumInterface',
39
-            EnumCollection::COLLECTION_NAME
40
-        );
41
-    }
30
+	/**
31
+	 * EnumCollection constructor
32
+	 *
33
+	 * @throws InvalidInterfaceException
34
+	 */
35
+	public function __construct()
36
+	{
37
+		parent::__construct(
38
+			'EventEspresso\core\services\graphql\enums\EnumInterface',
39
+			EnumCollection::COLLECTION_NAME
40
+		);
41
+	}
42 42
 
43 43
 
44
-    /**
45
-     * @throws CollectionDetailsException
46
-     * @throws CollectionLoaderException
47
-     * @since 5.0.0.p
48
-     */
49
-    private function loadCollection()
50
-    {
51
-        if (! $this->loader instanceof CollectionLoader) {
52
-            $this->loader = new CollectionLoader(
53
-                new CollectionDetails(
54
-                    // collection name
55
-                    EnumCollection::COLLECTION_NAME,
56
-                    // collection interface
57
-                    'EventEspresso\core\services\graphql\enums\EnumInterface',
58
-                    // FQCNs for classes to add (all classes within each namespace will be loaded)
59
-                    apply_filters(
60
-                        'FHEE__EventEspresso_core_services_graphql_EnumCollection__loadCollection__collection_FQCNs',
61
-                        ['EventEspresso\core\domain\services\graphql\enums']
62
-                    ),
63
-                    // filepaths to classes to add
64
-                    array(),
65
-                    // file mask to use if parsing folder for files to add
66
-                    '',
67
-                    // what to use as identifier for collection entities
68
-                    // using CLASS NAME prevents duplicates (works like a singleton)
69
-                    CollectionDetails::ID_CLASS_NAME
70
-                ),
71
-                $this
72
-            );
73
-        }
74
-    }
44
+	/**
45
+	 * @throws CollectionDetailsException
46
+	 * @throws CollectionLoaderException
47
+	 * @since 5.0.0.p
48
+	 */
49
+	private function loadCollection()
50
+	{
51
+		if (! $this->loader instanceof CollectionLoader) {
52
+			$this->loader = new CollectionLoader(
53
+				new CollectionDetails(
54
+					// collection name
55
+					EnumCollection::COLLECTION_NAME,
56
+					// collection interface
57
+					'EventEspresso\core\services\graphql\enums\EnumInterface',
58
+					// FQCNs for classes to add (all classes within each namespace will be loaded)
59
+					apply_filters(
60
+						'FHEE__EventEspresso_core_services_graphql_EnumCollection__loadCollection__collection_FQCNs',
61
+						['EventEspresso\core\domain\services\graphql\enums']
62
+					),
63
+					// filepaths to classes to add
64
+					array(),
65
+					// file mask to use if parsing folder for files to add
66
+					'',
67
+					// what to use as identifier for collection entities
68
+					// using CLASS NAME prevents duplicates (works like a singleton)
69
+					CollectionDetails::ID_CLASS_NAME
70
+				),
71
+				$this
72
+			);
73
+		}
74
+	}
75 75
 
76 76
 
77
-    /**
78
-     * @return CollectionInterface
79
-     * @throws CollectionDetailsException
80
-     * @throws CollectionLoaderException
81
-     * @since 5.0.0.p
82
-     */
83
-    public function loadEnums()
84
-    {
85
-        $this->loadCollection();
86
-        return $this->loader->getCollection();
87
-    }
77
+	/**
78
+	 * @return CollectionInterface
79
+	 * @throws CollectionDetailsException
80
+	 * @throws CollectionLoaderException
81
+	 * @since 5.0.0.p
82
+	 */
83
+	public function loadEnums()
84
+	{
85
+		$this->loadCollection();
86
+		return $this->loader->getCollection();
87
+	}
88 88
 
89 89
 
90
-    /**
91
-     * getIdentifier
92
-     * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
-     * If no $identifier is supplied, then the  fully qualified class name is used
94
-     *
95
-     * @param        $object
96
-     * @param mixed  $identifier
97
-     * @return bool
98
-     */
99
-    public function getIdentifier($object, $identifier = null)
100
-    {
101
-        return ! empty($identifier)
102
-            ? $identifier
103
-            : get_class($object);
104
-    }
90
+	/**
91
+	 * getIdentifier
92
+	 * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
+	 * If no $identifier is supplied, then the  fully qualified class name is used
94
+	 *
95
+	 * @param        $object
96
+	 * @param mixed  $identifier
97
+	 * @return bool
98
+	 */
99
+	public function getIdentifier($object, $identifier = null)
100
+	{
101
+		return ! empty($identifier)
102
+			? $identifier
103
+			: get_class($object);
104
+	}
105 105
 }
Please login to merge, or discard this patch.
core/services/graphql/inputs/InputCollection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     private function loadCollection()
51 51
     {
52
-        if (! $this->loader instanceof CollectionLoader) {
52
+        if ( ! $this->loader instanceof CollectionLoader) {
53 53
             $this->loader = new CollectionLoader(
54 54
                 new CollectionDetails(
55 55
                     // collection name
Please login to merge, or discard this patch.
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -20,86 +20,86 @@
 block discarded – undo
20 20
  */
21 21
 class InputCollection extends Collection
22 22
 {
23
-    const COLLECTION_NAME = 'espresso_graphql_inputs';
23
+	const COLLECTION_NAME = 'espresso_graphql_inputs';
24 24
 
25
-    /**
26
-     * @var CollectionLoader $loader
27
-     */
28
-    protected $loader;
25
+	/**
26
+	 * @var CollectionLoader $loader
27
+	 */
28
+	protected $loader;
29 29
 
30
-    /**
31
-     * InputCollection constructor
32
-     *
33
-     * @throws InvalidInterfaceException
34
-     */
35
-    public function __construct()
36
-    {
37
-        parent::__construct(
38
-            'EventEspresso\core\services\graphql\inputs\InputInterface',
39
-            InputCollection::COLLECTION_NAME
40
-        );
41
-    }
30
+	/**
31
+	 * InputCollection constructor
32
+	 *
33
+	 * @throws InvalidInterfaceException
34
+	 */
35
+	public function __construct()
36
+	{
37
+		parent::__construct(
38
+			'EventEspresso\core\services\graphql\inputs\InputInterface',
39
+			InputCollection::COLLECTION_NAME
40
+		);
41
+	}
42 42
 
43 43
 
44
-    /**
45
-     * @throws CollectionDetailsException
46
-     * @throws CollectionLoaderException
47
-     * @since 5.0.0.p
48
-     */
49
-    private function loadCollection()
50
-    {
51
-        if (! $this->loader instanceof CollectionLoader) {
52
-            $this->loader = new CollectionLoader(
53
-                new CollectionDetails(
54
-                    // collection name
55
-                    InputCollection::COLLECTION_NAME,
56
-                    // collection interface
57
-                    'EventEspresso\core\services\graphql\inputs\InputInterface',
58
-                    // FQCNs for classes to add (all classes within each namespace will be loaded)
59
-                    apply_filters(
60
-                        'FHEE__EventEspresso_core_services_graphql_InputCollection__loadCollection__collection_FQCNs',
61
-                        ['EventEspresso\core\domain\services\graphql\inputs']
62
-                    ),
63
-                    // filepaths to classes to add
64
-                    array(),
65
-                    // file mask to use if parsing folder for files to add
66
-                    '',
67
-                    // what to use as identifier for collection entities
68
-                    // using CLASS NAME prevents duplicates (works like a singleton)
69
-                    CollectionDetails::ID_CLASS_NAME
70
-                ),
71
-                $this
72
-            );
73
-        }
74
-    }
44
+	/**
45
+	 * @throws CollectionDetailsException
46
+	 * @throws CollectionLoaderException
47
+	 * @since 5.0.0.p
48
+	 */
49
+	private function loadCollection()
50
+	{
51
+		if (! $this->loader instanceof CollectionLoader) {
52
+			$this->loader = new CollectionLoader(
53
+				new CollectionDetails(
54
+					// collection name
55
+					InputCollection::COLLECTION_NAME,
56
+					// collection interface
57
+					'EventEspresso\core\services\graphql\inputs\InputInterface',
58
+					// FQCNs for classes to add (all classes within each namespace will be loaded)
59
+					apply_filters(
60
+						'FHEE__EventEspresso_core_services_graphql_InputCollection__loadCollection__collection_FQCNs',
61
+						['EventEspresso\core\domain\services\graphql\inputs']
62
+					),
63
+					// filepaths to classes to add
64
+					array(),
65
+					// file mask to use if parsing folder for files to add
66
+					'',
67
+					// what to use as identifier for collection entities
68
+					// using CLASS NAME prevents duplicates (works like a singleton)
69
+					CollectionDetails::ID_CLASS_NAME
70
+				),
71
+				$this
72
+			);
73
+		}
74
+	}
75 75
 
76 76
 
77
-    /**
78
-     * @return CollectionInterface
79
-     * @throws CollectionDetailsException
80
-     * @throws CollectionLoaderException
81
-     * @since 5.0.0.p
82
-     */
83
-    public function loadInputs()
84
-    {
85
-        $this->loadCollection();
86
-        return $this->loader->getCollection();
87
-    }
77
+	/**
78
+	 * @return CollectionInterface
79
+	 * @throws CollectionDetailsException
80
+	 * @throws CollectionLoaderException
81
+	 * @since 5.0.0.p
82
+	 */
83
+	public function loadInputs()
84
+	{
85
+		$this->loadCollection();
86
+		return $this->loader->getCollection();
87
+	}
88 88
 
89 89
 
90
-    /**
91
-     * getIdentifier
92
-     * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
-     * If no $identifier is supplied, then the  fully qualified class name is used
94
-     *
95
-     * @param        $object
96
-     * @param mixed  $identifier
97
-     * @return bool
98
-     */
99
-    public function getIdentifier($object, $identifier = null)
100
-    {
101
-        return ! empty($identifier)
102
-            ? $identifier
103
-            : get_class($object);
104
-    }
90
+	/**
91
+	 * getIdentifier
92
+	 * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
+	 * If no $identifier is supplied, then the  fully qualified class name is used
94
+	 *
95
+	 * @param        $object
96
+	 * @param mixed  $identifier
97
+	 * @return bool
98
+	 */
99
+	public function getIdentifier($object, $identifier = null)
100
+	{
101
+		return ! empty($identifier)
102
+			? $identifier
103
+			: get_class($object);
104
+	}
105 105
 }
Please login to merge, or discard this patch.
core/services/graphql/types/TypeCollection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     private function loadCollection()
51 51
     {
52
-        if (! $this->loader instanceof CollectionLoader) {
52
+        if ( ! $this->loader instanceof CollectionLoader) {
53 53
             $this->loader = new CollectionLoader(
54 54
                 new CollectionDetails(
55 55
                     // collection name
Please login to merge, or discard this patch.
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -20,89 +20,89 @@
 block discarded – undo
20 20
  */
21 21
 class TypeCollection extends Collection
22 22
 {
23
-    const COLLECTION_NAME = 'espresso_graphql_types';
23
+	const COLLECTION_NAME = 'espresso_graphql_types';
24 24
 
25
-    const COLLECTION_INTERFACE = 'EventEspresso\core\services\graphql\types\TypeInterface';
25
+	const COLLECTION_INTERFACE = 'EventEspresso\core\services\graphql\types\TypeInterface';
26 26
 
27
-    /**
28
-     * @var CollectionLoader $loader
29
-     */
30
-    protected $loader;
27
+	/**
28
+	 * @var CollectionLoader $loader
29
+	 */
30
+	protected $loader;
31 31
 
32 32
 
33
-    /**
34
-     * TypeCollection constructor
35
-     *
36
-     * @throws InvalidInterfaceException
37
-     */
38
-    public function __construct()
39
-    {
40
-        parent::__construct(
41
-            TypeCollection::COLLECTION_INTERFACE,
42
-            TypeCollection::COLLECTION_NAME
43
-        );
44
-    }
33
+	/**
34
+	 * TypeCollection constructor
35
+	 *
36
+	 * @throws InvalidInterfaceException
37
+	 */
38
+	public function __construct()
39
+	{
40
+		parent::__construct(
41
+			TypeCollection::COLLECTION_INTERFACE,
42
+			TypeCollection::COLLECTION_NAME
43
+		);
44
+	}
45 45
 
46 46
 
47
-    /**
48
-     * @throws CollectionDetailsException
49
-     * @throws CollectionLoaderException
50
-     * @since 5.0.0.p
51
-     */
52
-    private function loadCollection()
53
-    {
54
-        if (! $this->loader instanceof CollectionLoader) {
55
-            $this->loader = new CollectionLoader(
56
-                new CollectionDetails(
57
-                    // collection name
58
-                    TypeCollection::COLLECTION_NAME,
59
-                    // collection interface
60
-                    TypeCollection::COLLECTION_INTERFACE,
61
-                    // FQCNs for classes to add (all classes within each namespace will be loaded)
62
-                    apply_filters(
63
-                        'FHEE__EventEspresso_core_services_graphql_TypeCollection__loadCollection__collection_FQCNs',
64
-                        ['EventEspresso\core\domain\services\graphql\types']
65
-                    ),
66
-                    // filepaths to classes to add
67
-                    array(),
68
-                    // file mask to use if parsing folder for files to add
69
-                    '',
70
-                    // what to use as identifier for collection entities
71
-                    // using CLASS NAME prevents duplicates (works like a singleton)
72
-                    CollectionDetails::ID_CLASS_NAME
73
-                ),
74
-                $this
75
-            );
76
-        }
77
-    }
47
+	/**
48
+	 * @throws CollectionDetailsException
49
+	 * @throws CollectionLoaderException
50
+	 * @since 5.0.0.p
51
+	 */
52
+	private function loadCollection()
53
+	{
54
+		if (! $this->loader instanceof CollectionLoader) {
55
+			$this->loader = new CollectionLoader(
56
+				new CollectionDetails(
57
+					// collection name
58
+					TypeCollection::COLLECTION_NAME,
59
+					// collection interface
60
+					TypeCollection::COLLECTION_INTERFACE,
61
+					// FQCNs for classes to add (all classes within each namespace will be loaded)
62
+					apply_filters(
63
+						'FHEE__EventEspresso_core_services_graphql_TypeCollection__loadCollection__collection_FQCNs',
64
+						['EventEspresso\core\domain\services\graphql\types']
65
+					),
66
+					// filepaths to classes to add
67
+					array(),
68
+					// file mask to use if parsing folder for files to add
69
+					'',
70
+					// what to use as identifier for collection entities
71
+					// using CLASS NAME prevents duplicates (works like a singleton)
72
+					CollectionDetails::ID_CLASS_NAME
73
+				),
74
+				$this
75
+			);
76
+		}
77
+	}
78 78
 
79 79
 
80
-    /**
81
-     * @return CollectionInterface
82
-     * @throws CollectionDetailsException
83
-     * @throws CollectionLoaderException
84
-     * @since 5.0.0.p
85
-     */
86
-    public function loadTypes()
87
-    {
88
-        $this->loadCollection();
89
-        return $this->loader->getCollection();
90
-    }
80
+	/**
81
+	 * @return CollectionInterface
82
+	 * @throws CollectionDetailsException
83
+	 * @throws CollectionLoaderException
84
+	 * @since 5.0.0.p
85
+	 */
86
+	public function loadTypes()
87
+	{
88
+		$this->loadCollection();
89
+		return $this->loader->getCollection();
90
+	}
91 91
 
92 92
 
93
-    /**
94
-     * getIdentifier
95
-     * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
96
-     * If no $identifier is supplied, then the  fully qualified class name is used
97
-     *
98
-     * @param        $object
99
-     * @param mixed  $identifier
100
-     * @return bool
101
-     */
102
-    public function getIdentifier($object, $identifier = null)
103
-    {
104
-        return ! empty($identifier)
105
-            ? $identifier
106
-            : get_class($object);
107
-    }
93
+	/**
94
+	 * getIdentifier
95
+	 * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
96
+	 * If no $identifier is supplied, then the  fully qualified class name is used
97
+	 *
98
+	 * @param        $object
99
+	 * @param mixed  $identifier
100
+	 * @return bool
101
+	 */
102
+	public function getIdentifier($object, $identifier = null)
103
+	{
104
+		return ! empty($identifier)
105
+			? $identifier
106
+			: get_class($object);
107
+	}
108 108
 }
Please login to merge, or discard this patch.
core/services/graphql/InputsManager.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         $inputFields = [];
69 69
         foreach ($input->fields() as $field) {
70 70
             $fieldName = $field->name();
71
-            $inputFields[ $fieldName ] = $field->toArray();
71
+            $inputFields[$fieldName] = $field->toArray();
72 72
         }
73 73
         // Register the input type.
74 74
         register_graphql_input_type(
Please login to merge, or discard this patch.
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -17,65 +17,65 @@
 block discarded – undo
17 17
  */
18 18
 class InputsManager implements GQLManagerInterface
19 19
 {
20
-    /**
21
-     * @var InputCollection|InputInterface[] $inputs
22
-     */
23
-    private $inputs;
20
+	/**
21
+	 * @var InputCollection|InputInterface[] $inputs
22
+	 */
23
+	private $inputs;
24 24
 
25 25
 
26
-    /**
27
-     * InputsManager constructor.
28
-     *
29
-     * @param InputCollection|InputInterface[] $inputs
30
-     */
31
-    public function __construct(InputCollection $inputs)
32
-    {
33
-        $this->inputs = $inputs;
34
-    }
26
+	/**
27
+	 * InputsManager constructor.
28
+	 *
29
+	 * @param InputCollection|InputInterface[] $inputs
30
+	 */
31
+	public function __construct(InputCollection $inputs)
32
+	{
33
+		$this->inputs = $inputs;
34
+	}
35 35
 
36 36
 
37
-    /**
38
-     * @throws CollectionDetailsException
39
-     * @throws CollectionLoaderException
40
-     * @since 5.0.0.p
41
-     */
42
-    public function init()
43
-    {
44
-        $this->inputs->loadInputs();
45
-        add_action('graphql_register_types', [$this, 'configureInputs'], 9);
46
-    }
37
+	/**
38
+	 * @throws CollectionDetailsException
39
+	 * @throws CollectionLoaderException
40
+	 * @since 5.0.0.p
41
+	 */
42
+	public function init()
43
+	{
44
+		$this->inputs->loadInputs();
45
+		add_action('graphql_register_types', [$this, 'configureInputs'], 9);
46
+	}
47 47
 
48 48
 
49
-    /**
50
-     * @since 5.0.0.p
51
-     */
52
-    public function configureInputs()
53
-    {
54
-        // loop through the collection of inputs and register their fields
55
-        foreach ($this->inputs as $input) {
56
-            $this->registerInput($input);
57
-        }
58
-    }
49
+	/**
50
+	 * @since 5.0.0.p
51
+	 */
52
+	public function configureInputs()
53
+	{
54
+		// loop through the collection of inputs and register their fields
55
+		foreach ($this->inputs as $input) {
56
+			$this->registerInput($input);
57
+		}
58
+	}
59 59
 
60 60
 
61
-    /**
62
-     * @param InputInterface $input
63
-     * @since 5.0.0.p
64
-     */
65
-    public function registerInput(InputInterface $input)
66
-    {
67
-        $inputFields = [];
68
-        foreach ($input->fields() as $field) {
69
-            $fieldName = $field->name();
70
-            $inputFields[ $fieldName ] = $field->toArray();
71
-        }
72
-        // Register the input type.
73
-        register_graphql_input_type(
74
-            $input->name(),
75
-            [
76
-                'description' => $input->description(),
77
-                'fields'      => $inputFields,
78
-            ]
79
-        );
80
-    }
61
+	/**
62
+	 * @param InputInterface $input
63
+	 * @since 5.0.0.p
64
+	 */
65
+	public function registerInput(InputInterface $input)
66
+	{
67
+		$inputFields = [];
68
+		foreach ($input->fields() as $field) {
69
+			$fieldName = $field->name();
70
+			$inputFields[ $fieldName ] = $field->toArray();
71
+		}
72
+		// Register the input type.
73
+		register_graphql_input_type(
74
+			$input->name(),
75
+			[
76
+				'description' => $input->description(),
77
+				'fields'      => $inputFields,
78
+			]
79
+		);
80
+	}
81 81
 }
Please login to merge, or discard this patch.
core/services/graphql/connections/ConnectionCollection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     private function loadCollection()
51 51
     {
52
-        if (! $this->loader instanceof CollectionLoader) {
52
+        if ( ! $this->loader instanceof CollectionLoader) {
53 53
             $this->loader = new CollectionLoader(
54 54
                 new CollectionDetails(
55 55
                     // collection name
Please login to merge, or discard this patch.
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -20,86 +20,86 @@
 block discarded – undo
20 20
  */
21 21
 class ConnectionCollection extends Collection
22 22
 {
23
-    const COLLECTION_NAME = 'espresso_graphql_connections';
23
+	const COLLECTION_NAME = 'espresso_graphql_connections';
24 24
 
25
-    /**
26
-     * @var CollectionLoader $loader
27
-     */
28
-    protected $loader;
25
+	/**
26
+	 * @var CollectionLoader $loader
27
+	 */
28
+	protected $loader;
29 29
 
30
-    /**
31
-     * ConnectionCollection constructor
32
-     *
33
-     * @throws InvalidInterfaceException
34
-     */
35
-    public function __construct()
36
-    {
37
-        parent::__construct(
38
-            'EventEspresso\core\services\graphql\connections\ConnectionInterface',
39
-            ConnectionCollection::COLLECTION_NAME
40
-        );
41
-    }
30
+	/**
31
+	 * ConnectionCollection constructor
32
+	 *
33
+	 * @throws InvalidInterfaceException
34
+	 */
35
+	public function __construct()
36
+	{
37
+		parent::__construct(
38
+			'EventEspresso\core\services\graphql\connections\ConnectionInterface',
39
+			ConnectionCollection::COLLECTION_NAME
40
+		);
41
+	}
42 42
 
43 43
 
44
-    /**
45
-     * @throws CollectionDetailsException
46
-     * @throws CollectionLoaderException
47
-     * @since 5.0.0.p
48
-     */
49
-    private function loadCollection()
50
-    {
51
-        if (! $this->loader instanceof CollectionLoader) {
52
-            $this->loader = new CollectionLoader(
53
-                new CollectionDetails(
54
-                    // collection name
55
-                    ConnectionCollection::COLLECTION_NAME,
56
-                    // collection interface
57
-                    'EventEspresso\core\services\graphql\connections\ConnectionInterface',
58
-                    // FQCNs for classes to add (all classes within each namespace will be loaded)
59
-                    apply_filters(
60
-                        'FHEE__EventEspresso_core_services_graphql_ConnectionCollection__loadCollection__collection_FQCNs',
61
-                        ['EventEspresso\core\domain\services\graphql\connections']
62
-                    ),
63
-                    // filepaths to classes to add
64
-                    array(),
65
-                    // file mask to use if parsing folder for files to add
66
-                    '',
67
-                    // what to use as identifier for collection entities
68
-                    // using CLASS NAME prevents duplicates (works like a singleton)
69
-                    CollectionDetails::ID_CLASS_NAME
70
-                ),
71
-                $this
72
-            );
73
-        }
74
-    }
44
+	/**
45
+	 * @throws CollectionDetailsException
46
+	 * @throws CollectionLoaderException
47
+	 * @since 5.0.0.p
48
+	 */
49
+	private function loadCollection()
50
+	{
51
+		if (! $this->loader instanceof CollectionLoader) {
52
+			$this->loader = new CollectionLoader(
53
+				new CollectionDetails(
54
+					// collection name
55
+					ConnectionCollection::COLLECTION_NAME,
56
+					// collection interface
57
+					'EventEspresso\core\services\graphql\connections\ConnectionInterface',
58
+					// FQCNs for classes to add (all classes within each namespace will be loaded)
59
+					apply_filters(
60
+						'FHEE__EventEspresso_core_services_graphql_ConnectionCollection__loadCollection__collection_FQCNs',
61
+						['EventEspresso\core\domain\services\graphql\connections']
62
+					),
63
+					// filepaths to classes to add
64
+					array(),
65
+					// file mask to use if parsing folder for files to add
66
+					'',
67
+					// what to use as identifier for collection entities
68
+					// using CLASS NAME prevents duplicates (works like a singleton)
69
+					CollectionDetails::ID_CLASS_NAME
70
+				),
71
+				$this
72
+			);
73
+		}
74
+	}
75 75
 
76 76
 
77
-    /**
78
-     * @return CollectionInterface
79
-     * @throws CollectionDetailsException
80
-     * @throws CollectionLoaderException
81
-     * @since 5.0.0.p
82
-     */
83
-    public function loadConnections()
84
-    {
85
-        $this->loadCollection();
86
-        return $this->loader->getCollection();
87
-    }
77
+	/**
78
+	 * @return CollectionInterface
79
+	 * @throws CollectionDetailsException
80
+	 * @throws CollectionLoaderException
81
+	 * @since 5.0.0.p
82
+	 */
83
+	public function loadConnections()
84
+	{
85
+		$this->loadCollection();
86
+		return $this->loader->getCollection();
87
+	}
88 88
 
89 89
 
90
-    /**
91
-     * getIdentifier
92
-     * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
-     * If no $identifier is supplied, then the  fully qualified class name is used
94
-     *
95
-     * @param        $object
96
-     * @param mixed  $identifier
97
-     * @return bool
98
-     */
99
-    public function getIdentifier($object, $identifier = null)
100
-    {
101
-        return ! empty($identifier)
102
-            ? $identifier
103
-            : get_class($object);
104
-    }
90
+	/**
91
+	 * getIdentifier
92
+	 * Overrides EventEspresso\core\services\collections\Collection::getIdentifier()
93
+	 * If no $identifier is supplied, then the  fully qualified class name is used
94
+	 *
95
+	 * @param        $object
96
+	 * @param mixed  $identifier
97
+	 * @return bool
98
+	 */
99
+	public function getIdentifier($object, $identifier = null)
100
+	{
101
+		return ! empty($identifier)
102
+			? $identifier
103
+			: get_class($object);
104
+	}
105 105
 }
Please login to merge, or discard this patch.
core/domain/services/custom_post_types/RewriteRules.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         if (get_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, true)) {
38 38
             add_action(
39 39
                 'shutdown',
40
-                static function () {
40
+                static function() {
41 41
                     flush_rewrite_rules();
42 42
                     update_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, false);
43 43
                 }
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -12,35 +12,35 @@
 block discarded – undo
12 12
  */
13 13
 class RewriteRules
14 14
 {
15
-    const OPTION_KEY_FLUSH_REWRITE_RULES = 'ee_flush_rewrite_rules';
15
+	const OPTION_KEY_FLUSH_REWRITE_RULES = 'ee_flush_rewrite_rules';
16 16
 
17 17
 
18
-    /**
19
-     * This will flush rewrite rules on demand.  This actually gets called around wp init priority level 100.
20
-     *
21
-     * @return void
22
-     */
23
-    public function flush()
24
-    {
25
-        update_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, true);
26
-    }
18
+	/**
19
+	 * This will flush rewrite rules on demand.  This actually gets called around wp init priority level 100.
20
+	 *
21
+	 * @return void
22
+	 */
23
+	public function flush()
24
+	{
25
+		update_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, true);
26
+	}
27 27
 
28 28
 
29
-    /**
30
-     * This will flush rewrite rules on demand.  This actually gets called around wp init priority level 100.
31
-     *
32
-     * @return void
33
-     */
34
-    public function flushRewriteRules()
35
-    {
36
-        if (get_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, true)) {
37
-            add_action(
38
-                'shutdown',
39
-                static function () {
40
-                    flush_rewrite_rules();
41
-                    update_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, false);
42
-                }
43
-            );
44
-        }
45
-    }
29
+	/**
30
+	 * This will flush rewrite rules on demand.  This actually gets called around wp init priority level 100.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function flushRewriteRules()
35
+	{
36
+		if (get_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, true)) {
37
+			add_action(
38
+				'shutdown',
39
+				static function () {
40
+					flush_rewrite_rules();
41
+					update_option(RewriteRules::OPTION_KEY_FLUSH_REWRITE_RULES, false);
42
+				}
43
+			);
44
+		}
45
+	}
46 46
 }
Please login to merge, or discard this patch.
core/services/orm/tree_traversal/BaseNode.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     public function visit($model_objects_to_identify)
70 70
     {
71
-        if (! $this->isDiscovered()) {
71
+        if ( ! $this->isDiscovered()) {
72 72
             $this->discover();
73 73
         }
74 74
         if ($this->isComplete()) {
Please login to merge, or discard this patch.
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -31,106 +31,106 @@
 block discarded – undo
31 31
  */
32 32
 abstract class BaseNode
33 33
 {
34
-    protected ?bool $complete = null;
34
+	protected ?bool $complete = null;
35 35
 
36
-    /**
37
-     * @var array of model names we don't want to traverse
38
-     */
39
-    protected array $dont_traverse_models = [];
36
+	/**
37
+	 * @var array of model names we don't want to traverse
38
+	 */
39
+	protected array $dont_traverse_models = [];
40 40
 
41 41
 
42
-    public ?bool $sleep_complete = null;
43
-    public ?array $sleep_dtm = null;
42
+	public ?bool $sleep_complete = null;
43
+	public ?array $sleep_dtm = null;
44 44
 
45 45
 
46
-    /**
47
-     * Whether this item has already been initialized
48
-     */
49
-    abstract protected function isDiscovered();
46
+	/**
47
+	 * Whether this item has already been initialized
48
+	 */
49
+	abstract protected function isDiscovered();
50 50
 
51
-    /**
52
-     * Determines if the work is done yet or not. Requires you to have first discovered what work exists by calling
53
-     * discover().
54
-     * @since 4.10.12.p
55
-     * @return boolean
56
-     */
57
-    abstract public function isComplete();
51
+	/**
52
+	 * Determines if the work is done yet or not. Requires you to have first discovered what work exists by calling
53
+	 * discover().
54
+	 * @since 4.10.12.p
55
+	 * @return boolean
56
+	 */
57
+	abstract public function isComplete();
58 58
 
59
-    /**
60
-     * Discovers what work needs to be done to complete traversing this node and its children.
61
-     * Note that this is separate from the constructor, so we can create child nodes without
62
-     * discovering them immediately.
63
-     * @since 4.10.12.p
64
-     * @return mixed
65
-     */
66
-    abstract protected function discover();
59
+	/**
60
+	 * Discovers what work needs to be done to complete traversing this node and its children.
61
+	 * Note that this is separate from the constructor, so we can create child nodes without
62
+	 * discovering them immediately.
63
+	 * @since 4.10.12.p
64
+	 * @return mixed
65
+	 */
66
+	abstract protected function discover();
67 67
 
68
-    /**
69
-     * Identifies model objects, up to the limit $model_objects_to_identify.
70
-     * @since 4.10.12.p
71
-     * @param int $model_objects_to_identify
72
-     * @return int units of work done
73
-     */
74
-    abstract protected function work($model_objects_to_identify);
68
+	/**
69
+	 * Identifies model objects, up to the limit $model_objects_to_identify.
70
+	 * @since 4.10.12.p
71
+	 * @param int $model_objects_to_identify
72
+	 * @return int units of work done
73
+	 */
74
+	abstract protected function work($model_objects_to_identify);
75 75
 
76
-    /**
77
-     * Shows the entity/relation node as an array.
78
-     * @since 4.10.12.p
79
-     * @return array
80
-     */
81
-    abstract public function toArray();
76
+	/**
77
+	 * Shows the entity/relation node as an array.
78
+	 * @since 4.10.12.p
79
+	 * @return array
80
+	 */
81
+	abstract public function toArray();
82 82
 
83
-    /**
84
-     * Discovers how much work there is to do, double-checks the work isn't already finished, and then does the work.
85
-     * Note: do not call when site is in maintenance mode level 2.
86
-     *
87
-     * @since 4.10.12.p
88
-     * @param $model_objects_to_identify
89
-     * @return int number of model objects we want to identify during this call. On subsequent calls we'll continue
90
-     * where we left off.
91
-     */
92
-    public function visit($model_objects_to_identify)
93
-    {
94
-        if (! $this->isDiscovered()) {
95
-            $this->discover();
96
-        }
97
-        if ($this->isComplete()) {
98
-            return 0;
99
-        }
100
-        return $this->work($model_objects_to_identify);
101
-    }
83
+	/**
84
+	 * Discovers how much work there is to do, double-checks the work isn't already finished, and then does the work.
85
+	 * Note: do not call when site is in maintenance mode level 2.
86
+	 *
87
+	 * @since 4.10.12.p
88
+	 * @param $model_objects_to_identify
89
+	 * @return int number of model objects we want to identify during this call. On subsequent calls we'll continue
90
+	 * where we left off.
91
+	 */
92
+	public function visit($model_objects_to_identify)
93
+	{
94
+		if (! $this->isDiscovered()) {
95
+			$this->discover();
96
+		}
97
+		if ($this->isComplete()) {
98
+			return 0;
99
+		}
100
+		return $this->work($model_objects_to_identify);
101
+	}
102 102
 
103
-    /**
104
-     * Gets the IDs of completely identified model objects that can be deleted.
105
-     * @since 4.10.12.p
106
-     * @return mixed
107
-     */
108
-    abstract public function getIds();
103
+	/**
104
+	 * Gets the IDs of completely identified model objects that can be deleted.
105
+	 * @since 4.10.12.p
106
+	 * @return mixed
107
+	 */
108
+	abstract public function getIds();
109 109
 
110
-    /**
111
-     * Make sure we encode whether its complete or not, but don't use such a long name.
112
-     * @since 4.10.12.p
113
-     * @return array
114
-     */
115
-    public function __sleep()
116
-    {
117
-        $this->sleep_complete = $this->complete;
118
-        $this->sleep_dtm = $this->dont_traverse_models;
119
-        return [
120
-            'sleep_complete',
121
-            'sleep_dtm'
122
-        ];
123
-    }
110
+	/**
111
+	 * Make sure we encode whether its complete or not, but don't use such a long name.
112
+	 * @since 4.10.12.p
113
+	 * @return array
114
+	 */
115
+	public function __sleep()
116
+	{
117
+		$this->sleep_complete = $this->complete;
118
+		$this->sleep_dtm = $this->dont_traverse_models;
119
+		return [
120
+			'sleep_complete',
121
+			'sleep_dtm'
122
+		];
123
+	}
124 124
 
125
-    /**
126
-     * Use the dynamic property to set the "complete" property.
127
-     * @since 4.10.12.p
128
-     */
129
-    public function __wakeup()
130
-    {
131
-        $this->complete = $this->sleep_complete;
132
-        $this->dont_traverse_models = $this->sleep_dtm;
133
-    }
125
+	/**
126
+	 * Use the dynamic property to set the "complete" property.
127
+	 * @since 4.10.12.p
128
+	 */
129
+	public function __wakeup()
130
+	{
131
+		$this->complete = $this->sleep_complete;
132
+		$this->dont_traverse_models = $this->sleep_dtm;
133
+	}
134 134
 }
135 135
 // End of file BaseNode.php
136 136
 // Location: EventEspresso\core\services\orm\tree_traversal/BaseNode.php
Please login to merge, or discard this patch.