Completed
Branch 2.0.0 (fb6d70)
by Jimmy
02:28
created
modules/contacts/model/class-contact-model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Class Contact model.
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param Contact $object     Les données de l'objet.
30 30
 	 * @param string  $req_method La méthode de la requête.
31 31
 	 */
32
-	public function __construct( $object, $req_method = null ) {
32
+	public function __construct($object, $req_method = null) {
33 33
 		$this->schema['external_id'] = array(
34 34
 			'type'        => 'integer',
35 35
 			'meta_type'   => 'single',
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 			'field'       => '_date_last_synchro',
69 69
 			'since'       => '2.0.0',
70 70
 			'description' => 'La date de la dernière synchronisation.',
71
-			'context'     => array( 'GET' ),
71
+			'context'     => array('GET'),
72 72
 		);
73 73
 
74
-		parent::__construct( $object, $req_method );
74
+		parent::__construct($object, $req_method);
75 75
 	}
76 76
 }
Please login to merge, or discard this patch.
modules/doli-proposals/view/main.view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <div class="wrap wpeo-wrap">
20
-	<h2><?php esc_html_e( 'Orders', 'wpshop' ); ?></h2>
20
+	<h2><?php esc_html_e('Orders', 'wpshop'); ?></h2>
21 21
 
22 22
 	<div class="action-attribute wpeo-button button-main"
23 23
 		data-action="synchro_proposals">
24
-		<span><?php esc_html_e( 'Sync', 'wpshop' ); ?></span>
24
+		<span><?php esc_html_e('Sync', 'wpshop'); ?></span>
25 25
 	</div>
26 26
 
27 27
 	<?php Proposals::g()->display(); ?>
Please login to merge, or discard this patch.
modules/doli-invoice/view/metabox-action.view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,4 +14,4 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
Please login to merge, or discard this patch.
modules/doli-invoice/model/class-doli-invoice-model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Class product model.
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param Doli_Invoice $object     Les données de l'objet.
30 30
 	 * @param string       $req_method La méthode de la requête.
31 31
 	 */
32
-	public function __construct( $object, $req_method = null ) {
32
+	public function __construct($object, $req_method = null) {
33 33
 		$this->schema['external_id'] = array(
34 34
 			'type'        => 'integer',
35 35
 			'meta_type'   => 'single',
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 			'field'       => '_date_last_synchro',
114 114
 			'since'       => '2.0.0',
115 115
 			'description' => 'La date de la dernière synchronisation.',
116
-			'context'     => array( 'GET' ),
116
+			'context'     => array('GET'),
117 117
 		);
118 118
 
119
-		parent::__construct( $object, $req_method );
119
+		parent::__construct($object, $req_method);
120 120
 	}
121 121
 }
Please login to merge, or discard this patch.
modules/doli-contact/action/class-doli-contact-action.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Doli Contact Action Class.
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 	 * @since 2.0.0
28 28
 	 */
29 29
 	public function __construct() {
30
-		add_action( 'wps_checkout_create_contact', array( $this, 'checkout_create_contact' ) );
30
+		add_action('wps_checkout_create_contact', array($this, 'checkout_create_contact'));
31 31
 
32
-		add_action( 'wps_deleted_contact', array( $this, 'delete_contact' ), 10, 2 );
32
+		add_action('wps_deleted_contact', array($this, 'delete_contact'), 10, 2);
33 33
 	}
34 34
 
35 35
 	/**
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @param  Contact_Model $wp_contact Les données du contact.
41 41
 	 */
42
-	public function checkout_create_contact( $wp_contact ) {
43
-		if ( Settings::g()->dolibarr_is_active() ) {
42
+	public function checkout_create_contact($wp_contact) {
43
+		if (Settings::g()->dolibarr_is_active()) {
44 44
 			// translators: Checkout create contact from wp to dolibarr {json_data}.
45
-			\eoxia\LOG_Util::log( sprintf( 'Checkout create contact from wp to dolibarr %s', json_encode( $wp_contact->data ) ), 'wpshop2' );
45
+			\eoxia\LOG_Util::log(sprintf('Checkout create contact from wp to dolibarr %s', json_encode($wp_contact->data)), 'wpshop2');
46 46
 
47
-			Doli_Contact::g()->wp_to_doli( $wp_contact, null );
47
+			Doli_Contact::g()->wp_to_doli($wp_contact, null);
48 48
 		}
49 49
 	}
50 50
 
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
 	 * @param  Third_Party_Model $third_party Les données du tier.
57 57
 	 * @param  Contact_Model     $contact     Les données du contact.
58 58
 	 */
59
-	public function delete_contact( $third_party, $contact ) {
59
+	public function delete_contact($third_party, $contact) {
60 60
 		$data = array(
61 61
 			'socid' => -1,
62 62
 		);
63 63
 
64
-		Request_Util::put( 'contacts/' . $contact->data['external_id'], $data );
64
+		Request_Util::put('contacts/' . $contact->data['external_id'], $data);
65 65
 	}
66 66
 }
67 67
 
Please login to merge, or discard this patch.
modules/third-parties/filter/class-third-party-filter.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Third Party Filter Class.
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 	 * @since 2.0.0
28 28
 	 */
29 29
 	public function __construct() {
30
-		add_filter( 'eo_model_wps-third-party_register_post_type_args', array( $this, 'callback_register_post_type_args' ) );
31
-		add_filter( 'wps_third_party_metaboxes', array( $this, 'add_orders_and_billings_metaboxes' ), 9, 1 );
30
+		add_filter('eo_model_wps-third-party_register_post_type_args', array($this, 'callback_register_post_type_args'));
31
+		add_filter('wps_third_party_metaboxes', array($this, 'add_orders_and_billings_metaboxes'), 9, 1);
32 32
 	}
33 33
 
34 34
 	/**
@@ -40,24 +40,24 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function callback_register_post_type_args() {
42 42
 		$labels = array(
43
-			'name'               => _x( 'Third parties', 'post type general name', 'wpshop' ),
44
-			'singular_name'      => _x( 'Third party', 'post type singular name', 'wpshop' ),
45
-			'menu_name'          => _x( 'Third parties', 'admin menu', 'wpshop' ),
46
-			'name_admin_bar'     => _x( 'Third party', 'add new on admin bar', 'wpshop' ),
47
-			'add_new'            => _x( 'Add New', 'third party', 'wpshop' ),
48
-			'add_new_item'       => __( 'Add New Third party', 'wpshop' ),
49
-			'new_item'           => __( 'New Third party', 'wpshop' ),
50
-			'edit_item'          => __( 'Edit Third party', 'wpshop' ),
51
-			'view_item'          => __( 'View Third party', 'wpshop' ),
52
-			'all_items'          => __( 'All Third parties', 'wpshop' ),
53
-			'search_items'       => __( 'Search Third parties', 'wpshop' ),
54
-			'parent_item_colon'  => __( 'Parent Third parties:', 'wpshop' ),
55
-			'not_found'          => __( 'No third parties found.', 'wpshop' ),
56
-			'not_found_in_trash' => __( 'No third parties found in Trash.', 'wpshop' ),
43
+			'name'               => _x('Third parties', 'post type general name', 'wpshop'),
44
+			'singular_name'      => _x('Third party', 'post type singular name', 'wpshop'),
45
+			'menu_name'          => _x('Third parties', 'admin menu', 'wpshop'),
46
+			'name_admin_bar'     => _x('Third party', 'add new on admin bar', 'wpshop'),
47
+			'add_new'            => _x('Add New', 'third party', 'wpshop'),
48
+			'add_new_item'       => __('Add New Third party', 'wpshop'),
49
+			'new_item'           => __('New Third party', 'wpshop'),
50
+			'edit_item'          => __('Edit Third party', 'wpshop'),
51
+			'view_item'          => __('View Third party', 'wpshop'),
52
+			'all_items'          => __('All Third parties', 'wpshop'),
53
+			'search_items'       => __('Search Third parties', 'wpshop'),
54
+			'parent_item_colon'  => __('Parent Third parties:', 'wpshop'),
55
+			'not_found'          => __('No third parties found.', 'wpshop'),
56
+			'not_found_in_trash' => __('No third parties found in Trash.', 'wpshop'),
57 57
 		);
58 58
 
59 59
 		$args['labels']              = $labels;
60
-		$args['supports']            = array( 'title', 'thumbnail' );
60
+		$args['supports']            = array('title', 'thumbnail');
61 61
 		$args['public']              = true;
62 62
 		$args['has_archive']         = true;
63 63
 		$args['show_ui']             = true;
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 	 * @return array           La définition des metaboxes avec la définition
79 79
 	 * de celle pour les commande et les factures.
80 80
 	 */
81
-	public function add_orders_and_billings_metaboxes( $metaboxes ) {
82
-		if ( Settings::g()->dolibarr_is_active() ) {
81
+	public function add_orders_and_billings_metaboxes($metaboxes) {
82
+		if (Settings::g()->dolibarr_is_active()) {
83 83
 			$metaboxes['wps-third-party-orders'] = array(
84 84
 				'callback' => 'metabox_orders',
85 85
 			);
Please login to merge, or discard this patch.
modules/third-parties/view/commercial.view.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -14,34 +14,34 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <ul class="list-commercial">
20
-	<?php if ( ! empty( $propal->data ) ) : ?>
20
+	<?php if (!empty($propal->data)) : ?>
21 21
 		<li class="commercial type-propal">
22 22
 			<i class="fas fa-file-signature"></i>
23 23
 			<span class="commercial-date"><?php echo $propal->data['datec']['rendered']['date']; ?></span>
24
-			<span class="commercial-title"><a href="<?php echo esc_attr( admin_url( 'admin.php?page=wps-proposal&id=' . $propal->data['id'] ) ); ?>"><?php echo $propal->data['title']; ?></a></span>
25
-			<span class="commercial-price"><?php echo ! empty( $propal->data['total_ttc'] ) ? $propal->data['total_ttc'] . '€ TTC' : ''; ?></span>
26
-			<span class="commercial-status"><?php echo Doli_Statut::g()->display_status( $propal ); ?></span>
24
+			<span class="commercial-title"><a href="<?php echo esc_attr(admin_url('admin.php?page=wps-proposal&id=' . $propal->data['id'])); ?>"><?php echo $propal->data['title']; ?></a></span>
25
+			<span class="commercial-price"><?php echo !empty($propal->data['total_ttc']) ? $propal->data['total_ttc'] . '€ TTC' : ''; ?></span>
26
+			<span class="commercial-status"><?php echo Doli_Statut::g()->display_status($propal); ?></span>
27 27
 		</li>
28 28
 	<?php endif; ?>
29
-	<?php if ( ! empty( $order->data ) && $doli_active ) : ?>
29
+	<?php if (!empty($order->data) && $doli_active) : ?>
30 30
 		<li class="commercial type-order">
31 31
 			<i class="fas fa-shopping-cart"></i>
32 32
 			<span class="commercial-date"><?php echo $order->data['datec']['rendered']['date']; ?></span>
33
-			<span class="commercial-title"><a href="<?php echo esc_attr( admin_url( 'admin.php?page=wps-order&id=' . $order->data['id'] ) ); ?>"><?php echo $order->data['title']; ?></a></span>
34
-			<span class="commercial-price"><?php echo ! empty( $order->data['total_ttc'] ) ? $order->data['total_ttc'] . '€ TTC' : ''; ?></span>
35
-			<span class="commercial-status"><?php echo Doli_Statut::g()->display_status( $order ); ?></span>
33
+			<span class="commercial-title"><a href="<?php echo esc_attr(admin_url('admin.php?page=wps-order&id=' . $order->data['id'])); ?>"><?php echo $order->data['title']; ?></a></span>
34
+			<span class="commercial-price"><?php echo !empty($order->data['total_ttc']) ? $order->data['total_ttc'] . '€ TTC' : ''; ?></span>
35
+			<span class="commercial-status"><?php echo Doli_Statut::g()->display_status($order); ?></span>
36 36
 		</li>
37 37
 	<?php endif; ?>
38
-	<?php if ( ! empty( $invoice->data ) && $doli_active ) : ?>
38
+	<?php if (!empty($invoice->data) && $doli_active) : ?>
39 39
 		<li class="commercial type-invoice">
40 40
 			<i class="fas fa-file-invoice-dollar"></i>
41 41
 			<span class="commercial-date"><?php echo $invoice->data['date']['rendered']['date']; ?></span>
42
-			<span class="commercial-title"><a href="<?php echo esc_attr( $doli_url . '/compta/facture/card.php?id=' . $invoice->data['external_id'] ); ?>"><?php echo $invoice->data['title']; ?></a></span>
43
-			<span class="commercial-price"><?php echo ! empty( $invoice->data['total_ttc'] ) ? $invoice->data['total_ttc'] . '€ TTC' : ''; ?></span>
44
-			<span class="commercial-status"><?php echo Doli_Statut::g()->display_status( $invoice ); ?></span>
42
+			<span class="commercial-title"><a href="<?php echo esc_attr($doli_url . '/compta/facture/card.php?id=' . $invoice->data['external_id']); ?>"><?php echo $invoice->data['title']; ?></a></span>
43
+			<span class="commercial-price"><?php echo !empty($invoice->data['total_ttc']) ? $invoice->data['total_ttc'] . '€ TTC' : ''; ?></span>
44
+			<span class="commercial-status"><?php echo Doli_Statut::g()->display_status($invoice); ?></span>
45 45
 		</li>
46 46
 	<?php endif; ?>
47 47
 </ul>
Please login to merge, or discard this patch.
modules/third-parties/view/list.view.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,25 +14,25 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 
20 20
 <div class="wps-list-third-parties wpeo-table table-flex table-6">
21 21
 	<div class="table-row table-header">
22
-		<div class="table-cell table-200"><?php esc_html_e( 'Society name', 'wpshop' ); ?></div>
23
-		<div class="table-cell table-300"><?php esc_html_e( 'Contacts', 'wpshop' ); ?></div>
24
-		<div class="table-cell table-350"><?php esc_html_e( 'Commercial', 'wpshop' ); ?></div>
25
-		<div class="table-cell table-full"><?php esc_html_e( 'Actions', 'wpshop' ); ?></div>
26
-		<?php do_action( 'wps_listing_table_header_end' ); ?>
22
+		<div class="table-cell table-200"><?php esc_html_e('Society name', 'wpshop'); ?></div>
23
+		<div class="table-cell table-300"><?php esc_html_e('Contacts', 'wpshop'); ?></div>
24
+		<div class="table-cell table-350"><?php esc_html_e('Commercial', 'wpshop'); ?></div>
25
+		<div class="table-cell table-full"><?php esc_html_e('Actions', 'wpshop'); ?></div>
26
+		<?php do_action('wps_listing_table_header_end'); ?>
27 27
 	</div>
28 28
 
29 29
 	<?php
30
-	if ( ! empty( $third_parties ) ) :
31
-		foreach ( $third_parties as $third_party ) :
32
-			\eoxia\View_Util::exec( 'wpshop', 'third-parties', 'item', array(
30
+	if (!empty($third_parties)) :
31
+		foreach ($third_parties as $third_party) :
32
+			\eoxia\View_Util::exec('wpshop', 'third-parties', 'item', array(
33 33
 				'third_party' => $third_party,
34 34
 				'doli_url'    => $doli_url,
35
-			) );
35
+			));
36 36
 		endforeach;
37 37
 	endif;
38 38
 	?>
Please login to merge, or discard this patch.
modules/third-parties/view/metaboxes/metabox-activity.view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <div class="wps-metabox wps-billing-address view gridw-6">
20
-	<h3 class="metabox-title"><?php esc_html_e( 'Activity' ); ?></h3>
20
+	<h3 class="metabox-title"><?php esc_html_e('Activity'); ?></h3>
21 21
 
22 22
 	<?php
23
-	\task_manager\Indicator_Class::g()->callback_my_daily_activity( $post, array(), array(), $post->ID );
23
+	\task_manager\Indicator_Class::g()->callback_my_daily_activity($post, array(), array(), $post->ID);
24 24
 	?>
25 25
 </div>
Please login to merge, or discard this patch.