HippoPHP\Hippo\Checks\Line\MustStartWithOpenTagCheck::checkFileInternal PHP Method

checkFileInternal() protected method

checkFileInternal(): defined by AbstractCheck.
See also: AbstractCheck::checkFileInternal()
protected checkFileInternal ( CheckContext $checkContext, Config $config )
$checkContext HippoPHP\Hippo\CheckContext
$config HippoPHP\Hippo\Config\Config
    protected function checkFileInternal(CheckContext $checkContext, Config $config)
    {
        $file = $checkContext->getFile();
        $tokens = $checkContext->getTokenList();
        $firstToken = $tokens->rewind()->current();
        if (!$firstToken->isType(T_OPEN_TAG)) {
            $this->addViolation($file, 1, 1, 'Files must begin with the PHP open tag.');
        }
    }
MustStartWithOpenTagCheck