Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4092725
ValidationIssues.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
ValidationIssues.php
View Options
<?php
/**
* @file
* @author Niklas Laxström
* @license GPL-2.0-or-later
*/
namespace
MediaWiki\Extension\Translate\Validation
;
use
ArrayIterator
;
use
Countable
;
use
IteratorAggregate
;
use
Traversable
;
/**
* Mutable collection for validation issues.
*
* @newable
* @since 2020.06
*/
class
ValidationIssues
implements
Countable
,
IteratorAggregate
{
/** @var ValidationIssue[] */
private
$issues
=
[];
/** Add a new validation issue to the collection. */
public
function
add
(
ValidationIssue
$issue
)
{
$this
->
issues
[]
=
$issue
;
}
/** Merge another collection to this collection. */
public
function
merge
(
ValidationIssues
$issues
)
{
$this
->
issues
=
array_merge
(
$this
->
issues
,
$issues
->
issues
);
}
/**
* Check whether this collection is not empty.
*
* @return bool False if empty, true otherwise
*/
public
function
hasIssues
():
bool
{
return
$this
->
issues
!==
[];
}
/** @return Traversable<ValidationIssue> */
public
function
getIterator
():
Traversable
{
return
new
ArrayIterator
(
$this
->
issues
);
}
/** @inheritDoc */
public
function
count
():
int
{
return
count
(
$this
->
issues
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 18 2026, 12:24 (4 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a5/85/d30fd0e4adbe3c49743e5a750fa8
Default Alt Text
ValidationIssues.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment