original_string: public function getOutdatedPackages(array $excluded = [])
      {
          // Get all installed and required packages.
          $installed = $this->composer->getInstalledPackages();
          $required = $this->composer->getRequiredPackages();
  
          $outdated = [];
  
          // Get the installed version number of the required packages.
          $packages = array_intersect_key($installed, $required);
  
          foreach ($packages as $package) {
              $name = $package['name'];
              $version = Version::normalize($package['version']);
              $prettyVersion = $required[$name]['version'];
              $devDependency = $package['devDependency'];
  
              if (in_array($name, $excluded)) {
                  continue;
              }
  
              $package = new Package($name, $version, $prettyVersion, $devDependency);
  
              if ($package->isOutdated()) {
                  $outdated[] = $package;
              }
          }
  
          return $outdated;
      }
code: public function getOutdatedPackages(array $excluded = [])
      {
          // Get all installed and required packages.
          $installed = $this->composer->getInstalledPackages();
          $required = $this->composer->getRequiredPackages();
  
          $outdated = [];
  
          // Get the installed version number of the required packages.
          $packages = array_intersect_key($installed, $required);
  
          foreach ($packages as $package) {
              $name = $package['name'];
              $version = Version::normalize($package['version']);
              $prettyVersion = $required[$name]['version'];
              $devDependency = $package['devDependency'];
  
              if (in_array($name, $excluded)) {
                  continue;
              }
  
              $package = new Package($name, $version, $prettyVersion, $devDependency);
  
              if ($package->isOutdated()) {
                  $outdated[] = $package;
              }
          }
  
          return $outdated;
      }
code_tokens: public function getOutdatedPackages ( array $ excluded = [ ] ) { // Get all installed and required packages. $ installed = $ this -> composer -> getInstalledPackages ( ) ; $ required = $ this -> composer -> getRequiredPackages ( ) ; $ outdated = [ ] ; // Get the installed version number of the required packages. $ packages = array_intersect_key ( $ installed , $ required ) ; foreach ( $ packages as $ package ) { $ name = $ package [ 'name' ] ; $ version = Version :: normalize ( $ package [ 'version' ] ) ; $ prettyVersion = $ required [ $ name ] [ 'version' ] ; $ devDependency = $ package [ 'devDependency' ] ; if ( in_array ( $ name , $ excluded ) ) { continue ; } $ package = new Package ( $ name , $ version , $ prettyVersion , $ devDependency ) ; if ( $ package -> isOutdated ( ) ) { $ outdated [ ] = $ package ; } } return $ outdated ; }
docstring: Get outdated packages with their current and latest version.
  
  @param array $excluded
  
  @return array
docstring_tokens: Get outdated packages with their current and latest version .