From 10da904185b3ee7b977c7177bf372d84e4286bc4 Mon Sep 17 00:00:00 2001 From: Richard Korthuis Date: Thu, 13 Jun 2024 14:28:44 +0200 Subject: [PATCH 1/8] Add documentation for WordPress.NamingConventions.ValidVariableName --- .../ValidVariableNameStandard.xml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml new file mode 100644 index 0000000000..8313f96cce --- /dev/null +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -0,0 +1,39 @@ + + + + + + + + $prefix_variable_name = 'value'; + ]]> + + + $Prefix_Variable_NAME = 'value'; + ]]> + + + + + + + + + + + From 7150c6dc1bd61d7db85a530dc2d471a6d7c652dc Mon Sep 17 00:00:00 2001 From: Richard Korthuis <73702842+richardkorthuis@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:37:59 +0200 Subject: [PATCH 2/8] Missing em tags + better naming Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com> --- WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index 8313f96cce..acf8e0d793 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -24,7 +24,7 @@ $property_name = 'value'; } ]]> From 6cf2a0f79eec39cf2f3cb63d5bd2b93a1c92395c Mon Sep 17 00:00:00 2001 From: Richard Korthuis <73702842+richardkorthuis@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:38:13 +0200 Subject: [PATCH 3/8] Missing em tags + better naming Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com> --- WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index acf8e0d793..e5fa8521a6 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -31,7 +31,7 @@ class My_Class { $propertyName = 'value'; } ]]> From a488cd05c33569f3a2e12c565ee8c9a88dddf3de Mon Sep 17 00:00:00 2001 From: Richard Korthuis <73702842+richardkorthuis@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:38:35 +0200 Subject: [PATCH 4/8] Uppercase sentence Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com> --- WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index e5fa8521a6..4c0dd46765 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -9,7 +9,7 @@ ]]> - + $prefix_variable_name = 'value'; ]]> From 738c2122dd9161d3cffec246d0c3ac30f3c21625 Mon Sep 17 00:00:00 2001 From: Richard Korthuis <73702842+richardkorthuis@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:38:44 +0200 Subject: [PATCH 5/8] Uppercase sentence Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com> --- WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index 4c0dd46765..473cf9f92d 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -14,7 +14,7 @@ $prefix_variable_name = 'value'; ]]> - + $Prefix_Variable_NAME = 'value'; ]]> From cd19fa6e427a11c2ec2a9bc1f6ebfb1027602ce5 Mon Sep 17 00:00:00 2001 From: Richard Korthuis <73702842+richardkorthuis@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:38:53 +0200 Subject: [PATCH 6/8] Uppercase sentence Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com> --- WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index 473cf9f92d..d91cc227dc 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -21,7 +21,7 @@ - + $property_name = 'value'; From 6a54c02a9343c5bdc051f856b88cf9fb9aa2264d Mon Sep 17 00:00:00 2001 From: Richard Korthuis <73702842+richardkorthuis@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:39:01 +0200 Subject: [PATCH 7/8] Uppercase sentence Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com> --- WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index d91cc227dc..42175ca5d7 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -28,7 +28,7 @@ class My_Class { } ]]> - + $propertyName = 'value'; From 5a3957235a2f5efbaaa78bdccf7ae8201b5c180e Mon Sep 17 00:00:00 2001 From: Richard Korthuis Date: Mon, 12 Aug 2024 11:45:15 +0200 Subject: [PATCH 8/8] Add code sample of usage of an incorrectly named variable (in stead of a declaration). --- .../NamingConventions/ValidVariableNameStandard.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml index 42175ca5d7..76a6b581b4 100644 --- a/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml +++ b/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -36,4 +36,16 @@ class My_Class { ]]> + + + $variable_name; + ]]> + + + $VariableName; + ]]> + +