Skip to content
Merged
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
7 changes: 2 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.php]
[*.{php,xml}]
indent_size = 4

[*.{diff,md}]
[*.md]
trim_trailing_whitespace = false

[Jenkinsfile]
indent_size = 4
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache dependencies
uses: actions/cache@v4
Expand Down
20 changes: 10 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
vendor/
node_modules/
/vendor/
/node_modules/

# misc
.DS_Store
.env
.idea/
.php-cs-fixer.cache
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.idea/
pnpm-debug.log*
pnpm-error.log*
*.swp

# dependency lock file
composer.lock
# testing/tooling output
.php-cs-fixer.cache
.phpunit.cache
.phpunit.result.cache
/build/

# overrides for local tooling
phpstan.neon
phpstan-baseline.neon
phpunit.xml

14 changes: 11 additions & 3 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$finder = (new Finder())
->in(__DIR__);
->in(__DIR__)
->append([__FILE__]);

return (new Config())
->setParallelConfig(ParallelConfigFactory::detect(null, null, 2**18-1))
->setParallelConfig(ParallelConfigFactory::detect(null, null, 2 ** 18 - 1))
->setRules([
'@PhpCsFixer' => true,
'@PHP8x2Migration' => true,
'@PHP8x2Migration' => true,
'indentation_type' => true,

// Overrides for (opinionated) @PhpCsFixer and @Symfony rules:
Expand All @@ -22,6 +23,9 @@
// Subset of statements that should be proceeded with blank line
'blank_line_before_statement' => ['statements' => ['case', 'continue', 'declare', 'default', 'return', 'throw', 'try', 'yield', 'yield_from']],

// Allow class list for multiple extends/implements to span multiple lines
'class_definition' => ['multi_line_extends_each_single_line' => true],

// Enforce space around concatenation operator
'concat_space' => ['spacing' => 'one'],

Expand All @@ -41,6 +45,10 @@
// (it would be nice to enforce more, but we'll start simple)
'ordered_class_elements' => ['order' => ['use_trait']],

// Default is to convert @property-[read|write] to @property,
// which loses information in some of our data object documentation
'phpdoc_no_alias_tag' => ['replacements' => ['type' => 'var', 'link' => 'see']],

// Ensure that param and return types are sorted consistently, with null at end
'phpdoc_types_order' => ['sort_algorithm' => 'alpha', 'null_adjustment' => 'always_last'],

Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/composer.lock
/pnpm-lock.yaml
/.pnpm-store
39 changes: 0 additions & 39 deletions Jenkinsfile

This file was deleted.

16 changes: 8 additions & 8 deletions Promo/admin/components/Order/search-promotion-fields.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" standalone="no"?>
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE swatml SYSTEM "http://swat.silverorange.com/swatml1.dtd">
<swatml>
<widget class="SwatFieldset" id="promotion_fields">
<property name="title" translatable="yes">Promotions</property>
<widget class="SwatFormField" id="promotion_code">
<property name="title" translatable="yes">Promotion Code</property>
<widget class="SwatEntry" id="search_promotion_code" />
</widget>
</widget>
<widget class="SwatFieldset" id="promotion_fields">
<property name="title" translatable="yes">Promotions</property>
<widget class="SwatFormField" id="promotion_code">
<property name="title" translatable="yes">Promotion Code</property>
<widget class="SwatEntry" id="search_promotion_code" />
</widget>
</widget>
</swatml>
2 changes: 1 addition & 1 deletion Promo/admin/components/Promotion/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ protected function getTableModel(SwatView $view): ?SwatTableModel
$date->addMonths(1);
} while ($date->before($this->end_date));

// totl row
// total row
$total = new SwatDetailsStore();

$total->date = null;
Expand Down
Loading
Loading