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 RandomStringGenerator | |
{ | |
const DEFAULT_ALPHABET = 'abcdefghijklmnopqrstuvwxyz0123456789'; | |
/** | |
* Generates a random string of requested length and from given alphabet. | |
* | |
* @param int $stringLength | |
* @param string $alphabet |
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 BaseTestCase extends \PHPUnit_Framework_TestCase | |
{ | |
/** | |
* Creates an arbitrary object with specified property values. | |
* | |
* @param string $className | |
* @param array $propertyValues | |
* |
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 Object1 | |
{ | |
protected $property1; | |
public function __construct($property1) | |
{ | |
$this->property1 = $property1; | |
} |
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 YourApp\Repository\Query; | |
use Doctrine\DBAL\Connection; | |
use Doctrine\DBAL\Schema\Identifier; | |
/** | |
* Class BulkInsertQuery | |
* |
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 Banana | |
{ | |
public function a() | |
{ | |
return 1; | |
} | |
public function b() |
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 | |
/** | |
* Obscures sensitive string (like a security token), | |
* but preserves minimal information about letters, digits, spaces and unknown characters. | |
* | |
* @param string $string | |
* | |
* @return string | |
*/ |
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 Acme; | |
use PHPUnit\Framework\TestCase; | |
use ReflectionClass; | |
use ReflectionMethod; | |
use ReflectionType; | |
use RuntimeException; |
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 | |
use PHPUnit\Framework\TestCase; | |
class CloneTest extends TestCase | |
{ | |
/** | |
* @dataProvider testClone | |
* | |
* @param object $obj0 |
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 | |
/** @noinspection ? */ | |
// PhpUndefinedGotoLabelInspection Undefined goto label | |
// PhpUndefinedVariableInspection Undefined variable | |
// PhpUndefinedMethodInspection Undefined method | |
// PhpUndefinedNamespaceInspection Undefined namespace | |
// PhpUndefinedClassInspection Undefined class | |
// PhpUndefinedFunctionInspection Undefined function |
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 PermutationIterator implements Iterator | |
{ | |
/** @var array */ | |
protected $items; | |
/** @var int */ | |
protected $slots; |