File tree Expand file tree Collapse file tree 2 files changed +78
-0
lines changed Expand file tree Collapse file tree 2 files changed +78
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ /**
6
+ * This file is part of phpDocumentor.
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ *
11
+ * @link http://phpdoc.org
12
+ */
13
+
14
+ namespace phpDocumentor \Reflection \PseudoTypes ;
15
+
16
+ use phpDocumentor \Reflection \Type ;
17
+ use phpDocumentor \Reflection \PseudoType ;
18
+ use phpDocumentor \Reflection \Types \Resource_ ;
19
+
20
+ /**
21
+ * Value Object representing the 'closed-resource' Type.
22
+ *
23
+ * @psalm-immutable
24
+ */
25
+ final class ClosedResource implements PseudoType
26
+ {
27
+ public function underlyingType (): Type
28
+ {
29
+ return new Resource_ ();
30
+ }
31
+
32
+ /**
33
+ * Returns a rendered output of the Type as it would be used in a DocBlock.
34
+ */
35
+ public function __toString (): string
36
+ {
37
+ return 'closed-resource ' ;
38
+ }
39
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ /**
6
+ * This file is part of phpDocumentor.
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ *
11
+ * @link http://phpdoc.org
12
+ */
13
+
14
+ namespace phpDocumentor \Reflection \PseudoTypes ;
15
+
16
+ use phpDocumentor \Reflection \Type ;
17
+ use phpDocumentor \Reflection \PseudoType ;
18
+ use phpDocumentor \Reflection \Types \Resource_ ;
19
+
20
+ /**
21
+ * Value Object representing the 'open-resource' Type.
22
+ *
23
+ * @psalm-immutable
24
+ */
25
+ final class OpenResource implements PseudoType
26
+ {
27
+ public function underlyingType (): Type
28
+ {
29
+ return new Resource_ ();
30
+ }
31
+
32
+ /**
33
+ * Returns a rendered output of the Type as it would be used in a DocBlock.
34
+ */
35
+ public function __toString (): string
36
+ {
37
+ return 'open-resource ' ;
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments