phan: Add internal stubs for imagick, pcntl, redis & sockets
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 18 Jun 2019 19:19:37 +0000 (15:19 -0400)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 18 Jun 2019 19:27:41 +0000 (15:27 -0400)
Phan will automatically use these stubs if the extensions are not installed.

Also added a brief README for how to generate the stubs in the first place.

Bug: T224893
Change-Id: I1d31d03801fbc7b18dfc758453c95439acd96d19

.phan/config.php
.phan/internal_stubs/README [new file with mode: 0644]
.phan/internal_stubs/imagick.phan_php [new file with mode: 0644]
.phan/internal_stubs/pcntl.phan_php [new file with mode: 0644]
.phan/internal_stubs/redis.phan_php [new file with mode: 0644]
.phan/internal_stubs/sockets.phan_php [new file with mode: 0644]

index 3478977..8746ada 100644 (file)
@@ -43,8 +43,12 @@ $cfg['file_list'] = array_merge(
 );
 
 $cfg['autoload_internal_extension_signatures'] = [
+       'imagick' => '.phan/internal_stubs/imagick.phan_php',
        'memcached' => '.phan/internal_stubs/memcached.phan_php',
        'oci8' => '.phan/internal_stubs/oci8.phan_php',
+       'pcntl' => '.phan/internal_stubs/pcntl.phan_php',
+       'redis' => '.phan/internal_stubs/redis.phan_php',
+       'sockets' => '.phan/internal_stubs/sockets.phan_php',
        'sqlsrv' => '.phan/internal_stubs/sqlsrv.phan_php',
        'tideways' => '.phan/internal_stubs/tideways.phan_php',
 ];
diff --git a/.phan/internal_stubs/README b/.phan/internal_stubs/README
new file mode 100644 (file)
index 0000000..c57d596
--- /dev/null
@@ -0,0 +1,5 @@
+See <https://github.com/phan/phan/wiki/How-To-Use-Stubs#generating-stubs> for
+how to generate internal stubs for phan.
+
+The stubs should be generated using the PHP version that is our lowest
+requirement.
diff --git a/.phan/internal_stubs/imagick.phan_php b/.phan/internal_stubs/imagick.phan_php
new file mode 100644 (file)
index 0000000..c4f355b
--- /dev/null
@@ -0,0 +1,1204 @@
+<?php
+// These stubs were generated by the phan stub generator.
+// @phan-stub-for-extension imagick@3.4.3RC2
+
+namespace {
+class Imagick implements \Iterator, \Traversable, \Countable {
+
+    // constants
+    const COLOR_BLACK = 11;
+    const COLOR_BLUE = 12;
+    const COLOR_CYAN = 13;
+    const COLOR_GREEN = 14;
+    const COLOR_RED = 15;
+    const COLOR_YELLOW = 16;
+    const COLOR_MAGENTA = 17;
+    const COLOR_OPACITY = 18;
+    const COLOR_ALPHA = 19;
+    const COLOR_FUZZ = 20;
+    const IMAGICK_EXTNUM = 30403;
+    const IMAGICK_EXTVER = '3.4.3RC2';
+    const QUANTUM_RANGE = 65535;
+    const USE_ZEND_MM = 0;
+    const COMPOSITE_DEFAULT = 40;
+    const COMPOSITE_UNDEFINED = 0;
+    const COMPOSITE_NO = 1;
+    const COMPOSITE_ADD = 2;
+    const COMPOSITE_ATOP = 3;
+    const COMPOSITE_BLEND = 4;
+    const COMPOSITE_BUMPMAP = 5;
+    const COMPOSITE_CLEAR = 7;
+    const COMPOSITE_COLORBURN = 8;
+    const COMPOSITE_COLORDODGE = 9;
+    const COMPOSITE_COLORIZE = 10;
+    const COMPOSITE_COPYBLACK = 11;
+    const COMPOSITE_COPYBLUE = 12;
+    const COMPOSITE_COPY = 13;
+    const COMPOSITE_COPYCYAN = 14;
+    const COMPOSITE_COPYGREEN = 15;
+    const COMPOSITE_COPYMAGENTA = 16;
+    const COMPOSITE_COPYOPACITY = 17;
+    const COMPOSITE_COPYRED = 18;
+    const COMPOSITE_COPYYELLOW = 19;
+    const COMPOSITE_DARKEN = 20;
+    const COMPOSITE_DSTATOP = 21;
+    const COMPOSITE_DST = 22;
+    const COMPOSITE_DSTIN = 23;
+    const COMPOSITE_DSTOUT = 24;
+    const COMPOSITE_DSTOVER = 25;
+    const COMPOSITE_DIFFERENCE = 26;
+    const COMPOSITE_DISPLACE = 27;
+    const COMPOSITE_DISSOLVE = 28;
+    const COMPOSITE_EXCLUSION = 29;
+    const COMPOSITE_HARDLIGHT = 30;
+    const COMPOSITE_HUE = 31;
+    const COMPOSITE_IN = 32;
+    const COMPOSITE_LIGHTEN = 33;
+    const COMPOSITE_LUMINIZE = 35;
+    const COMPOSITE_MINUS = 36;
+    const COMPOSITE_MODULATE = 37;
+    const COMPOSITE_MULTIPLY = 38;
+    const COMPOSITE_OUT = 39;
+    const COMPOSITE_OVER = 40;
+    const COMPOSITE_OVERLAY = 41;
+    const COMPOSITE_PLUS = 42;
+    const COMPOSITE_REPLACE = 43;
+    const COMPOSITE_SATURATE = 44;
+    const COMPOSITE_SCREEN = 45;
+    const COMPOSITE_SOFTLIGHT = 46;
+    const COMPOSITE_SRCATOP = 47;
+    const COMPOSITE_SRC = 48;
+    const COMPOSITE_SRCIN = 49;
+    const COMPOSITE_SRCOUT = 50;
+    const COMPOSITE_SRCOVER = 51;
+    const COMPOSITE_SUBTRACT = 52;
+    const COMPOSITE_THRESHOLD = 53;
+    const COMPOSITE_XOR = 54;
+    const COMPOSITE_CHANGEMASK = 6;
+    const COMPOSITE_LINEARLIGHT = 34;
+    const COMPOSITE_DIVIDE = 55;
+    const COMPOSITE_DISTORT = 56;
+    const COMPOSITE_BLUR = 57;
+    const COMPOSITE_PEGTOPLIGHT = 58;
+    const COMPOSITE_VIVIDLIGHT = 59;
+    const COMPOSITE_PINLIGHT = 60;
+    const COMPOSITE_LINEARDODGE = 61;
+    const COMPOSITE_LINEARBURN = 62;
+    const COMPOSITE_MATHEMATICS = 63;
+    const COMPOSITE_MODULUSADD = 2;
+    const COMPOSITE_MODULUSSUBTRACT = 52;
+    const COMPOSITE_MINUSDST = 36;
+    const COMPOSITE_DIVIDEDST = 55;
+    const COMPOSITE_DIVIDESRC = 64;
+    const COMPOSITE_MINUSSRC = 65;
+    const COMPOSITE_DARKENINTENSITY = 66;
+    const COMPOSITE_LIGHTENINTENSITY = 67;
+    const COMPOSITE_HARDMIX = 68;
+    const MONTAGEMODE_FRAME = 1;
+    const MONTAGEMODE_UNFRAME = 2;
+    const MONTAGEMODE_CONCATENATE = 3;
+    const STYLE_NORMAL = 1;
+    const STYLE_ITALIC = 2;
+    const STYLE_OBLIQUE = 3;
+    const STYLE_ANY = 4;
+    const FILTER_UNDEFINED = 0;
+    const FILTER_POINT = 1;
+    const FILTER_BOX = 2;
+    const FILTER_TRIANGLE = 3;
+    const FILTER_HERMITE = 4;
+    const FILTER_HANNING = 5;
+    const FILTER_HAMMING = 6;
+    const FILTER_BLACKMAN = 7;
+    const FILTER_GAUSSIAN = 8;
+    const FILTER_QUADRATIC = 9;
+    const FILTER_CUBIC = 10;
+    const FILTER_CATROM = 11;
+    const FILTER_MITCHELL = 12;
+    const FILTER_LANCZOS = 22;
+    const FILTER_BESSEL = 13;
+    const FILTER_SINC = 14;
+    const FILTER_KAISER = 16;
+    const FILTER_WELSH = 17;
+    const FILTER_PARZEN = 18;
+    const FILTER_LAGRANGE = 21;
+    const FILTER_SENTINEL = 31;
+    const FILTER_BOHMAN = 19;
+    const FILTER_BARTLETT = 20;
+    const FILTER_JINC = 13;
+    const FILTER_SINCFAST = 15;
+    const FILTER_ROBIDOUX = 26;
+    const FILTER_LANCZOSSHARP = 23;
+    const FILTER_LANCZOS2 = 24;
+    const FILTER_LANCZOS2SHARP = 25;
+    const FILTER_ROBIDOUXSHARP = 27;
+    const FILTER_COSINE = 28;
+    const FILTER_SPLINE = 29;
+    const FILTER_LANCZOSRADIUS = 30;
+    const IMGTYPE_UNDEFINED = 0;
+    const IMGTYPE_BILEVEL = 1;
+    const IMGTYPE_GRAYSCALE = 2;
+    const IMGTYPE_GRAYSCALEMATTE = 3;
+    const IMGTYPE_PALETTE = 4;
+    const IMGTYPE_PALETTEMATTE = 5;
+    const IMGTYPE_TRUECOLOR = 6;
+    const IMGTYPE_TRUECOLORMATTE = 7;
+    const IMGTYPE_COLORSEPARATION = 8;
+    const IMGTYPE_COLORSEPARATIONMATTE = 9;
+    const IMGTYPE_OPTIMIZE = 10;
+    const IMGTYPE_PALETTEBILEVELMATTE = 11;
+    const RESOLUTION_UNDEFINED = 0;
+    const RESOLUTION_PIXELSPERINCH = 1;
+    const RESOLUTION_PIXELSPERCENTIMETER = 2;
+    const COMPRESSION_UNDEFINED = 0;
+    const COMPRESSION_NO = 1;
+    const COMPRESSION_BZIP = 2;
+    const COMPRESSION_FAX = 6;
+    const COMPRESSION_GROUP4 = 7;
+    const COMPRESSION_JPEG = 8;
+    const COMPRESSION_JPEG2000 = 9;
+    const COMPRESSION_LOSSLESSJPEG = 10;
+    const COMPRESSION_LZW = 11;
+    const COMPRESSION_RLE = 12;
+    const COMPRESSION_ZIP = 13;
+    const COMPRESSION_DXT1 = 3;
+    const COMPRESSION_DXT3 = 4;
+    const COMPRESSION_DXT5 = 5;
+    const COMPRESSION_ZIPS = 14;
+    const COMPRESSION_PIZ = 15;
+    const COMPRESSION_PXR24 = 16;
+    const COMPRESSION_B44 = 17;
+    const COMPRESSION_B44A = 18;
+    const COMPRESSION_LZMA = 19;
+    const COMPRESSION_JBIG1 = 20;
+    const COMPRESSION_JBIG2 = 21;
+    const PAINT_POINT = 1;
+    const PAINT_REPLACE = 2;
+    const PAINT_FLOODFILL = 3;
+    const PAINT_FILLTOBORDER = 4;
+    const PAINT_RESET = 5;
+    const GRAVITY_NORTHWEST = 1;
+    const GRAVITY_NORTH = 2;
+    const GRAVITY_NORTHEAST = 3;
+    const GRAVITY_WEST = 4;
+    const GRAVITY_CENTER = 5;
+    const GRAVITY_EAST = 6;
+    const GRAVITY_SOUTHWEST = 7;
+    const GRAVITY_SOUTH = 8;
+    const GRAVITY_SOUTHEAST = 9;
+    const GRAVITY_FORGET = 0;
+    const GRAVITY_STATIC = 10;
+    const STRETCH_NORMAL = 1;
+    const STRETCH_ULTRACONDENSED = 2;
+    const STRETCH_EXTRACONDENSED = 3;
+    const STRETCH_CONDENSED = 4;
+    const STRETCH_SEMICONDENSED = 5;
+    const STRETCH_SEMIEXPANDED = 6;
+    const STRETCH_EXPANDED = 7;
+    const STRETCH_EXTRAEXPANDED = 8;
+    const STRETCH_ULTRAEXPANDED = 9;
+    const STRETCH_ANY = 10;
+    const ALIGN_UNDEFINED = 0;
+    const ALIGN_LEFT = 1;
+    const ALIGN_CENTER = 2;
+    const ALIGN_RIGHT = 3;
+    const DECORATION_NO = 1;
+    const DECORATION_UNDERLINE = 2;
+    const DECORATION_OVERLINE = 3;
+    const DECORATION_LINETROUGH = 4;
+    const DECORATION_LINETHROUGH = 4;
+    const NOISE_UNIFORM = 1;
+    const NOISE_GAUSSIAN = 2;
+    const NOISE_MULTIPLICATIVEGAUSSIAN = 3;
+    const NOISE_IMPULSE = 4;
+    const NOISE_LAPLACIAN = 5;
+    const NOISE_POISSON = 6;
+    const NOISE_RANDOM = 7;
+    const CHANNEL_UNDEFINED = 0;
+    const CHANNEL_RED = 1;
+    const CHANNEL_GRAY = 1;
+    const CHANNEL_CYAN = 1;
+    const CHANNEL_GREEN = 2;
+    const CHANNEL_MAGENTA = 2;
+    const CHANNEL_BLUE = 4;
+    const CHANNEL_YELLOW = 4;
+    const CHANNEL_ALPHA = 8;
+    const CHANNEL_OPACITY = 8;
+    const CHANNEL_MATTE = 8;
+    const CHANNEL_BLACK = 32;
+    const CHANNEL_INDEX = 32;
+    const CHANNEL_ALL = 134217727;
+    const CHANNEL_DEFAULT = 134217719;
+    const CHANNEL_RGBA = 15;
+    const CHANNEL_TRUEALPHA = 64;
+    const CHANNEL_RGBS = 128;
+    const CHANNEL_GRAY_CHANNELS = 128;
+    const CHANNEL_SYNC = 256;
+    const CHANNEL_COMPOSITES = 47;
+    const METRIC_UNDEFINED = 0;
+    const METRIC_ABSOLUTEERRORMETRIC = 1;
+    const METRIC_MEANABSOLUTEERROR = 2;
+    const METRIC_MEANERRORPERPIXELMETRIC = 3;
+    const METRIC_MEANSQUAREERROR = 4;
+    const METRIC_PEAKABSOLUTEERROR = 5;
+    const METRIC_PEAKSIGNALTONOISERATIO = 6;
+    const METRIC_ROOTMEANSQUAREDERROR = 7;
+    const METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC = 8;
+    const METRIC_FUZZERROR = 9;
+    const METRIC_PERCEPTUALHASH_ERROR = 255;
+    const PIXEL_CHAR = 1;
+    const PIXEL_DOUBLE = 2;
+    const PIXEL_FLOAT = 3;
+    const PIXEL_INTEGER = 4;
+    const PIXEL_LONG = 5;
+    const PIXEL_QUANTUM = 6;
+    const PIXEL_SHORT = 7;
+    const EVALUATE_UNDEFINED = 0;
+    const EVALUATE_ADD = 1;
+    const EVALUATE_AND = 2;
+    const EVALUATE_DIVIDE = 3;
+    const EVALUATE_LEFTSHIFT = 4;
+    const EVALUATE_MAX = 5;
+    const EVALUATE_MIN = 6;
+    const EVALUATE_MULTIPLY = 7;
+    const EVALUATE_OR = 8;
+    const EVALUATE_RIGHTSHIFT = 9;
+    const EVALUATE_SET = 10;
+    const EVALUATE_SUBTRACT = 11;
+    const EVALUATE_XOR = 12;
+    const EVALUATE_POW = 13;
+    const EVALUATE_LOG = 14;
+    const EVALUATE_THRESHOLD = 15;
+    const EVALUATE_THRESHOLDBLACK = 16;
+    const EVALUATE_THRESHOLDWHITE = 17;
+    const EVALUATE_GAUSSIANNOISE = 18;
+    const EVALUATE_IMPULSENOISE = 19;
+    const EVALUATE_LAPLACIANNOISE = 20;
+    const EVALUATE_MULTIPLICATIVENOISE = 21;
+    const EVALUATE_POISSONNOISE = 22;
+    const EVALUATE_UNIFORMNOISE = 23;
+    const EVALUATE_COSINE = 24;
+    const EVALUATE_SINE = 25;
+    const EVALUATE_ADDMODULUS = 26;
+    const EVALUATE_MEAN = 27;
+    const EVALUATE_ABS = 28;
+    const EVALUATE_EXPONENTIAL = 29;
+    const EVALUATE_MEDIAN = 30;
+    const EVALUATE_SUM = 31;
+    const EVALUATE_ROOT_MEAN_SQUARE = 32;
+    const COLORSPACE_UNDEFINED = 0;
+    const COLORSPACE_RGB = 1;
+    const COLORSPACE_GRAY = 2;
+    const COLORSPACE_TRANSPARENT = 3;
+    const COLORSPACE_OHTA = 4;
+    const COLORSPACE_LAB = 5;
+    const COLORSPACE_XYZ = 6;
+    const COLORSPACE_YCBCR = 7;
+    const COLORSPACE_YCC = 8;
+    const COLORSPACE_YIQ = 9;
+    const COLORSPACE_YPBPR = 10;
+    const COLORSPACE_YUV = 11;
+    const COLORSPACE_CMYK = 12;
+    const COLORSPACE_SRGB = 13;
+    const COLORSPACE_HSB = 14;
+    const COLORSPACE_HSL = 15;
+    const COLORSPACE_HWB = 16;
+    const COLORSPACE_REC601LUMA = 17;
+    const COLORSPACE_REC709LUMA = 19;
+    const COLORSPACE_LOG = 21;
+    const COLORSPACE_CMY = 22;
+    const COLORSPACE_LUV = 23;
+    const COLORSPACE_HCL = 24;
+    const COLORSPACE_LCH = 25;
+    const COLORSPACE_LMS = 26;
+    const COLORSPACE_LCHAB = 27;
+    const COLORSPACE_LCHUV = 28;
+    const COLORSPACE_SCRGB = 29;
+    const COLORSPACE_HSI = 30;
+    const COLORSPACE_HSV = 31;
+    const COLORSPACE_HCLP = 32;
+    const COLORSPACE_YDBDR = 33;
+    const COLORSPACE_REC601YCBCR = 18;
+    const COLORSPACE_REC709YCBCR = 20;
+    const COLORSPACE_XYY = 34;
+    const VIRTUALPIXELMETHOD_UNDEFINED = 0;
+    const VIRTUALPIXELMETHOD_BACKGROUND = 1;
+    const VIRTUALPIXELMETHOD_CONSTANT = 2;
+    const VIRTUALPIXELMETHOD_EDGE = 4;
+    const VIRTUALPIXELMETHOD_MIRROR = 5;
+    const VIRTUALPIXELMETHOD_TILE = 7;
+    const VIRTUALPIXELMETHOD_TRANSPARENT = 8;
+    const VIRTUALPIXELMETHOD_MASK = 9;
+    const VIRTUALPIXELMETHOD_BLACK = 10;
+    const VIRTUALPIXELMETHOD_GRAY = 11;
+    const VIRTUALPIXELMETHOD_WHITE = 12;
+    const VIRTUALPIXELMETHOD_HORIZONTALTILE = 13;
+    const VIRTUALPIXELMETHOD_VERTICALTILE = 14;
+    const VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE = 15;
+    const VIRTUALPIXELMETHOD_VERTICALTILEEDGE = 16;
+    const VIRTUALPIXELMETHOD_CHECKERTILE = 17;
+    const PREVIEW_UNDEFINED = 0;
+    const PREVIEW_ROTATE = 1;
+    const PREVIEW_SHEAR = 2;
+    const PREVIEW_ROLL = 3;
+    const PREVIEW_HUE = 4;
+    const PREVIEW_SATURATION = 5;
+    const PREVIEW_BRIGHTNESS = 6;
+    const PREVIEW_GAMMA = 7;
+    const PREVIEW_SPIFF = 8;
+    const PREVIEW_DULL = 9;
+    const PREVIEW_GRAYSCALE = 10;
+    const PREVIEW_QUANTIZE = 11;
+    const PREVIEW_DESPECKLE = 12;
+    const PREVIEW_REDUCENOISE = 13;
+    const PREVIEW_ADDNOISE = 14;
+    const PREVIEW_SHARPEN = 15;
+    const PREVIEW_BLUR = 16;
+    const PREVIEW_THRESHOLD = 17;
+    const PREVIEW_EDGEDETECT = 18;
+    const PREVIEW_SPREAD = 19;
+    const PREVIEW_SOLARIZE = 20;
+    const PREVIEW_SHADE = 21;
+    const PREVIEW_RAISE = 22;
+    const PREVIEW_SEGMENT = 23;
+    const PREVIEW_SWIRL = 24;
+    const PREVIEW_IMPLODE = 25;
+    const PREVIEW_WAVE = 26;
+    const PREVIEW_OILPAINT = 27;
+    const PREVIEW_CHARCOALDRAWING = 28;
+    const PREVIEW_JPEG = 29;
+    const RENDERINGINTENT_UNDEFINED = 0;
+    const RENDERINGINTENT_SATURATION = 1;
+    const RENDERINGINTENT_PERCEPTUAL = 2;
+    const RENDERINGINTENT_ABSOLUTE = 3;
+    const RENDERINGINTENT_RELATIVE = 4;
+    const INTERLACE_UNDEFINED = 0;
+    const INTERLACE_NO = 1;
+    const INTERLACE_LINE = 2;
+    const INTERLACE_PLANE = 3;
+    const INTERLACE_PARTITION = 4;
+    const INTERLACE_GIF = 5;
+    const INTERLACE_JPEG = 6;
+    const INTERLACE_PNG = 7;
+    const FILLRULE_UNDEFINED = 0;
+    const FILLRULE_EVENODD = 1;
+    const FILLRULE_NONZERO = 2;
+    const PATHUNITS_UNDEFINED = 0;
+    const PATHUNITS_USERSPACE = 1;
+    const PATHUNITS_USERSPACEONUSE = 2;
+    const PATHUNITS_OBJECTBOUNDINGBOX = 3;
+    const LINECAP_UNDEFINED = 0;
+    const LINECAP_BUTT = 1;
+    const LINECAP_ROUND = 2;
+    const LINECAP_SQUARE = 3;
+    const LINEJOIN_UNDEFINED = 0;
+    const LINEJOIN_MITER = 1;
+    const LINEJOIN_ROUND = 2;
+    const LINEJOIN_BEVEL = 3;
+    const RESOURCETYPE_UNDEFINED = 0;
+    const RESOURCETYPE_AREA = 1;
+    const RESOURCETYPE_DISK = 2;
+    const RESOURCETYPE_FILE = 3;
+    const RESOURCETYPE_MAP = 4;
+    const RESOURCETYPE_MEMORY = 5;
+    const RESOURCETYPE_TIME = 7;
+    const RESOURCETYPE_THROTTLE = 8;
+    const RESOURCETYPE_THREAD = 6;
+    const RESOURCETYPE_WIDTH = 9;
+    const RESOURCETYPE_HEIGHT = 10;
+    const DISPOSE_UNRECOGNIZED = 0;
+    const DISPOSE_UNDEFINED = 0;
+    const DISPOSE_NONE = 1;
+    const DISPOSE_BACKGROUND = 2;
+    const DISPOSE_PREVIOUS = 3;
+    const INTERPOLATE_UNDEFINED = 0;
+    const INTERPOLATE_AVERAGE = 1;
+    const INTERPOLATE_BICUBIC = 2;
+    const INTERPOLATE_BILINEAR = 3;
+    const INTERPOLATE_FILTER = 4;
+    const INTERPOLATE_INTEGER = 5;
+    const INTERPOLATE_MESH = 6;
+    const INTERPOLATE_NEARESTNEIGHBOR = 7;
+    const INTERPOLATE_SPLINE = 8;
+    const INTERPOLATE_AVERAGE_9 = 9;
+    const INTERPOLATE_AVERAGE_16 = 10;
+    const INTERPOLATE_BLEND = 11;
+    const INTERPOLATE_BACKGROUND_COLOR = 12;
+    const INTERPOLATE_CATROM = 13;
+    const LAYERMETHOD_UNDEFINED = 0;
+    const LAYERMETHOD_COALESCE = 1;
+    const LAYERMETHOD_COMPAREANY = 2;
+    const LAYERMETHOD_COMPARECLEAR = 3;
+    const LAYERMETHOD_COMPAREOVERLAY = 4;
+    const LAYERMETHOD_DISPOSE = 5;
+    const LAYERMETHOD_OPTIMIZE = 6;
+    const LAYERMETHOD_OPTIMIZEPLUS = 8;
+    const LAYERMETHOD_OPTIMIZETRANS = 9;
+    const LAYERMETHOD_COMPOSITE = 12;
+    const LAYERMETHOD_OPTIMIZEIMAGE = 7;
+    const LAYERMETHOD_REMOVEDUPS = 10;
+    const LAYERMETHOD_REMOVEZERO = 11;
+    const LAYERMETHOD_TRIMBOUNDS = 16;
+    const ORIENTATION_UNDEFINED = 0;
+    const ORIENTATION_TOPLEFT = 1;
+    const ORIENTATION_TOPRIGHT = 2;
+    const ORIENTATION_BOTTOMRIGHT = 3;
+    const ORIENTATION_BOTTOMLEFT = 4;
+    const ORIENTATION_LEFTTOP = 5;
+    const ORIENTATION_RIGHTTOP = 6;
+    const ORIENTATION_RIGHTBOTTOM = 7;
+    const ORIENTATION_LEFTBOTTOM = 8;
+    const DISTORTION_UNDEFINED = 0;
+    const DISTORTION_AFFINE = 1;
+    const DISTORTION_AFFINEPROJECTION = 2;
+    const DISTORTION_ARC = 9;
+    const DISTORTION_BILINEAR = 6;
+    const DISTORTION_PERSPECTIVE = 4;
+    const DISTORTION_PERSPECTIVEPROJECTION = 5;
+    const DISTORTION_SCALEROTATETRANSLATE = 3;
+    const DISTORTION_POLYNOMIAL = 8;
+    const DISTORTION_POLAR = 10;
+    const DISTORTION_DEPOLAR = 11;
+    const DISTORTION_BARREL = 14;
+    const DISTORTION_SHEPARDS = 16;
+    const DISTORTION_SENTINEL = 18;
+    const DISTORTION_BARRELINVERSE = 15;
+    const DISTORTION_BILINEARFORWARD = 6;
+    const DISTORTION_BILINEARREVERSE = 7;
+    const DISTORTION_RESIZE = 17;
+    const DISTORTION_CYLINDER2PLANE = 12;
+    const DISTORTION_PLANE2CYLINDER = 13;
+    const LAYERMETHOD_MERGE = 13;
+    const LAYERMETHOD_FLATTEN = 14;
+    const LAYERMETHOD_MOSAIC = 15;
+    const ALPHACHANNEL_ACTIVATE = 1;
+    const ALPHACHANNEL_RESET = 7;
+    const ALPHACHANNEL_SET = 8;
+    const ALPHACHANNEL_UNDEFINED = 0;
+    const ALPHACHANNEL_COPY = 3;
+    const ALPHACHANNEL_DEACTIVATE = 4;
+    const ALPHACHANNEL_EXTRACT = 5;
+    const ALPHACHANNEL_OPAQUE = 6;
+    const ALPHACHANNEL_SHAPE = 9;
+    const ALPHACHANNEL_TRANSPARENT = 10;
+    const ALPHACHANNEL_ASSOCIATE = 13;
+    const ALPHACHANNEL_DISSOCIATE = 14;
+    const SPARSECOLORMETHOD_UNDEFINED = 0;
+    const SPARSECOLORMETHOD_BARYCENTRIC = 1;
+    const SPARSECOLORMETHOD_BILINEAR = 7;
+    const SPARSECOLORMETHOD_POLYNOMIAL = 8;
+    const SPARSECOLORMETHOD_SPEPARDS = 16;
+    const SPARSECOLORMETHOD_VORONOI = 18;
+    const SPARSECOLORMETHOD_INVERSE = 19;
+    const SPARSECOLORMETHOD_MANHATTAN = 20;
+    const DITHERMETHOD_UNDEFINED = 0;
+    const DITHERMETHOD_NO = 1;
+    const DITHERMETHOD_RIEMERSMA = 2;
+    const DITHERMETHOD_FLOYDSTEINBERG = 3;
+    const FUNCTION_UNDEFINED = 0;
+    const FUNCTION_POLYNOMIAL = 1;
+    const FUNCTION_SINUSOID = 2;
+    const ALPHACHANNEL_BACKGROUND = 2;
+    const FUNCTION_ARCSIN = 3;
+    const FUNCTION_ARCTAN = 4;
+    const ALPHACHANNEL_FLATTEN = 11;
+    const ALPHACHANNEL_REMOVE = 12;
+    const STATISTIC_GRADIENT = 1;
+    const STATISTIC_MAXIMUM = 2;
+    const STATISTIC_MEAN = 3;
+    const STATISTIC_MEDIAN = 4;
+    const STATISTIC_MINIMUM = 5;
+    const STATISTIC_MODE = 6;
+    const STATISTIC_NONPEAK = 7;
+    const STATISTIC_STANDARD_DEVIATION = 8;
+    const STATISTIC_ROOT_MEAN_SQUARE = 9;
+    const MORPHOLOGY_CONVOLVE = 1;
+    const MORPHOLOGY_CORRELATE = 2;
+    const MORPHOLOGY_ERODE = 3;
+    const MORPHOLOGY_DILATE = 4;
+    const MORPHOLOGY_ERODE_INTENSITY = 5;
+    const MORPHOLOGY_DILATE_INTENSITY = 6;
+    const MORPHOLOGY_DISTANCE = 7;
+    const MORPHOLOGY_OPEN = 8;
+    const MORPHOLOGY_CLOSE = 9;
+    const MORPHOLOGY_OPEN_INTENSITY = 10;
+    const MORPHOLOGY_CLOSE_INTENSITY = 11;
+    const MORPHOLOGY_SMOOTH = 12;
+    const MORPHOLOGY_EDGE_IN = 13;
+    const MORPHOLOGY_EDGE_OUT = 14;
+    const MORPHOLOGY_EDGE = 15;
+    const MORPHOLOGY_TOP_HAT = 16;
+    const MORPHOLOGY_BOTTOM_HAT = 17;
+    const MORPHOLOGY_HIT_AND_MISS = 18;
+    const MORPHOLOGY_THINNING = 19;
+    const MORPHOLOGY_THICKEN = 20;
+    const MORPHOLOGY_VORONOI = 21;
+    const MORPHOLOGY_ITERATIVE = 22;
+    const KERNEL_UNITY = 1;
+    const KERNEL_GAUSSIAN = 2;
+    const KERNEL_DIFFERENCE_OF_GAUSSIANS = 3;
+    const KERNEL_LAPLACIAN_OF_GAUSSIANS = 4;
+    const KERNEL_BLUR = 5;
+    const KERNEL_COMET = 6;
+    const KERNEL_LAPLACIAN = 7;
+    const KERNEL_SOBEL = 8;
+    const KERNEL_FREI_CHEN = 9;
+    const KERNEL_ROBERTS = 10;
+    const KERNEL_PREWITT = 11;
+    const KERNEL_COMPASS = 12;
+    const KERNEL_KIRSCH = 13;
+    const KERNEL_DIAMOND = 14;
+    const KERNEL_SQUARE = 15;
+    const KERNEL_RECTANGLE = 16;
+    const KERNEL_OCTAGON = 17;
+    const KERNEL_DISK = 18;
+    const KERNEL_PLUS = 19;
+    const KERNEL_CROSS = 20;
+    const KERNEL_RING = 21;
+    const KERNEL_PEAKS = 22;
+    const KERNEL_EDGES = 23;
+    const KERNEL_CORNERS = 24;
+    const KERNEL_DIAGONALS = 25;
+    const KERNEL_LINE_ENDS = 26;
+    const KERNEL_LINE_JUNCTIONS = 27;
+    const KERNEL_RIDGES = 28;
+    const KERNEL_CONVEX_HULL = 29;
+    const KERNEL_THIN_SE = 30;
+    const KERNEL_SKELETON = 31;
+    const KERNEL_CHEBYSHEV = 32;
+    const KERNEL_MANHATTAN = 33;
+    const KERNEL_OCTAGONAL = 34;
+    const KERNEL_EUCLIDEAN = 35;
+    const KERNEL_USER_DEFINED = 36;
+    const KERNEL_BINOMIAL = 37;
+    const DIRECTION_LEFT_TO_RIGHT = 2;
+    const DIRECTION_RIGHT_TO_LEFT = 1;
+    const NORMALIZE_KERNEL_NONE = 0;
+    const NORMALIZE_KERNEL_VALUE = 8192;
+    const NORMALIZE_KERNEL_CORRELATE = 65536;
+    const NORMALIZE_KERNEL_PERCENT = 4096;
+
+    // methods
+    public function optimizeimagelayers() {}
+    public function compareimagelayers($LAYER) {}
+    public function pingimageblob($imageContents) {}
+    public function pingimagefile($fp) {}
+    public function transposeimage() {}
+    public function transverseimage() {}
+    public function trimimage($fuzz) {}
+    public function waveimage($amplitude, $waveLenght) {}
+    public function vignetteimage($blackPoint, $whitePoint, $x, $y) {}
+    public function uniqueimagecolors() {}
+    public function getimagematte() {}
+    public function setimagematte($enable) {}
+    public function adaptiveresizeimage($columns, $rows, $bestfit = null, $legacy = null) {}
+    public function sketchimage($radius, $sigma, $angle) {}
+    public function shadeimage($gray, $azimuth, $elevation) {}
+    public function getsizeoffset() {}
+    public function setsizeoffset($columns, $rows, $offset) {}
+    public function adaptiveblurimage($radius, $sigma, $CHANNEL = null) {}
+    public function contraststretchimage($blackPoint, $whitePoint, $CHANNEL = null) {}
+    public function adaptivesharpenimage($radius, $sigma, $CHANNEL = null) {}
+    public function randomthresholdimage($low, $high, $CHANNELTYPE = null) {}
+    public function roundcornersimage($xRounding, $yRounding, $strokeWidth = null, $displace = null, $sizeCorrection = null) {}
+    public function roundcorners($xRounding, $yRounding, $strokeWidth = null, $displace = null, $sizeCorrection = null) {}
+    public function setiteratorindex($index) {}
+    public function getiteratorindex() {}
+    public function transformimage($crop, $geometry) {}
+    public function setimageopacity($opacity) {}
+    public function orderedposterizeimage($threshold_map, $CHANNEL = null) {}
+    public function polaroidimage(\ImagickDraw $ImagickDraw, $angle) {}
+    public function getimageproperty($name) {}
+    public function setimageproperty($name, $value) {}
+    public function deleteimageproperty($name) {}
+    public function identifyformat($embedText) {}
+    public function setimageinterpolatemethod($INTERPOLATE) {}
+    public function getimageinterpolatemethod() {}
+    public function linearstretchimage($blackPoint, $whitePoint) {}
+    public function getimagelength() {}
+    public function extentimage($width, $height, $x, $y) {}
+    public function getimageorientation() {}
+    public function setimageorientation($ORIENTATION) {}
+    public function paintfloodfillimage($CHANNEL, $fill, $fuzz, $bordercolor, $x, $y) {}
+    public function clutimage(\Imagick $Imagick, $CHANNELTYPE = null) {}
+    public function getimageproperties($pattern = null, $values = null) {}
+    public function getimageprofiles($pattern = null, $values = null) {}
+    public function distortimage($method, $arguments, $bestfit) {}
+    public function writeimagefile($handle, $format = null) {}
+    public function writeimagesfile($handle, $format = null) {}
+    public function resetimagepage($page) {}
+    public function setimageclipmask(\Imagick $Imagick) {}
+    public function getimageclipmask() {}
+    public function animateimages($server_name) {}
+    public function recolorimage($matrix) {}
+    public function setfont($font) {}
+    public function getfont() {}
+    public function setpointsize($pointsize) {}
+    public function getpointsize() {}
+    public function mergeimagelayers($LAYERMETHOD) {}
+    public function setimagealphachannel($ALPHACHANNELTYPE) {}
+    public function floodfillpaintimage($fill, $fuzz, $bordercolor, $x, $y, $invert, $CHANNEL = null) {}
+    public function opaquepaintimage($target, $fill, $fuzz, $invert, $CHANNEL = null) {}
+    public function transparentpaintimage($target, $alpha, $fuzz, $invert) {}
+    public function liquidrescaleimage($columns, $rows, $delta_x, $rigidity) {}
+    public function encipherimage($passphrase) {}
+    public function decipherimage($passphrase) {}
+    public function setgravity($GRAVITY) {}
+    public function getgravity() {}
+    public function getimagechannelrange($CHANNEL) {}
+    public function getimagealphachannel() {}
+    public function getimagechanneldistortions(\Imagick $Imagick, $METRICTYPE = null, $CHANNEL = null) {}
+    public function setimagegravity($GRAVITY) {}
+    public function getimagegravity() {}
+    public function importimagepixels($x, $y, $width, $height, $map, $storage, $PIXEL) {}
+    public function deskewimage($threshold) {}
+    public function segmentimage($COLORSPACE, $cluster_threshold, $smooth_threshold, $verbose = null) {}
+    public function sparsecolorimage($SPARSE_METHOD, $arguments, $CHANNEL = null) {}
+    public function remapimage(\Imagick $Imagick, $DITHER) {}
+    public function exportimagepixels($x, $y, $width, $height, $map, $STORAGE) {}
+    public function getimagechannelkurtosis($CHANNEL = null) {}
+    public function functionimage($FUNCTION, $arguments) {}
+    public function transformimagecolorspace($COLORSPACE) {}
+    public function haldclutimage(\Imagick $Imagick, $CHANNEL = null) {}
+    public function autolevelimage($CHANNEL = null) {}
+    public function blueshiftimage($factor = null) {}
+    public function getimageartifact($artifact) {}
+    public function setimageartifact($artifact, $value) {}
+    public function deleteimageartifact($artifact) {}
+    public function getcolorspace() {}
+    public function setcolorspace($COLORSPACE) {}
+    public function clampimage($CHANNEL = null) {}
+    public function smushimages($stack, $offset) {}
+    public function __construct($files = null) {}
+    public function __toString() {}
+    public function count($mode = null) {}
+    public function getpixeliterator() {}
+    public function getpixelregioniterator($x, $y, $columns, $rows, $modify) {}
+    public function readimage($filename) {}
+    public function readimages($filenames) {}
+    public function readimageblob($imageContents, $filename = null) {}
+    public function setimageformat($imageFormat) {}
+    public function scaleimage($width, $height, $bestfit = null, $legacy = null) {}
+    public function writeimage($filename = null) {}
+    public function writeimages($filename, $adjoin) {}
+    public function blurimage($radius, $sigma, $CHANNELTYPE = null) {}
+    public function thumbnailimage($width, $height, $bestfit = null, $fill = null, $legacy = null) {}
+    public function cropthumbnailimage($width, $height, $legacy = null) {}
+    public function getimagefilename() {}
+    public function setimagefilename($filename) {}
+    public function getimageformat() {}
+    public function getimagemimetype() {}
+    public function removeimage() {}
+    public function destroy() {}
+    public function clear() {}
+    public function clone() {}
+    public function getimagesize() {}
+    public function getimageblob() {}
+    public function getimagesblob() {}
+    public function setfirstiterator() {}
+    public function setlastiterator() {}
+    public function resetiterator() {}
+    public function previousimage() {}
+    public function nextimage() {}
+    public function haspreviousimage() {}
+    public function hasnextimage() {}
+    public function setimageindex($index) {}
+    public function getimageindex() {}
+    public function commentimage($comment) {}
+    public function cropimage($width, $height, $x, $y) {}
+    public function labelimage($label) {}
+    public function getimagegeometry() {}
+    public function drawimage(\ImagickDraw $ImagickDraw) {}
+    public function setimagecompressionquality($quality) {}
+    public function getimagecompressionquality() {}
+    public function setimagecompression($COMPRESSION) {}
+    public function getimagecompression() {}
+    public function annotateimage(\ImagickDraw $ImagickDraw, $x, $y, $angle, $text) {}
+    public function compositeimage(\Imagick $Imagick, $COMPOSITE, $x, $y, $CHANNELTYPE = null) {}
+    public function modulateimage($brightness, $saturation, $hue) {}
+    public function getimagecolors() {}
+    public function montageimage(\ImagickDraw $ImagickDraw, $tileGeometry, $thumbnailGeometry, $MONTAGEMODE, $frame) {}
+    public function identifyimage($appendRawOutput = null) {}
+    public function thresholdimage($threshold, $CHANNELTYPE = null) {}
+    public function adaptivethresholdimage($width, $height, $offset) {}
+    public function blackthresholdimage($color) {}
+    public function whitethresholdimage($color) {}
+    public function appendimages($stack) {}
+    public function charcoalimage($radius, $sigma) {}
+    public function normalizeimage($CHANNEL = null) {}
+    public function oilpaintimage($radius) {}
+    public function posterizeimage($levels, $dither) {}
+    public function radialblurimage($angle, $CHANNEL = null) {}
+    public function raiseimage($width, $height, $x, $y, $raise) {}
+    public function resampleimage($xResolution, $yResolution, $FILTER, $blur) {}
+    public function resizeimage($x, $y, $filter = null, $blur = null, $bestfit = null, $legacy = null) {}
+    public function rollimage($x, $y) {}
+    public function rotateimage($color, $degrees) {}
+    public function sampleimage($columns, $rows) {}
+    public function solarizeimage($threshold) {}
+    public function shadowimage($opacity, $sigma, $x, $y) {}
+    public function setimageattribute($key, $value) {}
+    public function setimagebackgroundcolor($color) {}
+    public function setimagecompose($COMPOSITE) {}
+    public function setimagedelay($delay) {}
+    public function setimagedepth($depth) {}
+    public function setimagegamma($gamma) {}
+    public function setimageiterations($iterations) {}
+    public function setimagemattecolor($color) {}
+    public function setimagepage($width, $height, $x, $y) {}
+    public function setimageprogressmonitor($filename) {}
+    public function setprogressmonitor($callback) {}
+    public function setimageresolution($xResolution, $yResolution) {}
+    public function setimagescene($scene) {}
+    public function setimagetickspersecond($ticksPerSecond) {}
+    public function setimagetype($IMGTYPE) {}
+    public function setimageunits($RESOLUTION) {}
+    public function sharpenimage($radius, $sigma, $CHANNEL = null) {}
+    public function shaveimage($columns, $rows) {}
+    public function shearimage($color, $xShear, $yShear) {}
+    public function spliceimage($width, $height, $x, $y) {}
+    public function pingimage($filename) {}
+    public function readimagefile($fp) {}
+    public function displayimage($serverName) {}
+    public function displayimages($serverName) {}
+    public function spreadimage($radius) {}
+    public function swirlimage($degrees) {}
+    public function stripimage() {}
+    public static function queryformats($pattern) {}
+    public static function queryfonts($pattern) {}
+    public function queryfontmetrics(\ImagickDraw $ImagickDraw, $text, $multiline = null) {}
+    public function steganoimage(\Imagick $Imagick, $offset) {}
+    public function addnoiseimage($NOISE, $CHANNEL = null) {}
+    public function motionblurimage($radius, $sigma, $angle, $CHANNEL = null) {}
+    public function mosaicimages() {}
+    public function morphimages($frames) {}
+    public function minifyimage() {}
+    public function affinetransformimage(\ImagickDraw $ImagickDraw) {}
+    public function averageimages() {}
+    public function borderimage($color, $width, $height) {}
+    public static function calculatecrop($orig_width, $orig_height, $desired_width, $desired_height, $legacy = null) {}
+    public function chopimage($width, $height, $x, $y) {}
+    public function clipimage() {}
+    public function clippathimage($pathname, $inside) {}
+    public function clipimagepath($pathname, $inside) {}
+    public function coalesceimages() {}
+    public function colorfloodfillimage($fill_color, $fuzz, $border_color, $y, $x) {}
+    public function colorizeimage($colorize_color, $opacity, $legacy = null) {}
+    public function compareimagechannels(\Imagick $Imagick, $CHANNEL, $METRIC) {}
+    public function compareimages(\Imagick $Imagick, $METRIC) {}
+    public function contrastimage($sharpen) {}
+    public function combineimages() {}
+    public function convolveimage($kernel, $CHANNEL = null) {}
+    public function cyclecolormapimage($displace) {}
+    public function deconstructimages() {}
+    public function despeckleimage() {}
+    public function edgeimage($radius) {}
+    public function embossimage($radius, $sigma) {}
+    public function enhanceimage() {}
+    public function equalizeimage() {}
+    public function evaluateimage($EVALUATE, $constant, $CHANNEL = null) {}
+    public function evaluateimages($EVALUATE) {}
+    public function flattenimages() {}
+    public function flipimage() {}
+    public function flopimage() {}
+    public function forwardfouriertransformimage($magnitude) {}
+    public function frameimage($color, $width, $height, $innerBevel, $outerBevel) {}
+    public function fximage($expression, $CHANNEL = null) {}
+    public function gammaimage($gamma, $CHANNEL = null) {}
+    public function gaussianblurimage($radius, $sigma, $CHANNEL = null) {}
+    public function getimageattribute($key) {}
+    public function getimagebackgroundcolor() {}
+    public function getimageblueprimary() {}
+    public function getimagebordercolor() {}
+    public function getimagechanneldepth($CHANNEL) {}
+    public function getimagechanneldistortion(\Imagick $Imagick, $CHANNEL, $METRIC) {}
+    public function getimagechannelextrema($CHANNEL) {}
+    public function getimagechannelmean($CHANNEL) {}
+    public function getimagechannelstatistics() {}
+    public function getimagecolormapcolor($index) {}
+    public function getimagecolorspace() {}
+    public function getimagecompose() {}
+    public function getimagedelay() {}
+    public function getimagedepth() {}
+    public function getimagedistortion(\Imagick $Imagick, $METRIC) {}
+    public function getimageextrema() {}
+    public function getimagedispose() {}
+    public function getimagegamma() {}
+    public function getimagegreenprimary() {}
+    public function getimageheight() {}
+    public function getimagehistogram() {}
+    public function getimageinterlacescheme() {}
+    public function getimageiterations() {}
+    public function getimagemattecolor() {}
+    public function getimagepage() {}
+    public function getimagepixelcolor($x, $y) {}
+    public function getimageprofile($name) {}
+    public function getimageredprimary() {}
+    public function getimagerenderingintent() {}
+    public function getimageresolution() {}
+    public function getimagescene() {}
+    public function getimagesignature() {}
+    public function getimagetickspersecond() {}
+    public function getimagetype() {}
+    public function getimageunits() {}
+    public function getimagevirtualpixelmethod() {}
+    public function getimagewhitepoint() {}
+    public function getimagewidth() {}
+    public function getnumberimages() {}
+    public function getimagetotalinkdensity() {}
+    public function getimageregion($width, $height, $x, $y) {}
+    public function implodeimage($radius) {}
+    public function inversefouriertransformimage($complement, $magnitude) {}
+    public function levelimage($blackPoint, $gamma, $whitePoint, $CHANNEL = null) {}
+    public function magnifyimage() {}
+    public function mapimage(\Imagick $Imagick, $dither) {}
+    public function mattefloodfillimage($alpha, $fuzz, $color, $x, $y) {}
+    public function medianfilterimage($radius) {}
+    public function negateimage($gray, $CHANNEL = null) {}
+    public function paintopaqueimage($target_color, $fill_color, $fuzz, $CHANNEL = null) {}
+    public function painttransparentimage($target_color, $alpha, $fuzz) {}
+    public function previewimages($PREVIEW) {}
+    public function profileimage($name, $profile) {}
+    public function quantizeimage($numColors, $COLORSPACE, $treeDepth, $dither, $measureError) {}
+    public function quantizeimages($numColors, $COLORSPACE, $treeDepth, $dither, $measureError) {}
+    public function reducenoiseimage($radius) {}
+    public function removeimageprofile($name) {}
+    public function separateimagechannel($CHANNEL) {}
+    public function sepiatoneimage($threshold) {}
+    public function setimagebias($bias) {}
+    public function setimagebiasquantum($bias) {}
+    public function setimageblueprimary($x, $y) {}
+    public function setimagebordercolor($color) {}
+    public function setimagechanneldepth($CHANNEL, $depth) {}
+    public function setimagecolormapcolor($index, $color) {}
+    public function setimagecolorspace($COLORSPACE) {}
+    public function setimagedispose($DISPOSETYPE) {}
+    public function setimageextent($columns, $rows) {}
+    public function setimagegreenprimary($x, $y) {}
+    public function setimageinterlacescheme($INTERLACE) {}
+    public function setimageprofile($name, $profile) {}
+    public function setimageredprimary($x, $y) {}
+    public function setimagerenderingintent($RENDERINGINTENT) {}
+    public function setimagevirtualpixelmethod($VIRTUALPIXELMETHOD) {}
+    public function setimagewhitepoint($x, $y) {}
+    public function sigmoidalcontrastimage($sharpen, $contrast, $midpoint, $CHANNEL = null) {}
+    public function stereoimage(\Imagick $Imagick) {}
+    public function textureimage(\Imagick $Imagick) {}
+    public function tintimage($tint_color, $opacity, $legacy = null) {}
+    public function unsharpmaskimage($radius, $sigma, $amount, $threshold, $CHANNEL = null) {}
+    public function getimage() {}
+    public function addimage(\Imagick $Imagick) {}
+    public function setimage(\Imagick $Imagick) {}
+    public function newimage($columns, $rows, $background_color, $format = null) {}
+    public function newpseudoimage($columns, $rows, $pseudoString) {}
+    public function getcompression() {}
+    public function getcompressionquality() {}
+    public static function getcopyright() {}
+    public static function getconfigureoptions($pattern = null) {}
+    public static function getfeatures() {}
+    public function getfilename() {}
+    public function getformat() {}
+    public static function gethomeurl() {}
+    public function getinterlacescheme() {}
+    public function getoption($key) {}
+    public static function getpackagename() {}
+    public function getpage() {}
+    public static function getquantum() {}
+    public static function gethdrienabled() {}
+    public static function getquantumdepth() {}
+    public static function getquantumrange() {}
+    public static function getreleasedate() {}
+    public static function getresource($resource_type) {}
+    public static function getresourcelimit($resource_type) {}
+    public function getsamplingfactors() {}
+    public function getsize() {}
+    public static function getversion() {}
+    public function setbackgroundcolor($color) {}
+    public function setcompression($compression) {}
+    public function setcompressionquality($compressionquality) {}
+    public function setfilename($filename) {}
+    public function setformat($format) {}
+    public function setinterlacescheme($INTERLACE) {}
+    public function setoption($key, $value) {}
+    public function setpage($width, $height, $x, $y) {}
+    public static function setresourcelimit($RESOURCETYPE, $limit) {}
+    public function setresolution($xResolution, $yResolution) {}
+    public function setsamplingfactors($factors) {}
+    public function setsize($columns, $rows) {}
+    public function settype($IMGTYPE) {}
+    public function key() {}
+    public function next() {}
+    public function rewind() {}
+    public function valid() {}
+    public function current() {}
+    public function brightnesscontrastimage($brightness, $contrast, $CHANNEL = null) {}
+    public function colormatriximage($color_matrix) {}
+    public function selectiveblurimage($radius, $sigma, $threshold, $CHANNEL) {}
+    public function rotationalblurimage($angle, $CHANNEL = null) {}
+    public function statisticimage($type, $width, $height, $CHANNEL = null) {}
+    public function subimagematch(\Imagick $Imagick, &$offset = null, &$similarity = null, &$similarity_threshold = null, &$metric = null) {}
+    public function similarityimage(\Imagick $Imagick, &$offset = null, &$similarity = null, &$similarity_threshold = null, &$metric = null) {}
+    public static function setregistry($key, $value) {}
+    public static function getregistry($key) {}
+    public static function listregistry() {}
+    public function morphology($morphologyMethod, $iterations, \ImagickKernel $ImagickKernel, $CHANNEL = null) {}
+    public function filter(\ImagickKernel $ImagickKernel, $CHANNEL = null) {}
+    public function setantialias($antialias) {}
+    public function getantialias() {}
+    public function colordecisionlistimage($antialias) {}
+    public function autogammaimage($CHANNEL) {}
+    public function autoorient() {}
+    public function compositeimagegravity(\Imagick $Imagick, $COMPOSITE, $GRAVITY) {}
+    public function localcontrastimage($radius, $strength) {}
+}
+
+class ImagickDraw {
+
+    // methods
+    public function resetvectorgraphics() {}
+    public function gettextkerning() {}
+    public function settextkerning($kerning) {}
+    public function gettextinterwordspacing() {}
+    public function settextinterwordspacing($spacing) {}
+    public function gettextinterlinespacing() {}
+    public function settextinterlinespacing($spacing) {}
+    public function __construct() {}
+    public function setfillcolor($color) {}
+    public function setfillalpha($alpha) {}
+    public function setresolution($x_resolution, $y_resolution) {}
+    public function setstrokecolor($color) {}
+    public function setstrokealpha($alpha) {}
+    public function setstrokewidth($width) {}
+    public function clear() {}
+    public function circle($ox, $oy, $px, $py) {}
+    public function annotation($x, $y, $text) {}
+    public function settextantialias($antialias) {}
+    public function settextencoding($encoding) {}
+    public function setfont($font) {}
+    public function setfontfamily($fontfamily) {}
+    public function setfontsize($pointsize) {}
+    public function setfontstyle($STYLE) {}
+    public function setfontweight($weight) {}
+    public function getfont() {}
+    public function getfontfamily() {}
+    public function getfontsize() {}
+    public function getfontstyle() {}
+    public function getfontweight() {}
+    public function destroy() {}
+    public function rectangle($x1, $y1, $x2, $y2) {}
+    public function roundrectangle($x1, $y1, $x2, $y2, $rx, $ry) {}
+    public function ellipse($ox, $oy, $px, $py, $start, $end) {}
+    public function skewx($degrees) {}
+    public function skewy($degrees) {}
+    public function translate($x, $y) {}
+    public function line($sx, $sy, $ex, $ey) {}
+    public function arc($sx, $sy, $ex, $ey, $sd, $ed) {}
+    public function matte($x, $y, $METHOD) {}
+    public function polygon($coordinates) {}
+    public function point($x, $y) {}
+    public function gettextdecoration() {}
+    public function gettextencoding() {}
+    public function getfontstretch() {}
+    public function setfontstretch($STRETCH) {}
+    public function setstrokeantialias($antialias) {}
+    public function settextalignment($ALIGN) {}
+    public function settextdecoration($DECORATION) {}
+    public function settextundercolor($color) {}
+    public function setviewbox($sx, $sy, $ex, $ey) {}
+    public function clone() {}
+    public function affine($affineMatrix) {}
+    public function bezier($coordinateArray) {}
+    public function composite($COMPOSE, $x, $y, $width, $height, \Imagick $Imagick) {}
+    public function color($x, $y, $PAINTMETHOD) {}
+    public function comment($comment) {}
+    public function getclippath() {}
+    public function getcliprule() {}
+    public function getclipunits() {}
+    public function getfillcolor() {}
+    public function getfillopacity() {}
+    public function getfillrule() {}
+    public function getgravity() {}
+    public function getstrokeantialias() {}
+    public function getstrokecolor() {}
+    public function getstrokedasharray() {}
+    public function getstrokedashoffset() {}
+    public function getstrokelinecap() {}
+    public function getstrokelinejoin() {}
+    public function getstrokemiterlimit() {}
+    public function getstrokeopacity() {}
+    public function getstrokewidth() {}
+    public function gettextalignment() {}
+    public function gettextantialias() {}
+    public function getvectorgraphics() {}
+    public function gettextundercolor() {}
+    public function pathclose() {}
+    public function pathcurvetoabsolute($x1, $y1, $x2, $y2, $x, $y) {}
+    public function pathcurvetorelative($x1, $y1, $x2, $y2, $x, $y) {}
+    public function pathcurvetoquadraticbezierabsolute($x1, $y1, $x, $y) {}
+    public function pathcurvetoquadraticbezierrelative($x1, $y1, $x, $y) {}
+    public function pathcurvetoquadraticbeziersmoothabsolute($x, $y) {}
+    public function pathcurvetoquadraticbeziersmoothrelative($x, $y) {}
+    public function pathcurvetosmoothabsolute($x1, $y1, $x, $y) {}
+    public function pathcurvetosmoothrelative($x1, $y1, $x, $y) {}
+    public function pathellipticarcabsolute($rx, $ry, $xAxisRotation, $largeArc, $sweep, $x, $y) {}
+    public function pathellipticarcrelative($rx, $ry, $xAxisRotation, $largeArc, $sweep, $x, $y) {}
+    public function pathfinish() {}
+    public function pathlinetoabsolute($x, $y) {}
+    public function pathlinetorelative($x, $y) {}
+    public function pathlinetohorizontalabsolute($y) {}
+    public function pathlinetohorizontalrelative($x) {}
+    public function pathlinetoverticalabsolute($y) {}
+    public function pathlinetoverticalrelative($x) {}
+    public function pathmovetoabsolute($x, $y) {}
+    public function pathmovetorelative($x, $y) {}
+    public function pathstart() {}
+    public function polyline($coordinateArray) {}
+    public function popclippath() {}
+    public function popdefs() {}
+    public function poppattern() {}
+    public function pushclippath($clipMask) {}
+    public function pushdefs() {}
+    public function pushpattern($pattern_id, $x, $y, $width, $height) {}
+    public function render() {}
+    public function rotate($degrees) {}
+    public function scale($x, $y) {}
+    public function setclippath($clipMask) {}
+    public function setcliprule($FILLRULE) {}
+    public function setclipunits($PATHUNITS) {}
+    public function setfillopacity($fillOpacity) {}
+    public function setfillpatternurl($url) {}
+    public function setfillrule($FILLRULE) {}
+    public function setgravity($GRAVITY) {}
+    public function setstrokepatternurl($url) {}
+    public function setstrokedashoffset($offset) {}
+    public function setstrokelinecap($LINECAP) {}
+    public function setstrokelinejoin($LINEJOIN) {}
+    public function setstrokemiterlimit($miterLimit) {}
+    public function setstrokeopacity($strokeOpacity) {}
+    public function setvectorgraphics($xml) {}
+    public function pop() {}
+    public function push() {}
+    public function setstrokedasharray($dashArray) {}
+    public function getopacity() {}
+    public function setopacity($opacity) {}
+    public function getfontresolution() {}
+    public function setfontresolution($x, $y) {}
+    public function getbordercolor() {}
+    public function setbordercolor($bordercolor) {}
+    public function setdensity($density) {}
+    public function getdensity() {}
+    public function gettextdirection() {}
+    public function settextdirection($direction) {}
+}
+
+class ImagickDrawException extends \Exception {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+class ImagickException extends \Exception {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+class ImagickKernel {
+
+    // methods
+    private function __construct() {}
+    public static function frommatrix($array, $array = null) {}
+    public static function frombuiltin($kerneltype, $paramstring) {}
+    public function addkernel(\ImagickKernel $ImagickKernel) {}
+    public function getmatrix() {}
+    public function separate() {}
+    public function scale() {}
+    public function addunitykernel() {}
+}
+
+class ImagickKernelException extends \Exception {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+class ImagickPixel {
+
+    // methods
+    public function gethsl() {}
+    public function sethsl($hue, $saturation, $luminosity) {}
+    public function getcolorvaluequantum($color) {}
+    public function setcolorvaluequantum($color_value) {}
+    public function getindex() {}
+    public function setindex($index) {}
+    public function __construct($color = null) {}
+    public function setcolor($color) {}
+    public function setcolorvalue($color, $value) {}
+    public function getcolorvalue($color) {}
+    public function clear() {}
+    public function destroy() {}
+    public function issimilar($color, $fuzz = null) {}
+    public function ispixelsimilarquantum($color, $fuzz = null) {}
+    public function ispixelsimilar($color, $fuzz = null) {}
+    public function getcolor($normalized = null) {}
+    public function getcolorquantum() {}
+    public function getcolorasstring() {}
+    public function getcolorcount() {}
+    public function setcolorcount($colorCount) {}
+    public function clone() {}
+    public function setcolorfrompixel(\ImagickPixel $srcPixel) {}
+}
+
+class ImagickPixelException extends \Exception {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+class ImagickPixelIterator implements \Iterator, \Traversable {
+
+    // methods
+    public function __construct(\Imagick $Imagick) {}
+    public function newpixeliterator() {}
+    public function newpixelregioniterator() {}
+    public function getiteratorrow() {}
+    public function setiteratorrow($row) {}
+    public function setiteratorfirstrow() {}
+    public function setiteratorlastrow() {}
+    public function getpreviousiteratorrow() {}
+    public function getcurrentiteratorrow() {}
+    public function getnextiteratorrow() {}
+    public function resetiterator() {}
+    public function synciterator() {}
+    public function destroy() {}
+    public function clear() {}
+    public static function getpixeliterator(\Imagick $Imagick) {}
+    public static function getpixelregioniterator(\Imagick $Imagick, $x, $y, $columns, $rows) {}
+    public function key() {}
+    public function next() {}
+    public function rewind() {}
+    public function current() {}
+    public function valid() {}
+}
+
+class ImagickPixelIteratorException extends \Exception {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+}
diff --git a/.phan/internal_stubs/pcntl.phan_php b/.phan/internal_stubs/pcntl.phan_php
new file mode 100644 (file)
index 0000000..392dc30
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+// These stubs were generated by the phan stub generator.
+// @phan-stub-for-extension pcntl@7.0.33-0+deb9u3
+
+namespace {
+function pcntl_alarm($seconds) {}
+function pcntl_errno() {}
+function pcntl_exec($path, $args = null, $envs = null) {}
+function pcntl_fork() {}
+function pcntl_get_last_error() {}
+function pcntl_getpriority($pid = null, $process_identifier = null) {}
+function pcntl_setpriority($priority, $pid = null, $process_identifier = null) {}
+function pcntl_signal($signo, $handler, $restart_syscalls = null) {}
+function pcntl_signal_dispatch() {}
+function pcntl_sigprocmask($how, $set, &$oldset = null) {}
+function pcntl_sigtimedwait($set, &$info = null, $seconds = null, $nanoseconds = null) {}
+function pcntl_sigwaitinfo($set, &$info = null) {}
+function pcntl_strerror($errno) {}
+function pcntl_wait(&$status, $options = null, &$rusage = null) {}
+function pcntl_waitpid($pid, &$status, $options = null, &$rusage = null) {}
+function pcntl_wexitstatus($status) {}
+function pcntl_wifcontinued($status) {}
+function pcntl_wifexited($status) {}
+function pcntl_wifsignaled($status) {}
+function pcntl_wifstopped($status) {}
+function pcntl_wstopsig($status) {}
+function pcntl_wtermsig($status) {}
+const BUS_ADRALN = 1;
+const BUS_ADRERR = 2;
+const BUS_OBJERR = 3;
+const CLD_CONTINUED = 6;
+const CLD_DUMPED = 3;
+const CLD_EXITED = 1;
+const CLD_KILLED = 2;
+const CLD_STOPPED = 5;
+const CLD_TRAPPED = 4;
+const FPE_FLTDIV = 3;
+const FPE_FLTINV = 7;
+const FPE_FLTOVF = 4;
+const FPE_FLTRES = 6;
+const FPE_FLTSUB = 8;
+const FPE_FLTUND = 7;
+const FPE_INTDIV = 1;
+const FPE_INTOVF = 2;
+const ILL_BADSTK = 8;
+const ILL_COPROC = 7;
+const ILL_ILLADR = 3;
+const ILL_ILLOPC = 1;
+const ILL_ILLOPN = 2;
+const ILL_ILLTRP = 4;
+const ILL_PRVOPC = 5;
+const ILL_PRVREG = 6;
+const PCNTL_E2BIG = 7;
+const PCNTL_EACCES = 13;
+const PCNTL_EAGAIN = 11;
+const PCNTL_ECHILD = 10;
+const PCNTL_EFAULT = 14;
+const PCNTL_EINTR = 4;
+const PCNTL_EINVAL = 22;
+const PCNTL_EIO = 5;
+const PCNTL_EISDIR = 21;
+const PCNTL_ELIBBAD = 80;
+const PCNTL_ELOOP = 40;
+const PCNTL_EMFILE = 24;
+const PCNTL_ENAMETOOLONG = 36;
+const PCNTL_ENFILE = 23;
+const PCNTL_ENOENT = 2;
+const PCNTL_ENOEXEC = 8;
+const PCNTL_ENOMEM = 12;
+const PCNTL_ENOTDIR = 20;
+const PCNTL_EPERM = 1;
+const PCNTL_ESRCH = 3;
+const PCNTL_ETXTBSY = 26;
+const POLL_ERR = 4;
+const POLL_HUP = 6;
+const POLL_IN = 1;
+const POLL_MSG = 3;
+const POLL_OUT = 2;
+const POLL_PRI = 5;
+const PRIO_PGRP = 1;
+const PRIO_PROCESS = 0;
+const PRIO_USER = 2;
+const SEGV_ACCERR = 2;
+const SEGV_MAPERR = 1;
+const SIGABRT = 6;
+const SIGALRM = 14;
+const SIGBABY = 31;
+const SIGBUS = 7;
+const SIGCHLD = 17;
+const SIGCLD = 17;
+const SIGCONT = 18;
+const SIGFPE = 8;
+const SIGHUP = 1;
+const SIGILL = 4;
+const SIGINT = 2;
+const SIGIO = 29;
+const SIGIOT = 6;
+const SIGKILL = 9;
+const SIGPIPE = 13;
+const SIGPOLL = 29;
+const SIGPROF = 27;
+const SIGPWR = 30;
+const SIGQUIT = 3;
+const SIGSEGV = 11;
+const SIGSTKFLT = 16;
+const SIGSTOP = 19;
+const SIGSYS = 31;
+const SIGTERM = 15;
+const SIGTRAP = 5;
+const SIGTSTP = 20;
+const SIGTTIN = 21;
+const SIGTTOU = 22;
+const SIGURG = 23;
+const SIGUSR1 = 10;
+const SIGUSR2 = 12;
+const SIGVTALRM = 26;
+const SIGWINCH = 28;
+const SIGXCPU = 24;
+const SIGXFSZ = 25;
+const SIG_BLOCK = 0;
+const SIG_DFL = 0;
+const SIG_ERR = -1;
+const SIG_IGN = 1;
+const SIG_SETMASK = 2;
+const SIG_UNBLOCK = 1;
+const SI_ASYNCIO = -4;
+const SI_KERNEL = 128;
+const SI_MESGQ = -3;
+const SI_QUEUE = -1;
+const SI_SIGIO = -5;
+const SI_TIMER = -2;
+const SI_TKILL = -6;
+const SI_USER = 0;
+const TRAP_BRKPT = 1;
+const TRAP_TRACE = 2;
+const WCONTINUED = 8;
+const WNOHANG = 1;
+const WUNTRACED = 2;
+}
diff --git a/.phan/internal_stubs/redis.phan_php b/.phan/internal_stubs/redis.phan_php
new file mode 100644 (file)
index 0000000..29efb47
--- /dev/null
@@ -0,0 +1,490 @@
+<?php
+// These stubs were generated by the phan stub generator.
+// @phan-stub-for-extension redis@3.1.1
+
+namespace {
+class Redis {
+
+    // constants
+    const REDIS_NOT_FOUND = 0;
+    const REDIS_STRING = 1;
+    const REDIS_SET = 2;
+    const REDIS_LIST = 3;
+    const REDIS_ZSET = 4;
+    const REDIS_HASH = 5;
+    const PIPELINE = 2;
+    const ATOMIC = 0;
+    const MULTI = 1;
+    const OPT_SERIALIZER = 1;
+    const OPT_PREFIX = 2;
+    const OPT_READ_TIMEOUT = 3;
+    const SERIALIZER_NONE = 0;
+    const SERIALIZER_PHP = 1;
+    const SERIALIZER_IGBINARY = 2;
+    const OPT_SCAN = 4;
+    const SCAN_RETRY = 1;
+    const SCAN_NORETRY = 0;
+    const AFTER = 'after';
+    const BEFORE = 'before';
+
+    // methods
+    public function __construct() {}
+    public function __destruct() {}
+    public function connect() {}
+    public function pconnect() {}
+    public function close() {}
+    public function ping() {}
+    public function echo() {}
+    public function get() {}
+    public function set() {}
+    public function setex() {}
+    public function psetex() {}
+    public function setnx() {}
+    public function getSet() {}
+    public function randomKey() {}
+    public function renameKey() {}
+    public function renameNx() {}
+    public function getMultiple() {}
+    public function exists() {}
+    public function delete() {}
+    public function incr() {}
+    public function incrBy() {}
+    public function incrByFloat() {}
+    public function decr() {}
+    public function decrBy() {}
+    public function type() {}
+    public function append() {}
+    public function getRange() {}
+    public function setRange() {}
+    public function getBit() {}
+    public function setBit() {}
+    public function strlen() {}
+    public function getKeys() {}
+    public function sort() {}
+    public function sortAsc() {}
+    public function sortAscAlpha() {}
+    public function sortDesc() {}
+    public function sortDescAlpha() {}
+    public function lPush() {}
+    public function rPush() {}
+    public function lPushx() {}
+    public function rPushx() {}
+    public function lPop() {}
+    public function rPop() {}
+    public function blPop() {}
+    public function brPop() {}
+    public function lSize() {}
+    public function lRemove() {}
+    public function listTrim() {}
+    public function lGet() {}
+    public function lGetRange() {}
+    public function lSet() {}
+    public function lInsert() {}
+    public function sAdd() {}
+    public function sAddArray() {}
+    public function sSize() {}
+    public function sRemove() {}
+    public function sMove() {}
+    public function sPop() {}
+    public function sRandMember() {}
+    public function sContains() {}
+    public function sMembers() {}
+    public function sInter() {}
+    public function sInterStore() {}
+    public function sUnion() {}
+    public function sUnionStore() {}
+    public function sDiff() {}
+    public function sDiffStore() {}
+    public function setTimeout() {}
+    public function save() {}
+    public function bgSave() {}
+    public function lastSave() {}
+    public function flushDB() {}
+    public function flushAll() {}
+    public function dbSize() {}
+    public function auth() {}
+    public function ttl() {}
+    public function pttl() {}
+    public function persist() {}
+    public function info() {}
+    public function select() {}
+    public function move() {}
+    public function bgrewriteaof() {}
+    public function slaveof() {}
+    public function object() {}
+    public function bitop() {}
+    public function bitcount() {}
+    public function bitpos() {}
+    public function mset() {}
+    public function msetnx() {}
+    public function rpoplpush() {}
+    public function brpoplpush() {}
+    public function zAdd() {}
+    public function zDelete() {}
+    public function zRange() {}
+    public function zRevRange() {}
+    public function zRangeByScore() {}
+    public function zRevRangeByScore() {}
+    public function zRangeByLex() {}
+    public function zRevRangeByLex() {}
+    public function zLexCount() {}
+    public function zRemRangeByLex() {}
+    public function zCount() {}
+    public function zDeleteRangeByScore() {}
+    public function zDeleteRangeByRank() {}
+    public function zCard() {}
+    public function zScore() {}
+    public function zRank() {}
+    public function zRevRank() {}
+    public function zInter() {}
+    public function zUnion() {}
+    public function zIncrBy() {}
+    public function expireAt() {}
+    public function pexpire() {}
+    public function pexpireAt() {}
+    public function hGet() {}
+    public function hSet() {}
+    public function hSetNx() {}
+    public function hDel() {}
+    public function hLen() {}
+    public function hKeys() {}
+    public function hVals() {}
+    public function hGetAll() {}
+    public function hExists() {}
+    public function hIncrBy() {}
+    public function hIncrByFloat() {}
+    public function hMset() {}
+    public function hMget() {}
+    public function multi() {}
+    public function discard() {}
+    public function exec() {}
+    public function pipeline() {}
+    public function watch() {}
+    public function unwatch() {}
+    public function publish() {}
+    public function subscribe() {}
+    public function psubscribe() {}
+    public function unsubscribe() {}
+    public function punsubscribe() {}
+    public function time() {}
+    public function role() {}
+    public function eval() {}
+    public function evalsha() {}
+    public function script() {}
+    public function debug() {}
+    public function dump() {}
+    public function restore() {}
+    public function migrate() {}
+    public function getLastError() {}
+    public function clearLastError() {}
+    public function _prefix() {}
+    public function _serialize() {}
+    public function _unserialize() {}
+    public function client() {}
+    public function command() {}
+    public function scan(&$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function pfadd() {}
+    public function pfcount() {}
+    public function pfmerge() {}
+    public function getOption() {}
+    public function setOption() {}
+    public function config() {}
+    public function slowlog() {}
+    public function rawcommand() {}
+    public function geoadd() {}
+    public function geohash() {}
+    public function geopos() {}
+    public function geodist() {}
+    public function georadius() {}
+    public function georadiusbymember() {}
+    public function getHost() {}
+    public function getPort() {}
+    public function getDBNum() {}
+    public function getTimeout() {}
+    public function getReadTimeout() {}
+    public function getPersistentID() {}
+    public function getAuth() {}
+    public function isConnected() {}
+    public function getMode() {}
+    public function wait() {}
+    public function pubsub() {}
+    public function open() {}
+    public function popen() {}
+    public function lLen() {}
+    public function sGetMembers() {}
+    public function mget() {}
+    public function expire() {}
+    public function zunionstore() {}
+    public function zinterstore() {}
+    public function zRemove() {}
+    public function zRem() {}
+    public function zRemoveRangeByScore() {}
+    public function zRemRangeByScore() {}
+    public function zRemRangeByRank() {}
+    public function zSize() {}
+    public function substr() {}
+    public function rename() {}
+    public function del() {}
+    public function keys() {}
+    public function lrem() {}
+    public function ltrim() {}
+    public function lindex() {}
+    public function lrange() {}
+    public function scard() {}
+    public function srem() {}
+    public function sismember() {}
+    public function zReverseRange() {}
+    public function sendEcho() {}
+    public function evaluate() {}
+    public function evaluateSha() {}
+}
+
+class RedisArray {
+
+    // methods
+    public function __construct() {}
+    public function __call($function_name, $arguments) {}
+    public function _hosts() {}
+    public function _target() {}
+    public function _instance() {}
+    public function _function() {}
+    public function _distributor() {}
+    public function _rehash() {}
+    public function select() {}
+    public function info() {}
+    public function ping() {}
+    public function flushdb() {}
+    public function flushall() {}
+    public function mget() {}
+    public function mset() {}
+    public function del() {}
+    public function getOption() {}
+    public function setOption() {}
+    public function keys() {}
+    public function save() {}
+    public function bgsave() {}
+    public function multi() {}
+    public function exec() {}
+    public function discard() {}
+    public function unwatch() {}
+    public function delete() {}
+    public function getMultiple() {}
+}
+
+class RedisCluster {
+
+    // constants
+    const REDIS_NOT_FOUND = 0;
+    const REDIS_STRING = 1;
+    const REDIS_SET = 2;
+    const REDIS_LIST = 3;
+    const REDIS_ZSET = 4;
+    const REDIS_HASH = 5;
+    const ATOMIC = 0;
+    const MULTI = 1;
+    const OPT_SERIALIZER = 1;
+    const OPT_PREFIX = 2;
+    const OPT_READ_TIMEOUT = 3;
+    const SERIALIZER_NONE = 0;
+    const SERIALIZER_PHP = 1;
+    const SERIALIZER_IGBINARY = 2;
+    const OPT_SCAN = 4;
+    const SCAN_RETRY = 1;
+    const SCAN_NORETRY = 0;
+    const OPT_SLAVE_FAILOVER = 5;
+    const FAILOVER_NONE = 0;
+    const FAILOVER_ERROR = 1;
+    const FAILOVER_DISTRIBUTE = 2;
+    const FAILOVER_DISTRIBUTE_SLAVES = 3;
+    const AFTER = 'after';
+    const BEFORE = 'before';
+
+    // methods
+    public function __construct() {}
+    public function close() {}
+    public function get() {}
+    public function set() {}
+    public function mget() {}
+    public function mset() {}
+    public function msetnx() {}
+    public function del() {}
+    public function setex() {}
+    public function psetex() {}
+    public function setnx() {}
+    public function getset() {}
+    public function exists() {}
+    public function keys() {}
+    public function type() {}
+    public function lpop() {}
+    public function rpop() {}
+    public function lset() {}
+    public function spop() {}
+    public function lpush() {}
+    public function rpush() {}
+    public function blpop() {}
+    public function brpop() {}
+    public function rpushx() {}
+    public function lpushx() {}
+    public function linsert() {}
+    public function lindex() {}
+    public function lrem() {}
+    public function brpoplpush() {}
+    public function rpoplpush() {}
+    public function llen() {}
+    public function scard() {}
+    public function smembers() {}
+    public function sismember() {}
+    public function sadd() {}
+    public function saddarray() {}
+    public function srem() {}
+    public function sunion() {}
+    public function sunionstore() {}
+    public function sinter() {}
+    public function sinterstore() {}
+    public function sdiff() {}
+    public function sdiffstore() {}
+    public function srandmember() {}
+    public function strlen() {}
+    public function persist() {}
+    public function ttl() {}
+    public function pttl() {}
+    public function zcard() {}
+    public function zcount() {}
+    public function zremrangebyscore() {}
+    public function zscore() {}
+    public function zadd() {}
+    public function zincrby() {}
+    public function hlen() {}
+    public function hkeys() {}
+    public function hvals() {}
+    public function hget() {}
+    public function hgetall() {}
+    public function hexists() {}
+    public function hincrby() {}
+    public function hset() {}
+    public function hsetnx() {}
+    public function hmget() {}
+    public function hmset() {}
+    public function hdel() {}
+    public function hincrbyfloat() {}
+    public function dump() {}
+    public function zrank() {}
+    public function zrevrank() {}
+    public function incr() {}
+    public function decr() {}
+    public function incrby() {}
+    public function decrby() {}
+    public function incrbyfloat() {}
+    public function expire() {}
+    public function pexpire() {}
+    public function expireat() {}
+    public function pexpireat() {}
+    public function append() {}
+    public function getbit() {}
+    public function setbit() {}
+    public function bitop() {}
+    public function bitpos() {}
+    public function bitcount() {}
+    public function lget() {}
+    public function getrange() {}
+    public function ltrim() {}
+    public function lrange() {}
+    public function zremrangebyrank() {}
+    public function publish() {}
+    public function rename() {}
+    public function renamenx() {}
+    public function pfcount() {}
+    public function pfadd() {}
+    public function pfmerge() {}
+    public function setrange() {}
+    public function restore() {}
+    public function smove() {}
+    public function zrange() {}
+    public function zrevrange() {}
+    public function zrangebyscore() {}
+    public function zrevrangebyscore() {}
+    public function zrangebylex() {}
+    public function zrevrangebylex() {}
+    public function zlexcount() {}
+    public function zremrangebylex() {}
+    public function zunionstore() {}
+    public function zinterstore() {}
+    public function zrem() {}
+    public function sort() {}
+    public function object() {}
+    public function subscribe() {}
+    public function psubscribe() {}
+    public function unsubscribe() {}
+    public function punsubscribe() {}
+    public function eval() {}
+    public function evalsha() {}
+    public function scan(&$i_iterator, $str_node, $str_pattern = null, $i_count = null) {}
+    public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) {}
+    public function getmode() {}
+    public function getlasterror() {}
+    public function clearlasterror() {}
+    public function getoption() {}
+    public function setoption() {}
+    public function _prefix() {}
+    public function _serialize() {}
+    public function _unserialize() {}
+    public function _masters() {}
+    public function _redir() {}
+    public function multi() {}
+    public function exec() {}
+    public function discard() {}
+    public function watch() {}
+    public function unwatch() {}
+    public function save() {}
+    public function bgsave() {}
+    public function flushdb() {}
+    public function flushall() {}
+    public function dbsize() {}
+    public function bgrewriteaof() {}
+    public function lastsave() {}
+    public function info() {}
+    public function role() {}
+    public function time() {}
+    public function randomkey() {}
+    public function ping() {}
+    public function echo() {}
+    public function command() {}
+    public function rawcommand() {}
+    public function cluster() {}
+    public function client() {}
+    public function config() {}
+    public function pubsub() {}
+    public function script() {}
+    public function slowlog() {}
+    public function geoadd() {}
+    public function geohash() {}
+    public function geopos() {}
+    public function geodist() {}
+    public function georadius() {}
+    public function georadiusbymember() {}
+}
+
+class RedisClusterException extends \RuntimeException {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+class RedisException extends \RuntimeException {
+
+    // properties
+    protected $message;
+    protected $code;
+    protected $file;
+    protected $line;
+}
+
+}
diff --git a/.phan/internal_stubs/sockets.phan_php b/.phan/internal_stubs/sockets.phan_php
new file mode 100644 (file)
index 0000000..d16f363
--- /dev/null
@@ -0,0 +1,211 @@
+<?php
+// These stubs were generated by the phan stub generator.
+// @phan-stub-for-extension sockets@7.0.33-0+deb9u3
+
+namespace {
+function socket_accept($socket) {}
+function socket_bind($socket, $addr, $port = null) {}
+function socket_clear_error($socket = null) {}
+function socket_close($socket) {}
+function socket_cmsg_space($level, $type) {}
+function socket_connect($socket, $addr, $port = null) {}
+function socket_create($domain, $type, $protocol) {}
+function socket_create_listen($port, $backlog = null) {}
+function socket_create_pair($domain, $type, $protocol, &$fd) {}
+function socket_export_stream($socket) {}
+function socket_get_option($socket, $level, $optname) {}
+function socket_getopt($socket, $level, $optname) {}
+function socket_getpeername($socket, &$addr, &$port = null) {}
+function socket_getsockname($socket, &$addr, &$port = null) {}
+function socket_import_stream($stream) {}
+function socket_last_error($socket = null) {}
+function socket_listen($socket, $backlog = null) {}
+function socket_read($socket, $length, $type = null) {}
+function socket_recv($socket, &$buf, $len, $flags) {}
+function socket_recvfrom($socket, &$buf, $len, $flags, &$name, &$port = null) {}
+function socket_recvmsg($socket, &$msghdr, $flags) {}
+function socket_select(&$read_fds, &$write_fds, &$except_fds, $tv_sec, $tv_usec = null) {}
+function socket_send($socket, $buf, $len, $flags) {}
+function socket_sendmsg($socket, $msghdr, $flags) {}
+function socket_sendto($socket, $buf, $len, $flags, $addr, $port = null) {}
+function socket_set_block($socket) {}
+function socket_set_nonblock($socket) {}
+function socket_set_option($socket, $level, $optname, $optval) {}
+function socket_setopt($socket, $level, $optname, $optval) {}
+function socket_shutdown($socket, $how = null) {}
+function socket_strerror($errno) {}
+function socket_write($socket, $buf, $length = null) {}
+const AF_INET = 2;
+const AF_INET6 = 10;
+const AF_UNIX = 1;
+const IPPROTO_IP = 0;
+const IPPROTO_IPV6 = 41;
+const IPV6_HOPLIMIT = 52;
+const IPV6_MULTICAST_HOPS = 18;
+const IPV6_MULTICAST_IF = 17;
+const IPV6_MULTICAST_LOOP = 19;
+const IPV6_PKTINFO = 50;
+const IPV6_RECVHOPLIMIT = 51;
+const IPV6_RECVPKTINFO = 49;
+const IPV6_RECVTCLASS = 66;
+const IPV6_TCLASS = 67;
+const IPV6_UNICAST_HOPS = 16;
+const IPV6_V6ONLY = 26;
+const IP_MULTICAST_IF = 32;
+const IP_MULTICAST_LOOP = 34;
+const IP_MULTICAST_TTL = 33;
+const MCAST_BLOCK_SOURCE = 43;
+const MCAST_JOIN_GROUP = 42;
+const MCAST_JOIN_SOURCE_GROUP = 46;
+const MCAST_LEAVE_GROUP = 45;
+const MCAST_LEAVE_SOURCE_GROUP = 47;
+const MCAST_UNBLOCK_SOURCE = 44;
+const MSG_CMSG_CLOEXEC = 1073741824;
+const MSG_CONFIRM = 2048;
+const MSG_CTRUNC = 8;
+const MSG_DONTROUTE = 4;
+const MSG_DONTWAIT = 64;
+const MSG_EOF = 512;
+const MSG_EOR = 128;
+const MSG_ERRQUEUE = 8192;
+const MSG_MORE = 32768;
+const MSG_NOSIGNAL = 16384;
+const MSG_OOB = 1;
+const MSG_PEEK = 2;
+const MSG_TRUNC = 32;
+const MSG_WAITALL = 256;
+const MSG_WAITFORONE = 65536;
+const PHP_BINARY_READ = 2;
+const PHP_NORMAL_READ = 1;
+const SCM_CREDENTIALS = 2;
+const SCM_RIGHTS = 1;
+const SOCKET_E2BIG = 7;
+const SOCKET_EACCES = 13;
+const SOCKET_EADDRINUSE = 98;
+const SOCKET_EADDRNOTAVAIL = 99;
+const SOCKET_EADV = 68;
+const SOCKET_EAFNOSUPPORT = 97;
+const SOCKET_EAGAIN = 11;
+const SOCKET_EALREADY = 114;
+const SOCKET_EBADE = 52;
+const SOCKET_EBADF = 9;
+const SOCKET_EBADFD = 77;
+const SOCKET_EBADMSG = 74;
+const SOCKET_EBADR = 53;
+const SOCKET_EBADRQC = 56;
+const SOCKET_EBADSLT = 57;
+const SOCKET_EBUSY = 16;
+const SOCKET_ECHRNG = 44;
+const SOCKET_ECOMM = 70;
+const SOCKET_ECONNABORTED = 103;
+const SOCKET_ECONNREFUSED = 111;
+const SOCKET_ECONNRESET = 104;
+const SOCKET_EDESTADDRREQ = 89;
+const SOCKET_EDQUOT = 122;
+const SOCKET_EEXIST = 17;
+const SOCKET_EFAULT = 14;
+const SOCKET_EHOSTDOWN = 112;
+const SOCKET_EHOSTUNREACH = 113;
+const SOCKET_EIDRM = 43;
+const SOCKET_EINPROGRESS = 115;
+const SOCKET_EINTR = 4;
+const SOCKET_EINVAL = 22;
+const SOCKET_EIO = 5;
+const SOCKET_EISCONN = 106;
+const SOCKET_EISDIR = 21;
+const SOCKET_EISNAM = 120;
+const SOCKET_EL2HLT = 51;
+const SOCKET_EL2NSYNC = 45;
+const SOCKET_EL3HLT = 46;
+const SOCKET_EL3RST = 47;
+const SOCKET_ELNRNG = 48;
+const SOCKET_ELOOP = 40;
+const SOCKET_EMEDIUMTYPE = 124;
+const SOCKET_EMFILE = 24;
+const SOCKET_EMLINK = 31;
+const SOCKET_EMSGSIZE = 90;
+const SOCKET_EMULTIHOP = 72;
+const SOCKET_ENAMETOOLONG = 36;
+const SOCKET_ENETDOWN = 100;
+const SOCKET_ENETRESET = 102;
+const SOCKET_ENETUNREACH = 101;
+const SOCKET_ENFILE = 23;
+const SOCKET_ENOANO = 55;
+const SOCKET_ENOBUFS = 105;
+const SOCKET_ENOCSI = 50;
+const SOCKET_ENODATA = 61;
+const SOCKET_ENODEV = 19;
+const SOCKET_ENOENT = 2;
+const SOCKET_ENOLCK = 37;
+const SOCKET_ENOLINK = 67;
+const SOCKET_ENOMEDIUM = 123;
+const SOCKET_ENOMEM = 12;
+const SOCKET_ENOMSG = 42;
+const SOCKET_ENONET = 64;
+const SOCKET_ENOPROTOOPT = 92;
+const SOCKET_ENOSPC = 28;
+const SOCKET_ENOSR = 63;
+const SOCKET_ENOSTR = 60;
+const SOCKET_ENOSYS = 38;
+const SOCKET_ENOTBLK = 15;
+const SOCKET_ENOTCONN = 107;
+const SOCKET_ENOTDIR = 20;
+const SOCKET_ENOTEMPTY = 39;
+const SOCKET_ENOTSOCK = 88;
+const SOCKET_ENOTTY = 25;
+const SOCKET_ENOTUNIQ = 76;
+const SOCKET_ENXIO = 6;
+const SOCKET_EOPNOTSUPP = 95;
+const SOCKET_EPERM = 1;
+const SOCKET_EPFNOSUPPORT = 96;
+const SOCKET_EPIPE = 32;
+const SOCKET_EPROTO = 71;
+const SOCKET_EPROTONOSUPPORT = 93;
+const SOCKET_EPROTOTYPE = 91;
+const SOCKET_EREMCHG = 78;
+const SOCKET_EREMOTE = 66;
+const SOCKET_EREMOTEIO = 121;
+const SOCKET_ERESTART = 85;
+const SOCKET_EROFS = 30;
+const SOCKET_ESHUTDOWN = 108;
+const SOCKET_ESOCKTNOSUPPORT = 94;
+const SOCKET_ESPIPE = 29;
+const SOCKET_ESRMNT = 69;
+const SOCKET_ESTRPIPE = 86;
+const SOCKET_ETIME = 62;
+const SOCKET_ETIMEDOUT = 110;
+const SOCKET_ETOOMANYREFS = 109;
+const SOCKET_EUNATCH = 49;
+const SOCKET_EUSERS = 87;
+const SOCKET_EWOULDBLOCK = 11;
+const SOCKET_EXDEV = 18;
+const SOCKET_EXFULL = 54;
+const SOCK_DGRAM = 2;
+const SOCK_RAW = 3;
+const SOCK_RDM = 4;
+const SOCK_SEQPACKET = 5;
+const SOCK_STREAM = 1;
+const SOL_SOCKET = 1;
+const SOL_TCP = 6;
+const SOL_UDP = 17;
+const SOMAXCONN = 128;
+const SO_BINDTODEVICE = 25;
+const SO_BROADCAST = 6;
+const SO_DEBUG = 1;
+const SO_DONTROUTE = 5;
+const SO_ERROR = 4;
+const SO_KEEPALIVE = 9;
+const SO_LINGER = 13;
+const SO_OOBINLINE = 10;
+const SO_PASSCRED = 16;
+const SO_RCVBUF = 8;
+const SO_RCVLOWAT = 18;
+const SO_RCVTIMEO = 20;
+const SO_REUSEADDR = 2;
+const SO_REUSEPORT = 15;
+const SO_SNDBUF = 7;
+const SO_SNDLOWAT = 19;
+const SO_SNDTIMEO = 21;
+const SO_TYPE = 3;
+const TCP_NODELAY = 1;
+}