Skip to content

Commit dc197e2

Browse files
committed
first commit
0 parents  commit dc197e2

15 files changed

Lines changed: 594 additions & 0 deletions

‎.gitignore‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# IntelliJ
2+
.idea
3+
*.iml
4+
5+
# Composer
6+
vendor/
7+
composer.lock
8+
9+
# PHP code sniffer
10+
.php_cs.cache
11+
12+
# PHP Unit
13+
build/
14+
15+
# Dev / Testing
16+
test.php
17+
coverage/*
18+
!coverage/.gitkeep

‎.php_cs‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
$finder = PhpCsFixer\Finder::create()
3+
->in(__DIR__ . '/src')
4+
->in(__DIR__ . '/tests')
5+
;
6+
return PhpCsFixer\Config::create()
7+
->setRiskyAllowed(true)
8+
->setRules([
9+
'@Symfony' => true,
10+
'binary_operator_spaces' => array(
11+
'align_equals' => false,
12+
'align_double_arrow' => true,
13+
),
14+
'@Symfony:risky' => true,
15+
'array_syntax' => ['syntax' => 'short'],
16+
'declare_strict_types' => true,
17+
'linebreak_after_opening_tag' => true,
18+
'mb_str_functions' => true,
19+
'no_php4_constructor' => true,
20+
'no_unreachable_default_argument_value' => true,
21+
'no_useless_else' => true,
22+
'no_useless_return' => true,
23+
'ordered_imports' => true,
24+
'php_unit_strict' => true,
25+
'phpdoc_order' => true,
26+
'semicolon_after_instruction' => true,
27+
'strict_comparison' => true,
28+
'strict_param' => true,
29+
'concat_space' => ['spacing' => 'one'],
30+
'trailing_comma_in_multiline_array' => false,
31+
'yoda_style' => null
32+
])
33+
->setFinder($finder)
34+
->setCacheFile(__DIR__.'/.php_cs.cache');

‎.travis.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: php
2+
3+
php:
4+
- 7.2
5+
6+
install:
7+
- composer selfupdate
8+
- composer install
9+
10+
script:
11+
- ./vendor/bin/phpcs -s
12+
- ./vendor/bin/php-cs-fixer fix --diff --dry-run
13+
- ./vendor/bin/phpunit --colors --coverage-text --coverage-clover build/logs/clover.xml
14+
15+
after_success:
16+
- travis_retry php vendor/bin/coveralls

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Rancoud
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Session Package
2+
3+
[![Build Status](https://travis-ci.org/rancoud/Session.svg?branch=master)](https://travis-ci.org/rancoud/Session) [![Coverage Status](https://coveralls.io/repos/github/rancoud/Session/badge.svg?branch=master)](https://coveralls.io/github/rancoud/Session?branch=master)
4+
5+
Session.
6+
7+
## Installation
8+
```php
9+
composer require rancoud/session
10+
```
11+
12+
## How to use it?
13+
```php
14+
15+
```
16+
17+
## Session Constructor
18+
### Settings
19+
#### Mandatory
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| | | |
23+
24+
#### Optionnals
25+
| Parameter | Type | Default value | Description |
26+
| --- | --- | --- | --- |
27+
| | | | |
28+
29+
## Session Methods
30+
### General Commands
31+
* method(name: type, [optionnal: type = defalut]):outputType
32+
33+
34+
## How to Dev
35+
### Linux
36+
#### Coding Style
37+
./vendor/bin/phpcbf
38+
./vendor/bin/phpcs
39+
./vendor/bin/php-cs-fixer fix --diff
40+
#### Unit Testing
41+
./vendor/bin/phpunit --colors
42+
#### Code Coverage
43+
##### Local
44+
./vendor/bin/phpunit --colors --coverage-html ./coverage
45+
##### Coveralls.io
46+
./vendor/bin/phpunit --colors --coverage-text --coverage-clover build/logs/clover.xml
47+
48+
### Windows
49+
#### Coding Style
50+
"vendor/bin/phpcbf.bat"
51+
"vendor/bin/phpcs.bat"
52+
"vendor/bin/php-cs-fixer.bat" fix --diff
53+
#### Unit Testing
54+
"vendor/bin/phpunit.bat" --colors
55+
#### Code Coverage
56+
##### Local
57+
"vendor/bin/phpunit.bat" --colors --coverage-html ./coverage
58+
##### Coveralls.io
59+
"vendor/bin/phpunit.bat" --colors --coverage-text --coverage-clover build/logs/clover.xml

‎composer.json‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "rancoud/session",
3+
"description": "Session package",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Sebastien Rancoud",
9+
"email": "contact@rancoud.com"
10+
}
11+
],
12+
"minimum-stability": "stable",
13+
"autoload": {
14+
"psr-4": {
15+
"Rancoud\\Session\\": "src"
16+
}
17+
},
18+
"require": {
19+
"php": ">=7.2.0"
20+
},
21+
"require-dev": {
22+
"phpunit/phpunit": "~6.2.0",
23+
"squizlabs/php_codesniffer": "^3.0",
24+
"friendsofphp/php-cs-fixer": "^2.5",
25+
"satooshi/php-coveralls": "^1.0"
26+
}
27+
}

‎coverage/.gitkeep‎

Whitespace-only changes.

‎phpcs.xml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ruleset name="Session">
3+
<description>Session</description>
4+
5+
<arg name="colors"/>
6+
<arg value="p"/>
7+
8+
<file>src</file>
9+
<file>tests</file>
10+
11+
<rule ref="PSR2"></rule>
12+
13+
</ruleset>

‎phpunit.xml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<phpunit bootstrap="./vendor/autoload.php">
2+
<testsuites>
3+
<testsuite>
4+
<directory>tests</directory>
5+
</testsuite>
6+
</testsuites>
7+
8+
<filter>
9+
<whitelist>
10+
<directory>src/</directory>
11+
</whitelist>
12+
</filter>
13+
</phpunit>

‎run_all_commands.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
./vendor/bin/phpcbf
2+
./vendor/bin/phpcs
3+
./vendor/bin/php-cs-fixer fix
4+
./vendor/bin/phpunit --colors --coverage-html ./coverage

0 commit comments

Comments
 (0)