Skip to content

Commit e724bb2

Browse files
committed
Minor update so code matches Coding Standard
1 parent 7c512df commit e724bb2

File tree

21 files changed

+82
-40
lines changed

21 files changed

+82
-40
lines changed

src/Common/Driver/Factory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage Driver Factory
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

src/Common/Driver/HHVM.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* HHVM Code Coverage Driver
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -27,7 +28,7 @@ class HHVM implements DriverInterface
2728
*/
2829
public function __construct()
2930
{
30-
if ( ! defined('HPHP_VERSION')) {
31+
if (! defined('HPHP_VERSION')) {
3132
throw new \SebastianBergmann\CodeCoverage\RuntimeException('This driver requires HHVM');
3233
}
3334
}

src/Common/Driver/Stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage Stub Driver
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

src/Common/Driver/XCache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* XCache Code Coverage Driver
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -26,7 +27,7 @@ class XCache implements DriverInterface
2627
*/
2728
public function __construct()
2829
{
29-
if ( ! extension_loaded('xcache')) {
30+
if (! extension_loaded('xcache')) {
3031
throw new \SebastianBergmann\CodeCoverage\RuntimeException('This driver requires XCache');
3132
}
3233

src/Common/Model/Aggregate.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Aggregate
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -36,14 +37,14 @@ public function __construct()
3637
*/
3738
public function update($class, array $counts)
3839
{
39-
if ( ! isset($this->coverage[$class])) {
40+
if (! isset($this->coverage[$class])) {
4041
$this->coverage[$class] = $counts;
4142

4243
return;
4344
}
4445

4546
foreach ($counts as $line => $status) {
46-
if ( ! isset($this->coverage[$class][$line]) || $status > 0) {
47+
if (! isset($this->coverage[$class][$line]) || $status > 0) {
4748
// converts "hits" to "status"
4849
$status = ! $status ? -1 : ($status > 1 ? 1 : $status);
4950

src/Common/Report/Clover.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage Clover Report
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -34,11 +35,11 @@ class Clover implements ReportInterface
3435
*/
3536
public function __construct(array $options)
3637
{
37-
if ( ! isset($options['target'])) {
38+
if (! isset($options['target'])) {
3839
$options['target'] = null;
3940
}
4041

41-
if ( ! isset($options['name'])) {
42+
if (! isset($options['name'])) {
4243
$options['name'] = null;
4344
}
4445

src/Common/Report/Crap4j.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage Crap4j Report
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -11,6 +12,7 @@
1112
use LeanPHP\Behat\CodeCoverage\Common\ReportInterface;
1213
use SebastianBergmann\CodeCoverage\CodeCoverage;
1314
use SebastianBergmann\CodeCoverage\Report\Crap4j as Crap4jReport;
15+
1416
/**
1517
* Crap4j report
1618
*
@@ -33,15 +35,15 @@ class Crap4j implements ReportInterface
3335
*/
3436
public function __construct(array $options)
3537
{
36-
if ( ! class_exists('SebastianBergmann\CodeCoverage\Report\Crap4j')) {
38+
if (! class_exists('SebastianBergmann\CodeCoverage\Report\Crap4j')) {
3739
throw new \Exception('Crap4j requires CodeCoverage 4.0+');
3840
}
3941

40-
if ( ! isset($options['target'])) {
42+
if (! isset($options['target'])) {
4143
$options['target'] = null;
4244
}
4345

44-
if ( ! isset($options['name'])) {
46+
if (! isset($options['name'])) {
4547
$options['name'] = null;
4648
}
4749

src/Common/Report/Factory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage Report Factory
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -26,7 +27,7 @@ class Factory
2627
public function create($reportType, array $options)
2728
{
2829
if (in_array($reportType, array('clover', 'crap4j', 'html', 'php', 'text', 'xml'))) {
29-
$className = '\LeanPHP\Behat\CodeCoverage\Common\Report\\' . ucfirst($reportType);
30+
$className = '\LeanPHP\Behat\CodeCoverage\Common\Report\\'.ucfirst($reportType);
3031

3132
return new $className($options);
3233
}

src/Common/Report/Html.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage HTML Report
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -34,27 +35,27 @@ class Html implements ReportInterface
3435
*/
3536
public function __construct(array $options)
3637
{
37-
if ( ! isset($options['target'])) {
38+
if (! isset($options['target'])) {
3839
$options['target'] = null;
3940
}
4041

41-
if ( ! isset($options['charset'])) {
42+
if (! isset($options['charset'])) {
4243
$options['charset'] = 'UTF-8';
4344
}
4445

45-
if ( ! isset($options['highlight'])) {
46+
if (! isset($options['highlight'])) {
4647
$options['highlight'] = false;
4748
}
4849

49-
if ( ! isset($options['lowUpperBound'])) {
50+
if (! isset($options['lowUpperBound'])) {
5051
$options['lowUpperBound'] = 35;
5152
}
5253

53-
if ( ! isset($options['highUpperBound'])) {
54+
if (! isset($options['highUpperBound'])) {
5455
$options['highUpperBound'] = 70;
5556
}
5657

57-
if ( ! isset($options['generator'])) {
58+
if (! isset($options['generator'])) {
5859
$options['generator'] = '';
5960
}
6061

src/Common/Report/Php.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Code Coverage PHP Report
44
*
55
* @copyright 2013 Anthon Pang
6+
*
67
* @license BSD-3-Clause
78
*/
89

@@ -34,7 +35,7 @@ class Php implements ReportInterface
3435
*/
3536
public function __construct(array $options)
3637
{
37-
if ( ! isset($options['target'])) {
38+
if (! isset($options['target'])) {
3839
$options['target'] = null;
3940
}
4041

0 commit comments

Comments
 (0)