File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -636,8 +636,11 @@ might be to handle switch and goto labels differently."
636636(defun php-lineup-cascaded-calls (langelem )
637637 " Line up chained methods using `c-lineup-cascaded-calls' ,
638638but only if the setting is enabled"
639- (when php-mode-lineup-cascaded-calls
640- (c-lineup-cascaded-calls langelem)))
639+ (if php-mode-lineup-cascaded-calls
640+ (c-lineup-cascaded-calls langelem)
641+ (save-excursion
642+ (beginning-of-line )
643+ (if (looking-at-p " \\ s-*->" ) '+ nil ))))
641644
642645(c-add-style
643646 " php"
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ object = new DateTime ();
4+
5+ $ object ->something ()
6+ ->something (); // ###php-mode-test### ((indent 4))
7+
8+ var_dump (
9+ $ object ->something () // ###php-mode-test### ((indent 4))
10+ ->something (), // ###php-mode-test### ((indent 8))
11+ ); // ###php-mode-test### ((indent 0))
12+
13+ $ arr = [
14+ $ object ->something () // ###php-mode-test### ((indent 4))
15+ /* comment */ ->something () // ###php-mode-test### ((indent 4))
16+ ->something (), // ###php-mode-test### ((indent 8))
17+ ]; // ###php-mode-test### ((indent 0))
Original file line number Diff line number Diff line change @@ -645,6 +645,10 @@ Meant for `php-mode-test-issue-503'."
645645 (goto-char (point-min ))
646646 (should (eq (php-mode-test-in-function-p nil ) nil ))))
647647
648+ (ert-deftest php-mode-test-issue-623 ()
649+ " Proper alignment object -> accessor."
650+ (with-php-mode-test (" indent/issue-623.php" :indent t :magic t )))
651+
648652(ert-deftest php-mode-test-php74 ()
649653 " Test highlighting language constructs added in PHP 7.4."
650654 (with-php-mode-test (" 7.4/arrow-function.php" :faces t ))
You can’t perform that action at this time.
0 commit comments