Skip to content

Commit dce3371

Browse files
author
syarig
committed
refactor: change public function names in namespaces
1 parent cf8ba61 commit dce3371

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/server/code-parse/language/php/dependencies.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ const namespaces = require('./namespaces')
33
const parser = require('./parser')
44

55
const getDependencies = async (entryPoint, projectDir) => {
6-
await namespaces.setNamespaces(projectDir)
7-
const phpNamespaces = namespaces.getNamespaces()
6+
await namespaces.parse(projectDir)
7+
const phpNamespaces = namespaces.get()
88

99
const dependencies = {
1010
[entryPoint]: phpNamespaces[entryPoint]
@@ -23,7 +23,7 @@ const getDependencies = async (entryPoint, projectDir) => {
2323
};
2424

2525
const getImports = (fileCode, itemPath) => {
26-
const phpNamespaces = namespaces.getNamespaces();
26+
const phpNamespaces = namespaces.get();
2727
const parsed = parser.parseCode(fileCode, path.basename(itemPath));
2828
const dependencies = [];
2929

src/server/code-parse/language/php/namespaces.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const parser = require('./parser')
66

77
const namespaces = {};
88

9-
const setNamespaces = async (projectDir) => {
9+
const parse = async (projectDir) => {
1010
const separator = path.sep;
1111
const set = (parsed, itemPath) => {
1212
parsed.children
@@ -44,9 +44,9 @@ const setNamespaces = async (projectDir) => {
4444

4545
await Promise.all(tasks)
4646
}
47-
const getNamespaces = () => namespaces
47+
const get = () => namespaces
4848

4949
module.exports = {
50-
setNamespaces,
51-
getNamespaces
50+
parse,
51+
get
5252
}

0 commit comments

Comments
 (0)