Skip to content

Commit 47cb7ab

Browse files
author
Martin Brecht-Precht
committed
Language level migration.
1 parent fdbcc8a commit 47cb7ab

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

src/Block/BlockInterface.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
interface BlockInterface extends NodeInterface
1717
{
1818

19-
const BLOCK_TYPE_CODE = BlockType::TYPE_CODE;
20-
const BLOCK_TYPE_COMMENT = BlockType::TYPE_COMMENT;
21-
const BLOCK_TYPE_DIVISION = BlockType::TYPE_DIVISION;
22-
const BLOCK_TYPE_HEADING = BlockType::TYPE_HEADING;
23-
const BLOCK_TYPE_UNORDERED_LIST = BlockType::TYPE_UNORDERED_LIST;
24-
const BLOCK_TYPE_ORDERED_LIST = BlockType::TYPE_ORDERED_LIST;
25-
const BLOCK_TYPE_LIST_ITEM = BlockType::TYPE_LIST_ITEM;
26-
const BLOCK_TYPE_PARAGRAPH = BlockType::TYPE_PARAGRAPH;
27-
const BLOCK_TYPE_QUOTE = BlockType::TYPE_QUOTE;
19+
public const BLOCK_TYPE_CODE = BlockType::TYPE_CODE;
20+
public const BLOCK_TYPE_COMMENT = BlockType::TYPE_COMMENT;
21+
public const BLOCK_TYPE_DIVISION = BlockType::TYPE_DIVISION;
22+
public const BLOCK_TYPE_HEADING = BlockType::TYPE_HEADING;
23+
public const BLOCK_TYPE_UNORDERED_LIST = BlockType::TYPE_UNORDERED_LIST;
24+
public const BLOCK_TYPE_ORDERED_LIST = BlockType::TYPE_ORDERED_LIST;
25+
public const BLOCK_TYPE_LIST_ITEM = BlockType::TYPE_LIST_ITEM;
26+
public const BLOCK_TYPE_PARAGRAPH = BlockType::TYPE_PARAGRAPH;
27+
public const BLOCK_TYPE_QUOTE = BlockType::TYPE_QUOTE;
2828

2929
/**
3030
* @return string
3131
*/
32-
public function getBlockType();
32+
public function getBlockType(): string;
3333

3434
/**
3535
* @param BlockParentInterface $blockParent
@@ -45,12 +45,12 @@ public function onDetach();
4545
/**
4646
* @return BlockParentInterface
4747
*/
48-
public function getParent();
48+
public function getParent(): BlockParentInterface;
4949

5050
/**
5151
* @param HandlerInterface $markdomHandler
5252
* @return void
5353
*/
54-
public function onHandle(HandlerInterface $markdomHandler);
54+
public function onHandle(HandlerInterface $markdomHandler): void;
5555

5656
}

src/Block/ListBlockInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
interface ListBlockInterface extends BlockInterface
1111
{
1212

13-
const LIST_BLOCK_TYPE_ORDERED_LIST = 'ORDERED_LIST';
14-
const LIST_BLOCK_TYPE_UNORDERED_LIST = 'UNORDERED_LIST';
13+
public const LIST_BLOCK_TYPE_ORDERED_LIST = 'ORDERED_LIST';
14+
public const LIST_BLOCK_TYPE_UNORDERED_LIST = 'UNORDERED_LIST';
1515

1616
/**
1717
* @return string
1818
*/
19-
public function getListBlockType();
19+
public function getListBlockType(): string;
2020

2121
/**
2222
* @return ListItemSequenceInterface
2323
*/
24-
public function getItems();
24+
public function getItems(): ListItemSequenceInterface;
2525

2626
/**
2727
* @param ListItemInterface $listItem

src/Content/ContentInterface.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@
1717
interface ContentInterface extends NodeInterface
1818
{
1919

20-
const CONTENT_TYPE_CODE = ContentType::TYPE_CODE;
21-
const CONTENT_TYPE_EMPHASIS = ContentType::TYPE_EMPHASIS;
22-
const CONTENT_TYPE_IMAGE = ContentType::TYPE_IMAGE;
23-
const CONTENT_TYPE_LINE_BREAK = ContentType::TYPE_LINE_BREAK;
24-
const CONTENT_TYPE_LINK = ContentType::TYPE_LINK;
25-
const CONTENT_TYPE_TEXT = ContentType::TYPE_TEXT;
20+
public const CONTENT_TYPE_CODE = ContentType::TYPE_CODE;
21+
public const CONTENT_TYPE_EMPHASIS = ContentType::TYPE_EMPHASIS;
22+
public const CONTENT_TYPE_IMAGE = ContentType::TYPE_IMAGE;
23+
public const CONTENT_TYPE_LINE_BREAK = ContentType::TYPE_LINE_BREAK;
24+
public const CONTENT_TYPE_LINK = ContentType::TYPE_LINK;
25+
public const CONTENT_TYPE_TEXT = ContentType::TYPE_TEXT;
2626

2727
/**
2828
* @return string
2929
*/
30-
public function getContentType();
30+
public function getContentType(): string;
3131

3232
/**
3333
* @return ContentParentInterface
3434
*/
35-
public function getParent();
35+
public function getParent(): ContentParentInterface;
3636

3737
/**
3838
* @return BlockInterface
3939
*/
40-
public function getBlock();
40+
public function getBlock(): BlockInterface;
4141

4242
/**
4343
* @param ContentParentInterface $contentParent

src/Content/LinkContentInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface LinkContentInterface extends ContentParentContentInterface
1616
* @param string $uri
1717
* @param string $title
1818
*/
19-
public function __construct(string $uri, string $title);
19+
public function __construct(string $uri, ?string $title = null);
2020

2121
/**
2222
* @return string
@@ -32,7 +32,7 @@ public function setUri(string $uri);
3232
/**
3333
* @return string
3434
*/
35-
public function getTitle(): string;
35+
public function getTitle(): ?string;
3636

3737
/**
3838
* @param string $title

0 commit comments

Comments
 (0)