Skip to content

Commit dcda86f

Browse files
committed
Update files
1 parent 10858e6 commit dcda86f

File tree

3 files changed

+167
-7
lines changed

3 files changed

+167
-7
lines changed

CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Contributing
2+
3+
## Only one feature or change per pull request
4+
5+
Make pull requests only one feature or change at the time. Make pull requests from feature branch. Pull requests should not come from your master branch.
6+
7+
For example you have fixed a bug. You also have optimized some code. Optimization is not related to a bug. These should be submitted as separate pull requests. This way I can easily choose what to include. It is also easier to understand the code changes.
8+
9+
## Write meaningful commit messages
10+
11+
Proper commit message is full sentence. It starts with capital letter but does not end with period. Headlines do not end with period. The GitHub default `Update filename.js` is not enough. When needed include also longer explanation what the commit does.
12+
13+
```
14+
Capitalized, short (50 chars or less) summary
15+
16+
More detailed explanatory text, if necessary. Wrap it to about 72
17+
characters or so. In some contexts, the first line is treated as the
18+
subject of an email and the rest of the text as the body. The blank
19+
line separating the summary from the body is critical (unless you omit
20+
the body entirely); tools like rebase can get confused if you run the
21+
two together.
22+
```
23+
24+
When in doubt see Tim Pope's blogpost [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
25+
26+
## Send coherent history
27+
28+
Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
29+
30+
## Follow the existing coding standards
31+
32+
When contributing to open source project it is polite to follow the original authors coding standars. They might be different than yours. It is not a holy war. This project uses **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)**
33+
34+
## Running Tests
35+
36+
You can run individual tests either manually...
37+
38+
``` bash
39+
$ composer phplint
40+
$ composer phpcs
41+
$ composer phpunit
42+
```
43+
44+
... or automatically on every code change. You will need [entr](http://entrproject.org/) for this to work.
45+
46+
``` bash
47+
$ composer watch
48+
```

README.md

+45-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
# IniParser
1+
<h1 align="center">
2+
PHP .ini parser
3+
</h1>
24

3-
IniParser is a simple parser for complex INI files, providing a number of extra syntactic features to the built-in INI parsing functions, including section inheritance, property nesting, and array literals.
5+
<hr />
6+
7+
[![Build Status][build-badge]][build]
8+
[![downloads][downloads-badge]][downloads]
9+
[![MIT License][license-badge]][license]
10+
11+
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)
12+
[![PRs Welcome][prs-badge]][prs]
13+
[![Code of Conduct][coc-badge]][coc]
14+
[![Watch on GitHub][github-watch-badge]][github-watch]
15+
[![Star on GitHub][github-star-badge]][github-star]
16+
[![Tweet][twitter-badge]][twitter]
17+
18+
# \Ini\Parser
19+
20+
\Ini\Parser is a simple parser for complex INI files, providing a number of extra syntactic features to the built-in INI parsing functions, including section inheritance, property nesting, and array literals.
421

522
## Installing by [Composer](https://getcomposer.org)
623

@@ -64,9 +81,9 @@ This is great when you just want a simple configuration file, but here is a supe
6481
database.name = production
6582
database.username = root
6683

67-
And when parsed with IniParser:
84+
And when parsed with \Ini\Parser:
6885

69-
$parser = new \IniParser('sample.ini');
86+
$parser = new \Ini\Parser('sample.ini');
7087
$config = $parser->parse();
7188

7289
You get the following structure:
@@ -163,7 +180,7 @@ array(
163180

164181
### Property Nesting
165182

166-
IniParser allows you to treat properties as associative arrays:
183+
\Ini\Parser allows you to treat properties as associative arrays:
167184

168185
person.age = 42
169186
person.name.first = John
@@ -185,7 +202,7 @@ array (
185202

186203
### Section Inheritance
187204

188-
Keeping to the DRY principle, IniParser allows you to "inherit" from other sections (similar to OOP inheritance), meaning you don't have to continually re-define the same properties over and over again. As you can see in the example above, "production" inherits from "staging", which in turn inherits from "testing".
205+
Keeping to the DRY principle, \Ini\Parser allows you to "inherit" from other sections (similar to OOP inheritance), meaning you don't have to continually re-define the same properties over and over again. As you can see in the example above, "production" inherits from "staging", which in turn inherits from "testing".
189206

190207
You can even inherit from multiple parents, as in `[child : p1 : p2 : p3]`. The properties of each parent are merged into the child from left to right, so that the properties in `p1` are overridden by those in `p2`, then by `p3`, then by those in `child` on top of that.
191208

@@ -235,9 +252,30 @@ array (
235252

236253
### ArrayObject
237254

238-
As an added bonus, IniParser also allows you to access the values OO-style:
255+
As an added bonus, \Ini\Parser also allows you to access the values OO-style:
239256

240257
```php
241258
echo $config->production->database->connection; // output: mysql:host=127.0.0.1
242259
echo $config->staging->debug; // output: 1
243260
```
261+
262+
## License
263+
264+
The code is available under the [MIT license](LICENSE.md).
265+
266+
[build-badge]: https://img.shields.io/travis/me-io/php-ini-parser.svg?style=flat-square
267+
[build]: https://travis-ci.org/me-io/php-ini-parser
268+
[downloads-badge]: https://img.shields.io/packagist/dm/me-io/php-ini-parser.svg?style=flat-square
269+
[downloads]: https://packagist.org/packages/me-io/php-ini-parser/stats
270+
[license-badge]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
271+
[license]: https://github.com/me-io/php-ini-parser/blob/master/LICENSE.md
272+
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
273+
[prs]: http://makeapullrequest.com
274+
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
275+
[coc]: https://github.com/me-io/php-ini-parser/blob/master/CODE_OF_CONDUCT.md
276+
[github-watch-badge]: https://img.shields.io/github/watchers/me-io/php-ini-parser.svg?style=social
277+
[github-watch]: https://github.com/me-io/php-ini-parser/watchers
278+
[github-star-badge]: https://img.shields.io/github/stars/me-io/php-ini-parser.svg?style=social
279+
[github-star]: https://github.com/me-io/php-ini-parser/stargazers
280+
[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20php-ini-parser!%20https://github.com/me-io/php-ini-parser%20%F0%9F%91%8D
281+
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/me-io/php-ini-parser.svg?style=social

0 commit comments

Comments
 (0)