Skip to content

Commit a2750ee

Browse files
author
Martin Brecht-Precht
committed
Fixed some issues.
1 parent 0c8c6d8 commit a2750ee

File tree

8 files changed

+36
-32
lines changed

8 files changed

+36
-32
lines changed

src/Block/BlockInterface.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ interface BlockInterface extends NodeInterface
3131
*/
3232
public function getBlockType();
3333

34-
/**
35-
* @return int
36-
*/
37-
public function getIndex();
38-
39-
/**
40-
* @return DocumentInterface
41-
*/
42-
public function getDocument();
43-
4434
/**
4535
* @return BlockInterface
4636
*/

src/Block/BlockParentInterface.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
interface BlockParentInterface extends NodeInterface
1515
{
1616

17-
/**
18-
* @return DocumentInterface
19-
*/
20-
public function getDocument();
21-
2217
/**
2318
* @return BlockSequenceInterface
2419
*/
@@ -30,4 +25,10 @@ public function getBlocks();
3025
*/
3126
public function addBlock(BlockInterface $block);
3227

28+
/**
29+
* @param BlockInterface[] $blocks
30+
* @return $this
31+
*/
32+
public function addBlocks(array $blocks);
33+
3334
}

src/Block/ListItemInterface.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
interface ListItemInterface extends BlockParentInterface
1313
{
1414

15-
/**
16-
* @return int
17-
*/
18-
public function getIndex();
19-
2015
/**
2116
* @return ListBlockInterface
2217
*/

src/Block/QuoteBlockInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @package Markdom\ModelInterface\Block
99
*/
10-
interface QuoteBlockInterface extends BlockParentInterface
10+
interface QuoteBlockInterface extends BlockParentInterface, BlockInterface
1111
{
1212

1313
}

src/Common/NodeInterface.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Markdom\ModelInterface\Common;
44

5+
use Markdom\ModelInterface\Block\DocumentInterface;
6+
57
/**
68
* Interface NodeInterface
79
*
@@ -15,16 +17,31 @@ interface NodeInterface
1517
const NODE_TYPE_CONTENT = 'CONTENT';
1618
const NODE_TYPE_LIST_ITEM = 'LIST_ITEM';
1719

20+
/**
21+
* @return int
22+
*/
23+
public function getIndex();
24+
1825
/**
1926
* @return string
2027
*/
2128
public function getNodeType();
2229

30+
/**
31+
* @return DocumentInterface
32+
*/
33+
public function getDocument();
34+
2335
/**
2436
* @return NodeInterface
2537
*/
2638
public function getParent();
2739

40+
/**
41+
* @return bool
42+
*/
43+
public function hasParent();
44+
2845
/**
2946
* @return bool
3047
*/

src/Content/ContentInterface.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ interface ContentInterface extends NodeInterface
2929
*/
3030
public function getContentType();
3131

32-
/**
33-
* @return int
34-
*/
35-
public function getIndex();
36-
3732
/**
3833
* @return ContentParentInterface
3934
*/

src/Content/ContentParentInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ public function getContents();
3131
*/
3232
public function addContent(ContentInterface $content);
3333

34+
/**
35+
* @param ContentInterface[] $contents
36+
* @return $this
37+
*/
38+
public function addContents(array $contents);
39+
3440
}

src/Content/LinebreakContentInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ interface LinebreakContentInterface extends ContentInterface
1313
/**
1414
* LinebreakContent constructor.
1515
*
16-
* @param bool $hardbreak
16+
* @param bool $hard
1717
*/
18-
public function __construct($hardbreak);
18+
public function __construct($hard);
1919

2020
/**
21-
* @return boolean
21+
* @return bool
2222
*/
23-
public function isHardbreak();
23+
public function isHard();
2424

2525
/**
26-
* @param boolean $hardbreak
26+
* @param bool $hard
2727
* @return $this
2828
*/
29-
public function setHardbreak($hardbreak);
29+
public function setHard($hard);
3030

3131
}

0 commit comments

Comments
 (0)