original_string: public function check()
      {
          $pass = true;
          foreach ($this->_rules as $rule) {
              if ($rule->lhs() instanceof BasePackage) {
                  $package = $rule->lhs();
              } else {
                  $package = PackageFactory::create((string)$rule->lhs());
              }
  
              if (!$package->versionMatch($rule->rhs())) {
                  $this->_fail($rule);
                  $pass = false;
              } else {
                  $this->_pass($rule);
              }
          }
  
          $this->_checked = true;
  
          return $pass;
      }
code: public function check()
      {
          $pass = true;
          foreach ($this->_rules as $rule) {
              if ($rule->lhs() instanceof BasePackage) {
                  $package = $rule->lhs();
              } else {
                  $package = PackageFactory::create((string)$rule->lhs());
              }
  
              if (!$package->versionMatch($rule->rhs())) {
                  $this->_fail($rule);
                  $pass = false;
              } else {
                  $this->_pass($rule);
              }
          }
  
          $this->_checked = true;
  
          return $pass;
      }
code_tokens: public function check ( ) { $ pass = true ; foreach ( $ this -> _rules as $ rule ) { if ( $ rule -> lhs ( ) instanceof BasePackage ) { $ package = $ rule -> lhs ( ) ; } else { $ package = PackageFactory :: create ( ( string ) $ rule -> lhs ( ) ) ; } if ( ! $ package -> versionMatch ( $ rule -> rhs ( ) ) ) { $ this -> _fail ( $ rule ) ; $ pass = false ; } else { $ this -> _pass ( $ rule ) ; } } $ this -> _checked = true ; return $ pass ; }
docstring: Checks all the rules of this class.
  
  @return bool True if all rules are meet
docstring_tokens: Checks all the rules of this class .