Unfortunately, this doesn't work yet. PhpStorm will only generate 1 setter method regardless of the template, it seems.
A bug report has been filed at http://youtrack.jetbrains.com/issue/WI-12552
| <?php defined('SYSPATH') OR die('No direct access allowed.'); | |
| abstract class A1 extends A1_Core { | |
| /** | |
| * @param Bonafide | |
| */ | |
| protected $_bonafide; | |
| /** |
| <?php | |
| /** | |
| * Necessary because $param->getClass() requires the class to be loaded. | |
| * We don't want to have to load every class. | |
| */ | |
| function getClassName(ReflectionParameter $param) { | |
| preg_match('/\[\s\<\w+?>\s([\w]+)/s', $param->__toString(), $matches); | |
| return isset($matches[1]) ? $matches[1] : null; | |
| } |
| <?php | |
| class Color {} | |
| class UnitOfWeight {} | |
| interface Vehicle { | |
| /** | |
| * I'm a docblock! | |
| */ | |
| public function setColor(Color $color, $foo = 'foo', $bar = array('bar1', 'bar2'), $bool = false); |
| <?php | |
| namespace S2\MyFancyBundle\Templating; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| class MyHtmlExtension extends \Twig_Extension | |
| { | |
| private $aFancyService; |
| <?php | |
| $xml = <<<XML | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <document> | |
| <item> | |
| <identifier>4</identifier> | |
| <name>Blah</name> | |
| </item> | |
| <item> | |
| <identifier>18</identifier> |
Unfortunately, this doesn't work yet. PhpStorm will only generate 1 setter method regardless of the template, it seems.
A bug report has been filed at http://youtrack.jetbrains.com/issue/WI-12552
| <?php | |
| namespace S2\FooBundle\Form\Type; | |
| use Symfony\Component\Form\AbstractType; | |
| use S2\FooBundle\Form\Type\PartialAddressType; | |
| use Symfony\Component\Form\FormBuilderInterface; | |
| class FooAddressType extends AbstractType | |
| { |
| <?php | |
| class FileInspector | |
| { | |
| protected $filename; | |
| protected $namespace; | |
| protected $contents; | |
| public function __construct($filename) { | |
| if ( ! $this->contents = @file_get_contents($filename)) { |
| Kohana::$config->attach(new Config_Database); |
| setup: function (editor) { | |
| editor.on('init', function(args) { | |
| editor = args.target; | |
| editor.on('NodeChange', function(e) { | |
| if (e && e.element.nodeName.toLowerCase() == 'img') { | |
| tinyMCE.DOM.setAttribs(e.element, {'width': null, 'height': null}); | |
| } | |
| }); | |
| } |