Permalink
Browse files

Issue 53 - Switch the conditionals to prevent running php-cs-fixer on…

… all file types.
  • Loading branch information...
1 parent e1f310d commit 449cf00d72e8e0dcd5dd49f31b07cc7a44525bf6 @jhoffmann jhoffmann committed Dec 3, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 phpcs.py
View
10 phpcs.py
@@ -517,15 +517,15 @@ def description(self, paths=[]):
class PhpcsEventListener(sublime_plugin.EventListener):
"""Event listener for the plugin"""
def on_post_save(self, view):
- if Pref.phpcs_execute_on_save == True:
- if PhpcsTextBase.should_execute(view):
+ if PhpcsTextBase.should_execute(view):
+ if Pref.phpcs_execute_on_save == True:
cmd = PhpcsCommand.instance(view)
thread = threading.Thread(target=cmd.run, args=(view.file_name(), 'on_save'))
thread.start()
- if Pref.php_cs_fixer_on_save == True:
- cmd = PhpcsCommand.instance(view)
- cmd.fix_standards_errors(view.file_name())
+ if Pref.php_cs_fixer_on_save == True:
+ cmd = PhpcsCommand.instance(view)
+ cmd.fix_standards_errors(view.file_name())
def on_selection_modified(self, view):
if not PhpcsTextBase.should_execute(view):

0 comments on commit 449cf00

Please sign in to comment.