getHelpText() 공개 메소드

Returns the help text for resolving the problem
public getHelpText ( ) : string
리턴 string The help text
예제 #1
0
 /**
  * Prints a Requirement instance
  */
 private function echo_requirement(\Requirement $requirement)
 {
     $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR');
     $data = '';
     switch (rtrim(ltrim(str_pad($result, 9)))) {
         case 'OK':
             $data .= '<tr class="success">';
             break;
         case 'WARNING':
             $data .= '<tr class="warning">';
             break;
         case 'ERROR':
             $data .= '<tr class="danger">';
             break;
         default:
             $data .= '<tr>';
             break;
     }
     $data .= '<td>' . str_pad($result, 9) . '</td>';
     $data .= '<td>' . $requirement->getTestMessage() . "</td>";
     if (!$requirement->isFulfilled()) {
         $data .= '<td>' . $requirement->getHelpText() . '</td>';
     }
     $data .= '</tr>';
     return $data;
 }
예제 #2
0
파일: check.php 프로젝트: Dren-x/mobit
function get_error_message(Requirement $requirement, $lineSize)
{
    if ($requirement->isFulfilled()) {
        return;
    }
    $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL . '   ') . PHP_EOL;
    $errorMessage .= '   > ' . wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL . '   > ') . PHP_EOL;
    return $errorMessage;
}
예제 #3
0
/**
 * Prints a Requirement instance
 */
function echo_requirement(Requirement $requirement)
{
    $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR');
    echo ' ' . str_pad($result, 9);
    echo $requirement->getTestMessage() . "\n";
    if (!$requirement->isFulfilled()) {
        echo sprintf("          %s\n\n", $requirement->getHelpText());
    }
}