Skip to content

Commit

Permalink
Merge pull request #147 from bearsunday/coverage
Browse files Browse the repository at this point in the history
Code coverage 100%
  • Loading branch information
koriym authored Oct 5, 2020
2 parents c612ad6 + fe72520 commit d107f8f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bearsunday/BEAR.Sunday/badges/quality-score.png?b=1.x)](https://scrutinizer-ci.com/g/bearsunday/BEAR.Sunday/?branch=1.x
)
[![Code Coverage](https://scrutinizer-ci.com/g/bearsunday/BEAR.Sunday/badges/coverage.png?b=1.x)](https://scrutinizer-ci.com/g/bearsunday/BEAR.Sunday/?branch=1.x
)
[![codecov](https://codecov.io/gh/bearsunday/BEAR.Sunday/branch/1.x/graph/badge.svg?token=eh3c9AF4Mr)](https://codecov.io/gh/koriym/BEAR.Sunday)
[![Type Coverage](https://shepherd.dev/github/bearsunday/BEAR.Sunday/coverage.svg)](https://shepherd.dev/github/bearsunday/BEAR.Sunday)
[![Build Status](https://travis-ci.org/bearsunday/BEAR.Sunday.svg?branch=1.x
)](https://travis-ci.org/bearsunday/BEAR.Sunday)
[![Build Status](https://scrutinizer-ci.com/g/bearsunday/BEAR.Sunday/badges/build.png?b=1.x)](https://scrutinizer-ci.com/g/bearsunday/BEAR.Sunday/build-status/1.x)

## What's BEAR.Sunday

Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ coverage:
status:
project:
default:
target: 95%
target: 100%
patch:
default:
target: 95%
target: 100%

comment: false
2 changes: 2 additions & 0 deletions src/Extension/Transfer/NullTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ final class NullTransfer implements TransferInterface
{
/**
* {@inheritdoc}
*
* @codeCoverageIgnore
*/
public function __invoke(ResourceObject $ro, array $server): void
{
Expand Down
3 changes: 2 additions & 1 deletion src/Inject/PsrLoggerInject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ trait PsrLoggerInject

/**
* @\Ray\Di\Di\Inject
* @codeCoverageIgnore
*/
public function setPsrLogger(LoggerInterface $logger)
public function setPsrLogger(LoggerInterface $logger): void
{
$this->logger = $logger;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Inject/ResourceInject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ trait ResourceInject

/**
* @\Ray\Di\Di\Inject
* @codeCoverageIgnore
*/
public function setResource(ResourceInterface $resource)
public function setResource(ResourceInterface $resource): void
{
$this->resource = $resource;
}
Expand Down
8 changes: 4 additions & 4 deletions tests/Provide/Error/NullErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

namespace BEAR\Sunday\Provide\Error;

use BEAR\Sunday\Extension\Error\ErrorInterface;
use BEAR\Sunday\Extension\Error\NullError;
use BEAR\Sunday\Extension\Router\RouterMatch;
use Exception;
use PHPUnit\Framework\TestCase;

class NullErrorTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testNullError(): void
{
(new NullError())->handle(new Exception(), new RouterMatch())->transfer();
$error = (new NullError())->handle(new Exception(), new RouterMatch());
$error->transfer();
$this->assertInstanceOf(ErrorInterface::class, $error);
}
}
4 changes: 2 additions & 2 deletions tests/Provide/Error/ThrowableHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
use BEAR\Sunday\Provide\Transfer\ConditionalResponse;
use BEAR\Sunday\Provide\Transfer\FakeHttpResponder;
use BEAR\Sunday\Provide\Transfer\Header;
use Exception;
use PHPUnit\Framework\TestCase;
use Throwable;

use function ini_set;

Expand Down Expand Up @@ -43,7 +43,7 @@ public function testError(): void
{
try {
echo hello; // @phpstan-ignore-line
} catch (Exception $e) {
} catch (Throwable $e) {
}

$this->throableHandler->handle($e, new RouterMatch())->transfer(); // @phpstan-ignore-line
Expand Down

0 comments on commit d107f8f

Please sign in to comment.