mirror of
https://github.com/Intervention/image.git
synced 2025-08-26 15:24:37 +02:00
Make AbstractFont a fluent interface by return $this from setter methods
This commit is contained in:
@@ -82,6 +82,8 @@ abstract class AbstractFont
|
|||||||
public function text($text)
|
public function text($text)
|
||||||
{
|
{
|
||||||
$this->text = $text;
|
$this->text = $text;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,6 +105,8 @@ abstract class AbstractFont
|
|||||||
public function size($size)
|
public function size($size)
|
||||||
{
|
{
|
||||||
$this->size = $size;
|
$this->size = $size;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -124,6 +128,8 @@ abstract class AbstractFont
|
|||||||
public function color($color)
|
public function color($color)
|
||||||
{
|
{
|
||||||
$this->color = $color;
|
$this->color = $color;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,6 +151,8 @@ abstract class AbstractFont
|
|||||||
public function angle($angle)
|
public function angle($angle)
|
||||||
{
|
{
|
||||||
$this->angle = $angle;
|
$this->angle = $angle;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,6 +174,8 @@ abstract class AbstractFont
|
|||||||
public function align($align)
|
public function align($align)
|
||||||
{
|
{
|
||||||
$this->align = $align;
|
$this->align = $align;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,6 +197,8 @@ abstract class AbstractFont
|
|||||||
public function valign($valign)
|
public function valign($valign)
|
||||||
{
|
{
|
||||||
$this->valign = $valign;
|
$this->valign = $valign;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -208,6 +220,8 @@ abstract class AbstractFont
|
|||||||
public function file($file)
|
public function file($file)
|
||||||
{
|
{
|
||||||
$this->file = $file;
|
$this->file = $file;
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user