Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4126086
TaintednessWithError.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
TaintednessWithError.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment