From 3d7948b36212db2513d75f63043a20a3f67f4a20 Mon Sep 17 00:00:00 2001 From: Thibault Dockx <thibault.dockx@fusiondirectory.org> Date: Tue, 11 Feb 2025 13:09:29 +0000 Subject: [PATCH] :sparkles: First commit - comment how to in code Comment how to in code p1 --- .../development/documentation/PHPDoc.rst | 28 +++++++++++++++++++ .../development/documentation/index.rst | 10 +++++++ source/fusiondirectory/development/index.rst | 1 + 3 files changed, 39 insertions(+) create mode 100644 source/fusiondirectory/development/documentation/PHPDoc.rst create mode 100644 source/fusiondirectory/development/documentation/index.rst diff --git a/source/fusiondirectory/development/documentation/PHPDoc.rst b/source/fusiondirectory/development/documentation/PHPDoc.rst new file mode 100644 index 0000000..dc8e111 --- /dev/null +++ b/source/fusiondirectory/development/documentation/PHPDoc.rst @@ -0,0 +1,28 @@ +Doxygen +======= + +We are using a tool named doxygen which is fantastic to read documented code and offers a visual +reprensentation of the interaction of classes and methods. + +If well documented, the visuals helps to quicker understand the codes. + +How to document your code +------------------------- + +**Within your methods** + +You may comment your code inline above your line of code in order to make a clear message on what/why/how +your below code is performing. + +**Above your methods** + +We use PHPdoc to get an harmonious documentation withing the code. +It basically start like this : +/** +* Your comment here. +*/ + +Within that comment block we defined : variables and return types. +We mandate our developpers to use strict type and we enforce it in php 8.2+ + +On tope of your \ No newline at end of file diff --git a/source/fusiondirectory/development/documentation/index.rst b/source/fusiondirectory/development/documentation/index.rst new file mode 100644 index 0000000..7dd5ca6 --- /dev/null +++ b/source/fusiondirectory/development/documentation/index.rst @@ -0,0 +1,10 @@ +Writing documentation within your code +======================================= + +You can properly write documentation within your code. +This is our guidelines + +.. toctree:: + :maxdepth: 2 + + PHPDoc \ No newline at end of file diff --git a/source/fusiondirectory/development/index.rst b/source/fusiondirectory/development/index.rst index 9f76840..584616a 100644 --- a/source/fusiondirectory/development/index.rst +++ b/source/fusiondirectory/development/index.rst @@ -9,3 +9,4 @@ Development codingstyle/index.rst writeplugin/index.rst api/index.rst + documentation/index.rst -- GitLab