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 MathCase extends PHPUnit_Framework_TestCase | |
| { | |
| public function testAddition() | |
| { | |
| $this->assertEquals(1+1, 2); | |
| } | |
| } |
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 | |
| /* | |
| * This file is part of the Symfony package. | |
| * | |
| * (c) Fabien Potencier <[email protected]> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source 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
| doctrine_mongo_db: | |
| server: mongodb://localhost:27017 | |
| default_database: mybundle_%kernel.environment% | |
| options: | |
| connect: true | |
| metadata_cache_driver: array | |
| mappings: | |
| MyBundle: ~ |
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 | |
| $xmlBuilder = new XmlBuilder(); | |
| $xmlBuilder->root('notice') | |
| ->addAttribute('version', 2) | |
| ->addNode('api-key', 'apikeuvalue') | |
| ->addNode('commands') | |
| ->addNode('hello') | |
| ->addNode('execute', 'build --all') | |
| ->end() |
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 | |
| function validate_creditcard ($creditcard) { | |
| $creditcard = str_split(trim($creditcard)); | |
| foreach ($creditcard as $key => $number) { | |
| if (!($key % 2)) { | |
| $creditcard[$key] = $number * 2; | |
| } | |
| } |
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 Application\HelloBundle\Entity; | |
| /** | |
| * @orm:Entity | |
| */ | |
| class Channel | |
| { | |
| /** |
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
| I tried to run : | |
| php app/console doctrine:database:drop | |
| But i get this error: | |
| [InvalidArgumentException] | |
| Could not find any configured connections | |
| Here is my configuration( DBAL ) |
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
| git log --pretty=format:%aN | sort | uniq -c | sort -rn |
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 Application\MyBundle\Document; | |
| use Application\FOS\UserBundle\Model\User; | |
| /** | |
| * @mongodb:Document( | |
| * collection="company", | |
| * repositoryClass="Application\MyBundle\Document\CompanyRepository" |
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
| /** | |
| * Set $1 | |
| * @return null | |
| */ | |
| public function set${1/./\u$0/}(\$$1) | |
| { | |
| \$this->${1/./\l$0/} = \$${1/./\l$0/}; | |
| } | |
| /** |