Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details>
tag!
<details>
Summary Goes Here
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
<?php | |
function splat(array ...$args) { | |
foreach ($args as $arg) { | |
print_r($arg); | |
} | |
} | |
splat(['firstArray'], ['secondArray']); | |
// Output: Array( [0] => firstArray ) Array( [0] => secondArray ) |
// src/AcmeBundle/DependencyInjection/AcmeExtension.php | |
<?php | |
namespace AcmeBundle\DependencyInjection; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Loader; | |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
<?php | |
namespace App\Util\Doctrine\Repository; | |
use App\Util\Doctrine\Entity\AbstractEntity; | |
use Doctrine\Common\Persistence\ObjectRepository; | |
use Doctrine\ORM\EntityRepository; | |
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException; |
<?php | |
namespace AmceBundle\Command; | |
class MyCommand | |
{ | |
// ... | |
protected function execute(InputInterface $input, OutputInterface $output) | |
{ |
<?php | |
namespace AppBundle\Admin; | |
use Sonata\AdminBundle\Admin\Admin; | |
use Sonata\AdminBundle\Datagrid\DatagridMapper; | |
class PersonAdmin extends Admin | |
{ | |
protected function configureDatagridFilters(DatagridMapper $filterMapper) |
{% extends 'SonataAdminBundle:CRUD:base_list.html.twig' %} | |
{% block javascripts %} | |
{{ parent() }} | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var MIN_LENGTH = 3; | |
var datalistFirst = $('<ul class="select2-results autoResults" role="listbox" id="datalist_filter_firstname_value"></ul>'); | |
var datalistName = $('<ul class="select2-results autoResults" role="listbox" id="datalist_filter_name_value"></ul>'); | |
$('#filter_name_value').after(datalistName); |
<?php | |
namespace Fry; | |
use JsonStreamingParser\Listener; | |
/** | |
* This implementation allows to process an object at a specific level | |
* when it has been fully parsed | |
*/ | |
class ObjectListener implements Listener | |
{ |
<?php | |
use GuzzleHttp\Client; | |
trait MailTestHelper | |
{ | |
/** | |
* @var \GuzzleHttp\Client | |
*/ | |
protected $client; |