This file contains hidden or 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 | |
| $builder->add('current_slide', 'text', ['mapped' => falsei, 'constraint' => new Regex(['pattern' => '`^\d*$`'])]); |
This file contains hidden or 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 MyBundle\Exception; | |
| use \InvalidArgumentException; | |
| use Symfony\Component\Form\FormError, | |
| Symfony\Component\Form\FormInterface; | |
| /** |
This file contains hidden or 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 | |
| class DoctrineItemSummaryListener implements EventSubscriber | |
| { | |
| /** @var TagcloudGenerator */ | |
| private $tagcloud; | |
| public function __construct(TagcloudGenerator $tagcloud) | |
| { | |
| $this->tagcloud = $tagcloud; | |
| } |
This file contains hidden or 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 | |
| $a = $b = ['a' => 'a', | |
| 'b' => new Datetime('10 minutes ago'), | |
| 'c' => ['a' => 'a', | |
| 'b' => new Datetime('20 minutes ago')]]; | |
| $b['b'] = new Datetime('+10 minutes'); | |
| //$b['c']['b'] = new Datetime('+20 minutes'); |
This file contains hidden or 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 Taluu\Domain\ChangeSet; | |
| /** | |
| * Represents a change into the entity | |
| * | |
| * @author Rémy Gazelot <[email protected]> | |
| * @author Baptiste Clavié <[email protected]> | |
| */ |
This file contains hidden or 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 Behat\Behat\Event\SuiteEvent, | |
| Behat\Behat\Event\FeatureEvent, | |
| Behat\Behat\Event\ScenarioEvent, | |
| Behat\Gherkin\Node\TableNode, | |
| Behat\Gherkin\Node\PyStringNode, | |
| Behat\Behat\Exception\PendingException, |
This file contains hidden or 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 ruby | |
| module Compiler | |
| module Lexeme | |
| CAT = '' | |
| UNION = '|' | |
| OPTION = '?' | |
| REPEAT = '+' | |
| CLOSURE = '*' |
This file contains hidden or 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 | |
| const WORD = 'MY FANCY WORD'; | |
| const JOKER = '\''; | |
| $parts = []; | |
| $i = 0; | |
| foreach (str_split(strrev(WORD)) as $word) { | |
| $parts[pow(2, $i++)] = $word; | |
| } |
This file contains hidden or 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 | |
| /* | |
| * Several strings to interpret | |
| * With possibly several expressions in each of those | |
| * In the service where the cloud lies within | |
| * One string to interpret, One string to ease the perfs | |
| * One string to bring out some stats, and in an array binds them | |
| * In the service where the cloud lies within | |
| */ | |
| // some code § |
This file contains hidden or 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\Process\ProcessBuilder, | |
| Symfony\Component\Process\ProcessUtils; | |
| $builder = new ProcessBuilder; | |
| $builder->setPrefix(['--argument-name', 'argument value']); | |
| // after the ProcessUtils |