Skip to content

Commit 2256435

Browse files
authored
Code standards updated to PHP 7.3 (#54)
1 parent b7a7d49 commit 2256435

File tree

16 files changed

+45
-35
lines changed

16 files changed

+45
-35
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: [7.1, 7.2, 7.3, 7.4, 8.0]
11+
php: [7.3, 7.4, 8.0]
1212

1313
steps:
1414
- name: Checkout code

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
vendor
22
.idea
33
.phpunit.result.cache
4+
composer.lock
45
composer.phar

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.5
4+
5+
* Removed support for `PHP 7.1` and `PHP 7.2`.
6+
* Use strict types in the source code.
7+
38
## 1.4
49

510
* Added **_Fluent Interface_** support, this allows you to add `it`'s and `should`'s chained to a `specify` or `describe`.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2020 Codeception PHP Testing Framework
3+
Copyright (c) 2013-2021 Codeception PHP Testing Framework
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Inspired by MiniTest of Ruby now you combine BDD and classical TDD style in one
1313

1414
## Installation
1515

16-
*Requires PHP >= 7.1*
16+
*Requires PHP >= 7.3*
1717

1818
* Install with Composer:
1919

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.3
1+
1.5.0

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
}
1515
],
1616
"require": {
17-
"php": ">=7.1.0",
18-
"myclabs/deep-copy": "~1.1",
19-
"phpunit/phpunit": ">=7.0 <10.0"
17+
"php": ">=7.3.0",
18+
"myclabs/deep-copy": "^1.10",
19+
"phpunit/phpunit": "^8.0|^9.0"
2020
},
2121
"autoload": {
2222
"psr-0": {

src/Codeception/Specify.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Codeception;
46

src/Codeception/Specify/ObjectProperty.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Codeception\Specify;
46

57
use ReflectionProperty;
@@ -47,10 +49,7 @@ public function __construct($owner, $property, $value = null)
4749
$this->initValue = ($value === null ? $this->getValue() : $value);
4850
}
4951

50-
/**
51-
* @return string
52-
*/
53-
public function getName()
52+
public function getName(): string
5453
{
5554
return $this->property->getName();
5655
}

src/Codeception/Specify/ResultPrinter.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Codeception\Specify;
46

57
use PHPUnit\TextUI\DefaultResultPrinter;
@@ -10,10 +12,7 @@ class_alias(\PHPUnit\TextUI\ResultPrinter::class, DefaultResultPrinter::class);
1012

1113
class ResultPrinter extends DefaultResultPrinter
1214
{
13-
/**
14-
* @param string $progress
15-
*/
16-
protected function writeProgress(string $progress) : void
15+
protected function writeProgress(string $progress): void
1716
{
1817
$this->write($progress);
1918
$this->column++;
@@ -25,6 +24,4 @@ protected function writeProgress(string $progress) : void
2524
}
2625
}
2726
}
28-
29-
3027
}

0 commit comments

Comments
 (0)