Nette Documentation Preview

syntax
Presety
*******

.[perex]
Co přesně zapíná každý vestavěný preset: pravidla s volbami, které nastavuje jinak než výchozí, styl odsazení a konců řádků a preset, ze kterého vychází. Pravidlo bez uvedených voleb běží s výchozími hodnotami ze své stránky.

Preset se skládá z rodiče a vlastních položek; potomek přebírá rodiče celého a položku, kterou uvede znovu, přepisuje celou. Vaše konfigurace je další taková vrstva, viz [Konfigurace |configuration#Presety a vrstvy].


`dresscode/per`
===============

PER Coding Style 3.1, vychází z `dresscode/psr12`, odsazení 4 mezerami, konec řádku LF. Pravidel celkem: 57.

- `attribute-after-phpdoc`
- `attribute-position`
- `attribute-spacing`
- [binary-operator-spacing |rules/binary-operator-spacing]
- [braces-position |rules/braces-position] `allowSingleLineAnonymousFunctions: false, emptyBodies: sameLine`
- `cast-canonical-type`
- `cast-spacing`
- `class-definition-spacing` `spaceBeforeParenthesis: false`
- `comma-spacing` `tabAlignment: false`
- `concat-spacing`
- `constant-casing`
- `construct-spacing`
- `continuation-position`
- `control-structure-braces`
- [declaration-blank-lines |rules/declaration-blank-lines] `betweenFunctions: null, betweenFunctionsInInterface: null, betweenMembers: null, beforeDocumentedMember: null, afterPhpdoc: null`
- `declare-spacing`
- `elseif-keyword`
- `eof-newline`
- `fall-through-comment`
- `full-opening-tag`
- `function-name-spacing`
- `header-blank-lines`
- `heredoc-indentation`
- `indentation`
- `keyword-casing`
- `line-ending`
- `multi-line-array`
- `multi-line-call`
- `multi-line-chain`
- `multi-line-condition`
- `multi-line-signature` `promotedProperties: false`
- `multi-line-ternary`
- `name-casing` `classes: PascalCase, methods: camelCase, constants: UPPER_CASE, enumCases: PascalCase`
- `named-argument-spacing`
- `new-argument-parentheses` `namedClasses: required, anonymousClasses: forbidden`
- `no-byte-order-mark`
- `no-closing-tag`
- `no-leading-backslash-in-import`
- `no-trailing-whitespace`
- `nowdoc-without-interpolation`
- `ordered-imports` `alphabetically: false`
- `ordered-members` `order: [use_trait]`
- `parentheses-spacing`
- `reference-spacing`
- `semicolon-spacing` `after: null`
- `short-array-syntax`
- `single-member-per-declaration` `members: [property, trait]`
- `single-member-per-line`
- `single-statement-per-line`
- `spread-operator-spacing`
- `switch-case-colon`
- `switch-case-spacing`
- `ternary-operator-spacing`
- [trailing-comma |rules/trailing-comma] `multiLine: [arrays, arguments, parameters, match, closureUses]`
- `type-hint-spacing`
- `unary-operator-spacing`
- `visibility-required`


`dresscode/psr12`
=================

PSR-12 Extended Coding Style, odsazení 4 mezerami, konec řádku LF. Pravidel celkem: 44.

- [binary-operator-spacing |rules/binary-operator-spacing]
- [braces-position |rules/braces-position] `allowSingleLineAnonymousFunctions: false`
- `cast-canonical-type`
- `cast-spacing`
- `class-definition-spacing`
- `comma-spacing` `tabAlignment: false`
- `constant-casing`
- `construct-spacing`
- `continuation-position`
- `control-structure-braces`
- [declaration-blank-lines |rules/declaration-blank-lines] `betweenFunctions: null, betweenFunctionsInInterface: null, betweenMembers: null, beforeDocumentedMember: null, afterPhpdoc: null`
- `declare-spacing`
- `elseif-keyword`
- `eof-newline`
- `fall-through-comment`
- `full-opening-tag`
- `function-name-spacing`
- `header-blank-lines`
- `indentation`
- `keyword-casing`
- `line-ending`
- `multi-line-call`
- `multi-line-condition`
- `multi-line-signature` `promotedProperties: false`
- `name-casing` `classes: PascalCase, methods: camelCase, constants: UPPER_CASE`
- `new-argument-parentheses` `anonymousClasses: null`
- `no-byte-order-mark`
- `no-closing-tag`
- `no-leading-backslash-in-import`
- `no-trailing-whitespace`
- `ordered-imports` `alphabetically: false`
- `ordered-members` `order: [use_trait]`
- `parentheses-spacing`
- `reference-spacing`
- `short-array-syntax`
- `single-member-per-declaration` `members: [property, trait]`
- `single-statement-per-line`
- `spread-operator-spacing`
- `switch-case-colon`
- `switch-case-spacing`
- `ternary-operator-spacing`
- `type-hint-spacing` `catchTypes: single`
- `unary-operator-spacing`
- `visibility-required`


`dresscode/nette`
=================

Nette Coding Standard, vychází z `dresscode/per`, odsazení tabulátorem, konec řádku LF. Pravidel celkem: 146.

- `annotation-name`
- `array-spacing`
- `arrow-function`
- `attribute-after-phpdoc`
- `attribute-position`
- `attribute-spacing`
- [binary-operator-spacing |rules/binary-operator-spacing]
- `body-blank-lines`
- [braces-position |rules/braces-position] `multiLineParameters: nextLineAfterReturnType`
- `cast-canonical-type`
- `cast-spacing`
- `class-definition-spacing`
- `class-reference-name-casing`
- `combined-assignment-operator`
- `combined-issets`
- `combined-unsets`
- `comma-spacing`
- `commented-out-function` `functions: [print_r, var_dump, var_export, dump]`
- `complex-string-variable`
- `concat-spacing`
- `constant-casing`
- `construct-spacing`
- `continuation-position`
- `control-structure-braces`
- [declaration-blank-lines |rules/declaration-blank-lines]
- `declare-spacing`
- `double-colon-spacing`
- `elseif-keyword`
- `eof-newline`
- `explicit-assertion`
- `fall-through-comment`
- `final-internal-class`
- `forbidden-annotations` `annotations: [@todo, @author, @copyright, @created, @license, @package, @since, @subpackage, @version]`
- `forbidden-phpdoc-lines` `patterns: [~^(?:(?!private|protected|static)\S+ )?(?:con|de)structor\.\z~i, ~^Created by \S+\.\z~i, ~^\S+ [gs]etter\.\z~i]`
- `full-opening-tag`
- `function-name-spacing`
- `header-blank-lines` `beforeNamespace: 1, afterOpeningTag: null, afterNamespace: null, afterImports: null, betweenImportGroups: 0`
- `heredoc-indentation`
- `import-notation` `functions: combined, constants: combined, groupUse: keep`
- `increment-operator`
- `indentation`
- `keyword-casing`
- `line-ending`
- `magic-constant-casing`
- `modern-class-name-reference`
- `multi-line-array` `oneItemPerLine: false`
- `multi-line-call`
- `multi-line-chain` `leadingLinksOnFirstLine: true`
- `multi-line-condition`
- `multi-line-signature`
- `multi-line-ternary`
- `name-casing` `classes: PascalCase, methods: camelCase, functions: camelCase, constants: PascalCase, enumCases: PascalCase, properties: camelCase, variables: camelCase`
- `named-argument-spacing`
- `native-function-casing`
- `new-argument-parentheses` `namedClasses: forbidden, anonymousClasses: forbidden`
- `no-alias-functions`
- `no-alternative-syntax`
- `no-backtick-operator`
- `no-byte-order-mark`
- `no-closing-tag`
- `no-continue-in-switch`
- `no-conversion-functions`
- `no-deprecated-functions`
- `no-direct-invoke-call`
- `no-dirname-of-file`
- `no-duplicate-assignment`
- `no-duplicate-return-annotation`
- `no-empty-comment`
- `no-empty-phpdoc`
- `no-empty-statement`
- `no-empty-var-annotation`
- `no-global-keyword`
- `no-hash-comment`
- `no-implicit-backslash`
- `no-inner-functions`
- `no-is-null`
- `no-kind-in-class-name`
- `no-leading-backslash-in-global-namespace`
- `no-leading-backslash-in-import`
- `no-settype`
- `no-short-bool-cast`
- `no-this-in-static-context`
- `no-trailing-whitespace`
- `no-trailing-whitespace-in-string`
- `no-unknown-param-annotation`
- `no-unpacking-in-optimized-call`
- `no-unreachable-catch`
- `no-unset-on-property`
- `no-yoda-comparison`
- `not-equals-operator`
- `nowdoc-without-interpolation`
- `null-coalescing-operator`
- `nullable-type-for-default-null`
- `numeric-literal-separator` `minDigitsBeforeDecimalPoint: 7, minDigitsAfterDecimalPoint: 20`
- `object-operator-spacing`
- [octal-notation |rules/octal-notation]
- `offset-bracket-spacing`
- `ordered-imports`
- `ordered-members`
- `parentheses-spacing`
- `phpdoc-alignment`
- `phpdoc-canonical-types`
- `phpdoc-null-last`
- `phpdoc-trim`
- `property-phpdoc-required`
- `property-phpdoc-single-line`
- `property-var-annotation`
- `reference-spacing`
- `reference-throwable-only`
- `reference-used-names-only`
- `self-for-current-class`
- `semicolon-spacing`
- `short-array-syntax`
- `short-list-syntax`
- [short-ternary-operator |rules/short-ternary-operator]
- `single-member-per-declaration` `members: [property, trait]`
- `single-member-per-line`
- `single-quoted-strings`
- `single-statement-per-line`
- `spread-operator-spacing`
- `strict-call`
- `strict-comparison`
- `switch-case-colon`
- `switch-case-spacing`
- `symbolic-logical-operators`
- `ternary-for-simple-branch`
- `ternary-operator-spacing` `spacing: single`
- [trailing-comma |rules/trailing-comma] `multiLine: [arrays, arguments, parameters]`
- `type-hint-spacing`
- `unary-operator-spacing`
- `union-type-format`
- [unused-imports |rules/unused-imports]
- `use-from-same-namespace`
- `useless-alias`
- `useless-braces`
- `useless-constant-var-annotation`
- `useless-construct-parentheses`
- `useless-else`
- `useless-function-phpdoc`
- `useless-if-condition-with-return`
- `useless-inheritdoc`
- `useless-null-property-initialization`
- `useless-parameter-default`
- `useless-string-concat`
- `useless-ternary-operator`
- `visibility-required`

Presety

Co přesně zapíná každý vestavěný preset: pravidla s volbami, které nastavuje jinak než výchozí, styl odsazení a konců řádků a preset, ze kterého vychází. Pravidlo bez uvedených voleb běží s výchozími hodnotami ze své stránky.

Preset se skládá z rodiče a vlastních položek; potomek přebírá rodiče celého a položku, kterou uvede znovu, přepisuje celou. Vaše konfigurace je další taková vrstva, viz Konfigurace.

dresscode/per

PER Coding Style 3.1, vychází z dresscode/psr12, odsazení 4 mezerami, konec řádku LF. Pravidel celkem: 57.

  • attribute-after-phpdoc
  • attribute-position
  • attribute-spacing
  • binary-operator-spacing
  • braces-position allowSingleLineAnonymousFunctions: false, emptyBodies: sameLine
  • cast-canonical-type
  • cast-spacing
  • class-definition-spacing spaceBeforeParenthesis: false
  • comma-spacing tabAlignment: false
  • concat-spacing
  • constant-casing
  • construct-spacing
  • continuation-position
  • control-structure-braces
  • declaration-blank-lines betweenFunctions: null, betweenFunctionsInInterface: null, betweenMembers: null, beforeDocumentedMember: null, afterPhpdoc: null
  • declare-spacing
  • elseif-keyword
  • eof-newline
  • fall-through-comment
  • full-opening-tag
  • function-name-spacing
  • header-blank-lines
  • heredoc-indentation
  • indentation
  • keyword-casing
  • line-ending
  • multi-line-array
  • multi-line-call
  • multi-line-chain
  • multi-line-condition
  • multi-line-signature promotedProperties: false
  • multi-line-ternary
  • name-casing classes: PascalCase, methods: camelCase, constants: UPPER_CASE, enumCases: PascalCase
  • named-argument-spacing
  • new-argument-parentheses namedClasses: required, anonymousClasses: forbidden
  • no-byte-order-mark
  • no-closing-tag
  • no-leading-backslash-in-import
  • no-trailing-whitespace
  • nowdoc-without-interpolation
  • ordered-imports alphabetically: false
  • ordered-members order: [use_trait]
  • parentheses-spacing
  • reference-spacing
  • semicolon-spacing after: null
  • short-array-syntax
  • single-member-per-declaration members: [property, trait]
  • single-member-per-line
  • single-statement-per-line
  • spread-operator-spacing
  • switch-case-colon
  • switch-case-spacing
  • ternary-operator-spacing
  • trailing-comma multiLine: [arrays, arguments, parameters, match, closureUses]
  • type-hint-spacing
  • unary-operator-spacing
  • visibility-required

dresscode/psr12

PSR-12 Extended Coding Style, odsazení 4 mezerami, konec řádku LF. Pravidel celkem: 44.

  • binary-operator-spacing
  • braces-position allowSingleLineAnonymousFunctions: false
  • cast-canonical-type
  • cast-spacing
  • class-definition-spacing
  • comma-spacing tabAlignment: false
  • constant-casing
  • construct-spacing
  • continuation-position
  • control-structure-braces
  • declaration-blank-lines betweenFunctions: null, betweenFunctionsInInterface: null, betweenMembers: null, beforeDocumentedMember: null, afterPhpdoc: null
  • declare-spacing
  • elseif-keyword
  • eof-newline
  • fall-through-comment
  • full-opening-tag
  • function-name-spacing
  • header-blank-lines
  • indentation
  • keyword-casing
  • line-ending
  • multi-line-call
  • multi-line-condition
  • multi-line-signature promotedProperties: false
  • name-casing classes: PascalCase, methods: camelCase, constants: UPPER_CASE
  • new-argument-parentheses anonymousClasses: null
  • no-byte-order-mark
  • no-closing-tag
  • no-leading-backslash-in-import
  • no-trailing-whitespace
  • ordered-imports alphabetically: false
  • ordered-members order: [use_trait]
  • parentheses-spacing
  • reference-spacing
  • short-array-syntax
  • single-member-per-declaration members: [property, trait]
  • single-statement-per-line
  • spread-operator-spacing
  • switch-case-colon
  • switch-case-spacing
  • ternary-operator-spacing
  • type-hint-spacing catchTypes: single
  • unary-operator-spacing
  • visibility-required

dresscode/nette

Nette Coding Standard, vychází z dresscode/per, odsazení tabulátorem, konec řádku LF. Pravidel celkem: 146.

  • annotation-name
  • array-spacing
  • arrow-function
  • attribute-after-phpdoc
  • attribute-position
  • attribute-spacing
  • binary-operator-spacing
  • body-blank-lines
  • braces-position multiLineParameters: nextLineAfterReturnType
  • cast-canonical-type
  • cast-spacing
  • class-definition-spacing
  • class-reference-name-casing
  • combined-assignment-operator
  • combined-issets
  • combined-unsets
  • comma-spacing
  • commented-out-function functions: [print_r, var_dump, var_export, dump]
  • complex-string-variable
  • concat-spacing
  • constant-casing
  • construct-spacing
  • continuation-position
  • control-structure-braces
  • declaration-blank-lines
  • declare-spacing
  • double-colon-spacing
  • elseif-keyword
  • eof-newline
  • explicit-assertion
  • fall-through-comment
  • final-internal-class
  • forbidden-annotations annotations: [@todo, @author, @copyright, @created, @license, @package, @since, @subpackage, @version]
  • forbidden-phpdoc-lines patterns: [~^(?:(?!private|protected|static)\S+ )?(?:con|de)structor\.\z~i, ~^Created by \S+\.\z~i, ~^\S+ [gs]etter\.\z~i]
  • full-opening-tag
  • function-name-spacing
  • header-blank-lines beforeNamespace: 1, afterOpeningTag: null, afterNamespace: null, afterImports: null, betweenImportGroups: 0
  • heredoc-indentation
  • import-notation functions: combined, constants: combined, groupUse: keep
  • increment-operator
  • indentation
  • keyword-casing
  • line-ending
  • magic-constant-casing
  • modern-class-name-reference
  • multi-line-array oneItemPerLine: false
  • multi-line-call
  • multi-line-chain leadingLinksOnFirstLine: true
  • multi-line-condition
  • multi-line-signature
  • multi-line-ternary
  • name-casing classes: PascalCase, methods: camelCase, functions: camelCase, constants: PascalCase, enumCases: PascalCase, properties: camelCase, variables: camelCase
  • named-argument-spacing
  • native-function-casing
  • new-argument-parentheses namedClasses: forbidden, anonymousClasses: forbidden
  • no-alias-functions
  • no-alternative-syntax
  • no-backtick-operator
  • no-byte-order-mark
  • no-closing-tag
  • no-continue-in-switch
  • no-conversion-functions
  • no-deprecated-functions
  • no-direct-invoke-call
  • no-dirname-of-file
  • no-duplicate-assignment
  • no-duplicate-return-annotation
  • no-empty-comment
  • no-empty-phpdoc
  • no-empty-statement
  • no-empty-var-annotation
  • no-global-keyword
  • no-hash-comment
  • no-implicit-backslash
  • no-inner-functions
  • no-is-null
  • no-kind-in-class-name
  • no-leading-backslash-in-global-namespace
  • no-leading-backslash-in-import
  • no-settype
  • no-short-bool-cast
  • no-this-in-static-context
  • no-trailing-whitespace
  • no-trailing-whitespace-in-string
  • no-unknown-param-annotation
  • no-unpacking-in-optimized-call
  • no-unreachable-catch
  • no-unset-on-property
  • no-yoda-comparison
  • not-equals-operator
  • nowdoc-without-interpolation
  • null-coalescing-operator
  • nullable-type-for-default-null
  • numeric-literal-separator minDigitsBeforeDecimalPoint: 7, minDigitsAfterDecimalPoint: 20
  • object-operator-spacing
  • octal-notation
  • offset-bracket-spacing
  • ordered-imports
  • ordered-members
  • parentheses-spacing
  • phpdoc-alignment
  • phpdoc-canonical-types
  • phpdoc-null-last
  • phpdoc-trim
  • property-phpdoc-required
  • property-phpdoc-single-line
  • property-var-annotation
  • reference-spacing
  • reference-throwable-only
  • reference-used-names-only
  • self-for-current-class
  • semicolon-spacing
  • short-array-syntax
  • short-list-syntax
  • short-ternary-operator
  • single-member-per-declaration members: [property, trait]
  • single-member-per-line
  • single-quoted-strings
  • single-statement-per-line
  • spread-operator-spacing
  • strict-call
  • strict-comparison
  • switch-case-colon
  • switch-case-spacing
  • symbolic-logical-operators
  • ternary-for-simple-branch
  • ternary-operator-spacing spacing: single
  • trailing-comma multiLine: [arrays, arguments, parameters]
  • type-hint-spacing
  • unary-operator-spacing
  • union-type-format
  • unused-imports
  • use-from-same-namespace
  • useless-alias
  • useless-braces
  • useless-constant-var-annotation
  • useless-construct-parentheses
  • useless-else
  • useless-function-phpdoc
  • useless-if-condition-with-return
  • useless-inheritdoc
  • useless-null-property-initialization
  • useless-parameter-default
  • useless-string-concat
  • useless-ternary-operator
  • visibility-required