Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nenad Gajic NenadGajic

🎯
Focusing
View GitHub Profile
View laracasts_refactoring_to_lookup_tables.php
<?php
/**
* Refactor #1:
*/
// Before
if ($user->type === 'admin' || $user->type === 'mod' || $user->type === 'author') {
// Do something.
}
@drfraker
drfraker / Live Template For PHPUnit Tests
Last active Sep 7, 2020
Live Template For PHPUnit Tests
View Live Template For PHPUnit Tests
// 1. In PhpStorm go to: Preferences > Editor > Live Templates.
// 2. Click on the + button on the top right to create a new template.
// 3. Enter "@test" (no quotes) in the Abbreviation field, and give the template a name. (mine is named test case)
// 4. Copy and paste the code below into the "Template text:" section in PhpStorm
/** @test */
$NAME$
public function $SNAKENAME$()
{
$END$
You can’t perform that action at this time.