Update ramsey/composer-install action to v3.0.1 #640
Annotations
10 warnings
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L207
Escaped Mutant for Mutator "LogicalOr":
@@ @@
public function escapeHtmlAttr(string $string)
{
$string = $this->toUtf8($string);
- if ($string === '' || ctype_digit($string)) {
+ if ($string === '' && ctype_digit($string)) {
return $string;
}
$result = preg_replace_callback('/[^a-z0-9,\.\-_]/iSu', $this->htmlAttrMatcher, $string);
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L231
Escaped Mutant for Mutator "LogicalOr":
@@ @@
public function escapeJs(string $string)
{
$string = $this->toUtf8($string);
- if ($string === '' || ctype_digit($string)) {
+ if ($string === '' && ctype_digit($string)) {
return $string;
}
$result = preg_replace_callback('/[^a-z0-9,\._]/iSu', $this->jsMatcher, $string);
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L262
Escaped Mutant for Mutator "LogicalOr":
@@ @@
public function escapeCss(string $string)
{
$string = $this->toUtf8($string);
- if ($string === '' || ctype_digit($string)) {
+ if ($string === '' && ctype_digit($string)) {
return $string;
}
$result = preg_replace_callback('/[^a-z0-9]/iSu', $this->cssMatcher, $string);
|
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L289
Escaped Mutant for Mutator "LessThanOrEqualTo":
@@ @@
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
- if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord >= 0x7f && $ord <= 0x9f) {
+ if ($ord < 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord >= 0x7f && $ord <= 0x9f) {
return '�';
}
/**
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L290
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
@@ @@
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
- if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord >= 0x7f && $ord <= 0x9f) {
+ if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord > 0x7f && $ord <= 0x9f) {
return '�';
}
/**
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L290
Escaped Mutant for Mutator "LessThanOrEqualTo":
@@ @@
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
- if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord >= 0x7f && $ord <= 0x9f) {
+ if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord >= 0x7f && $ord < 0x9f) {
return '�';
}
/**
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L290
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
* The following replaces characters undefined in HTML with the
* hex entity for the Unicode replacement character.
*/
- if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || $ord >= 0x7f && $ord <= 0x9f) {
+ if ($ord <= 0x1f && $chr !== "\t" && $chr !== "\n" && $chr !== "\r" || !($ord >= 0x7f) && !($ord <= 0x9f)) {
return '�';
}
/**
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L299
Escaped Mutant for Mutator "GreaterThan":
@@ @@
* Check if the current character to escape has a name entity we should
* replace it with while grabbing the integer value of the character.
*/
- if (strlen($chr) > 1) {
+ if (strlen($chr) >= 1) {
$chr = $this->convertEncoding($chr, 'UTF-32BE', 'UTF-8');
}
$hex = bin2hex($chr);
|
Run vendor/bin/infection --configuration=.mutation-tests.json:
src/Escaper.php#L313
Escaped Mutant for Mutator "GreaterThan":
@@ @@
* Per OWASP recommendations, we'll use upper hex entities
* for any other characters where a named entity does not exist.
*/
- if ($ord > 255) {
+ if ($ord >= 255) {
return sprintf('&#x%04X;', $ord);
}
return sprintf('&#x%02X;', $ord);
|
Loading