Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
maztch committed Jun 21, 2019
2 parents 9309b16 + 04b6c43 commit 0996760
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion init.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require_once __DIR__ . '/src/Request/Response.php';
require_once __DIR__ . '/src/Request/Request.php';
require_once __DIR__ . '/src/Request/Body.php';

require_once __DIR__ . '/src/Element.php';
//Exceptions
require_once __DIR__ . '/src/Exceptions/ExtendedException.php';
require_once __DIR__ . '/src/Exceptions/DownloadException.php';
Expand Down
34 changes: 31 additions & 3 deletions src/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ class Element
*/
public $font_style = 'Regular';

/**
* @var string
*/
public $font_weight = null;

/**
* @var string
*/
Expand Down Expand Up @@ -141,7 +146,11 @@ class Element
public $layer;


/**
* @var bool
*/
public $bold = false;

/**
* string
* @var
Expand Down Expand Up @@ -224,6 +233,15 @@ public function setFontStyle($font_style)
return $this;
}

/**
* @param string $font_weight
*/
public function setFontWeight($font_weight)
{
$this->font_weight = $font_weight;
return $this;
}

/**
* @param int $font_size
*/
Expand Down Expand Up @@ -295,7 +313,7 @@ public function setVerticalPositionAdjustment($vertical_position_adjustment)
/**
* @param int $horizontal_position_adjustment
*/
public function setHorizontalAdjustmentPercent($horizontal_adjustment_percent)
public function setHorizontalAdjustmentPercent($horizontal_adjustment_percent): Element
{
$this->horizontal_adjustment_percent = $horizontal_adjustment_percent;
return $this;
Expand All @@ -305,7 +323,7 @@ public function setHorizontalAdjustmentPercent($horizontal_adjustment_percent)
* @param $gravity
* @return $this
*/
public function setGravity($gravity)
public function setGravity($gravity): Element
{
$this->checkValues($gravity, $this->gravityValues);

Expand All @@ -317,7 +335,7 @@ public function setGravity($gravity)
* @param int $width_percent
* @return $this
*/
public function setWidthPercent(int $width_percent)
public function setWidthPercent(int $width_percent): Element
{
$this->width_percent = $width_percent;
return $this;
Expand All @@ -336,4 +354,14 @@ public function checkValues($value, $allowedValues)
}
}

/**
* @param bool $mosaic
* @return Element
*/
public function setMosaic(bool $mosaic): Element
{
$this->mosaic = $mosaic;
return $this;
}

}
2 changes: 1 addition & 1 deletion tests/Iloveimg/FileTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\iloveimg;
namespace Tests\Iloveimg;

use Iloveimg\File;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Iloveimg/IloveTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\iloveimg;
namespace Tests\Iloveimg;

use Iloveimg\CompressTask;
use Iloveimg\Iloveimg;
Expand Down
3 changes: 2 additions & 1 deletion tests/Iloveimg/IloveimgTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\iloveimg;
namespace Tests\Iloveimg;

use Iloveimg\Iloveimg;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -60,6 +60,7 @@ public function testCanGetJwt()

/**
* @test
* @expectedException \Exception
*/
public function testEmptyTaskShouldThrowException()
{
Expand Down
1 change: 0 additions & 1 deletion tests/bootstrap.no_autoload.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php

require_once __DIR__ . '/../init.php';
require_once __DIR__ . '/TestCase.php';

0 comments on commit 0996760

Please sign in to comment.