Passed
Push — master ( 9fabf9...229147 )
by Stiofan
14:51
created
templates/invoice/details-top.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
14
-        <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?>
14
+        <?php do_action('getpaid_before_invoice_details_top', $invoice); ?>
15 15
 
16 16
         <div class="getpaid-invoice-details-top mb-5">
17 17
             <div class="row">
18 18
                 <div class="col-12 col-sm-6 text-sm-left">
19
-                    <?php do_action( 'getpaid_invoice_details_top_left', $invoice ); ?>
19
+                    <?php do_action('getpaid_invoice_details_top_left', $invoice); ?>
20 20
                 </div>
21 21
 
22 22
                 <div class="col-12 col-sm-6 text-sm-right">
23
-                    <?php do_action( 'getpaid_invoice_details_top_right', $invoice ); ?>
23
+                    <?php do_action('getpaid_invoice_details_top_right', $invoice); ?>
24 24
                 </div>
25 25
             </div>
26 26
         </div>
27 27
 
28
-        <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?>
28
+        <?php do_action('getpaid_after_invoice_details_top', $invoice); ?>
29 29
 
30 30
 <?php
Please login to merge, or discard this patch.
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays the invoice title, type etc.
4 4
  *
@@ -7,10 +7,10 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-?>
10
+    defined( 'ABSPATH' ) || exit;
13 11
 
12
+    ?>
13
+    
14 14
         <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?>
15 15
 
16 16
         <div class="getpaid-invoice-details-top mb-5">
@@ -26,5 +26,5 @@  discard block
 block discarded – undo
26 26
         </div>
27 27
 
28 28
         <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?>
29
-
30
-<?php
29
+    
30
+    <?php
Please login to merge, or discard this patch.
includes/api/class-getpaid-rest-report-top-earners-controller.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * @since   2.0.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14 14
 /**
15 15
  * GetPaid REST top earners controller class.
Please login to merge, or discard this patch.
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -18,50 +18,50 @@
 block discarded – undo
18 18
  */
19 19
 class GetPaid_REST_Report_Top_Earners_Controller extends GetPaid_REST_Report_Top_Sellers_Controller {
20 20
 
21
-	/**
22
-	 * Route base.
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $rest_base = 'reports/top_earners';
21
+    /**
22
+     * Route base.
23
+     *
24
+     * @var string
25
+     */
26
+    protected $rest_base = 'reports/top_earners';
27 27
 
28
-	/**
29
-	 * Get all data needed for this report and store in the class.
30
-	 */
31
-	protected function query_report_data() {
28
+    /**
29
+     * Get all data needed for this report and store in the class.
30
+     */
31
+    protected function query_report_data() {
32 32
 
33
-		$this->report_data = GetPaid_Reports_Helper::get_invoice_report_data(
34
-			array(
35
-				'data'         => array(
36
-					'quantity'  => array(
37
-						'type'     => 'invoice_item',
38
-						'function' => 'SUM',
39
-						'name'     => 'invoice_item_qty',
40
-					),
41
-					'item_id'   => array(
42
-						'type'     => 'invoice_item',
43
-						'function' => '',
44
-						'name'     => 'invoice_item_id',
45
-					),
46
-					'item_name' => array(
47
-						'type'     => 'invoice_item',
48
-						'function' => '',
49
-						'name'     => 'invoice_item_name',
50
-					),
51
-					'price'     => array(
52
-						'type'     => 'invoice_item',
53
-						'function' => 'SUM',
54
-						'name'     => 'invoice_item_price',
55
-					),
56
-				),
57
-				'group_by'     => 'invoice_item_id',
58
-				'order_by'     => 'invoice_item_price DESC',
59
-				'query_type'   => 'get_results',
60
-				'limit'        => 10,
61
-				'filter_range' => $this->report_range,
62
-			)
63
-		);
33
+        $this->report_data = GetPaid_Reports_Helper::get_invoice_report_data(
34
+            array(
35
+                'data'         => array(
36
+                    'quantity'  => array(
37
+                        'type'     => 'invoice_item',
38
+                        'function' => 'SUM',
39
+                        'name'     => 'invoice_item_qty',
40
+                    ),
41
+                    'item_id'   => array(
42
+                        'type'     => 'invoice_item',
43
+                        'function' => '',
44
+                        'name'     => 'invoice_item_id',
45
+                    ),
46
+                    'item_name' => array(
47
+                        'type'     => 'invoice_item',
48
+                        'function' => '',
49
+                        'name'     => 'invoice_item_name',
50
+                    ),
51
+                    'price'     => array(
52
+                        'type'     => 'invoice_item',
53
+                        'function' => 'SUM',
54
+                        'name'     => 'invoice_item_price',
55
+                    ),
56
+                ),
57
+                'group_by'     => 'invoice_item_id',
58
+                'order_by'     => 'invoice_item_price DESC',
59
+                'query_type'   => 'get_results',
60
+                'limit'        => 10,
61
+                'filter_range' => $this->report_range,
62
+            )
63
+        );
64 64
 
65
-	}
65
+    }
66 66
 
67 67
 }
Please login to merge, or discard this patch.
includes/class-wpinv-api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @since    1.0.19
7 7
  */
8 8
 
9
-defined( 'ABSPATH' ) || exit;
9
+defined('ABSPATH') || exit;
10 10
 
11 11
 /**
12 12
  * The main API class
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->invoice_counts = new GetPaid_REST_Report_Invoice_Counts_Controller();
97 97
 
98 98
         // Fires after loading the rest api.
99
-        do_action( 'getpaid_rest_api_loaded', $this );
99
+        do_action('getpaid_rest_api_loaded', $this);
100 100
     }
101 101
 
102 102
 }
Please login to merge, or discard this patch.
includes/api/class-getpaid-rest-report-invoice-counts-controller.php 2 patches
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -18,102 +18,102 @@
 block discarded – undo
18 18
  */
19 19
 class GetPaid_REST_Report_Invoice_Counts_Controller extends GetPaid_REST_Reports_Controller {
20 20
 
21
-	/**
22
-	 * Route base.
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $rest_base = 'reports/invoices/counts';
27
-
28
-	/**
29
-	 * Prepare a report object for serialization.
30
-	 *
31
-	 * @param  stdClass        $report Report data.
32
-	 * @param  WP_REST_Request $request Request object.
33
-	 * @return WP_REST_Response $response Response data.
34
-	 */
35
-	public function prepare_item_for_response( $report, $request ) {
36
-
37
-		$data    = (array) $report;
38
-		$context = ! empty( $request['context'] ) ? $request['context'] : 'view';
39
-		$data    = $this->add_additional_fields_to_object( $data, $request );
40
-		$data    = $this->filter_response_by_context( $data, $context );
41
-
42
-		// Wrap the data in a response object.
43
-		$response = rest_ensure_response( $data );
44
-
45
-		$response->add_links(
46
-			array(
47
-				'about' => array(
48
-					'href' => rest_url( sprintf( '%s/reports', $this->namespace ) ),
49
-				),
50
-			)
51
-		);
52
-
53
-		return apply_filters( 'getpaid_rest_prepare_report_invoices_count', $response, $report, $request );
54
-	}
55
-
56
-	/**
57
-	 * Get reports list.
58
-	 *
59
-	 * @since 2.0.0
60
-	 * @return array
61
-	 */
62
-	protected function get_reports() {
63
-
64
-		$counts = wp_count_posts( 'wpi_invoice' );
65
-		$data   = array();
66
-
67
-		foreach ( wpinv_get_invoice_statuses() as $slug => $name ) {
68
-
69
-			if ( ! isset( $counts->$slug ) ) {
70
-				continue;
71
-			}
72
-
73
-			$data[] = array(
74
-				'slug'  => $slug,
75
-				'name'  => $name,
76
-				'count' => (int) $counts->$slug,
77
-			);
78
-
79
-		}
80
-
81
-		return $data;
82
-
83
-	}
84
-
85
-	/**
86
-	 * Get the Report's schema, conforming to JSON Schema.
87
-	 *
88
-	 * @return array
89
-	 */
90
-	public function get_item_schema() {
91
-		$schema = array(
92
-			'$schema'    => 'http://json-schema.org/draft-04/schema#',
93
-			'title'      => 'report_invoice_counts',
94
-			'type'       => 'object',
95
-			'properties' => array(
96
-				'slug'  => array(
97
-					'description' => __( 'An alphanumeric identifier for the resource.', 'invoicing' ),
98
-					'type'        => 'string',
99
-					'context'     => array( 'view' ),
100
-					'readonly'    => true,
101
-				),
102
-				'name'  => array(
103
-					'description' => __( 'Invoice status name.', 'invoicing' ),
104
-					'type'        => 'string',
105
-					'context'     => array( 'view' ),
106
-					'readonly'    => true,
107
-				),
108
-				'count' => array(
109
-					'description' => __( 'Number of invoices.', 'invoicing' ),
110
-					'type'        => 'string',
111
-					'context'     => array( 'view' ),
112
-					'readonly'    => true,
113
-				),
114
-			),
115
-		);
116
-
117
-		return $this->add_additional_fields_schema( $schema );
118
-	}
21
+    /**
22
+     * Route base.
23
+     *
24
+     * @var string
25
+     */
26
+    protected $rest_base = 'reports/invoices/counts';
27
+
28
+    /**
29
+     * Prepare a report object for serialization.
30
+     *
31
+     * @param  stdClass        $report Report data.
32
+     * @param  WP_REST_Request $request Request object.
33
+     * @return WP_REST_Response $response Response data.
34
+     */
35
+    public function prepare_item_for_response( $report, $request ) {
36
+
37
+        $data    = (array) $report;
38
+        $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
39
+        $data    = $this->add_additional_fields_to_object( $data, $request );
40
+        $data    = $this->filter_response_by_context( $data, $context );
41
+
42
+        // Wrap the data in a response object.
43
+        $response = rest_ensure_response( $data );
44
+
45
+        $response->add_links(
46
+            array(
47
+                'about' => array(
48
+                    'href' => rest_url( sprintf( '%s/reports', $this->namespace ) ),
49
+                ),
50
+            )
51
+        );
52
+
53
+        return apply_filters( 'getpaid_rest_prepare_report_invoices_count', $response, $report, $request );
54
+    }
55
+
56
+    /**
57
+     * Get reports list.
58
+     *
59
+     * @since 2.0.0
60
+     * @return array
61
+     */
62
+    protected function get_reports() {
63
+
64
+        $counts = wp_count_posts( 'wpi_invoice' );
65
+        $data   = array();
66
+
67
+        foreach ( wpinv_get_invoice_statuses() as $slug => $name ) {
68
+
69
+            if ( ! isset( $counts->$slug ) ) {
70
+                continue;
71
+            }
72
+
73
+            $data[] = array(
74
+                'slug'  => $slug,
75
+                'name'  => $name,
76
+                'count' => (int) $counts->$slug,
77
+            );
78
+
79
+        }
80
+
81
+        return $data;
82
+
83
+    }
84
+
85
+    /**
86
+     * Get the Report's schema, conforming to JSON Schema.
87
+     *
88
+     * @return array
89
+     */
90
+    public function get_item_schema() {
91
+        $schema = array(
92
+            '$schema'    => 'http://json-schema.org/draft-04/schema#',
93
+            'title'      => 'report_invoice_counts',
94
+            'type'       => 'object',
95
+            'properties' => array(
96
+                'slug'  => array(
97
+                    'description' => __( 'An alphanumeric identifier for the resource.', 'invoicing' ),
98
+                    'type'        => 'string',
99
+                    'context'     => array( 'view' ),
100
+                    'readonly'    => true,
101
+                ),
102
+                'name'  => array(
103
+                    'description' => __( 'Invoice status name.', 'invoicing' ),
104
+                    'type'        => 'string',
105
+                    'context'     => array( 'view' ),
106
+                    'readonly'    => true,
107
+                ),
108
+                'count' => array(
109
+                    'description' => __( 'Number of invoices.', 'invoicing' ),
110
+                    'type'        => 'string',
111
+                    'context'     => array( 'view' ),
112
+                    'readonly'    => true,
113
+                ),
114
+            ),
115
+        );
116
+
117
+        return $this->add_additional_fields_schema( $schema );
118
+    }
119 119
 }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since   2.0.0
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14 14
 /**
15 15
  * GetPaid REST invoice counts controller class.
@@ -32,25 +32,25 @@  discard block
 block discarded – undo
32 32
 	 * @param  WP_REST_Request $request Request object.
33 33
 	 * @return WP_REST_Response $response Response data.
34 34
 	 */
35
-	public function prepare_item_for_response( $report, $request ) {
35
+	public function prepare_item_for_response($report, $request) {
36 36
 
37 37
 		$data    = (array) $report;
38
-		$context = ! empty( $request['context'] ) ? $request['context'] : 'view';
39
-		$data    = $this->add_additional_fields_to_object( $data, $request );
40
-		$data    = $this->filter_response_by_context( $data, $context );
38
+		$context = !empty($request['context']) ? $request['context'] : 'view';
39
+		$data    = $this->add_additional_fields_to_object($data, $request);
40
+		$data    = $this->filter_response_by_context($data, $context);
41 41
 
42 42
 		// Wrap the data in a response object.
43
-		$response = rest_ensure_response( $data );
43
+		$response = rest_ensure_response($data);
44 44
 
45 45
 		$response->add_links(
46 46
 			array(
47 47
 				'about' => array(
48
-					'href' => rest_url( sprintf( '%s/reports', $this->namespace ) ),
48
+					'href' => rest_url(sprintf('%s/reports', $this->namespace)),
49 49
 				),
50 50
 			)
51 51
 		);
52 52
 
53
-		return apply_filters( 'getpaid_rest_prepare_report_invoices_count', $response, $report, $request );
53
+		return apply_filters('getpaid_rest_prepare_report_invoices_count', $response, $report, $request);
54 54
 	}
55 55
 
56 56
 	/**
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	protected function get_reports() {
63 63
 
64
-		$counts = wp_count_posts( 'wpi_invoice' );
64
+		$counts = wp_count_posts('wpi_invoice');
65 65
 		$data   = array();
66 66
 
67
-		foreach ( wpinv_get_invoice_statuses() as $slug => $name ) {
67
+		foreach (wpinv_get_invoice_statuses() as $slug => $name) {
68 68
 
69
-			if ( ! isset( $counts->$slug ) ) {
69
+			if (!isset($counts->$slug)) {
70 70
 				continue;
71 71
 			}
72 72
 
@@ -94,26 +94,26 @@  discard block
 block discarded – undo
94 94
 			'type'       => 'object',
95 95
 			'properties' => array(
96 96
 				'slug'  => array(
97
-					'description' => __( 'An alphanumeric identifier for the resource.', 'invoicing' ),
97
+					'description' => __('An alphanumeric identifier for the resource.', 'invoicing'),
98 98
 					'type'        => 'string',
99
-					'context'     => array( 'view' ),
99
+					'context'     => array('view'),
100 100
 					'readonly'    => true,
101 101
 				),
102 102
 				'name'  => array(
103
-					'description' => __( 'Invoice status name.', 'invoicing' ),
103
+					'description' => __('Invoice status name.', 'invoicing'),
104 104
 					'type'        => 'string',
105
-					'context'     => array( 'view' ),
105
+					'context'     => array('view'),
106 106
 					'readonly'    => true,
107 107
 				),
108 108
 				'count' => array(
109
-					'description' => __( 'Number of invoices.', 'invoicing' ),
109
+					'description' => __('Number of invoices.', 'invoicing'),
110 110
 					'type'        => 'string',
111
-					'context'     => array( 'view' ),
111
+					'context'     => array('view'),
112 112
 					'readonly'    => true,
113 113
 				),
114 114
 			),
115 115
 		);
116 116
 
117
-		return $this->add_additional_fields_schema( $schema );
117
+		return $this->add_additional_fields_schema($schema);
118 118
 	}
119 119
 }
Please login to merge, or discard this patch.
includes/data/vat-number-regexes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @package Invoicing/data
7 7
  */
8 8
 
9
-defined( 'ABSPATH' ) || exit;
9
+defined('ABSPATH') || exit;
10 10
 
11 11
 return array(
12 12
 
Please login to merge, or discard this patch.
includes/class-wpinv-privacy.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -37,25 +37,25 @@
 block discarded – undo
37 37
     public function get_privacy_message() {
38 38
 
39 39
         $content = '<div class="wp-suggested-text">' .
40
-                   '<h2>' . __( 'Invoices and checkout', 'invoicing' ) . '</h2>' .
41
-                   '<p class="privacy-policy-tutorial">' . __( 'Example privacy texts.', 'invoicing' ) . '</p>' .
42
-                   '<p>' . __( 'We collect information about you during the checkout process on our site. This information may include, but is not limited to, your name, email address, phone number, address, IP and any other details that might be requested from you for the purpose of processing your payment and retaining your invoice details for legal reasons.', 'invoicing' ) . '</p>' .
43
-                   '<p>' . __( 'Handling this data also allows us to:', 'invoicing' ) . '</p>' .
44
-                   '<ul>' .
45
-                   '<li>' . __( '- Send you important account/invoice/service information.', 'invoicing' ) . '</li>' .
46
-                   '<li>' . __( '- Estimate taxes based on your location.', 'invoicing' ) . '</li>' .
47
-                   '<li>' . __( '- Respond to your queries or complaints.', 'invoicing' ) . '</li>' .
48
-                   '<li>' . __( '- Process payments and to prevent fraudulent transactions. We do this on the basis of our legitimate business interests.', 'invoicing' ) . '</li>' .
49
-                   '<li>' . __( '- Retain historical payment and invoice history. We do this on the basis of legal obligations.', 'invoicing' ) . '</li>' .
50
-                   '<li>' . __( '- Set up and administer your account, provide technical and/or customer support, and to verify your identity. We do this on the basis of our legitimate business interests.', 'invoicing' ) . '</li>' .
51
-                   '</ul>' .
52
-                   '<p>' . __( 'In addition to collecting information at checkout we may also use and store your contact details when manually creating invoices for require payments relating to prior contractual agreements or agreed terms.', 'invoicing' ) . '</p>' .
53
-                   '<h2>' . __( 'What we share with others', 'invoicing' ) . '</h2>' .
54
-                   '<p>' . __( 'We share information with third parties who help us provide our payment and invoicing services to you; for example --', 'invoicing' ) . '</p>' .
55
-                   '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should list which third party payment processors you’re using to take payments since these may handle customer data. We’ve included PayPal as an example, but you should remove this if you’re not using PayPal.', 'invoicing' ) . '</p>' .
56
-                   '<p>' . __( 'We accept payments through PayPal. When processing payments, some of your data will be passed to PayPal, including information required to process or support the payment, such as the purchase total and billing information.', 'invoicing' ) . '</p>' .
57
-                   '<p>' . __( 'Please see the <a href="https://www.paypal.com/us/webapps/mpp/ua/privacy-full">PayPal Privacy Policy</a> for more details.', 'invoicing' ) . '</p>' .
58
-                   '</div>';
40
+                    '<h2>' . __( 'Invoices and checkout', 'invoicing' ) . '</h2>' .
41
+                    '<p class="privacy-policy-tutorial">' . __( 'Example privacy texts.', 'invoicing' ) . '</p>' .
42
+                    '<p>' . __( 'We collect information about you during the checkout process on our site. This information may include, but is not limited to, your name, email address, phone number, address, IP and any other details that might be requested from you for the purpose of processing your payment and retaining your invoice details for legal reasons.', 'invoicing' ) . '</p>' .
43
+                    '<p>' . __( 'Handling this data also allows us to:', 'invoicing' ) . '</p>' .
44
+                    '<ul>' .
45
+                    '<li>' . __( '- Send you important account/invoice/service information.', 'invoicing' ) . '</li>' .
46
+                    '<li>' . __( '- Estimate taxes based on your location.', 'invoicing' ) . '</li>' .
47
+                    '<li>' . __( '- Respond to your queries or complaints.', 'invoicing' ) . '</li>' .
48
+                    '<li>' . __( '- Process payments and to prevent fraudulent transactions. We do this on the basis of our legitimate business interests.', 'invoicing' ) . '</li>' .
49
+                    '<li>' . __( '- Retain historical payment and invoice history. We do this on the basis of legal obligations.', 'invoicing' ) . '</li>' .
50
+                    '<li>' . __( '- Set up and administer your account, provide technical and/or customer support, and to verify your identity. We do this on the basis of our legitimate business interests.', 'invoicing' ) . '</li>' .
51
+                    '</ul>' .
52
+                    '<p>' . __( 'In addition to collecting information at checkout we may also use and store your contact details when manually creating invoices for require payments relating to prior contractual agreements or agreed terms.', 'invoicing' ) . '</p>' .
53
+                    '<h2>' . __( 'What we share with others', 'invoicing' ) . '</h2>' .
54
+                    '<p>' . __( 'We share information with third parties who help us provide our payment and invoicing services to you; for example --', 'invoicing' ) . '</p>' .
55
+                    '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should list which third party payment processors you’re using to take payments since these may handle customer data. We’ve included PayPal as an example, but you should remove this if you’re not using PayPal.', 'invoicing' ) . '</p>' .
56
+                    '<p>' . __( 'We accept payments through PayPal. When processing payments, some of your data will be passed to PayPal, including information required to process or support the payment, such as the purchase total and billing information.', 'invoicing' ) . '</p>' .
57
+                    '<p>' . __( 'Please see the <a href="https://www.paypal.com/us/webapps/mpp/ua/privacy-full">PayPal Privacy Policy</a> for more details.', 'invoicing' ) . '</p>' .
58
+                    '</div>';
59 59
 
60 60
         return apply_filters( 'wpinv_privacy_policy_content', $content );
61 61
     }
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * Privacy/GDPR related functionality which ties into WordPress functionality.
4 4
  */
5 5
 
6
-defined( 'ABSPATH' ) || exit;
6
+defined('ABSPATH') || exit;
7 7
 
8 8
 /**
9 9
  * WPInv_Privacy Class.
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $this->init();
27 27
 
28 28
         // This hook registers Invoicing data exporters.
29
-        $this->add_exporter( 'wpinv-customer-invoices', __( 'Customer Invoices', 'invoicing' ), array( 'WPInv_Privacy_Exporters', 'customer_invoice_data_exporter' ) );
29
+        $this->add_exporter('wpinv-customer-invoices', __('Customer Invoices', 'invoicing'), array('WPInv_Privacy_Exporters', 'customer_invoice_data_exporter'));
30 30
     }
31 31
 
32 32
     /**
@@ -37,27 +37,27 @@  discard block
 block discarded – undo
37 37
     public function get_privacy_message() {
38 38
 
39 39
         $content = '<div class="wp-suggested-text">' .
40
-                   '<h2>' . __( 'Invoices and checkout', 'invoicing' ) . '</h2>' .
41
-                   '<p class="privacy-policy-tutorial">' . __( 'Example privacy texts.', 'invoicing' ) . '</p>' .
42
-                   '<p>' . __( 'We collect information about you during the checkout process on our site. This information may include, but is not limited to, your name, email address, phone number, address, IP and any other details that might be requested from you for the purpose of processing your payment and retaining your invoice details for legal reasons.', 'invoicing' ) . '</p>' .
43
-                   '<p>' . __( 'Handling this data also allows us to:', 'invoicing' ) . '</p>' .
40
+                   '<h2>' . __('Invoices and checkout', 'invoicing') . '</h2>' .
41
+                   '<p class="privacy-policy-tutorial">' . __('Example privacy texts.', 'invoicing') . '</p>' .
42
+                   '<p>' . __('We collect information about you during the checkout process on our site. This information may include, but is not limited to, your name, email address, phone number, address, IP and any other details that might be requested from you for the purpose of processing your payment and retaining your invoice details for legal reasons.', 'invoicing') . '</p>' .
43
+                   '<p>' . __('Handling this data also allows us to:', 'invoicing') . '</p>' .
44 44
                    '<ul>' .
45
-                   '<li>' . __( '- Send you important account/invoice/service information.', 'invoicing' ) . '</li>' .
46
-                   '<li>' . __( '- Estimate taxes based on your location.', 'invoicing' ) . '</li>' .
47
-                   '<li>' . __( '- Respond to your queries or complaints.', 'invoicing' ) . '</li>' .
48
-                   '<li>' . __( '- Process payments and to prevent fraudulent transactions. We do this on the basis of our legitimate business interests.', 'invoicing' ) . '</li>' .
49
-                   '<li>' . __( '- Retain historical payment and invoice history. We do this on the basis of legal obligations.', 'invoicing' ) . '</li>' .
50
-                   '<li>' . __( '- Set up and administer your account, provide technical and/or customer support, and to verify your identity. We do this on the basis of our legitimate business interests.', 'invoicing' ) . '</li>' .
45
+                   '<li>' . __('- Send you important account/invoice/service information.', 'invoicing') . '</li>' .
46
+                   '<li>' . __('- Estimate taxes based on your location.', 'invoicing') . '</li>' .
47
+                   '<li>' . __('- Respond to your queries or complaints.', 'invoicing') . '</li>' .
48
+                   '<li>' . __('- Process payments and to prevent fraudulent transactions. We do this on the basis of our legitimate business interests.', 'invoicing') . '</li>' .
49
+                   '<li>' . __('- Retain historical payment and invoice history. We do this on the basis of legal obligations.', 'invoicing') . '</li>' .
50
+                   '<li>' . __('- Set up and administer your account, provide technical and/or customer support, and to verify your identity. We do this on the basis of our legitimate business interests.', 'invoicing') . '</li>' .
51 51
                    '</ul>' .
52
-                   '<p>' . __( 'In addition to collecting information at checkout we may also use and store your contact details when manually creating invoices for require payments relating to prior contractual agreements or agreed terms.', 'invoicing' ) . '</p>' .
53
-                   '<h2>' . __( 'What we share with others', 'invoicing' ) . '</h2>' .
54
-                   '<p>' . __( 'We share information with third parties who help us provide our payment and invoicing services to you; for example --', 'invoicing' ) . '</p>' .
55
-                   '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should list which third party payment processors you’re using to take payments since these may handle customer data. We’ve included PayPal as an example, but you should remove this if you’re not using PayPal.', 'invoicing' ) . '</p>' .
56
-                   '<p>' . __( 'We accept payments through PayPal. When processing payments, some of your data will be passed to PayPal, including information required to process or support the payment, such as the purchase total and billing information.', 'invoicing' ) . '</p>' .
57
-                   '<p>' . __( 'Please see the <a href="https://www.paypal.com/us/webapps/mpp/ua/privacy-full">PayPal Privacy Policy</a> for more details.', 'invoicing' ) . '</p>' .
52
+                   '<p>' . __('In addition to collecting information at checkout we may also use and store your contact details when manually creating invoices for require payments relating to prior contractual agreements or agreed terms.', 'invoicing') . '</p>' .
53
+                   '<h2>' . __('What we share with others', 'invoicing') . '</h2>' .
54
+                   '<p>' . __('We share information with third parties who help us provide our payment and invoicing services to you; for example --', 'invoicing') . '</p>' .
55
+                   '<p class="privacy-policy-tutorial">' . __('In this subsection you should list which third party payment processors you’re using to take payments since these may handle customer data. We’ve included PayPal as an example, but you should remove this if you’re not using PayPal.', 'invoicing') . '</p>' .
56
+                   '<p>' . __('We accept payments through PayPal. When processing payments, some of your data will be passed to PayPal, including information required to process or support the payment, such as the purchase total and billing information.', 'invoicing') . '</p>' .
57
+                   '<p>' . __('Please see the <a href="https://www.paypal.com/us/webapps/mpp/ua/privacy-full">PayPal Privacy Policy</a> for more details.', 'invoicing') . '</p>' .
58 58
                    '</div>';
59 59
 
60
-        return apply_filters( 'wpinv_privacy_policy_content', $content );
60
+        return apply_filters('wpinv_privacy_policy_content', $content);
61 61
     }
62 62
 
63 63
 }
Please login to merge, or discard this patch.
vendor/composer/installers/src/Composer/Installers/Installer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $installPath = $this->getPackageBasePath($package);
167 167
         $io = $this->io;
168
-        $outputStatus = function () use ($io, $installPath) {
168
+        $outputStatus = function() use ($io, $installPath) {
169 169
             $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
170 170
         };
171 171
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
236 236
         }
237 237
 
238
-        return $pattern ? : '(\w+)';
238
+        return $pattern ?: '(\w+)';
239 239
     }
240 240
 
241 241
     /**
Please login to merge, or discard this patch.
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function getLocations()
37 37
     {
38 38
         if ($this->matchesCakeVersion('>=', '3.0.0')) {
39
-            $this->locations['plugin'] =  $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
39
+            $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
40 40
         }
41 41
         return $this->locations;
42 42
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     protected function matchesCakeVersion($matcher, $version)
52 52
     {
53 53
         $repositoryManager = $this->composer->getRepositoryManager();
54
-        if (! $repositoryManager) {
54
+        if (!$repositoryManager) {
55 55
             return false;
56 56
         }
57 57
 
Please login to merge, or discard this patch.
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 class OxidInstaller extends BaseInstaller
7 7
 {
8
-	const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
8
+    const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
9 9
 
10 10
     protected $locations = array(
11 11
         'module'    => 'modules/{$name}/',
@@ -13,47 +13,47 @@  discard block
 block discarded – undo
13 13
         'out'    => 'out/{$name}/',
14 14
     );
15 15
 
16
-	/**
17
-	 * getInstallPath
18
-	 *
19
-	 * @param PackageInterface $package
20
-	 * @param string $frameworkType
21
-	 * @return string
22
-	 */
23
-	public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
-	{
25
-		$installPath = parent::getInstallPath($package, $frameworkType);
26
-		$type = $this->package->getType();
27
-		if ($type === 'oxid-module') {
28
-			$this->prepareVendorDirectory($installPath);
29
-		}
30
-		return $installPath;
31
-	}
16
+    /**
17
+     * getInstallPath
18
+     *
19
+     * @param PackageInterface $package
20
+     * @param string $frameworkType
21
+     * @return string
22
+     */
23
+    public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+    {
25
+        $installPath = parent::getInstallPath($package, $frameworkType);
26
+        $type = $this->package->getType();
27
+        if ($type === 'oxid-module') {
28
+            $this->prepareVendorDirectory($installPath);
29
+        }
30
+        return $installPath;
31
+    }
32 32
 
33
-	/**
34
-	 * prepareVendorDirectory
35
-	 *
36
-	 * Makes sure there is a vendormetadata.php file inside
37
-	 * the vendor folder if there is a vendor folder.
38
-	 *
39
-	 * @param string $installPath
40
-	 * @return void
41
-	 */
42
-	protected function prepareVendorDirectory($installPath)
43
-	{
44
-		$matches = '';
45
-		$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
46
-		if (!$hasVendorDirectory) {
47
-			return;
48
-		}
33
+    /**
34
+     * prepareVendorDirectory
35
+     *
36
+     * Makes sure there is a vendormetadata.php file inside
37
+     * the vendor folder if there is a vendor folder.
38
+     *
39
+     * @param string $installPath
40
+     * @return void
41
+     */
42
+    protected function prepareVendorDirectory($installPath)
43
+    {
44
+        $matches = '';
45
+        $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
46
+        if (!$hasVendorDirectory) {
47
+            return;
48
+        }
49 49
 
50
-		$vendorDirectory = $matches['vendor'];
51
-		$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
52
-		if (!file_exists($vendorPath)) {
53
-			mkdir($vendorPath, 0755, true);
54
-		}
50
+        $vendorDirectory = $matches['vendor'];
51
+        $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
52
+        if (!file_exists($vendorPath)) {
53
+            mkdir($vendorPath, 0755, true);
54
+        }
55 55
 
56
-		$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
57
-		touch($vendorMetaDataPath);
58
-	}
56
+        $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
57
+        touch($vendorMetaDataPath);
58
+    }
59 59
 }
Please login to merge, or discard this patch.