Skip to content

Commit

Permalink
Fix parse methods if last agrument is array()
Browse files Browse the repository at this point in the history
  • Loading branch information
ptcong committed Jan 23, 2018
1 parent c6edb72 commit aece218
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php_companion/commands/parse.py
Expand Up @@ -20,7 +20,7 @@ def run(self, edit, path):
with open(self.normalize_to_system_style_path(path), "r") as f:
content = f.read()

pattern = "(?<!\* )(?:abstract )?((?:public|protected|private)(?: static)?\s+function\s+[\w]+\s*\(.*?\)(?:\s*\:\s*\w+)?)(?:\s*;|.*?{)"
pattern = "(?<!\* )(?:abstract )?((?:public|protected|private)(?: static)?\s+function\s+[\w]+\s*\(.*?\)(?:\s*\:\s*\w+)?)(?:\s*;|\s*{)"
# Get the methods from the content
self.methods = re.findall(pattern, content, re.S)

Expand Down

0 comments on commit aece218

Please sign in to comment.