Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Updated to 1.1.7 version
Browse files Browse the repository at this point in the history
  • Loading branch information
josantonius committed Jan 7, 2018
1 parent 2cd5265 commit e269f62
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 82 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ phpmd.xml export-ignore
.travis.yml export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitignore export-ignore
.php_cs.dist export-ignore
CONDUCT.md export-ignore
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 1.1.7 - 2018-01-07

* The tests were fixed.

* Changes in documentation.

## 1.1.6 - 2017-11-13

* Set the correct `phpcbf` fix command in `composer.json`.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)
=====================

Copyright (c) `2017` `Josantonius, https://josantonius.com <[email protected]>`
Copyright (c) `2017 - 2018` `Josantonius, https://josantonius.com <[email protected]>`

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
Expand Down
10 changes: 5 additions & 5 deletions README-ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ Ejecutar todas las pruebas anteriores:

## ☑ Tareas pendientes

- [ ] Añadir nueva funcionalidad
- [ ] Mejorar pruebas
- [ ] Mejorar documentación
- [ ] Refactorizar código
- [ ] Añadir nueva funcionalidad.
- [ ] Mejorar pruebas.
- [ ] Mejorar documentación.
- [ ] Refactorizar código para las reglas de estilo de código deshabilitadas. Ver [phpmd.xml](phpmd.xml) y [.php_cs.dist](.php_cs.dist).

## Contribuir

Expand All @@ -328,7 +328,7 @@ Este proyecto está licenciado bajo **licencia MIT**. Consulta el archivo [LICEN

## Copyright

2017 Josantonius, [josantonius.com](https://josantonius.com/)
2017 - 2018 Josantonius, [josantonius.com](https://josantonius.com/)

Si te ha resultado útil, házmelo saber :wink:

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ Run all previous tests:

## ☑ TODO

- [ ] Add new feature
- [ ] Improve tests
- [ ] Improve documentation
- [ ] Refactor code
- [ ] Add new feature.
- [ ] Improve tests.
- [ ] Improve documentation.
- [ ] Refactor code for disabled code style rules. See [phpmd.xml](phpmd.xml) and [.php_cs.dist](.php_cs.dist).

## Contribute

Expand All @@ -328,7 +328,7 @@ This project is licensed under **MIT license**. See the [LICENSE](LICENSE) file

## Copyright

2017 Josantonius, [josantonius.com](https://josantonius.com/)
2017 - 2018 Josantonius, [josantonius.com](https://josantonius.com/)

If you find it useful, let me know :wink:

Expand Down
24 changes: 1 addition & 23 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* PHP library for handling requests.
*
* @author Josantonius <[email protected]>
* @copyright 2017 (c) Josantonius - PHP-Request
* @copyright 2017 - 2018 (c) Josantonius - PHP-Request
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Josantonius/PHP-Request
* @since 1.0.0
Expand All @@ -12,16 +12,12 @@

/**
* Request handler.
*
* @since 1.0.0
*/
class Request
{
/**
* Secure access to GET parameters.
*
* @since 1.0.0
*
* @param string $key → request key
*
* @return mixed|null → value or null
Expand All @@ -38,8 +34,6 @@ public static function get($key = null)
/**
* Secure access to POST parameters.
*
* @since 1.0.0
*
* @param string $key → request key
*
* @return mixed|null → value or null
Expand All @@ -56,8 +50,6 @@ public static function post($key = null)
/**
* Secure access to FILES parameters.
*
* @since 1.0.0
*
* @param string $key → request key
*
* @return mixed|null → value or null
Expand All @@ -74,8 +66,6 @@ public static function files($key = null)
/**
* Secure access to PUT parameters.
*
* @since 1.0.0
*
* @param string $key → request key
*
* @return mixed|null → value or null
Expand All @@ -94,8 +84,6 @@ public static function put($key = null)
/**
* Secure access to DELETE parameters.
*
* @since 1.0.0
*
* @param string $key → request key
*
* @return mixed|null → value or null
Expand All @@ -110,8 +98,6 @@ public static function del($key)
/**
* Check if it is a GET request.
*
* @since 1.0.0
*
* @return bool
*/
public static function isGet()
Expand All @@ -122,8 +108,6 @@ public static function isGet()
/**
* Check if it is a POST request.
*
* @since 1.0.0
*
* @return bool
*/
public static function isPost()
Expand All @@ -134,8 +118,6 @@ public static function isPost()
/**
* Check if it is a PUT request.
*
* @since 1.0.0
*
* @return bool
*/
public static function isPut()
Expand All @@ -146,8 +128,6 @@ public static function isPut()
/**
* Check if it is a DELETE request.
*
* @since 1.0.0
*
* @return bool
*/
public static function isDelete()
Expand All @@ -158,8 +138,6 @@ public static function isDelete()
/**
* Check if it is a AJAX request.
*
* @since 1.0.0
*
* @return bool
*/
public static function isAjax()
Expand Down
49 changes: 2 additions & 47 deletions tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* PHP library for handling requests.
*
* @author Josantonius <[email protected]>
* @copyright 2017 (c) Josantonius - PHP-Request
* @copyright 2017 - 2018 (c) Josantonius - PHP-Request
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Josantonius/PHP-Request
* @since 1.1.3
Expand All @@ -15,8 +15,6 @@

/**
* Tests class for Request library.
*
* @since 1.1.3
*/
class RequestTest extends TestCase
{
Expand Down Expand Up @@ -48,14 +46,11 @@ public function setUp()
*/
public function testIsInstanceOfRequest()
{
$actual = $this->Request;
$this->assertInstanceOf('Josantonius\Request\Request', $actual);
$this->assertInstanceOf('Josantonius\Request\Request', $this->Request);
}

/**
* Access to all GET parameters.
*
* @since 1.1.3
*/
public function testGet()
{
Expand All @@ -67,8 +62,6 @@ public function testGet()

/**
* Access to GET specific key parameter.
*
* @since 1.1.3
*/
public function testGetSpecificKey()
{
Expand All @@ -79,8 +72,6 @@ public function testGetSpecificKey()

/**
* Access to GET specific key parameter when not exists.
*
* @since 1.1.3
*/
public function testGetSpecificKeyError()
{
Expand All @@ -92,8 +83,6 @@ public function testGetSpecificKeyError()

/**
* Access to all GET parameters when not exists.
*
* @since 1.1.3
*/
public function testGetError()
{
Expand All @@ -104,8 +93,6 @@ public function testGetError()

/**
* Access to all POST parameters.
*
* @since 1.1.3
*/
public function testPost()
{
Expand All @@ -117,8 +104,6 @@ public function testPost()

/**
* Access to POST specific key parameter.
*
* @since 1.1.3
*/
public function testPostSpecificKey()
{
Expand All @@ -129,8 +114,6 @@ public function testPostSpecificKey()

/**
* Access to POST specific key parameter when not exists.
*
* @since 1.1.3
*/
public function testPostSpecificKeyError()
{
Expand All @@ -142,8 +125,6 @@ public function testPostSpecificKeyError()

/**
* Access to all POST parameters when not exists.
*
* @since 1.1.3
*/
public function testPostError()
{
Expand All @@ -154,8 +135,6 @@ public function testPostError()

/**
* Access to all FILES parameters.
*
* @since 1.1.3
*/
public function testFiles()
{
Expand All @@ -167,8 +146,6 @@ public function testFiles()

/**
* Access to FILES specific key parameter.
*
* @since 1.1.3
*/
public function testFilesSpecificKey()
{
Expand All @@ -179,8 +156,6 @@ public function testFilesSpecificKey()

/**
* Access to FILES specific key parameter when not exists.
*
* @since 1.1.3
*/
public function testFilesSpecificKeyError()
{
Expand All @@ -192,8 +167,6 @@ public function testFilesSpecificKeyError()

/**
* Access to all FILES parameters when not exists.
*
* @since 1.1.3
*/
public function testFilesError()
{
Expand All @@ -204,8 +177,6 @@ public function testFilesError()

/**
* Access to PUT specific key parameter when not exists.
*
* @since 1.1.3
*/
public function testPutSpecificKeyError()
{
Expand All @@ -216,8 +187,6 @@ public function testPutSpecificKeyError()

/**
* Access to all PUT parameters when not exists.
*
* @since 1.1.3
*/
public function testPutError()
{
Expand All @@ -228,8 +197,6 @@ public function testPutError()

/**
* Access to DEL specific key parameter when not exists.
*
* @since 1.1.3
*/
public function testDelSpecificKeyError()
{
Expand All @@ -240,8 +207,6 @@ public function testDelSpecificKeyError()

/**
* Check if it is a GET request.
*
* @since 1.1.3
*/
public function testIsGet()
{
Expand All @@ -252,8 +217,6 @@ public function testIsGet()

/**
* Check if it is a POST request.
*
* @since 1.1.3
*/
public function testIsPost()
{
Expand All @@ -264,8 +227,6 @@ public function testIsPost()

/**
* Check if it is a PUT request.
*
* @since 1.1.3
*/
public function testIsPut()
{
Expand All @@ -276,8 +237,6 @@ public function testIsPut()

/**
* Check if it is a DELETE request.
*
* @since 1.1.3
*/
public function testIsDelete()
{
Expand All @@ -288,8 +247,6 @@ public function testIsDelete()

/**
* Check if it isn't a DELETE request.
*
* @since 1.1.3
*/
public function testIsNotDelete()
{
Expand All @@ -300,8 +257,6 @@ public function testIsNotDelete()

/**
* Check if it is a Ajax request.
*
* @since 1.1.3
*/
public function testIsAjax()
{
Expand Down

0 comments on commit e269f62

Please sign in to comment.