Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 23 additions & 9 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
name: Payplug Woocommerce CI
on: [ push ]
jobs:
Trigger-PHP-Linter:
name: 1) Execute PHP CS Fixer Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Installer PHP 7.2
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
- name: Installer les dépendances Composer
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run linter
run: chmod +x ./vendor/bin/php-cs-fixer && ./vendor/bin/php-cs-fixer fix -vvv --dry-run --using-cache=no

Generate-Zip-File:
name: 1) Generate-Zip-File
name: 2) Generate-Zip-File
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -16,7 +30,7 @@ jobs:
- run: echo "🍏 This job's status is ${{ job.status }}."

Check-PHP-Compatibility-5-6:
name: 2) Check PHP Compatibility 5.6
name: 3) Check PHP Compatibility 5.6
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -31,7 +45,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 5.6

Check-PHP-Compatibility-7-0:
name: 3) Check PHP Compatibility 7.0
name: 4) Check PHP Compatibility 7.0
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -46,7 +60,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 7.0

Check-PHP-Compatibility-7-1:
name: 4) Check PHP Compatibility 7.1
name: 5) Check PHP Compatibility 7.1
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -61,7 +75,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 7.1

Check-PHP-Compatibility-7-2:
name: 5) Check PHP Compatibility 7.2
name: 6) Check PHP Compatibility 7.2
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -76,7 +90,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 7.2

Check-PHP-Compatibility-7-3:
name: 6) Check PHP Compatibility 7.3
name: 7) Check PHP Compatibility 7.3
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -91,7 +105,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 7.3

Check-PHP-Compatibility-7-4:
name: 7) Check PHP Compatibility 7.4
name: 8) Check PHP Compatibility 7.4
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -106,7 +120,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 7.4

Check-PHP-Compatibility-8-0:
name: 8) Check PHP Compatibility 8.0
name: 9) Check PHP Compatibility 8.0
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand All @@ -121,7 +135,7 @@ jobs:
run: vendor/bin/phpcs --colors -s ./src/ --standard=PHPCompatibility --runtime-set testVersion 8.0

Check-PHP-Compatibility-8-1:
name: 9) Check PHP Compatibility 8.1
name: 10) Check PHP Compatibility 8.1
runs-on: ubuntu-latest
steps:
- name: Check out repository code ${{ github.workflow }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ tests
# Temporary files
*~
/cypress/

# Php cs fixer cache file
.php-cs-fixer.cache
42 changes: 42 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

$finder = (new PhpCsFixer\Finder())
->exclude('bin')
->exclude('tests')
->in(__DIR__);

return (new PhpCsFixer\Config())
->setUsingCache(true)
->setRules([
'@PSR12' => true,
'@PhpCsFixer' => true,
'phpdoc_summary' => true,
'yoda_style' => true,
'visibility_required' => false,
'single_blank_line_before_namespace' => true,
'no_blank_lines_after_phpdoc' => true,
'single_space_after_construct' => true,
'no_spaces_after_function_name' => true,
'concat_space' => ['spacing' => 'one'],
'include' => true,
'trailing_comma_in_multiline' => true,
'binary_operator_spaces' => true,
'no_unneeded_control_parentheses' => false,
'cast_spaces' => true,
'blank_line_before_statement' => ['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'include', 'include_once', 'require', 'require_once', 'return', 'switch', 'throw', 'try', 'yield', 'yield_from']],
'no_alias_language_construct_call' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use', 'use_trait']],
'array_syntax' => ['syntax' => 'short'],
'phpdoc_separation' => true,
'no_superfluous_elseif' => false,
'multiline_whitespace_before_semicolons' => false,
'array_indentation' => true,
'phpdoc_order' => true,
'phpdoc_trim' => true,
'single_line_comment_style' => true,
'phpdoc_align' => ['align' => 'left'],
'php_unit_internal_class' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_types_order' => ['sort_algorithm' => 'alpha', 'null_adjustment' => 'always_last'],
])
->setFinder($finder);
14 changes: 7 additions & 7 deletions assets/images/integrated/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2013 - 2022 PayPlug SAS
* 2013 - 2022 PayPlug SAS.
*
* NOTICE OF LICENSE
*
Expand All @@ -20,13 +20,13 @@
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PayPlug SAS
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Location: ../../../../');

header("Location: ../../../../");
exit;
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-html-entities', 'wp-i18n'), 'version' => 'b30f2764519f68059176');
<?php

return ['dependencies' => ['jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-html-entities', 'wp-i18n'], 'version' => 'b30f2764519f68059176'];
4 changes: 3 additions & 1 deletion assets/js/blocks/wc-payplug-apple_pay-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-html-entities', 'wp-i18n'), 'version' => 'de1e436fab8a1ba4df71');
<?php

return ['dependencies' => ['jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-html-entities', 'wp-i18n'], 'version' => 'de1e436fab8a1ba4df71'];
4 changes: 3 additions & 1 deletion assets/js/blocks/wc-payplug-bancontact-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => 'ab4fd56bd3137ee8268d');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => 'ab4fd56bd3137ee8268d'];
4 changes: 3 additions & 1 deletion assets/js/blocks/wc-payplug-ideal-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => '858bd7f5d35c3b197adc');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => '858bd7f5d35c3b197adc'];
4 changes: 3 additions & 1 deletion assets/js/blocks/wc-payplug-mybank-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => '673f5e3c1e29f710d882');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => '673f5e3c1e29f710d882'];
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => 'ffabeb30ead14c1a25c4');
<?php

return ['dependencies' => ['react', 'react-dom', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => 'ffabeb30ead14c1a25c4'];
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => '162e3d59289288260a64');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => '162e3d59289288260a64'];
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => 'c120773d4ec95ed5b91c');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => 'c120773d4ec95ed5b91c'];
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => '871a5e056e2a5cbb6aaa');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => '871a5e056e2a5cbb6aaa'];
4 changes: 3 additions & 1 deletion assets/js/blocks/wc-payplug-payplug-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-html-entities', 'wp-i18n'), 'version' => '3b288ad3e9baf35dd095');
<?php

return ['dependencies' => ['jquery', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-html-entities', 'wp-i18n'], 'version' => '3b288ad3e9baf35dd095'];
4 changes: 3 additions & 1 deletion assets/js/blocks/wc-payplug-satispay-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => 'ca274d257dfb395e5f5b');
<?php

return ['dependencies' => ['react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'], 'version' => 'ca274d257dfb395e5f5b'];
4 changes: 3 additions & 1 deletion blocks/js/frontend/blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '90bb9677e0e35fd0ffce');
<?php

return ['dependencies' => ['wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'], 'version' => '90bb9677e0e35fd0ffce'];
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "payplug/payplug-woocommerce",
"description": "",
"version": "2.15.0",
"license": "GPL-3.0-or-later",
"type": "wordpress-plugin",
"keywords": ["payplug", "woocommerce", "gateway"],
Expand All @@ -17,7 +18,8 @@
"require": {
"php": ">=5.6.0",
"composer/installers": "^1.9",
"payplug/payplug-php": "^3.7.1"
"payplug/payplug-php": "^4.0.0",
"friendsofphp/php-cs-fixer": "^3.4"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "3.*",
Expand Down
Loading