Skip to content

Commit

Permalink
fix on code to respect prestashop standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine Di Gruttola committed Jul 23, 2022
1 parent b922dae commit 1804e9f
Show file tree
Hide file tree
Showing 17 changed files with 189 additions and 205 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ upload/
.DS_Store
.AppleDouble
.LSOverride

**/.php-cs-fixer.dist.php
21 changes: 9 additions & 12 deletions classes/EInvoiceAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
* @copyright 2007-2022 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
*
*/

class EInvoiceAddress extends ObjectModel
{
/** @var int id_address */
Expand All @@ -46,15 +43,15 @@ class EInvoiceAddress extends ObjectModel
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
public static $definition = [
'table' => 'einvoice_address',
'primary' => 'id_address',
'fields' => array(
'id_address' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
'customertype' => array('type' => self::TYPE_BOOL),
'pec' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail'),
'sdi' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 7),
'pa' => array('type' => self::TYPE_BOOL),
),
);
'fields' => [
'id_address' => ['type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'],
'customertype' => ['type' => self::TYPE_BOOL],
'pec' => ['type' => self::TYPE_STRING, 'validate' => 'isEmail'],
'sdi' => ['type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 7],
'pa' => ['type' => self::TYPE_BOOL],
],
];
}
1 change: 0 additions & 1 deletion classes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>einvoice</name>
<displayName><![CDATA[Electronic Invoice - fields]]></displayName>
<version><![CDATA[1.0.0]]></version>
<version><![CDATA[1.1.0]]></version>
<description><![CDATA[This module adds the new fields for E-Invoice in Customer Address]]></description>
<author><![CDATA[cdigruttola]]></author>
<tab><![CDATA[administration]]></tab>
Expand Down
Loading

0 comments on commit 1804e9f

Please sign in to comment.