Skip to content

Commit

Permalink
Cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Riley19280 committed Aug 11, 2023
1 parent 7983fdc commit 413cb72
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/docs/walkthrough/content-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The **`append`** method will append content to the stencil on the last line
```php
Stencil::make()
->line('Hello')
->line(' World!')
->append(' World!')
// --- results in --- //
"Hello World!
"
Expand All @@ -37,7 +37,7 @@ The <strong><code>newline</code></strong> method will add empty line(s) to the s
Stencil::make()
->line('Hello')
->newline()
->line(' World!')
->line('World!')
// --- results in --- //
"Hello

Expand All @@ -61,7 +61,7 @@ Stencil::make()

---

:::note
:::info

The following functions can be used anywhere within the stencil, and will be inserted in the proper location when your stencil is rendered

Expand Down Expand Up @@ -120,7 +120,7 @@ Stencil::make()
```

### Use
The **`use`** method will set the namespace for the php file.
The **`use`** method add a use statement for the class at the top of the file.

Uses can be added from anywhere in the stencil, loops, conditionals, function calls, or anywhere else,
and will always show up in the proper location in the stencil
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/walkthrough/functions-and-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Functions and Variables can be leveraged to make those situations easy.

### Variables

Variables are defined as such:
Variables are defined using the `variable` method:

```php
Stencil::make()
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/walkthrough/indentation-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ World
```

### SetIndentLevel
The **`setIndentLevel`** method is an alias for a php shebang line
The **`setIndentLevel`** method will set the current indent level to a specific value

```php
Stencil::make()
Expand All @@ -57,7 +57,7 @@ Stencil::make()
```

### SpacesPerIndent
The **`spacesPerIndent`** changes the number of spaces when the <code>indent</code> method is used
The **`spacesPerIndent`** changes the number of spaces when the `indent` or `indented` method is used

```php
Stencil::make()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Saving your stencil
title: Saving and Formatting
sidebar_position: 5
---

Expand All @@ -11,7 +11,6 @@ If the provided path does not exist, then it will be created.
```php
Stencil::make()
->line('Hello World!')
->line('World!')
->save('/my/path/file.txt')
```

Expand All @@ -29,11 +28,15 @@ Stencil::make()

---

:::info

Code Stencils provide a variety of ways to format your code after its generated.
By default, if you have [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer), [Pint](https://laravel.com/docs/10.x/pint), or [StyleCI](https://styleci.io/)
installed in your project, your stencil will be formatted using that.
Otherwise, your stencil will not be formatted, unless you provided a custom formatter via the [setFormatter](#setFormatter) option.

:::

### SetFormatter
The **`setFormatter`** method can be used to override the formatter autodiscovery process

Expand Down

0 comments on commit 413cb72

Please sign in to comment.