original_string: private function canBeActivated(Endpoint $newActive)
      {
          // if newActive is currently in error, see if it can be re-enabled
          if ($newActive->isError() === true) {
              $offlineInterval = new \DateTime();
              $offlineInterval->modify('-60 minutes');
  
              return $newActive->getLastConnected() !== null && $newActive->getLastConnected() <= $offlineInterval;
          }
  
          return true;
      }
code: private function canBeActivated(Endpoint $newActive)
      {
          // if newActive is currently in error, see if it can be re-enabled
          if ($newActive->isError() === true) {
              $offlineInterval = new \DateTime();
              $offlineInterval->modify('-60 minutes');
  
              return $newActive->getLastConnected() !== null && $newActive->getLastConnected() <= $offlineInterval;
          }
  
          return true;
      }
code_tokens: private function canBeActivated ( Endpoint $ newActive ) { // if newActive is currently in error, see if it can be re-enabled if ( $ newActive -> isError ( ) === true ) { $ offlineInterval = new \ DateTime ( ) ; $ offlineInterval -> modify ( '-60 minutes' ) ; return $ newActive -> getLastConnected ( ) !== null && $ newActive -> getLastConnected ( ) <= $ offlineInterval ; } return true ; }
docstring: Determine if this endpoint can re-enabled.
  
  @param Endpoint $newActive
  
  @return bool
docstring_tokens: Determine if this endpoint can re - enabled .