Find unused public and protected methods in PHPStorm

PHPStorm has a handy unused private method inspection, which detects methods that are without doubt not used. I would sometimes be interested to scan my project for unused public/protected methods as well. I'm aware that this is not an exact science, and that would report methods that might be used outside this project (in the case of a library, for example), but subject to a manual review, that would probably be very useful. Is this currently possible with PHPStorm?

PHPStorm Sync With Deployed Keyboard Shortcut

Just started using PHPStorm and I like the FTP sync function that's built-in. Is there a way for me to have the "Sync With Deployed" screen pop-up using a keyboard short-cut? If not, any way I can bind a set of keys for this task? Thanks!

Phpstorm Php Storm remote files editing

I am new to PhpStorm. I want to edit files on remote host without mapping (like in PhpDesigner). I configured server, opened in on Remote Host window and I watch all files, but when I click on file it is not open in editor. How to do this?

How to run PHP code inside PhpStorm

I have a class with about 10 methods that automate some tasks in a project I'm working on. I use PhpStorm and am looking for a way to execute various methods manually in the most convenient way possible. Ideally, there would be an interactive PHP console in PhpStorm that would allow me to create an instance of my class and then execute its methods but it's probably not there. Is there a way to use PhpStorm's terminal or Command Line Tools Support to achieve what I'm looking for. My current wor

Fixing autocompletion in extremely simple PhpStorm example

I've just downloaded and installed PhpStorm 7.1, and I'm wondering why it won't understand the following piece of code: <?php /** * Class Whatever */ class Whatever { /** * Just prints "Hello." */ function foo() { echo "Hello.\n"; } } $test = new Whatever(); $test->foo(); ?> It appears to ignore the Whatever class definition. When typing $this-> and pressing Ctrl+Enter it says "No suggestions" and after typing new the Whatever class is never part of the s

Phpstorm Two the same declarations

In phpStorm when I want to go to declaration (ctrl+left mouse button - javascript function) I always have two the same declarations to choose from. Both are identical.

Phpstorm Set default path to check for reference links

I am a user of PHP-Storm and have been using it for years, the only issue I have ever had is the fact that phpstorm always tells me I am missing my reference links when I try to reference images, css styles, fonts, ect. I have looked for a way to set the default path for them but I can only ever find things related to document roots server sided. My situation: My root path on server for nginx: /var/www/html/app/vg/public PHPSTORM deployment path: /var/www/html/app/vg PHPSTORM local path: C:\Us

Double click to select white space in PhpStorm

In Sublime I can double click whitespace in-between two characters in order to select just the white space, e.g. in: $foo = 'bar'; Would result in the selection of: $foo████████= 'bar'; However in PhpStorm it selects the entire line. Is there a setting I can toggle so that whitespace can be selected with a double click in the same way I can double click a variable to select it.

PhpStorm Live Template conflict with tab

I created a HTML live template with some variables, and one of the variables are outside the tags for example a select drop down that defines the name of the select. If I press tab to go to the next variable, instead of going to the next variable PhpStorm creates a HTML tag of the name I just typed in. I have disabled all other HTML templates and it is still doing it. Does anyone know how to check what template is being invoked? I checked now, if I type anywhere anything in HTML and press tab

CPanel integration with JetBrains PhpStorm

I created an FTP Account on CPanel. I also tried to configure FTP on JetBrains PhpStorm, but I am not able to establish connection. I made FTP Accounts as below; FTP Username: ****@*********.org FTP server: ****.****.org FTP & explicit FTPS port: 21 I need suggestion on how to connect to public_html/ folder from JetBrains PhpStorm and then synch files.

PhpStorm with JSHint linter warns of undeclared classes

First time user of PhpStorm. I just opened it (eval) and started looking at an existing, operating project, with PHP & Javascript. I enabled the built-in JSHint linter, which immediately started warning about undefined classes in a library I use. These classes are of course defined, in a subdirectory of the main project root, which I've also marked as a "Source" directory. I tried clearing the cache and restarting, no change. I can find no other way to tell the tool where to look .. any

In PhpStorm, can I create a new "module" (i.e. handful of files at the same time)

I would like to be able to right click in a folder in PhpStorm, and select something like, "New Custom Module", which will then create directories and files as per a definition that I set up somewhere. Is this possible at all? Detailed description of what I would do: In the "Edit File Templates" window (or something similar), I would add a new entry, calling it "New Custom Module". I would then +/- directories and file types that I would like to be created when I select to create that module.

PhpStorm - change Live Templates location

I've created some useful Live Templates in PhpStorm on my PC at work. Nothing exciting so far, but I'd like to take those live templates with me at home as well, as I am using PhpStorm on my Mac as well. I know that there's the possibility to export the live templates to a .jar file and then import them again, but I was wondering if there was a better solution (one that doesn't include export/import every time you make a change). My Idea was the following: Can I change the path that PhpStorm

PhpStorm / WebStorm Shortcut for editing an existing live template

Is there a shortcut for editing an existing live template in PhpStorm / WebStorm? When I use ⇧+⌘+A (on Mac) and write the name of the live template I get only an option to turn on/off this live template (screenshot) but it would be cool to be navigated from here to the editing window.

PhpStorm: set a specific library version as a project library

I am trying to make JQuery 1.8.3 and JQuery UI 1.9.2 project libraries in PhpStorm 2017. When I go to Settings >> Languages & Frameworks >> Javascript >> Libraries, there is a dropdown near the top with two options: TypeScript community stubs: here I find simple listings for jquery and jqueryui with no version information. Official Libraries: here I find listings for jQuery 2.0.0 and jQuery UI 1.10.2 What's the recommended way to get IDE support for the specific versio

PhpStorm on Ubuntu 18 - Read Only Status (unable to change files)

When I open my project with PhpStorm on Ubuntu 18, and when I try to edit file, then pop up window appears "Clear Read-Only Status" with options Clear - Ok. When I click to clear then again pop up window appears with text "Failed to change read-only status for the following files: ..." I cant change permissions in my cloned repository (the one I am accessing through PhpStorm) on Ubuntu because then file permissions will be different than ones on online repository. I can edit and write to file

PhpStorm: undo changes replaced by global replace

I have replaced globally in PhpStorm with Shift + R combination but by some reason it didn't match a case and did wrong replacement in the whole project. Is it possible to undo the last operation and back it to the last state?

Modyfing code completion in PhpStorm 5

After entering first characters of <textarea> tag and using autocomplete ( e.g. <texta and hitting ENTER) editor generates following snippet: <textarea rows="" cols="" It's extremely unhelpful since I don't use rows and cols attributes. How can I modify those snippets ? I tried "Live templates" section but it's not there.

Creating link to template files in PHPStorm (maybe using PHPDoc?)

I see that PHPStorm has a way to identify templates names inside quoted string so that Ctrl+Click can open the View or Template file in the editor. I think there is partial support for Blade templates but I don't see a generic way to do this for my own functions. Here is an example: Obviously the above does not work but I'm wondering if there is some other way to do it? Thanks!

Phpstorm PHP Storm: how to remove project without deleting files

I accidentally made the entire PHPstormProjects folder, which contains all of my projects, and turned it into a project. When I realized my mistake, I deleted all the files which I had uploaded into the project, but it still lists it as a PHPStorm Project. I don't want to simply delete the project, as it contains all of my other projects. Is there any way to 'unset' a PHP project?

How to delete remote branch on phpstorm after I delete on gitlab?

How to delete remote branch on phpstorm after I delete on gitlab After deleting that branch on GitLab, I cannot select the same branch in my PhpStorm-managed local repo without seeing the error message: Failed to delete remote branch origin/branch1 unable to delete 'branch1': remote ref does not exist failed to push some refs to '' How can I avoid that error message?

What is the difference between PHPStorm localhost, and the usual XAMPP localhost?

I am using PHPStorm with XAMPP. What is the difference between: http://localhost:63342/PhpstormProjects/project.php And http://localhost/PhpstormProjects/project.php It seems like this two are different localhosts. The first one works only with PHPStorm opened. Now I have a problem with the first one, it keeps throwing an 500 Internal Server error and I can not figure out why. But the Localhost from the second url does not. So is there a way to tell PHPStorm, to randomly use the Localhos

PhpStorm max function length

I need to set maximum length (in LOC) of function or class. For example, when my function has more than 20 lines, PhpStorm should show me some warning. I was looking for it in Settings->Editor->Inspections, but have not found anything like that for PHP. Any suggestions?

How to disable tooltips with shortcuts in PhpStorm 2016.3?

When I am trying to close some of the tools - can't do it immediately. Seems like it happens because of tooltips with shortcuts. They are "overriding" layer of the close button and I can't click this button. I need to wait till toltip will disappear. I found only one setting about this tooltips - "tooltip initial delay". But changing this settings do not help. How can I disable this tooltips at all if possible? Here is tooltip which I am talking about:

PhpStorm meta file syntax for static methods with multiple arguments

I am working with a custom PHP framework and would like to generate a .phpstorm.meta.php file for it. The factory methods I have are of the following syntax: <?php // Models $project = Loader::model('Transform', 'Project'); // returns instance of \Framework\Base\Model $user = Loader::model('Base', 'User'); // returns instance of \Framework\Base\Model $asset = Loader::model('Transform', 'Asset'); // returns instance of \Framework\Hunk\Transform\Model\Asset // Helpers $router

After install PhpStorm get error?

I installed PhpStorm 2017.3.6 and copy dvt-jb_licsrv.amd64.exe file in C:\ drive. I wrote in cmd: dvt-jb_licsrv.amd64.exe -mode install and open task manager JetBrainsLicServerDVT change the start. When I open PhpStorm, I get this error:

Is there a way to save just one file in PhpStorm?

My traditional workflow must be a little different to the PHPStorm default. I often work on multiple files at the same time and want to be able to save just one file when I've finished with it, without saving the others that I've modified. I've managed to turn off the auto-save feature. Now, when I edit files I get stars on the ones I've edited and they stay like that until I hit 'save'. So far so good. But when press CTRL-S to save, expecting it to save the one file I'm looking at so I can go

Phpstorm How to preview index.php

So I am trying to get started with PhpStorm, and have watched a number of the videos. But I still don't get how to get started with previewing files. For example: I create new empty project. Add index.php and add echo php_info(); and save it. What is the next step to view this in a browser? Am running Windows 2008 Server and IIS is running. UPDATE I upgraded my version from 6 to 7 of PHP storm, and it lets you preview the file directly from the IDE with the click of a button. View | P

Including projects in other projects in PHPStorm

Say I am working on a couple of PHP projects named Framework and Application, where the latter is using the former. When I dive in the Application's classes, I see some of them extending Framework's classes, for example: class Application_Controller extends Framework_Controller When I hover mouse over Framework_Controller and click Ctrl, I want the name to become clickable link upon clicking on which the source code of the Framework_Controller class from the Framework project will be opened.

Phpstorm WebStorm closing brackets

I'm using JetBrains PhpStorm as my IDE and I have a French Keyboard (AZERTY), my problem is I can't insert a closing curly bracket } ! I can do so in Sublime or any other editor by typing AltGr + = . Does any one have this problem ?

Suppress inspection for entire file in WebStorm/PhpStorm

We can suppress inspections using special comments like this one: // noinspection JSIgnoredPromiseFromCall, but it only works for a next line of code. I have a big test suite where I call functions and ignore the returned promises. I don't want to add // noinspection JSIgnoredPromiseFromCall comment for each call. Is there a way to disabled some specific inspection for an entire file?

Shorthand for generating for loop in PhpStorm

In PhpStorm, you can type forek or fore + TAB and you'll get foreach (| as $index => $index) { } and foreach (| as $item) { } respectively. In Android Studio (Java), you can type fori + TAB and you'll get for (int i = 0; i < |; i++) { } | is where the cursor ends up. I was wondering if PhpStorm has a similar way of generating for structures. I've been trying fori but to no avail. Seems rather curious that forek and fore are included but not the classic for with a counter.

Assign keyboard shortcut to "Edit a watch.." shortcut in PhpStorm

I used to be able to Edit my watches by pressing a keyboard shortcut. Now I have to Right click on the watch variable and Select "Edit..." from the popup (which is not very convenient). There does appear a "Edit..." in the Keymap (see below) but it appears to do nothing. I've tried many key combinations but pressing the keys won't do anything. Even in the official documentation there is no mention of keyboard shortcut. Is there any way to assign a keyboard shortcut to "Edit watch" or is it

PhpStorm reformat square bracket on same line

I am working in a Symfony project, using PhpStorm and I have selected 'Symfony 2' as the preset to reformat code. However the rest of the codebase has the following style: $updatesTable->addRow([ $company->getName(), $company->getId(), $company->getWebsite(), $amendedWebsite, ]); But when I reformat my code, it looks like this: $updatesTable->addRow( [ $company->getName(), $company->getId(), $company->getWebsite(), $am

phpstorm selecting text

I don't know what I did, but I'm not able to select text normally anymore like I used to - from line to line. Right now it's behaving like if you were to old the option key on mac to select text. Screenshot:

PhpStorm running script on server with argument

I have a project built by phpStorm located in server root (so called in place server). Normally, we invoke this in a browser like this: get.php?nStart=1&nEnd=10&type=184 How can I run it on server with arguments in phpStorm (or jump to browser from phpStorm)?

PhpStorm - remove empty lines from end of file

At the moment I'm testing PhpStorm IDE. It is really great, except one feature. It doesn't remove empty lines from end of file. It's now remove unneeded whitespaces, but empty lines at the end aren't removed. It's really annoying for me. Can I change this behaviour?

Cannot get PhpStorm to compare deployed files folder with local

Am following: I have my server setup in the remote host, and can see my directory, folders and files. I would like to compare a whole folder on my local machine with what is on the server. It works for individual files, but my developer has changed a whole load of files in the directory. Please see screenshots. I try and compare a directory from Remote host to the local serve

PhpStorm marks a single .phtml file as plain text

I have a problem similar to: Wrong syntax highlighting for PHP file in PHPStorm IIRC, I created a file under the wrong name (IndexViewphtml, no extension), then renamed it to IndexView.phtml. Since then, it is recognized as plain text: As advised in the linked question, I went to Settings|Editor|File Types and ensured that this file name was not assigned to Text files: I also checked that the file was not currently marked as plain text: As a last resort, I: deleted the .phtml file and its pa

  1    2   3   4   5   6  ... 下一页 共 6 页