Skip to content

Commit ef0d885

Browse files
committed
pass PSR2, README updates
1 parent 593c24a commit ef0d885

38 files changed

+76
-39
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $image = $image->add([[1, 2, 3], [4, 5, 6]]);
9494

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

97-
Almost all methods can take an optional final argument, an array of options.
97+
Almost all methods can take an extra final argument: an array of options.
9898
For example:
9999

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

123123
```
124-
$ phpcs src
124+
$ phpcs --standard=PSR2 src
125125
$ php ~/vips/php/composer.phar install
126126
$ vendor/bin/phpunit
127127
$ vendor/bin/phpdoc

examples/generate_phpdoc.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ def generate_class(file, gtype)
309309
file << " * The #{name} enum.\n"
310310
file << class_header
311311
file << " */\n"
312-
file << "abstract class #{name} {\n"
312+
file << "abstract class #{name}\n"
313+
file << "{\n"
313314

314315
const.values.each do |value|
315316
next if value.nick == "last"

examples/vips_class.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
const DATE_FORMAT = "Y-m-d\TH:i:sP";
1010

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

1516
/**

src/Enum/Access.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Access {
52+
abstract class Access
53+
{
5354
const RANDOM = 'random';
5455
const SEQUENTIAL = 'sequential';
5556
const SEQUENTIAL_UNBUFFERED = 'sequential-unbuffered';

src/Enum/Align.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Align {
52+
abstract class Align
53+
{
5354
const LOW = 'low';
5455
const CENTRE = 'centre';
5556
const HIGH = 'high';

src/Enum/Angle.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Angle {
52+
abstract class Angle
53+
{
5354
const D0 = 'd0';
5455
const D90 = 'd90';
5556
const D180 = 'd180';

src/Enum/Angle45.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Angle45 {
52+
abstract class Angle45
53+
{
5354
const D0 = 'd0';
5455
const D45 = 'd45';
5556
const D90 = 'd90';

src/Enum/BandFormat.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class BandFormat {
52+
abstract class BandFormat
53+
{
5354
const NOTSET = 'notset';
5455
const UCHAR = 'uchar';
5556
const CHAR = 'char';

src/Enum/Coding.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Coding {
52+
abstract class Coding
53+
{
5354
const ERROR = 'error';
5455
const NONE = 'none';
5556
const LABQ = 'labq';

src/Enum/Combine.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Combine {
52+
abstract class Combine
53+
{
5354
const MAX = 'max';
5455
const SUM = 'sum';
5556
}

src/Enum/CombineMode.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class CombineMode {
52+
abstract class CombineMode
53+
{
5354
const SET = 'set';
5455
const ADD = 'add';
5556
}

src/Enum/DemandStyle.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class DemandStyle {
52+
abstract class DemandStyle
53+
{
5354
const ERROR = 'error';
5455
const SMALLTILE = 'smalltile';
5556
const FATSTRIP = 'fatstrip';

src/Enum/Direction.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Direction {
52+
abstract class Direction
53+
{
5354
const HORIZONTAL = 'horizontal';
5455
const VERTICAL = 'vertical';
5556
}

src/Enum/Extend.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Extend {
52+
abstract class Extend
53+
{
5354
const BLACK = 'black';
5455
const COPY = 'copy';
5556
const REPEAT = 'repeat';

src/Enum/ForeignDzContainer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignDzContainer {
52+
abstract class ForeignDzContainer
53+
{
5354
const FS = 'fs';
5455
const ZIP = 'zip';
5556
}

src/Enum/ForeignDzDepth.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignDzDepth {
52+
abstract class ForeignDzDepth
53+
{
5354
const ONEPIXEL = 'onepixel';
5455
const ONETILE = 'onetile';
5556
const ONE = 'one';

src/Enum/ForeignDzLayout.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignDzLayout {
52+
abstract class ForeignDzLayout
53+
{
5354
const DZ = 'dz';
5455
const ZOOMIFY = 'zoomify';
5556
const GOOGLE = 'google';

src/Enum/ForeignTiffCompression.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignTiffCompression {
52+
abstract class ForeignTiffCompression
53+
{
5354
const NONE = 'none';
5455
const JPEG = 'jpeg';
5556
const DEFLATE = 'deflate';

src/Enum/ForeignTiffPredictor.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignTiffPredictor {
52+
abstract class ForeignTiffPredictor
53+
{
5354
const NONE = 'none';
5455
const HORIZONTAL = 'horizontal';
5556
const FLOAT = 'float';

src/Enum/ForeignTiffResunit.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignTiffResunit {
52+
abstract class ForeignTiffResunit
53+
{
5354
const CM = 'cm';
5455
const INCH = 'inch';
5556
}

src/Enum/ForeignWebpPreset.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ForeignWebpPreset {
52+
abstract class ForeignWebpPreset
53+
{
5354
const DEFAULT = 'default';
5455
const PICTURE = 'picture';
5556
const PHOTO = 'photo';

src/Enum/ImageType.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class ImageType {
52+
abstract class ImageType
53+
{
5354
const ERROR = 'error';
5455
const NONE = 'none';
5556
const SETBUF = 'setbuf';

src/Enum/Intent.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Intent {
52+
abstract class Intent
53+
{
5354
const PERCEPTUAL = 'perceptual';
5455
const RELATIVE = 'relative';
5556
const SATURATION = 'saturation';

src/Enum/Interpretation.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Interpretation {
52+
abstract class Interpretation
53+
{
5354
const ERROR = 'error';
5455
const MULTIBAND = 'multiband';
5556
const B_W = 'b-w';

src/Enum/Kernel.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Kernel {
52+
abstract class Kernel
53+
{
5354
const NEAREST = 'nearest';
5455
const LINEAR = 'linear';
5556
const CUBIC = 'cubic';

src/Enum/OperationBoolean.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationBoolean {
52+
abstract class OperationBoolean
53+
{
5354
const AND = 'and';
5455
const OR = 'or';
5556
const EOR = 'eor';

src/Enum/OperationComplex.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationComplex {
52+
abstract class OperationComplex
53+
{
5354
const POLAR = 'polar';
5455
const RECT = 'rect';
5556
const CONJ = 'conj';

src/Enum/OperationComplex2.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationComplex2 {
52+
abstract class OperationComplex2
53+
{
5354
const CROSS_PHASE = 'cross-phase';
5455
}

src/Enum/OperationComplexget.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationComplexget {
52+
abstract class OperationComplexget
53+
{
5354
const REAL = 'real';
5455
const IMAG = 'imag';
5556
}

src/Enum/OperationMath.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationMath {
52+
abstract class OperationMath
53+
{
5354
const SIN = 'sin';
5455
const COS = 'cos';
5556
const TAN = 'tan';

src/Enum/OperationMath2.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationMath2 {
52+
abstract class OperationMath2
53+
{
5354
const POW = 'pow';
5455
const WOP = 'wop';
5556
}

src/Enum/OperationMorphology.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationMorphology {
52+
abstract class OperationMorphology
53+
{
5354
const ERODE = 'erode';
5455
const DILATE = 'dilate';
5556
}

src/Enum/OperationRelational.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationRelational {
52+
abstract class OperationRelational
53+
{
5354
const EQUAL = 'equal';
5455
const NOTEQ = 'noteq';
5556
const LESS = 'less';

src/Enum/OperationRound.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class OperationRound {
52+
abstract class OperationRound
53+
{
5354
const RINT = 'rint';
5455
const CEIL = 'ceil';
5556
const FLOOR = 'floor';

src/Enum/PCS.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class PCS {
52+
abstract class PCS
53+
{
5354
const LAB = 'lab';
5455
const XYZ = 'xyz';
5556
}

src/Enum/Precision.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Precision {
52+
abstract class Precision
53+
{
5354
const INTEGER = 'integer';
5455
const FLOAT = 'float';
5556
const APPROXIMATE = 'approximate';

src/Enum/Saveable.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Saveable {
52+
abstract class Saveable
53+
{
5354
const MONO = 'mono';
5455
const RGB = 'rgb';
5556
const RGBA = 'rgba';

src/Enum/Token.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
* @version Release:0.1.2
5050
* @link https://github.com/jcupitt/php-vips
5151
*/
52-
abstract class Token {
52+
abstract class Token
53+
{
5354
const LEFT = 'left';
5455
const RIGHT = 'right';
5556
const STRING = 'string';

0 commit comments

Comments
 (0)