original_string: private function createPackages(array $packages)
      {
          $matcherPackages = [];
  
          foreach ($packages as $package) {
              $reflection = new ReflectionClass($package);
  
              if ($reflection->implementsInterface(self::PACKAGE_REGISTRAR) === false) {
                  throw NotAvailableException::createForPackage(self::PACKAGE_REGISTRAR);
              }
              $matcherPackages[] = $reflection->newInstance();
          }
  
          return $matcherPackages;
      }
code: private function createPackages(array $packages)
      {
          $matcherPackages = [];
  
          foreach ($packages as $package) {
              $reflection = new ReflectionClass($package);
  
              if ($reflection->implementsInterface(self::PACKAGE_REGISTRAR) === false) {
                  throw NotAvailableException::createForPackage(self::PACKAGE_REGISTRAR);
              }
              $matcherPackages[] = $reflection->newInstance();
          }
  
          return $matcherPackages;
      }
code_tokens: private function createPackages ( array $ packages ) { $ matcherPackages = [ ] ; foreach ( $ packages as $ package ) { $ reflection = new ReflectionClass ( $ package ) ; if ( $ reflection -> implementsInterface ( self :: PACKAGE_REGISTRAR ) === false ) { throw NotAvailableException :: createForPackage ( self :: PACKAGE_REGISTRAR ) ; } $ matcherPackages [ ] = $ reflection -> newInstance ( ) ; } return $ matcherPackages ; }
docstring: Create a few new package registrars
  
  @param array $packages
  
  @return \expect\PackageRegistrar[]
docstring_tokens: Create a few new package registrars