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 | |
declare(strict_types=1); | |
namespace Tests\Integration; | |
use PHPUnit\Framework\TestCase; | |
use ReflectionClass; | |
use ReflectionProperty; | |
use Webmozart\Assert\Assert; |
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 | |
declare(strict_types=1); | |
namespace AppBundle\Database; | |
use Doctrine\DBAL\Platforms\AbstractPlatform; | |
use Doctrine\DBAL\Types\Type; | |
/** | |
* @see https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/cookbook/custom-mapping-types.html |
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 | |
declare(strict_types=1); | |
namespace NS; | |
use NS\Enum; | |
use NS\Exception\FileDoesntContainClassDefinition; | |
use NS\Exception\NotSupported; | |
use NS\PathnameToClass; |
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 | |
const STREAM_OPEN_FOR_INCLUDE = 128; | |
final class HardCoreDebugLogger | |
{ | |
public static function register(string $output = 'php://stdout') | |
{ | |
register_tick_function(function () use ($output) { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
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
Hi, | |
I'm afraid I'm not interested in this position right now. | |
I would like to know how you're getting my details and what you're storing though. Under my rights from the GDPR, can you please tell me: | |
* what personal data you have collected about me? | |
* the source of this data? | |
* who you've shared it with, and under what basis? | |
* how this data is being used? |
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 | |
function generateUuidWithoutDashes(): string | |
{ | |
$uuidBin = random_bytes(16); | |
$uuidBin &= "\xFF\xFF\xFF\xFF\xFF\xFF\x0F\xFF\x3F\xFF\xFF\xFF\xFF\xFF\xFF\xFF"; | |
$uuidBin |= "\x00\x00\x00\x00\x00\x00\x40\x00\x80\x00\x00\x00\x00\x00\x00\x00"; | |
$uuidHex = bin2hex($uuidBin); | |
return $uuidHex; |
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 Doctrine\DBAL\Platforms\AbstractPlatform; | |
use Doctrine\DBAL\Types\Type; | |
use Money\Currencies\ISOCurrencies; | |
use Money\Formatter\DecimalMoneyFormatter; | |
use Money\Money; | |
use Money\Parser\DecimalMoneyParser; | |
/** |
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 (w, timeout) { | |
setTimeout(function () { | |
var url = w.location.toString(); | |
if (w.history && w.history.replaceState && url.indexOf('_fid=') !== -1) { | |
w.history.replaceState({}, null, /[?&]_fid=[^&]+$/.test(url) | |
? url.replace(/[?&]_fid=[^&]+/, '') | |
: url.replace(/([?&])_fid=[^&]+&/, '$1') | |
); | |
} | |
}, timeout || 2000); |
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
{ | |
"functionCalls": [ | |
{ | |
"function": "\\array_diff_assoc", | |
"position": 0 | |
}, | |
{ | |
"function": "\\array_diff_key", | |
"position": 0 | |
}, |
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 Latte; | |
use Latte\Compiler; | |
class RenderBlockHelperMacro extends \Latte\Macros\MacroSet | |
{ | |
public function __construct(Compiler $compiler) | |
{ |
NewerOlder