original_string: public function checkRequiredValues()
      {
          $missing = array();
          foreach ($this->requiredKeys as $key => $names) {
              if (is_array($names)) {
                  if (! ($this->offsetExists($key) && $this->offsetGet($key))) {
                      $subarray = array();
                  } else {
                      $subarray = $this->offsetGet($key);
                  }
                  foreach ($names as $name) {
                      if (! isset($subarray[$name])) {
                          $missing[] = $key . '.' . $name;
                      }
                  }
              } else {
                  if (! ($this->offsetExists($names) && $this->offsetGet($names))) {
                      $missing[] = $names;
                  }
              }
          }
  
          // Chek for https
          if (!\MUtil_Https::on()) {
              if ($this->isHttpsRequired()) {
                  \MUtil_Https::enforce();
              }
          }
  
          if ($missing) {
              if (count($missing) == 1) {
                  $error = sprintf("Missing required project setting: '%s'.", reset($missing));
              } else {
                  $error = sprintf("Missing required project settings: '%s'.", implode("', '", $missing));
              }
              throw new \Gems_Exception_Coding($error);
          }
  
          $superPassword = $this->getSuperAdminPassword();
          if (('production' === APPLICATION_ENV || 'acceptance' === APPLICATION_ENV) &&
                  $this->getSuperAdminName() && $superPassword) {
              if (strlen($superPassword) < $this->minimumSuperPasswordLength) {
                  $error = sprintf("Project setting 'admin.pwd' is shorter than %d characters. That is not allowed.", $this->minimumSuperPasswordLength);
                  throw new \Gems_Exception_Coding($error);
              }
          }
      }
code: public function checkRequiredValues()
      {
          $missing = array();
          foreach ($this->requiredKeys as $key => $names) {
              if (is_array($names)) {
                  if (! ($this->offsetExists($key) && $this->offsetGet($key))) {
                      $subarray = array();
                  } else {
                      $subarray = $this->offsetGet($key);
                  }
                  foreach ($names as $name) {
                      if (! isset($subarray[$name])) {
                          $missing[] = $key . '.' . $name;
                      }
                  }
              } else {
                  if (! ($this->offsetExists($names) && $this->offsetGet($names))) {
                      $missing[] = $names;
                  }
              }
          }
  
          // Chek for https
          if (!\MUtil_Https::on()) {
              if ($this->isHttpsRequired()) {
                  \MUtil_Https::enforce();
              }
          }
  
          if ($missing) {
              if (count($missing) == 1) {
                  $error = sprintf("Missing required project setting: '%s'.", reset($missing));
              } else {
                  $error = sprintf("Missing required project settings: '%s'.", implode("', '", $missing));
              }
              throw new \Gems_Exception_Coding($error);
          }
  
          $superPassword = $this->getSuperAdminPassword();
          if (('production' === APPLICATION_ENV || 'acceptance' === APPLICATION_ENV) &&
                  $this->getSuperAdminName() && $superPassword) {
              if (strlen($superPassword) < $this->minimumSuperPasswordLength) {
                  $error = sprintf("Project setting 'admin.pwd' is shorter than %d characters. That is not allowed.", $this->minimumSuperPasswordLength);
                  throw new \Gems_Exception_Coding($error);
              }
          }
      }
code_tokens: public function checkRequiredValues ( ) { $ missing = array ( ) ; foreach ( $ this -> requiredKeys as $ key => $ names ) { if ( is_array ( $ names ) ) { if ( ! ( $ this -> offsetExists ( $ key ) && $ this -> offsetGet ( $ key ) ) ) { $ subarray = array ( ) ; } else { $ subarray = $ this -> offsetGet ( $ key ) ; } foreach ( $ names as $ name ) { if ( ! isset ( $ subarray [ $ name ] ) ) { $ missing [ ] = $ key . '.' . $ name ; } } } else { if ( ! ( $ this -> offsetExists ( $ names ) && $ this -> offsetGet ( $ names ) ) ) { $ missing [ ] = $ names ; } } } // Chek for https
   if ( ! \ MUtil_Https :: on ( ) ) { if ( $ this -> isHttpsRequired ( ) ) { \ MUtil_Https :: enforce ( ) ; } } if ( $ missing ) { if ( count ( $ missing ) == 1 ) { $ error = sprintf ( "Missing required project setting: '%s'." , reset ( $ missing ) ) ; } else { $ error = sprintf ( "Missing required project settings: '%s'." , implode ( "', '" , $ missing ) ) ; } throw new \ Gems_Exception_Coding ( $ error ) ; } $ superPassword = $ this -> getSuperAdminPassword ( ) ; if ( ( 'production' === APPLICATION_ENV || 'acceptance' === APPLICATION_ENV ) && $ this -> getSuperAdminName ( ) && $ superPassword ) { if ( strlen ( $ superPassword ) < $ this -> minimumSuperPasswordLength ) { $ error = sprintf ( "Project setting 'admin.pwd' is shorter than %d characters. That is not allowed." , $ this -> minimumSuperPasswordLength ) ; throw new \ Gems_Exception_Coding ( $ error ) ; } } }
docstring: This function checks for the required project settings.
  
  Overrule this function or the $requiredParameters to add extra required settings.
  
  @see $requiredParameters
  
  @return void
docstring_tokens: This function checks for the required project settings .