Completed
Branch GDPR/privacy-policy-content (e16520)
by
unknown
86:01 queued 72:11
created
core/services/privacy/policy/PrivacyPolicyManager.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
     /**
34 34
      * For all the registered `PrivacyPolicyInterface`s, add their privacy policy content
35 35
      *
36
-     * @param WP_Post $post
37 36
      */
38 37
     public function addPrivacyPolicy()
39 38
     {
Please login to merge, or discard this patch.
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -24,64 +24,64 @@
 block discarded – undo
24 24
 class PrivacyPolicyManager
25 25
 {
26 26
 
27
-    public function __construct()
28
-    {
29
-        add_action('admin_init', array($this, 'addPrivacyPolicy'), 9);
30
-    }
27
+	public function __construct()
28
+	{
29
+		add_action('admin_init', array($this, 'addPrivacyPolicy'), 9);
30
+	}
31 31
 
32 32
 
33
-    /**
34
-     * For all the registered `PrivacyPolicyInterface`s, add their privacy policy content
35
-     *
36
-     * @param WP_Post $post
37
-     */
38
-    public function addPrivacyPolicy()
39
-    {
40
-        $policy_page_id = (int) get_option('wp_page_for_privacy_policy');
41
-        if (! $policy_page_id) {
42
-            return;
43
-        }
44
-        // load all the privacy policy stuff
45
-        // add post policy text
46
-        foreach ($this->loadPrivacyPolicyCollection() as $privacy_policy) {
47
-            wp_add_privacy_policy_content($privacy_policy->getName(), $privacy_policy->getContent());
48
-        }
49
-    }
33
+	/**
34
+	 * For all the registered `PrivacyPolicyInterface`s, add their privacy policy content
35
+	 *
36
+	 * @param WP_Post $post
37
+	 */
38
+	public function addPrivacyPolicy()
39
+	{
40
+		$policy_page_id = (int) get_option('wp_page_for_privacy_policy');
41
+		if (! $policy_page_id) {
42
+			return;
43
+		}
44
+		// load all the privacy policy stuff
45
+		// add post policy text
46
+		foreach ($this->loadPrivacyPolicyCollection() as $privacy_policy) {
47
+			wp_add_privacy_policy_content($privacy_policy->getName(), $privacy_policy->getContent());
48
+		}
49
+	}
50 50
 
51 51
 
52
-    /**
53
-     * @return CollectionInterface|PrivacyPolicyInterface[]
54
-     * @throws InvalidIdentifierException
55
-     * @throws InvalidInterfaceException
56
-     * @throws InvalidFilePathException
57
-     * @throws InvalidEntityException
58
-     * @throws InvalidDataTypeException
59
-     * @throws InvalidClassException
60
-     */
61
-    protected function loadPrivacyPolicyCollection()
62
-    {
63
-        $loader = new CollectionLoader(
64
-            new CollectionDetails(
65
-                // collection name
66
-                'privacy_policies',
67
-                // collection interface
68
-                'EventEspresso\core\services\privacy\policy\PrivacyPolicyInterface',
69
-                // FQCNs for classes to add (all classes within that namespace will be loaded)
70
-                apply_filters(
71
-                    'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies',
72
-                    array('EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy')
73
-                ),
74
-                // filepaths to classes to add
75
-                array(),
76
-                // file mask to use if parsing folder for files to add
77
-                '',
78
-                // what to use as identifier for collection entities
79
-                // using CLASS NAME prevents duplicates (works like a singleton)
80
-                CollectionDetails::ID_CLASS_NAME
81
-            )
82
-        );
83
-        return $loader->getCollection();
84
-    }
52
+	/**
53
+	 * @return CollectionInterface|PrivacyPolicyInterface[]
54
+	 * @throws InvalidIdentifierException
55
+	 * @throws InvalidInterfaceException
56
+	 * @throws InvalidFilePathException
57
+	 * @throws InvalidEntityException
58
+	 * @throws InvalidDataTypeException
59
+	 * @throws InvalidClassException
60
+	 */
61
+	protected function loadPrivacyPolicyCollection()
62
+	{
63
+		$loader = new CollectionLoader(
64
+			new CollectionDetails(
65
+				// collection name
66
+				'privacy_policies',
67
+				// collection interface
68
+				'EventEspresso\core\services\privacy\policy\PrivacyPolicyInterface',
69
+				// FQCNs for classes to add (all classes within that namespace will be loaded)
70
+				apply_filters(
71
+					'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies',
72
+					array('EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy')
73
+				),
74
+				// filepaths to classes to add
75
+				array(),
76
+				// file mask to use if parsing folder for files to add
77
+				'',
78
+				// what to use as identifier for collection entities
79
+				// using CLASS NAME prevents duplicates (works like a singleton)
80
+				CollectionDetails::ID_CLASS_NAME
81
+			)
82
+		);
83
+		return $loader->getCollection();
84
+	}
85 85
 }
86 86
 // End of file PrivacyPolicyManager.php
87 87
 // Location: EventEspresso\core\domain\services\admin/PrivacyPolicyManager.php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     public function addPrivacyPolicy()
39 39
     {
40 40
         $policy_page_id = (int) get_option('wp_page_for_privacy_policy');
41
-        if (! $policy_page_id) {
41
+        if ( ! $policy_page_id) {
42 42
             return;
43 43
         }
44 44
         // load all the privacy policy stuff
Please login to merge, or discard this patch.