Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nguereza-tony committed Feb 23, 2021
0 parents commit 053011f
Show file tree
Hide file tree
Showing 20 changed files with 1,589 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/composer.lock -merge
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea
composer.lock
vendor
nbproject
.phpunit.result.cache
.php_cs.cache
*.sh
158 changes: 158 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
build:
nodes:
analysis:
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: false
environment:
php: 7.4.0
filter:
excluded_paths:
- 'tests/*'
checks:
php:
simplify_boolean_return: true
return_doc_comments: true
return_doc_comment_if_not_inferrable: true
remove_extra_empty_lines: true
properties_in_camelcaps: true
phpunit_assertions: true
parameters_in_camelcaps: true
parameter_doc_comments: true
param_doc_comment_if_not_inferrable: true
overriding_parameter: true
no_short_method_names:
minimum: '3'
no_long_variable_names:
maximum: '20'
no_goto: true
naming_conventions:
local_variable: '^[a-z][a-zA-Z0-9]*$'
abstract_class_name: ^Abstract|Factory$
utility_class_name: 'Utils?$'
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
property_name: '^[a-z][a-zA-Z0-9]*$'
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
parameter_name: '^[a-z][a-zA-Z0-9]*$'
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
type_name: '^[A-Z][a-zA-Z0-9]*$'
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
isser_method_name: '^(?:is|has|should|may|supports)'
more_specific_types_in_doc_comments: true
fix_line_ending: true
check_method_contracts:
verify_interface_like_constraints: true
verify_documented_constraints: true
verify_parent_constraints: true

coding_style:
php:
indentation:
general:
use_tabs: false
size: 4
switch:
indent_case: true
spaces:
general:
linefeed_character: newline
before_parentheses:
function_declaration: false
closure_definition: false
function_call: false
if: true
for: true
while: true
switch: true
catch: true
array_initializer: false
around_operators:
assignment: true
logical: true
equality: true
relational: true
bitwise: true
additive: true
multiplicative: true
shift: true
unary_additive: false
concatenation: true
negation: false
before_left_brace:
class: true
function: true
if: true
else: true
for: true
while: true
do: true
switch: true
try: true
catch: true
finally: true
before_keywords:
else: true
while: true
catch: true
finally: true
within:
brackets: false
array_initializer: false
grouping: false
function_call: false
function_declaration: false
if: false
for: false
while: false
switch: false
catch: false
type_cast: false
ternary_operator:
before_condition: true
after_condition: true
before_alternative: true
after_alternative: true
in_short_version: false
other:
before_comma: false
after_comma: true
before_semicolon: false
after_semicolon: true
after_type_cast: true
braces:
classes_functions:
class: end-of-line
function: end-of-line
closure: end-of-line
if:
opening: end-of-line
always: true
else_on_new_line: false
for:
opening: end-of-line
always: true
while:
opening: end-of-line
always: true
do_while:
opening: end-of-line
always: true
while_on_new_line: false
switch:
opening: end-of-line
try:
opening: end-of-line
catch_on_new_line: false
finally_on_new_line: false
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower

20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
env:
global:
- CC_TEST_REPORTER_ID=4fc98dcb9ebdf7add7dcc8bb2768af747f73ed27d69504951f93e69a1a95a035
dist: bionic
language: php
php:
- '7.4'


before_script:
- composer install
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- "vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
after_script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build -t clover --exit-code $TRAVIS_TEST_RESULT; fi
matrix:
fast_finish: true
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

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, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

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.

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.

## Scope

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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and 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.

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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
1 change: 1 addition & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Contribution content
21 changes: 21 additions & 0 deletions LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Platine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 30 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## PLATINE SESSION
**Platine Session is the lightweight implementation of php native session handler interface**

[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
[![Latest Stable Version](https://poser.pugx.org/platine-php/session/v)](https://packagist.org/packages/platine-php/session)
[![Latest Unstable Version](https://poser.pugx.org/platine-php/session/v/unstable)](https://packagist.org/packages/platine-php/session)
[![License](https://poser.pugx.org/platine-php/session/license)](https://packagist.org/packages/platine-php/session)
[![Build Status](https://img.shields.io/travis/platine-php/session/develop.svg?style=flat-square)](https://travis-ci.com/platine-php/session)
[![Quality Score](https://img.shields.io/scrutinizer/g/platine-php/session.svg?style=flat-square)](https://scrutinizer-ci.com/g/platine-php/session)
[![Maintainability](https://api.codeclimate.com/v1/badges/ead7b1ada15711ef0b1e/maintainability)](https://codeclimate.com/github/platine-php/session/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/ead7b1ada15711ef0b1e/test_coverage)](https://codeclimate.com/github/platine-php/session/test_coverage)

### Requirements
- **PHP >= 7.4**, **PHP 8**

### Installation
#### Using composer (recommended)
```bash
composer require platine-php/session
```

### Supported drivers
- **File**


### License
MIT License See [LICENSE.MD](LICENSE.MD)

### Documentation
Coming soon, be patient
66 changes: 66 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "platine-php/session",
"description": "Platine Session is the lightweight implementation of php native session handler interface",
"type": "library",
"license": "MIT",
"keywords": ["application", "website", "development", "framework", "php", "platine", "session"],
"authors": [
{
"name": "NGUEREZA Tony",
"email": "[email protected]",
"homepage": "http://www.iacademy.cf",
"role": "developer"
}
],

"support": {
"issues": "https://github.com/platine-php/session/issues",
"source": "https://github.com/platine-php/session"
},

"require": {
"php": "^7.4 || ^8"
},

"require-dev": {
"mikey179/vfsstream": "~1.6",
"phpmd/phpmd": "@stable",
"phpunit/phpunit": "^9",
"platine-php/test-tools": "dev-develop",
"squizlabs/php_codesniffer": "3.*",
"vimeo/psalm": "4.x-dev"
},

"autoload": {
"psr-4":{
"Platine\\Session\\": "src/"
}
},

"autoload-dev": {
"psr-4":{
"Platine\\Test\\": "tests"
},
"files": ["tests/fixtures/mocks.php"]
},

"config": {
"sort-packages": true
},

"extra": {
"branch-alias": {
"dev-develop": "1.0.x-dev"
}
},

"scripts": {
"test": "phpunit --colors=always",
"static": "psalm",
"check": "phpcs",
"check-fix": "phpcbf",
"analyze": "phpmd src xml phpmd.xml"
},

"minimum-stability": "dev"
}
Loading

0 comments on commit 053011f

Please sign in to comment.