for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class StubEmail extends Email implements TestOnly
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* Overrides email sending
*
* @param string $messageID Optional message ID so the message can be identified in bounces etc.
$messageID
string|null
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
* @return array
*/
public function send($messageID = null)
return array(
'to' => $this->to,
'subject' => $this->subject,
'from' => $this->from,
);
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.