Skip to content

Conversation

@marktopper
Copy link
Member

Add a HTTP Request Component

  • Changing requirements to PHP 7.

@codecov
Copy link

codecov bot commented Apr 27, 2017

Codecov Report

Merging #31 into master will decrease coverage by 6.57%.
The diff coverage is 52.5%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ Complexity Δ
src/Fist/Testing/src/TestCase.php 84.61% <ø> (ø) 6 <0> (ø) ⬇️
src/Fist/Testing/src/WithSuperGlobals.php 22.58% <22.58%> (ø) 25 <25> (?)
src/Fist/Http/src/Request.php 61.73% <61.73%> (ø) 50 <50> (?)
src/Fist/Http/src/AbstractBag.php 85.71% <85.71%> (ø) 6 <6> (?)
src/Fist/Http/src/ServerBag.php 88.88% <88.88%> (ø) 4 <4> (?)
src/Fist/Database/src/Connectors/Connection.php 90% <0%> (-0.63%) 13% <0%> (ø)
src/Fist/Container/src/Container.php 97.86% <0%> (-0.03%) 81% <0%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2d6c54...8495457. Read the comment docs.

use Fist\Http\Request;
use Fist\Testing\TestCase;

class RequestTest extends TestCase
Copy link
Member Author

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.

use Fist\Testing\TestCase;
use Fist\Testing\WithSuperGlobals;

class RequestTest extends TestCase
Copy link
Member Author

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.


namespace Fist\Http;

class Request
Copy link
Member Author

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.

/**
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
*/
class RequestTest extends TestCase
Copy link
Member Author

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)
Copy link
Member Author

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)
Copy link
Member Author

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()]
Copy link
Member Author

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

@marktopper
Copy link
Member Author

Click here if you want to create code_sniffer's auto-correct Pull Request
Auto Correct by SideCI

See the documentation if you want to get more information about auto-correct.
Document


namespace Fist\Http;

class Request
Copy link
Member Author

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.

@marktopper
Copy link
Member Author

Auto-correctable file didn't exist on this Pull Request from SideCI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants