File tree 3 files changed +54
-1
lines changed
3 files changed +54
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Magento 2 PHPStan
2
+ on : [push]
3
+
4
+ jobs :
5
+ phpstan :
6
+ name : PHPStan
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Setup PHP
10
+ uses : shivammathur/setup-php@v2
11
+ with :
12
+ php-version : ' 7.4'
13
+ env :
14
+ COMPOSER_AUTH_JSON : |
15
+ {
16
+ "http-basic": {
17
+ "repo.magento.com": {
18
+ "username": "${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}",
19
+ "password": "${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}"
20
+ }
21
+ }
22
+ }
23
+ - uses : actions/checkout@v4
24
+ - name : Create composer project
25
+ run : composer create-project --no-install --no-interaction --no-plugins --repository-url=https://repo-magento-mirror.fooman.co.nz/ magento/project-community-edition:2.4.5-p8 /home/runner/work/magento
26
+ - name : Add composer plugins
27
+ working-directory : /home/runner/work/magento
28
+ run : composer config --no-plugins allow-plugins true
29
+ - name : Add module to composer
30
+ working-directory : /home/runner/work/magento
31
+ run : composer require multisafepay/magento2-core --no-update --no-interaction
32
+ - name : Install composer dependencies
33
+ working-directory : /home/runner/work/magento
34
+ run : composer install --no-interaction
35
+ - name : Move repository content
36
+ run : cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/vendor/multisafepay/magento2-core
37
+ - name : Run PHPStan
38
+ working-directory : /home/runner/work/magento
39
+ run : vendor/bin/phpstan analyse -c vendor/multisafepay/magento2-core/phpstan.neon --error-format github
Original file line number Diff line number Diff line change @@ -585,7 +585,7 @@ public function canSale(): bool
585
585
/**
586
586
* @inheritdoc
587
587
*/
588
- public function sale (InfoInterface $ payment , float $ amount ): ? ResultInterface
588
+ public function sale (InfoInterface $ payment , float $ amount )
589
589
{
590
590
$ this ->executeCommand (
591
591
'sale ' ,
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ level : 0
3
+ errorFormat : github
4
+ paths :
5
+ - .
6
+ excludePaths :
7
+ - etc
8
+ - Test
9
+ - view
10
+ - Model/Api/Builder/OrderRequestBuilder/ShoppingCartBuilder/CustomTotalBuilder.php
11
+ - Util/ThirdPartyPluginsUtil.php
12
+ ignoreErrors :
13
+ - ' #Parameter \$\w+ of method [a-zA-Z0-9\\_ ]+::__construct\ (\ ) has invalid type .*Factory.* #'
14
+ - ' #Method [a-zA-Z0-9\\_ ]+::getExtensionAttributes\ (\ ) has invalid return type .*OrderPaymentExtension.* #'
You can’t perform that action at this time.
0 commit comments