本文整理汇总了PHP中Checker::check方法的典型用法代码示例。如果您正苦于以下问题:PHP Checker::check方法的具体用法?PHP Checker::check怎么用?PHP Checker::check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checker
的用法示例。
在下文中一共展示了Checker::check方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkFile
/**
* @param string $filename
* @param Settings $settings
* @return Result[]
*/
public function checkFile($filename, Settings $settings = null)
{
if ($settings === null) {
$settings = new Settings();
}
$content = $this->loadFile($filename);
$checker = new Checker($settings);
$results = $checker->check($content);
$this->setFilePathToResults($results, $filename);
return $results;
}
示例2: testAllLevels
/**
* Test for check.
*
* @dataProvider checkerProvider
*/
public function testAllLevels($subject, $codiceFiscaleToCheck, $omocodiaLevel, $expected)
{
$checker = new Checker($subject, array('codiceFiscaleToCheck' => $codiceFiscaleToCheck, 'omocodiaLevel' => $omocodiaLevel));
$actual = $checker->check();
$this->assertEquals($expected, $actual);
}
示例3: usage
} else {
usage($_SERVER['argv']);
}
continue;
}
if ($option == "-e" || $option == "--exclude") {
$i++;
if ($i < $_SERVER['argc']) {
$chk->exclude = $_SERVER['argv'][$i];
} else {
usage($_SERVER['argv']);
}
continue;
}
$needhelp = false;
$chk->check($option);
}
if ($needhelp) {
usage($_SERVER['argv']);
}
class Checker
{
public $debug = 0;
public $exclude = '';
protected $_filename;
const DEPRECATED = 'deprecated-func';
const DEPRECATED_ALT = 'deprecated-with-alt';
const KEYWORD = 'keyword';
const TOSTRING = 'tostring-noparam';
const NOSTATIC = 'no-static';
const NOTPUBLIC = 'not-public';