Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12427469
CodeFunction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
562 B
Referenced Files
None
Subscribers
None
CodeFunction.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Keruald\OmniTools\Reflection
;
use
InvalidArgumentException
;
use
ReflectionParameter
;
class
CodeFunction
{
/**
* @throws InvalidArgumentException
*/
public
static
function
getParameterType
(
ReflectionParameter
$parameter
)
:
string
{
if
(!
$parameter
->
hasType
())
{
$name
=
$parameter
->
getName
();
throw
new
InvalidArgumentException
(
"Parameter $name doesn't have a type"
);
}
return
$parameter
->
getType
()->
getName
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 7, 08:41 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3112992
Default Alt Text
CodeFunction.php (562 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment