Closed (fixed)
Project:
Decoupled JSON Log
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2026 at 12:42 UTC
Updated:
15 Jul 2026 at 12:55 UTC
Jump to comment: Most recent
2) web/modules/orig/decoupled_json_log/tests/src/Kernel/LogJsonPayloadSizeTest.php:141
---------- begin diff ----------
@@ Line 141 @@
* @return bool
* TRUE if a matching message was logged.
*/
- private function loggedWarning(): bool {
- foreach ($this->logger->messages as $message) {
- if (str_contains($message, 'Rejected oversized')) {
- return TRUE;
- }
- }
- return FALSE;
+ private function loggedWarning(): bool
+ {
+ return array_any($this->logger->messages, fn(string $message): bool => str_contains($message, 'Rejected oversized'));
}
/**
----------- end diff -----------
Applied rules:
* ProtectedStaticModulesPropertyRector
* ForeachToArrayAnyRector
* AddArrowFunctionReturnTypeRector
* AddArrayAnyAllClosureParamTypeRector
3) web/modules/orig/decoupled_json_log/tests/src/Unit/LogJsonAccessControlHandlerTest.php:45
---------- begin diff ----------
@@ Line 45 @@
* Builds a handler instance without invoking the parent constructor.
*/
private function makeHandler(): LogJsonAccessControlHandler {
- return (new \ReflectionClass(LogJsonAccessControlHandler::class))
+ return new \ReflectionClass(LogJsonAccessControlHandler::class)
->newInstanceWithoutConstructor();
}
@@ Line 68 @@
private function invokeCheckAccess(string $operation, AccountInterface $account): AccessResultInterface {
$handler = $this->makeHandler();
$entity = $this->createMock(EntityInterface::class);
- $result = (new \ReflectionMethod($handler, 'checkAccess'))
+ $result = new \ReflectionMethod($handler, 'checkAccess')
->invoke($handler, $entity, $operation, $account);
assert($result instanceof AccessResultInterface);
return $result;
@@ Line 79 @@
*/
private function invokeCheckCreateAccess(AccountInterface $account): AccessResultInterface {
$handler = $this->makeHandler();
- $result = (new \ReflectionMethod($handler, 'checkCreateAccess'))
+ $result = new \ReflectionMethod($handler, 'checkCreateAccess')
->invoke($handler, $account, [], NULL);
assert($result instanceof AccessResultInterface);
return $result;
----------- end diff -----------
Applied rules:
* NewMethodCallWithoutParenthesesRector
4) web/modules/orig/decoupled_json_log/tests/src/Unit/Routing/DecoupledJsonLogLimitingRouteSubscriberTest.php:41
---------- begin diff ----------
@@ Line 41 @@
*/
private function alterRoutes(RouteCollection $collection): void {
$subscriber = new DecoupledJsonLogLimitingRouteSubscriber();
- (new \ReflectionMethod($subscriber, 'alterRoutes'))->invoke($subscriber, $collection);
+ new \ReflectionMethod($subscriber, 'alterRoutes')->invoke($subscriber, $collection);
}
/**
----------- end diff -----------
Applied rules:
* NewMethodCallWithoutParenthesesRector
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ptmkenny commentedComment #4
ptmkenny commentedComment #6
ptmkenny commented