PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: sid88in/serverless-appsync-plugin (ts)

Issue:
Error when referenceing Cognito User Pool client Id with `!Ref`
Error when referenceing Cognito User Pool client Id with `!Ref`

```
Error:
Invalid AppSync Configuration:
     at appSync/authentication/config/appIdClientRegex: must be string
```

Pull request:
fix(validation): Cognito auth validation
Fixes #509 

Patch:
diff --git a/src/types/plugin.ts b/src/types/plugin.ts
index bb4132c..2865430 100644
--- a/src/types/plugin.ts
+++ b/src/types/plugin.ts
@@ -104,7 +104,7 @@ export type CognitoAuth = {
     userPoolId: string | IntrinsicFunction;
     awsRegion?: string | IntrinsicFunction;
     defaultAction?: 'ALLOW' | 'DENY';
-    appIdClientRegex?: string;
+    appIdClientRegex?: string | IntrinsicFunction;
   };
 };
 
diff --git a/src/validation.ts b/src/validation.ts
index 45b2cd7..54e54bb 100644
--- a/src/validation.ts
+++ b/src/validation.ts
@@ -107,7 +107,7 @@ export const appSyncSchema = {
           enum: ['ALLOW', 'DENY'],
           errorMessage: 'must be "ALLOW" or "DENY"',
         },
-        appIdClientRegex: { type: 'string' },
+        appIdClientRegex: { $ref: '#/definitions/stringOrIntrinsicFunction' },
       },
       required: ['userPoolId'],
     },


Test patch:
diff --git a/src/__tests__/validation/__snapshots__/auth.test.ts.snap b/src/__tests__/validation/__snapshots__/auth.test.ts.snap
index 0b9bd1a..5912f9c 100644
--- a/src/__tests__/validation/__snapshots__/auth.test.ts.snap
+++ b/src/__tests__/validation/__snapshots__/auth.test.ts.snap
@@ -8,7 +8,7 @@ exports[`Valdiation Invalid should validate a Cognito with invalid userPoolId 1`
 "/authentication/config/userPoolId: must be a string or a CloudFormation intrinsic function
 /authentication/config/awsRegion: must be a string or a CloudFormation intrinsic function
 /authentication/config/defaultAction: must be \\"ALLOW\\" or \\"DENY\\"
-/authentication/config/appIdClientRegex: must be string"
+/authentication/config/appIdClientRegex: must be a string or a CloudFormation intrinsic function"
 `;
 
 exports[`Valdiation Invalid should validate a Lambda with empty config 1`] = `"/authentication/config: must specify functionName, functionArn or function (all exclusives)"`;
diff --git a/src/__tests__/validation/auth.test.ts b/src/__tests__/validation/auth.test.ts
index e245c3d..1360951 100644
--- a/src/__tests__/validation/auth.test.ts
+++ b/src/__tests__/validation/auth.test.ts
@@ -39,6 +39,9 @@ describe('Valdiation', () => {
               userPoolId: {
                 Ref: 'CognitoUserPool',
               },
+              appIdClientRegex: {
+                Ref: 'CognitoUserPoolClient',
+              },
             },
           },
         } as AppSyncConfigInput,
Repository: FriendsOfPHP/PHP-CS-Fixer (php)

Issue:
`single_space_after_construct` adds extra space after comment
## Bug report

### Code snippet that reproduces the problem

```diff
    1) data/src/Persistence/Sql/Query.php (single_space_after_construct)
      ---------- begin diff ----------
--- /__w/data/data/src/Persistence/Sql/Query.php
+++ /__w/data/data/src/Persistence/Sql/Query.php
@@ -816,7 +816,7 @@
         $ret = [];
 
         if ($this->args['set']) {
-            foreach ($this->args['set'] as [$field/*, $value*/]) {
+            foreach ($this->args['set'] as [$field/*, $value*/ ]) {
                 $field = $this->consume($field, self::ESCAPE_IDENTIFIER);
 
                 $ret[] = $field;

      ----------- end diff -----------
```

no space should be added around comments as this complicates debugging and it the case above it is even wrong

Pull request:
SingleSpaceAfterConstruct - handle before destructuring close brace
Fixer 'single_space_after_construct' should not insert whitespace after those comments that before destructuring square brace close tag

closes #6110 



Patch:
diff --git a/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php b/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
index f9ab014d7..cf2518aa2 100644
--- a/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
+++ b/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
@@ -219,7 +219,7 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
 
             $whitespaceTokenIndex = $index + 1;
 
-            if ($tokens[$whitespaceTokenIndex]->equalsAny([',', ';', ')', [CT::T_ARRAY_SQUARE_BRACE_CLOSE]])) {
+            if ($tokens[$whitespaceTokenIndex]->equalsAny([',', ';', ')', [CT::T_ARRAY_SQUARE_BRACE_CLOSE], [CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE]])) {
                 continue;
             }
 


Test patch:
diff --git a/tests/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixerTest.php b/tests/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixerTest.php
index eef27434f..20b6df2fc 100644
--- a/tests/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixerTest.php
+++ b/tests/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixerTest.php
@@ -2923,6 +2923,13 @@ public function provideCommentsCases(): \Generator
 foo(/* c */);
 foo($a /* d */, $b);
 $arr = [/* empty */];
+',
+        ];
+
+        yield 'before_destructuring_square_brace_close' => [
+            '<?php
+foreach ($fields as [$field/** @var string*/]) {
+}
 ',
         ];
     }