original_string: protected static function eip($tag = 'znframework')
      {
          if( $return = Restful::useragent(true)->get('https://api.github.com/repos/znframework/'.$tag.'/tags') )
          {
              if( ! isset($return->message) )
              {
                  usort($return, function($data1, $data2){ return strcmp($data1->name, $data2->name); });
  
                  rsort($return);
  
                  $lastest = $return[0];
  
                  $lastVersionData = $lastest->name ?? ZN_VERSION;
  
                  $open   = popen('composer update 2>&1', 'r');
                  $result = fread($open, 2048);
                  pclose($open);
  
                  if( empty($result) )
                  {
                      $status = self::$lang['composerUpdate'];
                  }
                  else
                  {
                      if( ZN_VERSION !== $lastVersionData )
                      {                   
                          File::replace(DIRECTORY_INDEX, ZN_VERSION, $lastVersionData);
                      
                          $status = self::$lang['upgradeSuccess'];
                      }
                      else
                      {
                          $status = self::$lang['alreadyVersion'];
                      }
                  }
              }
              else
              {
                  $status = $return->message;
              }
  
              return $status;
          }
      }
code: protected static function eip($tag = 'znframework')
      {
          if( $return = Restful::useragent(true)->get('https://api.github.com/repos/znframework/'.$tag.'/tags') )
          {
              if( ! isset($return->message) )
              {
                  usort($return, function($data1, $data2){ return strcmp($data1->name, $data2->name); });
  
                  rsort($return);
  
                  $lastest = $return[0];
  
                  $lastVersionData = $lastest->name ?? ZN_VERSION;
  
                  $open   = popen('composer update 2>&1', 'r');
                  $result = fread($open, 2048);
                  pclose($open);
  
                  if( empty($result) )
                  {
                      $status = self::$lang['composerUpdate'];
                  }
                  else
                  {
                      if( ZN_VERSION !== $lastVersionData )
                      {                   
                          File::replace(DIRECTORY_INDEX, ZN_VERSION, $lastVersionData);
                      
                          $status = self::$lang['upgradeSuccess'];
                      }
                      else
                      {
                          $status = self::$lang['alreadyVersion'];
                      }
                  }
              }
              else
              {
                  $status = $return->message;
              }
  
              return $status;
          }
      }
code_tokens: protected static function eip ( $ tag = 'znframework' ) { if ( $ return = Restful :: useragent ( true ) -> get ( 'https://api.github.com/repos/znframework/' . $ tag . '/tags' ) ) { if ( ! isset ( $ return -> message ) ) { usort ( $ return , function ( $ data1 , $ data2 ) { return strcmp ( $ data1 -> name , $ data2 -> name ) ; } ) ; rsort ( $ return ) ; $ lastest = $ return [ 0 ] ; $ lastVersionData = $ lastest -> name ?? ZN_VERSION ; $ open = popen ( 'composer update 2>&1' , 'r' ) ; $ result = fread ( $ open , 2048 ) ; pclose ( $ open ) ; if ( empty ( $ result ) ) { $ status = self :: $ lang [ 'composerUpdate' ] ; } else { if ( ZN_VERSION !== $ lastVersionData ) { File :: replace ( DIRECTORY_INDEX , ZN_VERSION , $ lastVersionData ) ; $ status = self :: $ lang [ 'upgradeSuccess' ] ; } else { $ status = self :: $ lang [ 'alreadyVersion' ] ; } } } else { $ status = $ return -> message ; } return $ status ; } }
docstring: Proteted upgrade EIP
docstring_tokens: Proteted upgrade EIP