-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from datashaman/develop
Various Changes
- Loading branch information
Showing
16 changed files
with
297 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpcheck bootstrap="vendor/autoload.php"> | ||
<!-- TODO | ||
<suites> | ||
<suite name="Checks"> | ||
<directory suffix="Check.php">./checks</directory> | ||
</suite> | ||
</suites> | ||
--> | ||
<!-- | ||
<subscribers> | ||
<subscriber /> | ||
<subscriber class="Datashaman\PHPCheck\Subscribers\TestSubscriber" /> | ||
</subscribers> | ||
--> | ||
</phpcheck> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of the phpcheck package. | ||
* | ||
* ©Marlin Forbes <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace Datashaman\PHPCheck\Coverage; | ||
|
||
use Datashaman\PHPCheck\Runner; | ||
|
||
abstract class Coverage | ||
{ | ||
protected $input; | ||
|
||
public function __construct(Runner $runner) | ||
{ | ||
$this->input = $runner->getInput(); | ||
} | ||
|
||
public function __destruct() | ||
{ | ||
global $coverage; | ||
|
||
$coverage->stop(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of the phpcheck package. | ||
* | ||
* ©Marlin Forbes <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace Datashaman\PHPCheck\Coverage; | ||
|
||
use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlFacade; | ||
|
||
class HtmlCoverage extends Coverage | ||
{ | ||
public function __destruct() | ||
{ | ||
global $coverage; | ||
|
||
parent::__destruct(); | ||
|
||
$writer = new HtmlFacade(); | ||
$writer->process($coverage, $this->input->getOption('coverage-html')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* This file is part of the phpcheck package. | ||
* | ||
* ©Marlin Forbes <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace Datashaman\PHPCheck\Coverage; | ||
|
||
use SebastianBergmann\CodeCoverage\Report\Text; | ||
|
||
class TextCoverage extends Coverage | ||
{ | ||
public function __destruct() | ||
{ | ||
global $coverage; | ||
|
||
parent::__destruct(); | ||
|
||
$writer = new Text(); | ||
|
||
if ($this->input->getOption('coverage-text')) { | ||
$output = $writer->process($coverage, false); | ||
\file_put_contents($this->input->getOption('coverage-text'), $output); | ||
|
||
return; | ||
} | ||
|
||
$color = true; | ||
|
||
if ($this->input->getOption('no-ansi') !== false) { | ||
$color = false; | ||
} | ||
|
||
print $writer->process($coverage, $color); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.