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 Ormigo\Bundle\OrmigoBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
use Ormigo\Bundle\OrmigoBundle\Form\DataTransformer\StreetAddressModelTransformer; | |
use Ormigo\Bundle\OrmigoBundle\Form\Validator\StreetAddressValidator; |
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
[remote "upstream"] | |
url = git://github.com/fabpot/Sami.git | |
fetch = +refs/heads/*:refs/remotes/upstream/* | |
# Github pull requests | |
fetch = +refs/pull/*/head:refs/gh-pull/remotes/upstream/* | |
fetch = +refs/pull/*/merge:refs/gh-merge/remotes/upstream/* |
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 Symfony\Bridge\Propel1\Form\DataMapper; | |
use Symfony\Component\Form\DataMapperInterface; | |
use Symfony\Component\Form\Exception\UnexpectedTypeException; | |
/** | |
* A DataMapper mapping a ModelCriteria to a form type. | |
* |
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 | |
// The smallest length of all strings, limited at 10 characters. | |
$limit = min(strlen($origin), strlen($destination), 10); | |
// Increment $i as long as the characters at its ($i) position match. | |
for ($i = 0; $i < $limit && $origin[$i] === $destination[$i]; $i++); | |
// $i now contains the length of the common prefix |
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 | |
class AcmeController implements ContainerAwareInterface | |
{ | |
use ContainerAwareTrait; | |
use RedirectTrait; | |
public function indexAction() | |
{ | |
return $this->redirect('some_route', [ |
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\DomCrawler\Crawler; | |
class CrawlerTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testAttribute() | |
{ | |
$xml = <<<XML | |
<div> |
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
services: | |
# A spooling implementation. | |
acme.spool.queued: | |
class: Acme\Mailer\QueuedSpool | |
# The transport using the spool above. | |
acme.transport.spool: | |
class: Swift_SpoolTransport | |
arguments: | |
- '@acme.spool.queued' |
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 | |
class Foo | |
{ | |
public function bar(Response $response = new Response()) | |
{ | |
// .. | |
} | |
// Instead of: |
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 Monolog\ErrorHandler; | |
use Psr\Log\LogLevel; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\HttpKernel\Kernel; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
class AppKernel extends Kernel | |
{ |
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
services: | |
event_dispatcher: | |
class: Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher | |
arguments: | |
- @container | |
traceable_event_dispatcher: | |
public: false | |
class: Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher | |
decorates: event_dispatcher |