Skip to content

Commit

Permalink
rename method (this is not really 'transform' in our usual parlance)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Feb 6, 2022
1 parent 4b66398 commit 1d7af3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions services/packagist/packagist-php-version.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class PackagistPhpVersion extends BasePackagistService {
}
}

async transform({ json, user, repo, version = '', server }) {
async getPhpVersion({ json, user, repo, version = '', server }) {
let packageVersion
const decompressed = this.decompressResponse(
json,
Expand Down Expand Up @@ -141,7 +141,7 @@ export default class PackagistPhpVersion extends BasePackagistService {
schema: allVersionsSchema,
server,
})
const { phpVersion } = await this.transform({
const { phpVersion } = await this.getPhpVersion({
json: allData,
user,
repo,
Expand Down
10 changes: 5 additions & 5 deletions services/packagist/packagist-php-version.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('PackagistPhpVersion', function () {

it('should throw NotFound when package version is missing', async function () {
await expect(
PackagistPhpVersion.prototype.transform({
PackagistPhpVersion.prototype.getPhpVersion({
json,
user: 'frodo',
repo: 'the-one-package',
Expand Down Expand Up @@ -51,7 +51,7 @@ describe('PackagistPhpVersion', function () {
},
}
await expect(
PackagistPhpVersion.prototype.transform({
PackagistPhpVersion.prototype.getPhpVersion({
json: specJson,
user: 'frodo',
repo: 'the-one-package',
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('PackagistPhpVersion', function () {
},
}
await expect(
PackagistPhpVersion.prototype.transform({
PackagistPhpVersion.prototype.getPhpVersion({
json: specJson,
user: 'frodo',
repo: 'the-one-package',
Expand All @@ -90,7 +90,7 @@ describe('PackagistPhpVersion', function () {

it('should return PHP version for the default release', async function () {
expect(
await PackagistPhpVersion.prototype.transform({
await PackagistPhpVersion.prototype.getPhpVersion({
json,
user: 'frodo',
repo: 'the-one-package',
Expand All @@ -102,7 +102,7 @@ describe('PackagistPhpVersion', function () {

it('should return PHP version for the specified release', async function () {
expect(
await PackagistPhpVersion.prototype.transform({
await PackagistPhpVersion.prototype.getPhpVersion({
json,
user: 'frodo',
repo: 'the-one-package',
Expand Down

0 comments on commit 1d7af3a

Please sign in to comment.