Skip to content

Commit 4bac480

Browse files
committed
markdown linting
1 parent 261505a commit 4bac480

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/00.home/homepage.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Our documentation is an open source and community driven effort. It is also a co
1818

1919
[![Meet the Lucee Team at CFCAMP 2025](/assets/images/conferences/CFCAMP-2025.webp)](https://www.cfcamp.org/?utm_source=website&utm_id=Ldoc)
2020

21-
2221
## Recipes
2322

2423
We have added a whole series of detailed [[Recipes]] showing you how to take advantage of the wide range of features in Lucee.

docs/recipes/static-mocking.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dump(Test::myStaticFunction()); // Outputs: "static"
3434
```
3535

3636
Unlike instance functions, static functions:
37+
3738
- Do not require an object instance to be called.
3839
- Are shared across all instances of the component.
3940
- Can be accessed **exactly like instance functions**.
@@ -65,6 +66,7 @@ dump(testInstance.myStaticFunction()); // Outputs: "mockstatic"
6566
```
6667

6768
### Why This Matters for Testing
69+
6870
- There is **no need** to create instance wrapper functions for static functions.
6971
- Static functions can be dynamically **mocked per instance** without modifying the component.
7072
- This allows for **cleaner test code** and avoids unnecessary duplication.
@@ -99,4 +101,3 @@ This means that **static and instance functions are represented the same way in
99101
## Conclusion
100102

101103
Lucee’s handling of static functions provides a powerful way to structure shared functionality while maintaining flexibility in testing. Instead of introducing redundant instance function wrappers, developers can take advantage of the fact that static functions are accessible like instance functions and can be dynamically mocked per instance. Additionally, `getMetadata` provides an easy way to differentiate between static and instance functions, reinforcing the consistent handling of both in Lucee.
102-

docs/recipes/static-scope-in-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ dump(obj.staticFunction()); // Outputs: "Mocked static function"
128128
```
129129

130130
This means:
131+
131132
- Static functions can be dynamically modified per instance without affecting the original component defintion.
132133
- No need for redundant instance wrappers for testing.
133134

@@ -141,4 +142,3 @@ This means:
141142
## Conclusion
142143

143144
Static scope in Lucee enables shared variables and functions across instances, improving efficiency and making testing more flexible. By understanding how to use static variables, functions, and mocking techniques, developers can write cleaner, more maintainable code.
144-

0 commit comments

Comments
 (0)