diff --git a/src/FFI.php b/src/FFI.php index 194db6f..72c91a2 100644 --- a/src/FFI.php +++ b/src/FFI.php @@ -163,9 +163,9 @@ public static function version(): string */ public static function atLeast(int $x, int $y, int $z = 0): bool { - return self::$library_major > $x || - self::$library_major == $x && self::$library_minor > $y || - self::$library_major == $x && self::$library_minor == $y && self::$library_micro >= $z; + return self::$library_major > $x + || (self::$library_major === $x && self::$library_minor > $y) + || (self::$library_major === $x && self::$library_minor === $y && self::$library_micro >= $z); } /** diff --git a/src/GObject.php b/src/GObject.php index 964393a..a092e83 100644 --- a/src/GObject.php +++ b/src/GObject.php @@ -152,7 +152,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure ?CData $data ) use (&$callback): void { assert($numberOfParams === 3); - /* + /** * Signature: gint64(VipsSourceCustom* source, void* buffer, gint64 length, void* handle) */ $bufferLength = (int)FFI::gobject()->g_value_get_int64(\FFI::addr($params[2])); @@ -180,7 +180,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure ?CData $data ) use (&$callback): void { assert($numberOfParams === 3); - /* + /** * Signature: gint64(VipsSourceCustom* source, gint64 offset, int whence, void* handle) */ $offset = (int)FFI::gobject()->g_value_get_int64(\FFI::addr($params[1])); @@ -201,7 +201,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure ?CData $data ) use (&$callback): void { assert($numberOfParams === 3); - /* + /** * Signature: gint64(VipsTargetCustom* target, void* buffer, gint64 length, void* handle) */ $bufferPointer = FFI::gobject()->g_value_get_pointer(\FFI::addr($params[1])); @@ -223,7 +223,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure CData $hint, ?CData $data ) use (&$callback): void { - assert($numberOfParams === 0); + assert($numberOfParams === 1); /** * Signature: void(VipsTargetCustom* target, void* handle) */