Implement dtos #24
Annotations
10 warnings
src/OdataQueryParser.php#L83
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
private static function extractQueryString(string $url) : ?string
{
$queryString = parse_url($url, PHP_URL_QUERY);
- if ($queryString === false) {
+ if ($queryString === true) {
throw new InvalidArgumentException("URL could not be parsed. Ensure the URL is not malformed.");
}
// The URL query string parser should return a string or null query string
|
src/OdataQueryParser.php#L88
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation":
--- Original
+++ New
@@ @@
throw new InvalidArgumentException("URL could not be parsed. Ensure the URL is not malformed.");
}
// The URL query string parser should return a string or null query string
- if (!($queryString === null || is_string($queryString))) {
+ if (!(!($queryString === null) || !is_string($queryString))) {
throw new InvalidArgumentException("URL query string should be a string.");
}
return $queryString;
|
src/OdataQueryParser.php#L108
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
$result = [];
parse_str($queryString, $result);
// Verify that the parsed result only has string key and values
- foreach ($result as $key => $value) {
+ foreach (array() as $key => $value) {
if (!is_string($key) || !is_string($value)) {
throw new InvalidArgumentException("Parsed query string has non-string values.");
}
|
src/OdataQueryParser.php#L109
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
parse_str($queryString, $result);
// Verify that the parsed result only has string key and values
foreach ($result as $key => $value) {
- if (!is_string($key) || !is_string($value)) {
+ if (!is_string($key) && !is_string($value)) {
throw new InvalidArgumentException("Parsed query string has non-string values.");
}
}
|
src/OdataQueryParser.php#L226
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
{
if (!self::validateWithFilterValidate($queryString, self::$count, FILTER_VALIDATE_BOOLEAN)) {
// 0 and 1 are also valid values for a boolean
- if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
+ if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) !== '0' || trim($queryString[self::$count]) === '1'))) {
return null;
}
}
|
src/OdataQueryParser.php#L226
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
{
if (!self::validateWithFilterValidate($queryString, self::$count, FILTER_VALIDATE_BOOLEAN)) {
// 0 and 1 are also valid values for a boolean
- if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
+ if (!(array_key_exists(self::$count, $queryString) && ($queryString[self::$count] === '0' || trim($queryString[self::$count]) === '1'))) {
return null;
}
}
|
src/OdataQueryParser.php#L226
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
{
if (!self::validateWithFilterValidate($queryString, self::$count, FILTER_VALIDATE_BOOLEAN)) {
// 0 and 1 are also valid values for a boolean
- if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
+ if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) !== '1'))) {
return null;
}
}
|
src/OdataQueryParser.php#L226
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
{
if (!self::validateWithFilterValidate($queryString, self::$count, FILTER_VALIDATE_BOOLEAN)) {
// 0 and 1 are also valid values for a boolean
- if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
+ if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || $queryString[self::$count] === '1'))) {
return null;
}
}
|
src/OdataQueryParser.php#L226
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
{
if (!self::validateWithFilterValidate($queryString, self::$count, FILTER_VALIDATE_BOOLEAN)) {
// 0 and 1 are also valid values for a boolean
- if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
+ if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' && trim($queryString[self::$count]) === '1'))) {
return null;
}
}
|
src/OdataQueryParser.php#L226
Escaped Mutant for Mutator "LogicalOrNegation":
--- Original
+++ New
@@ @@
{
if (!self::validateWithFilterValidate($queryString, self::$count, FILTER_VALIDATE_BOOLEAN)) {
// 0 and 1 are also valid values for a boolean
- if (!(array_key_exists(self::$count, $queryString) && (trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
+ if (!(array_key_exists(self::$count, $queryString) && !(trim($queryString[self::$count]) === '0' || trim($queryString[self::$count]) === '1'))) {
return null;
}
}
|
The logs for this run have expired and are no longer available.
Loading