branch: externals/phps-mode
commit 26d7b64086129e64371639db16177b54057622d9
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Added TODO item for indentation
---
phps-mode-indent.el | 8 ++++++++
test/phps-mode-test-indent.el | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index 9dc1690461..e5db7504cf 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -1088,6 +1088,14 @@
;; or
;; define('_PRIVATE_ROOT_',
;; 'here');
+
+ ;; TODO Handle cases like
+ ;; if (true) {
+ ;; $cacheKey = sprintf(
+ ;; 'key_%s',
+ ;; md5(json_encode($key))
+ ;; );
+ ;; $cache =
((and
previous-line-ends-with-terminus
(string= previous-line-ends-with-terminus ";")
diff --git a/test/phps-mode-test-indent.el b/test/phps-mode-test-indent.el
index 8f7d27516d..e3ab3b1e81 100644
--- a/test/phps-mode-test-indent.el
+++ b/test/phps-mode-test-indent.el
@@ -328,6 +328,10 @@
"<?php\nif (true) {\n $random = self::getData();\n // My random
comment\n}\n"
"Comment after assignment from method call on same line")
+ (phps-mode-test-indent--should-equal
+ "<?php\nif (true) {\n // My comment\n $cacheKey = sprintf(\n
'key_%s',\n md5(json_encode($key))\n );\n $cache =\n
Cache::getInstance();\n"
+ "Line after assignment from multi-line function-call")
+
)
(defun phps-mode-test-indent--get-lines-indent-psr-2 ()