Page MenuHomeWickedGov Phorge

TaintednessWithError.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

TaintednessWithError.php

<?php declare( strict_types=1 );
namespace SecurityCheckPlugin;
/**
* Object that encapsulates a Taintedness and a list of lines that caused it
*/
class TaintednessWithError {
/** @var Taintedness */
private $taintedness;
/**
* @var CausedByLines
*/
private $error;
/** @var MethodLinks */
private $methodLinks;
/**
* @param Taintedness $taintedness
* @param CausedByLines $error
* @param MethodLinks $methodLinks
*/
public function __construct( Taintedness $taintedness, CausedByLines $error, MethodLinks $methodLinks ) {
$this->taintedness = $taintedness;
$this->error = $error;
$this->methodLinks = $methodLinks;
}
public static function newEmpty(): self {
return new self( new Taintedness( SecurityCheckPlugin::NO_TAINT ), new CausedByLines(), new MethodLinks() );
}
/**
* @return Taintedness
*/
public function getTaintedness(): Taintedness {
return $this->taintedness;
}
/**
* @return CausedByLines
*/
public function getError(): CausedByLines {
return $this->error;
}
/**
* @return MethodLinks
*/
public function getMethodLinks(): MethodLinks {
return $this->methodLinks;
}
/**
* @param TaintednessWithError $other
*/
public function mergeWith( self $other ): void {
$this->taintedness->mergeWith( $other->taintedness );
$this->error->mergeWith( $other->error );
$this->methodLinks->mergeWith( $other->methodLinks );
}
/**
* @param self $other
* @return self
*/
public function asMergedWith( self $other ): self {
$ret = clone $this;
$ret->mergeWith( $other );
return $ret;
}
public function __clone() {
$this->taintedness = clone $this->taintedness;
$this->error = clone $this->error;
$this->methodLinks = clone $this->methodLinks;
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Aug 19, 07:55 (2 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
06/d4/21150b74e133acf5b00c93c33538
Default Alt Text
TaintednessWithError.php (1 KB)

Event Timeline