Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4144637
Shrinker.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
Shrinker.php
View Options
<?php
namespace
Eris
;
use
Eris\Generator\GeneratedValueSingle
;
use
Eris\Generator\TupleGenerator
;
use
Eris\Shrinker\TimeLimit
;
/**
* @private this interface is not stable yet and may change in the future
*/
interface
Shrinker
{
/**
* Use its assertion to rethrow the minimal assertion failure derived
* from shrinking $elements.
* $elements contains an array of GeneratedValueSingle objects corresponding
* to the elements that lead to the original failure of the assertion.
* @throws \Throwable
*/
public
function
from
(
GeneratedValueSingle
$elements
,
$exception
);
/**
* Configuration: allows specifying a time limit that should stop
* shrinking if reached and return the best minimimization
* found so far.
* @return $this
*/
public
function
setTimeLimit
(
TimeLimit
$timeLimit
);
/**
* Add a condition that must be respected (e.g. a `when()`)
* from the shrunk elements. Elements not satisfying `$condition`
* will be discarded.
*
* `$condition` takes a number of arguments equal to the cardinality
* of `$elements`, and accepts the unboxed values. Returns a boolean.
*
* @return $this
*/
public
function
addGoodShrinkCondition
(
callable
$condition
);
/**
* Adds callables that will be passed all the attempt to shrink $elements.
* Data structure is, in fact, the same as `$elements`.
*
* @return $this
*/
public
function
onAttempt
(
callable
$listener
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 17:19 (4 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
76/7c/f688d08d3ab5372207120deb0fd7
Default Alt Text
Shrinker.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment