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 Iterator; | |
use ArrayIterator; | |
use Iterator; | |
/** | |
* Takes a set of iterators [iterator1, iterator2, iterator3, ...] | |
* and iterates in an equivalent way to: |
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 Vrt\UtilsBundle\Service; | |
use RuntimeException; | |
use Symfony\Component\DependencyInjection\Container; | |
// AppKernel::initializeContainer() | |
// if ('dev' === $this->environment) { | |
// ContainerServiceId::setContainer($this->container); |
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 PermutationIterator implements Iterator | |
{ | |
/** @var array */ | |
protected $items; | |
/** @var int */ | |
protected $slots; |
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 | |
/** @noinspection ? */ | |
// PhpUndefinedGotoLabelInspection Undefined goto label | |
// PhpUndefinedVariableInspection Undefined variable | |
// PhpUndefinedMethodInspection Undefined method | |
// PhpUndefinedNamespaceInspection Undefined namespace | |
// PhpUndefinedClassInspection Undefined class | |
// PhpUndefinedFunctionInspection Undefined function |
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 PHPUnit\Framework\TestCase; | |
class CloneTest extends TestCase | |
{ | |
/** | |
* @dataProvider testClone | |
* | |
* @param object $obj0 |
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 Acme; | |
use PHPUnit\Framework\TestCase; | |
use ReflectionClass; | |
use ReflectionMethod; | |
use ReflectionType; | |
use RuntimeException; |
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 | |
/** | |
* 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 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 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 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; | |
} |
NewerOlder