original_string: public function checkMaintenanceMode()
      {
          if (option('site_maintenance') &&
              !$this->request->isUserAdmin() &&
              !in_array(strtolower("{$this->request->plugin}:{$this->request->controller}:{$this->request->action}"), ['user:gateway:login', 'user:gateway:logout'])
          ) {
              $allowedIps = (array)array_filter(array_map('trim', explode(',', option('site_maintenance_ip'))));
              if (!in_array(env('REMOTE_ADDR'), $allowedIps)) {
                  throw new SiteUnderMaintenanceException(option('site_maintenance_message'));
              }
          }
      }
code: public function checkMaintenanceMode()
      {
          if (option('site_maintenance') &&
              !$this->request->isUserAdmin() &&
              !in_array(strtolower("{$this->request->plugin}:{$this->request->controller}:{$this->request->action}"), ['user:gateway:login', 'user:gateway:logout'])
          ) {
              $allowedIps = (array)array_filter(array_map('trim', explode(',', option('site_maintenance_ip'))));
              if (!in_array(env('REMOTE_ADDR'), $allowedIps)) {
                  throw new SiteUnderMaintenanceException(option('site_maintenance_message'));
              }
          }
      }
code_tokens: public function checkMaintenanceMode ( ) { if ( option ( 'site_maintenance' ) && ! $ this -> request -> isUserAdmin ( ) && ! in_array ( strtolower ( "{$this->request->plugin}:{$this->request->controller}:{$this->request->action}" ) , [ 'user:gateway:login' , 'user:gateway:logout' ] ) ) { $ allowedIps = ( array ) array_filter ( array_map ( 'trim' , explode ( ',' , option ( 'site_maintenance_ip' ) ) ) ) ; if ( ! in_array ( env ( 'REMOTE_ADDR' ) , $ allowedIps ) ) { throw new SiteUnderMaintenanceException ( option ( 'site_maintenance_message' ) ) ; } } }
docstring: Checks if maintenance is enabled, and renders the corresponding maintenance
  message.
  
  Login & logout sections of the site still working even on maintenance mode,
  administrators can access the whole site as well.
  
  @return void
  @throws CMS\Error\SiteUnderMaintenanceException When site is under
  maintenance mode
docstring_tokens: Checks if maintenance is enabled and renders the corresponding maintenance message .