From 2a8f5b9fe8b3a39f52a15ac7532d662b3160cfb6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 08:43:14 +0200 Subject: [PATCH 1/9] Update events.md --- services/events.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/events.md b/services/events.md index e50ffbe..a03bc52 100644 --- a/services/events.md +++ b/services/events.md @@ -58,4 +58,8 @@ $eventManager->trigger('eventId', 'conditionName'); // No output (if remove = fa $eventManager->trigger('eventId', 'conditionName'); // No output (if remove = true) ``` -The order in which these conditions are triggered doesn't mapper. A multi condition event SHOULD be atteched with the optional boolean parameter `true`. These events can only be executed once and will be removed afterwards. In case the optional boolean parameter was not set to `true` the event will remain in the event manager and will be triggered whenever `trigger('eventId')` is called. \ No newline at end of file +The order in which these conditions are triggered doesn't mapper. A multi condition event SHOULD be atteched with the optional boolean parameter `true`. These events can only be executed once and will be removed afterwards. In case the optional boolean parameter was not set to `true` the event will remain in the event manager and will be triggered whenever `trigger('eventId')` is called. + +## Frontend vs. Backend + +The only key difference between the frontend and backend implementation is that the frontend prevents runnning the same event in quick succession (less than 500 ms) in order to prevent undesired effects which can happen due to quick UI interaction. From acb7e74139cc33709cc88fa66364f77de9154866 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 08:49:05 +0200 Subject: [PATCH 2/9] Update php.md --- standards/php.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/standards/php.md b/standards/php.md index a72d6df..b862ca6 100644 --- a/standards/php.md +++ b/standards/php.md @@ -36,6 +36,10 @@ Php code embedded into template files SHOULD use the alternative syntax for cont ``` +## Strings + +Strings must use single quotes `'` instead of `"` unless double quotes are required. + ## Echo when echoing multiple components, don't concat them but use `,`. @@ -155,4 +159,4 @@ The usage of the following functions SHOULD be avoided and inspected for any kin * `rmdir()` * `mkdir()` * `touch()` -* `unlink()` \ No newline at end of file +* `unlink()` From 1f8dd851732a99d25cccb3638fe5663d4f7b14c3 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 10:59:46 +0200 Subject: [PATCH 3/9] Removed string, they are part of general --- standards/php.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/standards/php.md b/standards/php.md index b862ca6..7cf4a0c 100644 --- a/standards/php.md +++ b/standards/php.md @@ -36,10 +36,6 @@ Php code embedded into template files SHOULD use the alternative syntax for cont ``` -## Strings - -Strings must use single quotes `'` instead of `"` unless double quotes are required. - ## Echo when echoing multiple components, don't concat them but use `,`. From 74b6bd0ec17743279584ee9c07571d33b25da4e0 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:01:32 +0200 Subject: [PATCH 4/9] Update documentation.md --- standards/documentation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/standards/documentation.md b/standards/documentation.md index ee5bbc0..3fca82b 100644 --- a/standards/documentation.md +++ b/standards/documentation.md @@ -128,8 +128,8 @@ A function/method documentation MUST be implemented in the following form: * * Optional example or more detailed description. * - * @param {variable_type} param1Name Parameter description - * @param {variable_type} [optionalPara] Parameter description + * @param {variable_type_1} param1Name Parameter description + * @param {variable_type} [optionalPara] Parameter description * * @return {return_type} * @@ -137,4 +137,6 @@ A function/method documentation MUST be implemented in the following form: */ ``` +Please also note the correct alignment of `@param` type, name and description + ### Variable From dc3c5f11d1ddc380d1062a56f06192137aa76415 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:04:10 +0200 Subject: [PATCH 5/9] Add var documentation --- standards/documentation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/standards/documentation.md b/standards/documentation.md index 3fca82b..bb3c393 100644 --- a/standards/documentation.md +++ b/standards/documentation.md @@ -140,3 +140,9 @@ A function/method documentation MUST be implemented in the following form: Please also note the correct alignment of `@param` type, name and description ### Variable + +In some cases it may be required to type hint a variable in this case the following format MUST be used. + +```php +/** @var {variable_type} varName {optional_description} +``` From c50ed087b18f7a229084339aa68072cfb8f4f504 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:04:42 +0200 Subject: [PATCH 6/9] Update documentation.md --- standards/documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standards/documentation.md b/standards/documentation.md index bb3c393..f3753f2 100644 --- a/standards/documentation.md +++ b/standards/documentation.md @@ -144,5 +144,5 @@ Please also note the correct alignment of `@param` type, name and description In some cases it may be required to type hint a variable in this case the following format MUST be used. ```php -/** @var {variable_type} varName {optional_description} +/** @var variable_type varName {optional_description} ``` From 059248ca28df651640dfcc8286bf7fb24b47c335 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:09:37 +0200 Subject: [PATCH 7/9] Update php.md --- standards/php.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/standards/php.md b/standards/php.md index 7cf4a0c..e8a9602 100644 --- a/standards/php.md +++ b/standards/php.md @@ -54,6 +54,14 @@ Use `elseif` where possible instead of `else if`. Namespaces must be surrounded with new line elements. +## Class Constants + +Class constants MUST have a access modifier + +```php +public CONST_NAME = ...; +``` + ## Deprecated functions and variables The following functions and (super-) global variables MUST NOT be used. From c8e05ad339971dd7a7b4af5fd745da48ae9e932c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:16:56 +0200 Subject: [PATCH 8/9] Update requests.md --- basics/requests.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/basics/requests.md b/basics/requests.md index 43c4d29..e925b34 100644 --- a/basics/requests.md +++ b/basics/requests.md @@ -16,7 +16,14 @@ With the rest implementation it's possible to make http requests and read the re ```php $request = new Request(new Http('http://your_request.com/url?to=call')); -$result = Rest::request($request); +$result = Rest::request($request); +``` + +Alternatively it's also possible to make a rest request directly from the Http request object. + +```php +$request = new Request(new Http('http://your_request.com/url?to=call')); +$result = $request->rest(); ``` The result contains the raw response text. By defining the request method it's also possible to make other requests such as `PUT` requests. From 43c7ba13a7f8841653d54fb8f0c2a7b0206fd589 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:19:11 +0200 Subject: [PATCH 9/9] Update tests.md --- quality/tests.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quality/tests.md b/quality/tests.md index 57c37ef..c24e018 100644 --- a/quality/tests.md +++ b/quality/tests.md @@ -9,13 +9,13 @@ This application uses PHPUnit as unit testing framework. The PHPUnit directory i In order to run all tests and also creating the dummy data for UI tests, execute the following command: ```sh -php phpunit.phar -c Tests/PHPUnit/phpunit_no_coverage.xml +php phpunit.phar -c tests/PHPUnit/phpunit_no_coverage.xml ``` In order to also create a code coverage report run: ```sh -php phpunit.phar -c Tests/PHPUnit/phpunit_default.xml +php phpunit.phar -c tests/PHPUnit/phpunit_default.xml ``` ### Modules @@ -24,4 +24,4 @@ Every module needs to have a `Admin` directory containing a class called `AdminT ## Jasmine -The javascript testing is done with jasmine. The javascript testing directory is structured the same way as the `Framework`. Unit tests for specific classes need to be named in the same manner as the testing class. \ No newline at end of file +The javascript testing is done with jasmine. The javascript testing directory is structured the same way as the `Framework`. Unit tests for specific classes need to be named in the same manner as the testing class.