-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Florent Morselli
committed
Jan 17, 2015
1 parent
08bba95
commit cc5aebb
Showing
7 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
before_commands: | ||
- "composer install --prefer-dist" | ||
|
||
tools: | ||
external_code_coverage: true | ||
php_mess_detector: true | ||
php_code_sniffer: true | ||
php_analyzer: true | ||
sensiolabs_security_checker: true | ||
php_code_coverage: true | ||
php_sim: false | ||
php_cpd: true | ||
php_pdepend: | ||
excluded_dirs: [vendor/*, doc/*, tests/*] | ||
filter: | ||
excluded_paths: [vendor/*, doc/*, tests/*] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
|
||
matrix: | ||
allow_failures: | ||
- php: hhvm | ||
|
||
before_script: | ||
- curl -s http://getcomposer.org/installer | php | ||
- php composer.phar update --dev --no-interaction | ||
|
||
script: | ||
- mkdir -p build/logs | ||
- php vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml | ||
|
||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Base64 Url Safe | ||
|
||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Spomky-Labs/base64url/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Spomky-Labs/base64url/?branch=master) | ||
[![Code Coverage](https://scrutinizer-ci.com/g/Spomky-Labs/base64url/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Spomky-Labs/base64url/?branch=master) | ||
[![Build Status](https://scrutinizer-ci.com/g/Spomky-Labs/base64url/badges/build.png?b=master)](https://scrutinizer-ci.com/g/Spomky-Labs/base64url/build-status/master) | ||
[![HHVM Status](http://hhvm.h4cc.de/badge/Spomky-Labs/base64url.png)](http://hhvm.h4cc.de/package/Spomky-Labs/base64url) | ||
|
||
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/0f8f9b12-2076-4d0e-a34e-c6f097c61b16/big.png)](https://insight.sensiolabs.com/projects/0f8f9b12-2076-4d0e-a34e-c6f097c61b16) | ||
|
||
[![Latest Stable Version](https://poser.pugx.org/Spomky-Labs/base64url/v/stable.png)](https://packagist.org/packages/Spomky-Labs/base64url) [![Total Downloads](https://poser.pugx.org/Spomky-Labs/base64url/downloads.png)](https://packagist.org/packages/Spomky-Labs/base64url) [![Latest Unstable Version](https://poser.pugx.org/Spomky-Labs/base64url/v/unstable.png)](https://packagist.org/packages/Spomky-Labs/base64url) [![License](https://poser.pugx.org/Spomky-Labs/base64url/license.png)](https://packagist.org/packages/Spomky-Labs/base64url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "spomky-labs/base64url", | ||
"description": "Base 64 URL Safe", | ||
"type": "library", | ||
"license": "MIT", | ||
"keywords": ["Base64", "URL", "Safe"], | ||
"homepage": "https://github.com/Spomky-Labs/base64url", | ||
"authors": [ | ||
{ | ||
"name": "Florent Morselli", | ||
"homepage": "https://github.com/Spomky-Labs/base64url/contributors" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Base64Url\\": "lib/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Base64Url\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": ">=5.3" | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "0.0.x-dev" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Base64Url; | ||
|
||
/** | ||
* Encode and decode data into Base64 Url Safe | ||
*/ | ||
class Base64Url | ||
{ | ||
public static function encode($data) | ||
{ | ||
return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); | ||
} | ||
|
||
public static function decode($data) | ||
{ | ||
return base64_decode(strtr($data, '-_', '+/')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
backupGlobals="false" | ||
strict="true" | ||
backupStaticAttributes="false" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="true" | ||
bootstrap="vendor/autoload.php" | ||
colors="true"> | ||
<testsuites> | ||
<testsuite name="Test Suite"> | ||
<directory suffix="Test.php">./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">./</directory> | ||
<exclude> | ||
<directory>./tests</directory> | ||
<directory>./doc</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |