Skip to content

Commit

Permalink
Apply php-cs-fixer/rector rules
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Mar 18, 2024
1 parent ef4cdb6 commit bf0afaf
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 78 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,3 @@ jobs:
if: ${{ always() && steps.install.conclusion == 'success' }}
run: |
composer ci:test:php:rector
- id: tests_unit
name: Unit Tests
if: ${{ always() && steps.install.conclusion == 'success' }}
run: |
composer ci:test:php:unit
27 changes: 0 additions & 27 deletions .github/workflows/phpcs.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/phpstan.yml

This file was deleted.

5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@composer require magicsunday/webtrees-module-base:^1.0",
"### Copy base module to vendor directory",
"mkdir -p webtrees-descendants-chart/vendor/magicsunday",
"cp -r vendor/magicsunday/webtrees-module-base webtrees-descendants-chart/vendor/magicsunday/webtrees-module-base",
"cp -r .build/vendor/magicsunday/webtrees-module-base webtrees-descendants-chart/vendor/magicsunday/webtrees-module-base",
"### Remove all not required files from archive",
"rm -rf webtrees-descendants-chart/.github",
"rm -rf webtrees-descendants-chart/resources/js/modules",
Expand Down Expand Up @@ -94,8 +94,7 @@
"ci:test": [
"@ci:test:php:lint",
"@ci:test:php:phpstan",
"@ci:test:php:rector",
"@ci:test:php:unit"
"@ci:test:php:rector"
],
"module:check": [
"@ci:test"
Expand Down
6 changes: 1 addition & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
parameters:
ignoreErrors:
-
message: "#^Call to an undefined method Fisharebest\\\\Webtrees\\\\Module\\\\ModuleCustomInterface\\:\\:assetUrl\\(\\)\\.$#"
count: 1
path: src/Processor/ImageProcessor.php
ignoreErrors: []
13 changes: 7 additions & 6 deletions src/Facade/DataFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,13 @@ private function sortChildrenByBirthdate(RecursiveIteratorIterator $recursiveIte
&& $nodeData->getData()->getIndividual()->getBirthDate()->isOK()
)
) {
$item->setChildren(
$childrenCollection
->sort($this->birthDateComparator())
->values()
->toArray()
);
/** @var Node[] $children */
$children = $childrenCollection
->sort($this->birthDateComparator())
->values()
->toArray();

$item->setChildren($children);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/Traits/ModuleCustomTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public function customModuleLatestVersionUrl(): string
return self::CUSTOM_LATEST_VERSION;
}

// protected function extractVersion(string $content): string
// {
// return json_decode($content, true)['tag_name'] ?? '';
// }
// protected function extractVersion(string $content): string
// {
// return json_decode($content, true)['tag_name'] ?? '';
// }

public function customModuleLatestVersion(): string
{
Expand Down

0 comments on commit bf0afaf

Please sign in to comment.