Skip to content

Instantly share code, notes, and snippets.

@exakat
Created March 14, 2023 19:49
Show Gist options
  • Save exakat/5148ecd9e40717b946a233ad6d14707f to your computer and use it in GitHub Desktop.
Save exakat/5148ecd9e40717b946a233ad6d14707f to your computer and use it in GitHub Desktop.
//audited on https://github.com/FriendsOfPHP/Goutte
//The child constructor (a), then the parent constructor (c)
0)
a => 'public function __construct(HttpClientInterface $client = null, History $history = null, CookieJar $cookieJar = null) { /**/ } '
c => 'public function __construct(array $server = [ ], History $history = null, CookieJar $cookieJar = null) { /**/ } '
1)
a => 'public function __construct(Headers $headers = null, AbstractPart $body = null) { /**/ } '
c => 'public function __construct(Headers $headers = null, AbstractPart $body = null) { /**/ } '
2)
a => 'public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null) { /**/ } '
c => 'public function __construct(RawMessage $message) { /**/ } '
3)
a => 'public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null) { /**/ } '
c => 'public function __construct(RawMessage $message) { /**/ } '
4)
a => 'public function __construct($body, ?string $charset = \'utf-8\', string $subtype = \'plain\', string $encoding = null) { /**/ } '
c => 'public function __construct(RawMessage $message) { /**/ } '
5)
a => 'public function __construct($body, ?string $charset = \'utf-8\', string $subtype = \'plain\', string $encoding = null) { /**/ } '
c => 'public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null) { /**/ } '
6)
a => 'public function __construct(AbstractPart ...$parts) { /**/ } '
c => 'public function __construct(array $fields = [ ]) { /**/ } '
7)
a => 'public function __construct(AbstractPart ...$parts) { /**/ } '
c => 'public function __construct(MessagePart ...$parts) { /**/ } '
8)
a => 'public function __construct(AbstractPart ...$parts) { /**/ } '
c => 'public function __construct(AbstractPart $mainPart, AbstractPart $part, AbstractPart ...$parts) { /**/ } '
9)
a => 'public function __construct(string $name, string $value) { /**/ } '
c => 'public function __construct(string $name, string $value, array $parameters = [ ]) { /**/ } '
// The correlated parent class
0 => class HttpBrowser extends AbstractBrowser { /**/ }
1 => class Message extends RawMessage { /**/ }
2 => class DataPart extends TextPart { /**/ }
3 => class DataPart extends TextPart { /**/ }
4 => class TextPart extends AbstractPart { /**/ }
5 => class TextPart extends AbstractPart { /**/ }
6 => abstract class AbstractMultipartPart extends AbstractPart { /**/ }
7 => abstract class AbstractMultipartPart extends AbstractPart { /**/ }
8 => abstract class AbstractMultipartPart extends AbstractPart { /**/ }
9 => class UnstructuredHeader extends AbstractHeader { /**/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment