From 5c08d03ae0f36a2a30edb1e658e330622379a870 Mon Sep 17 00:00:00 2001 From: Sorin Date: Sun, 23 Feb 2014 15:20:55 +0200 Subject: [PATCH 1/4] Doc improvement --- composer.json | 4 +-- composer.lock | 45 ++++++++++++++-------------- src/Constants/Method.php | 20 ++++++------- src/Constants/RequestHeader.php | 4 +-- src/Constants/ResponseHeader.php | 4 +-- src/Constants/StatusCode.php | 2 +- src/Foundation/AbstractRequest.php | 2 +- src/Foundation/AbstractResponse.php | 2 +- src/Foundation/CookieInterface.php | 2 +- src/Foundation/RequestInterface.php | 2 +- src/Foundation/ResponseInterface.php | 2 +- src/Utils/BodyParser.php | 2 +- src/Utils/MimeTypeGuesser.php | 2 +- 13 files changed, 47 insertions(+), 46 deletions(-) diff --git a/composer.json b/composer.json index 21cea6b..633cad4 100644 --- a/composer.json +++ b/composer.json @@ -13,10 +13,10 @@ "role": "Developer" } ], - "minimum-stability": "stable", + "minimum-stability": "dev", "require": { "php": ">=5.4.0", - "thinframe/foundation": "@stable" + "thinframe/foundation": "dev-develop" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index d091f92..c395c6a 100644 --- a/composer.lock +++ b/composer.lock @@ -3,20 +3,20 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "558940a96774a055185fafb5527e702e", + "hash": "bf7d43cd1fb07b7191ea3de0645fdcbd", "packages": [ { "name": "danielstjules/stringy", - "version": "1.2.2", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/danielstjules/Stringy.git", - "reference": "6ba29637b2b2bc8cfd735539c6f9716ae8957477" + "reference": "404909ffaa37f4c756817c0b1e459efee62b90a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/6ba29637b2b2bc8cfd735539c6f9716ae8957477", - "reference": "6ba29637b2b2bc8cfd735539c6f9716ae8957477", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/404909ffaa37f4c756817c0b1e459efee62b90a6", + "reference": "404909ffaa37f4c756817c0b1e459efee62b90a6", "shasum": "" }, "require": { @@ -24,8 +24,8 @@ }, "type": "library", "autoload": { - "psr-0": { - "Stringy": "src/" + "psr-4": { + "Stringy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -52,20 +52,20 @@ "utility", "utils" ], - "time": "2013-12-05 04:36:17" + "time": "2014-02-17 16:22:59" }, { "name": "phpcollection/phpcollection", - "version": "0.3.1", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "dbec93115a5ff149b476ee2d4ede3880239a3d77" + "reference": "cad39389bb3134aca06b1b7fad5d3ecf7c3b7d74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/dbec93115a5ff149b476ee2d4ede3880239a3d77", - "reference": "dbec93115a5ff149b476ee2d4ede3880239a3d77", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/cad39389bb3134aca06b1b7fad5d3ecf7c3b7d74", + "reference": "cad39389bb3134aca06b1b7fad5d3ecf7c3b7d74", "shasum": "" }, "require": { @@ -102,7 +102,7 @@ "sequence", "set" ], - "time": "2013-12-13 09:27:51" + "time": "2014-01-26 10:18:52" }, { "name": "phpoption/phpoption", @@ -155,30 +155,31 @@ }, { "name": "thinframe/foundation", - "version": "dev-master", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/thinframe/foundation.git", - "reference": "9185ddd7c9ac915ca98005beb4916f3cc010dce8" + "reference": "c48b0c6e127b6ce0ffd65b4ee5d2e7eaa697ff58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thinframe/foundation/zipball/9185ddd7c9ac915ca98005beb4916f3cc010dce8", - "reference": "9185ddd7c9ac915ca98005beb4916f3cc010dce8", + "url": "https://api.github.com/repos/thinframe/foundation/zipball/c48b0c6e127b6ce0ffd65b4ee5d2e7eaa697ff58", + "reference": "c48b0c6e127b6ce0ffd65b4ee5d2e7eaa697ff58", "shasum": "" }, "require": { - "danielstjules/stringy": "1.2.*", + "danielstjules/stringy": "@stable", "php": ">=5.4.0", - "phpcollection/phpcollection": "0.3.*" + "phpcollection/phpcollection": "@stable" }, "require-dev": { - "phpunit/phpunit": "3.7.*" + "phpunit/phpunit": "@stable" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.2-dev" + "dev-master": "0.2-dev", + "dev-develop": "0.3-dev" } }, "autoload": { @@ -204,7 +205,7 @@ "foundation", "thinframe" ], - "time": "2014-01-22 18:16:30" + "time": "2014-02-12 18:02:48" } ], "packages-dev": [ diff --git a/src/Constants/Method.php b/src/Constants/Method.php index 73bbc6a..402a9ed 100644 --- a/src/Constants/Method.php +++ b/src/Constants/Method.php @@ -3,7 +3,7 @@ /** * /src/Constants/Method.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -19,12 +19,12 @@ */ final class Method extends AbstractEnum { - const GET = 'get'; - const HEAD = 'head'; - const OPTIONS = 'options'; - const TRACE = 'trace'; - const POST = 'post'; - const PUT = 'put'; - const DELETE = 'delete'; - const PATCH = 'patch'; -} \ No newline at end of file + const GET = 'GET'; + const HEAD = 'HEAD'; + const OPTIONS = 'OPTIONS'; + const TRACE = 'TRACE'; + const POST = 'POST'; + const PUT = 'PUT'; + const DELETE = 'DELETE'; + const PATCH = 'PATCH'; +} diff --git a/src/Constants/RequestHeader.php b/src/Constants/RequestHeader.php index 9e60beb..75313af 100644 --- a/src/Constants/RequestHeader.php +++ b/src/Constants/RequestHeader.php @@ -3,7 +3,7 @@ /** * /src/Constants/RequestHeader.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -54,4 +54,4 @@ final class RequestHeader const DNT = 'DNT'; const X_FORWARDED_FOR = 'X-Forwarded-For'; const X_FORWARDED_PROTO = 'X-Forwarded-Proto'; -} \ No newline at end of file +} diff --git a/src/Constants/ResponseHeader.php b/src/Constants/ResponseHeader.php index 3c7d624..bdfdcdd 100644 --- a/src/Constants/ResponseHeader.php +++ b/src/Constants/ResponseHeader.php @@ -3,7 +3,7 @@ /** * /src/Constants/ResponseHeader.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -53,4 +53,4 @@ final class ResponseHeader const VIA = 'Via'; const WARNING = 'Warning'; const WWW_AUTHENTICATE = 'WWW-Authenticate'; -} \ No newline at end of file +} diff --git a/src/Constants/StatusCode.php b/src/Constants/StatusCode.php index 9ffd0dd..926e0b8 100644 --- a/src/Constants/StatusCode.php +++ b/src/Constants/StatusCode.php @@ -3,7 +3,7 @@ /** * /src/Constants/StatusCode.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Foundation/AbstractRequest.php b/src/Foundation/AbstractRequest.php index c80bf2e..ae1c7e0 100644 --- a/src/Foundation/AbstractRequest.php +++ b/src/Foundation/AbstractRequest.php @@ -3,7 +3,7 @@ /** * /src/Foundation/AbstractRequest.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Foundation/AbstractResponse.php b/src/Foundation/AbstractResponse.php index 894798a..f529d76 100644 --- a/src/Foundation/AbstractResponse.php +++ b/src/Foundation/AbstractResponse.php @@ -3,7 +3,7 @@ /** * /src/Foundation/AbstractResponse.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Foundation/CookieInterface.php b/src/Foundation/CookieInterface.php index 5581ea8..8b25ec4 100644 --- a/src/Foundation/CookieInterface.php +++ b/src/Foundation/CookieInterface.php @@ -3,7 +3,7 @@ /** * /src/Foundation/CookieInterface.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Foundation/RequestInterface.php b/src/Foundation/RequestInterface.php index c0578ac..2dae94b 100644 --- a/src/Foundation/RequestInterface.php +++ b/src/Foundation/RequestInterface.php @@ -3,7 +3,7 @@ /** * /src/Foundation/CookieInterface.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Foundation/ResponseInterface.php b/src/Foundation/ResponseInterface.php index 199bd93..5c42c8d 100644 --- a/src/Foundation/ResponseInterface.php +++ b/src/Foundation/ResponseInterface.php @@ -3,7 +3,7 @@ /** * /src/Foundation/ResponseInterface.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Utils/BodyParser.php b/src/Utils/BodyParser.php index 27b8640..1afc871 100644 --- a/src/Utils/BodyParser.php +++ b/src/Utils/BodyParser.php @@ -3,7 +3,7 @@ /** * /src/Utils/BodyParser.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ diff --git a/src/Utils/MimeTypeGuesser.php b/src/Utils/MimeTypeGuesser.php index 0d8b5cd..ca323e4 100644 --- a/src/Utils/MimeTypeGuesser.php +++ b/src/Utils/MimeTypeGuesser.php @@ -3,7 +3,7 @@ /** * /src//Utils/BodyParser.php * - * @copyright 2013 Sorin Badea + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ From f89a63e467bf546e5ee312d89a9f8f7a139df17a Mon Sep 17 00:00:00 2001 From: Sorin Date: Sun, 23 Feb 2014 18:47:11 +0200 Subject: [PATCH 2/4] Lower case methods --- src/Constants/Method.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Constants/Method.php b/src/Constants/Method.php index 402a9ed..2f35b9a 100644 --- a/src/Constants/Method.php +++ b/src/Constants/Method.php @@ -19,12 +19,12 @@ */ final class Method extends AbstractEnum { - const GET = 'GET'; - const HEAD = 'HEAD'; - const OPTIONS = 'OPTIONS'; - const TRACE = 'TRACE'; - const POST = 'POST'; - const PUT = 'PUT'; - const DELETE = 'DELETE'; - const PATCH = 'PATCH'; + const GET = 'get'; + const HEAD = 'head'; + const OPTIONS = 'options'; + const TRACE = 'trace'; + const POST = 'post'; + const PUT = 'put'; + const DELETE = 'delete'; + const PATCH = 'patch'; } From 498e72c4c44f0277ac53962e9c0a0db47269d921 Mon Sep 17 00:00:00 2001 From: Sorin Date: Sun, 9 Mar 2014 16:33:12 +0200 Subject: [PATCH 3/4] Namespace refactoring --- src/{Constants => Constant}/Method.php | 4 ++-- src/{Constants => Constant}/RequestHeader.php | 2 +- src/{Constants => Constant}/ResponseHeader.php | 2 +- src/{Constants => Constant}/StatusCode.php | 8 ++++---- src/Foundation/AbstractRequest.php | 2 +- src/Foundation/AbstractResponse.php | 2 +- src/Foundation/RequestInterface.php | 2 +- src/Foundation/ResponseInterface.php | 2 +- src/{Utils => Util}/BodyParser.php | 2 +- src/{Utils => Util}/MimeTypeGuesser.php | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) rename src/{Constants => Constant}/Method.php (86%) rename src/{Constants => Constant}/RequestHeader.php (98%) rename src/{Constants => Constant}/ResponseHeader.php (98%) rename src/{Constants => Constant}/StatusCode.php (96%) rename src/{Utils => Util}/BodyParser.php (99%) rename src/{Utils => Util}/MimeTypeGuesser.php (99%) diff --git a/src/Constants/Method.php b/src/Constant/Method.php similarity index 86% rename from src/Constants/Method.php rename to src/Constant/Method.php index 2f35b9a..a4c0149 100644 --- a/src/Constants/Method.php +++ b/src/Constant/Method.php @@ -7,9 +7,9 @@ * @license MIT license (see the license file in the root directory) */ -namespace ThinFrame\Http\Constants; +namespace ThinFrame\Http\Constant; -use ThinFrame\Foundation\DataTypes\AbstractEnum; +use ThinFrame\Foundation\DataType\AbstractEnum; /** * Class Method diff --git a/src/Constants/RequestHeader.php b/src/Constant/RequestHeader.php similarity index 98% rename from src/Constants/RequestHeader.php rename to src/Constant/RequestHeader.php index 75313af..055c7d4 100644 --- a/src/Constants/RequestHeader.php +++ b/src/Constant/RequestHeader.php @@ -7,7 +7,7 @@ * @license MIT license (see the license file in the root directory) */ -namespace ThinFrame\Http\Constants; +namespace ThinFrame\Http\Constant; /** * Class RequestHeader diff --git a/src/Constants/ResponseHeader.php b/src/Constant/ResponseHeader.php similarity index 98% rename from src/Constants/ResponseHeader.php rename to src/Constant/ResponseHeader.php index bdfdcdd..875191e 100644 --- a/src/Constants/ResponseHeader.php +++ b/src/Constant/ResponseHeader.php @@ -7,7 +7,7 @@ * @license MIT license (see the license file in the root directory) */ -namespace ThinFrame\Http\Constants; +namespace ThinFrame\Http\Constant; /** * Class ResponseHeader diff --git a/src/Constants/StatusCode.php b/src/Constant/StatusCode.php similarity index 96% rename from src/Constants/StatusCode.php rename to src/Constant/StatusCode.php index 926e0b8..dc5ad94 100644 --- a/src/Constants/StatusCode.php +++ b/src/Constant/StatusCode.php @@ -7,10 +7,10 @@ * @license MIT license (see the license file in the root directory) */ -namespace ThinFrame\Http\Constants; +namespace ThinFrame\Http\Constant; -use ThinFrame\Foundation\DataTypes\AbstractEnum; -use ThinFrame\Foundation\Exceptions\InvalidArgumentException; +use ThinFrame\Foundation\DataType\AbstractEnum; +use ThinFrame\Foundation\Exception\InvalidArgumentException; /** * Class StatusCode @@ -123,7 +123,7 @@ public function getMessage($protocol = "HTTP/1.1") * @param string $protocol * * @return string - * @throws \ThinFrame\Foundation\Exceptions\InvalidArgumentException + * @throws \ThinFrame\Foundation\Exception\InvalidArgumentException */ public static function getMessageFor($statusCode, $protocol = "HTTP/1.1") { diff --git a/src/Foundation/AbstractRequest.php b/src/Foundation/AbstractRequest.php index ae1c7e0..a03b434 100644 --- a/src/Foundation/AbstractRequest.php +++ b/src/Foundation/AbstractRequest.php @@ -10,7 +10,7 @@ namespace ThinFrame\Http\Foundation; use PhpCollection\Map; -use ThinFrame\Http\Constants\Method; +use ThinFrame\Http\Constant\Method; /** * Class AbstractRequest diff --git a/src/Foundation/AbstractResponse.php b/src/Foundation/AbstractResponse.php index f529d76..b570629 100644 --- a/src/Foundation/AbstractResponse.php +++ b/src/Foundation/AbstractResponse.php @@ -10,7 +10,7 @@ namespace ThinFrame\Http\Foundation; use PhpCollection\Map; -use ThinFrame\Http\Constants\StatusCode; +use ThinFrame\Http\Constant\StatusCode; /** * Class AbstractResponse diff --git a/src/Foundation/RequestInterface.php b/src/Foundation/RequestInterface.php index 2dae94b..2845e1b 100644 --- a/src/Foundation/RequestInterface.php +++ b/src/Foundation/RequestInterface.php @@ -10,7 +10,7 @@ namespace ThinFrame\Http\Foundation; use PhpCollection\Map; -use ThinFrame\Http\Constants\Method; +use ThinFrame\Http\Constant\Method; /** * Class RequestInterface diff --git a/src/Foundation/ResponseInterface.php b/src/Foundation/ResponseInterface.php index 5c42c8d..a564d0e 100644 --- a/src/Foundation/ResponseInterface.php +++ b/src/Foundation/ResponseInterface.php @@ -10,7 +10,7 @@ namespace ThinFrame\Http\Foundation; use PhpCollection\Map; -use ThinFrame\Http\Constants\StatusCode; +use ThinFrame\Http\Constant\StatusCode; /** * Class ResponseInterface diff --git a/src/Utils/BodyParser.php b/src/Util/BodyParser.php similarity index 99% rename from src/Utils/BodyParser.php rename to src/Util/BodyParser.php index 1afc871..6f1c5b4 100644 --- a/src/Utils/BodyParser.php +++ b/src/Util/BodyParser.php @@ -7,7 +7,7 @@ * @license MIT license (see the license file in the root directory) */ -namespace ThinFrame\Http\Utils; +namespace ThinFrame\Http\Util; /** * Class BodyParser - parse a raw http body diff --git a/src/Utils/MimeTypeGuesser.php b/src/Util/MimeTypeGuesser.php similarity index 99% rename from src/Utils/MimeTypeGuesser.php rename to src/Util/MimeTypeGuesser.php index ca323e4..7a95a9f 100644 --- a/src/Utils/MimeTypeGuesser.php +++ b/src/Util/MimeTypeGuesser.php @@ -7,7 +7,7 @@ * @license MIT license (see the license file in the root directory) */ -namespace ThinFrame\Http\Utils; +namespace ThinFrame\Http\Util; /** * Class MimeTypeGuesser From ecc817d1177643a9a9b356f9935e51e35cf12517 Mon Sep 17 00:00:00 2001 From: Sorin Date: Sun, 9 Mar 2014 20:21:19 +0200 Subject: [PATCH 4/4] Improved coding style --- LICENSE.txt | 21 ++++++++++++++++ README.md | 2 +- composer.json | 6 +++++ composer.lock | 36 ++++++++++++++-------------- src/Constant/Method.php | 4 +--- src/Constant/RequestHeader.php | 6 ++--- src/Constant/ResponseHeader.php | 4 +--- src/Constant/StatusCode.php | 6 ++--- src/Foundation/AbstractRequest.php | 12 ++++------ src/Foundation/AbstractResponse.php | 6 ++--- src/Foundation/CookieInterface.php | 6 ++--- src/Foundation/RequestInterface.php | 10 ++++---- src/Foundation/ResponseInterface.php | 6 ++--- src/Util/BodyParser.php | 11 ++++----- src/Util/MimeTypeGuesser.php | 6 ++--- 15 files changed, 73 insertions(+), 69 deletions(-) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..8c408bc --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2012-2013 ThinFrame Project + +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. \ No newline at end of file diff --git a/README.md b/README.md index c05e91a..3f563f9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A collection of PHP classes that simplifies the work with the HTTP protocol. ##Installation -* via Composer: `"thinframe/http":"@stable"` +* via Composer: `"thinframe/http":"0.3.*"` ##Copyright diff --git a/composer.json b/composer.json index 633cad4..872266a 100644 --- a/composer.json +++ b/composer.json @@ -22,5 +22,11 @@ "psr-4": { "ThinFrame\\Http\\": "src/" } + }, + "extra": { + "branch-alias": { + "dev-master": "0.2-dev", + "dev-develop": "0.3-dev" + } } } diff --git a/composer.lock b/composer.lock index c395c6a..c9fc0bb 100644 --- a/composer.lock +++ b/composer.lock @@ -3,20 +3,20 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "bf7d43cd1fb07b7191ea3de0645fdcbd", + "hash": "8b8322f1bf276d3555d0327042432aee", "packages": [ { "name": "danielstjules/stringy", - "version": "dev-master", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/danielstjules/Stringy.git", - "reference": "404909ffaa37f4c756817c0b1e459efee62b90a6" + "reference": "b990df3c6136509775e03a1f58cb658c5b11b682" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/404909ffaa37f4c756817c0b1e459efee62b90a6", - "reference": "404909ffaa37f4c756817c0b1e459efee62b90a6", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/b990df3c6136509775e03a1f58cb658c5b11b682", + "reference": "b990df3c6136509775e03a1f58cb658c5b11b682", "shasum": "" }, "require": { @@ -52,20 +52,20 @@ "utility", "utils" ], - "time": "2014-02-17 16:22:59" + "time": "2014-02-13 00:26:15" }, { "name": "phpcollection/phpcollection", - "version": "dev-master", + "version": "0.3.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "cad39389bb3134aca06b1b7fad5d3ecf7c3b7d74" + "reference": "dbec93115a5ff149b476ee2d4ede3880239a3d77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/cad39389bb3134aca06b1b7fad5d3ecf7c3b7d74", - "reference": "cad39389bb3134aca06b1b7fad5d3ecf7c3b7d74", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/dbec93115a5ff149b476ee2d4ede3880239a3d77", + "reference": "dbec93115a5ff149b476ee2d4ede3880239a3d77", "shasum": "" }, "require": { @@ -102,7 +102,7 @@ "sequence", "set" ], - "time": "2014-01-26 10:18:52" + "time": "2013-12-13 09:27:51" }, { "name": "phpoption/phpoption", @@ -159,21 +159,21 @@ "source": { "type": "git", "url": "https://github.com/thinframe/foundation.git", - "reference": "c48b0c6e127b6ce0ffd65b4ee5d2e7eaa697ff58" + "reference": "48bf25639c672229498ce06ada3e45323f6f2c25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thinframe/foundation/zipball/c48b0c6e127b6ce0ffd65b4ee5d2e7eaa697ff58", - "reference": "c48b0c6e127b6ce0ffd65b4ee5d2e7eaa697ff58", + "url": "https://api.github.com/repos/thinframe/foundation/zipball/48bf25639c672229498ce06ada3e45323f6f2c25", + "reference": "48bf25639c672229498ce06ada3e45323f6f2c25", "shasum": "" }, "require": { - "danielstjules/stringy": "@stable", + "danielstjules/stringy": "1.4.0", "php": ">=5.4.0", - "phpcollection/phpcollection": "@stable" + "phpcollection/phpcollection": "0.3.1" }, "require-dev": { - "phpunit/phpunit": "@stable" + "phpunit/phpunit": "3.7.32" }, "type": "library", "extra": { @@ -205,7 +205,7 @@ "foundation", "thinframe" ], - "time": "2014-02-12 18:02:48" + "time": "2014-03-09 16:08:12" } ], "packages-dev": [ diff --git a/src/Constant/Method.php b/src/Constant/Method.php index a4c0149..cbc72ec 100644 --- a/src/Constant/Method.php +++ b/src/Constant/Method.php @@ -1,8 +1,6 @@ * @license MIT license (see the license file in the root directory) */ @@ -12,7 +10,7 @@ use ThinFrame\Foundation\DataType\AbstractEnum; /** - * Class Method + * Method * * @package ThinFrame\Http\Constants * @since 0.2 diff --git a/src/Constant/RequestHeader.php b/src/Constant/RequestHeader.php index 055c7d4..a072896 100644 --- a/src/Constant/RequestHeader.php +++ b/src/Constant/RequestHeader.php @@ -1,16 +1,14 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ namespace ThinFrame\Http\Constant; /** - * Class RequestHeader + * RequestHeader * * @package ThinFrame\Http\Constants * @since 0.2 diff --git a/src/Constant/ResponseHeader.php b/src/Constant/ResponseHeader.php index 875191e..764c084 100644 --- a/src/Constant/ResponseHeader.php +++ b/src/Constant/ResponseHeader.php @@ -1,8 +1,6 @@ * @license MIT license (see the license file in the root directory) */ @@ -10,7 +8,7 @@ namespace ThinFrame\Http\Constant; /** - * Class ResponseHeader + * ResponseHeader * * @package ThinFrame\Http\Constants * @since 0.2 diff --git a/src/Constant/StatusCode.php b/src/Constant/StatusCode.php index dc5ad94..7ddd121 100644 --- a/src/Constant/StatusCode.php +++ b/src/Constant/StatusCode.php @@ -1,9 +1,7 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -13,7 +11,7 @@ use ThinFrame\Foundation\Exception\InvalidArgumentException; /** - * Class StatusCode + * StatusCode * * @package ThinFrame\Http\Constants * @since 0.2 diff --git a/src/Foundation/AbstractRequest.php b/src/Foundation/AbstractRequest.php index a03b434..50d958c 100644 --- a/src/Foundation/AbstractRequest.php +++ b/src/Foundation/AbstractRequest.php @@ -1,9 +1,7 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -13,7 +11,7 @@ use ThinFrame\Http\Constant\Method; /** - * Class AbstractRequest + * AbstractRequest * * @package ThinFrame\Http\Foundation * @since 0.2 @@ -283,13 +281,13 @@ public function getRemoteIp() /** * Set remote ip address * - * @param string $ip + * @param string $ipAddress * * @return $this */ - public function setRemoteIp($ip) + public function setRemoteIp($ipAddress) { - $this->remoteIp = $ip; + $this->remoteIp = $ipAddress; return $this; } diff --git a/src/Foundation/AbstractResponse.php b/src/Foundation/AbstractResponse.php index b570629..8847b78 100644 --- a/src/Foundation/AbstractResponse.php +++ b/src/Foundation/AbstractResponse.php @@ -1,9 +1,7 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -13,7 +11,7 @@ use ThinFrame\Http\Constant\StatusCode; /** - * Class AbstractResponse + * AbstractResponse * * @package ThinFrame\Http\Foundation * @since 0.2 diff --git a/src/Foundation/CookieInterface.php b/src/Foundation/CookieInterface.php index 8b25ec4..152b1c0 100644 --- a/src/Foundation/CookieInterface.php +++ b/src/Foundation/CookieInterface.php @@ -1,16 +1,14 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ namespace ThinFrame\Http\Foundation; /** - * Class CookieInterface + * CookieInterface * * @package ThinFrame\Http\Foundation * @since 0.2 diff --git a/src/Foundation/RequestInterface.php b/src/Foundation/RequestInterface.php index 2845e1b..5b6def0 100644 --- a/src/Foundation/RequestInterface.php +++ b/src/Foundation/RequestInterface.php @@ -1,9 +1,7 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -13,7 +11,7 @@ use ThinFrame\Http\Constant\Method; /** - * Class RequestInterface + * RequestInterface * * @package ThinFrame\Http\Foundation * @since 0.2 @@ -159,9 +157,9 @@ public function getRemoteIp(); /** * Set remote ip address * - * @param string $ip + * @param string $ipAddress * * @return $this */ - public function setRemoteIp($ip); + public function setRemoteIp($ipAddress); } diff --git a/src/Foundation/ResponseInterface.php b/src/Foundation/ResponseInterface.php index a564d0e..3268fe5 100644 --- a/src/Foundation/ResponseInterface.php +++ b/src/Foundation/ResponseInterface.php @@ -1,9 +1,7 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ @@ -13,7 +11,7 @@ use ThinFrame\Http\Constant\StatusCode; /** - * Class ResponseInterface + * ResponseInterface * * @package ThinFrame\Http\Foundation * @since 0.2 diff --git a/src/Util/BodyParser.php b/src/Util/BodyParser.php index 6f1c5b4..efcc84a 100644 --- a/src/Util/BodyParser.php +++ b/src/Util/BodyParser.php @@ -1,16 +1,14 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ namespace ThinFrame\Http\Util; /** - * Class BodyParser - parse a raw http body + * BodyParser - parse a raw http body * * @package ThinFrame\Http\Utils * @since 0.2 @@ -136,9 +134,8 @@ private function parseBounderedBody() */ private function getBoundaryIdentifier() { - $startPosition = strpos($this->headers['Content-Type'], self::BOUNDARY_IDENTIFIER) + strlen( - self::BOUNDARY_IDENTIFIER - ); + $startPosition = strpos($this->headers['Content-Type'], self::BOUNDARY_IDENTIFIER) + + strlen(self::BOUNDARY_IDENTIFIER); return substr($this->headers['Content-Type'], $startPosition); } diff --git a/src/Util/MimeTypeGuesser.php b/src/Util/MimeTypeGuesser.php index 7a95a9f..407c03f 100644 --- a/src/Util/MimeTypeGuesser.php +++ b/src/Util/MimeTypeGuesser.php @@ -1,16 +1,14 @@ + * @author Sorin Badea * @license MIT license (see the license file in the root directory) */ namespace ThinFrame\Http\Util; /** - * Class MimeTypeGuesser + * MimeTypeGuesser * * @package ThinFrame\Http\Utils * @since 0.2