Skip to content

Commit

Permalink
typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
bmichotte committed Apr 30, 2019
1 parent 7548959 commit 4fcd19c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function drawPaths(int $max, array $positions, Point $from, Point $to, array $sh
{
// open background
$image = imagecreatetruecolor($max, $max);
if (! $image) {
if ($image === false) {
throw new Exception('Can not create image');
}
$color = imagecolorallocate($image, 255, 255, 255);
Expand Down
2 changes: 1 addition & 1 deletion src/Point.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Point
public $points;
public $ref;

public function __construct($x, $y)
public function __construct(int $x, int $y)
{
$this->x = $x;
$this->y = $y;
Expand Down

0 comments on commit 4fcd19c

Please sign in to comment.