• Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    Java
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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"
}

More Repositories

1

crypto-trading-bot

Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, Bybit ... (public edition)
JavaScript
2,787
star
2

idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
Java
896
star
3

idea-php-laravel-plugin

Laravel Framework Plugin for PhpStorm / IntelliJ IDEA
Java
571
star
4

uniswap-arbitrage-flash-swap

Uniswap flash swap arbitrage solidity contracts
JavaScript
385
star
5

idea-android-studio-plugin

Android Studio Plugin
Java
291
star
6

idea-php-annotation-plugin

Add PHP annotation support for PhpStorm and IntelliJ
Java
242
star
7

idea-php-generics-plugin

Support generics types in PhpStorm via psalm / phpstan docblock
Java
144
star
8

idea-php-shopware-plugin

Shopware Plugin for PhpStorm which extends Symfony Plugin
Java
55
star
9

idea-php-symfony2-plugin-doc

Documentation only !!! for idea-php-symfony2-plugin
Python
49
star
10

idea-php-drupal-symfony2-bridge

PhpStorm plugin to support Symfony components inside Drupal 8
Java
34
star
11

idea-php-toolbox-json-files

PHP
25
star
12

torrent-announcer

Can simulate torrent client requests to a tracker and returns client ips
PHP
17
star
13

idea-php-oxid-plugin

Oxid Plugin for PhpStorm
Java
14
star
14

node-js-crypto-technical-analysis-candlestick-webserver

Candlestick Technical Analysis Http Server based on node.js
JavaScript
10
star
15

drupal-packagist

Provides a Composer packagist page for Drupal projects
PHP
8
star
16

behat-placeholder-extension

Behat placeholder extension
PHP
5
star
17

bittorrent-tracker

Simple BitTorrent Tracker / Proxy
PHP
5
star
18

solidity-multicall-contract

Contract to aggregate multiple contract web3-rpc requests into single request chunks
Solidity
4
star
19

idea-php-behat-plugin

IntelliJ IDEA / PhpStorm Behat Enhancement
Java
4
star
20

ZendDbBundle

Bundle that wraps ZendDb to Symfony2 and Doctrine
PHP
3
star
21

tgudy

TYPO3 Template and Extension
JavaScript
3
star
22

idea-localization-plugin

Extended translation / localization support for PhpStorm / IntelliJ for formats like XLF, XLIFF
Java
3
star
23

espend.de--Delicous-Bookmarks

Main Drupal module that works on b.espend.de to export HTML from Delicous Bookmarks
PHP
2
star
24

e2-fb

Facebook client for Enigma2 / Dreambox
Python
2
star
25

vavoo-iptv-stream-proxy

JavaScript
2
star
26

idea-twig-plugin

PhpStorm / IntelliJ Twig Extended Plugin improvements extracted from Symfony Plugin
Kotlin
2
star
27

Onlinestreams-for-D-Box2

Mediaportal für Neutrino (D-Box2) mit Interface für Popcorn Hour Geräte: einfacher "OnlineStream Proxy" auf Basis des internen Movieplayers. Enthalten Scripts: Youtube, ZDFMediathek, MyVideo, Apple Trailer, Spiegel.TV, kino.de, Tv-Total.de alle in PHP
PHP
2
star
28

idea-badge

Provides badges support for statistics of IntelliJ IDEA / PhpStorm Plugin Repository
PHP
2
star
29

jquery.csspanel

A panel to manipulate simple CSS styles
PHP
1
star
30

http-segmenter

Stream video to your iPhone, iPad, iPod, iOS over http
C
1
star
31

autodesk-inventor-plot-class

This class does some plotting stuff for Autodesk Inventor
Visual Basic
1
star
32

jetbrains-enterprise-plugin-repository

XML API Project for a custom JetBrains Enterprise Plugin Repository
PHP
1
star
33

MyTubeExt

MyTubeExt - Devel fork of MyTube Enigma2 Extension
Python
1
star
34

idea-php-code-usage

Exports a PHP file structure to JSON
Java
1
star
35

vbnettools

Some VB.NET projects like HamachiBroadcastFixGUI
Visual Basic
1
star
36

autodesk-inventor-printbuttons

Configurable toolbar for Autodesk Inventor for plot and print on single button click
Visual Basic
1
star
37

sharemybox.net-enigma2-client

Python Client for sharemybox.net Dreambox and Enigma2 based receiver
Python
1
star
38

idea-php-symfony2-plugin-test

Symfony2 Standard Edition to reflect features and provide tests of PhpStorm Plugin
PHP
1
star