Skip to content

Commit 18872bf

Browse files
[QA] Add StructArmed to QA (#482)
* [QA] Add StructArmed to QA * [rector] Rector fixes --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent fb71542 commit 18872bf

5 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/code_analysis.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
name: 'PHPStan'
3737
run: vendor/bin/phpstan
3838

39+
-
40+
name: 'Run StructArmed'
41+
run: vendor/bin/structarmed analyze
42+
3943
name: ${{ matrix.actions.name }}
4044
runs-on: ubuntu-latest
4145
timeout-minutes: 5

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"symfony/yaml": "^7.4|8.0.*"
99
},
1010
"require-dev": {
11+
"boundwize/structarmed": "^0.7.12",
1112
"doctrine/doctrine-bundle": "^2.18|^3.0",
1213
"doctrine/orm": "^2.20|^3.0",
1314
"phpecs/phpecs": "^2.2",

rules/TypedCollections/Rector/ClassMethod/RemoveNewArrayCollectionOutsideConstructorRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public function refactor(Node $node): ?ClassMethod
101101
continue;
102102
}
103103

104-
/** @var Assign $assign */
105104
$assign = $stmt->expr;
106105

107106
// we only care about initialization

src/Set/DoctrineSetList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ final class DoctrineSetList
9191

9292
public const string GEDMO_ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../config/sets/attributes/gedmo.php';
9393

94-
public const string MONGODB__ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../config/sets/attributes/mongodb.php';
94+
public const string MONGODB_ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../config/sets/attributes/mongodb.php';
9595
}

structarmed.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Boundwize\StructArmed\Architecture;
6+
use Boundwize\StructArmed\Preset\Preset;
7+
8+
return Architecture::define()
9+
->withPresets(Preset::PSR1(), Preset::PSR4());

0 commit comments

Comments
 (0)