HippoPHP\Hippo\CheckRepository::getChecks PHP Метод

getChecks() публичный Метод

public getChecks ( ) : HippoPHP\Hippo\Check[]
Результат HippoPHP\Hippo\Check[]
    public function getChecks()
    {
        $this->buildIfNecessary();
        return $this->checks;
    }

Usage Example

Пример #1
0
 /**
  * @param \HippoPHP\Hippo\File $file
  *
  * @return \HippoPHP\Hippo\CheckResult[]
  */
 public function checkFile(File $file)
 {
     $checkContext = new CheckContext($file);
     $results = [];
     foreach ($this->checkRepository->getChecks() as $check) {
         $branch = $this->config->get($check->getConfigRoot());
         if ($branch->get('enabled') === true) {
             $results[] = $check->checkFile($checkContext, $branch);
         }
     }
     return $results;
 }