Skip to content

Commit 6b19b00

Browse files
committed
StaticAccess
1 parent b160bf7 commit 6b19b00

File tree

15 files changed

+4
-48
lines changed

15 files changed

+4
-48
lines changed

config/PHPMD/rules.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,6 @@
88

99
<!-- rules from the "clean code" rule set -->
1010
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag"/>
11-
<rule ref="rulesets/cleancode.xml/StaticAccess">
12-
<properties>
13-
<property name="exceptions" value="
14-
\Doctrine\ORM\EntityManager,
15-
\Doctrine\ORM\Tools\Setup,
16-
\FOS\RestBundle\View\View,
17-
\PhpList\Core\Core\Bootstrap,
18-
\PhpList\Core\Core\Environment,
19-
\PHPUnit\DbUnit\Operation\Factory,
20-
\Symfony\Component\Debug\Debug,
21-
\Symfony\Component\Yaml\Yaml,
22-
\League\Csv\Reader,
23-
"/>
24-
</properties>
25-
</rule>
26-
2711
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>
2812
<rule ref="rulesets/codesize.xml/NPathComplexity"/>
2913
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>

src/Core/Bootstrap.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ private function assertConfigureHasBeenCalled(): void
168168
/**
169169
* Dispatches the current HTTP request (if there is any).
170170
*
171-
* @SuppressWarnings("PHPMD.StaticAccess")
172-
*
173171
* @return null
174172
*
175173
* @throws RuntimeException if configure has not been called before

src/Domain/Common/SystemInfoCollector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public function __construct(RequestStack $requestStack, array $configuredKeys =
2424

2525
/**
2626
* Return key=>value pairs (already sanitized for safe logging/HTML display).
27-
* @SuppressWarnings(PHPMD.StaticAccess)
2827
* @return array<string,string>
2928
*/
3029
public function collect(): array

src/Domain/Configuration/Service/Provider/ConfigProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public function __construct(
2424
}
2525

2626
/**
27-
* @SuppressWarnings(PHPMD.StaticAccess)
2827
* @throws InvalidArgumentException
2928
*/
3029
public function isEnabled(ConfigOption $key): bool
@@ -43,7 +42,6 @@ public function isEnabled(ConfigOption $key): bool
4342

4443
/**
4544
* Get configuration value by its key, from settings or default configs or default value (if provided)
46-
* @SuppressWarnings(PHPMD.StaticAccess)
4745
* @throws InvalidArgumentException
4846
*/
4947
public function getValue(ConfigOption $key): ?string
@@ -65,7 +63,6 @@ public function getValue(ConfigOption $key): ?string
6563
return $this->defaultConfigs->has($key->value) ? $this->defaultConfigs->get($key->value)['value'] : null;
6664
}
6765

68-
/** @SuppressWarnings(PHPMD.StaticAccess) */
6966
public function getValueWithNamespace(ConfigOption $key): ?string
7067
{
7168
$full = $this->getValue($key);

src/Domain/Configuration/Service/Provider/DefaultConfigProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Symfony\Contracts\Translation\TranslatorInterface;
88

99
// phpcs:disable Generic.Files.LineLength
10-
/** @SuppressWarnings(PHPMD.StaticAccess) */
1110
class DefaultConfigProvider
1211
{
1312
/**

src/Domain/Identity/Command/ImportDefaultsCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8787

8888
/**
8989
* @return array<string,bool>
90-
* @SuppressWarnings(PHPMD.StaticAccess)
9190
*/
9291
private function allPrivilegesGranted(): array
9392
{

src/Domain/Identity/Model/Administrator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ public function setPrivileges(Privileges $privileges): self
167167

168168
/**
169169
* @throws InvalidArgumentException
170-
*
171-
* @SuppressWarnings(PHPMD.StaticAccess)
172170
*/
173171
public function setPrivilegesFromArray(array $privilegesData): void
174172
{
@@ -183,7 +181,6 @@ public function setPrivilegesFromArray(array $privilegesData): void
183181
$this->setPrivileges($privileges);
184182
}
185183

186-
/** @SuppressWarnings(PHPMD.StaticAccess) */
187184
public function getPrivileges(): Privileges
188185
{
189186
return Privileges::fromSerialized($this->privileges);

src/Domain/Identity/Model/Privileges.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ class Privileges
1414
*/
1515
private array $flags = [];
1616

17-
/**
18-
* @SuppressWarnings(PHPMD.StaticAccess)
19-
*/
2017
public function __construct(?array $flags = [])
2118
{
2219
foreach (PrivilegeFlag::cases() as $flag) {

src/Domain/Messaging/MessageHandler/CampaignProcessorMessageHandler.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
/**
2929
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
30-
* @SuppressWarnings(PHPMD.StaticAccess)
3130
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
3231
*/
3332
#[AsMessageHandler]

src/Domain/Messaging/Model/Message/MessageMetadata.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ public function __construct(
4949
$this->sendStart = $sendStart;
5050
}
5151

52-
/**
53-
* @SuppressWarnings("PHPMD.StaticAccess")
54-
*/
5552
public function getStatus(): ?MessageStatus
5653
{
5754
return MessageStatus::from($this->status);

0 commit comments

Comments
 (0)