All Projects → Haehnchen → Idea Php Toolbox

Haehnchen / Idea Php Toolbox

Licence: mit
Collections of tools and improvements to make PhpStorm a little bit better

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Idea Php Toolbox

Idea Php Symfony2 Plugin
IntelliJ IDEA / PhpStorm Symfony Plugin
Stars: ✭ 797 (+442.18%)
Mutual labels:  twig, intellij, intellij-plugin, phpstorm, annotation
Idea Php Drupal Symfony2 Bridge
PhpStorm plugin to support Symfony components inside Drupal 8
Stars: ✭ 34 (-76.87%)
Mutual labels:  twig, intellij, intellij-plugin, phpstorm, annotation
Idea Php Annotation Plugin
Add PHP annotation support for PhpStorm and IntelliJ
Stars: ✭ 216 (+46.94%)
Mutual labels:  intellij, intellij-plugin, phpstorm, annotation
referencer-plugin
"Referencer" plugin for Jetbrains IDEs
Stars: ✭ 20 (-86.39%)
Mutual labels:  intellij, phpstorm, intellij-plugin
Phpinspectionsea
A Static Code Analyzer for PHP (a PhpStorm/Idea Plugin)
Stars: ✭ 1,211 (+723.81%)
Mutual labels:  intellij, intellij-plugin, phpstorm
dummytext-plugin
"Dummy Text Generator" plugin for Jetbrains IDEs
Stars: ✭ 31 (-78.91%)
Mutual labels:  intellij, phpstorm, intellij-plugin
idea-php-shopware-plugin
Shopware Plugin for PhpStorm which extends Symfony Plugin
Stars: ✭ 50 (-65.99%)
Mutual labels:  intellij, phpstorm, intellij-plugin
Yii2support
Yii2 Support for PhpStorm / IntelliJ IDEA
Stars: ✭ 280 (+90.48%)
Mutual labels:  intellij, intellij-plugin, phpstorm
idea-php-advanced-autocomplete
Plugin for PhpStorm IDE. Adds auto-completion support for various built-in PHP functions, where parameter is a string literal.
Stars: ✭ 57 (-61.22%)
Mutual labels:  intellij, phpstorm, intellij-plugin
Collector Intellij
A PhpStorm plugin for refactoring to collections
Stars: ✭ 114 (-22.45%)
Mutual labels:  intellij, intellij-plugin, phpstorm
Svelte Intellij
Svelte components in WebStorm and friends
Stars: ✭ 345 (+134.69%)
Mutual labels:  intellij, intellij-plugin, phpstorm
Idea Php Laravel Plugin
Laravel Framework Plugin for PhpStorm / IntelliJ IDEA
Stars: ✭ 537 (+265.31%)
Mutual labels:  intellij, intellij-plugin, phpstorm
interstellar
Dark editor theme for JetBrains IDEs
Stars: ✭ 26 (-82.31%)
Mutual labels:  intellij, phpstorm, intellij-plugin
intellij-neos
Support for the Neos CMS in Intellij IDEA / PhpStorm
Stars: ✭ 37 (-74.83%)
Mutual labels:  intellij, phpstorm, intellij-plugin
idea-php-typo3-plugin
TYPO3 CMS Plugins for IntelliJ IDEA / PhpStorm
Stars: ✭ 93 (-36.73%)
Mutual labels:  intellij, phpstorm, intellij-plugin
Magento2 Phpstorm Plugin
PHPStorm Plugin for Magento 2
Stars: ✭ 294 (+100%)
Mutual labels:  intellij, intellij-plugin, phpstorm
Runconfigurationasaction
Provides a way to use IntelliJ run configurations as buttons
Stars: ✭ 17 (-88.44%)
Mutual labels:  intellij, intellij-plugin, phpstorm
Idea Php Generics Plugin
Support generics types in PhpStorm via psalm / phpstan docblock
Stars: ✭ 146 (-0.68%)
Mutual labels:  intellij, intellij-plugin, phpstorm
Json2java4idea
A JSON to Java conversion plugin for Intellij IDEA and AndroidStudio.
Stars: ✭ 69 (-53.06%)
Mutual labels:  intellij, intellij-plugin
Intellij Haskell
IntelliJ plugin for Haskell
Stars: ✭ 1,169 (+695.24%)
Mutual labels:  intellij, intellij-plugin

Intellij / PhpStorm Plugin for PHP Improvements

Build Status Version Downloads Downloads last month Donate to this project using Paypal

Key Value
Plugin Url http://plugins.jetbrains.com/plugin?pr=&pluginId=8133
ID de.espend.idea.php.toolbox
Doc x http://phpstorm.espend.de/php-toolbox

Screenshots

Php Toolbox PHPUnit

Core improvements

Type hint variable

// Strips several non common variable names of type hint completion; like "interface"
function foo(FooInterface $<caret>)
function foo(FooAbstract $<caret>)
function foo(FooExtension $<caret>)

Callable arrays

class Bar
{
    public function foo()
    {
        [$this, 'foo<caret>']
        [$foo, 'foo<caret>']
    }
}
$foo = new Bar();

String class, method and function navigation

foo('\\DateTime');
foo('\\DateTime:format');
foo('\\DateTime::format');
'DateTime::format';
'date';

Json Configuration

All files in project named .ide-toolbox.metadata.json or application folder with pattern /php-toolbox/*-toolbox.metadata.json. Find your application "Settings > Languages & Framework > PHP Toolbox"

{
  "registrar":[
    {
      "signature":[
        "Behat\\Behat\\Context\\Environment\\ContextEnvironment:hasContextClass",
        "Behat\\Behat\\Context\\Environment\\InitializedContextEnvironment:getContext"
      ],
      "provider":"behat_context_classes",
      "language":"php"
    }
  ],
  "providers": [
    {
      "name": "behat_context_classes",
      "source": {
        "contributor": "sub_classes",
        "parameter": "Behat\\Behat\\Context\\Context"
      }
    }
  ]
}

Registrar

{
  "provider":"date_format",
  "language":"php",
  "signatures":[
    {
      "class": "DateTime",
      "method": "format"
    },
    {
      "class": "PHPUnit_Framework_TestCase",
      "method": "getMock",
      "type": "type"
    },
    {
      "class": "Symfony\\Component\\HttpFoundation\\Response",
      "method": "__construct",
      "type": "array_key",
      "index": 2
    },
    {
      "class": "Symfony\\Component\\HttpFoundation\\Response",
      "method": "__construct",
      "index": 2,
      "array": "Content-Type"
    }    
  ]
}

Function

foo('<caret>')
{
  "function": "foo"
}
foo('', '<caret>')
{
  "function": "foo",
  "index": 1
}

Class method

/** @var $f \\FooClass */
$f->foo('<caret>')
{
  "class": "FooClass",
  "method": "foo"
}
/** @var $f \\FooClass */
$f->foo('', '<caret>')
{
  "class": "FooClass",
  "method": "foo",
  "index": 1
}

Types

/** @var $f \\FooClass */
$f->foo('date_time')->format<caret>
$f->foo(DateTime::class)->format<caret>
$f->foo(new DateTime())->format<caret>
$f->bar('', 'date_time')->format<caret>
{
  "registrar":[
    {
      "provider":"date",
      "language":"php",
      "signatures":[
        {
          "class": "FooClass",
          "method": "foo",
          "type": "type"
        },
        {
          "class": "FooClass",
          "method": "bar",
          "index": 1,
          "type": "type"
        }
      ]
    }
  ],
  "providers": [
    {
      "name": "date",
      "items":[
        {
          "lookup_string": "date_time",
          "type": "DateTime"
        }
      ]
    }
  ]
}

Inline Code

(new \Foo\Car())->foo('<caret>');
foo('<caret>');
Class Car
{
   /**
    * @param string $foo my Var #Class
    * @param string $bar my car #<ProviderName> foo bar
    */
   public function foo($foo, $bar) {}
}

/**
 * @param string $foo my Var #Class
 */
function foo($foo) {}

Array

foo(['<caret>'])
{
  "function": "foo",
  "type": "array_key"
}
foo(['foo' => '<caret>'])
{
  "function": "foo",
  "array": "foo"
}

Signature shortcut

{
  "provider":"class_interface",
  "language":"php",
  "signature":[
    "ReflectionProperty:__construct",
    "class_exists",
    "is_subclass_of:1" // ":1" means 2nd argument (arguments indexing starts from 0)
  ]  
}

Twig

{{ foo('<caret>') }}
{% if foo('<caret>') %}
{% set bar = foo('<caret>') %}
{{ 'bar'|foo('<caret>') }}
{
  "provider":"date_format",
  "language":"twig",
  "signatures":[
    {
      "function": "foo"
    }
  ]
}

Providers

{
  "name": "date_format",
  "items":[
    {
      "lookup_string": "d",
      "type_text": "Day of month (01..31)",
      "icon": "com.jetbrains.php.PhpIcons.METHOD"
      "presentable_text": "foo",
      "tail_text": "foo",
      "type": "DateTime",
      "target": "DateTime",
      "target": "Ns\\Time::format",
      "target": "DateTime:format",
      "target": "file://foo/foo.html.twig",
    }
  ]
}

Lookup shortcut

{
  "name": "date_format",
  "lookup_strings": ["car", "apple"]
}

Lookup defaults

{
  "name": "date_format",
  "defaults": {
    "icon":"com.jetbrains.php.PhpIcons.METHOD",
  },
  "items": [
    {
      "lookup_string":"d",
    }
  ]  
}

Sources

return
class SecurityExtension implements Twig_ExtensionInterface
{
    public function getName()
    {
        return 'security'
    }
}
class WebProfilerExtension extends Twig_ExtensionInterface
{
    public function getName()
    {
        return 'profiler'
    }
}
{
  "name": "twig_extensions",
  "source": {
    "contributor": "return",
    "parameter": "Twig_ExtensionInterface::getName"
  }
}
return_array
class UserAdmin implements AdminInterface
{
    public function getExportFormats()
    {
        return ['json', 'xml']
    }
}
class TopicAdmin extends AdminInterface
{
    public function getExportFormats()
    {
        return ['csv', 'xls']
    }
}
{
  "name": "sonata_admin_export_formats",
  "source": {
    "contributor": "return_array",
    "parameter": "Sonata\\AdminBundle\\Admin\\AdminInterface:getExportFormats"
  }
}
sub_classes
class Foo implements BehatContext {}
class Foo extends BehatContext {}
{
  "name": "behat_context_classes",
  "source": {
    "contributor": "sub_classes",
    "parameter": "BehatContext"
  }
}
traits
{
  "provider": "trait",
  "language": "php"
},

Server

Enable server in Languages & Frameworks -> PHP Toolbox and restart PhpStorm

[GET]  /
[GET]  /projects
[GET]  /projects/{project}
[GET]  /projects/{project}/clear
[POST] /projects/{project}/{provider}
[GET]  /projects/{project}/json-debug
[POST]  http://127.0.0.1:48734/projects/{project}/php-toolbox-json # for json content; json encoded body needed
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].