mirror of
https://github.com/Intervention/image.git
synced 2025-08-13 09:24:05 +02:00
fixed coding standards
This commit is contained in:
@@ -12,8 +12,8 @@ class Driver extends \Intervention\Image\AbstractDriver
|
||||
* @param Intervention\Image\Gd\Source $source
|
||||
* @param Intervention\Image\Gd\Encoder $encoder
|
||||
*/
|
||||
public function __construct(Source $source = null, Encoder $encoder = null)
|
||||
{
|
||||
public function __construct(Source $source = null, Encoder $encoder = null)
|
||||
{
|
||||
if ( ! $this->coreAvailable()) {
|
||||
throw new \Intervention\Image\Exception\NotSupportedException(
|
||||
"GD Library extension not available with this PHP installation."
|
||||
@@ -21,8 +21,8 @@ class Driver extends \Intervention\Image\AbstractDriver
|
||||
}
|
||||
|
||||
$this->source = $source ? $source : new Source;
|
||||
$this->encoder = $encoder ? $encoder : new Encoder;
|
||||
}
|
||||
$this->encoder = $encoder ? $encoder : new Encoder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new image instance
|
||||
|
@@ -18,7 +18,7 @@ class CircleShape extends EllipseShape
|
||||
*
|
||||
* @param integer $radius
|
||||
*/
|
||||
function __construct($radius = null)
|
||||
public function __construct($radius = null)
|
||||
{
|
||||
$this->width = is_numeric($radius) ? intval($radius) : $this->radius;
|
||||
$this->height = is_numeric($radius) ? intval($radius) : $this->radius;
|
||||
|
@@ -27,7 +27,7 @@ class EllipseShape extends \Intervention\Image\AbstractShape
|
||||
* @param integer $width
|
||||
* @param integer $height
|
||||
*/
|
||||
function __construct($width = null, $height = null)
|
||||
public function __construct($width = null, $height = null)
|
||||
{
|
||||
$this->width = is_numeric($width) ? intval($width) : $this->width;
|
||||
$this->height = is_numeric($height) ? intval($height) : $this->height;
|
||||
|
@@ -41,7 +41,7 @@ class LineShape extends \Intervention\Image\AbstractShape
|
||||
* @param integer $x
|
||||
* @param integer $y
|
||||
*/
|
||||
function __construct($x = null, $y = null)
|
||||
public function __construct($x = null, $y = null)
|
||||
{
|
||||
$this->x = is_numeric($x) ? intval($x) : $this->x;
|
||||
$this->y = is_numeric($y) ? intval($y) : $this->y;
|
||||
|
@@ -43,7 +43,7 @@ class RectangleShape extends \Intervention\Image\AbstractShape
|
||||
* @param integer $x2
|
||||
* @param integer $y2
|
||||
*/
|
||||
function __construct($x1 = null, $y1 = null, $x2 = null, $y2 = null)
|
||||
public function __construct($x1 = null, $y1 = null, $x2 = null, $y2 = null)
|
||||
{
|
||||
$this->x1 = is_numeric($x1) ? intval($x1) : $this->x1;
|
||||
$this->y1 = is_numeric($y1) ? intval($y1) : $this->y1;
|
||||
|
@@ -3,39 +3,39 @@
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ImageServiceProvider extends ServiceProvider {
|
||||
class ImageServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Indicates if loading of the provider is deferred.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $defer = false;
|
||||
|
||||
/**
|
||||
* Indicates if loading of the provider is deferred.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $defer = false;
|
||||
/**
|
||||
* Bootstrap the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->package('intervention/image');
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->package('intervention/image');
|
||||
}
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$app = $this->app;
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$app = $this->app;
|
||||
$app['image'] = $app->share(function ($app) {
|
||||
return new ImageManager($app['config']);
|
||||
});
|
||||
|
||||
$app['image'] = $app->share(function ($app) {
|
||||
return new ImageManager($app['config']);
|
||||
});
|
||||
|
||||
// try to create imagecache route only if imagecache is present
|
||||
// try to create imagecache route only if imagecache is present
|
||||
if (class_exists('Intervention\Image\ImageCache')) {
|
||||
|
||||
// load imagecache config
|
||||
@@ -95,16 +95,16 @@ class ImageServiceProvider extends ServiceProvider {
|
||||
}))->where(array('template' => join('|', array_keys($config->get('imagecache::templates'))), 'filename' => '^[\/\w.-]+$'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return array('image');
|
||||
}
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return array('image');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -12,8 +12,8 @@ class Driver extends \Intervention\Image\AbstractDriver
|
||||
* @param Intervention\Image\Imagick\Source $source
|
||||
* @param Intervention\Image\Imagick\Encoder $encoder
|
||||
*/
|
||||
public function __construct(Source $source = null, Encoder $encoder = null)
|
||||
{
|
||||
public function __construct(Source $source = null, Encoder $encoder = null)
|
||||
{
|
||||
if ( ! $this->coreAvailable()) {
|
||||
throw new \Intervention\Image\Exception\NotSupportedException(
|
||||
"ImageMagick module not available with this PHP installation."
|
||||
@@ -21,8 +21,8 @@ class Driver extends \Intervention\Image\AbstractDriver
|
||||
}
|
||||
|
||||
$this->source = $source ? $source : new Source;
|
||||
$this->encoder = $encoder ? $encoder : new Encoder;
|
||||
}
|
||||
$this->encoder = $encoder ? $encoder : new Encoder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new image instance
|
||||
|
@@ -18,7 +18,7 @@ class CircleShape extends EllipseShape
|
||||
*
|
||||
* @param integer $radius
|
||||
*/
|
||||
function __construct($radius = null)
|
||||
public function __construct($radius = null)
|
||||
{
|
||||
$this->width = is_numeric($radius) ? intval($radius) : $this->radius;
|
||||
$this->height = is_numeric($radius) ? intval($radius) : $this->radius;
|
||||
|
@@ -27,7 +27,7 @@ class EllipseShape extends \Intervention\Image\AbstractShape
|
||||
* @param integer $width
|
||||
* @param integer $height
|
||||
*/
|
||||
function __construct($width = null, $height = null)
|
||||
public function __construct($width = null, $height = null)
|
||||
{
|
||||
$this->width = is_numeric($width) ? intval($width) : $this->width;
|
||||
$this->height = is_numeric($height) ? intval($height) : $this->height;
|
||||
|
@@ -41,7 +41,7 @@ class LineShape extends \Intervention\Image\AbstractShape
|
||||
* @param integer $x
|
||||
* @param integer $y
|
||||
*/
|
||||
function __construct($x = null, $y = null)
|
||||
public function __construct($x = null, $y = null)
|
||||
{
|
||||
$this->x = is_numeric($x) ? intval($x) : $this->x;
|
||||
$this->y = is_numeric($y) ? intval($y) : $this->y;
|
||||
|
@@ -43,7 +43,7 @@ class RectangleShape extends \Intervention\Image\AbstractShape
|
||||
* @param integer $x2
|
||||
* @param integer $y2
|
||||
*/
|
||||
function __construct($x1 = null, $y1 = null, $x2 = null, $y2 = null)
|
||||
public function __construct($x1 = null, $y1 = null, $x2 = null, $y2 = null)
|
||||
{
|
||||
$this->x1 = is_numeric($x1) ? intval($x1) : $this->x1;
|
||||
$this->y1 = is_numeric($y1) ? intval($y1) : $this->y1;
|
||||
|
Reference in New Issue
Block a user