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 | |
| // Case 1: Current API - Untestable without direct HTTP Connection to Amazon | |
| class MyAmazonService | |
| { | |
| public function getItems($searchTerm) | |
| { | |
| $request = (new http\Request\Factory)->createRequest(); | |
| $response = $reqeust->setUrl("http://www.amazon.de/search?terms=" . $searchTerm)->send(); |
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
| fpm.name=${project.name} | |
| fpm.packagename=${project.name} | |
| fpm.build_dir=${commons.basedir}/${commons.builddir.name}/fpm | |
| fpm.version=${project.version} | |
| fpm.maintainer= | |
| fpm.packagetype=deb | |
| fpm.url= | |
| fpm.dependencies= | |
| fpm.description= | |
| fpm.postinst= |
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
| vendor |
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 UnitOfWork | |
| { | |
| public function propertyChanged($instance, $field, $value) | |
| { | |
| } | |
| } |
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\Entity; | |
| use Doctrine\ORM\Mapping AS ORM; | |
| /** | |
| * @ORM\Entity | |
| * @ORM\AttributeOverrides({ | |
| * @ORM\AttributeOverride(name="id", column=@ORM\Column(name="table_id")) |
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 TxController extends Controller | |
| { | |
| public function context($id) | |
| { | |
| return new TxProxy($this->get($id), $this->get('doctrine.orm.default_entity_manager')); | |
| } | |
| } |
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 Foo | |
| { | |
| public $foo; | |
| } | |
| class FooProxy extends Foo | |
| { | |
| public function __construct() |
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 User | |
| { | |
| private $email; | |
| private $emailChangedAt; | |
| public function changeEmail($email) | |
| { | |
| // assignment in wrong method, easy to miss in larger methods | |
| $this->emailChangedAt = new \DateTime("now"); | |
| $this->apply(new EmailChanged(array("email" => $email))); |
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 | |
| // tests/MyProject/Tests/DoctrineTestCase.php | |
| namespace MyProject\Tests; | |
| use Doctrine\ORM\Tools\SchemaTool; | |
| use Doctrine\ORM\EntityManager; | |
| class DoctrineTestCase extends \PHPUnit_Framework_TestCase | |
| { | |
| protected $em; |
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
| [config] | |
| command = "D:\Program Files (x86)\PHP\v5.3\php.exe" build_azure.php |