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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/phpcompatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: PHPCompatibility
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 7.0-8-0
run: docker run --rm -v $PWD:/code domw/phpcompatibility:8.0-cli phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0-8.0 --colors --warning-severity=0 --report=full,summary --extensions=php,phtml ./
10 changes: 10 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: M2 Coding Standard
on: [push, pull_request]

jobs:
static:
name: M2 Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extdn/github-actions-m2/magento-coding-standard@master
9 changes: 9 additions & 0 deletions .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: php-cs-fixer
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: PHP CS Fixer
run: docker run --rm -v $PWD:/code domw/php-cs-fixer php-cs-fixer fix --dry-run --diff --stop-on-violation --allow-risky=yes ./
12 changes: 12 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: M2 PHPStan
on: [push, pull_request]

jobs:
phpstan:
name: M2 PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extdn/github-actions-m2/magento-phpstan@master
with:
composer_name: reviewscouk/reviews
43 changes: 43 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/**
* PHP Coding Standards fixer configuration
*/

$finder = PhpCsFixer\Finder::create()
->in('Block')
->in('Controller')
->in('Helper')
->in('Model')
->in('Observer')
->in('view')
->name('*.phtml');

$config = new PhpCsFixer\Config();
$config->setFinder($finder)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'include' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
]);
return $config;