Skip to content

Commit

Permalink
Remove unused ffi property
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Apr 11, 2020
1 parent ded8d90 commit 8623d8d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/SDL.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ final class SDL implements Enums
*/
public LibraryInformation $info;

/**
* @var \FFI|SDLNativeApiAutocomplete
*/
private \FFI $ffi;

/**
* @var Loader
*/
Expand All @@ -60,7 +55,6 @@ public function __construct()
$this->loader = $this->loader();

$this->info = $this->loadLibrary(new Library());
$this->ffi = $this->info->ffi;

self::setInstance($this);
}
Expand Down Expand Up @@ -179,7 +173,7 @@ public function type($type): CType

try {
/** @noinspection StaticInvocationViaThisInspection */
return $this->ffi->type($type);
return $this->info->ffi->type($type);
} catch (ParserException $e) {
$error = \sprintf('Structure "%s" not found. %s', $type, \ucfirst($e->getMessage()));

Expand All @@ -201,7 +195,7 @@ public static function __callStatic(string $name, array $arguments)
*/
public function __get(string $name)
{
return $this->ffi->$name;
return $this->info->ffi->$name;
}

/**
Expand All @@ -212,6 +206,6 @@ public function __get(string $name)
*/
public function __set(string $name, $value): void
{
$this->ffi->$name = $value;
$this->info->ffi->$name = $value;
}
}

0 comments on commit 8623d8d

Please sign in to comment.