Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4113165
Suggestion.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
Suggestion.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Phan
;
/**
* This may be extended later to support the language server protocol
* (E.g. will contain a representation of 1 or more edit that would actually fix the UndeclaredVariable error)
*/
final
class
Suggestion
{
/** @var string the text of the suggestion */
private
$message
;
/** @var mixed internal data not shown in error messages */
private
$internal_data
;
private
function
__construct
(
string
$message
)
{
$this
->
message
=
$message
;
}
/**
* Create a Suggestion suggesting $message
*/
public
static
function
fromString
(
string
$message
):
Suggestion
{
return
new
self
(
$message
);
}
/**
* Contains the text of the suggestion to fix the issue
*/
public
function
getMessage
():
string
{
return
$this
->
message
;
}
/**
* Contains the text of the suggestion to fix the issue
*/
public
function
__toString
():
string
{
return
$this
->
message
;
}
/**
* Sets additional data.
* This can be used by plugins implementing --automatic-fix, for example.
* (Create a Suggestion with the empty string if the suggestion should not be visible in error messages)
*
* @param mixed $data
* @suppress PhanUnreferencedPublicMethod
*/
public
function
setInternalData
(
$data
):
void
{
$this
->
internal_data
=
$data
;
}
/**
* Gets additional data.
* This can be used by plugins implementing --automatic-fix, for example.
* @return mixed
* @suppress PhanUnreferencedPublicMethod
*/
public
function
getInternalData
()
{
return
$this
->
internal_data
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 23:14 (1 d, 19 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
25/e4/dbabb527130da5ea20a676a86b85
Default Alt Text
Suggestion.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment