From 5e771743e246a53e8fa5795fe07c441e56776231 Mon Sep 17 00:00:00 2001 From: Mathieu Petit-Clair Date: Mon, 27 Jul 2026 17:28:31 +0800 Subject: [PATCH] Update index.md Updating documentation, following coding style change relating to line length done in https://moodle.atlassian.net/browse/MDLSITE-7037 --- general/development/policies/codingstyle/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/development/policies/codingstyle/index.md b/general/development/policies/codingstyle/index.md index 855b1587e..9fcb03ff5 100644 --- a/general/development/policies/codingstyle/index.md +++ b/general/development/policies/codingstyle/index.md @@ -73,7 +73,7 @@ SQL queries use special indentation, see [SQL coding style](./sql.md). The key issue is readability. -Aim for 132 characters if it is convenient, it is not recommended to use more than 180 characters. +While there is no hard limit on line length, lines should not be longer than 80 characters, and lines longer than that should be split into multiple subsequent lines of no more than 80 characters each. If this is inconvenient, or impacts readability, aim to keep lines under 120 characters as much as possible. The exception are string files in the `/lang` directory where lines `$string['id'] = 'value';` should have the value defined as a single string of any length, wrapped by quotes (no concatenation operators, no heredoc and no newdoc syntax). This helps to parse and process these string files without including them as a PHP code.