Skip to content

Commit

Permalink
Moved tables to the bottom of Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Nov 17, 2024
1 parent fa2556b commit 5653ba0
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 72 deletions.
142 changes: 71 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,77 @@

---

## Installation and usage

`Str2Name` is a self-contained class that can be included in any PHP
project directly or via Composer. It does not have any dependencies.

There are two ways to include `Str2Name` in your project:

- [Direct download](#direct-download)
- [Composer](#composer)

### Direct download

1. Download the file from
the [releases page](https://github.com/AlexSkrypnyk/str2name/releases)

2. Register the namespace in `composer.json` of your project:

```composer.json
{
"autoload": {
"psr-4": {
"AlexSkrypnyk\\Str2Name\\": "path/to/src/Str2Name.php"
}
}
}
```

3. Use it in your project:

```php
<php

use AlexSkrypnyk\Str2Name\Str2Name;

class MyClass {

public function myMethod() {
$string = 'string to convert';
// Convert string to machine name.
$string = Str2Name::machine($string);
}

}
```

### Composer

1. Require the package via Composer:

```bash
composer require alexskrypnyk/str2name
```

2. Use it in your project:

```php
<php

use AlexSkrypnyk\Str2Name\Str2Name;

class MyClass {

public function myMethod() {
$string = 'string to convert';
// Convert string to machine name.
$string = Str2Name::machine($string);
}

}
```

## Generic formatters

| Method | Conversion|
Expand Down Expand Up @@ -104,77 +175,6 @@
| `phpPackageNamespace` | `I am a__string-With sp@ce¥s 14 and 😀 unicode élève` <br/> `i-am-a__string-with-sp-ce-s-14-and-unicode-l-ve` |
| `sentence` | `I am a__string-With sp@ce¥s 14 and 😀 unicode élève` <br/> `I am a string-with sp@ce¥s 14 and 😀 unicode élève` |

## Installation and usage

`Str2Name` is a self-contained class that can be included in any PHP
project directly or via Composer. It does not have any dependencies.

There are two ways to include `Str2Name` in your project:

- [Direct download](#direct-download)
- [Composer](#composer)

### Direct download

1. Download the file from
the [releases page](https://github.com/AlexSkrypnyk/str2name/releases)

2. Register the namespace in `composer.json` of your project:

```composer.json
{
"autoload": {
"psr-4": {
"AlexSkrypnyk\\Str2Name\\": "path/to/src/Str2Name.php"
}
}
}
```

3. Use it in your project:

```php
<php

use AlexSkrypnyk\Str2Name\Str2Name;

class MyClass {

public function myMethod() {
$string = 'string to convert';
// Convert string to machine name.
$string = Str2Name::machine($string);
}

}
```

### Composer

1. Require the package via Composer:

```bash
composer require alexskrypnyk/str2name
```

2. Use it in your project:

```php
<php

use AlexSkrypnyk\Str2Name\Str2Name;

class MyClass {

public function myMethod() {
$string = 'string to convert';
// Convert string to machine name.
$string = Str2Name::machine($string);
}

}
```

## Maintenance

composer install
Expand Down
2 changes: 1 addition & 1 deletion docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
exit(1);
}

$readme_replaced = replace_content($readme, '## Generic formatters', '## Installation and usage', $markdown);
$readme_replaced = replace_content($readme, '## Generic formatters', '## Maintenance', $markdown);

if ($readme_replaced === $readme) {
echo "Documentation is up to date. No changes were made.\n";
Expand Down

0 comments on commit 5653ba0

Please sign in to comment.