Skip to content

Commit 7a47eac

Browse files
authored
Merge pull request #9 from Astrotomic/php-71
Backport to PHP 7.1
2 parents e59e0c3 + c7f6800 commit 7a47eac

File tree

20 files changed

+43
-22
lines changed

20 files changed

+43
-22
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: true
1717
matrix:
18-
php: [7.4]
18+
php: [7.1, 7.2, 7.3, 7.4]
1919
dependency-version: [prefer-lowest, prefer-stable]
2020

2121
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.4",
18+
"php": "^7.1",
1919
"astrotomic/php-conditional-proxy": "^0.2.0"
2020
},
2121
"require-dev": {

src/BaseObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract class BaseObject
99
use HasConditionalCalls;
1010

1111
/** @var BaseObject[] */
12-
protected array $tags = [];
12+
protected $tags = [];
1313

1414
public function setProperty(string $prefix, string $property, string $content)
1515
{

src/Property.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
class Property
66
{
7-
protected string $prefix = 'og';
8-
protected string $property;
9-
protected string $content;
7+
/** @var string */
8+
protected $prefix = 'og';
9+
10+
/** @var string */
11+
protected $property;
12+
13+
/** @var string */
14+
protected $content;
1015

1116
public function __construct(string $prefix, string $property, string $content)
1217
{

src/Type.php

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

99
abstract class Type extends BaseObject
1010
{
11-
protected string $type;
11+
/** @var string */
12+
protected $type;
1213

1314
public function __construct(?string $title = null)
1415
{

src/Types/Article.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class Article extends Type
99
{
1010
protected const PREFIX = 'article';
1111

12-
protected string $type = 'article';
12+
/** @var string */
13+
protected $type = 'article';
1314

1415
public function author(string $url)
1516
{

src/Types/Book.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class Book extends Type
99
{
1010
protected const PREFIX = 'book';
1111

12-
protected string $type = 'book';
12+
/** @var string */
13+
protected $type = 'book';
1314

1415
public function author(string $url)
1516
{

src/Types/Music/Album.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class Album extends Type
99
{
1010
protected const PREFIX = 'music';
1111

12-
protected string $type = 'music.album';
12+
/** @var string */
13+
protected $type = 'music.album';
1314

1415
public function musician(string $url)
1516
{

src/Types/Music/Playlist.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ class Playlist extends Type
88
{
99
protected const PREFIX = 'music';
1010

11-
protected string $type = 'music.playlist';
11+
/** @var string */
12+
protected $type = 'music.playlist';
1213

1314
public function creator(string $url)
1415
{

src/Types/Music/RadioStation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ class RadioStation extends Type
88
{
99
protected const PREFIX = 'music';
1010

11-
protected string $type = 'music.radio_station';
11+
/** @var string */
12+
protected $type = 'music.radio_station';
1213

1314
public function creator(string $url)
1415
{

0 commit comments

Comments
 (0)