mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°7920 - laminas-mail is an abandoned package, replace it with symfony/mailer (#742)
* N°7920 - laminas-mail is an abandoned package, replace it with symfony/mailer * Fix composer following merge
This commit is contained in:
17
lib/sabberworm/php-css-parser/src/CSSElement.php
Normal file
17
lib/sabberworm/php-css-parser/src/CSSElement.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sabberworm\CSS;
|
||||
|
||||
/**
|
||||
* Represents any entity in the CSS that is encapsulated by a class.
|
||||
*
|
||||
* Its primary purpose is to provide a type for use with `Document::getAllValues()`
|
||||
* when a subset of values from a particular part of the document is required.
|
||||
*
|
||||
* Thus, elements which don't contain `Value`s (such as statement at-rules) don't need to implement this.
|
||||
*
|
||||
* It extends `Renderable` because every element is renderable.
|
||||
*/
|
||||
interface CSSElement extends Renderable {}
|
||||
37
lib/sabberworm/php-css-parser/src/Parsing/Anchor.php
Normal file
37
lib/sabberworm/php-css-parser/src/Parsing/Anchor.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Sabberworm\CSS\Parsing;
|
||||
|
||||
/**
|
||||
* @internal since 8.7.0
|
||||
*/
|
||||
class Anchor
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $iPosition;
|
||||
|
||||
/**
|
||||
* @var \Sabberworm\CSS\Parsing\ParserState
|
||||
*/
|
||||
private $oParserState;
|
||||
|
||||
/**
|
||||
* @param int $iPosition
|
||||
* @param \Sabberworm\CSS\Parsing\ParserState $oParserState
|
||||
*/
|
||||
public function __construct($iPosition, ParserState $oParserState)
|
||||
{
|
||||
$this->iPosition = $iPosition;
|
||||
$this->oParserState = $oParserState;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function backtrack()
|
||||
{
|
||||
$this->oParserState->setPosition($this->iPosition);
|
||||
}
|
||||
}
|
||||
72
lib/sabberworm/php-css-parser/src/Position/Position.php
Normal file
72
lib/sabberworm/php-css-parser/src/Position/Position.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sabberworm\CSS\Position;
|
||||
|
||||
/**
|
||||
* Provides a standard reusable implementation of `Positionable`.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @phpstan-require-implements Positionable
|
||||
*/
|
||||
trait Position
|
||||
{
|
||||
/**
|
||||
* @var int<1, max>|null
|
||||
*/
|
||||
protected $lineNumber;
|
||||
|
||||
/**
|
||||
* @var int<0, max>|null
|
||||
*/
|
||||
protected $columnNumber;
|
||||
|
||||
/**
|
||||
* @return int<1, max>|null
|
||||
*/
|
||||
public function getLineNumber()
|
||||
{
|
||||
return $this->lineNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int<0, max>
|
||||
*/
|
||||
public function getLineNo()
|
||||
{
|
||||
$lineNumber = $this->getLineNumber();
|
||||
|
||||
return $lineNumber !== null ? $lineNumber : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int<0, max>|null
|
||||
*/
|
||||
public function getColumnNumber()
|
||||
{
|
||||
return $this->columnNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int<0, max>
|
||||
*/
|
||||
public function getColNo()
|
||||
{
|
||||
$columnNumber = $this->getColumnNumber();
|
||||
|
||||
return $columnNumber !== null ? $columnNumber : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int<0, max>|null $lineNumber
|
||||
* @param int<0, max>|null $columnNumber
|
||||
*/
|
||||
public function setPosition($lineNumber, $columnNumber = null)
|
||||
{
|
||||
// The conditional is for backwards compatibility (backcompat); `0` will not be allowed in future.
|
||||
$this->lineNumber = $lineNumber !== 0 ? $lineNumber : null;
|
||||
$this->columnNumber = $columnNumber;
|
||||
}
|
||||
}
|
||||
45
lib/sabberworm/php-css-parser/src/Position/Positionable.php
Normal file
45
lib/sabberworm/php-css-parser/src/Position/Positionable.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sabberworm\CSS\Position;
|
||||
|
||||
/**
|
||||
* Represents a CSS item that may have a position in the source CSS document (line number and possibly column number).
|
||||
*
|
||||
* A standard implementation of this interface is available in the `Position` trait.
|
||||
*/
|
||||
interface Positionable
|
||||
{
|
||||
/**
|
||||
* @return int<1, max>|null
|
||||
*/
|
||||
public function getLineNumber();
|
||||
|
||||
/**
|
||||
* @return int<0, max>
|
||||
*
|
||||
* @deprecated in version 8.9.0, will be removed in v9.0. Use `getLineNumber()` instead.
|
||||
*/
|
||||
public function getLineNo();
|
||||
|
||||
/**
|
||||
* @return int<0, max>|null
|
||||
*/
|
||||
public function getColumnNumber();
|
||||
|
||||
/**
|
||||
* @return int<0, max>
|
||||
*
|
||||
* @deprecated in version 8.9.0, will be removed in v9.0. Use `getColumnNumber()` instead.
|
||||
*/
|
||||
public function getColNo();
|
||||
|
||||
/**
|
||||
* @param int<0, max>|null $lineNumber
|
||||
* Providing zero for this parameter is deprecated in version 8.9.0, and will not be supported from v9.0.
|
||||
* Use `null` instead when no line number is available.
|
||||
* @param int<0, max>|null $columnNumber
|
||||
*/
|
||||
public function setPosition($lineNumber, $columnNumber = null);
|
||||
}
|
||||
Reference in New Issue
Block a user