-
Notifications
You must be signed in to change notification settings - Fork 4
Add HTTP Request Component #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
[ci skip] [skip ci]
Apply fixes from StyleCI
…component/http-request
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
============================================
- Coverage 86.74% 80.17% -6.58%
- Complexity 335 420 +85
============================================
Files 18 22 +4
Lines 830 1024 +194
============================================
+ Hits 720 821 +101
- Misses 110 203 +93
Continue to review full report at Codecov.
|
src/Fist/Http/tests/RequestTest.php
Outdated
| use Fist\Http\Request; | ||
| use Fist\Testing\TestCase; | ||
|
|
||
| class RequestTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpmd]
- The class RequestTest has 16 public methods. Consider refactoring RequestTest to keep number of public methods under 10.
src/Fist/Http/tests/RequestTest.php
Outdated
| use Fist\Testing\TestCase; | ||
| use Fist\Testing\WithSuperGlobals; | ||
|
|
||
| class RequestTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpmd]
- The class RequestTest has 16 public methods. Consider refactoring RequestTest to keep number of public methods under 10.
[ci skip] [skip ci]
Apply fixes from StyleCI
…component/http-request
|
|
||
| namespace Fist\Http; | ||
|
|
||
| class Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpmd]
- The class Request has an overall complexity of 50 which is very high. The configured complexity threshold is 50.
src/Fist/Http/tests/RequestTest.php
Outdated
| /** | ||
| * @SuppressWarnings(PHPMD.ExcessivePublicCount) | ||
| */ | ||
| class RequestTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpmd]
- The class RequestTest has 16 public methods. Consider refactoring RequestTest to keep number of public methods under 10.
|
|
||
| protected $requestUri; | ||
|
|
||
| public function __construct(array $query = [], array $request = [], array $cookies = [], array $files = [], array $server = [], $content = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[code_sniffer]
- Line exceeds 120 characters; contains 148 characters
| return new static($_GET, $_POST, $_COOKIE, $_FILES, $_SERVER); | ||
| } | ||
|
|
||
| public function initialize(array $query = [], array $request = [], array $cookies = [], array $files = [], array $server = [], $content = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[code_sniffer]
- Line exceeds 120 characters; contains 147 characters
| $request = Request::createFromGlobals(); | ||
|
|
||
| $fingerprint = sha1(implode('|', array_merge( | ||
| $route->methods(), [$route->domain(), $route->uri(), $this->ip()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[code_sniffer]
- Only one argument is allowed per line in a multi-line function call
|
Click here if you want to create code_sniffer's auto-correct Pull Request See the documentation if you want to get more information about auto-correct. |
|
|
||
| namespace Fist\Http; | ||
|
|
||
| class Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[phpmd]
- The class Request has 11 public methods. Consider refactoring Request to keep number of public methods under 10.
- The class Request has an overall complexity of 51 which is very high. The configured complexity threshold is 50.
|
Auto-correctable file didn't exist on this Pull Request from SideCI. |

Add a HTTP Request Component