Configure PHP CodeSniffer to fix code on the fly in PhpStorm - phpstorm

I have PhpStorm 10 and want to setup php Code Sniffer to automatically correct me code. This article https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm points to "Project Settings | Code Style" and I cannot even find that. I have File | Edit | View | Navigate | Code | Refactor | Run | Tools | VCS | Window | Help at the top and have no idea where to find project settings. I do have File > Settings but cannot figure it out.
My project is a web portal built in Symfony. I saw a colleague run Atom and when he saves a file it is code-fixed on the fly - that is what I want. Help please.

PhpStorm does not support code fixing on the fly with Code Sniffer.
https://youtrack.jetbrains.com/issue/WI-25815 -- watch this ticket (star/vote/comment) to get notified on any progress.
Right now, if you wish you may create an External Tools entry for that and run it manually when needed.

Find this from web (how to config the external tools)
https://thiagoponte.wordpress.com/2015/08/03/run-php-codesniffer-code-beautifier-and-fixer-from-phpstorm/

Related

JSCS can not find jscs files on PhpStorm and WebStorm

I work adonis.js. I have a problem. When I open adonis project in WebStorm and PhpStorm, editors create a problem "jscs can not find".
It is a general view. I try on both editor.
The same problem occur. I search it on the Google, they say we solve the problem, but it is alive.
Please try disabling JSCS support by clearing Enable checkbox in Settings | Languages & Frameworks | JavaScript | Code Quality Tools | JSCS - can you still see the error?
Also, from screenshot it seems that ES6 syntax in your file is not accepted; please make sure to switch Javascript Language version (Settings | Languages & Frameworks | JavaScript) to ECMAScript 6

Project Transfer executes but target project is still blank

My current set up for EA is hosted on MySQL DBMS and has version control with Subversion. I attempted to do a DBMS to File project transfer to one on a desktop which complete's successfully. However, when I open the target project it seems as if the source project did not transfer over at all. Has anyone come across this issue before?
Below is my logfile:
+--------------------------------------------
| Data Transfer model log file
| Generated by Enterprise Architect
| Source DBMS: MYSQL
| Target DBMS: JET
| Created On : Saturday, 18 February, 2017
+--------------------------------------------
2017-02-18 01:18:00 Removing data in: usystables
Most likely it's a missing table usystables. You need to recover it from some blank EAP file. See also this post: enter link description here
P.S. Or it's what Geert posted just a few seconds ago ;-)
Do you still have security set on the target model?
That can effectively cause this type of issue.
Solution is to remove security from the target model (or start with a blank target project)

How to export jshint config file from WebStorm

I used to work alone on a project. I used to use WebStorm's JSHint plugin for code quality testing.
Now couple of friends joined me so I thought to create a .jshintrc file for all of us to use. But it is quite boring to do it manually and I'm perfectly happy with my current settings.
Is there a way to export my project-wide settings in order to share it with co-worker?
JSHint configuration from Settings(Preferences) | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint is stored in <project_dir>\.idea\jsLinters\jshint.xml. You can share this file with your co-workers

What is the proper way to set modifiable install path in PackageMaker?

First of all, I'm talking about PackageMaker, a GUI application; not packagemaker, a command-line program.
I'm trying to make a install package that has three components, installed in different locations:
XxxxBin.app application, default installed to /Applications;
Xxxx.bundle plugin bundle, default installed to /Library/Audio/Plug-Ins/VST/ (and renamed to Xxxx.vst, which is very easy to be achieved by using post-install script);
some resource files, default installed in /Library/Company/Xxxx_resources/.
And I want to allow users to change target directories of each compnent during installation.
I noticed there are two layers in PackageMaker: choice and package. When you drag an app/bundle/directory into PackageMaker, it will create a new choice and a new package. However, both choice and package layer contains Destination, which greatly confused me. In addition, in Components page for packages that is derived from an app or bundle, there is a check box labelled "Allow Relocation", which introduced further confusion.
I failed to find detailed information on those options. And after many attempts, I'm using the following layout and combination of options, that are very close to my target:
three choices and packages, each contain the app, the bundle, or the directory of resources.
in all choice layers, fill the Destination entry with actual default install paths, and select the "Allow alternate volume" checkbox;
in all package layers, fill the Destination entry with /, and select the "Allow custom location" checkbox;
in all Components page in package layers, deselect all Allow Relocation checkbox.
However, it still has a very weird behavior: the app is copied twice, to both its own directory, and overwriting the directory of the plugin bundle. If you "show content" on the installed bundle, it will look something like this:
/Library/Audio/Plug-Ins/VST/Xxxx.vst
|
+contents
|
+-info.plist: after looking on its content, it is actually the app's plist, not the bundle's
|
+-MacOS
| |
| +-Xxxx: the bundle's dynamic library, which is expected to be here
| |
| +-XxxxBin: the app's executable, which is NOT expected to be here
|
+-Resources
|
+-Xxxx.xml: some config info for the bundle, which is expected to be here
|
+-icon.icns: the app's icon, which is NOT expected to be here
I am quite exhausted on this stuff, but still not reaching my target that looks pretty simple: user-changeable install directory for multiple components. It's really appreciate for someone who can drag me out of this quagmire. Thanks for a lot!
Finally I found the actual cause is not in PackageMaker stuffs, but is inside the bundles being packaged. The bundle identifier of both the app and the plugin is empty. After I assign them with distinct values, everything just work fine.

PhpStorm perpetual favorites

In NetBeans, I was able to add a folder to the Favorites window and it would stay there across all projects. This was super helpful for me to quickly access my .ssh folder and some other deeply-buried folders in Windows that I often need to get into (like C:\Windows\System32\drivers\etc and C:\xampp\apache\conf\extra).
Is there a way to pin those somewhere in PhpStorm so I can always get to them, regardless of what project I have open?
In PhpStorm (and other IDEA-based IDEs) favorites are project-based only.
The only possible alternatives I can think of:
Custom plugin that adds dedicated button into FileChooser dialog (like File | Open..., File | Open Directory..., File | New Project | ... and many other places -- anywhere where you can call dialog to choose the path the the file or folder).
Here is a screenshot with one Global favorite folder added (called from File | Open...)
Create and use External Tools for such tasks. The idea here is that you just call Windows Explorer with path of folder to be opened.
You can keep such commands under one sub menu/group (e.g. "Fav Folders") so they do not mix with other entries.