Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5992744
MinimumEvaluations.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
907 B
Referenced Files
None
Subscribers
None
MinimumEvaluations.php
View Options
<?php
namespace
Eris\Listener
;
use
Eris\Listener
;
use
Eris\Listener\EmptyListener
;
use
OutOfBoundsException
;
use
Exception
;
class
MinimumEvaluations
extends
EmptyListener
implements
Listener
{
private
$threshold
;
/**
* @param float $threshold from 0.0 to 1.0
*/
public
static
function
ratio
(
$threshold
)
{
return
new
self
(
$threshold
);
}
private
function
__construct
(
$threshold
)
{
$this
->
threshold
=
$threshold
;
}
public
function
endPropertyVerification
(
$ordinaryEvaluations
,
$iterations
,
Exception
$exception
=
null
)
{
if
(
$exception
)
{
return
;
}
$evaluationRatio
=
$ordinaryEvaluations
/
$iterations
;
if
(
$evaluationRatio
<
$this
->
threshold
)
{
throw
new
OutOfBoundsException
(
"Evaluation ratio {$evaluationRatio} is under the threshold {$this->threshold}"
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 02:25 (5 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
87/4f/0eafa3eb9824ac3bcf36dcb838cc
Default Alt Text
MinimumEvaluations.php (907 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment