@@ -636,7 +636,7 @@ 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- (if php-lineup-cascaded-calls
639+ (when php-mode -lineup-cascaded-calls
640640 (c-lineup-cascaded-calls langelem)))
641641
642642(c-add-style
@@ -661,6 +661,7 @@ but only if the setting is enabled"
661661 (tab-width . ,(default-value 'tab-width ))
662662 (fill-column . ,(default-value 'fill-column ))
663663 (show-trailing-whitespace . ,(default-value 'show-trailing-whitespace ))
664+ (php-mode-lineup-cascaded-calls . t )
664665 (php-style-delete-trailing-whitespace . nil )))
665666
666667(defun php-enable-default-coding-style ()
@@ -687,6 +688,7 @@ but only if the setting is enabled"
687688 (tab-width . 2 )
688689 (fill-column . 78 )
689690 (show-trailing-whitespace . t )
691+ (php-mode-lineup-cascaded-calls . nil )
690692 (php-style-delete-trailing-whitespace . t )))
691693
692694(defun php-enable-drupal-coding-style ()
@@ -713,6 +715,7 @@ but only if the setting is enabled"
713715 '(" php"
714716 (c-offsets-alist . ((statement-cont . php-lineup-hanging-semicolon)))
715717 (c-indent-comments-syntactically-p . t )
718+ (php-mode-lineup-cascaded-calls . nil )
716719 (fill-column . 78 )))
717720
718721(defun php-enable-symfony2-coding-style ()
@@ -721,12 +724,13 @@ but only if the setting is enabled"
721724 (php-set-style " symfony2" ))
722725
723726(c-add-style
724- " psr2"
727+ " psr2" ; PSR-2 / PSR-12
725728 '(" php"
726729 (c-offsets-alist . ((statement-cont . + )))
727730 (c-indent-comments-syntactically-p . t )
728731 (fill-column . 78 )
729732 (show-trailing-whitespace . t )
733+ (php-mode-lineup-cascaded-calls . nil )
730734 (php-style-delete-trailing-whitespace . t )))
731735
732736(defun php-enable-psr2-coding-style ()
0 commit comments