original_string: protected function _packages()
      {
          $installed = static::cache('_composerPackages');
          if (is_array($installed)) {
              return $installed;
          }
  
          $jsonPath = VENDOR_INCLUDE_PATH . 'composer/installed.json';
          $installed = [];
  
          if (is_readable($jsonPath)) {
              $json = (array)json_decode(file_get_contents($jsonPath), true);
              foreach ($json as $pkg) {
                  $installed[$pkg['name']] = [
                      'name' => $pkg['name'],
                      'version' => $pkg['version'],
                      'version_normalized' => $pkg['version_normalized'],
                  ];
              }
          }
  
          return static::cache('_composerPackages', $installed);
      }
code: protected function _packages()
      {
          $installed = static::cache('_composerPackages');
          if (is_array($installed)) {
              return $installed;
          }
  
          $jsonPath = VENDOR_INCLUDE_PATH . 'composer/installed.json';
          $installed = [];
  
          if (is_readable($jsonPath)) {
              $json = (array)json_decode(file_get_contents($jsonPath), true);
              foreach ($json as $pkg) {
                  $installed[$pkg['name']] = [
                      'name' => $pkg['name'],
                      'version' => $pkg['version'],
                      'version_normalized' => $pkg['version_normalized'],
                  ];
              }
          }
  
          return static::cache('_composerPackages', $installed);
      }
code_tokens: protected function _packages ( ) { $ installed = static :: cache ( '_composerPackages' ) ; if ( is_array ( $ installed ) ) { return $ installed ; } $ jsonPath = VENDOR_INCLUDE_PATH . 'composer/installed.json' ; $ installed = [ ] ; if ( is_readable ( $ jsonPath ) ) { $ json = ( array ) json_decode ( file_get_contents ( $ jsonPath ) , true ) ; foreach ( $ json as $ pkg ) { $ installed [ $ pkg [ 'name' ] ] = [ 'name' => $ pkg [ 'name' ] , 'version' => $ pkg [ 'version' ] , 'version_normalized' => $ pkg [ 'version_normalized' ] , ] ; } } return static :: cache ( '_composerPackages' , $ installed ) ; }
docstring: Gets a list of all packages installed using composer.
  
  @return array
docstring_tokens: Gets a list of all packages installed using composer .