Skip to content

Commit

Permalink
docs: Fix a few typos
Browse files Browse the repository at this point in the history
There are small typos in:
- WHITEPAPER.md
- src/masonite/foundation/Application.py
- src/masonite/providers/FrameworkProvider.py
- src/masonite/response/response.py
- src/masonite/utils/structures.py
- src/masonite/views/view.py

Fixes:
- Should read `security` rather than `securiy`.
- Should read `propagated` rather than `propogated`.
- Should read `piece` rather than `peice`.
- Should read `modifying` rather than `modyifing`.
- Should read `overridden` rather than `overriden`.
- Should read `differentiate` rather than `differenciate`.
- Should read `asterisks` rather than `astericks`.

Signed-off-by: Tim Gates <[email protected]>
  • Loading branch information
timgates42 committed Jul 31, 2022
1 parent 9664b4b commit c13c607
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions WHITEPAPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Notice that theres nothing in the class above that isn't related to sending an e

### Component Classes

Component classes are another part of this relationship. A component is also a class that does 1 thing and 1 thing only. This class should have a small peice of logic **that is designed to clean up other parts of the code later down the line**. For example, if we want to compile an email from `[email protected], [email protected]` to `<[email protected]>, <[email protected]>` we could loop through the emails and append them inside the SMTP driver, right?
Component classes are another part of this relationship. A component is also a class that does 1 thing and 1 thing only. This class should have a small piece of logic **that is designed to clean up other parts of the code later down the line**. For example, if we want to compile an email from `[email protected], [email protected]` to `<[email protected]>, <[email protected]>` we could loop through the emails and append them inside the SMTP driver, right?

This would look kind of messy and with some psuedo code would look like this:

Expand Down Expand Up @@ -315,7 +315,7 @@ cc_emails = Recipient(cc_emails).header()

The same rules apply to an email attachment.

So these component classes should be used where applicable so we can add features at a central location and it be propogated throughout other drivers. They should also do 1 thing and 1 thing only to not break anything with side effects
So these component classes should be used where applicable so we can add features at a central location and it be propagated throughout other drivers. They should also do 1 thing and 1 thing only to not break anything with side effects

### Registering Drivers

Expand Down
2 changes: 1 addition & 1 deletion src/masonite/foundation/Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def is_running_tests(self) -> bool:

def is_running_in_console(self) -> bool:
"""Check if application is running in console. This is useful to only run some providers
logic when used in console. We can differenciate if the application is being served or
logic when used in console. We can differentiate if the application is being served or
if an application command is ran in console."""
if len(sys.argv) > 1:
return sys.argv[1] != "serve"
Expand Down
2 changes: 1 addition & 1 deletion src/masonite/providers/FrameworkProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def register(self):
self.application.bind("presets", presets)

# @M5 remove this and add SecurityProvider in default project
# @M5 old projects won't have securiy options so put default here. remove this for M5.
# @M5 old projects won't have security options so put default here. remove this for M5.
options = config("security.cors")
if not options:
options = {
Expand Down
2 changes: 1 addition & 1 deletion src/masonite/response/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def json(self, payload: Any, status: int = 200) -> bytes:
return self.data()

def make_headers(self, content_type: str = "text/html; charset=utf-8") -> None:
"""Recompute Content-Length of the response after modyifing it."""
"""Recompute Content-Length of the response after modifying it."""
self.header_bag.add(Header("Content-Length", str(len(self.to_bytes()))))

# If the user did not change it directly
Expand Down
2 changes: 1 addition & 1 deletion src/masonite/utils/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def data_get(dictionary, key, default=None):


def data_set(dictionary, key, value, overwrite=True):
"""Set dictionary value at key using nested notation. Values are overriden by default but
"""Set dictionary value at key using nested notation. Values are overridden by default but
this behaviour can be changed by passing overwrite=False.
The dictionary is edited in place but is also returned.
Expand Down
2 changes: 1 addition & 1 deletion src/masonite/views/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def hydrate_from_composers(self):
if self.template in self.composers:
self.dictionary.update(self.composers.get(self.template))

# Check if there is just an astericks in the composer
# Check if there is just an asterisks in the composer
if "*" in self.composers:
self.dictionary.update(self.composers.get("*"))

Expand Down

0 comments on commit c13c607

Please sign in to comment.