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 | |
$host = '127.0.0.1'; | |
$port = 9222; | |
$path = '/devtools/browser/919ac3d2-8dca-4cc9-8a26-c719c19a7b8b'; | |
$socket = stream_socket_client( | |
'tcp://' . $host . ':' . $port, |
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 Composer\Autoload\ClassLoader; | |
use Zeus\Trace\Order; | |
use Zeus\Trace\RealService; | |
/** | |
* @var ClassLoader $autoload | |
*/ | |
$autoload = require 'vendor/autoload.php'; |
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 MockBuilder | |
{ | |
private array $methodMocks = []; | |
public function getInstance(string $originalClass): object | |
{ | |
$mockClassName = $this->generateUniqueClassName($originalClass); |
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 Promise | |
{ | |
private array $callbacks = []; | |
private array $rejectedCallbacks = []; | |
/** | |
* @param Closure $closure | |
*/ |
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 Container | |
{ | |
/** | |
* @var array | |
*/ | |
private array $bindings = []; | |
/** | |
* @var array |
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 ReflectionClosure extends ReflectionFunction | |
{ | |
const string REGEX_PATTERN = '/function\s*\(\s*(.*?)\s*\)\s*(?:use\s*\(([^)]*)\)\s*)?{\s*(.*?)\s*}/s'; | |
public function getCode(): string | |
{ | |
$startLine = $this->getStartLine(); | |
$endLine = $this->getEndLine(); |
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
//dilo surucu | |
class Step | |
{ | |
/** | |
* @var Closure[] $steps | |
*/ | |
private array $steps; | |
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 BookEntity | |
{ | |
public function __construct(private int $id, private string $title) | |
{ | |
} | |
public function getId(): int |
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 | |
//Dilo surucu | |
$spec = array( | |
0 => array('pipe', 'r'), // stdin | |
1 => array('pipe', 'w'), // stdout | |
2 => array('pipe', 'w') // stderr | |
); | |
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
class Parallel | |
{ | |
private array $threads = []; | |
private array $process = []; | |
public function add(PromiseInterface $promise): self | |
{ | |
$this->threads[] = $promise; | |
return $this; |
NewerOlder