original_string: protected function serverInfoHardware()
      {
          $linfo = $this->linfo->getParser();
  
          $CPUs = $this->ifExists($linfo->getCPU());
          $cpu = $this->getCPUString($CPUs);
          $cpu_count = count($CPUs);
  
          $model = $this->ifExists($linfo->getModel());
          $virtualization = $this->getVirtualizationString(
              $this->ifExists($linfo->getVirtualization())
          );
  
          $memory = $this->ifExists($linfo->getRam());
          $ram = [
              'total' => (int) $this->ifExists($memory['total']),
              'free' => (int) $this->ifExists($memory['free']),
          ];
          $swap = [
              'total' => (int) $this->ifExists($memory['swapTotal']),
              'free' => (int) $this->ifExists($memory['swapFree']),
          ];
  
          $disk = $this->getDiskSpace($linfo->getMounts());
  
          $this->results['server']['hardware'] = compact(
              'cpu', 'cpu_count', 'model', 'virtualization', 'ram', 'swap', 'disk'
          );
  
          return $this;
      }
code: protected function serverInfoHardware()
      {
          $linfo = $this->linfo->getParser();
  
          $CPUs = $this->ifExists($linfo->getCPU());
          $cpu = $this->getCPUString($CPUs);
          $cpu_count = count($CPUs);
  
          $model = $this->ifExists($linfo->getModel());
          $virtualization = $this->getVirtualizationString(
              $this->ifExists($linfo->getVirtualization())
          );
  
          $memory = $this->ifExists($linfo->getRam());
          $ram = [
              'total' => (int) $this->ifExists($memory['total']),
              'free' => (int) $this->ifExists($memory['free']),
          ];
          $swap = [
              'total' => (int) $this->ifExists($memory['swapTotal']),
              'free' => (int) $this->ifExists($memory['swapFree']),
          ];
  
          $disk = $this->getDiskSpace($linfo->getMounts());
  
          $this->results['server']['hardware'] = compact(
              'cpu', 'cpu_count', 'model', 'virtualization', 'ram', 'swap', 'disk'
          );
  
          return $this;
      }
code_tokens: protected function serverInfoHardware ( ) { $ linfo = $ this -> linfo -> getParser ( ) ; $ CPUs = $ this -> ifExists ( $ linfo -> getCPU ( ) ) ; $ cpu = $ this -> getCPUString ( $ CPUs ) ; $ cpu_count = count ( $ CPUs ) ; $ model = $ this -> ifExists ( $ linfo -> getModel ( ) ) ; $ virtualization = $ this -> getVirtualizationString ( $ this -> ifExists ( $ linfo -> getVirtualization ( ) ) ) ; $ memory = $ this -> ifExists ( $ linfo -> getRam ( ) ) ; $ ram = [ 'total' => ( int ) $ this -> ifExists ( $ memory [ 'total' ] ) , 'free' => ( int ) $ this -> ifExists ( $ memory [ 'free' ] ) , ] ; $ swap = [ 'total' => ( int ) $ this -> ifExists ( $ memory [ 'swapTotal' ] ) , 'free' => ( int ) $ this -> ifExists ( $ memory [ 'swapFree' ] ) , ] ; $ disk = $ this -> getDiskSpace ( $ linfo -> getMounts ( ) ) ; $ this -> results [ 'server' ] [ 'hardware' ] = compact ( 'cpu' , 'cpu_count' , 'model' , 'virtualization' , 'ram' , 'swap' , 'disk' ) ; return $ this ; }
docstring: Parse server hardware.
  
  @access protected
docstring_tokens: Parse server hardware .