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
#!/usr/bin/env php | |
<?php | |
$rules = [ | |
'@Symfony' => true, | |
'@Symfony:risky' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'ordered_imports' => true, | |
'phpdoc_order' => true, | |
]; | |
$excludedPaths = [ |
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
#!/usr/bin/env php | |
<?php | |
$finder = PhpCsFixer\Finder::create() | |
->exclude([ | |
'app/config', | |
'app/data', | |
'app/Resources', | |
'var', | |
'web/bundles', | |
'web/css', |
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
#!/usr/bin/env php | |
<?php | |
return PhpCsFixer\Config::create() | |
->setRiskyAllowed(true) | |
->setRules([ | |
'@Symfony' => true, | |
'@Symfony:risky' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'ordered_imports' => true, | |
'phpdoc_order' => true, |
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 CommonBundle\Twig; | |
use Symfony\Bridge\Twig\Form\TwigRenderer; | |
use Symfony\Component\Form\FormView; | |
class FormSubmitExtension extends \Twig_Extension | |
{ | |
/** |
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 App\Services\Rest\Helper; | |
use App\Utils\JSON; | |
use Symfony\Component\HttpFoundation\Request as HttpFoundationRequest; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\Exception\HttpException; |
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 CommonBundle\Service; | |
use Symfony\Component\Templating\EngineInterface; | |
class SendMail extends \Swift_Message | |
{ | |
/** | |
* @var string |
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
/** | |
* @param Schema $schema | |
*/ | |
public function down(Schema $schema) | |
{ | |
throw new \RuntimeException('This migration is not reversible'); |
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
/** | |
* {@inheritDoc} | |
*/ | |
public function newHydrator($hydrationMode) | |
{ | |
switch ($hydrationMode) { | |
case Query::HYDRATE_OBJECT: | |
return new Internal\Hydration\ObjectHydrator($this); |
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
public function pruneEntitiesOlderThan($cutoffTime) | |
{ | |
return $this->createQueryBuilder('w') | |
->delete() | |
->join('w.lot', 'l') | |
->where('l.sale_date < :cutoff_time') | |
->setParameter('cutoff_time', strtotime('-'.$cutoffTime.' day')) | |
->getQuery() |
NewerOlder