original_string: public static function getPidFromFile($pidFile, $check = false)
      {
          if ($pidFile && file_exists($pidFile)) {
              $pid = (int)file_get_contents($pidFile);
  
              // check
              if ($check && self::isRunning($pid)) {
                  return $pid;
              }
  
              unlink($pidFile);
          }
  
          return 0;
      }
code: public static function getPidFromFile($pidFile, $check = false)
      {
          if ($pidFile && file_exists($pidFile)) {
              $pid = (int)file_get_contents($pidFile);
  
              // check
              if ($check && self::isRunning($pid)) {
                  return $pid;
              }
  
              unlink($pidFile);
          }
  
          return 0;
      }
code_tokens: public static function getPidFromFile ( $ pidFile , $ check = false ) { if ( $ pidFile && file_exists ( $ pidFile ) ) { $ pid = ( int ) file_get_contents ( $ pidFile ) ; // check if ( $ check && self :: isRunning ( $ pid ) ) { return $ pid ; } unlink ( $ pidFile ) ; } return 0 ; }
docstring: get Pid from File
  @param string $pidFile
  @param bool $check
  @return int
docstring_tokens: get Pid from File