Skip to content

Commit 29bd7e9

Browse files
authored
Merge pull request #9 from joanhey/typehint
Typehint FFI and remove extra docs
2 parents b42241c + ae5e7db commit 29bd7e9

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

src/WebView.php

+3-38
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class WebView
1212
{
13-
private $ffi;
13+
private FFI $ffi;
1414

1515
private $webview;
1616

@@ -40,96 +40,62 @@ public function __construct(
4040
$this->webview = $this->ffi->webview_create((int)$this->debug, null);
4141
}
4242

43-
/**
44-
* @return FFI
45-
*/
4643
public function getFFI(): FFI
4744
{
4845
return $this->ffi;
4946
}
5047

51-
/**
52-
* @return mixed
53-
*/
54-
public function getWebview()
48+
public function getWebview(): mixed
5549
{
5650
return $this->webview;
5751
}
5852

59-
60-
/**
61-
* @return string
62-
*/
6353
public function getTitle(): string
6454
{
6555
return $this->title;
6656
}
6757

68-
/**
69-
* @param string $title
70-
*/
7158
public function setTitle(string $title): self
7259
{
7360
$this->title = $title;
7461

7562
return $this;
7663
}
7764

78-
/**
79-
* @return int
80-
*/
8165
public function getWidth(): int
8266
{
8367
return $this->width;
8468
}
8569

86-
/**
87-
* @param int $width
88-
*/
8970
public function setWidth(int $width): self
9071
{
9172
$this->width = $width;
9273

9374
return $this;
9475
}
9576

96-
/**
97-
* @return int
98-
*/
9977
public function getHeight(): int
10078
{
10179
return $this->height;
10280
}
10381

104-
/**
105-
* @param int $height
106-
*/
10782
public function setHeight(int $height): void
10883
{
10984
$this->height = $height;
11085
}
11186

112-
/**
113-
* @return WindowSizeHint
114-
*/
11587
public function getHint(): WindowSizeHint
11688
{
11789
return $this->hint;
11890
}
11991

120-
/**
121-
* @param WindowSizeHint $hint
122-
*/
12392
public function setHint(WindowSizeHint $hint): self
12493
{
12594
$this->hint = $hint;
12695

12796
return $this;
12897
}
12998

130-
/**
131-
* @return bool
132-
*/
13399
public function isDebug(): bool
134100
{
135101
return $this->debug;
@@ -214,7 +180,6 @@ public function terminate(): self
214180
}
215181

216182
/**
217-
* @return string
218183
* @throws OsException
219184
*/
220185
private function getDefaultLibraryFile(): string
@@ -233,4 +198,4 @@ private function getDefaultLibraryFile(): string
233198

234199
return $this->libraryFile;
235200
}
236-
}
201+
}

0 commit comments

Comments
 (0)