Completed
Branch GDPR/user-data-export (6a5557)
by
unknown
111:47 queued 98:38
created
core/services/privacy/export/PersonalDataExporterManager.php 2 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -23,68 +23,68 @@
 block discarded – undo
23 23
 class PersonalDataExporterManager
24 24
 {
25 25
 
26
-    public function __construct()
27
-    {
28
-        add_filter(
29
-            'wp_privacy_personal_data_exporters',
30
-            array($this, 'hookInExporters')
31
-        );
32
-    }
26
+	public function __construct()
27
+	{
28
+		add_filter(
29
+			'wp_privacy_personal_data_exporters',
30
+			array($this, 'hookInExporters')
31
+		);
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * Adds EE's exporters to the list of WP exporters
37
-     *
38
-     * @param array $exporters
39
-     * @return array
40
-     */
41
-    public function hookInExporters($exporters)
42
-    {
43
-        // load all the privacy policy stuff
44
-        // add post policy text
45
-        foreach ($this->loadPrivateDataExporterCollection() as $exporter) {
46
-            $exporters[ get_class($exporter) ] = array(
47
-                'exporter_friendly_name' => $exporter->name(),
48
-                'callback'               => array($exporter, 'export'),
49
-            );
50
-        }
51
-        return $exporters;
52
-    }
35
+	/**
36
+	 * Adds EE's exporters to the list of WP exporters
37
+	 *
38
+	 * @param array $exporters
39
+	 * @return array
40
+	 */
41
+	public function hookInExporters($exporters)
42
+	{
43
+		// load all the privacy policy stuff
44
+		// add post policy text
45
+		foreach ($this->loadPrivateDataExporterCollection() as $exporter) {
46
+			$exporters[ get_class($exporter) ] = array(
47
+				'exporter_friendly_name' => $exporter->name(),
48
+				'callback'               => array($exporter, 'export'),
49
+			);
50
+		}
51
+		return $exporters;
52
+	}
53 53
 
54 54
 
55
-    /**
56
-     * @return CollectionInterface|PersonalDataExporterInterface[]
57
-     * @throws InvalidIdentifierException
58
-     * @throws InvalidInterfaceException
59
-     * @throws InvalidFilePathException
60
-     * @throws InvalidEntityException
61
-     * @throws InvalidDataTypeException
62
-     * @throws InvalidClassException
63
-     */
64
-    protected function loadPrivateDataExporterCollection()
65
-    {
66
-        $loader = new CollectionLoader(
67
-            new CollectionDetails(
68
-                // collection name
69
-                'personal_data_exporters',
70
-                // collection interface
71
-                'EventEspresso\core\services\privacy\export\PersonalDataExporterInterface',
72
-                // FQCNs for classes to add (all classes within that namespace will be loaded)
73
-                apply_filters(
74
-                    'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
75
-                    array('EventEspresso\core\domain\services\admin\privacy\export')
76
-                ),
77
-                // filepaths to classes to add
78
-                array(),
79
-                // file mask to use if parsing folder for files to add
80
-                '',
81
-                // what to use as identifier for collection entities
82
-                // using CLASS NAME prevents duplicates (works like a singleton)
83
-                CollectionDetails::ID_CLASS_NAME
84
-            )
85
-        );
86
-        return $loader->getCollection();
87
-    }
55
+	/**
56
+	 * @return CollectionInterface|PersonalDataExporterInterface[]
57
+	 * @throws InvalidIdentifierException
58
+	 * @throws InvalidInterfaceException
59
+	 * @throws InvalidFilePathException
60
+	 * @throws InvalidEntityException
61
+	 * @throws InvalidDataTypeException
62
+	 * @throws InvalidClassException
63
+	 */
64
+	protected function loadPrivateDataExporterCollection()
65
+	{
66
+		$loader = new CollectionLoader(
67
+			new CollectionDetails(
68
+				// collection name
69
+				'personal_data_exporters',
70
+				// collection interface
71
+				'EventEspresso\core\services\privacy\export\PersonalDataExporterInterface',
72
+				// FQCNs for classes to add (all classes within that namespace will be loaded)
73
+				apply_filters(
74
+					'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
75
+					array('EventEspresso\core\domain\services\admin\privacy\export')
76
+				),
77
+				// filepaths to classes to add
78
+				array(),
79
+				// file mask to use if parsing folder for files to add
80
+				'',
81
+				// what to use as identifier for collection entities
82
+				// using CLASS NAME prevents duplicates (works like a singleton)
83
+				CollectionDetails::ID_CLASS_NAME
84
+			)
85
+		);
86
+		return $loader->getCollection();
87
+	}
88 88
 }
89 89
 
90 90
 // End of file PersonalDataExporterManager.php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         // load all the privacy policy stuff
44 44
         // add post policy text
45 45
         foreach ($this->loadPrivateDataExporterCollection() as $exporter) {
46
-            $exporters[ get_class($exporter) ] = array(
46
+            $exporters[get_class($exporter)] = array(
47 47
                 'exporter_friendly_name' => $exporter->name(),
48 48
                 'callback'               => array($exporter, 'export'),
49 49
             );
Please login to merge, or discard this patch.