Skip to content

Instantly share code, notes, and snippets.

View ambengers's full-sized avatar
🌙
A conscious speck of stardust.

Marvin Quezon ambengers

🌙
A conscious speck of stardust.
View GitHub Profile
@ambengers
ambengers / .php-cs-fixer.dist.php
Last active November 14, 2022 02:12
Rules for PHP codestyle.
<?php
$rules = [
'@PSR2' => true,
// Syntax...
'array_syntax' => ['syntax' => 'short'],
'braces' => [
'allow_single_line_anonymous_class_with_empty_body' => true,
'allow_single_line_closure' => true,
@ambengers
ambengers / InteractsWithQueryFilters.php
Last active March 26, 2019 08:41
Trait for testing laravel-query-filter package
<?php
namespace Tests\Feature\Concerns;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Foundation\Testing\TestResponse;
trait InteractsWithQueryFilters
{
@ambengers
ambengers / HasResponseMacros.php
Last active September 14, 2018 08:28
Test macro to better inspect response data.
<?php
namespace Tests;
use PHPUnit\Framework\Assert;
use Illuminate\Support\Collection;
use Illuminate\Foundation\Testing\TestResponse;
trait HasResponseMacros
{