mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-04 00:54:08 +02:00
cleanup context handling for wrappers
This commit is contained in:
parent
3171a535de
commit
2c8ae56d02
16 changed files with 182 additions and 258 deletions
|
|
@ -38,7 +38,7 @@ class Path {
|
|||
* @param string $class
|
||||
* @param array $contextOptions
|
||||
*/
|
||||
public function __construct($class, $contextOptions = array()) {
|
||||
public function __construct($class, $contextOptions = []) {
|
||||
$this->class = $class;
|
||||
$this->contextOptions = $contextOptions;
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ class Path {
|
|||
*/
|
||||
protected function appendDefaultContent($values) {
|
||||
if (!is_array(current($values))) {
|
||||
$values = array($this->getProtocol() => $values);
|
||||
$values = [$this->getProtocol() => $values];
|
||||
}
|
||||
$context = stream_context_get_default();
|
||||
$defaults = stream_context_get_options($context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue