This is an automated email from the ASF dual-hosted git repository.

junichi11 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new e941825dec Fix the problem that inccorect indentation is added after 
an attribute(e.g. `#[Attr(1, 2)]`)
     new cf2cfda11d Merge pull request #6940 from 
junichi11/php-attribute-new-line-indent
e941825dec is described below

commit e941825dec55682523b248763a0b3eb95e6a39cd
Author: Junichi Yamamoto <junich...@apache.org>
AuthorDate: Wed Jan 10 15:25:42 2024 +0900

    Fix the problem that inccorect indentation is added after an attribute(e.g. 
`#[Attr(1, 2)]`)
    
    Example:
    ```php
     #[Attr1(1, 2)]
     #[Attr2("test", "test")]^ // type enter key here
     class AttributedClass {
    
         #[Attr1(1, 2)]
         #[Attr2("test", "test")]^ // type enter key here
         public function method(): void {
         }
     }
    ```
    
    Before:
    ```php
     #[Attr1(1, 2)]
     #[Attr2("test", "test")]
             ^// incorrect indent
     class AttributedClass {
    
         #[Attr1(1, 2)]
         #[Attr2("test", "test")]
                 ^// incorrect indent
         public function method(): void {
         }
     }
    ```
    
    After:
    ```php
     #[Attr1(1, 2)]
     #[Attr2("test", "test")]
     ^// correct indent
     class AttributedClass {
    
         #[Attr1(1, 2)]
         #[Attr2("test", "test")]
         ^// correct indent
         public function method(): void {
         }
     }
    ```
---
 .../php/editor/indent/IndentationCounter.java      |  5 ++--
 .../testfiles/indent/php80/attributeSyntax_09.php  | 21 ++++++++++++++
 .../indent/php80/attributeSyntax_09.php.indented   | 22 +++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_10.php  | 21 ++++++++++++++
 .../indent/php80/attributeSyntax_10.php.indented   | 22 +++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_11.php  | 21 ++++++++++++++
 .../indent/php80/attributeSyntax_11.php.indented   | 22 +++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_12.php  | 21 ++++++++++++++
 .../indent/php80/attributeSyntax_12.php.indented   | 22 +++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_13.php  | 21 ++++++++++++++
 .../indent/php80/attributeSyntax_13.php.indented   | 22 +++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_14.php  | 22 +++++++++++++++
 .../indent/php80/attributeSyntax_14.php.indented   | 23 ++++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_15.php  | 25 +++++++++++++++++
 .../indent/php80/attributeSyntax_15.php.indented   | 26 ++++++++++++++++++
 .../testfiles/indent/php80/attributeSyntax_16.php  | 29 ++++++++++++++++++++
 .../indent/php80/attributeSyntax_16.php.indented   | 30 ++++++++++++++++++++
 .../php/editor/indent/PHPNewLineIndenterTest.java  | 32 ++++++++++++++++++++++
 18 files changed, 405 insertions(+), 2 deletions(-)

diff --git 
a/php/php.editor/src/org/netbeans/modules/php/editor/indent/IndentationCounter.java
 
b/php/php.editor/src/org/netbeans/modules/php/editor/indent/IndentationCounter.java
index 2b11dea818..18295da010 100644
--- 
a/php/php.editor/src/org/netbeans/modules/php/editor/indent/IndentationCounter.java
+++ 
b/php/php.editor/src/org/netbeans/modules/php/editor/indent/IndentationCounter.java
@@ -766,8 +766,9 @@ public class IndentationCounter {
             }
         }
         if (result) {
-            // check whether there is tokens other than whitespace for 
parameters, anonymous function/class
-            int lineStart = LineDocumentUtils.getLineStart(doc, 
LineDocumentUtils.getLineStart(doc, ts.offset()) - 1);
+            // check for non-whitespace tokens before an attribute of 
parameters, anonymous function/class
+            // not `ts.offset() - 1` but `ts.offset()` to avoid getting the 
start position of the previous line
+            int lineStart = LineDocumentUtils.getLineStart(doc, 
LineDocumentUtils.getLineStart(doc, ts.offset()));
             while (ts.movePrevious() && ts.offset() >= lineStart) {
                 if (ts.token().id() != PHPTokenId.WHITESPACE) {
                     result = false;
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_09.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_09.php
new file mode 100644
index 0000000000..e6899db128
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_09.php
@@ -0,0 +1,21 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$closure = function(#[Attr(1, 2)]^ $param) {};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_09.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_09.php.indented
new file mode 100644
index 0000000000..05ab082658
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_09.php.indented
@@ -0,0 +1,22 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$closure = function(#[Attr(1, 2)]
+        ^$param) {};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_10.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_10.php
new file mode 100644
index 0000000000..f740bcf911
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_10.php
@@ -0,0 +1,21 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$closure = function(#[Attr]^ $param) {};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_10.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_10.php.indented
new file mode 100644
index 0000000000..28a5714e4c
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_10.php.indented
@@ -0,0 +1,22 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$closure = function(#[Attr]
+        ^$param) {};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_11.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_11.php
new file mode 100644
index 0000000000..243eb64f19
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_11.php
@@ -0,0 +1,21 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$closure = #[Attr]^ function(#[Attr] $param) {};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_11.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_11.php.indented
new file mode 100644
index 0000000000..f9b7154757
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_11.php.indented
@@ -0,0 +1,22 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$closure = #[Attr]
+        ^function(#[Attr] $param) {};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_12.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_12.php
new file mode 100644
index 0000000000..ae56d5a856
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_12.php
@@ -0,0 +1,21 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$arrow = #[Attr]^ fn(#[Attr] $param) => 1;
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_12.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_12.php.indented
new file mode 100644
index 0000000000..1f3d286512
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_12.php.indented
@@ -0,0 +1,22 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$arrow = #[Attr]
+        ^fn(#[Attr] $param) => 1;
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_13.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_13.php
new file mode 100644
index 0000000000..c9f42f4f1d
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_13.php
@@ -0,0 +1,21 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$arrow = #[Attr] fn(#[Attr]^ $param) => 1;
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_13.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_13.php.indented
new file mode 100644
index 0000000000..0dd4dd5146
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_13.php.indented
@@ -0,0 +1,22 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$arrow = #[Attr] fn(#[Attr]
+        ^$param) => 1;
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_14.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_14.php
new file mode 100644
index 0000000000..87be099c31
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_14.php
@@ -0,0 +1,22 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$anon = new #[Attr(1, 2)]^ class () {
+};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_14.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_14.php.indented
new file mode 100644
index 0000000000..e3fce1a371
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_14.php.indented
@@ -0,0 +1,23 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$anon = new #[Attr(1, 2)]
+        ^class () {
+};
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_15.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_15.php
new file mode 100644
index 0000000000..86400eaf62
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_15.php
@@ -0,0 +1,25 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#[Attr1(1, 2)]
+#[Attr2("test", "test")]^
+class AttributedClass {
+    
+}
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_15.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_15.php.indented
new file mode 100644
index 0000000000..07253801b4
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_15.php.indented
@@ -0,0 +1,26 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#[Attr1(1, 2)]
+#[Attr2("test", "test")]
+^
+class AttributedClass {
+    
+}
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_16.php 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_16.php
new file mode 100644
index 0000000000..9192337a3c
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_16.php
@@ -0,0 +1,29 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#[Attr1(1, 2)]
+#[Attr2("test", "test")]
+class AttributedClass {
+
+    #[Attr1(1, 2)]
+    #[Attr2("test", "test")]^
+    public function method(): void {
+    }
+}
diff --git 
a/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_16.php.indented
 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_16.php.indented
new file mode 100644
index 0000000000..e821b59def
--- /dev/null
+++ 
b/php/php.editor/test/unit/data/testfiles/indent/php80/attributeSyntax_16.php.indented
@@ -0,0 +1,30 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#[Attr1(1, 2)]
+#[Attr2("test", "test")]
+class AttributedClass {
+
+    #[Attr1(1, 2)]
+    #[Attr2("test", "test")]
+    ^
+    public function method(): void {
+    }
+}
diff --git 
a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPNewLineIndenterTest.java
 
b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPNewLineIndenterTest.java
index 34d6cbfdf8..561091216b 100644
--- 
a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPNewLineIndenterTest.java
+++ 
b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPNewLineIndenterTest.java
@@ -1178,6 +1178,38 @@ public class PHPNewLineIndenterTest extends PHPTestBase {
         testIndentInFile("testfiles/indent/php80/attributeSyntax_08.php");
     }
 
+    public void testAttributeSyntax_09() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_09.php");
+    }
+
+    public void testAttributeSyntax_10() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_10.php");
+    }
+
+    public void testAttributeSyntax_11() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_11.php");
+    }
+
+    public void testAttributeSyntax_12() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_12.php");
+    }
+
+    public void testAttributeSyntax_13() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_13.php");
+    }
+
+    public void testAttributeSyntax_14() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_14.php");
+    }
+
+    public void testAttributeSyntax_15() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_15.php");
+    }
+
+    public void testAttributeSyntax_16() throws Exception {
+        testIndentInFile("testfiles/indent/php80/attributeSyntax_16.php");
+    }
+
     public void testConstructorPropertyPromotion_01() throws Exception {
         
testIndentInFile("testfiles/indent/php80/constructorPropertyPromotion_01.php");
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to