Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7438235
ReturnArgument.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1018 B
Referenced Files
None
Subscribers
None
ReturnArgument.php
View Options
<?php
declare
(
strict_types
=
1
);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
PHPUnit\Framework\MockObject\Stub
;
use
function
sprintf
;
use
PHPUnit\Framework\MockObject\Invocation
;
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final
class
ReturnArgument
implements
Stub
{
/**
* @var int
*/
private
$argumentIndex
;
public
function
__construct
(
$argumentIndex
)
{
$this
->
argumentIndex
=
$argumentIndex
;
}
public
function
invoke
(
Invocation
$invocation
)
{
if
(
isset
(
$invocation
->
getParameters
()[
$this
->
argumentIndex
]))
{
return
$invocation
->
getParameters
()[
$this
->
argumentIndex
];
}
}
public
function
toString
():
string
{
return
sprintf
(
'return argument #%d'
,
$this
->
argumentIndex
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 14:25 (8 h, 28 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d6/16/48b500f9e54caa1af12eadd84c2a
Default Alt Text
ReturnArgument.php (1018 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment