xref: /template/strap/vendor/bin/yaml-lint (revision 83c6863253ba0b92605aa8dceca974358d439aaa)
104fd306cSNickeau#!/usr/bin/env php
204fd306cSNickeau<?php
304fd306cSNickeau
404fd306cSNickeau/**
504fd306cSNickeau * Proxy PHP file generated by Composer
604fd306cSNickeau *
7*83c68632SNico * This file includes the referenced bin path (../symfony/yaml/Resources/bin/yaml-lint)
8*83c68632SNico * using a stream wrapper to prevent the shebang from being output on PHP<8
904fd306cSNickeau *
1004fd306cSNickeau * @generated
1104fd306cSNickeau */
1204fd306cSNickeau
13*83c68632SNiconamespace Composer;
1404fd306cSNickeau
15*83c68632SNico$GLOBALS['_composer_bin_dir'] = __DIR__;
16*83c68632SNico$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
17*83c68632SNico
18*83c68632SNicoif (PHP_VERSION_ID < 80000) {
19*83c68632SNico    if (!class_exists('Composer\BinProxyWrapper')) {
20*83c68632SNico        /**
21*83c68632SNico         * @internal
22*83c68632SNico         */
23*83c68632SNico        final class BinProxyWrapper
24*83c68632SNico        {
25*83c68632SNico            private $handle;
26*83c68632SNico            private $position;
27*83c68632SNico            private $realpath;
28*83c68632SNico
29*83c68632SNico            public function stream_open($path, $mode, $options, &$opened_path)
30*83c68632SNico            {
31*83c68632SNico                // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
32*83c68632SNico                $opened_path = substr($path, 17);
33*83c68632SNico                $this->realpath = realpath($opened_path) ?: $opened_path;
34*83c68632SNico                $opened_path = $this->realpath;
35*83c68632SNico                $this->handle = fopen($this->realpath, $mode);
36*83c68632SNico                $this->position = 0;
37*83c68632SNico
38*83c68632SNico                return (bool) $this->handle;
3904fd306cSNickeau            }
40*83c68632SNico
41*83c68632SNico            public function stream_read($count)
42*83c68632SNico            {
43*83c68632SNico                $data = fread($this->handle, $count);
44*83c68632SNico
45*83c68632SNico                if ($this->position === 0) {
46*83c68632SNico                    $data = preg_replace('{^#!.*\r?\n}', '', $data);
47*83c68632SNico                }
48*83c68632SNico
49*83c68632SNico                $this->position += strlen($data);
50*83c68632SNico
51*83c68632SNico                return $data;
52*83c68632SNico            }
53*83c68632SNico
54*83c68632SNico            public function stream_cast($castAs)
55*83c68632SNico            {
56*83c68632SNico                return $this->handle;
57*83c68632SNico            }
58*83c68632SNico
59*83c68632SNico            public function stream_close()
60*83c68632SNico            {
61*83c68632SNico                fclose($this->handle);
62*83c68632SNico            }
63*83c68632SNico
64*83c68632SNico            public function stream_lock($operation)
65*83c68632SNico            {
66*83c68632SNico                return $operation ? flock($this->handle, $operation) : true;
67*83c68632SNico            }
68*83c68632SNico
69*83c68632SNico            public function stream_seek($offset, $whence)
70*83c68632SNico            {
71*83c68632SNico                if (0 === fseek($this->handle, $offset, $whence)) {
72*83c68632SNico                    $this->position = ftell($this->handle);
73*83c68632SNico                    return true;
74*83c68632SNico                }
75*83c68632SNico
76*83c68632SNico                return false;
77*83c68632SNico            }
78*83c68632SNico
79*83c68632SNico            public function stream_tell()
80*83c68632SNico            {
81*83c68632SNico                return $this->position;
82*83c68632SNico            }
83*83c68632SNico
84*83c68632SNico            public function stream_eof()
85*83c68632SNico            {
86*83c68632SNico                return feof($this->handle);
87*83c68632SNico            }
88*83c68632SNico
89*83c68632SNico            public function stream_stat()
90*83c68632SNico            {
91*83c68632SNico                return array();
92*83c68632SNico            }
93*83c68632SNico
94*83c68632SNico            public function stream_set_option($option, $arg1, $arg2)
95*83c68632SNico            {
96*83c68632SNico                return true;
97*83c68632SNico            }
98*83c68632SNico
99*83c68632SNico            public function url_stat($path, $flags)
100*83c68632SNico            {
101*83c68632SNico                $path = substr($path, 17);
102*83c68632SNico                if (file_exists($path)) {
103*83c68632SNico                    return stat($path);
104*83c68632SNico                }
105*83c68632SNico
106*83c68632SNico                return false;
107*83c68632SNico            }
108*83c68632SNico        }
109*83c68632SNico    }
110*83c68632SNico
111*83c68632SNico    if (
112*83c68632SNico        (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
113*83c68632SNico        || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
114*83c68632SNico    ) {
115*83c68632SNico        return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint');
116*83c68632SNico    }
117*83c68632SNico}
118*83c68632SNico
119*83c68632SNicoreturn include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint';
120