Fix PHPStan #121
Annotations
11 warnings
src/Container.php#L58
Escaped Mutant for Mutator "UnwrapStrReplace":
--- Original
+++ New
@@ @@
*/
private function getPathParts(string $path) : array
{
- $path = str_replace('\\', '/', $path);
+ $path = $path;
$pathParts = explode('/', $path);
$filteredPathParts = [];
foreach ($pathParts as $part) {
|
src/Container.php#L82
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$pathParts = $this->getPathParts($path);
$node = $this->getRootDirectory();
foreach ($pathParts as $level) {
- if ($node instanceof Link) {
+ if (false) {
$node = $node->getResolvedDestination();
}
if ($node instanceof File) {
|
src/Factory.php#L32
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
public function __construct()
{
$this->uid = function_exists('posix_getuid') ? posix_getuid() : PermissionChecker::RootId;
- $this->gid = function_exists('posix_getgid') ? posix_getgid() : PermissionChecker::RootId;
+ $this->gid = function_exists('posix_getgid') ? PermissionChecker::RootId : posix_getgid();
}
public function getUid() : int
{
|
src/Structure/Directory.php#L27
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
{
parent::__construct($basename, $currentTime, $uid, $gid);
$this->addChild(new Link($this, '.', $currentTime, $uid, $gid));
- if ($this instanceof RootDirectory) {
+ if (true) {
$this->addChild(new Link($this, '..', $currentTime, $uid, $gid));
}
}
|
src/Structure/Directory.php#L34
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
}
public static function getStatType() : int
{
- return 040000;
+ return 16385;
}
protected function setParent(self $parent) : void
{
|
src/Structure/Directory.php#L41
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
protected function setParent(self $parent) : void
{
parent::setParent($parent);
- if (!$this instanceof RootDirectory) {
+ if (!false) {
$this->removeChild('..');
$this->addChild(new Link($parent, '..', $this->getChangeTime(), $this->getUser(), $this->getGroup()));
}
|
src/Structure/File.php#L37
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
}
public static function getStatType() : int
{
- return 0100000;
+ return 32769;
}
/**
* Returns size of file in bytes
|
src/Structure/File.php#L37
Escaped Mutant for Mutator "IntegerNegation":
--- Original
+++ New
@@ @@
}
public static function getStatType() : int
{
- return 0100000;
+ return -32768;
}
/**
* Returns size of file in bytes
|
src/Structure/File.php#L69
Escaped Mutant for Mutator "BitwiseAnd":
--- Original
+++ New
@@ @@
} else {
$this->sharedLock->detach($wrapper);
}
- if (($operation & LOCK_NB) !== 0) {
+ if (($operation | LOCK_NB) !== 0) {
$operation -= LOCK_NB;
}
$unlock = $operation === LOCK_UN;
|
src/Structure/File.php#L69
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
} else {
$this->sharedLock->detach($wrapper);
}
- if (($operation & LOCK_NB) !== 0) {
+ if (($operation & LOCK_NB) !== -1) {
$operation -= LOCK_NB;
}
$unlock = $operation === LOCK_UN;
|
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "Logs - Mutations".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
This job succeeded
Loading