This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
class Foo_Twig_Extension extends Twig_Extension | |
{ | |
protected $container; | |
public function __construct(ContainerInterface $container) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @ORM\Table(name="file") | |
* @ORM\InheritanceType("SINGLE_TABLE") | |
* @ORM\DiscriminatorColumn(name="function", type="smallint") | |
* @ORM\DiscriminatorMap({ | |
* "1" = "\..\File\CvFile", | |
* "2" = "\..\File\CvWebFile", | |
* "3" = "\..\File\KbisFile" | |
* }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'autoload.php'; | |
$filterClass = new \BadaBoom\ChainNode\Filter\ExceptionClassFilter(); | |
$filterClass->allow('Exception'); | |
$summaryProvider = new \BadaBoom\ChainNode\Provider\ExceptionSummaryProvider(); | |
$subjectProvider = new \BadaBoom\ChainNode\Provider\ExceptionSubjectProvider(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function onNotSuccessfulTest(\Exception $e) | |
{ | |
try { | |
return parent::onNotSuccessfulTest($e); | |
} catch (\Exception $newException) { | |
if ($e instanceof \PHPUnit_Framework_ExpectationFailedException && false == $e->getComparisonFailure()) { | |
throw $e; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// var 1 | |
$convertObjectToArray = null; | |
$convertObjectToArray = function($value) use (&$convertObjectToArray) { | |
if (is_object($value)) { | |
return array_map($convertObjectToArray, get_object_vars($value)); | |
} | |
if (is_array($value)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
targetUser="seld" | |
targetHost="seld.be" | |
parentDir="/home/seld" | |
childDir="packagist.org" | |
port="22" | |
configFile="~/etc/conf/$childDir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
[exception] 500 | Internal Server Error | RuntimeException | |
[message] The source file "/home/maksim/projects/RemixCv/app/../web/bundles/core/js/ember/ember-rest.js" does not exist. | |
[1] RuntimeException: The source file "/home/maksim/projects/RemixCv/app/../web/bundles/core/js/ember/ember-rest.js" does not exist. | |
at n/a | |
in /home/maksim/projects/RemixCv/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php line 74 | |
at Assetic\Asset\FileAsset->getLastModified() | |
in /home/maksim/projects/RemixCv/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Controller/AsseticController.php line 72 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Foo\XXXBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use JMS\Payment\CoreBundle\Plugin\Exception\CommunicationException; | |
use JMS\Payment\CoreBundle\Entity\Payment; | |
use JMS\Payment\CoreBundle\Plugin\PluginInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% include "GraphBundle:Index:_renderRound.html.twig" with { "round": round } only %} | |
{% if round.winnerRound %} | |
{% include "GraphBundle:Index:_renderEuropaLeagueRound.html.twig" with {"round": round.winnerRound } only %} | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
while ($condition) { | |
// do super stuff here. | |
break; | |
} |