·

phpstorm

Regexes for quickly mocking stuff

This is a small collection of regular expressions to find pieces of code and replace them with PHPUnit mocks. It’s useful for copy/pasting existing pieces of code (a constructor signature for example) and transforming them into usefull code for mocking in PHPUnit, without having to type everything out. Disclaimer: some small code formatting might be read further ...

How to install PHP Mess Detector for PhpStorm on OSX

Recently I’ve been upgrading the way I write code. I’ve been programming for a while now, but there’s always room for improvement. Lucky for us developers, there are numerous tools for us we can use to aid us in our development. Things like unit testing and coding standards are great of course. But there’s also read further ...

How to enable PHPUnit code completion in PhpStorm

So you’ve got PhpStorm and you’re writing your tests with PHPUnit. But how do you get the code completion to work? Well, the solution is very simple:read further ...

How to enable autocompletion for NodeJS in PhpStorm

Recently I’ve been tinkering a bit more with NodeJS, just to expand my horizon. I’ve done some simple things with NodeJS before, but since I work for 99% with PHP (WordPress, Magento) I (still) haven’t got a real use case yet to implement it on a larger scale. Nevertheless – curious as I am – I started tinkering a read further ...

Setup PHP CodeSniffer for PHPStorm on OSX

On Meet Magento 2014  I attended an interesting presentation about Continues Integration in Magento from Damian Luszczymak. One important aspect of Continuous Integration is that as a team of developers everyone should follow the same coding guidelines. If you use PHPStorm, you can use PHP CodeSniffer to ensure that the code you are writing as a team is read further ...

Replace a XSL parameter in PhpStorm to a choose with a default value

Just a small something I wanted to share: When you want to convert a XSL parameter in PhpStorm to a choose with a default parameter, you can do so with a simple regexp. Say you’ve got something like this: And you want to convert it to something like this: Then just find and read further ...