original_string: public function upgradeCheck($warnings)
      {
          if (!User::can(Rbac::ROLE_ADMIN)) {
              return false;
          }
          if ($warnings) {
              foreach ($warnings as $warning) {
                  if ($warning === static::warnings()['old_version']) {
                      return false;
                  }
                  if ($warning === static::warnings()['new_version']) {
                      return false;
                  }
              }
          }
          $result = Helper::compareVersions(
              explode('.', $this->module->version),
              explode('.', $this->module->podiumConfig->get('version'))
          );
          if ($result === '>') {
              $this->warning(static::warnings()['old_version'], false);
          } elseif ($result === '<') {
              $this->warning(static::warnings()['new_version'], false);
          }
          return false;
      }
code: public function upgradeCheck($warnings)
      {
          if (!User::can(Rbac::ROLE_ADMIN)) {
              return false;
          }
          if ($warnings) {
              foreach ($warnings as $warning) {
                  if ($warning === static::warnings()['old_version']) {
                      return false;
                  }
                  if ($warning === static::warnings()['new_version']) {
                      return false;
                  }
              }
          }
          $result = Helper::compareVersions(
              explode('.', $this->module->version),
              explode('.', $this->module->podiumConfig->get('version'))
          );
          if ($result === '>') {
              $this->warning(static::warnings()['old_version'], false);
          } elseif ($result === '<') {
              $this->warning(static::warnings()['new_version'], false);
          }
          return false;
      }
code_tokens: public function upgradeCheck ( $ warnings ) { if ( ! User :: can ( Rbac :: ROLE_ADMIN ) ) { return false ; } if ( $ warnings ) { foreach ( $ warnings as $ warning ) { if ( $ warning === static :: warnings ( ) [ 'old_version' ] ) { return false ; } if ( $ warning === static :: warnings ( ) [ 'new_version' ] ) { return false ; } } } $ result = Helper :: compareVersions ( explode ( '.' , $ this -> module -> version ) , explode ( '.' , $ this -> module -> podiumConfig -> get ( 'version' ) ) ) ; if ( $ result === '>' ) { $ this -> warning ( static :: warnings ( ) [ 'old_version' ] , false ) ; } elseif ( $ result === '<' ) { $ this -> warning ( static :: warnings ( ) [ 'new_version' ] , false ) ; } return false ; }
docstring: Performs upgrade check.
  @param array $warnings Flash warnings
  @return bool
  @since 0.2
docstring_tokens: Performs upgrade check .