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
xdebug.remote_enable=1 | |
xdebug.remote_autostart=1 | |
xdebug.remote_host=10.211.55.2 | |
xdebug.remote_connect_back=1 | |
xdebug.idekey="PHPSTORM-XDEBUG" | |
;xdebug.scream=1 | |
;xdebug.show_exception_trace=1 | |
xdebug.var_display_max_children=128 | |
xdebug.var_display_max_data=512 | |
xdebug.var_display_max_depth=1024 |
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 spec\Opus\Service; | |
use PhpSpec\ObjectBehavior; | |
use Prophecy\Argument; | |
use Opus\Service\Container; | |
use Interop\Container\ContainerInterface; | |
class ContainerSpec extends ObjectBehavior |
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 Foo\SomeBundle\Service; | |
use Aws\Sns\SnsClient; | |
class Notifications | |
{ | |
/** | |
* @var SnsClient |
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
function foo() | |
{ | |
if ($something == $something) { | |
// do something | |
return $something_else; | |
} | |
return null; | |
} |
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 getRelationById($relation, $id) | |
{ | |
return array_filter($this->{$relation}, function($entity) use ($id) { | |
return $entity->getId() === $id; | |
}); | |
} |
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 Trq; | |
class Foo | |
{ | |
protected function __construct() | |
{ | |
} |
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 Trq; | |
class Foo | |
{ | |
protected function __construct() | |
{ | |
} |
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 bash | |
d=$(date +%s) | |
remote='some-aws-box' | |
dir="composer-$d.tmp" | |
if [ -f composer.json ]; then | |
ssh $remote mkdir "$dir" | |
scp composer.json $remote:"$dir"/composer.json |
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 | |
require __DIR__.'/../bootstrap/autoload.php'; | |
$app = require_once __DIR__.'/../bootstrap/start.php'; | |
$app = new Cors($app, array( | |
// you can use array('*') to allow any headers | |
'allowedHeaders' => array('x-allowed-header', 'x-other-allowed-header'), | |
// you can use array('*') to allow any methods |
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
Im getting this error: | |
Notice: Undefined index: userId in /var/www/html/symfony2/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 688 | |
class UsersType extends AbstractType | |
{ | |
/** | |
* @param FormBuilderInterface $builder | |
* @param array $options |