Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 6113ec2

Browse files
committed
Added Github bits...
1 parent d4a97ef commit 6113ec2

File tree

4 files changed

+132
-0
lines changed

4 files changed

+132
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Contributing to the PhpFastCache Bundle
2+
========================================
3+
4+
Please note that this project is released with a
5+
[Contributor Code of Conduct](http://contributor-covenant.org/version/1/4/).
6+
By participating in this project you agree to abide by its terms.
7+
8+
Reporting Issues
9+
----------------
10+
11+
When reporting issues, please try to be as descriptive as possible, and include
12+
as much relevant information as you can. A step by step guide on how to
13+
reproduce the issue will greatly increase the chances of your issue being
14+
resolved in a timely manner.
15+
16+
Contributing policy
17+
-------------------
18+
19+
Our contributing policy is described in our [Coding Guideline](https://github.com/PHPSocialNetwork/phpfastcache-bundle/blob/V3/CODING_GUIDELINE.md)

.github/ISSUE_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Configuration:
2+
3+
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
4+
- **PhpFastCache bundle version:** "...replace me (Can be retrieved using constant `\Phpfastcache\Bundle\PhpfastcacheBundle::VERSION`)..."
5+
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
6+
- **PHP version:** "...replace me (Can be retrieved using command line `php -v | sed -n 1p`)..."
7+
- **Operating system:** " ...replace me (You REALLY should know it)... "
8+
9+
#### Issue description:
10+
11+
> ... Your description goes here ...
12+
... You can also read the [wiki](https://github.com/PHPSocialNetwork/phpfastcache-bundle/wiki) ...

CODE_OF_CONDUCT.md

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

CODING_GUIDELINE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
CODING GUIDELINE
2+
-------------------
3+
4+
Fork the project, create a feature branch, and send us a pull request.
5+
Preferably on a distinct branch.
6+
7+
To ensure a consistent code base, you should make sure the code follows
8+
the [PSR-2 Coding Standards](http://www.php-fig.org/psr/psr-2/). You can also
9+
run [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) with the
10+
configuration file that can be found in the project root directory.
11+
12+
If you would like to help, take a look at the [list of open issues](https://github.com/PHPSocialNetwork/phpfastcache/issues).
13+
14+
PHPFASTCACHE's specialties
15+
-------------------
16+
As of the V7 your contributions MUST comply the following standards:
17+
18+
### PHP CORE FUNCTIONS
19+
- To improve opcode efficiency, you MUST prefix core function by a '\\'
20+
- E.g: `$var = \str_replace('value', '', $var);`
21+
22+
### PHP CORE CLASSES
23+
- Do not imports non-namespaced classes, use an absolute path instead:
24+
- E.g: `$date = new \DateTime();`
25+
26+
### CODE STYLE
27+
- Unneeded/inconsistent `else` statements have to be shortened.
28+
- E.g:
29+
```php
30+
<?php
31+
function setAcme($acme)
32+
{
33+
if ($acme instanceof Acme) {
34+
$this->acme = $acme;
35+
return $this;
36+
} else {
37+
throw new phpFastCacheInvalidArgumentException('Invalid acme instance');
38+
}
39+
}
40+
```
41+
- This example can be safely replaced by this one:
42+
```php
43+
<?php
44+
function setAcme($acme)
45+
{
46+
if ($acme instanceof Acme) {
47+
$this->acme = $acme;
48+
return $this;
49+
}
50+
51+
throw new phpFastCacheInvalidArgumentException('Invalid acme instance');
52+
}
53+
```
54+
[Read this thread on StackExchange for more information](https://softwareengineering.stackexchange.com/questions/122485/elegant-ways-to-handle-ifif-else-else)
55+
This list is non-exhaustive and will may subject to evolve at any time.

0 commit comments

Comments
 (0)