Applied fixes from StyleCI

This commit is contained in:
Sujit Prasad
2016-02-19 02:20:12 -05:00
committed by StyleCI Bot
parent be5df5334f
commit d637c2b23f
439 changed files with 19063 additions and 19210 deletions

View File

@@ -1,51 +1,31 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
include_once WideImage::path().'/vendor/de77/BMP.php';
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper support for BMP.
*/
class WideImage_Mapper_BMP
{
public function load($uri)
{
return WideImage_vendor_de77_BMP::imagecreatefrombmp($uri);
}
* @package Internal/Mappers
**/
include_once WideImage::path() . '/vendor/de77/BMP.php';
/**
* Mapper support for BMP
*
* @package Internal/Mappers
*/
class WideImage_Mapper_BMP
{
function load($uri)
{
return WideImage_vendor_de77_BMP::imagecreatefrombmp($uri);
}
function loadFromString($data)
{
return WideImage_vendor_de77_BMP::imagecreatefromstring($data);
}
function save($handle, $uri = null)
{
if ($uri == null)
return WideImage_vendor_de77_BMP::imagebmp($handle);
else
return WideImage_vendor_de77_BMP::imagebmp($handle, $uri);
}
}
public function loadFromString($data)
{
return WideImage_vendor_de77_BMP::imagecreatefromstring($data);
}
public function save($handle, $uri = null)
{
if ($uri == null) {
return WideImage_vendor_de77_BMP::imagebmp($handle);
} else {
return WideImage_vendor_de77_BMP::imagebmp($handle, $uri);
}
}
}

View File

@@ -1,44 +1,25 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper class for GD files.
*/
class WideImage_Mapper_GD
{
public function load($uri)
{
return @imagecreatefromgd($uri);
}
* @package Internal/Mappers
**/
/**
* Mapper class for GD files
*
* @package Internal/Mappers
*/
class WideImage_Mapper_GD
{
function load($uri)
{
return @imagecreatefromgd($uri);
}
function save($handle, $uri = null)
{
if ($uri == null)
return imagegd($handle);
else
return imagegd($handle, $uri);
}
}
public function save($handle, $uri = null)
{
if ($uri == null) {
return imagegd($handle);
} else {
return imagegd($handle, $uri);
}
}
}

View File

@@ -1,41 +1,21 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper class for GD2 files.
*/
class WideImage_Mapper_GD2
{
public function load($uri)
{
return @imagecreatefromgd2($uri);
}
* @package Internal/Mappers
**/
/**
* Mapper class for GD2 files
*
* @package Internal/Mappers
*/
class WideImage_Mapper_GD2
{
function load($uri)
{
return @imagecreatefromgd2($uri);
}
function save($handle, $uri = null, $chunk_size = null, $type = null)
{
return imagegd2($handle, $uri, $chunk_size, $type);
}
}
public function save($handle, $uri = null, $chunk_size = null, $type = null)
{
return imagegd2($handle, $uri, $chunk_size, $type);
}
}

View File

@@ -1,50 +1,31 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper class for GIF files.
*/
class WideImage_Mapper_GIF
{
public function load($uri)
{
return @imagecreatefromgif($uri);
}
* @package Internal/Mappers
**/
/**
* Mapper class for GIF files
*
* @package Internal/Mappers
*/
class WideImage_Mapper_GIF
{
function load($uri)
{
return @imagecreatefromgif($uri);
}
function save($handle, $uri = null)
{
// This is a workaround for a bug, for which PHP devs claim it's not
// really a bug. Well, it IS.
// You can't pass null as the second parameter, because php is
// then trying to save an image to a '' location (which results in an
// error, of course). And the same thing works fine for imagepng() and
// imagejpeg(). It's a bug! ;)
if ($uri)
return imagegif($handle, $uri);
else
return imagegif($handle);
}
}
public function save($handle, $uri = null)
{
// This is a workaround for a bug, for which PHP devs claim it's not
// really a bug. Well, it IS.
// You can't pass null as the second parameter, because php is
// then trying to save an image to a '' location (which results in an
// error, of course). And the same thing works fine for imagepng() and
// imagejpeg(). It's a bug! ;)
if ($uri) {
return imagegif($handle, $uri);
} else {
return imagegif($handle);
}
}
}

View File

@@ -1,41 +1,21 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper class for JPEG files.
*/
class WideImage_Mapper_JPEG
{
public function load($uri)
{
return @imagecreatefromjpeg($uri);
}
* @package Internal/Mappers
**/
/**
* Mapper class for JPEG files
*
* @package Internal/Mappers
*/
class WideImage_Mapper_JPEG
{
function load($uri)
{
return @imagecreatefromjpeg($uri);
}
function save($handle, $uri = null, $quality = 100)
{
return imagejpeg($handle, $uri, $quality);
}
}
public function save($handle, $uri = null, $quality = 100)
{
return imagejpeg($handle, $uri, $quality);
}
}

View File

@@ -1,41 +1,21 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper class for PNG files.
*/
class WideImage_Mapper_PNG
{
public function load($uri)
{
return @imagecreatefrompng($uri);
}
* @package Internal/Mappers
**/
/**
* Mapper class for PNG files
*
* @package Internal/Mappers
*/
class WideImage_Mapper_PNG
{
function load($uri)
{
return @imagecreatefrompng($uri);
}
function save($handle, $uri = null, $compression = 9, $filters = PNG_ALL_FILTERS)
{
return imagepng($handle, $uri, $compression, $filters);
}
}
public function save($handle, $uri = null, $compression = 9, $filters = PNG_ALL_FILTERS)
{
return imagepng($handle, $uri, $compression, $filters);
}
}

View File

@@ -1,48 +1,27 @@
<?php
/**
* @author Gasper Kozak
* @copyright 2007-2011
/**
* @author Gasper Kozak
* @copyright 2007-2011
**/
include_once WideImage::path().'/vendor/de77/TGA.php';
This file is part of WideImage.
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* Mapper support for TGA.
*/
class WideImage_Mapper_TGA
{
public function load($uri)
{
return WideImage_vendor_de77_TGA::imagecreatefromtga($uri);
}
* @package Internal/Mappers
**/
include_once WideImage::path() . '/vendor/de77/TGA.php';
/**
* Mapper support for TGA
*
* @package Internal/Mappers
*/
class WideImage_Mapper_TGA
{
function load($uri)
{
return WideImage_vendor_de77_TGA::imagecreatefromtga($uri);
}
function loadFromString($data)
{
return WideImage_vendor_de77_TGA::imagecreatefromstring($data);
}
function save($handle, $uri = null)
{
throw new WideImage_Exception("Saving to TGA isn't supported.");
}
}
public function loadFromString($data)
{
return WideImage_vendor_de77_TGA::imagecreatefromstring($data);
}
public function save($handle, $uri = null)
{
throw new WideImage_Exception("Saving to TGA isn't supported.");
}
}