Skip to content

Commit

Permalink
doc: README.md, CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kamarton committed Aug 25, 2024
1 parent 98e62d3 commit eaa6a77
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contributing

...

15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,29 @@ $builder = (new CacheHeaderBuilder())

### Mutable and immutable accessors

˙with˙ prefixed methods are immutable, eg. `withMaxAge()`. Methods without `with` prefix are mutable, eg. `maxAge()`.
- `with` prefixed methods are immutable, eg. `withMaxAge()`. Methods without `with` prefix are mutable, eg. `maxAge()`.
- `without` prefixed methods are immutable, eg. `withoutMaxAge()`. Methods with `reset` prefix are mutable, eg.
`resetMaxAge()`.

```php
$builderA = new CacheHeaderBuilder();
// mutable
$builderA->maxAge(30);
$builderA->resetMaxAge();

// immutable
$builderB = $builderA->withMaxAge(60);
$builderC = $builderB->withoutMaxAge();
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## License

This project is open-sourced software [licensed under](LICENSE).

## Author

- [Márton Somogyi](https://github.com/kamarton)

0 comments on commit eaa6a77

Please sign in to comment.