mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Add some traits for common Inline implementations
This commit is contained in:
parent
18e239fba1
commit
25cf5a1729
12
src/Components/Inlines/DefaultBeginPosition.php
Normal file
12
src/Components/Inlines/DefaultBeginPosition.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Erusev\Parsedown\Components\Inlines;
|
||||
|
||||
trait DefaultBeginPosition
|
||||
{
|
||||
/** @return int|null */
|
||||
public function modifyStartPositionTo()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
15
src/Components/Inlines/WidthTrait.php
Normal file
15
src/Components/Inlines/WidthTrait.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Erusev\Parsedown\Components\Inlines;
|
||||
|
||||
trait WidthTrait
|
||||
{
|
||||
/** @var int */
|
||||
private $width;
|
||||
|
||||
/** @return int */
|
||||
public function width()
|
||||
{
|
||||
return $this->width;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user