original_string: public function sendNotificationIfUpdatesAvailable()
      {
          $pluginsHavingUpdate = $this->getPluginsHavingUpdate();
  
          if (empty($pluginsHavingUpdate)) {
              return;
          }
  
          $pluginsToBeNotified = array();
  
          foreach ($pluginsHavingUpdate as $plugin) {
              if ($this->hasNotificationAlreadyReceived($plugin)) {
                  continue;
              }
  
              $this->setHasLatestUpdateNotificationReceived($plugin);
  
              $pluginsToBeNotified[] = $plugin;
          }
  
          if (!empty($pluginsToBeNotified)) {
              $this->sendNotifications($pluginsToBeNotified);
          }
      }
code: public function sendNotificationIfUpdatesAvailable()
      {
          $pluginsHavingUpdate = $this->getPluginsHavingUpdate();
  
          if (empty($pluginsHavingUpdate)) {
              return;
          }
  
          $pluginsToBeNotified = array();
  
          foreach ($pluginsHavingUpdate as $plugin) {
              if ($this->hasNotificationAlreadyReceived($plugin)) {
                  continue;
              }
  
              $this->setHasLatestUpdateNotificationReceived($plugin);
  
              $pluginsToBeNotified[] = $plugin;
          }
  
          if (!empty($pluginsToBeNotified)) {
              $this->sendNotifications($pluginsToBeNotified);
          }
      }
code_tokens: public function sendNotificationIfUpdatesAvailable ( ) { $ pluginsHavingUpdate = $ this -> getPluginsHavingUpdate ( ) ; if ( empty ( $ pluginsHavingUpdate ) ) { return ; } $ pluginsToBeNotified = array ( ) ; foreach ( $ pluginsHavingUpdate as $ plugin ) { if ( $ this -> hasNotificationAlreadyReceived ( $ plugin ) ) { continue ; } $ this -> setHasLatestUpdateNotificationReceived ( $ plugin ) ; $ pluginsToBeNotified [ ] = $ plugin ; } if ( ! empty ( $ pluginsToBeNotified ) ) { $ this -> sendNotifications ( $ pluginsToBeNotified ) ; } }
docstring: Sends an email to all super users if there is an update available for any plugins from the Marketplace.
  For each update we send an email only once.
  
  @return bool
docstring_tokens: Sends an email to all super users if there is an update available for any plugins from the Marketplace . For each update we send an email only once .