[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17281471#comment-17281471 ] Junichi Yamamoto commented on NETBEANS-3391: [~Kacer] I'll add the required options for PSR-12. It's duplicate. > Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 12.0, 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. (PRS-12:[ > https://www.php-fig.org/psr/psr-12/)|https://www.php-fig.org/psr/psr-12/] > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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
[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17281289#comment-17281289 ] Tomáš Procházka commented on NETBEANS-3391: --- [~lobzek] I created NETBEANS-5342 related to parameter wrapping. [~junichi11] This issue is just about formatting {{foreach}} or do you plan implement all other PSR-12 rules? I'm asking to be sure that NETBEANS-5342 is not duplicate to this issue. > Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 12.0, 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. (PRS-12:[ > https://www.php-fig.org/psr/psr-12/)|https://www.php-fig.org/psr/psr-12/] > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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
[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195185#comment-17195185 ] Johannes commented on NETBEANS-3391: Hi! There is a - currently open - issue on the PHP CodeSniffer repo that tries to clarify mulitiline foreach-statements, since they are not mentioned in the standard. [https://github.com/squizlabs/PHP_CodeSniffer/issues/3047] > Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 12.0, 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. (PRS-12:[ > https://www.php-fig.org/psr/psr-12/)|https://www.php-fig.org/psr/psr-12/] > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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
[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17162751#comment-17162751 ] Junichi Yamamoto commented on NETBEANS-3391: [~Bohninger] foreach part is the following: {quote}5.5 foreach A foreach statement looks like the following. Note the placement of parentheses, spaces, and braces. {code:php} $value) { // foreach body }{code} {quote} So this? or my misunderstanding? {code:php} Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 12.0, 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. (PRS-12:[ > https://www.php-fig.org/psr/psr-12/)|https://www.php-fig.org/psr/psr-12/] > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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
[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17162735#comment-17162735 ] Lobzek commented on NETBEANS-3391: -- Same for methods and functions declaration. [https://www.php-fig.org/psr/psr-12/#45-method-and-function-arguments] It's impossible to make NetBeans format such code correctly: {code:php} class ReturnTypeVariations { public function functionName(int $arg1, $arg2): string { return 'foo'; } public function anotherFunction( string $foo, string $bar, int $baz ): string { return 'foo'; } } {code} > Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. (PRS-12:[ > https://www.php-fig.org/psr/psr-12/)|https://www.php-fig.org/psr/psr-12/] > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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
[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976137#comment-16976137 ] Los Vitaly commented on NETBEANS-3391: -- [https://www.php-fig.org/psr/psr-12/#5-control-structures] I think reporter is right. > Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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
[jira] [Commented] (NETBEANS-3391) Support PSR-12 valid formatting rules
[ https://issues.apache.org/jira/browse/NETBEANS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974629#comment-16974629 ] Junichi Yamamoto commented on NETBEANS-3391: Where is the documentation of the PSR-12? Please write a documentation link of PSR-12. > Support PSR-12 valid formatting rules > - > > Key: NETBEANS-3391 > URL: https://issues.apache.org/jira/browse/NETBEANS-3391 > Project: NetBeans > Issue Type: Improvement > Components: php - Formatting & Indentation >Affects Versions: 11.1, 11.2 >Reporter: Johannes >Assignee: Junichi Yamamoto >Priority: Trivial > > Please add options to allow for PSR-12 valid formatting. > Currently there is no way to get netbeans accept the following code format: > > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > Formatting the code removes the required indent: > {code:php} > $array = ['a','b','c']; > foreach( > array_filter($array, function ($a) { > return $a === 'b'; > }) as $data > ) { > //code > } > {code} > PSR-12 Rules: > - PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine > - PSR12.ControlStructures.ControlStructureSpacing.LineIndent -- This message was sent by Atlassian Jira (v8.3.4#803005) - 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