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
var FilterType = (function() { | |
'use strict'; | |
var _type = function(type) { | |
Object.defineProperties(this, { | |
toString: { value: function() { | |
return type; | |
}}, | |
eq: { value: function(another) { | |
return type === another.toString(); |
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 | |
/** | |
* Allows value objects to expose their properties while maintaining immutability. | |
* | |
* Inject your properties in your constructor. | |
* Define your properties in the docblock for your class with {@code @property}. | |
* Mutability is just a bug waiting to happen. | |
*/ | |
abstract class Value |
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 A | |
{ | |
private $a; | |
public function __construct($a) | |
{ | |
$this->a = $a; | |
} |
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 | |
// test data | |
class Foo | |
{ | |
private $a; | |
public function __construct($a) | |
{ |
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 texdc\autoload; | |
use InvalidArgumentException; | |
/** | |
* @param array $aDirectoryMap | |
* @return callable | |
*/ |
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 My\Composer\Installer; | |
use Composer\Package\PackageInterface; | |
use Composer\Installer\LibraryInstaller; | |
use My\Composer\Installer\Exception\InvalidPackageName; | |
abstract class AbstractInstaller extends LibraryInstaller | |
{ |
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 My\Role; | |
use RoleId as BaseId; | |
class RoleId extends BaseId | |
{ | |
const ADMIN = 'Admin'; | |
const GUEST = 'Guest'; |
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 Category\Command; | |
use Category\CategoryId; | |
use Message\AbstractMessage; | |
use Message\Message; | |
use Message\MessageId; | |
use Message\MessageTrait; | |
use Product\Command\ProductsCommandTrait; |
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 Barcode; | |
use Traversable; | |
use Barcode\Builder\ObjectBuilderInterface as ObjectBuilder; | |
use Barcode\Builder\RendererBuilderInterface as RendererBuilder; | |
use Barcode\Object\SpecificationInterface as ObjectSpecification; | |
use Barcode\Renderer\SpecificationInterface as RenderSpecification; |
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 InvalidArgumentException; | |
use PHPUnit_Framework_TestCase as TestCase; | |
use Zend\Mail\Transport\Smtp as SmtpTransport; | |
use Zend\Mail\Transport\SmtpOptions; | |
/** | |
* A base testcase for mail transactions with Mailtrap. | |
* |