Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
08582e2
Improved logging, enumerations and more
kleisauke Oct 20, 2016
593c24a
Merge pull request #15 from kleisauke/logging-enumerations
jcupitt Oct 22, 2016
ef0d885
pass PSR2, README updates
jcupitt Oct 22, 2016
a1e2e6e
remove Enum from enum names, version bump
jcupitt Oct 22, 2016
d1727aa
Override __toString() + remove enums import
kleisauke Oct 22, 2016
cc2a01d
add notes on scope to the README
jcupitt Oct 25, 2016
22d2277
add formatted docs to repro
jcupitt Oct 25, 2016
d582081
make tests run in less RAM
jcupitt Oct 25, 2016
02d3c39
better write to file exception test
jcupitt Oct 26, 2016
d91b499
add sig.php example
jcupitt Oct 26, 2016
ff4e79f
move logger
jcupitt Oct 26, 2016
95888ac
all seems to work
jcupitt Oct 26, 2016
e9bee8f
fix sig.php
jcupitt Oct 26, 2016
efd538f
fix some phpcs warnings
jcupitt Oct 26, 2016
706072b
make a separate Logger class
jcupitt Oct 27, 2016
1b44116
move debug/error logging convenience into Main
jcupitt Oct 27, 2016
d0efc5f
fix Logger image->string conversion
jcupitt Oct 27, 2016
a1ad5e3
Merge branch 'add-default-logger' of github.com:jcupitt/php-vips into…
jcupitt Oct 27, 2016
cb42841
remove @version tags
jcupitt Oct 27, 2016
eeb8483
update docs
jcupitt Oct 27, 2016
f4d4fb5
avoid AND/OR member names
jcupitt Oct 27, 2016
6e99cdd
regen docs, again
jcupitt Oct 27, 2016
44c805e
incorporate review comments
jcupitt Oct 27, 2016
e6bd0e5
Merge branch 'dev' into add-default-logger
jcupitt Oct 28, 2016
2e5cc1b
ready to merge to dev
jcupitt Oct 28, 2016
c3ac43d
rename error() and debug()
jcupitt Nov 2, 2016
d63c9da
remove :void return
jcupitt Nov 2, 2016
420b9f4
regen docs
jcupitt Nov 2, 2016
e79da93
update docs without cache files
jcupitt Nov 2, 2016
c00f6af
remove left-over debugLog() etc.
jcupitt Nov 2, 2016
2d7fb28
update docs
jcupitt Nov 2, 2016
d80e827
remove formatted docs, bump to 1.0.0
jcupitt Nov 3, 2016
e0c521b
fixes for review comments
jcupitt Nov 4, 2016
7fd21be
revise README for 1.0
jcupitt Nov 4, 2016
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass PSR2, README updates
  • Loading branch information
jcupitt committed Oct 22, 2016
commit ef0d8858af1835874f3ba9ce89e1e330233e7bed
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ $image = $image->add([[1, 2, 3], [4, 5, 6]]);

To make a 2 x 3 image from the array, then add that image to the original.

Almost all methods can take an optional final argument, an array of options.
Almost all methods can take an extra final argument: an array of options.
For example:

```
Expand All @@ -121,7 +121,7 @@ libvips properties as properties of the PHP `Vips\Image` class.
### Test and install

```
$ phpcs src
$ phpcs --standard=PSR2 src
$ php ~/vips/php/composer.phar install
$ vendor/bin/phpunit
$ vendor/bin/phpdoc
Expand Down
3 changes: 2 additions & 1 deletion examples/generate_phpdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ def generate_class(file, gtype)
file << " * The #{name} enum.\n"
file << class_header
file << " */\n"
file << "abstract class #{name} {\n"
file << "abstract class #{name}\n"
file << "{\n"

const.values.each do |value|
next if value.nick == "last"
Expand Down
3 changes: 2 additions & 1 deletion examples/vips_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
const DATE_FORMAT = "Y-m-d\TH:i:sP";

Vips\Image::setLogger(new class implements Psr\Log\LoggerInterface {
// Use the LoggerTait so that we only have to implement the generic log method.
// Use the LoggerTrait so that we only have to implement the generic
// log method.
use Psr\Log\LoggerTrait;

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Access {
abstract class Access
{
const RANDOM = 'random';
const SEQUENTIAL = 'sequential';
const SEQUENTIAL_UNBUFFERED = 'sequential-unbuffered';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Align.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Align {
abstract class Align
{
const LOW = 'low';
const CENTRE = 'centre';
const HIGH = 'high';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Angle.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Angle {
abstract class Angle
{
const D0 = 'd0';
const D90 = 'd90';
const D180 = 'd180';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Angle45.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Angle45 {
abstract class Angle45
{
const D0 = 'd0';
const D45 = 'd45';
const D90 = 'd90';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/BandFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class BandFormat {
abstract class BandFormat
{
const NOTSET = 'notset';
const UCHAR = 'uchar';
const CHAR = 'char';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Coding.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Coding {
abstract class Coding
{
const ERROR = 'error';
const NONE = 'none';
const LABQ = 'labq';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Combine.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Combine {
abstract class Combine
{
const MAX = 'max';
const SUM = 'sum';
}
3 changes: 2 additions & 1 deletion src/Enum/CombineMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class CombineMode {
abstract class CombineMode
{
const SET = 'set';
const ADD = 'add';
}
3 changes: 2 additions & 1 deletion src/Enum/DemandStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class DemandStyle {
abstract class DemandStyle
{
const ERROR = 'error';
const SMALLTILE = 'smalltile';
const FATSTRIP = 'fatstrip';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Direction.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Direction {
abstract class Direction
{
const HORIZONTAL = 'horizontal';
const VERTICAL = 'vertical';
}
3 changes: 2 additions & 1 deletion src/Enum/Extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Extend {
abstract class Extend
{
const BLACK = 'black';
const COPY = 'copy';
const REPEAT = 'repeat';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/ForeignDzContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignDzContainer {
abstract class ForeignDzContainer
{
const FS = 'fs';
const ZIP = 'zip';
}
3 changes: 2 additions & 1 deletion src/Enum/ForeignDzDepth.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignDzDepth {
abstract class ForeignDzDepth
{
const ONEPIXEL = 'onepixel';
const ONETILE = 'onetile';
const ONE = 'one';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/ForeignDzLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignDzLayout {
abstract class ForeignDzLayout
{
const DZ = 'dz';
const ZOOMIFY = 'zoomify';
const GOOGLE = 'google';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/ForeignTiffCompression.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignTiffCompression {
abstract class ForeignTiffCompression
{
const NONE = 'none';
const JPEG = 'jpeg';
const DEFLATE = 'deflate';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/ForeignTiffPredictor.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignTiffPredictor {
abstract class ForeignTiffPredictor
{
const NONE = 'none';
const HORIZONTAL = 'horizontal';
const FLOAT = 'float';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/ForeignTiffResunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignTiffResunit {
abstract class ForeignTiffResunit
{
const CM = 'cm';
const INCH = 'inch';
}
3 changes: 2 additions & 1 deletion src/Enum/ForeignWebpPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ForeignWebpPreset {
abstract class ForeignWebpPreset
{
const DEFAULT = 'default';
const PICTURE = 'picture';
const PHOTO = 'photo';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/ImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class ImageType {
abstract class ImageType
{
const ERROR = 'error';
const NONE = 'none';
const SETBUF = 'setbuf';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Intent.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Intent {
abstract class Intent
{
const PERCEPTUAL = 'perceptual';
const RELATIVE = 'relative';
const SATURATION = 'saturation';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Interpretation.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Interpretation {
abstract class Interpretation
{
const ERROR = 'error';
const MULTIBAND = 'multiband';
const B_W = 'b-w';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Kernel {
abstract class Kernel
{
const NEAREST = 'nearest';
const LINEAR = 'linear';
const CUBIC = 'cubic';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/OperationBoolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationBoolean {
abstract class OperationBoolean
{
const AND = 'and';
const OR = 'or';
const EOR = 'eor';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/OperationComplex.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationComplex {
abstract class OperationComplex
{
const POLAR = 'polar';
const RECT = 'rect';
const CONJ = 'conj';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/OperationComplex2.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationComplex2 {
abstract class OperationComplex2
{
const CROSS_PHASE = 'cross-phase';
}
3 changes: 2 additions & 1 deletion src/Enum/OperationComplexget.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationComplexget {
abstract class OperationComplexget
{
const REAL = 'real';
const IMAG = 'imag';
}
3 changes: 2 additions & 1 deletion src/Enum/OperationMath.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationMath {
abstract class OperationMath
{
const SIN = 'sin';
const COS = 'cos';
const TAN = 'tan';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/OperationMath2.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationMath2 {
abstract class OperationMath2
{
const POW = 'pow';
const WOP = 'wop';
}
3 changes: 2 additions & 1 deletion src/Enum/OperationMorphology.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationMorphology {
abstract class OperationMorphology
{
const ERODE = 'erode';
const DILATE = 'dilate';
}
3 changes: 2 additions & 1 deletion src/Enum/OperationRelational.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationRelational {
abstract class OperationRelational
{
const EQUAL = 'equal';
const NOTEQ = 'noteq';
const LESS = 'less';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/OperationRound.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class OperationRound {
abstract class OperationRound
{
const RINT = 'rint';
const CEIL = 'ceil';
const FLOOR = 'floor';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/PCS.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class PCS {
abstract class PCS
{
const LAB = 'lab';
const XYZ = 'xyz';
}
3 changes: 2 additions & 1 deletion src/Enum/Precision.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Precision {
abstract class Precision
{
const INTEGER = 'integer';
const FLOAT = 'float';
const APPROXIMATE = 'approximate';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Saveable.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Saveable {
abstract class Saveable
{
const MONO = 'mono';
const RGB = 'rgb';
const RGBA = 'rgba';
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* @version Release:0.1.2
* @link https://github.com/jcupitt/php-vips
*/
abstract class Token {
abstract class Token
{
const LEFT = 'left';
const RIGHT = 'right';
const STRING = 'string';
Expand Down