mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 00:58:48 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -4,16 +4,17 @@ namespace Sabberworm\CSS\Comment;
|
||||
|
||||
use Sabberworm\CSS\OutputFormat;
|
||||
use Sabberworm\CSS\Renderable;
|
||||
use Sabberworm\CSS\Position\Position;
|
||||
use Sabberworm\CSS\Position\Positionable;
|
||||
|
||||
class Comment implements Renderable
|
||||
class Comment implements Positionable, Renderable
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $iLineNo;
|
||||
use Position;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @internal since 8.8.0
|
||||
*/
|
||||
protected $sComment;
|
||||
|
||||
@@ -24,7 +25,7 @@ class Comment implements Renderable
|
||||
public function __construct($sComment = '', $iLineNo = 0)
|
||||
{
|
||||
$this->sComment = $sComment;
|
||||
$this->iLineNo = $iLineNo;
|
||||
$this->setPosition($iLineNo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,14 +36,6 @@ class Comment implements Renderable
|
||||
return $this->sComment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLineNo()
|
||||
{
|
||||
return $this->iLineNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sComment
|
||||
*
|
||||
@@ -55,6 +48,8 @@ class Comment implements Renderable
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
@@ -62,9 +57,11 @@ class Comment implements Renderable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputFormat|null $oOutputFormat
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render(OutputFormat $oOutputFormat)
|
||||
public function render($oOutputFormat)
|
||||
{
|
||||
return '/*' . $this->sComment . '*/';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user