From 074ebe2263b4dfc7909883fb55f83e8088c9f460 Mon Sep 17 00:00:00 2001 From: Stefan Kruppa Date: Mon, 12 Mar 2018 20:46:52 +0100 Subject: [PATCH 1/2] Add rule to import classes except for built-in PHP classes. --- contributing/code/standards.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 1225c4607bf..1221e08caad 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -194,6 +194,9 @@ Structure * Do not use spaces around ``[`` offset accessor and before ``]`` offset accessor. +* Import classes from other namespaces with the ``use`` statement, except for + built-in PHP classes. + Naming Conventions ~~~~~~~~~~~~~~~~~~ From 756c957acfd17f61fbd1e000edb13a6d5c678fbd Mon Sep 17 00:00:00 2001 From: Stefan Kruppa Date: Fri, 16 Mar 2018 12:23:48 +0100 Subject: [PATCH 2/2] Improve wording on use-statement rule. --- contributing/code/standards.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 1221e08caad..9085917d877 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -192,10 +192,9 @@ Structure * Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions which return or throw something; -* Do not use spaces around ``[`` offset accessor and before ``]`` offset accessor. +* Do not use spaces around ``[`` offset accessor and before ``]`` offset accessor; -* Import classes from other namespaces with the ``use`` statement, except for - built-in PHP classes. +* Add a ``use`` statement for every class that is not part of the global namespace. Naming Conventions ~~~~~~~~~~~~~~~~~~