for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Prints out the php environment informations for admins.
*
* Can be useful if you can't run this command directly on the server because you haven't got the shell access.
*/
class PHPInfoTask extends BuildTask
{
* title of the task
* @var string
public $title = 'Display PHPInfo information';
* description of the task
public $description = 'Displays the output of phpinfo() for this environment.';
* @param SS_HTTPResponse $request
$request
SS_HTTPResponse|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.
public function run($request = null)
if (Permission::check('ADMIN') !== true) {
$this->message('Only admins can run this task.');
} else {
phpinfo();
}
* @param string $text
protected function message($text)
if (PHP_SAPI !== 'cli') {
$text = '<p>' . $text.'</p>';
echo $text . PHP_EOL;
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.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.