devnix /
chipmunkphp
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Chipmunk; |
||||
| 6 | |||||
| 7 | /** |
||||
| 8 | * Allocate and initialize a segment shape. |
||||
| 9 | */ |
||||
| 10 | class Shape extends AbstractFfi |
||||
| 11 | { |
||||
| 12 | public function __construct(Body $body, Vector $a, Vector $b, float $radius) |
||||
| 13 | { |
||||
| 14 | parent::__construct(); |
||||
| 15 | |||||
| 16 | $this->setCData( |
||||
| 17 | $this->getFfi()->cpSegmentShapeNew( |
||||
|
0 ignored issues
–
show
|
|||||
| 18 | $body->getCData(), |
||||
| 19 | $a->getCData(), |
||||
| 20 | $b->getCData(), |
||||
| 21 | $radius |
||||
| 22 | ) |
||||
| 23 | ); |
||||
| 24 | } |
||||
| 25 | |||||
| 26 | public function getFriction(): float |
||||
| 27 | { |
||||
| 28 | return $this->getFfi()->cpShapeGetFriction($this->getCData()); |
||||
|
0 ignored issues
–
show
The method
cpShapeGetFriction() does not exist on FFI.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||
| 29 | } |
||||
| 30 | |||||
| 31 | public function setFriction(float $friction): self |
||||
| 32 | { |
||||
| 33 | $this->getFfi()->cpShapeSetFriction($this->getCData(), $friction); |
||||
|
0 ignored issues
–
show
The method
cpShapeSetFriction() does not exist on FFI.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||
| 34 | |||||
| 35 | return $this; |
||||
| 36 | } |
||||
| 37 | } |
||||
| 38 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.