Skip to content

Commit b9d8cea

Browse files
committed
Improve README.md and add a .editorconfig
1 parent 212ef00 commit b9d8cea

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,21 @@ CLI tools for managing output formatting
1010

1111
Have formatters that I can re-use in projects to format errors.
1212
Some code is copied from phpstan. See [#4122](https://github.com/phpstan/phpstan/issues/4122)
13+
14+
## Example usages
15+
16+
### Read/Write files
17+
18+
```php
19+
use CodeLts\CliTools\File\FileReader;
20+
use CodeLts\CliTools\File\FileWriter;
21+
22+
$fileName = 'myFile.txt';
23+
24+
FileWriter::write(
25+
$fileName,
26+
'the contents of your file'
27+
);
28+
29+
FileReader::read($fileName);// -> the contents of your file
30+
```

0 commit comments

Comments
 (0)