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
| #!/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 | |
| 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
| <?php | |
| namespace Taluu\Domain\ChangeSet; | |
| /** | |
| * Represents a change into the entity | |
| * | |
| * @author Rémy Gazelot <remy@wisembly.com> | |
| * @author Baptiste Clavié <baptiste@wisembly.com> | |
| */ |
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 | |
| 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 | |
| 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 | |
| $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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main() { | |
| int i = 42, | |
| j = 42, | |
| k = 42, | |
| sum = 0; |
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
| <service id="un.service" class="%un.service%"> | |
| <argument type="service" id="doctrine.orm.entity_manager" /> | |
| <argument type="service" id="validator" /> | |
| <!-- etc //--> | |
| </service> |