Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
del unnecessary httpClient initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
himiklab committed Nov 2, 2018
1 parent d2e4b2e commit e7a1928
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions EasyThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace himiklab\thumbnail;

use yii\base\BaseObject;
use yii\httpclient\Client as HttpClient;

/**
* EasyThumbnailImage global configuration component.
Expand All @@ -24,17 +23,13 @@ class EasyThumbnail extends BaseObject
/** @var integer $cacheExpire seconds */
public $cacheExpire = 0;

/** @var HttpClient */
/** @var \yii\httpclient\Client */
public $httpClient;

public function init()
{
EasyThumbnailImage::$cacheAlias = $this->cacheAlias;
EasyThumbnailImage::$cacheExpire = $this->cacheExpire;

EasyThumbnailImage::$httpClient = $this->httpClient;
if (EasyThumbnailImage::$httpClient === null || !(EasyThumbnailImage::$httpClient instanceof HttpClient)) {
EasyThumbnailImage::$httpClient = new HttpClient();
}
}
}

0 comments on commit e7a1928

Please sign in to comment.