We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38712dd commit ae9d277Copy full SHA for ae9d277
src/PhpDoc/BcMathNumberStubFilesExtension.php
@@ -0,0 +1,25 @@
1
+<?php declare(strict_types = 1);
2
+
3
+namespace PHPStan\PhpDoc;
4
5
+use PHPStan\DependencyInjection\AutowiredService;
6
+use PHPStan\Php\PhpVersion;
7
8
+#[AutowiredService]
9
+final class BcMathNumberStubFilesExtension implements StubFilesExtension
10
+{
11
12
+ public function __construct(private PhpVersion $phpVersion)
13
+ {
14
+ }
15
16
+ public function getFiles(): array
17
18
+ if (!$this->phpVersion->supportsBcMathNumberOperatorOverloading()) {
19
+ return [];
20
21
22
+ return [__DIR__ . '/../../stubs/bcmath.stub'];
23
24
25
+}
stubs/bcmath.stub
@@ -0,0 +1,8 @@
+<?php
+namespace BcMath;
+class Number {
+ /** @var numeric-string */
+ public readonly string $value;
0 commit comments