Skip to content

Commit

Permalink
fix: updated php constraint docs
Browse files Browse the repository at this point in the history
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
  • Loading branch information
officialasishkumar committed Dec 31, 2023
1 parent ef27d77 commit 42e24fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/constraints/PHP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ These are the constraints that is applied to model naming. The `Rule key` is wha

|Rule key|Rule|Resolution|
|---|---|---|
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For PHP `_` and `$` are an exception to this rule. |
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For PHP `_` is an exception to this rule. |
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character. |
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Scala has a list of reserved keywords ([see the full list here](https://github.com/asyncapi/modelina/blob/master/src/generators/php/Constants.ts))|
Expand All @@ -17,11 +17,11 @@ These are the constraints that is applied to model naming. The `Rule key` is wha
These are the constraints that is applied to object properties and the naming of them. The `Rule key` is what you can use in the options to overwrite the default behavior. See [constraint customization](https://github.com/asyncapi/modelina/blob/master/docs/README.md#Customization).
|Rule key|Rule|Resolution|
|---|---|---|
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For PHP `_` and `$` are an exception to this rule. |
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For PHP `_` is an exception to this rule. |
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character. |
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Scala has a list of reserved keywords ([see the full list here](https://github.com/asyncapi/modelina/blob/master/src/generators/php/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case. |
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using camel case. |
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -30,11 +30,11 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y

|Rule key|Rule|Resolution|
|---|---|---|
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For PHP `_` and `$` are an exception to this rule. |
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For PHP `_` is an exception to this rule. |
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character. |
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Scala has a list of reserved keywords ([see the full list here](https://github.com/asyncapi/modelina/blob/master/src/generators/php/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case. |
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using constant case. |
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down

0 comments on commit 42e24fb

Please sign in to comment.