Index: /lib/shariff-backend-php-master/.editorconfig
===================================================================
--- /lib/shariff-backend-php-master/.editorconfig	(revision 5534)
+++ /lib/shariff-backend-php-master/.editorconfig	(revision 5534)
@@ -0,0 +1,35 @@
+# This file is for unifying the coding style for different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[**.js]
+indent_style = space
+indent_size = 4
+
+# Tabs in less
+[**.less]
+indent_style = tab
+indent_size = 2
+
+[**.css]
+indent_style = tab
+indent_size = 2
+
+[**.php]
+indent_style = space
+indent_size = 4
+
+[**.html]
+indent_style = tab
+indent_size = 2
+
+[composer.json]
+indent_style = space
+indent_size = 4
Index: /lib/shariff-backend-php-master/.gitignore
===================================================================
--- /lib/shariff-backend-php-master/.gitignore	(revision 5534)
+++ /lib/shariff-backend-php-master/.gitignore	(revision 5534)
@@ -0,0 +1,14 @@
+# Created by https://www.gitignore.io
+
+build/
+shariff-backend-php.zip
+shariff-backend-php.tar.gz
+
+### Composer ###
+composer.phar
+vendor/
+.php_cs.cache
+
+# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
+# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
+# composer.lock
Index: /lib/shariff-backend-php-master/.php_cs
===================================================================
--- /lib/shariff-backend-php-master/.php_cs	(revision 5534)
+++ /lib/shariff-backend-php-master/.php_cs	(revision 5534)
@@ -0,0 +1,23 @@
+<?php
+
+$finder = Symfony\CS\Finder\DefaultFinder::create()
+    ->in(array(__DIR__.'/src'))
+    ->exclude(array('Tests/Fixtures'))
+;
+
+return Symfony\CS\Config\Config::create()
+    ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
+    ->fixers(array(
+        '-unalign_double_arrow',
+        '-unalign_equals',
+        'align_double_arrow',
+        'newline_after_open_tag',
+        'ordered_use',
+        'short_array_syntax',
+        'php_unit_construct',
+        'php_unit_strict',
+        'linefeed',
+        'eof_ending'
+    ))
+    ->setUsingCache(true)
+    ->finder($finder);
Index: /lib/shariff-backend-php-master/.travis.yml
===================================================================
--- /lib/shariff-backend-php-master/.travis.yml	(revision 5534)
+++ /lib/shariff-backend-php-master/.travis.yml	(revision 5534)
@@ -0,0 +1,42 @@
+language: php
+
+sudo: false
+
+php:
+ - 5.5
+ - 5.6
+ - 7.0
+
+before_script:
+ - bash -c 'if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;'
+ - composer self-update
+ - composer install --prefer-dist --no-interaction
+ - composer require "squizlabs/php_codesniffer=*"
+
+script:
+ - bash -c 'vendor/bin/phpcs --standard=PSR2 src/ tests/'
+ - vendor/bin/phpunit --coverage-text
+ - make cs_dry_run
+
+addons:
+ apt:
+  packages:
+   - p7zip-full
+
+before_deploy:
+ - bash build.sh
+ - 7z a -tzip shariff-backend-php.zip ./build/*
+ - 7z a -ttar -so shariff-backend-php.tar ./build/* | 7z a -si shariff-backend-php.tar.gz
+
+deploy:
+  provider: releases
+  api_key:
+    secure: jbEPfD2xopoDQBGTJsrGvwhvb5MZislQowvHtsJ7f+B9seS9FGVc8Yq2kcqGX+8I8DyI5RCu3UlorGVnOQrxT9yxHVEK8PGjqOSCgRZw8p3jZmoNzrN7Qi+5YjCXxrAEKbT0nFYvis1DJqbuLOOU9+DBP6JWKmYvrtCjNSIxRIY=
+  file:
+   - shariff-backend-php.zip
+   - shariff-backend-php.tar.gz
+  skip_cleanup: true
+  on:
+    repo: heiseonline/shariff-backend-php
+    tags: true
+    php: 5.6
Index: /lib/shariff-backend-php-master/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,66 @@
+# Changelog
+
+## TBD
+
+* Clarified description of domains parameter. (cmb69)
+
+## 5.2.3 2016-04-01
+
+* Fixed backwards compatibility break. (liayn)
+
+## 5.2.2 2016-03-31
+
+* Re-release of 5.2.1 because of wrong tag.
+
+## 5.2.1 2016-03-31
+
+* Fixed handling of Guzzle request options. (liayn)
+* Removed non CLI command from composer. (core23)
+
+## 5.2.0 2016-02-24
+
+* Added support for blank domains. (core23)
+* Fixed possible error caused by deprecation warning. (core23)
+
+## 5.1.0 2016-02-18
+
+* Added support for multiple domains. (liayn, core23, compeak)
+* Improved checking of Facebook configuration. (liayn)
+
+## 5.0.0 2016-02-03
+
+* Added support for PHP 7. (core23, liayn)
+* Dropped support for HHVM. (core23, liayn)
+
+## 4.1.0 2016-02-01
+
+* Cleaned up PHPDoc comments. (core23)
+* Improved exception handling of Facebook backend. (core23)
+* Added logger. (core23)
+* Added PHP-CS-Fixer to standardise code format. (core23)
+
+## 4.0.2 2016-01-27
+
+* Fixed array keys not being checked for existence. (liayn, wmtech-1)
+* Fixed encoding of urls passed to Facebook. (liayn, hokascha)
+
+## 4.0.1 2016-01-11
+
+* Re-added necessary dependencies.
+
+## 4.0.0 2016-01-07
+
+* Cleaned up dependencies. (core23)
+* Dropped support for PHP 5.4. (core23)
+
+## 3.0.1 2015-12-03
+
+* Updated installation instructions.
+* Optimized build process.
+
+## 3.0.0 2015-12-02
+
+* Removed build artifacts from repository.
+* Cleaned up testing. (liayn)
+* Fixed phpUnit dependencies. (liayn)
+* Introduced changelog.
Index: /lib/shariff-backend-php-master/Makefile
===================================================================
--- /lib/shariff-backend-php-master/Makefile	(revision 5534)
+++ /lib/shariff-backend-php-master/Makefile	(revision 5534)
@@ -0,0 +1,5 @@
+cs:
+	vendor/bin/php-cs-fixer fix --verbose
+
+cs_dry_run:
+	vendor/bin/php-cs-fixer fix --verbose --dry-run
Index: /lib/shariff-backend-php-master/README.md
===================================================================
--- /lib/shariff-backend-php-master/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/README.md	(revision 5534)
@@ -0,0 +1,155 @@
+# Shariff PHP Backend [![Build Status](https://travis-ci.org/heiseonline/shariff-backend-php.svg?branch=master)](https://travis-ci.org/heiseonline/shariff-backend-php) [![Dependency Status](https://www.versioneye.com/php/heise:shariff/badge.svg)](https://www.versioneye.com/php/heise:shariff) [![Code Climate](https://codeclimate.com/github/heiseonline/shariff-backend-php/badges/gpa.svg)](https://codeclimate.com/github/heiseonline/shariff-backend-php)
+
+
+Shariff is used to determine how often a page is shared in social media, but without generating requests from the displaying page to the social sites.
+
+![Shariff Logo Â© 2014 Heise Zeitschriften Verlag](http://www.heise.de/icons/ho/shariff-logo.png)
+
+This document describes the PHP backend. The following backends are also available:
+
+* [shariff-backend-node](https://github.com/heiseonline/shariff-backend-node)
+* [shariff-backend-perl](https://github.com/heiseonline/shariff-backend-perl)
+
+Supported services
+------------------
+- AddThis
+- Facebook
+- Flattr
+- GooglePlus
+- LinkedIn
+- Pinterest
+- Reddit
+- StumbleUpon
+- Xing
+
+Requirements
+------------
+
+To run Shariff PHP Backend on your server you need one of these PHP versions:
+
+* 5.5
+* 5.6
+* 7.0
+
+Older versions and HHVM are not supported.
+
+Installing the Shariff backend on you own server
+------------------------------------------------
+
+To run Shariff under a certain URL, unzip the [release](https://github.com/heiseonline/shariff-backend-php/releases) zip file into a directory under the document root of your web server.
+
+This zip file contains a configuration file `shariff.json`. The following configuration options are available:
+
+| Key         | Type | Description |
+|-------------|------|-------------|
+| `cacheClass` | `string` | *Optional* Cache class name. Has to implement `Heise\Shariff\CacheInterface`. Defaults to internal Zend Cache. |
+| `cache` | `object`  | File cache settings, which are passed on to the Cache class. See description below. |
+| `domains` | `array` | Domains for which share counts may be requested. If empty, all domains are allowed. |
+| `services` | `array` | List of services to be enabled. See [Supported services](#supported-services). |
+
+##### Cache settings:
+
+By default Shariff uses the Filesystem cache. By specifying a different adapter from Zend\Cache\Storage\Adapter you can tell Shariff to use another cache. Also you can specify options for that cache adapter
+
+| Key         | Type | Description |
+|-------------|------|-------------|
+| `ttl` | `integer` | Time that the counts are cached (in seconds) |
+| `cacheDir` | `string` | Directory used for the cache. Default: system temp directory |
+| `adapter` | `string` | Name of cache adapter (e.g. Apc, Memcache, etc.) |
+| `adapterOptions` | `object` | Options for the cache adapter |
+
+*These option apply for the default Cache class (`ZendCache`) only. If you implement custom caching, you can specify your own options.*
+
+##### Client options
+
+The backend uses [Guzzle](http://docs.guzzlephp.org/en/latest/) as HTTP client. Guzzle has many options that you can set, e.g. timeout and connect_timeout. See http://docs.guzzlephp.org/en/latest/request-options.html for a detailed list.
+In order to set those options pass them in the json with the key "client".
+
+| Key         | Type | Description |
+|-------------|------|-------------|
+| `client` | `object` | Guzzle request options |
+
+##### Service Settings
+
+To pass config options to a service, you can add them to the json as well under the name of the service. Currently only the Facebook service has options for an facebook application id and client secret in order to use the graph api id method to get the current share count.
+
+| Key         | Type | Description |
+|-------------|------|-------------|
+| `servicename` | `object` | options for the service |
+
+##### Facebook service options
+
+To use the graph api id method to fetch the share count you need to set up an application at facebook.com and pass in the application id and client secret to the options. It seems that the id method returns the most current share count, but it can be only used with an registered application.
+
+| Key         | Type | Description |
+|-------------|------|-------------|
+| `app_id` | `string` | the id of your facebook application |
+| `secret` | `string` | the client secret of your facebook application |
+
+##### Full config example
+
+```js
+{
+	"cacheClass": "Heise\\Shariff\\ZendCache",
+	"cache": {
+		"ttl": 60,
+		"cacheDir": "/tmp/shariff/cache",
+		"adapter": "Filesystem",
+		"adapterOptions": {
+			// ...
+		}
+	},
+	"client": {
+		"timeout": 4.2,
+		// ... (see "Client options")
+	},
+	"domains": [
+		"www.example.com",
+		"www.example.net"
+	],
+	"services": [
+		"GooglePlus",
+		"Facebook",
+		"LinkedIn",
+		"Reddit",
+		"StumbleUpon",
+		"Flattr",
+		"Pinterest",
+		"Xing",
+		"AddThis"
+	],
+	"Facebook": {
+		"app_id": "1234567890",
+		"secret": "terces"
+	}
+}
+```
+
+
+Testing your installation
+-------------------------
+
+If the backend runs under `http://example.com/my-shariff-backend/`, calling the URL `http://example.com/my-shariff-backend/?url=http%3A%2F%2Fwww.example.com` should return a JSON structure with numbers in it, e.g.:
+
+```json
+{"facebook":1452,"googleplus":23,"linkedin":118,"reddit":7,"stumbleupon":4325,"flattr":0,"pinterest":3,"addthis":33}
+```
+
+
+Shariff OO interface
+--------------------
+
+If you need more control, you can invoke Shariff in your own PHP code. The following snippet should get you started. `$options` are identical to those described above.
+
+```php
+use Heise\Shariff\Backend;
+
+$options = [
+	"domains"  => ["www.heise.de", "www.ct.de"],
+	"cache"    => ["ttl" => 1],
+	"services" => ["Facebook", "GooglePlus", "LinkedIn", "Reddit", "StumbleUpon", "Flattr", "Pinterest", "AddThis"]
+];
+$shariff = new Backend($options);
+$counts = $shariff->get("http://www.heise.de/");
+echo $counts["facebook"];
+```
Index: /lib/shariff-backend-php-master/build.sh
===================================================================
--- /lib/shariff-backend-php-master/build.sh	(revision 5534)
+++ /lib/shariff-backend-php-master/build.sh	(revision 5534)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+mkdir -p build
+rm -fr build/*
+composer install --prefer-dist --no-dev
+cp index.php build
+cp shariff.json build
+cp -a vendor build
+cp -a src build
+composer install
Index: /lib/shariff-backend-php-master/composer.json
===================================================================
--- /lib/shariff-backend-php-master/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/composer.json	(revision 5534)
@@ -0,0 +1,40 @@
+{
+    "name": "heise/shariff",
+    "repositories": [
+        {
+            "type": "vcs",
+            "url": "https://github.com/heiseonline/shariff-backend-php.git"
+        }
+    ],
+    "keywords": ["heise", "social buttons", "shariff"],
+    "description": "PHP backend for Shariff. Shariff enables website users to share their favorite content without compromising their privacy.",
+    "homepage": "https://github.com/heiseonline/shariff-backend-php",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Philipp Busse",
+            "email": "pmb@heise.de"
+        }
+    ],
+    "require": {
+    	"php": ">=5.5.0",
+        "guzzlehttp/guzzle": "~6.1",
+        "psr/log": "1.0.0",
+        "zendframework/zend-cache": "*",
+        "zendframework/zend-json": "*",
+        "zendframework/zend-config": "*"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "~4.8",
+        "fabpot/php-cs-fixer": "~1.0"
+    },
+    "config": {
+        "optimize-autoloader": true
+    },
+    "autoload": {
+        "psr-4": { "Heise\\Shariff\\": "src" }
+    },
+    "autoload-dev": {
+        "psr-4": { "Heise\\Tests\\Shariff\\": "tests" }
+    }
+}
Index: /lib/shariff-backend-php-master/composer.lock
===================================================================
--- /lib/shariff-backend-php-master/composer.lock	(revision 5534)
+++ /lib/shariff-backend-php-master/composer.lock	(revision 5534)
@@ -0,0 +1,2073 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "This file is @generated automatically"
+    ],
+    "hash": "1baeb2dcea3a8103f04c9fd34073133c",
+    "content-hash": "0b2a1970836ea88e52bafd37c66a4f78",
+    "packages": [
+        {
+            "name": "container-interop/container-interop",
+            "version": "1.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/container-interop/container-interop.git",
+                "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e",
+                "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e",
+                "shasum": ""
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Interop\\Container\\": "src/Interop/Container/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
+            "time": "2014-12-30 15:22:37"
+        },
+        {
+            "name": "guzzlehttp/guzzle",
+            "version": "6.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/guzzle.git",
+                "reference": "c6851d6e48f63b69357cbfa55bca116448140e0c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/c6851d6e48f63b69357cbfa55bca116448140e0c",
+                "reference": "c6851d6e48f63b69357cbfa55bca116448140e0c",
+                "shasum": ""
+            },
+            "require": {
+                "guzzlehttp/promises": "~1.0",
+                "guzzlehttp/psr7": "~1.1",
+                "php": ">=5.5.0"
+            },
+            "require-dev": {
+                "ext-curl": "*",
+                "phpunit/phpunit": "~4.0",
+                "psr/log": "~1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "6.1-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions_include.php"
+                ],
+                "psr-4": {
+                    "GuzzleHttp\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Guzzle is a PHP HTTP client library",
+            "homepage": "http://guzzlephp.org/",
+            "keywords": [
+                "client",
+                "curl",
+                "framework",
+                "http",
+                "http client",
+                "rest",
+                "web service"
+            ],
+            "time": "2015-11-23 00:47:50"
+        },
+        {
+            "name": "guzzlehttp/promises",
+            "version": "1.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/promises.git",
+                "reference": "b1e1c0d55f8083c71eda2c28c12a228d708294ea"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/b1e1c0d55f8083c71eda2c28c12a228d708294ea",
+                "reference": "b1e1c0d55f8083c71eda2c28c12a228d708294ea",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\Promise\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Guzzle promises library",
+            "keywords": [
+                "promise"
+            ],
+            "time": "2015-10-15 22:28:00"
+        },
+        {
+            "name": "guzzlehttp/psr7",
+            "version": "1.2.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/psr7.git",
+                "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+                "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0",
+                "psr/http-message": "~1.0"
+            },
+            "provide": {
+                "psr/http-message-implementation": "1.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\Psr7\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "PSR-7 message implementation",
+            "keywords": [
+                "http",
+                "message",
+                "stream",
+                "uri"
+            ],
+            "time": "2016-01-23 01:23:02"
+        },
+        {
+            "name": "psr/http-message",
+            "version": "1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-message.git",
+                "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
+                "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP messages",
+            "keywords": [
+                "http",
+                "http-message",
+                "psr",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "time": "2015-05-04 20:22:00"
+        },
+        {
+            "name": "psr/log",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
+                "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+                "shasum": ""
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "Psr\\Log\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "time": "2012-12-21 11:40:51"
+        },
+        {
+            "name": "zendframework/zend-cache",
+            "version": "2.5.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-cache.git",
+                "reference": "7ff9d6b922ae29dbdc53f6a62b471fb6e58565df"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/7ff9d6b922ae29dbdc53f6a62b471fb6e58565df",
+                "reference": "7ff9d6b922ae29dbdc53f6a62b471fb6e58565df",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5",
+                "zendframework/zend-eventmanager": "~2.5",
+                "zendframework/zend-servicemanager": "~2.5",
+                "zendframework/zend-stdlib": "~2.5"
+            },
+            "require-dev": {
+                "fabpot/php-cs-fixer": "1.7.*",
+                "phpunit/phpunit": "~4.0",
+                "zendframework/zend-serializer": "~2.5",
+                "zendframework/zend-session": "~2.5"
+            },
+            "suggest": {
+                "ext-apcu": "APCU, to use the APC storage adapter",
+                "ext-dba": "DBA, to use the DBA storage adapter",
+                "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter",
+                "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter",
+                "ext-mongo": "Mongo, to use MongoDb storage adapter",
+                "ext-redis": "Redis, to use Redis storage adapter",
+                "ext-wincache": "WinCache, to use the WinCache storage adapter",
+                "ext-xcache": "XCache, to use the XCache storage adapter",
+                "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement",
+                "zendframework/zend-serializer": "Zend\\Serializer component",
+                "zendframework/zend-session": "Zend\\Session component"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.5-dev",
+                    "dev-develop": "2.6-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\Cache\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "provides a generic way to cache any data",
+            "homepage": "https://github.com/zendframework/zend-cache",
+            "keywords": [
+                "cache",
+                "zf2"
+            ],
+            "time": "2015-09-15 16:09:09"
+        },
+        {
+            "name": "zendframework/zend-config",
+            "version": "2.6.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-config.git",
+                "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-config/zipball/2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d",
+                "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.5 || ^7.0",
+                "zendframework/zend-stdlib": "^2.7 || ^3.0"
+            },
+            "require-dev": {
+                "fabpot/php-cs-fixer": "1.7.*",
+                "phpunit/phpunit": "~4.0",
+                "zendframework/zend-filter": "^2.6",
+                "zendframework/zend-i18n": "^2.5",
+                "zendframework/zend-json": "^2.6.1",
+                "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
+            },
+            "suggest": {
+                "zendframework/zend-filter": "Zend\\Filter component",
+                "zendframework/zend-i18n": "Zend\\I18n component",
+                "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
+                "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.6-dev",
+                    "dev-develop": "2.7-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\Config\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "provides a nested object property based user interface for accessing this configuration data within application code",
+            "homepage": "https://github.com/zendframework/zend-config",
+            "keywords": [
+                "config",
+                "zf2"
+            ],
+            "time": "2016-02-04 23:01:10"
+        },
+        {
+            "name": "zendframework/zend-eventmanager",
+            "version": "2.6.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-eventmanager.git",
+                "reference": "b4354f75f694504d32e7d080641854f830acb865"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/b4354f75f694504d32e7d080641854f830acb865",
+                "reference": "b4354f75f694504d32e7d080641854f830acb865",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5",
+                "zendframework/zend-stdlib": "~2.5"
+            },
+            "require-dev": {
+                "athletic/athletic": "dev-master",
+                "fabpot/php-cs-fixer": "1.7.*",
+                "phpunit/phpunit": "~4.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.6-dev",
+                    "dev-develop": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\EventManager\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "homepage": "https://github.com/zendframework/zend-eventmanager",
+            "keywords": [
+                "eventmanager",
+                "zf2"
+            ],
+            "time": "2016-01-12 23:08:36"
+        },
+        {
+            "name": "zendframework/zend-hydrator",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-hydrator.git",
+                "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f",
+                "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5",
+                "zendframework/zend-stdlib": "^2.5.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0",
+                "squizlabs/php_codesniffer": "^2.0@dev",
+                "zendframework/zend-eventmanager": "^2.5.1",
+                "zendframework/zend-filter": "^2.5.1",
+                "zendframework/zend-inputfilter": "^2.5.1",
+                "zendframework/zend-serializer": "^2.5.1",
+                "zendframework/zend-servicemanager": "^2.5.1"
+            },
+            "suggest": {
+                "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
+                "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage",
+                "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
+                "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev",
+                    "dev-develop": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\Hydrator\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "homepage": "https://github.com/zendframework/zend-hydrator",
+            "keywords": [
+                "hydrator",
+                "zf2"
+            ],
+            "time": "2015-09-17 14:06:43"
+        },
+        {
+            "name": "zendframework/zend-json",
+            "version": "2.6.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-json.git",
+                "reference": "4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-json/zipball/4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28",
+                "reference": "4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.5 || ^7.0"
+            },
+            "require-dev": {
+                "fabpot/php-cs-fixer": "1.7.*",
+                "phpunit/phpunit": "~4.0",
+                "zendframework/zend-http": "^2.5.4",
+                "zendframework/zend-server": "^2.6.1",
+                "zendframework/zend-stdlib": "^2.5 || ^3.0",
+                "zendframework/zendxml": "^1.0.2"
+            },
+            "suggest": {
+                "zendframework/zend-http": "Zend\\Http component, required to use Zend\\Json\\Server",
+                "zendframework/zend-server": "Zend\\Server component, required to use Zend\\Json\\Server",
+                "zendframework/zend-stdlib": "Zend\\Stdlib component, for use with caching Zend\\Json\\Server responses",
+                "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.6-dev",
+                    "dev-develop": "2.7-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\Json\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
+            "homepage": "https://github.com/zendframework/zend-json",
+            "keywords": [
+                "json",
+                "zf2"
+            ],
+            "time": "2016-02-04 21:20:26"
+        },
+        {
+            "name": "zendframework/zend-servicemanager",
+            "version": "2.7.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-servicemanager.git",
+                "reference": "fb5b54db5ead533b38e311f14e9c01a79218bf2b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/fb5b54db5ead533b38e311f14e9c01a79218bf2b",
+                "reference": "fb5b54db5ead533b38e311f14e9c01a79218bf2b",
+                "shasum": ""
+            },
+            "require": {
+                "container-interop/container-interop": "~1.0",
+                "php": "^5.5 || ^7.0"
+            },
+            "require-dev": {
+                "athletic/athletic": "dev-master",
+                "fabpot/php-cs-fixer": "1.7.*",
+                "phpunit/phpunit": "~4.0",
+                "zendframework/zend-di": "~2.5",
+                "zendframework/zend-mvc": "~2.5"
+            },
+            "suggest": {
+                "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services",
+                "zendframework/zend-di": "Zend\\Di component"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.7-dev",
+                    "dev-develop": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\ServiceManager\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "homepage": "https://github.com/zendframework/zend-servicemanager",
+            "keywords": [
+                "servicemanager",
+                "zf2"
+            ],
+            "time": "2016-02-02 14:11:46"
+        },
+        {
+            "name": "zendframework/zend-stdlib",
+            "version": "2.7.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/zendframework/zend-stdlib.git",
+                "reference": "cae029346a33663b998507f94962eb27de060683"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cae029346a33663b998507f94962eb27de060683",
+                "reference": "cae029346a33663b998507f94962eb27de060683",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5",
+                "zendframework/zend-hydrator": "~1.0"
+            },
+            "require-dev": {
+                "athletic/athletic": "~0.1",
+                "fabpot/php-cs-fixer": "1.7.*",
+                "phpunit/phpunit": "~4.0",
+                "zendframework/zend-config": "~2.5",
+                "zendframework/zend-eventmanager": "~2.5",
+                "zendframework/zend-filter": "~2.5",
+                "zendframework/zend-inputfilter": "~2.5",
+                "zendframework/zend-serializer": "~2.5",
+                "zendframework/zend-servicemanager": "~2.5"
+            },
+            "suggest": {
+                "zendframework/zend-eventmanager": "To support aggregate hydrator usage",
+                "zendframework/zend-filter": "To support naming strategy hydrator usage",
+                "zendframework/zend-serializer": "Zend\\Serializer component",
+                "zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.7-dev",
+                    "dev-develop": "2.8-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Zend\\Stdlib\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "homepage": "https://github.com/zendframework/zend-stdlib",
+            "keywords": [
+                "stdlib",
+                "zf2"
+            ],
+            "time": "2015-10-15 15:57:32"
+        }
+    ],
+    "packages-dev": [
+        {
+            "name": "doctrine/instantiator",
+            "version": "1.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/instantiator.git",
+                "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+                "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3,<8.0-DEV"
+            },
+            "require-dev": {
+                "athletic/athletic": "~0.1.8",
+                "ext-pdo": "*",
+                "ext-phar": "*",
+                "phpunit/phpunit": "~4.0",
+                "squizlabs/php_codesniffer": "~2.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com",
+                    "homepage": "http://ocramius.github.com/"
+                }
+            ],
+            "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+            "homepage": "https://github.com/doctrine/instantiator",
+            "keywords": [
+                "constructor",
+                "instantiate"
+            ],
+            "time": "2015-06-14 21:17:01"
+        },
+        {
+            "name": "fabpot/php-cs-fixer",
+            "version": "v1.11.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
+                "reference": "2c9f8298181f059c5077abda78019b9a0c9a7cc0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/2c9f8298181f059c5077abda78019b9a0c9a7cc0",
+                "reference": "2c9f8298181f059c5077abda78019b9a0c9a7cc0",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": ">=5.3.6",
+                "sebastian/diff": "~1.1",
+                "symfony/console": "~2.3|~3.0",
+                "symfony/event-dispatcher": "~2.1|~3.0",
+                "symfony/filesystem": "~2.1|~3.0",
+                "symfony/finder": "~2.1|~3.0",
+                "symfony/process": "~2.3|~3.0",
+                "symfony/stopwatch": "~2.5|~3.0"
+            },
+            "require-dev": {
+                "satooshi/php-coveralls": "0.7.*@dev"
+            },
+            "bin": [
+                "php-cs-fixer"
+            ],
+            "type": "application",
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\CS\\": "Symfony/CS/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Dariusz RumiÅski",
+                    "email": "dariusz.ruminski@gmail.com"
+                },
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                }
+            ],
+            "description": "A tool to automatically fix PHP code style",
+            "time": "2016-01-20 19:00:28"
+        },
+        {
+            "name": "phpdocumentor/reflection-docblock",
+            "version": "2.0.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+                "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
+                "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0"
+            },
+            "suggest": {
+                "dflydev/markdown": "~1.0",
+                "erusev/parsedown": "~1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "phpDocumentor": [
+                        "src/"
+                    ]
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "mike.vanriel@naenius.com"
+                }
+            ],
+            "time": "2015-02-03 12:10:50"
+        },
+        {
+            "name": "phpspec/prophecy",
+            "version": "v1.5.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpspec/prophecy.git",
+                "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+                "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.0.2",
+                "phpdocumentor/reflection-docblock": "~2.0",
+                "sebastian/comparator": "~1.1"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "~2.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Prophecy\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Konstantin Kudryashov",
+                    "email": "ever.zet@gmail.com",
+                    "homepage": "http://everzet.com"
+                },
+                {
+                    "name": "Marcello Duarte",
+                    "email": "marcello.duarte@gmail.com"
+                }
+            ],
+            "description": "Highly opinionated mocking framework for PHP 5.3+",
+            "homepage": "https://github.com/phpspec/prophecy",
+            "keywords": [
+                "Double",
+                "Dummy",
+                "fake",
+                "mock",
+                "spy",
+                "stub"
+            ],
+            "time": "2015-08-13 10:07:40"
+        },
+        {
+            "name": "phpunit/php-code-coverage",
+            "version": "2.2.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+                "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+                "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "phpunit/php-file-iterator": "~1.3",
+                "phpunit/php-text-template": "~1.2",
+                "phpunit/php-token-stream": "~1.3",
+                "sebastian/environment": "^1.3.2",
+                "sebastian/version": "~1.0"
+            },
+            "require-dev": {
+                "ext-xdebug": ">=2.1.4",
+                "phpunit/phpunit": "~4"
+            },
+            "suggest": {
+                "ext-dom": "*",
+                "ext-xdebug": ">=2.2.1",
+                "ext-xmlwriter": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+            "keywords": [
+                "coverage",
+                "testing",
+                "xunit"
+            ],
+            "time": "2015-10-06 15:47:00"
+        },
+        {
+            "name": "phpunit/php-file-iterator",
+            "version": "1.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+                "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+                "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+            "keywords": [
+                "filesystem",
+                "iterator"
+            ],
+            "time": "2015-06-21 13:08:43"
+        },
+        {
+            "name": "phpunit/php-text-template",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-text-template.git",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Simple template engine.",
+            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+            "keywords": [
+                "template"
+            ],
+            "time": "2015-06-21 13:50:34"
+        },
+        {
+            "name": "phpunit/php-timer",
+            "version": "1.0.7",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-timer.git",
+                "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+                "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Utility class for timing",
+            "homepage": "https://github.com/sebastianbergmann/php-timer/",
+            "keywords": [
+                "timer"
+            ],
+            "time": "2015-06-21 08:01:12"
+        },
+        {
+            "name": "phpunit/php-token-stream",
+            "version": "1.4.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+                "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+                "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Wrapper around PHP's tokenizer extension.",
+            "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+            "keywords": [
+                "tokenizer"
+            ],
+            "time": "2015-09-15 10:49:45"
+        },
+        {
+            "name": "phpunit/phpunit",
+            "version": "4.8.22",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit.git",
+                "reference": "dfb11aa5236376b4fc63853cf746af39fe780e72"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/dfb11aa5236376b4fc63853cf746af39fe780e72",
+                "reference": "dfb11aa5236376b4fc63853cf746af39fe780e72",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-json": "*",
+                "ext-pcre": "*",
+                "ext-reflection": "*",
+                "ext-spl": "*",
+                "php": ">=5.3.3",
+                "phpspec/prophecy": "^1.3.1",
+                "phpunit/php-code-coverage": "~2.1",
+                "phpunit/php-file-iterator": "~1.4",
+                "phpunit/php-text-template": "~1.2",
+                "phpunit/php-timer": ">=1.0.6",
+                "phpunit/phpunit-mock-objects": "~2.3",
+                "sebastian/comparator": "~1.1",
+                "sebastian/diff": "~1.2",
+                "sebastian/environment": "~1.3",
+                "sebastian/exporter": "~1.2",
+                "sebastian/global-state": "~1.0",
+                "sebastian/version": "~1.0",
+                "symfony/yaml": "~2.1|~3.0"
+            },
+            "suggest": {
+                "phpunit/php-invoker": "~1.1"
+            },
+            "bin": [
+                "phpunit"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.8.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "The PHP Unit Testing framework.",
+            "homepage": "https://phpunit.de/",
+            "keywords": [
+                "phpunit",
+                "testing",
+                "xunit"
+            ],
+            "time": "2016-02-02 09:01:21"
+        },
+        {
+            "name": "phpunit/phpunit-mock-objects",
+            "version": "2.3.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+                "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+                "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.0.2",
+                "php": ">=5.3.3",
+                "phpunit/php-text-template": "~1.2",
+                "sebastian/exporter": "~1.2"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "suggest": {
+                "ext-soap": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.3.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Mock Object library for PHPUnit",
+            "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+            "keywords": [
+                "mock",
+                "xunit"
+            ],
+            "time": "2015-10-02 06:51:40"
+        },
+        {
+            "name": "sebastian/comparator",
+            "version": "1.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/comparator.git",
+                "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
+                "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "sebastian/diff": "~1.2",
+                "sebastian/exporter": "~1.2"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides the functionality to compare PHP values for equality",
+            "homepage": "http://www.github.com/sebastianbergmann/comparator",
+            "keywords": [
+                "comparator",
+                "compare",
+                "equality"
+            ],
+            "time": "2015-07-26 15:48:44"
+        },
+        {
+            "name": "sebastian/diff",
+            "version": "1.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/diff.git",
+                "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
+                "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.8"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Kore Nordmann",
+                    "email": "mail@kore-nordmann.de"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Diff implementation",
+            "homepage": "https://github.com/sebastianbergmann/diff",
+            "keywords": [
+                "diff"
+            ],
+            "time": "2015-12-08 07:14:41"
+        },
+        {
+            "name": "sebastian/environment",
+            "version": "1.3.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/environment.git",
+                "reference": "6e7133793a8e5a5714a551a8324337374be209df"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df",
+                "reference": "6e7133793a8e5a5714a551a8324337374be209df",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides functionality to handle HHVM/PHP environments",
+            "homepage": "http://www.github.com/sebastianbergmann/environment",
+            "keywords": [
+                "Xdebug",
+                "environment",
+                "hhvm"
+            ],
+            "time": "2015-12-02 08:37:27"
+        },
+        {
+            "name": "sebastian/exporter",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/exporter.git",
+                "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
+                "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "sebastian/recursion-context": "~1.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides the functionality to export PHP variables for visualization",
+            "homepage": "http://www.github.com/sebastianbergmann/exporter",
+            "keywords": [
+                "export",
+                "exporter"
+            ],
+            "time": "2015-06-21 07:55:53"
+        },
+        {
+            "name": "sebastian/global-state",
+            "version": "1.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/global-state.git",
+                "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
+                "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.2"
+            },
+            "suggest": {
+                "ext-uopz": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Snapshotting of global state",
+            "homepage": "http://www.github.com/sebastianbergmann/global-state",
+            "keywords": [
+                "global state"
+            ],
+            "time": "2015-10-12 03:26:01"
+        },
+        {
+            "name": "sebastian/recursion-context",
+            "version": "1.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/recursion-context.git",
+                "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
+                "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides functionality to recursively process PHP variables",
+            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "time": "2015-11-11 19:50:13"
+        },
+        {
+            "name": "sebastian/version",
+            "version": "1.0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/version.git",
+                "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+                "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+                "shasum": ""
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+            "homepage": "https://github.com/sebastianbergmann/version",
+            "time": "2015-06-21 13:59:46"
+        },
+        {
+            "name": "symfony/console",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/console.git",
+                "reference": "5a02eaadaa285e2bb727eb6bbdfb8201fcd971b0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/console/zipball/5a02eaadaa285e2bb727eb6bbdfb8201fcd971b0",
+                "reference": "5a02eaadaa285e2bb727eb6bbdfb8201fcd971b0",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9",
+                "symfony/polyfill-mbstring": "~1.0"
+            },
+            "require-dev": {
+                "psr/log": "~1.0",
+                "symfony/event-dispatcher": "~2.8|~3.0",
+                "symfony/process": "~2.8|~3.0"
+            },
+            "suggest": {
+                "psr/log": "For using the console logger",
+                "symfony/event-dispatcher": "",
+                "symfony/process": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Console\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Console Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-02-02 13:44:19"
+        },
+        {
+            "name": "symfony/event-dispatcher",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/event-dispatcher.git",
+                "reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa",
+                "reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "require-dev": {
+                "psr/log": "~1.0",
+                "symfony/config": "~2.8|~3.0",
+                "symfony/dependency-injection": "~2.8|~3.0",
+                "symfony/expression-language": "~2.8|~3.0",
+                "symfony/stopwatch": "~2.8|~3.0"
+            },
+            "suggest": {
+                "symfony/dependency-injection": "",
+                "symfony/http-kernel": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\EventDispatcher\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony EventDispatcher Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-01-27 05:14:46"
+        },
+        {
+            "name": "symfony/filesystem",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/filesystem.git",
+                "reference": "064ac12afd2ceb8a2c1bfb7bed8e931c6dd1997f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/064ac12afd2ceb8a2c1bfb7bed8e931c6dd1997f",
+                "reference": "064ac12afd2ceb8a2c1bfb7bed8e931c6dd1997f",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Filesystem\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Filesystem Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-01-27 11:34:55"
+        },
+        {
+            "name": "symfony/finder",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/finder.git",
+                "reference": "623bda0abd9aa29e529c8e9c08b3b84171914723"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/finder/zipball/623bda0abd9aa29e529c8e9c08b3b84171914723",
+                "reference": "623bda0abd9aa29e529c8e9c08b3b84171914723",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Finder\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Finder Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-01-27 05:14:46"
+        },
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "1289d16209491b584839022f29257ad859b8532d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d",
+                "reference": "1289d16209491b584839022f29257ad859b8532d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2016-01-20 09:13:37"
+        },
+        {
+            "name": "symfony/process",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/process.git",
+                "reference": "dfecef47506179db2501430e732adbf3793099c8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/process/zipball/dfecef47506179db2501430e732adbf3793099c8",
+                "reference": "dfecef47506179db2501430e732adbf3793099c8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Process\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Process Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-02-02 13:44:19"
+        },
+        {
+            "name": "symfony/stopwatch",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/stopwatch.git",
+                "reference": "4a204804952ff267ace88cf499e0b4bb302a475e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/4a204804952ff267ace88cf499e0b4bb302a475e",
+                "reference": "4a204804952ff267ace88cf499e0b4bb302a475e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Stopwatch\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Stopwatch Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-01-03 15:35:16"
+        },
+        {
+            "name": "symfony/yaml",
+            "version": "v3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/yaml.git",
+                "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/3cf0709d7fe936e97bee9e954382e449003f1d9a",
+                "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Yaml\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Yaml Component",
+            "homepage": "https://symfony.com",
+            "time": "2016-02-02 13:44:19"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": {
+        "php": ">=5.5.0"
+    },
+    "platform-dev": []
+}
Index: /lib/shariff-backend-php-master/index.php
===================================================================
--- /lib/shariff-backend-php-master/index.php	(revision 5534)
+++ /lib/shariff-backend-php-master/index.php	(revision 5534)
@@ -0,0 +1,26 @@
+<?php
+
+require_once __DIR__.'/vendor/autoload.php';
+
+use Heise\Shariff\Backend;
+use Zend\Config\Reader\Json;
+
+class Application
+{
+    public static function run()
+    {
+        header('Content-type: application/json');
+
+        if (!isset($_GET["url"])) {
+            echo json_encode(null);
+            return;
+        }
+
+        $reader = new Json();
+
+        $shariff = new Backend($reader->fromFile('shariff.json'));
+        echo json_encode($shariff->get($_GET["url"]));
+    }
+}
+
+Application::run();
Index: /lib/shariff-backend-php-master/phpunit.xml.dist
===================================================================
--- /lib/shariff-backend-php-master/phpunit.xml.dist	(revision 5534)
+++ /lib/shariff-backend-php-master/phpunit.xml.dist	(revision 5534)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="false"
+         backupStaticAttributes="false"
+         colors="true"
+         convertErrorsToExceptions="true"
+         convertNoticesToExceptions="true"
+         convertWarningsToExceptions="true"
+         processIsolation="false"
+         stopOnFailure="false"
+         syntaxCheck="false"
+         bootstrap="./vendor/autoload.php"
+>
+    <testsuites>
+        <testsuite name="Shariff Test Suite">
+            <directory>./tests/</directory>
+        </testsuite>
+    </testsuites>
+
+    <filter>
+        <whitelist>
+            <directory>./src/</directory>
+        </whitelist>
+    </filter>
+</phpunit>
Index: /lib/shariff-backend-php-master/shariff.json
===================================================================
--- /lib/shariff-backend-php-master/shariff.json	(revision 5534)
+++ /lib/shariff-backend-php-master/shariff.json	(revision 5534)
@@ -0,0 +1,15 @@
+{
+	"cache": {
+		"ttl": 60
+	},
+	"domains": [
+		"www.example.com"
+	],
+	"services": [
+		"Facebook"
+	],
+	"Facebook": {
+		"app_id": "415496041837509",
+		"secret": "582d37ce94cfbd1f40b0ed7e16d11fa6"
+	}
+}
Index: /lib/shariff-backend-php-master/src/Backend.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend.php	(revision 5534)
@@ -0,0 +1,70 @@
+<?php
+
+namespace Heise\Shariff;
+
+use GuzzleHttp\Client;
+use Heise\Shariff\Backend\BackendManager;
+use Heise\Shariff\Backend\ServiceFactory;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class Backend.
+ */
+class Backend
+{
+    /** @var BackendManager */
+    protected $backendManager;
+
+    /**
+     * @param array $config
+     */
+    public function __construct($config)
+    {
+        $domains = $config['domains'];
+        // stay compatible to old configs
+        if (isset($config['domain'])) {
+            array_push($domains, $config['domain']);
+        }
+
+        $clientOptions = [];
+        if (isset($config['client'])) {
+            $clientOptions = $config['client'];
+        }
+        $client = new Client($clientOptions);
+        $baseCacheKey = md5(json_encode($config));
+
+        if (isset($config['cacheClass'])) {
+            $cacheClass = $config['cacheClass'];
+        } else {
+            $cacheClass = 'Heise\\Shariff\\ZendCache';
+        }
+        $cache = new $cacheClass($config['cache']);
+
+        $serviceFactory = new ServiceFactory($client);
+        $this->backendManager = new BackendManager(
+            $baseCacheKey,
+            $cache,
+            $client,
+            $domains,
+            $serviceFactory->getServicesByName($config['services'], $config)
+        );
+    }
+
+    /**
+     * @param string $url
+     *
+     * @return array
+     */
+    public function get($url)
+    {
+        return $this->backendManager->get($url);
+    }
+
+    /**
+     * @param LoggerInterface $logger
+     */
+    public function setLogger(LoggerInterface $logger)
+    {
+        $this->backendManager->setLogger($logger);
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/AddThis.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/AddThis.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/AddThis.php	(revision 5534)
@@ -0,0 +1,36 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class AddThis.
+ */
+class AddThis extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'addthis';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request(
+            'GET',
+            'http://api-public.addthis.com/url/shares.json?url='.urlencode($url)
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        return isset($data['shares']) ? $data['shares'] : 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/BackendManager.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/BackendManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/BackendManager.php	(revision 5534)
@@ -0,0 +1,146 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+use GuzzleHttp\ClientInterface;
+use GuzzleHttp\Exception\TransferException;
+use GuzzleHttp\Pool;
+use Heise\Shariff\CacheInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class BackendManager.
+ */
+class BackendManager
+{
+    /** @var string */
+    protected $baseCacheKey;
+
+    /** @var CacheInterface */
+    protected $cache;
+
+    /** @var ClientInterface */
+    protected $client;
+
+    /** @var array */
+    protected $domains = [];
+
+    /** @var ServiceInterface[] */
+    protected $services;
+
+    /** @var LoggerInterface */
+    protected $logger;
+
+    /**
+     * @param string             $baseCacheKey
+     * @param CacheInterface     $cache
+     * @param ClientInterface    $client
+     * @param array|string       $domains
+     * @param ServiceInterface[] $services
+     */
+    public function __construct(
+        $baseCacheKey,
+        CacheInterface $cache,
+        ClientInterface $client,
+        $domains,
+        array $services
+    ) {
+        $this->baseCacheKey = $baseCacheKey;
+        $this->cache = $cache;
+        $this->client = $client;
+        if (is_array($domains)) {
+            $this->domains = $domains;
+        } elseif (is_string($domains)) {
+            trigger_error(
+                'Passing a domain string is deprecated since 5.1, please use an array instead.',
+                E_USER_DEPRECATED
+            );
+            $this->domains = [$domains];
+        }
+        $this->services = $services;
+    }
+
+    /**
+     * @param string $url
+     *
+     * @return bool
+     */
+    private function isValidDomain($url)
+    {
+        if (!empty($this->domains)) {
+            $parsed = parse_url($url);
+
+            return in_array($parsed['host'], $this->domains, true);
+        }
+
+        return true;
+    }
+
+    /**
+     * @param LoggerInterface $logger
+     */
+    public function setLogger(LoggerInterface $logger = null)
+    {
+        $this->logger = $logger;
+    }
+
+    /**
+     * @param string $url
+     *
+     * @return array|mixed|null
+     */
+    public function get($url)
+    {
+
+        // Aenderungen an der Konfiguration invalidieren den Cache
+        $cache_key = md5($url.$this->baseCacheKey);
+
+        if (!filter_var($url, FILTER_VALIDATE_URL)) {
+            return;
+        }
+
+        if ($this->cache->hasItem($cache_key)) {
+            return json_decode($this->cache->getItem($cache_key), true);
+        }
+
+        if (!$this->isValidDomain($url)) {
+            return;
+        }
+
+        $requests = array_map(
+            function ($service) use ($url) {
+                /* @var ServiceInterface $service */
+                return $service->getRequest($url);
+            },
+            $this->services
+        );
+
+        /** @var ResponseInterface[] $results */
+        $results = Pool::batch($this->client, $requests);
+
+        $counts = [];
+        $i = 0;
+        foreach ($this->services as $service) {
+            if ($results[$i] instanceof TransferException) {
+                if ($this->logger !== null) {
+                    $this->logger->warning($results[$i]->getMessage(), ['exception' => $results[$i]]);
+                }
+            } else {
+                try {
+                    $content = $service->filterResponse($results[$i]->getBody()->getContents());
+                    $counts[$service->getName()] = (int) $service->extractCount(json_decode($content, true));
+                } catch (\Exception $e) {
+                    if ($this->logger !== null) {
+                        $this->logger->warning($e->getMessage(), ['exception' => $e]);
+                    }
+                }
+                ++$i;
+            }
+        }
+
+        $this->cache->setItem($cache_key, json_encode($counts));
+
+        return $counts;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/Facebook.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/Facebook.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/Facebook.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Class Facebook.
+ */
+class Facebook extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'facebook';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        $accessToken = $this->getAccessToken();
+        if (null !== $accessToken) {
+            $query = 'https://graph.facebook.com/v2.2/?id='.urlencode($url).'&'.$accessToken;
+        } else {
+            $query = 'https://graph.facebook.com/fql?q='
+                     .urlencode('SELECT total_count FROM link_stat WHERE url="'.$url.'"');
+        }
+
+        return new \GuzzleHttp\Psr7\Request('GET', $query);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        if (isset($data['data']) && isset($data['data'][0]) && isset($data['data'][0]['total_count'])) {
+            return $data['data'][0]['total_count'];
+        }
+        if (isset($data['share']) && isset($data['share']['share_count'])) {
+            return $data['share']['share_count'];
+        }
+
+        return 0;
+    }
+
+    /**
+     * @return StreamInterface|null
+     */
+    protected function getAccessToken()
+    {
+        if (!empty($this->config['app_id']) && !empty($this->config['secret'])) {
+            $url = 'https://graph.facebook.com/oauth/access_token?client_id='.urlencode($this->config['app_id'])
+                   .'&client_secret='.urlencode($this->config['secret']).'&grant_type=client_credentials';
+            $response = $this->client->request('GET', $url);
+
+            return $response->getBody();
+        }
+
+        return;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/Flattr.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/Flattr.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/Flattr.php	(revision 5534)
@@ -0,0 +1,36 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class Flattr.
+ */
+class Flattr extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'flattr';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request(
+            'GET',
+            'https://api.flattr.com/rest/v2/things/lookup/?url='.urlencode($url)
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        return (isset($data['flattrs'])) ? $data['flattrs'] : 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/GooglePlus.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/GooglePlus.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/GooglePlus.php	(revision 5534)
@@ -0,0 +1,57 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+use GuzzleHttp\Psr7;
+
+/**
+ * Class GooglePlus.
+ */
+class GooglePlus extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'googleplus';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        $gPlusUrl = 'https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ';
+        $json = [
+            'method' => 'pos.plusones.get',
+            'id'     => 'p',
+            'params' => [
+                'nolog'   => 'true',
+                'id'      => $url,
+                'source'  => 'widget',
+                'userId'  => '@viewer',
+                'groupId' => '@self',
+            ],
+            'jsonrpc'    => '2.0',
+            'key'        => 'p',
+            'apiVersion' => 'v1',
+        ];
+
+        $body = Psr7\stream_for(json_encode($json));
+
+        return new \GuzzleHttp\Psr7\Request('POST', $gPlusUrl, [], $body);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        if (!empty($data['result']['metadata']['globalCounts']['count'])) {
+            return $data['result']['metadata']['globalCounts']['count'];
+        }
+
+        return 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/LinkedIn.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/LinkedIn.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/LinkedIn.php	(revision 5534)
@@ -0,0 +1,36 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class LinkedIn.
+ */
+class LinkedIn extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'linkedin';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request(
+            'GET',
+            'https://www.linkedin.com/countserv/count/share?url='.urlencode($url).'&lang=de_DE&format=json'
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        return isset($data['count']) ? $data['count'] : 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/Pinterest.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/Pinterest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/Pinterest.php	(revision 5534)
@@ -0,0 +1,44 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class Pinterest.
+ */
+class Pinterest extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'pinterest';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request(
+            'GET',
+            'http://api.pinterest.com/v1/urls/count.json?callback=x&url='.urlencode($url)
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function filterResponse($content)
+    {
+        return mb_substr($content, 2, mb_strlen($content) - 3);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        return isset($data['count']) ? $data['count'] : 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/Reddit.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/Reddit.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/Reddit.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class Reddit.
+ */
+class Reddit extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'reddit';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request('GET', 'https://www.reddit.com/api/info.json?url='.urlencode($url));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        $count = 0;
+        if (!empty($data['data']['children'])) {
+            foreach ($data['data']['children'] as $child) {
+                if (!empty($child['data']['score'])) {
+                    $count += $child['data']['score'];
+                }
+            }
+        }
+
+        return $count;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/Request.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/Request.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/Request.php	(revision 5534)
@@ -0,0 +1,60 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+use GuzzleHttp\ClientInterface;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Class Request.
+ */
+abstract class Request
+{
+    /** @var ClientInterface */
+    protected $client;
+
+    /** @var array */
+    protected $config;
+
+    /**
+     * @param ClientInterface $client
+     */
+    public function __construct(ClientInterface $client)
+    {
+        $this->client = $client;
+    }
+
+    /**
+     * @param string $url
+     * @param string $method
+     * @param array  $options This parameter is ignored and is only present for backwards compatibility reasons.
+     *
+     * @return RequestInterface
+     *
+     * @deprecated This method is not used anymore and will be removed with version 6.
+     *             Use \GuzzleHttp\Psr7\Request directly instead.
+     */
+    protected function createRequest($url, $method = 'GET', $options = [])
+    {
+        trigger_error('This method is not used anymore and will be removed with version 6.'
+                    .' Use \GuzzleHttp\Psr7\Request directly instead.', E_USER_DEPRECATED);
+
+        return new \GuzzleHttp\Psr7\Request($method, $url);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function filterResponse($content)
+    {
+        return $content;
+    }
+
+    /**
+     * @param array $config
+     */
+    public function setConfig(array $config)
+    {
+        $this->config = $config;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/ServiceFactory.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/ServiceFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/ServiceFactory.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+use GuzzleHttp\ClientInterface;
+
+/**
+ * Class ServiceFactory.
+ */
+class ServiceFactory
+{
+    /** @var ClientInterface */
+    protected $client;
+
+    /** @var ServiceInterface[] */
+    protected $serviceMap = [];
+
+    /**
+     * @param ClientInterface $client
+     */
+    public function __construct(ClientInterface $client)
+    {
+        $this->client = $client;
+    }
+
+    /**
+     * @param string           $name
+     * @param ServiceInterface $service
+     */
+    public function registerService($name, ServiceInterface $service)
+    {
+        $this->serviceMap[$name] = $service;
+    }
+
+    /**
+     * @param array $serviceNames
+     * @param array $config
+     *
+     * @return array
+     */
+    public function getServicesByName(array $serviceNames, array $config)
+    {
+        $services = [];
+        foreach ($serviceNames as $serviceName) {
+            $services[] = $this->createService($serviceName, $config);
+        }
+
+        return $services;
+    }
+
+    /**
+     * @param string $serviceName
+     * @param array  $config
+     *
+     * @return ServiceInterface
+     */
+    protected function createService($serviceName, array $config)
+    {
+        if (isset($this->serviceMap[$serviceName])) {
+            $service = $this->serviceMap[$serviceName];
+        } else {
+            $serviceClass = 'Heise\\Shariff\\Backend\\'.$serviceName;
+            $service = new $serviceClass($this->client);
+        }
+
+        if (isset($config[$serviceName])) {
+            $service->setConfig($config[$serviceName]);
+        }
+
+        return $service;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/ServiceInterface.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/ServiceInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/ServiceInterface.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Interface ServiceInterface.
+ */
+interface ServiceInterface
+{
+    /**
+     * @param string $url
+     *
+     * @return RequestInterface
+     */
+    public function getRequest($url);
+
+    /**
+     * @param array $data
+     *
+     * @return int
+     */
+    public function extractCount(array $data);
+
+    /**
+     * @return string
+     */
+    public function getName();
+
+    /**
+     * @param string $content
+     *
+     * @return string
+     */
+    public function filterResponse($content);
+
+    /**
+     * @param array $config
+     */
+    public function setConfig(array $config);
+}
Index: /lib/shariff-backend-php-master/src/Backend/StumbleUpon.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/StumbleUpon.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/StumbleUpon.php	(revision 5534)
@@ -0,0 +1,36 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class StumbleUpon.
+ */
+class StumbleUpon extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'stumbleupon';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request(
+            'GET',
+            'https://www.stumbleupon.com/services/1.01/badge.getinfo?url='.urlencode($url)
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        return (isset($data['result']['views'])) ? $data['result']['views'] + 0 : 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/Backend/Xing.php
===================================================================
--- /lib/shariff-backend-php-master/src/Backend/Xing.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/Backend/Xing.php	(revision 5534)
@@ -0,0 +1,36 @@
+<?php
+
+namespace Heise\Shariff\Backend;
+
+/**
+ * Class Xing.
+ */
+class Xing extends Request implements ServiceInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'xing';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getRequest($url)
+    {
+        return new \GuzzleHttp\Psr7\Request(
+            'POST',
+            'https://www.xing-share.com/spi/shares/statistics?url='.urlencode($url)
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extractCount(array $data)
+    {
+        return isset($data['share_counter']) ? $data['share_counter'] : 0;
+    }
+}
Index: /lib/shariff-backend-php-master/src/CacheInterface.php
===================================================================
--- /lib/shariff-backend-php-master/src/CacheInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/CacheInterface.php	(revision 5534)
@@ -0,0 +1,37 @@
+<?php
+
+namespace Heise\Shariff;
+
+/**
+ * Generic Cache Interface.
+ *
+ * @author Markus Klein <markus.klein@typo3.org>
+ */
+interface CacheInterface
+{
+    /**
+     * Set cache entry.
+     *
+     * @param string $key
+     * @param string $content
+     */
+    public function setItem($key, $content);
+
+    /**
+     * Get cache entry.
+     *
+     * @param string $key
+     *
+     * @return string
+     */
+    public function getItem($key);
+
+    /**
+     * Check if cache entry exists.
+     *
+     * @param string $key
+     *
+     * @return bool
+     */
+    public function hasItem($key);
+}
Index: /lib/shariff-backend-php-master/src/ZendCache.php
===================================================================
--- /lib/shariff-backend-php-master/src/ZendCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/src/ZendCache.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+
+namespace Heise\Shariff;
+
+use Zend\Cache\Storage\Adapter\FilesystemOptions;
+use Zend\Cache\Storage\ClearExpiredInterface;
+use Zend\Cache\Storage\StorageInterface;
+use Zend\Cache\StorageFactory;
+
+/**
+ * Implement ZendCache.
+ */
+class ZendCache implements CacheInterface
+{
+    /**
+     * @var StorageInterface
+     */
+    protected $cache;
+
+    /**
+     * @param array $configuration
+     *
+     * @throws \Zend\Cache\Exception\InvalidArgumentException
+     * @throws \Zend\Cache\Exception\RuntimeException
+     */
+    public function __construct(array $configuration)
+    {
+        if (!isset($configuration['adapter'])) {
+            $configuration['adapter'] = 'Filesystem';
+        }
+
+        if (!isset($configuration['adapterOptions'])) {
+            $configuration['adapterOptions'] = [];
+        }
+
+        $cache = StorageFactory::factory([
+            'adapter' => [
+                'name'    => $configuration['adapter'],
+                'options' => $configuration['adapterOptions'],
+            ],
+        ]);
+
+        $options = $cache->getOptions();
+        $options->setNamespace('Shariff');
+        $options->setTtl($configuration['ttl']);
+
+        if ($options instanceof FilesystemOptions) {
+            $options->setCacheDir(isset($configuration['cacheDir']) ? $configuration['cacheDir'] : sys_get_temp_dir());
+        }
+
+        if ($cache instanceof ClearExpiredInterface) {
+            if (function_exists('register_postsend_function')) {
+                // for hhvm installations: executing after response / session close
+                register_postsend_function(function () use ($cache) {
+                    $cache->clearExpired();
+                });
+            } else {
+                // default
+                $cache->clearExpired();
+            }
+        }
+
+        $this->cache = $cache;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setItem($key, $content)
+    {
+        $this->cache->setItem($key, $content);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getItem($key)
+    {
+        return $this->cache->getItem($key);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function hasItem($key)
+    {
+        return $this->cache->hasItem($key);
+    }
+}
Index: /lib/shariff-backend-php-master/test.sh
===================================================================
--- /lib/shariff-backend-php-master/test.sh	(revision 5534)
+++ /lib/shariff-backend-php-master/test.sh	(revision 5534)
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+phpcs --standard=PSR2 src/ tests/
+vendor/bin/phpunit
Index: /lib/shariff-backend-php-master/tests/FacebookTest.php
===================================================================
--- /lib/shariff-backend-php-master/tests/FacebookTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/tests/FacebookTest.php	(revision 5534)
@@ -0,0 +1,69 @@
+<?php
+
+namespace Heise\Tests\Shariff;
+
+use GuzzleHttp\ClientInterface;
+use Heise\Shariff\Backend\Facebook;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Class FacebookTest
+ */
+class FacebookTest extends \PHPUnit_Framework_TestCase
+{
+    public function testConfig()
+    {
+        /** @var ClientInterface|\PHPUnit_Framework_MockObject_MockObject $client */
+        $client = $this->getMock(ClientInterface::class);
+
+        $response = $this->getMock(ResponseInterface::class);
+
+        $response
+          ->method('getBody')
+          ->willReturn('access_token=tokem')
+        ;
+
+        $client->expects($this->at(0))
+          ->method('request')
+          ->with(
+              'GET',
+              'https://graph.facebook.com/oauth/access_token'
+              . '?client_id=foo&client_secret=bar&grant_type=client_credentials'
+          )
+          ->willReturn($response)
+        ;
+
+        $facebook = new Facebook($client);
+        $facebook->setConfig(array('app_id' => 'foo', 'secret' => 'bar'));
+        $facebook->getRequest('http://www.heise.de');
+    }
+
+    public function testUsesGraphApi()
+    {
+        /** @var \GuzzleHttp\Client|\PHPUnit_Framework_MockObject_MockObject $client */
+        $client = $this->getMock(ClientInterface::class);
+
+        $response = $this->getMock(ResponseInterface::class);
+
+        $response
+          ->method('getBody')
+          ->willReturn('access_token=token')
+        ;
+
+        $client->expects($this->once())
+            ->method('request')
+            ->willReturn($response)
+        ;
+
+        $facebook = new Facebook($client);
+        $facebook->setConfig(array('app_id' => 'foo', 'secret' => 'bar'));
+        $request = $facebook->getRequest('http://www.heise.de');
+
+        $this->assertEquals('graph.facebook.com', $request->getUri()->getHost());
+        $this->assertEquals('/v2.2/', $request->getUri()->getPath());
+        $this->assertEquals(
+            'id='.urlencode('http://www.heise.de').'&access_token=token',
+            $request->getUri()->getQuery()
+        );
+    }
+}
Index: /lib/shariff-backend-php-master/tests/ServiceFactoryTest.php
===================================================================
--- /lib/shariff-backend-php-master/tests/ServiceFactoryTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/tests/ServiceFactoryTest.php	(revision 5534)
@@ -0,0 +1,57 @@
+<?php
+
+namespace Heise\Tests\Shariff;
+
+use GuzzleHttp\ClientInterface;
+use Heise\Shariff\Backend\ServiceFactory;
+use Heise\Shariff\Backend\ServiceInterface;
+
+/**
+ * Class ServiceFactoryTest
+ */
+class ServiceFactoryTest extends \PHPUnit_Framework_TestCase
+{
+
+    public function testSetConfig()
+    {
+        /** @var ServiceInterface|\PHPUnit_Framework_MockObject_MockObject $mockService */
+        $mockService = $this->getMockBuilder(ServiceInterface::class)->getMock();
+
+        $mockService->expects($this->once())
+            ->method('setConfig')
+            ->with(array('foo' => 'bar'))
+        ;
+
+        /** @var ClientInterface|\PHPUnit_Framework_MockObject_MockObject $mockClient */
+        $mockClient = $this->getMock(ClientInterface::class);
+
+        $serviceFactory = new ServiceFactory($mockClient);
+        $serviceFactory->registerService('MockService', $mockService);
+
+        $services = $serviceFactory->getServicesByName(
+            array('MockService'),
+            array('MockService' => array('foo' => 'bar'))
+        );
+        $this->assertCount(1, $services);
+    }
+
+    public function testConfigNotSet()
+    {
+        /** @var ServiceInterface|\PHPUnit_Framework_MockObject_MockObject $mockService */
+        $mockService = $this->getMockBuilder(ServiceInterface::class)->getMock();
+
+        $mockService->expects($this->never())->method('setConfig');
+
+        /** @var ClientInterface|\PHPUnit_Framework_MockObject_MockObject $mockClient */
+        $mockClient = $this->getMock(ClientInterface::class);
+
+        $serviceFactory = new ServiceFactory($mockClient);
+        $serviceFactory->registerService('MockService', $mockService);
+
+        $services = $serviceFactory->getServicesByName(
+            array('MockService'),
+            array('OtherService' => array('foo' => 'bar'))
+        );
+        $this->assertCount(1, $services);
+    }
+}
Index: /lib/shariff-backend-php-master/tests/ShariffTest.php
===================================================================
--- /lib/shariff-backend-php-master/tests/ShariffTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/tests/ShariffTest.php	(revision 5534)
@@ -0,0 +1,138 @@
+<?php
+namespace Heise\Tests\Shariff;
+
+use Heise\Shariff\Backend;
+use Zend\Cache\Exception\ExtensionNotLoadedException;
+use Zend\Cache\Exception\OutOfSpaceException;
+
+/**
+ * Class ShariffTest
+ */
+class ShariffTest extends \PHPUnit_Framework_TestCase
+{
+    /***
+     * @var string[]
+     */
+    protected $services = array(
+        "Facebook",
+        // "Flattr",
+        "GooglePlus",
+        "LinkedIn",
+        "Pinterest",
+        "Reddit",
+        "StumbleUpon",
+        "Xing"
+    );
+
+    public function testShariff()
+    {
+        $shariff = new Backend(array(
+            "domains"   => array('www.heise.de'),
+            "cache"    => array("ttl" => 1),
+            "services" => $this->services
+        ));
+
+        $counts = $shariff->get('http://www.heise.de');
+
+        $this->assertArrayHasKey('facebook', $counts);
+        $this->assertInternalType('int', $counts['facebook']);
+        $this->assertGreaterThanOrEqual(0, $counts['facebook']);
+
+        // $this->assertArrayHasKey('flattr', $counts);
+        // $this->assertInternalType('int', $counts['flattr']);
+        // $this->assertGreaterThanOrEqual(0, $counts['flattr']);
+
+        $this->assertArrayHasKey('googleplus', $counts);
+        $this->assertInternalType('int', $counts['googleplus']);
+        $this->assertGreaterThanOrEqual(0, $counts['googleplus']);
+
+        $this->assertArrayHasKey('linkedin', $counts);
+        $this->assertInternalType('int', $counts['linkedin']);
+        $this->assertGreaterThanOrEqual(0, $counts['linkedin']);
+
+        $this->assertArrayHasKey('pinterest', $counts);
+        $this->assertInternalType('int', $counts['pinterest']);
+        $this->assertGreaterThanOrEqual(0, $counts['pinterest']);
+
+        $this->assertArrayHasKey('stumbleupon', $counts);
+        $this->assertInternalType('int', $counts['stumbleupon']);
+        $this->assertGreaterThanOrEqual(0, $counts['stumbleupon']);
+
+        // It seems Xing and reddit are blocking Travis from time to time - maybe caused by DOS protection
+        if (!getenv("TRAVIS")) {
+            $this->assertArrayHasKey('xing', $counts);
+            $this->assertInternalType('int', $counts['xing']);
+            $this->assertGreaterThanOrEqual(0, $counts['xing']);
+
+            $this->assertArrayHasKey('reddit', $counts);
+            $this->assertInternalType('int', $counts['reddit']);
+            $this->assertGreaterThanOrEqual(0, $counts['reddit']);
+        }
+    }
+
+    public function testInvalidDomain()
+    {
+        $shariff = new Backend(array(
+            "domains"   => array('www.heise.de'),
+            "cache"    => array("ttl" => 0),
+            "services" => $this->services
+        ));
+
+        $counts = $shariff->get('http://example.com');
+
+        $this->assertNull($counts);
+    }
+
+    public function testApcCache()
+    {
+        if ('hhvm' == getenv('TRAVIS_PHP_VERSION')) {
+            $this->markTestSkipped('APC seems to work for hhvm');
+        }
+
+        $this->setExpectedException(ExtensionNotLoadedException::class);
+        new Backend(array(
+            "domains"   => array('www.heise.de'),
+            "cache"    => array("adapter" => "Apc", "ttl" => 0),
+            "services" => $this->services
+        ));
+        $this->fail('APC should not be enabled for test');
+    }
+
+    public function testCacheOptions()
+    {
+        $this->setExpectedException(OutOfSpaceException::class);
+        $shariff = new Backend(array(
+            "domains"   => array('www.heise.de'),
+            "cache"    => array(
+                "adapter" => "Memory",
+                "adapterOptions" => array("memoryLimit" => 10),
+                "ttl" => 0
+            ),
+            "services" => $this->services
+        ));
+        $shariff->get('http://www.heise.de');
+        $this->fail('10 bytes should not be enough for the cache');
+    }
+
+    public function testClientOptions()
+    {
+        $this->markTestSkipped(
+            "Some APIs are too fast for this. We need mock APIs."
+        );
+
+        $shariff = new Backend(array(
+            "domains"   => array('www.heise.de'),
+            "cache"    => array("ttl" => 1),
+            "services" => $this->services,
+            "client" => array(
+                "timeout" => 0.005,
+                "connect_timeout" => 0.005
+            )
+        ));
+
+        $counts = $shariff->get('http://www.heise.de');
+
+        // expect no response in 5 ms
+        $this->assertCount(0, $counts);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/autoload.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/autoload.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/autoload.php	(revision 5534)
@@ -0,0 +1,7 @@
+<?php
+
+// autoload.php @generated by Composer
+
+require_once __DIR__ . '/composer' . '/autoload_real.php';
+
+return ComposerAutoloaderInit01adeaa7c40df3eadac741908028d402::getLoader();
Index: /lib/shariff-backend-php-master/vendor/bin/phpcbf
===================================================================
--- /lib/shariff-backend-php-master/vendor/bin/phpcbf	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/bin/phpcbf	(revision 5534)
@@ -0,0 +1,1 @@
+../squizlabs/php_codesniffer/scripts/phpcbf
Index: /lib/shariff-backend-php-master/vendor/bin/phpcs
===================================================================
--- /lib/shariff-backend-php-master/vendor/bin/phpcs	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/bin/phpcs	(revision 5534)
@@ -0,0 +1,1 @@
+../squizlabs/php_codesniffer/scripts/phpcs
Index: /lib/shariff-backend-php-master/vendor/composer/ClassLoader.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/ClassLoader.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/ClassLoader.php	(revision 5534)
@@ -0,0 +1,413 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ *     Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ *     $loader = new \Composer\Autoload\ClassLoader();
+ *
+ *     // register classes with namespaces
+ *     $loader->add('Symfony\Component', __DIR__.'/component');
+ *     $loader->add('Symfony',           __DIR__.'/framework');
+ *
+ *     // activate the autoloader
+ *     $loader->register();
+ *
+ *     // to enable searching the include path (eg. for PEAR packages)
+ *     $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see    http://www.php-fig.org/psr/psr-0/
+ * @see    http://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+    // PSR-4
+    private $prefixLengthsPsr4 = array();
+    private $prefixDirsPsr4 = array();
+    private $fallbackDirsPsr4 = array();
+
+    // PSR-0
+    private $prefixesPsr0 = array();
+    private $fallbackDirsPsr0 = array();
+
+    private $useIncludePath = false;
+    private $classMap = array();
+
+    private $classMapAuthoritative = false;
+
+    public function getPrefixes()
+    {
+        if (!empty($this->prefixesPsr0)) {
+            return call_user_func_array('array_merge', $this->prefixesPsr0);
+        }
+
+        return array();
+    }
+
+    public function getPrefixesPsr4()
+    {
+        return $this->prefixDirsPsr4;
+    }
+
+    public function getFallbackDirs()
+    {
+        return $this->fallbackDirsPsr0;
+    }
+
+    public function getFallbackDirsPsr4()
+    {
+        return $this->fallbackDirsPsr4;
+    }
+
+    public function getClassMap()
+    {
+        return $this->classMap;
+    }
+
+    /**
+     * @param array $classMap Class to filename map
+     */
+    public function addClassMap(array $classMap)
+    {
+        if ($this->classMap) {
+            $this->classMap = array_merge($this->classMap, $classMap);
+        } else {
+            $this->classMap = $classMap;
+        }
+    }
+
+    /**
+     * Registers a set of PSR-0 directories for a given prefix, either
+     * appending or prepending to the ones previously set for this prefix.
+     *
+     * @param string       $prefix  The prefix
+     * @param array|string $paths   The PSR-0 root directories
+     * @param bool         $prepend Whether to prepend the directories
+     */
+    public function add($prefix, $paths, $prepend = false)
+    {
+        if (!$prefix) {
+            if ($prepend) {
+                $this->fallbackDirsPsr0 = array_merge(
+                    (array) $paths,
+                    $this->fallbackDirsPsr0
+                );
+            } else {
+                $this->fallbackDirsPsr0 = array_merge(
+                    $this->fallbackDirsPsr0,
+                    (array) $paths
+                );
+            }
+
+            return;
+        }
+
+        $first = $prefix[0];
+        if (!isset($this->prefixesPsr0[$first][$prefix])) {
+            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+            return;
+        }
+        if ($prepend) {
+            $this->prefixesPsr0[$first][$prefix] = array_merge(
+                (array) $paths,
+                $this->prefixesPsr0[$first][$prefix]
+            );
+        } else {
+            $this->prefixesPsr0[$first][$prefix] = array_merge(
+                $this->prefixesPsr0[$first][$prefix],
+                (array) $paths
+            );
+        }
+    }
+
+    /**
+     * Registers a set of PSR-4 directories for a given namespace, either
+     * appending or prepending to the ones previously set for this namespace.
+     *
+     * @param string       $prefix  The prefix/namespace, with trailing '\\'
+     * @param array|string $paths   The PSR-4 base directories
+     * @param bool         $prepend Whether to prepend the directories
+     *
+     * @throws \InvalidArgumentException
+     */
+    public function addPsr4($prefix, $paths, $prepend = false)
+    {
+        if (!$prefix) {
+            // Register directories for the root namespace.
+            if ($prepend) {
+                $this->fallbackDirsPsr4 = array_merge(
+                    (array) $paths,
+                    $this->fallbackDirsPsr4
+                );
+            } else {
+                $this->fallbackDirsPsr4 = array_merge(
+                    $this->fallbackDirsPsr4,
+                    (array) $paths
+                );
+            }
+        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+            // Register directories for a new namespace.
+            $length = strlen($prefix);
+            if ('\\' !== $prefix[$length - 1]) {
+                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+            }
+            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+            $this->prefixDirsPsr4[$prefix] = (array) $paths;
+        } elseif ($prepend) {
+            // Prepend directories for an already registered namespace.
+            $this->prefixDirsPsr4[$prefix] = array_merge(
+                (array) $paths,
+                $this->prefixDirsPsr4[$prefix]
+            );
+        } else {
+            // Append directories for an already registered namespace.
+            $this->prefixDirsPsr4[$prefix] = array_merge(
+                $this->prefixDirsPsr4[$prefix],
+                (array) $paths
+            );
+        }
+    }
+
+    /**
+     * Registers a set of PSR-0 directories for a given prefix,
+     * replacing any others previously set for this prefix.
+     *
+     * @param string       $prefix The prefix
+     * @param array|string $paths  The PSR-0 base directories
+     */
+    public function set($prefix, $paths)
+    {
+        if (!$prefix) {
+            $this->fallbackDirsPsr0 = (array) $paths;
+        } else {
+            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+        }
+    }
+
+    /**
+     * Registers a set of PSR-4 directories for a given namespace,
+     * replacing any others previously set for this namespace.
+     *
+     * @param string       $prefix The prefix/namespace, with trailing '\\'
+     * @param array|string $paths  The PSR-4 base directories
+     *
+     * @throws \InvalidArgumentException
+     */
+    public function setPsr4($prefix, $paths)
+    {
+        if (!$prefix) {
+            $this->fallbackDirsPsr4 = (array) $paths;
+        } else {
+            $length = strlen($prefix);
+            if ('\\' !== $prefix[$length - 1]) {
+                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+            }
+            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+            $this->prefixDirsPsr4[$prefix] = (array) $paths;
+        }
+    }
+
+    /**
+     * Turns on searching the include path for class files.
+     *
+     * @param bool $useIncludePath
+     */
+    public function setUseIncludePath($useIncludePath)
+    {
+        $this->useIncludePath = $useIncludePath;
+    }
+
+    /**
+     * Can be used to check if the autoloader uses the include path to check
+     * for classes.
+     *
+     * @return bool
+     */
+    public function getUseIncludePath()
+    {
+        return $this->useIncludePath;
+    }
+
+    /**
+     * Turns off searching the prefix and fallback directories for classes
+     * that have not been registered with the class map.
+     *
+     * @param bool $classMapAuthoritative
+     */
+    public function setClassMapAuthoritative($classMapAuthoritative)
+    {
+        $this->classMapAuthoritative = $classMapAuthoritative;
+    }
+
+    /**
+     * Should class lookup fail if not found in the current class map?
+     *
+     * @return bool
+     */
+    public function isClassMapAuthoritative()
+    {
+        return $this->classMapAuthoritative;
+    }
+
+    /**
+     * Registers this instance as an autoloader.
+     *
+     * @param bool $prepend Whether to prepend the autoloader or not
+     */
+    public function register($prepend = false)
+    {
+        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+    }
+
+    /**
+     * Unregisters this instance as an autoloader.
+     */
+    public function unregister()
+    {
+        spl_autoload_unregister(array($this, 'loadClass'));
+    }
+
+    /**
+     * Loads the given class or interface.
+     *
+     * @param  string    $class The name of the class
+     * @return bool|null True if loaded, null otherwise
+     */
+    public function loadClass($class)
+    {
+        if ($file = $this->findFile($class)) {
+            includeFile($file);
+
+            return true;
+        }
+    }
+
+    /**
+     * Finds the path to the file where the class is defined.
+     *
+     * @param string $class The name of the class
+     *
+     * @return string|false The path if found, false otherwise
+     */
+    public function findFile($class)
+    {
+        // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
+        if ('\\' == $class[0]) {
+            $class = substr($class, 1);
+        }
+
+        // class map lookup
+        if (isset($this->classMap[$class])) {
+            return $this->classMap[$class];
+        }
+        if ($this->classMapAuthoritative) {
+            return false;
+        }
+
+        $file = $this->findFileWithExtension($class, '.php');
+
+        // Search for Hack files if we are running on HHVM
+        if ($file === null && defined('HHVM_VERSION')) {
+            $file = $this->findFileWithExtension($class, '.hh');
+        }
+
+        if ($file === null) {
+            // Remember that this class does not exist.
+            return $this->classMap[$class] = false;
+        }
+
+        return $file;
+    }
+
+    private function findFileWithExtension($class, $ext)
+    {
+        // PSR-4 lookup
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+        $first = $class[0];
+        if (isset($this->prefixLengthsPsr4[$first])) {
+            foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
+                if (0 === strpos($class, $prefix)) {
+                    foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
+                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
+                            return $file;
+                        }
+                    }
+                }
+            }
+        }
+
+        // PSR-4 fallback dirs
+        foreach ($this->fallbackDirsPsr4 as $dir) {
+            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+                return $file;
+            }
+        }
+
+        // PSR-0 lookup
+        if (false !== $pos = strrpos($class, '\\')) {
+            // namespaced class name
+            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+        } else {
+            // PEAR-like class name
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+        }
+
+        if (isset($this->prefixesPsr0[$first])) {
+            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+                if (0 === strpos($class, $prefix)) {
+                    foreach ($dirs as $dir) {
+                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+                            return $file;
+                        }
+                    }
+                }
+            }
+        }
+
+        // PSR-0 fallback dirs
+        foreach ($this->fallbackDirsPsr0 as $dir) {
+            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+                return $file;
+            }
+        }
+
+        // PSR-0 include paths.
+        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+            return $file;
+        }
+    }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+    include $file;
+}
Index: /lib/shariff-backend-php-master/vendor/composer/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/LICENSE	(revision 5534)
@@ -0,0 +1,21 @@
+
+Copyright (c) 2016 Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
Index: /lib/shariff-backend-php-master/vendor/composer/autoload_classmap.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/autoload_classmap.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/autoload_classmap.php	(revision 5534)
@@ -0,0 +1,705 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+    'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php',
+    'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php',
+    'Generic_Sniffs_Classes_DuplicateClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php',
+    'Generic_Sniffs_CodeAnalysis_EmptyStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',
+    'Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php',
+    'Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php',
+    'Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php',
+    'Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php',
+    'Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php',
+    'Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php',
+    'Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php',
+    'Generic_Sniffs_Commenting_DocCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php',
+    'Generic_Sniffs_Commenting_FixmeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php',
+    'Generic_Sniffs_Commenting_TodoSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php',
+    'Generic_Sniffs_ControlStructures_InlineControlStructureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php',
+    'Generic_Sniffs_Debug_CSSLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php',
+    'Generic_Sniffs_Debug_ClosureLinterSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php',
+    'Generic_Sniffs_Debug_JSHintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php',
+    'Generic_Sniffs_Files_ByteOrderMarkSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php',
+    'Generic_Sniffs_Files_EndFileNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php',
+    'Generic_Sniffs_Files_EndFileNoNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php',
+    'Generic_Sniffs_Files_InlineHTMLSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php',
+    'Generic_Sniffs_Files_LineEndingsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php',
+    'Generic_Sniffs_Files_LineLengthSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php',
+    'Generic_Sniffs_Files_LowercasedFilenameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php',
+    'Generic_Sniffs_Files_OneClassPerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php',
+    'Generic_Sniffs_Files_OneInterfacePerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php',
+    'Generic_Sniffs_Files_OneTraitPerFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php',
+    'Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php',
+    'Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
+    'Generic_Sniffs_Formatting_NoSpaceAfterCastSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php',
+    'Generic_Sniffs_Formatting_SpaceAfterCastSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php',
+    'Generic_Sniffs_Functions_CallTimePassByReferenceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php',
+    'Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',
+    'Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php',
+    'Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php',
+    'Generic_Sniffs_Metrics_CyclomaticComplexitySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php',
+    'Generic_Sniffs_Metrics_NestingLevelSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php',
+    'Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php',
+    'Generic_Sniffs_NamingConventions_ConstructorNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php',
+    'Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',
+    'Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php',
+    'Generic_Sniffs_PHP_ClosingPHPTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php',
+    'Generic_Sniffs_PHP_DeprecatedFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php',
+    'Generic_Sniffs_PHP_DisallowShortOpenTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',
+    'Generic_Sniffs_PHP_ForbiddenFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',
+    'Generic_Sniffs_PHP_LowerCaseConstantSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php',
+    'Generic_Sniffs_PHP_LowerCaseKeywordSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php',
+    'Generic_Sniffs_PHP_NoSilencedErrorsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php',
+    'Generic_Sniffs_PHP_SAPIUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php',
+    'Generic_Sniffs_PHP_SyntaxSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php',
+    'Generic_Sniffs_PHP_UpperCaseConstantSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php',
+    'Generic_Sniffs_Strings_UnnecessaryStringConcatSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php',
+    'Generic_Sniffs_VersionControl_SubversionPropertiesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php',
+    'Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php',
+    'Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php',
+    'Generic_Sniffs_WhiteSpace_ScopeIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php',
+    'GuzzleHttp\\Client' => $vendorDir . '/guzzlehttp/guzzle/src/Client.php',
+    'GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php',
+    'GuzzleHttp\\Cookie\\CookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
+    'GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
+    'GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
+    'GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
+    'GuzzleHttp\\Cookie\\SetCookie' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php',
+    'GuzzleHttp\\Exception\\BadResponseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php',
+    'GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
+    'GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
+    'GuzzleHttp\\Exception\\GuzzleException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php',
+    'GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
+    'GuzzleHttp\\Exception\\SeekException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
+    'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
+    'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
+    'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
+    'GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php',
+    'GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php',
+    'GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php',
+    'GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php',
+    'GuzzleHttp\\Handler\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php',
+    'GuzzleHttp\\Handler\\EasyHandle' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php',
+    'GuzzleHttp\\Handler\\MockHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/MockHandler.php',
+    'GuzzleHttp\\Handler\\Proxy' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/Proxy.php',
+    'GuzzleHttp\\Handler\\StreamHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php',
+    'GuzzleHttp\\MessageFormatter' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatter.php',
+    'GuzzleHttp\\Middleware' => $vendorDir . '/guzzlehttp/guzzle/src/Middleware.php',
+    'GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php',
+    'GuzzleHttp\\PrepareBodyMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php',
+    'GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php',
+    'GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php',
+    'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php',
+    'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php',
+    'GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php',
+    'GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php',
+    'GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php',
+    'GuzzleHttp\\Promise\\RejectedPromise' => $vendorDir . '/guzzlehttp/promises/src/RejectedPromise.php',
+    'GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php',
+    'GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php',
+    'GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php',
+    'GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php',
+    'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php',
+    'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php',
+    'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php',
+    'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php',
+    'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php',
+    'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php',
+    'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php',
+    'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php',
+    'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php',
+    'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php',
+    'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php',
+    'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php',
+    'GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php',
+    'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
+    'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php',
+    'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php',
+    'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
+    'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php',
+    'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
+    'GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php',
+    'GuzzleHttp\\UriTemplate' => $vendorDir . '/guzzlehttp/guzzle/src/UriTemplate.php',
+    'Heise\\Shariff\\Backend' => $baseDir . '/src/Backend.php',
+    'Heise\\Shariff\\Backend\\AddThis' => $baseDir . '/src/Backend/AddThis.php',
+    'Heise\\Shariff\\Backend\\BackendManager' => $baseDir . '/src/Backend/BackendManager.php',
+    'Heise\\Shariff\\Backend\\Facebook' => $baseDir . '/src/Backend/Facebook.php',
+    'Heise\\Shariff\\Backend\\Flattr' => $baseDir . '/src/Backend/Flattr.php',
+    'Heise\\Shariff\\Backend\\GooglePlus' => $baseDir . '/src/Backend/GooglePlus.php',
+    'Heise\\Shariff\\Backend\\LinkedIn' => $baseDir . '/src/Backend/LinkedIn.php',
+    'Heise\\Shariff\\Backend\\Pinterest' => $baseDir . '/src/Backend/Pinterest.php',
+    'Heise\\Shariff\\Backend\\Reddit' => $baseDir . '/src/Backend/Reddit.php',
+    'Heise\\Shariff\\Backend\\Request' => $baseDir . '/src/Backend/Request.php',
+    'Heise\\Shariff\\Backend\\ServiceFactory' => $baseDir . '/src/Backend/ServiceFactory.php',
+    'Heise\\Shariff\\Backend\\ServiceInterface' => $baseDir . '/src/Backend/ServiceInterface.php',
+    'Heise\\Shariff\\Backend\\StumbleUpon' => $baseDir . '/src/Backend/StumbleUpon.php',
+    'Heise\\Shariff\\Backend\\Xing' => $baseDir . '/src/Backend/Xing.php',
+    'Heise\\Shariff\\CacheInterface' => $baseDir . '/src/CacheInterface.php',
+    'Heise\\Shariff\\ZendCache' => $baseDir . '/src/ZendCache.php',
+    'Interop\\Container\\ContainerInterface' => $vendorDir . '/container-interop/container-interop/src/Interop/Container/ContainerInterface.php',
+    'Interop\\Container\\Exception\\ContainerException' => $vendorDir . '/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php',
+    'Interop\\Container\\Exception\\NotFoundException' => $vendorDir . '/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php',
+    'MySource_Sniffs_CSS_BrowserSpecificStylesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php',
+    'MySource_Sniffs_Channels_DisallowSelfActionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php',
+    'MySource_Sniffs_Channels_IncludeOwnSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php',
+    'MySource_Sniffs_Channels_IncludeSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php',
+    'MySource_Sniffs_Channels_UnusedSystemSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php',
+    'MySource_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php',
+    'MySource_Sniffs_Debug_DebugCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php',
+    'MySource_Sniffs_Debug_FirebugConsoleSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php',
+    'MySource_Sniffs_Objects_AssignThisSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php',
+    'MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php',
+    'MySource_Sniffs_Objects_DisallowNewWidgetSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php',
+    'MySource_Sniffs_PHP_AjaxNullComparisonSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php',
+    'MySource_Sniffs_PHP_EvalObjectFactorySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php',
+    'MySource_Sniffs_PHP_GetRequestDataSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php',
+    'MySource_Sniffs_PHP_ReturnFunctionValueSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php',
+    'MySource_Sniffs_Strings_JoinStringsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php',
+    'PEAR_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php',
+    'PEAR_Sniffs_Commenting_ClassCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php',
+    'PEAR_Sniffs_Commenting_FileCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php',
+    'PEAR_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php',
+    'PEAR_Sniffs_Commenting_InlineCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php',
+    'PEAR_Sniffs_ControlStructures_ControlSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
+    'PEAR_Sniffs_ControlStructures_MultiLineConditionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',
+    'PEAR_Sniffs_Files_IncludingFileSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php',
+    'PEAR_Sniffs_Formatting_MultiLineAssignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php',
+    'PEAR_Sniffs_Functions_FunctionCallSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',
+    'PEAR_Sniffs_Functions_FunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',
+    'PEAR_Sniffs_Functions_ValidDefaultValueSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',
+    'PEAR_Sniffs_NamingConventions_ValidClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',
+    'PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
+    'PEAR_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',
+    'PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',
+    'PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
+    'PEAR_Sniffs_WhiteSpace_ScopeIndentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',
+    'PHP_CodeSniffer' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer.php',
+    'PHP_CodeSniffer_CLI' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/CLI.php',
+    'PHP_CodeSniffer_DocGenerators_Generator' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php',
+    'PHP_CodeSniffer_DocGenerators_HTML' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php',
+    'PHP_CodeSniffer_DocGenerators_Markdown' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php',
+    'PHP_CodeSniffer_DocGenerators_Text' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php',
+    'PHP_CodeSniffer_Exception' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Exception.php',
+    'PHP_CodeSniffer_File' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/File.php',
+    'PHP_CodeSniffer_Fixer' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Fixer.php',
+    'PHP_CodeSniffer_Report' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Report.php',
+    'PHP_CodeSniffer_Reporting' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reporting.php',
+    'PHP_CodeSniffer_Reports_Cbf' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php',
+    'PHP_CodeSniffer_Reports_Checkstyle' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php',
+    'PHP_CodeSniffer_Reports_Csv' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php',
+    'PHP_CodeSniffer_Reports_Diff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php',
+    'PHP_CodeSniffer_Reports_Emacs' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php',
+    'PHP_CodeSniffer_Reports_Full' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php',
+    'PHP_CodeSniffer_Reports_Gitblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php',
+    'PHP_CodeSniffer_Reports_Hgblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php',
+    'PHP_CodeSniffer_Reports_Info' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php',
+    'PHP_CodeSniffer_Reports_Json' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php',
+    'PHP_CodeSniffer_Reports_Junit' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php',
+    'PHP_CodeSniffer_Reports_Notifysend' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php',
+    'PHP_CodeSniffer_Reports_Source' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php',
+    'PHP_CodeSniffer_Reports_Summary' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php',
+    'PHP_CodeSniffer_Reports_Svnblame' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php',
+    'PHP_CodeSniffer_Reports_VersionControl' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php',
+    'PHP_CodeSniffer_Reports_Xml' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php',
+    'PHP_CodeSniffer_Sniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Sniff.php',
+    'PHP_CodeSniffer_Standards_AbstractPatternSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php',
+    'PHP_CodeSniffer_Standards_AbstractScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php',
+    'PHP_CodeSniffer_Standards_AbstractVariableSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php',
+    'PHP_CodeSniffer_Standards_IncorrectPatternException' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php',
+    'PHP_CodeSniffer_Tokenizers_CSS' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php',
+    'PHP_CodeSniffer_Tokenizers_Comment' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php',
+    'PHP_CodeSniffer_Tokenizers_JS' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php',
+    'PHP_CodeSniffer_Tokenizers_PHP' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php',
+    'PHP_CodeSniffer_Tokens' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Tokens.php',
+    'PSR1_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php',
+    'PSR1_Sniffs_Files_SideEffectsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php',
+    'PSR1_Sniffs_Methods_CamelCapsMethodNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php',
+    'PSR2_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php',
+    'PSR2_Sniffs_Classes_PropertyDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php',
+    'PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php',
+    'PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
+    'PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
+    'PSR2_Sniffs_Files_ClosingTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php',
+    'PSR2_Sniffs_Files_EndFileNewlineSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php',
+    'PSR2_Sniffs_Methods_FunctionCallSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php',
+    'PSR2_Sniffs_Methods_MethodDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php',
+    'PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php',
+    'PSR2_Sniffs_Namespaces_UseDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php',
+    'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php',
+    'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php',
+    'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php',
+    'Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php',
+    'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php',
+    'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php',
+    'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php',
+    'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
+    'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
+    'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
+    'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php',
+    'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php',
+    'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
+    'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
+    'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
+    'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
+    'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
+    'Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php',
+    'Squiz_Sniffs_Arrays_ArrayDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php',
+    'Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php',
+    'Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php',
+    'Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php',
+    'Squiz_Sniffs_CSS_ColonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php',
+    'Squiz_Sniffs_CSS_ColourDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php',
+    'Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php',
+    'Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php',
+    'Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php',
+    'Squiz_Sniffs_CSS_EmptyClassDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php',
+    'Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php',
+    'Squiz_Sniffs_CSS_ForbiddenStylesSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php',
+    'Squiz_Sniffs_CSS_IndentationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php',
+    'Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php',
+    'Squiz_Sniffs_CSS_MissingColonSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php',
+    'Squiz_Sniffs_CSS_NamedColoursSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php',
+    'Squiz_Sniffs_CSS_OpacitySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php',
+    'Squiz_Sniffs_CSS_SemicolonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php',
+    'Squiz_Sniffs_CSS_ShorthandSizeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php',
+    'Squiz_Sniffs_Classes_ClassDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php',
+    'Squiz_Sniffs_Classes_ClassFileNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php',
+    'Squiz_Sniffs_Classes_DuplicatePropertySniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php',
+    'Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php',
+    'Squiz_Sniffs_Classes_SelfMemberReferenceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php',
+    'Squiz_Sniffs_Classes_ValidClassNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php',
+    'Squiz_Sniffs_Commenting_BlockCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php',
+    'Squiz_Sniffs_Commenting_ClassCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php',
+    'Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php',
+    'Squiz_Sniffs_Commenting_DocCommentAlignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php',
+    'Squiz_Sniffs_Commenting_EmptyCatchCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php',
+    'Squiz_Sniffs_Commenting_FileCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php',
+    'Squiz_Sniffs_Commenting_FunctionCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
+    'Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php',
+    'Squiz_Sniffs_Commenting_InlineCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php',
+    'Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php',
+    'Squiz_Sniffs_Commenting_PostStatementCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php',
+    'Squiz_Sniffs_Commenting_VariableCommentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php',
+    'Squiz_Sniffs_ControlStructures_ControlSignatureSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php',
+    'Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php',
+    'Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php',
+    'Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php',
+    'Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php',
+    'Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php',
+    'Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
+    'Squiz_Sniffs_Debug_JSLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php',
+    'Squiz_Sniffs_Debug_JavaScriptLintSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php',
+    'Squiz_Sniffs_Files_FileExtensionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php',
+    'Squiz_Sniffs_Formatting_OperatorBracketSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php',
+    'Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php',
+    'Squiz_Sniffs_Functions_FunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php',
+    'Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php',
+    'Squiz_Sniffs_Functions_GlobalFunctionSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php',
+    'Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php',
+    'Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php',
+    'Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php',
+    'Squiz_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php',
+    'Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php',
+    'Squiz_Sniffs_Objects_ObjectInstantiationSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php',
+    'Squiz_Sniffs_Objects_ObjectMemberCommaSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php',
+    'Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php',
+    'Squiz_Sniffs_Operators_IncrementDecrementUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php',
+    'Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php',
+    'Squiz_Sniffs_PHP_CommentedOutCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php',
+    'Squiz_Sniffs_PHP_DisallowBooleanStatementSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php',
+    'Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php',
+    'Squiz_Sniffs_PHP_DisallowInlineIfSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php',
+    'Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php',
+    'Squiz_Sniffs_PHP_DisallowObEndFlushSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php',
+    'Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php',
+    'Squiz_Sniffs_PHP_DiscouragedFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php',
+    'Squiz_Sniffs_PHP_EmbeddedPhpSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php',
+    'Squiz_Sniffs_PHP_EvalSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php',
+    'Squiz_Sniffs_PHP_ForbiddenFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php',
+    'Squiz_Sniffs_PHP_GlobalKeywordSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php',
+    'Squiz_Sniffs_PHP_HeredocSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php',
+    'Squiz_Sniffs_PHP_InnerFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php',
+    'Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php',
+    'Squiz_Sniffs_PHP_NonExecutableCodeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php',
+    'Squiz_Sniffs_Scope_MemberVarScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php',
+    'Squiz_Sniffs_Scope_MethodScopeSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php',
+    'Squiz_Sniffs_Scope_StaticThisUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php',
+    'Squiz_Sniffs_Strings_ConcatenationSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php',
+    'Squiz_Sniffs_Strings_DoubleQuoteUsageSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php',
+    'Squiz_Sniffs_Strings_EchoedStringsSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php',
+    'Squiz_Sniffs_WhiteSpace_CastSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php',
+    'Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php',
+    'Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',
+    'Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php',
+    'Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php',
+    'Zend\\Cache\\Exception\\BadMethodCallException' => $vendorDir . '/zendframework/zend-cache/src/Exception/BadMethodCallException.php',
+    'Zend\\Cache\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-cache/src/Exception/ExceptionInterface.php',
+    'Zend\\Cache\\Exception\\ExtensionNotLoadedException' => $vendorDir . '/zendframework/zend-cache/src/Exception/ExtensionNotLoadedException.php',
+    'Zend\\Cache\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-cache/src/Exception/InvalidArgumentException.php',
+    'Zend\\Cache\\Exception\\LogicException' => $vendorDir . '/zendframework/zend-cache/src/Exception/LogicException.php',
+    'Zend\\Cache\\Exception\\MissingDependencyException' => $vendorDir . '/zendframework/zend-cache/src/Exception/MissingDependencyException.php',
+    'Zend\\Cache\\Exception\\MissingKeyException' => $vendorDir . '/zendframework/zend-cache/src/Exception/MissingKeyException.php',
+    'Zend\\Cache\\Exception\\OutOfSpaceException' => $vendorDir . '/zendframework/zend-cache/src/Exception/OutOfSpaceException.php',
+    'Zend\\Cache\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-cache/src/Exception/RuntimeException.php',
+    'Zend\\Cache\\Exception\\UnexpectedValueException' => $vendorDir . '/zendframework/zend-cache/src/Exception/UnexpectedValueException.php',
+    'Zend\\Cache\\Exception\\UnsupportedMethodCallException' => $vendorDir . '/zendframework/zend-cache/src/Exception/UnsupportedMethodCallException.php',
+    'Zend\\Cache\\PatternFactory' => $vendorDir . '/zendframework/zend-cache/src/PatternFactory.php',
+    'Zend\\Cache\\PatternPluginManager' => $vendorDir . '/zendframework/zend-cache/src/PatternPluginManager.php',
+    'Zend\\Cache\\Pattern\\AbstractPattern' => $vendorDir . '/zendframework/zend-cache/src/Pattern/AbstractPattern.php',
+    'Zend\\Cache\\Pattern\\CallbackCache' => $vendorDir . '/zendframework/zend-cache/src/Pattern/CallbackCache.php',
+    'Zend\\Cache\\Pattern\\CaptureCache' => $vendorDir . '/zendframework/zend-cache/src/Pattern/CaptureCache.php',
+    'Zend\\Cache\\Pattern\\ClassCache' => $vendorDir . '/zendframework/zend-cache/src/Pattern/ClassCache.php',
+    'Zend\\Cache\\Pattern\\ObjectCache' => $vendorDir . '/zendframework/zend-cache/src/Pattern/ObjectCache.php',
+    'Zend\\Cache\\Pattern\\OutputCache' => $vendorDir . '/zendframework/zend-cache/src/Pattern/OutputCache.php',
+    'Zend\\Cache\\Pattern\\PatternInterface' => $vendorDir . '/zendframework/zend-cache/src/Pattern/PatternInterface.php',
+    'Zend\\Cache\\Pattern\\PatternOptions' => $vendorDir . '/zendframework/zend-cache/src/Pattern/PatternOptions.php',
+    'Zend\\Cache\\Service\\StorageCacheAbstractServiceFactory' => $vendorDir . '/zendframework/zend-cache/src/Service/StorageCacheAbstractServiceFactory.php',
+    'Zend\\Cache\\Service\\StorageCacheFactory' => $vendorDir . '/zendframework/zend-cache/src/Service/StorageCacheFactory.php',
+    'Zend\\Cache\\StorageFactory' => $vendorDir . '/zendframework/zend-cache/src/StorageFactory.php',
+    'Zend\\Cache\\Storage\\AdapterPluginManager' => $vendorDir . '/zendframework/zend-cache/src/Storage/AdapterPluginManager.php',
+    'Zend\\Cache\\Storage\\Adapter\\AbstractAdapter' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/AbstractAdapter.php',
+    'Zend\\Cache\\Storage\\Adapter\\AbstractZendServer' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/AbstractZendServer.php',
+    'Zend\\Cache\\Storage\\Adapter\\AdapterOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/AdapterOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\Apc' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Apc.php',
+    'Zend\\Cache\\Storage\\Adapter\\ApcIterator' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/ApcIterator.php',
+    'Zend\\Cache\\Storage\\Adapter\\ApcOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/ApcOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\BlackHole' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/BlackHole.php',
+    'Zend\\Cache\\Storage\\Adapter\\Dba' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Dba.php',
+    'Zend\\Cache\\Storage\\Adapter\\DbaIterator' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/DbaIterator.php',
+    'Zend\\Cache\\Storage\\Adapter\\DbaOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/DbaOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\Filesystem' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Filesystem.php',
+    'Zend\\Cache\\Storage\\Adapter\\FilesystemIterator' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/FilesystemIterator.php',
+    'Zend\\Cache\\Storage\\Adapter\\FilesystemOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/FilesystemOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\KeyListIterator' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/KeyListIterator.php',
+    'Zend\\Cache\\Storage\\Adapter\\Memcache' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Memcache.php',
+    'Zend\\Cache\\Storage\\Adapter\\MemcacheOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MemcacheOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\MemcacheResourceManager' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MemcacheResourceManager.php',
+    'Zend\\Cache\\Storage\\Adapter\\Memcached' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Memcached.php',
+    'Zend\\Cache\\Storage\\Adapter\\MemcachedOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MemcachedOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\MemcachedResourceManager' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MemcachedResourceManager.php',
+    'Zend\\Cache\\Storage\\Adapter\\Memory' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Memory.php',
+    'Zend\\Cache\\Storage\\Adapter\\MemoryOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MemoryOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\MongoDb' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MongoDb.php',
+    'Zend\\Cache\\Storage\\Adapter\\MongoDbOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MongoDbOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\MongoDbResourceManager' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/MongoDbResourceManager.php',
+    'Zend\\Cache\\Storage\\Adapter\\Redis' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Redis.php',
+    'Zend\\Cache\\Storage\\Adapter\\RedisOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/RedisOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\RedisResourceManager' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/RedisResourceManager.php',
+    'Zend\\Cache\\Storage\\Adapter\\Session' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/Session.php',
+    'Zend\\Cache\\Storage\\Adapter\\SessionOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/SessionOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\WinCache' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/WinCache.php',
+    'Zend\\Cache\\Storage\\Adapter\\WinCacheOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/WinCacheOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\XCache' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/XCache.php',
+    'Zend\\Cache\\Storage\\Adapter\\XCacheOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/XCacheOptions.php',
+    'Zend\\Cache\\Storage\\Adapter\\ZendServerDisk' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/ZendServerDisk.php',
+    'Zend\\Cache\\Storage\\Adapter\\ZendServerShm' => $vendorDir . '/zendframework/zend-cache/src/Storage/Adapter/ZendServerShm.php',
+    'Zend\\Cache\\Storage\\AvailableSpaceCapableInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/AvailableSpaceCapableInterface.php',
+    'Zend\\Cache\\Storage\\Capabilities' => $vendorDir . '/zendframework/zend-cache/src/Storage/Capabilities.php',
+    'Zend\\Cache\\Storage\\ClearByNamespaceInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/ClearByNamespaceInterface.php',
+    'Zend\\Cache\\Storage\\ClearByPrefixInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/ClearByPrefixInterface.php',
+    'Zend\\Cache\\Storage\\ClearExpiredInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/ClearExpiredInterface.php',
+    'Zend\\Cache\\Storage\\Event' => $vendorDir . '/zendframework/zend-cache/src/Storage/Event.php',
+    'Zend\\Cache\\Storage\\ExceptionEvent' => $vendorDir . '/zendframework/zend-cache/src/Storage/ExceptionEvent.php',
+    'Zend\\Cache\\Storage\\FlushableInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/FlushableInterface.php',
+    'Zend\\Cache\\Storage\\IterableInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/IterableInterface.php',
+    'Zend\\Cache\\Storage\\IteratorInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/IteratorInterface.php',
+    'Zend\\Cache\\Storage\\OptimizableInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/OptimizableInterface.php',
+    'Zend\\Cache\\Storage\\PluginManager' => $vendorDir . '/zendframework/zend-cache/src/Storage/PluginManager.php',
+    'Zend\\Cache\\Storage\\Plugin\\AbstractPlugin' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/AbstractPlugin.php',
+    'Zend\\Cache\\Storage\\Plugin\\ClearExpiredByFactor' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/ClearExpiredByFactor.php',
+    'Zend\\Cache\\Storage\\Plugin\\ExceptionHandler' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/ExceptionHandler.php',
+    'Zend\\Cache\\Storage\\Plugin\\IgnoreUserAbort' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/IgnoreUserAbort.php',
+    'Zend\\Cache\\Storage\\Plugin\\OptimizeByFactor' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/OptimizeByFactor.php',
+    'Zend\\Cache\\Storage\\Plugin\\PluginInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/PluginInterface.php',
+    'Zend\\Cache\\Storage\\Plugin\\PluginOptions' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/PluginOptions.php',
+    'Zend\\Cache\\Storage\\Plugin\\Serializer' => $vendorDir . '/zendframework/zend-cache/src/Storage/Plugin/Serializer.php',
+    'Zend\\Cache\\Storage\\PostEvent' => $vendorDir . '/zendframework/zend-cache/src/Storage/PostEvent.php',
+    'Zend\\Cache\\Storage\\StorageInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/StorageInterface.php',
+    'Zend\\Cache\\Storage\\TaggableInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/TaggableInterface.php',
+    'Zend\\Cache\\Storage\\TotalSpaceCapableInterface' => $vendorDir . '/zendframework/zend-cache/src/Storage/TotalSpaceCapableInterface.php',
+    'Zend\\Config\\AbstractConfigFactory' => $vendorDir . '/zendframework/zend-config/src/AbstractConfigFactory.php',
+    'Zend\\Config\\Config' => $vendorDir . '/zendframework/zend-config/src/Config.php',
+    'Zend\\Config\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-config/src/Exception/ExceptionInterface.php',
+    'Zend\\Config\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-config/src/Exception/InvalidArgumentException.php',
+    'Zend\\Config\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-config/src/Exception/RuntimeException.php',
+    'Zend\\Config\\Factory' => $vendorDir . '/zendframework/zend-config/src/Factory.php',
+    'Zend\\Config\\Processor\\Constant' => $vendorDir . '/zendframework/zend-config/src/Processor/Constant.php',
+    'Zend\\Config\\Processor\\Filter' => $vendorDir . '/zendframework/zend-config/src/Processor/Filter.php',
+    'Zend\\Config\\Processor\\ProcessorInterface' => $vendorDir . '/zendframework/zend-config/src/Processor/ProcessorInterface.php',
+    'Zend\\Config\\Processor\\Queue' => $vendorDir . '/zendframework/zend-config/src/Processor/Queue.php',
+    'Zend\\Config\\Processor\\Token' => $vendorDir . '/zendframework/zend-config/src/Processor/Token.php',
+    'Zend\\Config\\Processor\\Translator' => $vendorDir . '/zendframework/zend-config/src/Processor/Translator.php',
+    'Zend\\Config\\ReaderPluginManager' => $vendorDir . '/zendframework/zend-config/src/ReaderPluginManager.php',
+    'Zend\\Config\\Reader\\Ini' => $vendorDir . '/zendframework/zend-config/src/Reader/Ini.php',
+    'Zend\\Config\\Reader\\JavaProperties' => $vendorDir . '/zendframework/zend-config/src/Reader/JavaProperties.php',
+    'Zend\\Config\\Reader\\Json' => $vendorDir . '/zendframework/zend-config/src/Reader/Json.php',
+    'Zend\\Config\\Reader\\ReaderInterface' => $vendorDir . '/zendframework/zend-config/src/Reader/ReaderInterface.php',
+    'Zend\\Config\\Reader\\Xml' => $vendorDir . '/zendframework/zend-config/src/Reader/Xml.php',
+    'Zend\\Config\\Reader\\Yaml' => $vendorDir . '/zendframework/zend-config/src/Reader/Yaml.php',
+    'Zend\\Config\\WriterPluginManager' => $vendorDir . '/zendframework/zend-config/src/WriterPluginManager.php',
+    'Zend\\Config\\Writer\\AbstractWriter' => $vendorDir . '/zendframework/zend-config/src/Writer/AbstractWriter.php',
+    'Zend\\Config\\Writer\\Ini' => $vendorDir . '/zendframework/zend-config/src/Writer/Ini.php',
+    'Zend\\Config\\Writer\\Json' => $vendorDir . '/zendframework/zend-config/src/Writer/Json.php',
+    'Zend\\Config\\Writer\\PhpArray' => $vendorDir . '/zendframework/zend-config/src/Writer/PhpArray.php',
+    'Zend\\Config\\Writer\\WriterInterface' => $vendorDir . '/zendframework/zend-config/src/Writer/WriterInterface.php',
+    'Zend\\Config\\Writer\\Xml' => $vendorDir . '/zendframework/zend-config/src/Writer/Xml.php',
+    'Zend\\Config\\Writer\\Yaml' => $vendorDir . '/zendframework/zend-config/src/Writer/Yaml.php',
+    'Zend\\EventManager\\AbstractListenerAggregate' => $vendorDir . '/zendframework/zend-eventmanager/src/AbstractListenerAggregate.php',
+    'Zend\\EventManager\\Event' => $vendorDir . '/zendframework/zend-eventmanager/src/Event.php',
+    'Zend\\EventManager\\EventInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/EventInterface.php',
+    'Zend\\EventManager\\EventManager' => $vendorDir . '/zendframework/zend-eventmanager/src/EventManager.php',
+    'Zend\\EventManager\\EventManagerAwareInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/EventManagerAwareInterface.php',
+    'Zend\\EventManager\\EventManagerAwareTrait' => $vendorDir . '/zendframework/zend-eventmanager/src/EventManagerAwareTrait.php',
+    'Zend\\EventManager\\EventManagerInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/EventManagerInterface.php',
+    'Zend\\EventManager\\EventsCapableInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/EventsCapableInterface.php',
+    'Zend\\EventManager\\Exception\\DomainException' => $vendorDir . '/zendframework/zend-eventmanager/src/Exception/DomainException.php',
+    'Zend\\EventManager\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/Exception/ExceptionInterface.php',
+    'Zend\\EventManager\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-eventmanager/src/Exception/InvalidArgumentException.php',
+    'Zend\\EventManager\\Exception\\InvalidCallbackException' => $vendorDir . '/zendframework/zend-eventmanager/src/Exception/InvalidCallbackException.php',
+    'Zend\\EventManager\\FilterChain' => $vendorDir . '/zendframework/zend-eventmanager/src/FilterChain.php',
+    'Zend\\EventManager\\Filter\\FilterInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/Filter/FilterInterface.php',
+    'Zend\\EventManager\\Filter\\FilterIterator' => $vendorDir . '/zendframework/zend-eventmanager/src/Filter/FilterIterator.php',
+    'Zend\\EventManager\\GlobalEventManager' => $vendorDir . '/zendframework/zend-eventmanager/src/GlobalEventManager.php',
+    'Zend\\EventManager\\ListenerAggregateInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/ListenerAggregateInterface.php',
+    'Zend\\EventManager\\ListenerAggregateTrait' => $vendorDir . '/zendframework/zend-eventmanager/src/ListenerAggregateTrait.php',
+    'Zend\\EventManager\\ProvidesEvents' => $vendorDir . '/zendframework/zend-eventmanager/src/ProvidesEvents.php',
+    'Zend\\EventManager\\ResponseCollection' => $vendorDir . '/zendframework/zend-eventmanager/src/ResponseCollection.php',
+    'Zend\\EventManager\\SharedEventAggregateAwareInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/SharedEventAggregateAwareInterface.php',
+    'Zend\\EventManager\\SharedEventManager' => $vendorDir . '/zendframework/zend-eventmanager/src/SharedEventManager.php',
+    'Zend\\EventManager\\SharedEventManagerAwareInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/SharedEventManagerAwareInterface.php',
+    'Zend\\EventManager\\SharedEventManagerInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/SharedEventManagerInterface.php',
+    'Zend\\EventManager\\SharedEventsCapableInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/SharedEventsCapableInterface.php',
+    'Zend\\EventManager\\SharedListenerAggregateInterface' => $vendorDir . '/zendframework/zend-eventmanager/src/SharedListenerAggregateInterface.php',
+    'Zend\\EventManager\\StaticEventManager' => $vendorDir . '/zendframework/zend-eventmanager/src/StaticEventManager.php',
+    'Zend\\EventManager\\Test\\EventListenerIntrospectionTrait' => $vendorDir . '/zendframework/zend-eventmanager/src/Test/EventListenerIntrospectionTrait.php',
+    'Zend\\Hydrator\\AbstractHydrator' => $vendorDir . '/zendframework/zend-hydrator/src/AbstractHydrator.php',
+    'Zend\\Hydrator\\Aggregate\\AggregateHydrator' => $vendorDir . '/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php',
+    'Zend\\Hydrator\\Aggregate\\ExtractEvent' => $vendorDir . '/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php',
+    'Zend\\Hydrator\\Aggregate\\HydrateEvent' => $vendorDir . '/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php',
+    'Zend\\Hydrator\\Aggregate\\HydratorListener' => $vendorDir . '/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php',
+    'Zend\\Hydrator\\ArraySerializable' => $vendorDir . '/zendframework/zend-hydrator/src/ArraySerializable.php',
+    'Zend\\Hydrator\\ClassMethods' => $vendorDir . '/zendframework/zend-hydrator/src/ClassMethods.php',
+    'Zend\\Hydrator\\DelegatingHydrator' => $vendorDir . '/zendframework/zend-hydrator/src/DelegatingHydrator.php',
+    'Zend\\Hydrator\\DelegatingHydratorFactory' => $vendorDir . '/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php',
+    'Zend\\Hydrator\\Exception\\BadMethodCallException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php',
+    'Zend\\Hydrator\\Exception\\DomainException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/DomainException.php',
+    'Zend\\Hydrator\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php',
+    'Zend\\Hydrator\\Exception\\ExtensionNotLoadedException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php',
+    'Zend\\Hydrator\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php',
+    'Zend\\Hydrator\\Exception\\InvalidCallbackException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php',
+    'Zend\\Hydrator\\Exception\\LogicException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/LogicException.php',
+    'Zend\\Hydrator\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-hydrator/src/Exception/RuntimeException.php',
+    'Zend\\Hydrator\\ExtractionInterface' => $vendorDir . '/zendframework/zend-hydrator/src/ExtractionInterface.php',
+    'Zend\\Hydrator\\FilterEnabledInterface' => $vendorDir . '/zendframework/zend-hydrator/src/FilterEnabledInterface.php',
+    'Zend\\Hydrator\\Filter\\FilterComposite' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/FilterComposite.php',
+    'Zend\\Hydrator\\Filter\\FilterInterface' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/FilterInterface.php',
+    'Zend\\Hydrator\\Filter\\FilterProviderInterface' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php',
+    'Zend\\Hydrator\\Filter\\GetFilter' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/GetFilter.php',
+    'Zend\\Hydrator\\Filter\\HasFilter' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/HasFilter.php',
+    'Zend\\Hydrator\\Filter\\IsFilter' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/IsFilter.php',
+    'Zend\\Hydrator\\Filter\\MethodMatchFilter' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php',
+    'Zend\\Hydrator\\Filter\\NumberOfParameterFilter' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php',
+    'Zend\\Hydrator\\Filter\\OptionalParametersFilter' => $vendorDir . '/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php',
+    'Zend\\Hydrator\\HydrationInterface' => $vendorDir . '/zendframework/zend-hydrator/src/HydrationInterface.php',
+    'Zend\\Hydrator\\HydratorAwareInterface' => $vendorDir . '/zendframework/zend-hydrator/src/HydratorAwareInterface.php',
+    'Zend\\Hydrator\\HydratorAwareTrait' => $vendorDir . '/zendframework/zend-hydrator/src/HydratorAwareTrait.php',
+    'Zend\\Hydrator\\HydratorInterface' => $vendorDir . '/zendframework/zend-hydrator/src/HydratorInterface.php',
+    'Zend\\Hydrator\\HydratorOptionsInterface' => $vendorDir . '/zendframework/zend-hydrator/src/HydratorOptionsInterface.php',
+    'Zend\\Hydrator\\HydratorPluginManager' => $vendorDir . '/zendframework/zend-hydrator/src/HydratorPluginManager.php',
+    'Zend\\Hydrator\\Iterator\\HydratingArrayIterator' => $vendorDir . '/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php',
+    'Zend\\Hydrator\\Iterator\\HydratingIteratorInterface' => $vendorDir . '/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php',
+    'Zend\\Hydrator\\Iterator\\HydratingIteratorIterator' => $vendorDir . '/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php',
+    'Zend\\Hydrator\\NamingStrategyEnabledInterface' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php',
+    'Zend\\Hydrator\\NamingStrategy\\ArrayMapNamingStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php',
+    'Zend\\Hydrator\\NamingStrategy\\CompositeNamingStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php',
+    'Zend\\Hydrator\\NamingStrategy\\IdentityNamingStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php',
+    'Zend\\Hydrator\\NamingStrategy\\MapNamingStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php',
+    'Zend\\Hydrator\\NamingStrategy\\NamingStrategyInterface' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php',
+    'Zend\\Hydrator\\NamingStrategy\\UnderscoreNamingStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php',
+    'Zend\\Hydrator\\ObjectProperty' => $vendorDir . '/zendframework/zend-hydrator/src/ObjectProperty.php',
+    'Zend\\Hydrator\\Reflection' => $vendorDir . '/zendframework/zend-hydrator/src/Reflection.php',
+    'Zend\\Hydrator\\StrategyEnabledInterface' => $vendorDir . '/zendframework/zend-hydrator/src/StrategyEnabledInterface.php',
+    'Zend\\Hydrator\\Strategy\\BooleanStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php',
+    'Zend\\Hydrator\\Strategy\\ClosureStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php',
+    'Zend\\Hydrator\\Strategy\\DateTimeFormatterStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php',
+    'Zend\\Hydrator\\Strategy\\DefaultStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php',
+    'Zend\\Hydrator\\Strategy\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php',
+    'Zend\\Hydrator\\Strategy\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php',
+    'Zend\\Hydrator\\Strategy\\ExplodeStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php',
+    'Zend\\Hydrator\\Strategy\\SerializableStrategy' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php',
+    'Zend\\Hydrator\\Strategy\\StrategyChain' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/StrategyChain.php',
+    'Zend\\Hydrator\\Strategy\\StrategyInterface' => $vendorDir . '/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php',
+    'Zend\\Json\\Decoder' => $vendorDir . '/zendframework/zend-json/src/Decoder.php',
+    'Zend\\Json\\Encoder' => $vendorDir . '/zendframework/zend-json/src/Encoder.php',
+    'Zend\\Json\\Exception\\BadMethodCallException' => $vendorDir . '/zendframework/zend-json/src/Exception/BadMethodCallException.php',
+    'Zend\\Json\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-json/src/Exception/ExceptionInterface.php',
+    'Zend\\Json\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-json/src/Exception/InvalidArgumentException.php',
+    'Zend\\Json\\Exception\\RecursionException' => $vendorDir . '/zendframework/zend-json/src/Exception/RecursionException.php',
+    'Zend\\Json\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-json/src/Exception/RuntimeException.php',
+    'Zend\\Json\\Expr' => $vendorDir . '/zendframework/zend-json/src/Expr.php',
+    'Zend\\Json\\Json' => $vendorDir . '/zendframework/zend-json/src/Json.php',
+    'Zend\\Json\\Server\\Cache' => $vendorDir . '/zendframework/zend-json/src/Server/Cache.php',
+    'Zend\\Json\\Server\\Client' => $vendorDir . '/zendframework/zend-json/src/Server/Client.php',
+    'Zend\\Json\\Server\\Error' => $vendorDir . '/zendframework/zend-json/src/Server/Error.php',
+    'Zend\\Json\\Server\\Exception\\ErrorException' => $vendorDir . '/zendframework/zend-json/src/Server/Exception/ErrorException.php',
+    'Zend\\Json\\Server\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-json/src/Server/Exception/ExceptionInterface.php',
+    'Zend\\Json\\Server\\Exception\\HttpException' => $vendorDir . '/zendframework/zend-json/src/Server/Exception/HttpException.php',
+    'Zend\\Json\\Server\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-json/src/Server/Exception/InvalidArgumentException.php',
+    'Zend\\Json\\Server\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-json/src/Server/Exception/RuntimeException.php',
+    'Zend\\Json\\Server\\Request' => $vendorDir . '/zendframework/zend-json/src/Server/Request.php',
+    'Zend\\Json\\Server\\Request\\Http' => $vendorDir . '/zendframework/zend-json/src/Server/Request/Http.php',
+    'Zend\\Json\\Server\\Response' => $vendorDir . '/zendframework/zend-json/src/Server/Response.php',
+    'Zend\\Json\\Server\\Response\\Http' => $vendorDir . '/zendframework/zend-json/src/Server/Response/Http.php',
+    'Zend\\Json\\Server\\Server' => $vendorDir . '/zendframework/zend-json/src/Server/Server.php',
+    'Zend\\Json\\Server\\Smd' => $vendorDir . '/zendframework/zend-json/src/Server/Smd.php',
+    'Zend\\Json\\Server\\Smd\\Service' => $vendorDir . '/zendframework/zend-json/src/Server/Smd/Service.php',
+    'Zend\\ServiceManager\\AbstractFactoryInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/AbstractFactoryInterface.php',
+    'Zend\\ServiceManager\\AbstractPluginManager' => $vendorDir . '/zendframework/zend-servicemanager/src/AbstractPluginManager.php',
+    'Zend\\ServiceManager\\Config' => $vendorDir . '/zendframework/zend-servicemanager/src/Config.php',
+    'Zend\\ServiceManager\\ConfigInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/ConfigInterface.php',
+    'Zend\\ServiceManager\\DelegatorFactoryInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/DelegatorFactoryInterface.php',
+    'Zend\\ServiceManager\\Di\\DiAbstractServiceFactory' => $vendorDir . '/zendframework/zend-servicemanager/src/Di/DiAbstractServiceFactory.php',
+    'Zend\\ServiceManager\\Di\\DiInstanceManagerProxy' => $vendorDir . '/zendframework/zend-servicemanager/src/Di/DiInstanceManagerProxy.php',
+    'Zend\\ServiceManager\\Di\\DiServiceFactory' => $vendorDir . '/zendframework/zend-servicemanager/src/Di/DiServiceFactory.php',
+    'Zend\\ServiceManager\\Di\\DiServiceInitializer' => $vendorDir . '/zendframework/zend-servicemanager/src/Di/DiServiceInitializer.php',
+    'Zend\\ServiceManager\\Exception\\CircularDependencyFoundException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/CircularDependencyFoundException.php',
+    'Zend\\ServiceManager\\Exception\\CircularReferenceException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/CircularReferenceException.php',
+    'Zend\\ServiceManager\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/ExceptionInterface.php',
+    'Zend\\ServiceManager\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/InvalidArgumentException.php',
+    'Zend\\ServiceManager\\Exception\\InvalidServiceException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/InvalidServiceException.php',
+    'Zend\\ServiceManager\\Exception\\InvalidServiceNameException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/InvalidServiceNameException.php',
+    'Zend\\ServiceManager\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/RuntimeException.php',
+    'Zend\\ServiceManager\\Exception\\ServiceLocatorUsageException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/ServiceLocatorUsageException.php',
+    'Zend\\ServiceManager\\Exception\\ServiceNotCreatedException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/ServiceNotCreatedException.php',
+    'Zend\\ServiceManager\\Exception\\ServiceNotFoundException' => $vendorDir . '/zendframework/zend-servicemanager/src/Exception/ServiceNotFoundException.php',
+    'Zend\\ServiceManager\\FactoryInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/FactoryInterface.php',
+    'Zend\\ServiceManager\\Factory\\InvokableFactory' => $vendorDir . '/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php',
+    'Zend\\ServiceManager\\InitializerInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/InitializerInterface.php',
+    'Zend\\ServiceManager\\MutableCreationOptionsInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/MutableCreationOptionsInterface.php',
+    'Zend\\ServiceManager\\MutableCreationOptionsTrait' => $vendorDir . '/zendframework/zend-servicemanager/src/MutableCreationOptionsTrait.php',
+    'Zend\\ServiceManager\\Proxy\\LazyServiceFactory' => $vendorDir . '/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactory.php',
+    'Zend\\ServiceManager\\Proxy\\LazyServiceFactoryFactory' => $vendorDir . '/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactoryFactory.php',
+    'Zend\\ServiceManager\\ServiceLocatorAwareInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/ServiceLocatorAwareInterface.php',
+    'Zend\\ServiceManager\\ServiceLocatorAwareTrait' => $vendorDir . '/zendframework/zend-servicemanager/src/ServiceLocatorAwareTrait.php',
+    'Zend\\ServiceManager\\ServiceLocatorInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/ServiceLocatorInterface.php',
+    'Zend\\ServiceManager\\ServiceManager' => $vendorDir . '/zendframework/zend-servicemanager/src/ServiceManager.php',
+    'Zend\\ServiceManager\\ServiceManagerAwareInterface' => $vendorDir . '/zendframework/zend-servicemanager/src/ServiceManagerAwareInterface.php',
+    'Zend\\ServiceManager\\Test\\CommonPluginManagerTrait' => $vendorDir . '/zendframework/zend-servicemanager/src/Test/CommonPluginManagerTrait.php',
+    'Zend\\Stdlib\\AbstractOptions' => $vendorDir . '/zendframework/zend-stdlib/src/AbstractOptions.php',
+    'Zend\\Stdlib\\ArrayObject' => $vendorDir . '/zendframework/zend-stdlib/src/ArrayObject.php',
+    'Zend\\Stdlib\\ArraySerializableInterface' => $vendorDir . '/zendframework/zend-stdlib/src/ArraySerializableInterface.php',
+    'Zend\\Stdlib\\ArrayStack' => $vendorDir . '/zendframework/zend-stdlib/src/ArrayStack.php',
+    'Zend\\Stdlib\\ArrayUtils' => $vendorDir . '/zendframework/zend-stdlib/src/ArrayUtils.php',
+    'Zend\\Stdlib\\ArrayUtils\\MergeRemoveKey' => $vendorDir . '/zendframework/zend-stdlib/src/ArrayUtils/MergeRemoveKey.php',
+    'Zend\\Stdlib\\ArrayUtils\\MergeReplaceKey' => $vendorDir . '/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKey.php',
+    'Zend\\Stdlib\\ArrayUtils\\MergeReplaceKeyInterface' => $vendorDir . '/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php',
+    'Zend\\Stdlib\\CallbackHandler' => $vendorDir . '/zendframework/zend-stdlib/src/CallbackHandler.php',
+    'Zend\\Stdlib\\DateTime' => $vendorDir . '/zendframework/zend-stdlib/src/DateTime.php',
+    'Zend\\Stdlib\\DispatchableInterface' => $vendorDir . '/zendframework/zend-stdlib/src/DispatchableInterface.php',
+    'Zend\\Stdlib\\ErrorHandler' => $vendorDir . '/zendframework/zend-stdlib/src/ErrorHandler.php',
+    'Zend\\Stdlib\\Exception\\BadMethodCallException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/BadMethodCallException.php',
+    'Zend\\Stdlib\\Exception\\DomainException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/DomainException.php',
+    'Zend\\Stdlib\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/ExceptionInterface.php',
+    'Zend\\Stdlib\\Exception\\ExtensionNotLoadedException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/ExtensionNotLoadedException.php',
+    'Zend\\Stdlib\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/InvalidArgumentException.php',
+    'Zend\\Stdlib\\Exception\\InvalidCallbackException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/InvalidCallbackException.php',
+    'Zend\\Stdlib\\Exception\\LogicException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/LogicException.php',
+    'Zend\\Stdlib\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-stdlib/src/Exception/RuntimeException.php',
+    'Zend\\Stdlib\\Extractor\\ExtractionInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php',
+    'Zend\\Stdlib\\FastPriorityQueue' => $vendorDir . '/zendframework/zend-stdlib/src/FastPriorityQueue.php',
+    'Zend\\Stdlib\\Glob' => $vendorDir . '/zendframework/zend-stdlib/src/Glob.php',
+    'Zend\\Stdlib\\Guard\\AllGuardsTrait' => $vendorDir . '/zendframework/zend-stdlib/src/Guard/AllGuardsTrait.php',
+    'Zend\\Stdlib\\Guard\\ArrayOrTraversableGuardTrait' => $vendorDir . '/zendframework/zend-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php',
+    'Zend\\Stdlib\\Guard\\EmptyGuardTrait' => $vendorDir . '/zendframework/zend-stdlib/src/Guard/EmptyGuardTrait.php',
+    'Zend\\Stdlib\\Guard\\GuardUtils' => $vendorDir . '/zendframework/zend-stdlib/src/Guard/GuardUtils.php',
+    'Zend\\Stdlib\\Guard\\NullGuardTrait' => $vendorDir . '/zendframework/zend-stdlib/src/Guard/NullGuardTrait.php',
+    'Zend\\Stdlib\\Hydrator\\AbstractHydrator' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php',
+    'Zend\\Stdlib\\Hydrator\\Aggregate\\AggregateHydrator' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php',
+    'Zend\\Stdlib\\Hydrator\\Aggregate\\ExtractEvent' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php',
+    'Zend\\Stdlib\\Hydrator\\Aggregate\\HydrateEvent' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php',
+    'Zend\\Stdlib\\Hydrator\\Aggregate\\HydratorListener' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php',
+    'Zend\\Stdlib\\Hydrator\\ArraySerializable' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php',
+    'Zend\\Stdlib\\Hydrator\\ClassMethods' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php',
+    'Zend\\Stdlib\\Hydrator\\DelegatingHydrator' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php',
+    'Zend\\Stdlib\\Hydrator\\DelegatingHydratorFactory' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php',
+    'Zend\\Stdlib\\Hydrator\\FilterEnabledInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/FilterEnabledInterface.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\FilterComposite' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\FilterInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/FilterInterface.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\FilterProviderInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/FilterProviderInterface.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\GetFilter' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/GetFilter.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\HasFilter' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/HasFilter.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\IsFilter' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/IsFilter.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\MethodMatchFilter' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/MethodMatchFilter.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\NumberOfParameterFilter' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/NumberOfParameterFilter.php',
+    'Zend\\Stdlib\\Hydrator\\Filter\\OptionalParametersFilter' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Filter/OptionalParametersFilter.php',
+    'Zend\\Stdlib\\Hydrator\\HydrationInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/HydrationInterface.php',
+    'Zend\\Stdlib\\Hydrator\\HydratorAwareInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/HydratorAwareInterface.php',
+    'Zend\\Stdlib\\Hydrator\\HydratorAwareTrait' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/HydratorAwareTrait.php',
+    'Zend\\Stdlib\\Hydrator\\HydratorInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/HydratorInterface.php',
+    'Zend\\Stdlib\\Hydrator\\HydratorOptionsInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/HydratorOptionsInterface.php',
+    'Zend\\Stdlib\\Hydrator\\HydratorPluginManager' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/HydratorPluginManager.php',
+    'Zend\\Stdlib\\Hydrator\\Iterator\\HydratingArrayIterator' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingArrayIterator.php',
+    'Zend\\Stdlib\\Hydrator\\Iterator\\HydratingIteratorInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorInterface.php',
+    'Zend\\Stdlib\\Hydrator\\Iterator\\HydratingIteratorIterator' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorIterator.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategyEnabledInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategyEnabledInterface.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategy\\ArrayMapNamingStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/ArrayMapNamingStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategy\\CompositeNamingStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/CompositeNamingStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategy\\IdentityNamingStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/IdentityNamingStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategy\\MapNamingStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/MapNamingStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategy\\NamingStrategyInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/NamingStrategyInterface.php',
+    'Zend\\Stdlib\\Hydrator\\NamingStrategy\\UnderscoreNamingStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\ObjectProperty' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/ObjectProperty.php',
+    'Zend\\Stdlib\\Hydrator\\Reflection' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Reflection.php',
+    'Zend\\Stdlib\\Hydrator\\StrategyEnabledInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/StrategyEnabledInterface.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\BooleanStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/BooleanStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\ClosureStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/ClosureStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\DateTimeFormatterStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/DateTimeFormatterStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\DefaultStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/DefaultStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/ExceptionInterface.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/InvalidArgumentException.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\ExplodeStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/ExplodeStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\SerializableStrategy' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/SerializableStrategy.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\StrategyChain' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyChain.php',
+    'Zend\\Stdlib\\Hydrator\\Strategy\\StrategyInterface' => $vendorDir . '/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php',
+    'Zend\\Stdlib\\InitializableInterface' => $vendorDir . '/zendframework/zend-stdlib/src/InitializableInterface.php',
+    'Zend\\Stdlib\\JsonSerializable' => $vendorDir . '/zendframework/zend-stdlib/src/JsonSerializable.php',
+    'Zend\\Stdlib\\Message' => $vendorDir . '/zendframework/zend-stdlib/src/Message.php',
+    'Zend\\Stdlib\\MessageInterface' => $vendorDir . '/zendframework/zend-stdlib/src/MessageInterface.php',
+    'Zend\\Stdlib\\ParameterObjectInterface' => $vendorDir . '/zendframework/zend-stdlib/src/ParameterObjectInterface.php',
+    'Zend\\Stdlib\\Parameters' => $vendorDir . '/zendframework/zend-stdlib/src/Parameters.php',
+    'Zend\\Stdlib\\ParametersInterface' => $vendorDir . '/zendframework/zend-stdlib/src/ParametersInterface.php',
+    'Zend\\Stdlib\\PriorityList' => $vendorDir . '/zendframework/zend-stdlib/src/PriorityList.php',
+    'Zend\\Stdlib\\PriorityQueue' => $vendorDir . '/zendframework/zend-stdlib/src/PriorityQueue.php',
+    'Zend\\Stdlib\\Request' => $vendorDir . '/zendframework/zend-stdlib/src/Request.php',
+    'Zend\\Stdlib\\RequestInterface' => $vendorDir . '/zendframework/zend-stdlib/src/RequestInterface.php',
+    'Zend\\Stdlib\\Response' => $vendorDir . '/zendframework/zend-stdlib/src/Response.php',
+    'Zend\\Stdlib\\ResponseInterface' => $vendorDir . '/zendframework/zend-stdlib/src/ResponseInterface.php',
+    'Zend\\Stdlib\\SplPriorityQueue' => $vendorDir . '/zendframework/zend-stdlib/src/SplPriorityQueue.php',
+    'Zend\\Stdlib\\SplQueue' => $vendorDir . '/zendframework/zend-stdlib/src/SplQueue.php',
+    'Zend\\Stdlib\\SplStack' => $vendorDir . '/zendframework/zend-stdlib/src/SplStack.php',
+    'Zend\\Stdlib\\StringUtils' => $vendorDir . '/zendframework/zend-stdlib/src/StringUtils.php',
+    'Zend\\Stdlib\\StringWrapper\\AbstractStringWrapper' => $vendorDir . '/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.php',
+    'Zend\\Stdlib\\StringWrapper\\Iconv' => $vendorDir . '/zendframework/zend-stdlib/src/StringWrapper/Iconv.php',
+    'Zend\\Stdlib\\StringWrapper\\Intl' => $vendorDir . '/zendframework/zend-stdlib/src/StringWrapper/Intl.php',
+    'Zend\\Stdlib\\StringWrapper\\MbString' => $vendorDir . '/zendframework/zend-stdlib/src/StringWrapper/MbString.php',
+    'Zend\\Stdlib\\StringWrapper\\Native' => $vendorDir . '/zendframework/zend-stdlib/src/StringWrapper/Native.php',
+    'Zend\\Stdlib\\StringWrapper\\StringWrapperInterface' => $vendorDir . '/zendframework/zend-stdlib/src/StringWrapper/StringWrapperInterface.php',
+    'Zend_Sniffs_Debug_CodeAnalyzerSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php',
+    'Zend_Sniffs_Files_ClosingTagSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php',
+    'Zend_Sniffs_NamingConventions_ValidVariableNameSniff' => $vendorDir . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php',
+);
Index: /lib/shariff-backend-php-master/vendor/composer/autoload_files.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/autoload_files.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/autoload_files.php	(revision 5534)
@@ -0,0 +1,12 @@
+<?php
+
+// autoload_files.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
+    'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
+    '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
+);
Index: /lib/shariff-backend-php-master/vendor/composer/autoload_namespaces.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/autoload_namespaces.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/autoload_namespaces.php	(revision 5534)
@@ -0,0 +1,10 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+    'Psr\\Log\\' => array($vendorDir . '/psr/log'),
+);
Index: /lib/shariff-backend-php-master/vendor/composer/autoload_psr4.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/autoload_psr4.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/autoload_psr4.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+    'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib/src'),
+    'Zend\\ServiceManager\\' => array($vendorDir . '/zendframework/zend-servicemanager/src'),
+    'Zend\\Json\\' => array($vendorDir . '/zendframework/zend-json/src'),
+    'Zend\\Hydrator\\' => array($vendorDir . '/zendframework/zend-hydrator/src'),
+    'Zend\\EventManager\\' => array($vendorDir . '/zendframework/zend-eventmanager/src'),
+    'Zend\\Config\\' => array($vendorDir . '/zendframework/zend-config/src'),
+    'Zend\\Cache\\' => array($vendorDir . '/zendframework/zend-cache/src'),
+    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
+    'Interop\\Container\\' => array($vendorDir . '/container-interop/container-interop/src/Interop/Container'),
+    'Heise\\Shariff\\' => array($baseDir . '/src'),
+    'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
+    'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
+    'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
+);
Index: /lib/shariff-backend-php-master/vendor/composer/autoload_real.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/autoload_real.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/autoload_real.php	(revision 5534)
@@ -0,0 +1,59 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInit01adeaa7c40df3eadac741908028d402
+{
+    private static $loader;
+
+    public static function loadClassLoader($class)
+    {
+        if ('Composer\Autoload\ClassLoader' === $class) {
+            require __DIR__ . '/ClassLoader.php';
+        }
+    }
+
+    public static function getLoader()
+    {
+        if (null !== self::$loader) {
+            return self::$loader;
+        }
+
+        spl_autoload_register(array('ComposerAutoloaderInit01adeaa7c40df3eadac741908028d402', 'loadClassLoader'), true, true);
+        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+        spl_autoload_unregister(array('ComposerAutoloaderInit01adeaa7c40df3eadac741908028d402', 'loadClassLoader'));
+
+        $map = require __DIR__ . '/autoload_namespaces.php';
+        foreach ($map as $namespace => $path) {
+            $loader->set($namespace, $path);
+        }
+
+        $map = require __DIR__ . '/autoload_psr4.php';
+        foreach ($map as $namespace => $path) {
+            $loader->setPsr4($namespace, $path);
+        }
+
+        $classMap = require __DIR__ . '/autoload_classmap.php';
+        if ($classMap) {
+            $loader->addClassMap($classMap);
+        }
+
+        $loader->register(true);
+
+        $includeFiles = require __DIR__ . '/autoload_files.php';
+        foreach ($includeFiles as $fileIdentifier => $file) {
+            composerRequire01adeaa7c40df3eadac741908028d402($fileIdentifier, $file);
+        }
+
+        return $loader;
+    }
+}
+
+function composerRequire01adeaa7c40df3eadac741908028d402($fileIdentifier, $file)
+{
+    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+        require $file;
+
+        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/composer/installed.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/composer/installed.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/composer/installed.json	(revision 5534)
@@ -0,0 +1,778 @@
+[
+    {
+        "name": "psr/http-message",
+        "version": "1.0",
+        "version_normalized": "1.0.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/php-fig/http-message.git",
+            "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
+            "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.0"
+        },
+        "time": "2015-05-04 20:22:00",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.0.x-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Psr\\Http\\Message\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "PHP-FIG",
+                "homepage": "http://www.php-fig.org/"
+            }
+        ],
+        "description": "Common interface for HTTP messages",
+        "keywords": [
+            "http",
+            "http-message",
+            "psr",
+            "psr-7",
+            "request",
+            "response"
+        ]
+    },
+    {
+        "name": "guzzlehttp/psr7",
+        "version": "1.2.2",
+        "version_normalized": "1.2.2.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/guzzle/psr7.git",
+            "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+            "reference": "f5d04bdd2881ac89abde1fb78cc234bce24327bb",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.4.0",
+            "psr/http-message": "~1.0"
+        },
+        "provide": {
+            "psr/http-message-implementation": "1.0"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "~4.0"
+        },
+        "time": "2016-01-23 01:23:02",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.0-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "GuzzleHttp\\Psr7\\": "src/"
+            },
+            "files": [
+                "src/functions_include.php"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Michael Dowling",
+                "email": "mtdowling@gmail.com",
+                "homepage": "https://github.com/mtdowling"
+            }
+        ],
+        "description": "PSR-7 message implementation",
+        "keywords": [
+            "http",
+            "message",
+            "stream",
+            "uri"
+        ]
+    },
+    {
+        "name": "guzzlehttp/promises",
+        "version": "1.0.3",
+        "version_normalized": "1.0.3.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/guzzle/promises.git",
+            "reference": "b1e1c0d55f8083c71eda2c28c12a228d708294ea"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/guzzle/promises/zipball/b1e1c0d55f8083c71eda2c28c12a228d708294ea",
+            "reference": "b1e1c0d55f8083c71eda2c28c12a228d708294ea",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.5.0"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "~4.0"
+        },
+        "time": "2015-10-15 22:28:00",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.0-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "GuzzleHttp\\Promise\\": "src/"
+            },
+            "files": [
+                "src/functions_include.php"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Michael Dowling",
+                "email": "mtdowling@gmail.com",
+                "homepage": "https://github.com/mtdowling"
+            }
+        ],
+        "description": "Guzzle promises library",
+        "keywords": [
+            "promise"
+        ]
+    },
+    {
+        "name": "guzzlehttp/guzzle",
+        "version": "6.1.1",
+        "version_normalized": "6.1.1.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/guzzle/guzzle.git",
+            "reference": "c6851d6e48f63b69357cbfa55bca116448140e0c"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/guzzle/guzzle/zipball/c6851d6e48f63b69357cbfa55bca116448140e0c",
+            "reference": "c6851d6e48f63b69357cbfa55bca116448140e0c",
+            "shasum": ""
+        },
+        "require": {
+            "guzzlehttp/promises": "~1.0",
+            "guzzlehttp/psr7": "~1.1",
+            "php": ">=5.5.0"
+        },
+        "require-dev": {
+            "ext-curl": "*",
+            "phpunit/phpunit": "~4.0",
+            "psr/log": "~1.0"
+        },
+        "time": "2015-11-23 00:47:50",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "6.1-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "files": [
+                "src/functions_include.php"
+            ],
+            "psr-4": {
+                "GuzzleHttp\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Michael Dowling",
+                "email": "mtdowling@gmail.com",
+                "homepage": "https://github.com/mtdowling"
+            }
+        ],
+        "description": "Guzzle is a PHP HTTP client library",
+        "homepage": "http://guzzlephp.org/",
+        "keywords": [
+            "client",
+            "curl",
+            "framework",
+            "http",
+            "http client",
+            "rest",
+            "web service"
+        ]
+    },
+    {
+        "name": "psr/log",
+        "version": "1.0.0",
+        "version_normalized": "1.0.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/php-fig/log.git",
+            "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
+            "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+            "shasum": ""
+        },
+        "time": "2012-12-21 11:40:51",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Psr\\Log\\": ""
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "PHP-FIG",
+                "homepage": "http://www.php-fig.org/"
+            }
+        ],
+        "description": "Common interface for logging libraries",
+        "keywords": [
+            "log",
+            "psr",
+            "psr-3"
+        ]
+    },
+    {
+        "name": "zendframework/zend-stdlib",
+        "version": "2.7.4",
+        "version_normalized": "2.7.4.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-stdlib.git",
+            "reference": "cae029346a33663b998507f94962eb27de060683"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cae029346a33663b998507f94962eb27de060683",
+            "reference": "cae029346a33663b998507f94962eb27de060683",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.5",
+            "zendframework/zend-hydrator": "~1.0"
+        },
+        "require-dev": {
+            "athletic/athletic": "~0.1",
+            "fabpot/php-cs-fixer": "1.7.*",
+            "phpunit/phpunit": "~4.0",
+            "zendframework/zend-config": "~2.5",
+            "zendframework/zend-eventmanager": "~2.5",
+            "zendframework/zend-filter": "~2.5",
+            "zendframework/zend-inputfilter": "~2.5",
+            "zendframework/zend-serializer": "~2.5",
+            "zendframework/zend-servicemanager": "~2.5"
+        },
+        "suggest": {
+            "zendframework/zend-eventmanager": "To support aggregate hydrator usage",
+            "zendframework/zend-filter": "To support naming strategy hydrator usage",
+            "zendframework/zend-serializer": "Zend\\Serializer component",
+            "zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
+        },
+        "time": "2015-10-15 15:57:32",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.7-dev",
+                "dev-develop": "2.8-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\Stdlib\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "homepage": "https://github.com/zendframework/zend-stdlib",
+        "keywords": [
+            "stdlib",
+            "zf2"
+        ]
+    },
+    {
+        "name": "zendframework/zend-hydrator",
+        "version": "1.0.0",
+        "version_normalized": "1.0.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-hydrator.git",
+            "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f",
+            "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.5",
+            "zendframework/zend-stdlib": "^2.5.1"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "~4.0",
+            "squizlabs/php_codesniffer": "^2.0@dev",
+            "zendframework/zend-eventmanager": "^2.5.1",
+            "zendframework/zend-filter": "^2.5.1",
+            "zendframework/zend-inputfilter": "^2.5.1",
+            "zendframework/zend-serializer": "^2.5.1",
+            "zendframework/zend-servicemanager": "^2.5.1"
+        },
+        "suggest": {
+            "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
+            "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage",
+            "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
+            "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage"
+        },
+        "time": "2015-09-17 14:06:43",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.0-dev",
+                "dev-develop": "1.1-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\Hydrator\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "homepage": "https://github.com/zendframework/zend-hydrator",
+        "keywords": [
+            "hydrator",
+            "zf2"
+        ]
+    },
+    {
+        "name": "container-interop/container-interop",
+        "version": "1.1.0",
+        "version_normalized": "1.1.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/container-interop/container-interop.git",
+            "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e",
+            "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e",
+            "shasum": ""
+        },
+        "time": "2014-12-30 15:22:37",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Interop\\Container\\": "src/Interop/Container/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "description": "Promoting the interoperability of container objects (DIC, SL, etc.)"
+    },
+    {
+        "name": "zendframework/zend-servicemanager",
+        "version": "2.7.5",
+        "version_normalized": "2.7.5.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-servicemanager.git",
+            "reference": "fb5b54db5ead533b38e311f14e9c01a79218bf2b"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/fb5b54db5ead533b38e311f14e9c01a79218bf2b",
+            "reference": "fb5b54db5ead533b38e311f14e9c01a79218bf2b",
+            "shasum": ""
+        },
+        "require": {
+            "container-interop/container-interop": "~1.0",
+            "php": "^5.5 || ^7.0"
+        },
+        "require-dev": {
+            "athletic/athletic": "dev-master",
+            "fabpot/php-cs-fixer": "1.7.*",
+            "phpunit/phpunit": "~4.0",
+            "zendframework/zend-di": "~2.5",
+            "zendframework/zend-mvc": "~2.5"
+        },
+        "suggest": {
+            "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services",
+            "zendframework/zend-di": "Zend\\Di component"
+        },
+        "time": "2016-02-02 14:11:46",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.7-dev",
+                "dev-develop": "3.0-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\ServiceManager\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "homepage": "https://github.com/zendframework/zend-servicemanager",
+        "keywords": [
+            "servicemanager",
+            "zf2"
+        ]
+    },
+    {
+        "name": "zendframework/zend-eventmanager",
+        "version": "2.6.2",
+        "version_normalized": "2.6.2.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-eventmanager.git",
+            "reference": "b4354f75f694504d32e7d080641854f830acb865"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/b4354f75f694504d32e7d080641854f830acb865",
+            "reference": "b4354f75f694504d32e7d080641854f830acb865",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.5",
+            "zendframework/zend-stdlib": "~2.5"
+        },
+        "require-dev": {
+            "athletic/athletic": "dev-master",
+            "fabpot/php-cs-fixer": "1.7.*",
+            "phpunit/phpunit": "~4.0"
+        },
+        "time": "2016-01-12 23:08:36",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.6-dev",
+                "dev-develop": "3.0-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\EventManager\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "homepage": "https://github.com/zendframework/zend-eventmanager",
+        "keywords": [
+            "eventmanager",
+            "zf2"
+        ]
+    },
+    {
+        "name": "zendframework/zend-cache",
+        "version": "2.5.3",
+        "version_normalized": "2.5.3.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-cache.git",
+            "reference": "7ff9d6b922ae29dbdc53f6a62b471fb6e58565df"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/7ff9d6b922ae29dbdc53f6a62b471fb6e58565df",
+            "reference": "7ff9d6b922ae29dbdc53f6a62b471fb6e58565df",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.5",
+            "zendframework/zend-eventmanager": "~2.5",
+            "zendframework/zend-servicemanager": "~2.5",
+            "zendframework/zend-stdlib": "~2.5"
+        },
+        "require-dev": {
+            "fabpot/php-cs-fixer": "1.7.*",
+            "phpunit/phpunit": "~4.0",
+            "zendframework/zend-serializer": "~2.5",
+            "zendframework/zend-session": "~2.5"
+        },
+        "suggest": {
+            "ext-apcu": "APCU, to use the APC storage adapter",
+            "ext-dba": "DBA, to use the DBA storage adapter",
+            "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter",
+            "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter",
+            "ext-mongo": "Mongo, to use MongoDb storage adapter",
+            "ext-redis": "Redis, to use Redis storage adapter",
+            "ext-wincache": "WinCache, to use the WinCache storage adapter",
+            "ext-xcache": "XCache, to use the XCache storage adapter",
+            "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement",
+            "zendframework/zend-serializer": "Zend\\Serializer component",
+            "zendframework/zend-session": "Zend\\Session component"
+        },
+        "time": "2015-09-15 16:09:09",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.5-dev",
+                "dev-develop": "2.6-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\Cache\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "description": "provides a generic way to cache any data",
+        "homepage": "https://github.com/zendframework/zend-cache",
+        "keywords": [
+            "cache",
+            "zf2"
+        ]
+    },
+    {
+        "name": "zendframework/zend-config",
+        "version": "2.6.0",
+        "version_normalized": "2.6.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-config.git",
+            "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-config/zipball/2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d",
+            "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d",
+            "shasum": ""
+        },
+        "require": {
+            "php": "^5.5 || ^7.0",
+            "zendframework/zend-stdlib": "^2.7 || ^3.0"
+        },
+        "require-dev": {
+            "fabpot/php-cs-fixer": "1.7.*",
+            "phpunit/phpunit": "~4.0",
+            "zendframework/zend-filter": "^2.6",
+            "zendframework/zend-i18n": "^2.5",
+            "zendframework/zend-json": "^2.6.1",
+            "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
+        },
+        "suggest": {
+            "zendframework/zend-filter": "Zend\\Filter component",
+            "zendframework/zend-i18n": "Zend\\I18n component",
+            "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
+            "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+        },
+        "time": "2016-02-04 23:01:10",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.6-dev",
+                "dev-develop": "2.7-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\Config\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "description": "provides a nested object property based user interface for accessing this configuration data within application code",
+        "homepage": "https://github.com/zendframework/zend-config",
+        "keywords": [
+            "config",
+            "zf2"
+        ]
+    },
+    {
+        "name": "zendframework/zend-json",
+        "version": "2.6.1",
+        "version_normalized": "2.6.1.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/zendframework/zend-json.git",
+            "reference": "4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/zendframework/zend-json/zipball/4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28",
+            "reference": "4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28",
+            "shasum": ""
+        },
+        "require": {
+            "php": "^5.5 || ^7.0"
+        },
+        "require-dev": {
+            "fabpot/php-cs-fixer": "1.7.*",
+            "phpunit/phpunit": "~4.0",
+            "zendframework/zend-http": "^2.5.4",
+            "zendframework/zend-server": "^2.6.1",
+            "zendframework/zend-stdlib": "^2.5 || ^3.0",
+            "zendframework/zendxml": "^1.0.2"
+        },
+        "suggest": {
+            "zendframework/zend-http": "Zend\\Http component, required to use Zend\\Json\\Server",
+            "zendframework/zend-server": "Zend\\Server component, required to use Zend\\Json\\Server",
+            "zendframework/zend-stdlib": "Zend\\Stdlib component, for use with caching Zend\\Json\\Server responses",
+            "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage"
+        },
+        "time": "2016-02-04 21:20:26",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.6-dev",
+                "dev-develop": "2.7-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Zend\\Json\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
+        "homepage": "https://github.com/zendframework/zend-json",
+        "keywords": [
+            "json",
+            "zf2"
+        ]
+    },
+    {
+        "name": "squizlabs/php_codesniffer",
+        "version": "2.5.1",
+        "version_normalized": "2.5.1.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+            "reference": "6731851d6aaf1d0d6c58feff1065227b7fda3ba8"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6731851d6aaf1d0d6c58feff1065227b7fda3ba8",
+            "reference": "6731851d6aaf1d0d6c58feff1065227b7fda3ba8",
+            "shasum": ""
+        },
+        "require": {
+            "ext-tokenizer": "*",
+            "ext-xmlwriter": "*",
+            "php": ">=5.1.2"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "~4.0"
+        },
+        "time": "2016-01-19 23:39:10",
+        "bin": [
+            "scripts/phpcs",
+            "scripts/phpcbf"
+        ],
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.x-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "classmap": [
+                "CodeSniffer.php",
+                "CodeSniffer/CLI.php",
+                "CodeSniffer/Exception.php",
+                "CodeSniffer/File.php",
+                "CodeSniffer/Fixer.php",
+                "CodeSniffer/Report.php",
+                "CodeSniffer/Reporting.php",
+                "CodeSniffer/Sniff.php",
+                "CodeSniffer/Tokens.php",
+                "CodeSniffer/Reports/",
+                "CodeSniffer/Tokenizers/",
+                "CodeSniffer/DocGenerators/",
+                "CodeSniffer/Standards/AbstractPatternSniff.php",
+                "CodeSniffer/Standards/AbstractScopeSniff.php",
+                "CodeSniffer/Standards/AbstractVariableSniff.php",
+                "CodeSniffer/Standards/IncorrectPatternException.php",
+                "CodeSniffer/Standards/Generic/Sniffs/",
+                "CodeSniffer/Standards/MySource/Sniffs/",
+                "CodeSniffer/Standards/PEAR/Sniffs/",
+                "CodeSniffer/Standards/PSR1/Sniffs/",
+                "CodeSniffer/Standards/PSR2/Sniffs/",
+                "CodeSniffer/Standards/Squiz/Sniffs/",
+                "CodeSniffer/Standards/Zend/Sniffs/"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "authors": [
+            {
+                "name": "Greg Sherwood",
+                "role": "lead"
+            }
+        ],
+        "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+        "homepage": "http://www.squizlabs.com/php-codesniffer",
+        "keywords": [
+            "phpcs",
+            "standards"
+        ]
+    }
+]
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/.gitignore
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/.gitignore	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/.gitignore	(revision 5534)
@@ -0,0 +1,3 @@
+composer.lock
+composer.phar
+/vendor/
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/LICENSE	(revision 5534)
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 container-interop
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/README.md	(revision 5534)
@@ -0,0 +1,85 @@
+# Container Interoperability
+
+[![Latest Stable Version](https://poser.pugx.org/container-interop/container-interop/v/stable.png)](https://packagist.org/packages/container-interop/container-interop)
+
+*container-interop* tries to identify and standardize features in *container* objects (service locators,
+dependency injection containers, etc.) to achieve interopererability.
+
+Through discussions and trials, we try to create a standard, made of common interfaces but also recommendations. 
+
+If PHP projects that provide container implementations begin to adopt these common standards, then PHP
+applications and projects that use containers can depend on the common interfaces instead of specific
+implementations. This facilitates a high-level of interoperability and flexibility that allows users to consume
+*any* container implementation that can be adapted to these interfaces.
+
+The work done in this project is not officially endorsed by the [PHP-FIG](http://www.php-fig.org/), but it is being
+worked on by members of PHP-FIG and other good developers. We adhere to the spirit and ideals of PHP-FIG, and hope
+this project will pave the way for one or more future PSRs.
+
+
+## Installation
+
+You can install this package through Composer:
+
+```json
+{
+    "require": {
+        "container-interop/container-interop": "~1.0"
+    }
+}
+```
+
+The packages adheres to the [SemVer](http://semver.org/) specification, and there will be full backward compatibility
+between minor versions.
+
+## Standards
+
+### Available
+
+- [`ContainerInterface`](src/Interop/Container/ContainerInterface.php).
+[Description](docs/ContainerInterface.md) [Meta Document](docs/ContainerInterface-meta.md).
+Describes the interface of a container that exposes methods to read its entries.
+- [*Delegate lookup feature*](docs/Delegate-lookup.md).
+[Meta Document](docs/Delegate-lookup-meta.md).
+Describes the ability for a container to delegate the lookup of its dependencies to a third-party container. This 
+feature lets several containers work together in a single application.
+
+### Proposed
+
+View open [request for comments](https://github.com/container-interop/container-interop/labels/RFC)
+
+## Compatible projects
+
+### Projects implementing `ContainerInterface`
+
+- [Acclimate](https://github.com/jeremeamia/acclimate-container)
+- [dcp-di](https://github.com/estelsmith/dcp-di)
+- [Mouf](http://mouf-php.com)
+- [Njasm Container](https://github.com/njasm/container)
+- [PHP-DI](http://php-di.org)
+- [PimpleInterop](https://github.com/moufmouf/pimple-interop)
+- [XStatic](https://github.com/jeremeamia/xstatic)
+
+### Projects implementing the *delegate lookup* feature
+
+- [Mouf](http://mouf-php.com)
+- [PHP-DI](http://php-di.org)
+- [PimpleInterop](https://github.com/moufmouf/pimple-interop)
+
+## Workflow
+
+Everyone is welcome to join and contribute.
+
+The general workflow looks like this:
+
+1. Someone opens a discussion (GitHub issue) to suggest an interface
+1. Feedback is gathered
+1. The interface is added to a development branch
+1. We release alpha versions so that the interface can be experimented with
+1. Discussions and edits ensue until the interface is deemed stable by a general consensus
+1. A new minor version of the package is released
+
+We try to not break BC by creating new interfaces instead of editing existing ones.
+
+While we currently work on interfaces, we are open to anything that might help towards interoperability, may that
+be code, best practices, etc.
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/composer.json	(revision 5534)
@@ -0,0 +1,11 @@
+{
+    "name": "container-interop/container-interop",
+    "type": "library",
+    "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
+    "license": "MIT",
+    "autoload": {
+        "psr-4": {
+            "Interop\\Container\\": "src/Interop/Container/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/ContainerInterface-meta.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/ContainerInterface-meta.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/ContainerInterface-meta.md	(revision 5534)
@@ -0,0 +1,114 @@
+# ContainerInterface Meta Document
+
+## Introduction
+
+This document describes the process and discussions that lead to the `ContainerInterface`.
+Its goal is to explain the reasons behind each decision.
+
+## Goal
+
+The goal set by `ContainerInterface` is to standardize how frameworks and libraries make use of a
+container to obtain objects and parameters.
+
+By standardizing such a behavior, frameworks and libraries using the `ContainerInterface`
+could work with any compatible container.
+That would allow end users to choose their own container based on their own preferences.
+
+It is important to distinguish the two usages of a container:
+
+- configuring entries
+- fetching entries
+
+Most of the time, those two sides are not used by the same party.
+While it is often end users who tend to configure entries, it is generally the framework that fetch
+entries to build the application.
+
+This is why this interface focuses only on how entries can be fetched from a container.
+
+## Interface name
+
+The interface name has been thoroughly discussed and was decided by a vote.
+
+The list of options considered with their respective votes are:
+
+- `ContainerInterface`: +8
+- `ProviderInterface`: +2
+- `LocatorInterface`: 0
+- `ReadableContainerInterface`: -5
+- `ServiceLocatorInterface`: -6
+- `ObjectFactory`: -6
+- `ObjectStore`: -8
+- `ConsumerInterface`: -9
+
+[Full results of the vote](https://github.com/container-interop/container-interop/wiki/%231-interface-name:-Vote)
+
+The complete discussion can be read in [the issue #1](https://github.com/container-interop/container-interop/issues/1).
+
+## Interface methods
+
+The choice of which methods the interface would contain was made after a statistical analysis of existing containers.
+The results of this analysis are available [in this document](https://gist.github.com/mnapoli/6159681).
+
+The summary of the analysis showed that:
+
+- all containers offer a method to get an entry by its id
+- a large majority name such method `get()`
+- for all containers, the `get()` method has 1 mandatory parameter of type string
+- some containers have an optional additional argument for `get()`, but it doesn't same the same purpose between containers
+- a large majority of the containers offer a method to test if it can return an entry by its id
+- a majority name such method `has()`
+- for all containers offering `has()`, the method has exactly 1 parameter of type string
+- a large majority of the containers throw an exception rather than returning null when an entry is not found in `get()`
+- a large majority of the containers don't implement `ArrayAccess`
+
+The question of whether to include methods to define entries has been discussed in
+[issue #1](https://github.com/container-interop/container-interop/issues/1).
+It has been judged that such methods do not belong in the interface described here because it is out of its scope
+(see the "Goal" section).
+
+As a result, the `ContainerInterface` contains two methods:
+
+- `get()`, returning anything, with one mandatory string parameter. Should throw an exception if the entry is not found.
+- `has()`, returning a boolean, with one mandatory string parameter.
+
+### Number of parameters in `get()` method
+
+While `ContainerInterface` only defines one mandatory parameter in `get()`, it is not incompatible with
+existing containers that have additional optional parameters. PHP allows an implementation to offer more parameters
+as long as they are optional, because the implementation *does* satisfy the interface.
+
+This issue has been discussed in [issue #6](https://github.com/container-interop/container-interop/issues/6).
+
+### Type of the `$id` parameter
+
+The type of the `$id` parameter in `get()` and `has()` has been discussed in
+[issue #6](https://github.com/container-interop/container-interop/issues/6).
+While `string` is used in all the containers that were analyzed, it was suggested that allowing
+anything (such as objects) could allow containers to offer a more advanced query API.
+
+An example given was to use the container as an object builder. The `$id` parameter would then be an
+object that would describe how to create an instance.
+
+The conclusion of the discussion was that this was beyond the scope of getting entries from a container without
+knowing how the container provided them, and it was more fit for a factory.
+
+## Contributors
+
+Are listed here all people that contributed in the discussions or votes, by alphabetical order:
+
+- [Amy Stephen](https://github.com/AmyStephen)
+- [David NÃ©grier](https://github.com/moufmouf)
+- [Don Gilbert](https://github.com/dongilbert)
+- [Jason Judge](https://github.com/judgej)
+- [Jeremy Lindblom](https://github.com/jeremeamia)
+- [Marco Pivetta](https://github.com/Ocramius)
+- [Matthieu Napoli](https://github.com/mnapoli)
+- [Paul M. Jones](https://github.com/pmjones)
+- [Stephan HochdÃ¶rfer](https://github.com/shochdoerfer)
+- [Taylor Otwell](https://github.com/taylorotwell)
+
+## Relevant links
+
+- [`ContainerInterface.php`](https://github.com/container-interop/container-interop/blob/master/src/Interop/Container/ContainerInterface.php)
+- [List of all issues](https://github.com/container-interop/container-interop/issues?labels=ContainerInterface&milestone=&page=1&state=closed)
+- [Vote for the interface name](https://github.com/container-interop/container-interop/wiki/%231-interface-name:-Vote)
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/ContainerInterface.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/ContainerInterface.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/ContainerInterface.md	(revision 5534)
@@ -0,0 +1,153 @@
+Container interface
+===================
+
+This document describes a common interface for dependency injection containers.
+
+The goal set by `ContainerInterface` is to standardize how frameworks and libraries make use of a
+container to obtain objects and parameters (called *entries* in the rest of this document).
+
+The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
+"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
+interpreted as described in [RFC 2119][].
+
+The word `implementor` in this document is to be interpreted as someone
+implementing the `ContainerInterface` in a depency injection-related library or framework.
+Users of dependency injections containers (DIC) are refered to as `user`.
+
+[RFC 2119]: http://tools.ietf.org/html/rfc2119
+
+1. Specification
+-----------------
+
+### 1.1 Basics
+
+- The `Interop\Container\ContainerInterface` exposes two methods : `get` and `has`.
+
+- `get` takes one mandatory parameter: an entry identifier. It MUST be a string.
+  A call to `get` can return anything (a *mixed* value), or throws an exception if the identifier
+  is not known to the container. Two successive calls to `get` with the same
+  identifier SHOULD return the same value. However, depending on the `implementor`
+  design and/or `user` configuration, different values might be returned, so
+  `user` SHOULD NOT rely on getting the same value on 2 successive calls.
+  While `ContainerInterface` only defines one mandatory parameter in `get()`, implementations
+  MAY accept additional optional parameters.
+  
+- `has` takes one unique parameter: an entry identifier. It MUST return `true`
+  if an entry identifier is known to the container and `false` if it is not.
+  
+### 1.2 Exceptions
+
+Exceptions directly thrown by the container MUST implement the 
+[`Interop\Container\Exception\ContainerException`](../src/Interop/Container/Exception/ContainerException.php).
+
+A call to the `get` method with a non-existing id should throw a
+[`Interop\Container\Exception\NotFoundException`](../src/Interop/Container/Exception/NotFoundException.php).
+
+### 1.3 Additional features
+
+This section describes additional features that MAY be added to a container. Containers are not 
+required to implement these features to respect the ContainerInterface.
+
+#### 1.3.1 Delegate lookup feature
+
+The goal of the *delegate lookup* feature is to allow several containers to share entries. 
+Containers implementing this feature can perform dependency lookups in other containers.
+
+Containers implementing this feature will offer a greater lever of interoperability 
+with other containers. Implementation of this feature is therefore RECOMMENDED.
+
+A container implementing this feature:
+
+- MUST implement the `ContainerInterface`
+- MUST provide a way to register a delegate container (using a constructor parameter, or a setter, 
+  or any possible way). The delegate container MUST implement the `ContainerInterface`.
+
+When a container is configured to use a delegate container for dependencies:
+
+- Calls to the `get` method should only return an entry if the entry is part of the container. 
+  If the entry is not part of the container, an exception should be thrown 
+  (as requested by the `ContainerInterface`).
+- Calls to the `has` method should only return `true` if the entry is part of the container.
+  If the entry is not part of the container, `false` should be returned.
+- If the fetched entry has dependencies, **instead** of performing 
+  the dependency lookup in the container, the lookup is performed on the *delegate container*.
+
+Important! By default, the lookup SHOULD be performed on the delegate container **only**, not on the container itself.
+
+It is however allowed for containers to provide exception cases for special entries, and a way to lookup 
+into the same container (or another container) instead of the delegate container.
+
+2. Package
+----------
+
+The interfaces and classes described as well as relevant exception are provided as part of the
+[container-interop/container-interop](https://packagist.org/packages/container-interop/container-interop) package.
+
+3. `Interop\Container\ContainerInterface`
+-----------------------------------------
+
+```php
+<?php
+namespace Interop\Container;
+
+use Interop\Container\Exception\ContainerException;
+use Interop\Container\Exception\NotFoundException;
+
+/**
+ * Describes the interface of a container that exposes methods to read its entries.
+ */
+interface ContainerInterface
+{
+    /**
+     * Finds an entry of the container by its identifier and returns it.
+     *
+     * @param string $id Identifier of the entry to look for.
+     *
+     * @throws NotFoundException  No entry was found for this identifier.
+     * @throws ContainerException Error while retrieving the entry.
+     *
+     * @return mixed Entry.
+     */
+    public function get($id);
+
+    /**
+     * Returns true if the container can return an entry for the given identifier.
+     * Returns false otherwise.
+     *
+     * @param string $id Identifier of the entry to look for.
+     *
+     * @return boolean
+     */
+    public function has($id);
+}
+```
+
+4. `Interop\Container\Exception\ContainerException`
+---------------------------------------------------
+
+```php
+<?php
+namespace Interop\Container\Exception;
+
+/**
+ * Base interface representing a generic exception in a container.
+ */
+interface ContainerException
+{
+}
+```
+
+5. `Interop\Container\Exception\NotFoundException`
+---------------------------------------------------
+
+```php
+<?php
+namespace Interop\Container\Exception;
+
+/**
+ * No entry was found in the container.
+ */
+interface NotFoundException extends ContainerException
+{
+}
+```
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/Delegate-lookup-meta.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/Delegate-lookup-meta.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/Delegate-lookup-meta.md	(revision 5534)
@@ -0,0 +1,259 @@
+Delegate lookup feature Meta Document
+=====================================
+
+1. Summary
+----------
+
+This document describes the *delegate lookup feature*.
+Containers are not required to implement this feature to respect the `ContainerInterface`.
+However, containers implementing this feature will offer a greater lever of interoperability
+with other containers, allowing multiple containers to share entries in the same application.
+Implementation of this feature is therefore recommanded.
+
+2. Why Bother?
+--------------
+
+The [`ContainerInterface`](../src/Interop/Container/ContainerInterface.php) ([meta doc](ContainerInterface.md))
+standardizes how frameworks and libraries make use of a container to obtain objects and parameters.
+
+By standardizing such a behavior, frameworks and libraries relying on the `ContainerInterface`
+could work with any compatible container.
+That would allow end users to choose their own container based on their own preferences.
+
+The `ContainerInterface` is also enough if we want to have several containers side-by-side in the same
+application. For instance, this is what the [CompositeContainer](https://github.com/jeremeamia/acclimate-container/blob/master/src/CompositeContainer.php) 
+class of [Acclimate](https://github.com/jeremeamia/acclimate-container) is designed for:
+
+![Side by side containers](images/side_by_side_containers.png)
+
+However, an instance in container 1 cannot reference an instance in container 2.
+
+It would be better if an instance of container 1 could reference an instance in container 2,
+and the opposite should be true. 
+
+![Interoperating containers](images/interoperating_containers.png)
+
+In the sample above, entry 1 in container 1 is referencing entry 3 in container 2.
+
+3. Scope
+--------
+
+### 3.1 Goals
+
+The goal of the *delegate lookup* feature is to allow several containers to share entries.
+
+4. Approaches
+-------------
+
+### 4.1 Chosen Approach
+
+Containers implementing this feature can perform dependency lookups in other containers.
+
+A container implementing this feature:
+
+- must implement the `ContainerInterface`
+- must provide a way to register a *delegate container* (using a constructor parameter, or a setter, or any
+possible way). The *delegate container* must implement the `ContainerInterface`.
+
+When a *delegate container* is configured on a container:
+
+- Calls to the `get` method should only return an entry if the entry is part of the container.
+If the entry is not part of the container, an exception should be thrown (as required in the `ContainerInterface`).
+- Calls to the `has` method should only return *true* if the entry is part of the container.
+If the entry is not part of the container, *false* should be returned.
+ - Finally, the important part: if the entry we are fetching has dependencies,
+**instead** of perfoming the dependency lookup in the container, the lookup is performed on the *delegate container*.
+
+Important! By default, the lookup should be performed on the delegate container **only**, not on the container itself.
+
+It is however allowed for containers to provide exception cases for special entries, and a way to lookup into 
+the same container (or another container) instead of the delegate container.
+
+### 4.2 Typical usage
+
+The *delegate container* will usually be a composite container. A composite container is a container that
+contains several other containers. When performing a lookup on a composite container, the inner containers are 
+queried until one container returns an entry.
+An inner container implementing the *delegate lookup feature* will return entries it contains, but if these
+entries have dependencies, the dependencies lookup calls will be performed on the composite container, giving
+a chance to all containers to answer.
+
+Interestingly enough, the order in which containers are added in the composite container matters. Indeed,
+the first containers to be added in the composite container can "override" the entries of containers with
+lower priority.
+
+![Containers priority](images/priority.png)
+
+In the example above, "container 2" contains a controller "myController" and the controller is referencing an 
+"entityManager" entry. "Container 1" contains also an entry named "entityManager".
+Without the *delegate lookup* feature, when requesting the "myController" instance to container 2, it would take 
+in charge the instanciation of both entries.
+
+However, using the *delegate lookup* feature, here is what happens when we ask the composite controller for the 
+"myController" instance:
+
+- The composite controller asks container 1 if if contains the "myController" instance. The answer is no.
+- The composite controller asks container 2 if if contains the "myController" instance. The answer is yes.
+- The composite controller performs a `get` call on container 2 for the "myController" instance.
+- Container 2 sees that "myController" has a dependency on "entityManager".
+- Container 2 delegates the lookup of "entityManager" to the composite controller.
+- The composite controller asks container 1 if if contains the "entityManager" instance. The answer is yes.
+- The composite controller performs a `get` call on container 1 for the "entityManager" instance.
+
+In the end, we get a controller instanciated by container 2 that references an entityManager instanciated
+by container 1.
+
+### 4.3 Alternative: the fallback strategy
+
+The first proposed approach we tried was to perform all the lookups in the "local" container,
+and if a lookup fails in the container, to use the delegate container. In this scenario, the
+delegate container is used in "fallback" mode.
+
+This strategy has been described in @moufmouf blog post: http://mouf-php.com/container-interop-whats-next (solution 1).
+It was also discussed [here](https://github.com/container-interop/container-interop/pull/8#issuecomment-33570697) and
+[here](https://github.com/container-interop/container-interop/pull/20#issuecomment-56599631).
+
+Problems with this strategy:
+
+- Heavy problem regarding infinite loops
+- Unable to overload a container entry with the delegate container entry
+
+### 4.4 Alternative: force implementing an interface
+
+The first proposed approach was to develop a `ParentAwareContainerInterface` interface.
+It was proposed here: https://github.com/container-interop/container-interop/pull/8
+
+The interface would have had the behaviour of the delegate lookup feature but would have forced the addition of
+a `setParentContainter` method:
+
+```php
+interface ParentAwareContainerInterface extends ReadableContainerInterface {
+    /**
+     * Sets the parent container associated to that container. This container will call
+     * the parent container to fetch dependencies.
+     *
+     * @param ContainerInterface $container
+     */
+    public function setParentContainer(ContainerInterface $container);
+}
+```
+
+The interface idea was first questioned by @Ocramius [here](https://github.com/container-interop/container-interop/pull/8#issuecomment-51721777).
+@Ocramius expressed the idea that an interface should not contain setters, otherwise, it is forcing implementation
+details on the class implementing the interface. 
+Then @mnapoli made a proposal for a "convention" [here](https://github.com/container-interop/container-interop/pull/8#issuecomment-51841079),
+this idea was further discussed until all participants in the discussion agreed to remove the interface idea
+and replace it with a "standard" feature.
+
+**Pros:**
+
+If we had had an interface, we could have delegated the registration of the delegate/composite container to the
+the delegate/composite container itself.
+For instance:
+
+```php
+$containerA = new ContainerA();
+$containerB = new ContainerB();
+
+$compositeContainer = new CompositeContainer([$containerA, $containerB]);
+
+// The call to 'setParentContainer' is delegated to the CompositeContainer
+// It is not the responsibility of the user anymore.
+class CompositeContainer {
+	...
+	
+	public function __construct($containers) {
+		foreach ($containers as $container) {
+			if ($container instanceof ParentAwareContainerInterface) {
+				$container->setParentContainer($this);
+			}
+		}
+		...
+	}
+}
+
+``` 
+
+**Cons:**
+
+Cons have been extensively discussed [here](https://github.com/container-interop/container-interop/pull/8#issuecomment-51721777).
+Basically, forcing a setter into an interface is a bad idea. Setters are similar to constructor arguments,
+and it's a bad idea to standardize a constructor: how the delegate container is configured into a container is an implementation detail. This outweights the benefits of the interface.
+
+### 4.4 Alternative: no exception case for delegate lookups
+
+Originally, the proposed wording for delegate lookup calls was:
+
+> Important! The lookup MUST be performed on the delegate container **only**, not on the container itself.
+
+This was later replaced by:
+
+> Important! By default, the lookup SHOULD be performed on the delegate container **only**, not on the container itself.
+>
+> It is however allowed for containers to provide exception cases for special entries, and a way to lookup 
+> into the same container (or another container) instead of the delegate container.
+
+Exception cases have been allowed to avoid breaking dependencies with some services that must be provided
+by the container (on @njasm proposal). This was proposed here: https://github.com/container-interop/container-interop/pull/20#issuecomment-56597235
+
+### 4.5 Alternative: having one of the containers act as the composite container
+
+In real-life scenarios, we usually have a big framework (Symfony 2, Zend Framework 2, etc...) and we want to
+add another DI container to this container. Most of the time, the "big" framework will be responsible for
+creating the controller's instances, using it's own DI container. Until *container-interop* is fully adopted,
+the "big" framework will not be aware of the existence of a composite container that it should use instead
+of its own container.
+
+For this real-life use cases, @mnapoli and @moufmouf proposed to extend the "big" framework's DI container
+to make it act as a composite container.
+
+This has been discussed [here](https://github.com/container-interop/container-interop/pull/8#issuecomment-40367194) 
+and [here](http://mouf-php.com/container-interop-whats-next#solution4).
+
+This was implemented in Symfony 2 using:
+
+- [interop.symfony.di](https://github.com/thecodingmachine/interop.symfony.di/tree/v0.1.0)
+- [framework interop](https://github.com/mnapoli/framework-interop/)
+
+This was implemented in Silex using:
+
+- [interop.silex.di](https://github.com/thecodingmachine/interop.silex.di)
+
+Having a container act as the composite container is not part of the delegate lookup standard because it is
+simply a temporary design pattern used to make existing frameworks that do not support yet ContainerInterop
+play nice with other DI containers.
+
+
+5. Implementations
+------------------
+
+The following projects already implement the delegate lookup feature:
+
+- [Mouf](http://mouf-php.com), through the [`setDelegateLookupContainer` method](https://github.com/thecodingmachine/mouf/blob/2.0/src/Mouf/MoufManager.php#L2120)
+- [PHP-DI](http://php-di.org/), through the [`$wrapperContainer` parameter of the constructor](https://github.com/mnapoli/PHP-DI/blob/master/src/DI/Container.php#L72)
+- [pimple-interop](https://github.com/moufmouf/pimple-interop), through the [`$container` parameter of the constructor](https://github.com/moufmouf/pimple-interop/blob/master/src/Interop/Container/Pimple/PimpleInterop.php#L62)
+
+6. People
+---------
+
+Are listed here all people that contributed in the discussions, by alphabetical order:
+
+- [Alexandru PÄtrÄnescu](https://github.com/drealecs)
+- [Ben Peachey](https://github.com/potherca)
+- [David NÃ©grier](https://github.com/moufmouf)
+- [Jeremy Lindblom](https://github.com/jeremeamia)
+- [Marco Pivetta](https://github.com/Ocramius)
+- [Matthieu Napoli](https://github.com/mnapoli)
+- [Nelson J Morais](https://github.com/njasm)
+- [Phil Sturgeon](https://github.com/philsturgeon)
+- [Stephan HochdÃ¶rfer](https://github.com/shochdoerfer)
+
+7. Relevant Links
+-----------------
+
+_**Note:** Order descending chronologically._
+
+- [Pull request on the delegate lookup feature](https://github.com/container-interop/container-interop/pull/20)
+- [Pull request on the interface idea](https://github.com/container-interop/container-interop/pull/8)
+- [Original article exposing the delegate lookup idea along many others](http://mouf-php.com/container-interop-whats-next)
+
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/Delegate-lookup.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/Delegate-lookup.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/docs/Delegate-lookup.md	(revision 5534)
@@ -0,0 +1,60 @@
+Delegate lookup feature
+=======================
+
+This document describes a standard for dependency injection containers.
+
+The goal set by the *delegate lookup* feature is to allow several containers to share entries. 
+Containers implementing this feature can perform dependency lookups in other containers.
+
+Containers implementing this feature will offer a greater lever of interoperability 
+with other containers. Implementation of this feature is therefore RECOMMENDED.
+
+The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
+"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
+interpreted as described in [RFC 2119][].
+
+The word `implementor` in this document is to be interpreted as someone
+implementing the delegate lookup feature in a dependency injection-related library or framework.
+Users of dependency injections containers (DIC) are refered to as `user`.
+
+[RFC 2119]: http://tools.ietf.org/html/rfc2119
+
+1. Vocabulary
+-------------
+
+In a dependency injection container, the container is used to fetch entries.
+Entries can have dependencies on other entries. Usually, these other entries are fetched by the container.
+
+The *delegate lookup* feature is the ability for a container to fetch dependencies in
+another container. In the rest of the document, the word "container" will reference the container
+implemented by the implementor. The word "delegate container" will reference the container we are
+fetching the dependencies from.
+
+2. Specification
+----------------
+
+A container implementing the *delegate lookup* feature:
+
+- MUST implement the [`ContainerInterface`](ContainerInterface.md)
+- MUST provide a way to register a delegate container (using a constructor parameter, or a setter, 
+  or any possible way). The delegate container MUST implement the [`ContainerInterface`](ContainerInterface.md).
+
+When a container is configured to use a delegate container for dependencies:
+
+- Calls to the `get` method should only return an entry if the entry is part of the container.
+  If the entry is not part of the container, an exception should be thrown 
+  (as requested by the [`ContainerInterface`](ContainerInterface.md)).
+- Calls to the `has` method should only return `true` if the entry is part of the container.
+  If the entry is not part of the container, `false` should be returned.
+- If the fetched entry has dependencies, **instead** of performing 
+  the dependency lookup in the container, the lookup is performed on the *delegate container*.
+
+Important: By default, the dependency lookups SHOULD be performed on the delegate container **only**, not on the container itself.
+
+It is however allowed for containers to provide exception cases for special entries, and a way to lookup 
+into the same container (or another container) instead of the delegate container.
+
+3. Package / Interface
+----------------------
+
+This feature is not tied to any code, interface or package.
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/ContainerInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/ContainerInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/ContainerInterface.php	(revision 5534)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
+ */
+
+namespace Interop\Container;
+
+use Interop\Container\Exception\ContainerException;
+use Interop\Container\Exception\NotFoundException;
+
+/**
+ * Describes the interface of a container that exposes methods to read its entries.
+ */
+interface ContainerInterface
+{
+    /**
+     * Finds an entry of the container by its identifier and returns it.
+     *
+     * @param string $id Identifier of the entry to look for.
+     *
+     * @throws NotFoundException  No entry was found for this identifier.
+     * @throws ContainerException Error while retrieving the entry.
+     *
+     * @return mixed Entry.
+     */
+    public function get($id);
+
+    /**
+     * Returns true if the container can return an entry for the given identifier.
+     * Returns false otherwise.
+     *
+     * @param string $id Identifier of the entry to look for.
+     *
+     * @return boolean
+     */
+    public function has($id);
+}
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php	(revision 5534)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
+ */
+
+namespace Interop\Container\Exception;
+
+/**
+ * Base interface representing a generic exception in a container.
+ */
+interface ContainerException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php	(revision 5534)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
+ */
+
+namespace Interop\Container\Exception;
+
+/**
+ * No entry was found in the container.
+ */
+interface NotFoundException extends ContainerException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/.travis.yml
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/.travis.yml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/.travis.yml	(revision 5534)
@@ -0,0 +1,40 @@
+language: php
+
+sudo: false
+
+php:
+  - 5.5
+  - 5.6
+  - 7.0
+  - hhvm
+
+before_script:
+  - curl --version
+  - composer self-update
+  - composer install --no-interaction --prefer-source --dev
+  - ~/.nvm/nvm.sh install v0.6.14
+  - ~/.nvm/nvm.sh run v0.6.14
+
+script: make test
+
+matrix:
+  allow_failures:
+    - php: hhvm
+    - php: 7.0
+  fast_finish: true
+
+before_deploy:
+  - make package
+
+deploy:
+  provider: releases
+  api_key:
+    secure: UpypqlYgsU68QT/x40YzhHXvzWjFwCNo9d+G8KAdm7U9+blFfcWhV1aMdzugvPMl6woXgvJj7qHq5tAL4v6oswCORhpSBfLgOQVFaica5LiHsvWlAedOhxGmnJqMTwuepjBCxXhs3+I8Kof1n4oUL9gKytXjOVCX/f7XU1HiinU=
+  file:
+    - build/artifacts/guzzle.phar
+    - build/artifacts/guzzle.zip
+  on:
+    repo: guzzle/guzzle
+    tags: true
+    all_branches: true
+    php: 5.5
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,1203 @@
+# CHANGELOG
+
+## 6.1.1 - 2015-11-22
+
+* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler
+  https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4
+* Feature: HandlerStack is now more generic.
+  https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e
+* Bug fix: setting verify to false in the StreamHandler now disables peer
+  verification. https://github.com/guzzle/guzzle/issues/1256
+* Feature: Middleware now uses an exception factory, including more error
+  context. https://github.com/guzzle/guzzle/pull/1282
+* Feature: better support for disabled functions.
+  https://github.com/guzzle/guzzle/pull/1287
+* Bug fix: fixed regression where MockHandler was not using `sink`.
+  https://github.com/guzzle/guzzle/pull/1292
+
+## 6.1.0 - 2015-09-08
+
+* Feature: Added the `on_stats` request option to provide access to transfer
+  statistics for requests. https://github.com/guzzle/guzzle/pull/1202
+* Feature: Added the ability to persist session cookies in CookieJars.
+  https://github.com/guzzle/guzzle/pull/1195
+* Feature: Some compatibility updates for Google APP Engine
+  https://github.com/guzzle/guzzle/pull/1216
+* Feature: Added support for NO_PROXY to prevent the use of a proxy based on
+  a simple set of rules. https://github.com/guzzle/guzzle/pull/1197
+* Feature: Cookies can now contain square brackets.
+  https://github.com/guzzle/guzzle/pull/1237
+* Bug fix: Now correctly parsing `=` inside of quotes in Cookies.
+  https://github.com/guzzle/guzzle/pull/1232
+* Bug fix: Cusotm cURL options now correctly override curl options of the
+  same name. https://github.com/guzzle/guzzle/pull/1221
+* Bug fix: Content-Type header is now added when using an explicitly provided
+  multipart body. https://github.com/guzzle/guzzle/pull/1218
+* Bug fix: Now ignoring Set-Cookie headers that have no name.
+* Bug fix: Reason phrase is no longer cast to an int in some cases in the
+  cURL handler. https://github.com/guzzle/guzzle/pull/1187
+* Bug fix: Remove the Authorization header when redirecting if the Host
+  header changes. https://github.com/guzzle/guzzle/pull/1207
+* Bug fix: Cookie path matching fixes
+  https://github.com/guzzle/guzzle/issues/1129
+* Bug fix: Fixing the cURL `body_as_string` setting
+  https://github.com/guzzle/guzzle/pull/1201
+* Bug fix: quotes are no longer stripped when parsing cookies.
+  https://github.com/guzzle/guzzle/issues/1172
+* Bug fix: `form_params` and `query` now always uses the `&` separator.
+  https://github.com/guzzle/guzzle/pull/1163
+* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set.
+  https://github.com/guzzle/guzzle/pull/1189
+
+## 6.0.2 - 2015-07-04
+
+* Fixed a memory leak in the curl handlers in which references to callbacks
+  were not being removed by `curl_reset`.
+* Cookies are now extracted properly before redirects.
+* Cookies now allow more character ranges.
+* Decoded Content-Encoding responses are now modified to correctly reflect
+  their state if the encoding was automatically removed by a handler. This
+  means that the `Content-Encoding` header may be removed an the
+  `Content-Length` modified to reflect the message size after removing the
+  encoding.
+* Added a more explicit error message when trying to use `form_params` and
+  `multipart` in the same request.
+* Several fixes for HHVM support.
+* Functions are now conditionally required using an additional level of
+  indirection to help with global Composer installations.
+
+## 6.0.1 - 2015-05-27
+
+* Fixed a bug with serializing the `query` request option where the `&`
+  separator was missing.
+* Added a better error message for when `body` is provided as an array. Please
+  use `form_params` or `multipart` instead.
+* Various doc fixes.
+
+## 6.0.0 - 2015-05-26
+
+* See the UPGRADING.md document for more information.
+* Added `multipart` and `form_params` request options.
+* Added `synchronous` request option.
+* Added the `on_headers` request option.
+* Fixed `expect` handling.
+* No longer adding default middlewares in the client ctor. These need to be
+  present on the provided handler in order to work.
+* Requests are no longer initiated when sending async requests with the
+  CurlMultiHandler. This prevents unexpected recursion from requests completing
+  while ticking the cURL loop.
+* Removed the semantics of setting `default` to `true`. This is no longer
+  required now that the cURL loop is not ticked for async requests.
+* Added request and response logging middleware.
+* No longer allowing self signed certificates when using the StreamHandler.
+* Ensuring that `sink` is valid if saving to a file.
+* Request exceptions now include a "handler context" which provides handler
+  specific contextual information.
+* Added `GuzzleHttp\RequestOptions` to allow request options to be applied
+  using constants.
+* `$maxHandles` has been removed from CurlMultiHandler.
+* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package.
+
+## 5.3.0 - 2015-05-19
+
+* Mock now supports `save_to`
+* Marked `AbstractRequestEvent::getTransaction()` as public.
+* Fixed a bug in which multiple headers using different casing would overwrite
+  previous headers in the associative array.
+* Added `Utils::getDefaultHandler()`
+* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
+* URL scheme is now always lowercased.
+
+## 6.0.0-beta.1
+
+* Requires PHP >= 5.5
+* Updated to use PSR-7
+  * Requires immutable messages, which basically means an event based system
+    owned by a request instance is no longer possible.
+  * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7).
+  * Removed the dependency on `guzzlehttp/streams`. These stream abstractions
+    are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7`
+    namespace.
+* Added middleware and handler system
+  * Replaced the Guzzle event and subscriber system with a middleware system.
+  * No longer depends on RingPHP, but rather places the HTTP handlers directly
+    in Guzzle, operating on PSR-7 messages.
+  * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which
+    means the `guzzlehttp/retry-subscriber` is now obsolete.
+  * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`.
+* Asynchronous responses
+  * No longer supports the `future` request option to send an async request.
+    Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`,
+    `getAsync`, etc.).
+  * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid
+    recursion required by chaining and forwarding react promises. See
+    https://github.com/guzzle/promises
+  * Added `requestAsync` and `sendAsync` to send request asynchronously.
+  * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests
+    asynchronously.
+* Request options
+  * POST and form updates
+    * Added the `form_fields` and `form_files` request options.
+    * Removed the `GuzzleHttp\Post` namespace.
+    * The `body` request option no longer accepts an array for POST requests.
+  * The `exceptions` request option has been deprecated in favor of the
+    `http_errors` request options.
+  * The `save_to` request option has been deprecated in favor of `sink` request
+    option.
+* Clients no longer accept an array of URI template string and variables for
+  URI variables. You will need to expand URI templates before passing them
+  into a client constructor or request method.
+* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are
+  now magic methods that will send synchronous requests.
+* Replaced `Utils.php` with plain functions in `functions.php`.
+* Removed `GuzzleHttp\Collection`.
+* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as
+  an array.
+* Removed `GuzzleHttp\Query`. Query string handling is now handled using an
+  associative array passed into the `query` request option. The query string
+  is serialized using PHP's `http_build_query`. If you need more control, you
+  can pass the query string in as a string.
+* `GuzzleHttp\QueryParser` has been replaced with the
+  `GuzzleHttp\Psr7\parse_query`.
+
+## 5.2.0 - 2015-01-27
+
+* Added `AppliesHeadersInterface` to make applying headers to a request based
+  on the body more generic and not specific to `PostBodyInterface`.
+* Reduced the number of stack frames needed to send requests.
+* Nested futures are now resolved in the client rather than the RequestFsm
+* Finishing state transitions is now handled in the RequestFsm rather than the
+  RingBridge.
+* Added a guard in the Pool class to not use recursion for request retries.
+
+## 5.1.0 - 2014-12-19
+
+* Pool class no longer uses recursion when a request is intercepted.
+* The size of a Pool can now be dynamically adjusted using a callback.
+  See https://github.com/guzzle/guzzle/pull/943.
+* Setting a request option to `null` when creating a request with a client will
+  ensure that the option is not set. This allows you to overwrite default
+  request options on a per-request basis.
+  See https://github.com/guzzle/guzzle/pull/937.
+* Added the ability to limit which protocols are allowed for redirects by
+  specifying a `protocols` array in the `allow_redirects` request option.
+* Nested futures due to retries are now resolved when waiting for synchronous
+  responses. See https://github.com/guzzle/guzzle/pull/947.
+* `"0"` is now an allowed URI path. See
+  https://github.com/guzzle/guzzle/pull/935.
+* `Query` no longer typehints on the `$query` argument in the constructor,
+  allowing for strings and arrays.
+* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
+  specific exceptions if necessary.
+
+## 5.0.3 - 2014-11-03
+
+This change updates query strings so that they are treated as un-encoded values
+by default where the value represents an un-encoded value to send over the
+wire. A Query object then encodes the value before sending over the wire. This
+means that even value query string values (e.g., ":") are url encoded. This
+makes the Query class match PHP's http_build_query function. However, if you
+want to send requests over the wire using valid query string characters that do
+not need to be encoded, then you can provide a string to Url::setQuery() and
+pass true as the second argument to specify that the query string is a raw
+string that should not be parsed or encoded (unless a call to getQuery() is
+subsequently made, forcing the query-string to be converted into a Query
+object).
+
+## 5.0.2 - 2014-10-30
+
+* Added a trailing `\r\n` to multipart/form-data payloads. See
+  https://github.com/guzzle/guzzle/pull/871
+* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
+* Status codes are now returned as integers. See
+  https://github.com/guzzle/guzzle/issues/881
+* No longer overwriting an existing `application/x-www-form-urlencoded` header
+  when sending POST requests, allowing for customized headers. See
+  https://github.com/guzzle/guzzle/issues/877
+* Improved path URL serialization.
+
+  * No longer double percent-encoding characters in the path or query string if
+    they are already encoded.
+  * Now properly encoding the supplied path to a URL object, instead of only
+    encoding ' ' and '?'.
+  * Note: This has been changed in 5.0.3 to now encode query string values by
+    default unless the `rawString` argument is provided when setting the query
+    string on a URL: Now allowing many more characters to be present in the
+    query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
+
+## 5.0.1 - 2014-10-16
+
+Bugfix release.
+
+* Fixed an issue where connection errors still returned response object in
+  error and end events event though the response is unusable. This has been
+  corrected so that a response is not returned in the `getResponse` method of
+  these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
+* Fixed an issue where transfer statistics were not being populated in the
+  RingBridge. https://github.com/guzzle/guzzle/issues/866
+
+## 5.0.0 - 2014-10-12
+
+Adding support for non-blocking responses and some minor API cleanup.
+
+### New Features
+
+* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`.
+* Added a public API for creating a default HTTP adapter.
+* Updated the redirect plugin to be non-blocking so that redirects are sent
+  concurrently. Other plugins like this can now be updated to be non-blocking.
+* Added a "progress" event so that you can get upload and download progress
+  events.
+* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers
+  requests concurrently using a capped pool size as efficiently as possible.
+* Added `hasListeners()` to EmitterInterface.
+* Removed `GuzzleHttp\ClientInterface::sendAll` and marked
+  `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the
+  recommended way).
+
+### Breaking changes
+
+The breaking changes in this release are relatively minor. The biggest thing to
+look out for is that request and response objects no longer implement fluent
+interfaces.
+
+* Removed the fluent interfaces (i.e., `return $this`) from requests,
+  responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
+  `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
+  `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
+  why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
+  This also makes the Guzzle message interfaces compatible with the current
+  PSR-7 message proposal.
+* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
+  for the HTTP request functions from function.php, these functions are now
+  implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode`
+  moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
+  `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
+  `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
+  `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
+  caused problems for many users: they aren't PSR-4 compliant, require an
+  explicit include, and needed an if-guard to ensure that the functions are not
+  declared multiple times.
+* Rewrote adapter layer.
+    * Removing all classes from `GuzzleHttp\Adapter`, these are now
+      implemented as callables that are stored in `GuzzleHttp\Ring\Client`.
+    * Removed the concept of "parallel adapters". Sending requests serially or
+      concurrently is now handled using a single adapter.
+    * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The
+      Transaction object now exposes the request, response, and client as public
+      properties. The getters and setters have been removed.
+* Removed the "headers" event. This event was only useful for changing the
+  body a response once the headers of the response were known. You can implement
+  a similar behavior in a number of ways. One example might be to use a
+  FnStream that has access to the transaction being sent. For example, when the
+  first byte is written, you could check if the response headers match your
+  expectations, and if so, change the actual stream body that is being
+  written to.
+* Removed the `asArray` parameter from
+  `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
+  value as an array, then use the newly added `getHeaderAsArray()` method of
+  `MessageInterface`. This change makes the Guzzle interfaces compatible with
+  the PSR-7 interfaces.
+* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
+  custom request options using double-dispatch (this was an implementation
+  detail). Instead, you should now provide an associative array to the
+  constructor which is a mapping of the request option name mapping to a
+  function that applies the option value to a request.
+* Removed the concept of "throwImmediately" from exceptions and error events.
+  This control mechanism was used to stop a transfer of concurrent requests
+  from completing. This can now be handled by throwing the exception or by
+  cancelling a pool of requests or each outstanding future request individually.
+* Updated to "GuzzleHttp\Streams" 3.0.
+    * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
+      `maxLen` parameter. This update makes the Guzzle streams project
+      compatible with the current PSR-7 proposal.
+    * `GuzzleHttp\Stream\Stream::__construct`,
+      `GuzzleHttp\Stream\Stream::factory`, and
+      `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
+      argument. They now accept an associative array of options, including the
+      "size" key and "metadata" key which can be used to provide custom metadata.
+
+## 4.2.2 - 2014-09-08
+
+* Fixed a memory leak in the CurlAdapter when reusing cURL handles.
+* No longer using `request_fulluri` in stream adapter proxies.
+* Relative redirects are now based on the last response, not the first response.
+
+## 4.2.1 - 2014-08-19
+
+* Ensuring that the StreamAdapter does not always add a Content-Type header
+* Adding automated github releases with a phar and zip
+
+## 4.2.0 - 2014-08-17
+
+* Now merging in default options using a case-insensitive comparison.
+  Closes https://github.com/guzzle/guzzle/issues/767
+* Added the ability to automatically decode `Content-Encoding` response bodies
+  using the `decode_content` request option. This is set to `true` by default
+  to decode the response body if it comes over the wire with a
+  `Content-Encoding`. Set this value to `false` to disable decoding the
+  response content, and pass a string to provide a request `Accept-Encoding`
+  header and turn on automatic response decoding. This feature now allows you
+  to pass an `Accept-Encoding` header in the headers of a request but still
+  disable automatic response decoding.
+  Closes https://github.com/guzzle/guzzle/issues/764
+* Added the ability to throw an exception immediately when transferring
+  requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760
+* Updating guzzlehttp/streams dependency to ~2.1
+* No longer utilizing the now deprecated namespaced methods from the stream
+  package.
+
+## 4.1.8 - 2014-08-14
+
+* Fixed an issue in the CurlFactory that caused setting the `stream=false`
+  request option to throw an exception.
+  See: https://github.com/guzzle/guzzle/issues/769
+* TransactionIterator now calls rewind on the inner iterator.
+  See: https://github.com/guzzle/guzzle/pull/765
+* You can now set the `Content-Type` header to `multipart/form-data`
+  when creating POST requests to force multipart bodies.
+  See https://github.com/guzzle/guzzle/issues/768
+
+## 4.1.7 - 2014-08-07
+
+* Fixed an error in the HistoryPlugin that caused the same request and response
+  to be logged multiple times when an HTTP protocol error occurs.
+* Ensuring that cURL does not add a default Content-Type when no Content-Type
+  has been supplied by the user. This prevents the adapter layer from modifying
+  the request that is sent over the wire after any listeners may have already
+  put the request in a desired state (e.g., signed the request).
+* Throwing an exception when you attempt to send requests that have the
+  "stream" set to true in parallel using the MultiAdapter.
+* Only calling curl_multi_select when there are active cURL handles. This was
+  previously changed and caused performance problems on some systems due to PHP
+  always selecting until the maximum select timeout.
+* Fixed a bug where multipart/form-data POST fields were not correctly
+  aggregated (e.g., values with "&").
+
+## 4.1.6 - 2014-08-03
+
+* Added helper methods to make it easier to represent messages as strings,
+  including getting the start line and getting headers as a string.
+
+## 4.1.5 - 2014-08-02
+
+* Automatically retrying cURL "Connection died, retrying a fresh connect"
+  errors when possible.
+* cURL implementation cleanup
+* Allowing multiple event subscriber listeners to be registered per event by
+  passing an array of arrays of listener configuration.
+
+## 4.1.4 - 2014-07-22
+
+* Fixed a bug that caused multi-part POST requests with more than one field to
+  serialize incorrectly.
+* Paths can now be set to "0"
+* `ResponseInterface::xml` now accepts a `libxml_options` option and added a
+  missing default argument that was required when parsing XML response bodies.
+* A `save_to` stream is now created lazily, which means that files are not
+  created on disk unless a request succeeds.
+
+## 4.1.3 - 2014-07-15
+
+* Various fixes to multipart/form-data POST uploads
+* Wrapping function.php in an if-statement to ensure Guzzle can be used
+  globally and in a Composer install
+* Fixed an issue with generating and merging in events to an event array
+* POST headers are only applied before sending a request to allow you to change
+  the query aggregator used before uploading
+* Added much more robust query string parsing
+* Fixed various parsing and normalization issues with URLs
+* Fixing an issue where multi-valued headers were not being utilized correctly
+  in the StreamAdapter
+
+## 4.1.2 - 2014-06-18
+
+* Added support for sending payloads with GET requests
+
+## 4.1.1 - 2014-06-08
+
+* Fixed an issue related to using custom message factory options in subclasses
+* Fixed an issue with nested form fields in a multi-part POST
+* Fixed an issue with using the `json` request option for POST requests
+* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar`
+
+## 4.1.0 - 2014-05-27
+
+* Added a `json` request option to easily serialize JSON payloads.
+* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON.
+* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`.
+* Added the ability to provide an emitter to a client in the client constructor.
+* Added the ability to persist a cookie session using $_SESSION.
+* Added a trait that can be used to add event listeners to an iterator.
+* Removed request method constants from RequestInterface.
+* Fixed warning when invalid request start-lines are received.
+* Updated MessageFactory to work with custom request option methods.
+* Updated cacert bundle to latest build.
+
+4.0.2 (2014-04-16)
+------------------
+
+* Proxy requests using the StreamAdapter now properly use request_fulluri (#632)
+* Added the ability to set scalars as POST fields (#628)
+
+## 4.0.1 - 2014-04-04
+
+* The HTTP status code of a response is now set as the exception code of
+  RequestException objects.
+* 303 redirects will now correctly switch from POST to GET requests.
+* The default parallel adapter of a client now correctly uses the MultiAdapter.
+* HasDataTrait now initializes the internal data array as an empty array so
+  that the toArray() method always returns an array.
+
+## 4.0.0 - 2014-03-29
+
+* For more information on the 4.0 transition, see:
+  http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
+* For information on changes and upgrading, see:
+  https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
+* Added `GuzzleHttp\batch()` as a convenience function for sending requests in
+  parallel without needing to write asynchronous code.
+* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`.
+  You can now pass a callable or an array of associative arrays where each
+  associative array contains the "fn", "priority", and "once" keys.
+
+## 4.0.0.rc-2 - 2014-03-25
+
+* Removed `getConfig()` and `setConfig()` from clients to avoid confusion
+  around whether things like base_url, message_factory, etc. should be able to
+  be retrieved or modified.
+* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface
+* functions.php functions were renamed using snake_case to match PHP idioms
+* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and
+  `GUZZLE_CURL_SELECT_TIMEOUT` environment variables
+* Added the ability to specify custom `sendAll()` event priorities
+* Added the ability to specify custom stream context options to the stream
+  adapter.
+* Added a functions.php function for `get_path()` and `set_path()`
+* CurlAdapter and MultiAdapter now use a callable to generate curl resources
+* MockAdapter now properly reads a body and emits a `headers` event
+* Updated Url class to check if a scheme and host are set before adding ":"
+  and "//". This allows empty Url (e.g., "") to be serialized as "".
+* Parsing invalid XML no longer emits warnings
+* Curl classes now properly throw AdapterExceptions
+* Various performance optimizations
+* Streams are created with the faster `Stream\create()` function
+* Marked deprecation_proxy() as internal
+* Test server is now a collection of static methods on a class
+
+## 4.0.0-rc.1 - 2014-03-15
+
+* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
+
+## 3.8.1 - 2014-01-28
+
+* Bug: Always using GET requests when redirecting from a 303 response
+* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
+  `Guzzle\Http\ClientInterface::setSslVerification()`
+* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL
+* Bug: The body of a request can now be set to `"0"`
+* Sending PHP stream requests no longer forces `HTTP/1.0`
+* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of
+  each sub-exception
+* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than
+  clobbering everything).
+* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators)
+* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`.
+  For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`.
+* Now properly escaping the regular expression delimiter when matching Cookie domains.
+* Network access is now disabled when loading XML documents
+
+## 3.8.0 - 2013-12-05
+
+* Added the ability to define a POST name for a file
+* JSON response parsing now properly walks additionalProperties
+* cURL error code 18 is now retried automatically in the BackoffPlugin
+* Fixed a cURL error when URLs contain fragments
+* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were
+  CurlExceptions
+* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e)
+* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS`
+* Fixed a bug that was encountered when parsing empty header parameters
+* UriTemplate now has a `setRegex()` method to match the docs
+* The `debug` request parameter now checks if it is truthy rather than if it exists
+* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin
+* Added the ability to combine URLs using strict RFC 3986 compliance
+* Command objects can now return the validation errors encountered by the command
+* Various fixes to cache revalidation (#437 and 29797e5)
+* Various fixes to the AsyncPlugin
+* Cleaned up build scripts
+
+## 3.7.4 - 2013-10-02
+
+* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
+* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
+  (see https://github.com/aws/aws-sdk-php/issues/147)
+* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots
+* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420)
+* Updated the bundled cacert.pem (#419)
+* OauthPlugin now supports adding authentication to headers or query string (#425)
+
+## 3.7.3 - 2013-09-08
+
+* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
+  `CommandTransferException`.
+* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description
+* Schemas are only injected into response models when explicitly configured.
+* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of
+  an EntityBody.
+* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator.
+* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`.
+* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody()
+* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin
+* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests
+* Bug fix: Properly parsing headers that contain commas contained in quotes
+* Bug fix: mimetype guessing based on a filename is now case-insensitive
+
+## 3.7.2 - 2013-08-02
+
+* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
+  See https://github.com/guzzle/guzzle/issues/371
+* Bug fix: Cookie domains are now matched correctly according to RFC 6265
+  See https://github.com/guzzle/guzzle/issues/377
+* Bug fix: GET parameters are now used when calculating an OAuth signature
+* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted
+* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched
+* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input.
+  See https://github.com/guzzle/guzzle/issues/379
+* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See
+  https://github.com/guzzle/guzzle/pull/380
+* cURL multi cleanup and optimizations
+
+## 3.7.1 - 2013-07-05
+
+* Bug fix: Setting default options on a client now works
+* Bug fix: Setting options on HEAD requests now works. See #352
+* Bug fix: Moving stream factory before send event to before building the stream. See #353
+* Bug fix: Cookies no longer match on IP addresses per RFC 6265
+* Bug fix: Correctly parsing header parameters that are in `<>` and quotes
+* Added `cert` and `ssl_key` as request options
+* `Host` header can now diverge from the host part of a URL if the header is set manually
+* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter
+* OAuth parameters are only added via the plugin if they aren't already set
+* Exceptions are now thrown when a URL cannot be parsed
+* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
+* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
+
+## 3.7.0 - 2013-06-10
+
+* See UPGRADING.md for more information on how to upgrade.
+* Requests now support the ability to specify an array of $options when creating a request to more easily modify a
+  request. You can pass a 'request.options' configuration setting to a client to apply default request options to
+  every request created by a client (e.g. default query string variables, headers, curl options, etc.).
+* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`.
+  See `Guzzle\Http\StaticClient::mount`.
+* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests
+      created by a command (e.g. custom headers, query string variables, timeout settings, etc.).
+* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the
+  headers of a response
+* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key
+  (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`)
+* ServiceBuilders now support storing and retrieving arbitrary data
+* CachePlugin can now purge all resources for a given URI
+* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource
+* CachePlugin now uses the Vary header to determine if a resource is a cache hit
+* `Guzzle\Http\Message\Response` now implements `\Serializable`
+* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters
+* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable
+* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()`
+* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size
+* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message
+* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older
+  Symfony users can still use the old version of Monolog.
+* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`.
+  Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`.
+* Several performance improvements to `Guzzle\Common\Collection`
+* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
+  createRequest, head, delete, put, patch, post, options, prepareRequest
+* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
+* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
+* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
+  `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
+  resource, string, or EntityBody into the $options parameter to specify the download location of the response.
+* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
+  default `array()`
+* Added `Guzzle\Stream\StreamInterface::isRepeatable`
+* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
+  $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
+  $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`.
+* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`.
+* Removed `Guzzle\Http\ClientInterface::expandTemplate()`
+* Removed `Guzzle\Http\ClientInterface::setRequestFactory()`
+* Removed `Guzzle\Http\ClientInterface::getCurlMulti()`
+* Removed `Guzzle\Http\Message\RequestInterface::canCache`
+* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`
+* Removed `Guzzle\Http\Message\RequestInterface::isRedirect`
+* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
+* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting
+  `Guzzle\Common\Version::$emitWarnings` to true.
+* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use
+      `$request->getResponseBody()->isRepeatable()` instead.
+* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
+  `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
+  `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
+* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
+* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
+* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand.
+  These will work through Guzzle 4.0
+* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params].
+* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
+* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`.
+* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`.
+* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
+* Marked `Guzzle\Common\Collection::inject()` as deprecated.
+* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');`
+* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
+  CacheStorageInterface. These two objects and interface will be removed in a future version.
+* Always setting X-cache headers on cached responses
+* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
+* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
+  $request, Response $response);`
+* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
+* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
+* Added `CacheStorageInterface::purge($url)`
+* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
+  $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
+  CanCacheStrategyInterface $canCache = null)`
+* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
+
+## 3.6.0 - 2013-05-29
+
+* ServiceDescription now implements ToArrayInterface
+* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
+* Guzzle can now correctly parse incomplete URLs
+* Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
+* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
+* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
+* Specific header implementations can be created for complex headers. When a message creates a header, it uses a
+  HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
+  CacheControl header implementation.
+* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
+* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
+* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
+  Guzzle\Http\Curl\RequestMediator
+* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
+* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
+* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
+* Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
+* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
+* All response header helper functions return a string rather than mixing Header objects and strings inconsistently
+* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
+  directly via interfaces
+* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
+  but are a no-op until removed.
+* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
+  `Guzzle\Service\Command\ArrayCommandInterface`.
+* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
+  on a request while the request is still being transferred
+* The ability to case-insensitively search for header values
+* Guzzle\Http\Message\Header::hasExactHeader
+* Guzzle\Http\Message\Header::raw. Use getAll()
+* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
+  instead.
+* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
+* Added the ability to cast Model objects to a string to view debug information.
+
+## 3.5.0 - 2013-05-13
+
+* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
+* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove
+  itself from the EventDispatcher)
+* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values
+* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too
+* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a
+  non-existent key
+* Bug: All __call() method arguments are now required (helps with mocking frameworks)
+* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference
+  to help with refcount based garbage collection of resources created by sending a request
+* Deprecating ZF1 cache and log adapters. These will be removed in the next major version.
+* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it'sdeprecated). Use the
+  HistoryPlugin for a history.
+* Added a `responseBody` alias for the `response_body` location
+* Refactored internals to no longer rely on Response::getRequest()
+* HistoryPlugin can now be cast to a string
+* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests
+  and responses that are sent over the wire
+* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
+
+## 3.4.3 - 2013-04-30
+
+* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
+* Added a check to re-extract the temp cacert bundle from the phar before sending each request
+
+## 3.4.2 - 2013-04-29
+
+* Bug fix: Stream objects now work correctly with "a" and "a+" modes
+* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
+* Bug fix: AsyncPlugin no longer forces HEAD requests
+* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter
+* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails
+* Setting a response on a request will write to the custom request body from the response body if one is specified
+* LogPlugin now writes to php://output when STDERR is undefined
+* Added the ability to set multiple POST files for the same key in a single call
+* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default
+* Added the ability to queue CurlExceptions to the MockPlugin
+* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
+* Configuration loading now allows remote files
+
+## 3.4.1 - 2013-04-16
+
+* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
+  handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
+* Exceptions are now properly grouped when sending requests in parallel
+* Redirects are now properly aggregated when a multi transaction fails
+* Redirects now set the response on the original object even in the event of a failure
+* Bug fix: Model names are now properly set even when using $refs
+* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax
+* Added support for oauth_callback in OAuth signatures
+* Added support for oauth_verifier in OAuth signatures
+* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
+
+## 3.4.0 - 2013-04-11
+
+* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
+* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
+* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
+* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
+* Bug fix: Added `number` type to service descriptions.
+* Bug fix: empty parameters are removed from an OAuth signature
+* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header
+* Bug fix: Fixed "array to string" error when validating a union of types in a service description
+* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream
+* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin.
+* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs.
+* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections.
+* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if
+  the Content-Type can be determined based on the entity body or the path of the request.
+* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder.
+* Added support for a PSR-3 LogAdapter.
+* Added a `command.after_prepare` event
+* Added `oauth_callback` parameter to the OauthPlugin
+* Added the ability to create a custom stream class when using a stream factory
+* Added a CachingEntityBody decorator
+* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized.
+* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar.
+* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies
+* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This
+  means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use
+  POST fields or files (the latter is only used when emulating a form POST in the browser).
+* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
+
+## 3.3.1 - 2013-03-10
+
+* Added the ability to create PHP streaming responses from HTTP requests
+* Bug fix: Running any filters when parsing response headers with service descriptions
+* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing
+* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across
+  response location visitors.
+* Bug fix: Removed the possibility of creating configuration files with circular dependencies
+* RequestFactory::create() now uses the key of a POST file when setting the POST file name
+* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
+
+## 3.3.0 - 2013-03-03
+
+* A large number of performance optimizations have been made
+* Bug fix: Added 'wb' as a valid write mode for streams
+* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned
+* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()`
+* BC: Removed `Guzzle\Http\Utils` class
+* BC: Setting a service description on a client will no longer modify the client's command factories.
+* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using
+  the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
+* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to
+  lowercase
+* Operation parameter objects are now lazy loaded internally
+* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses
+* Added support for instantiating responseType=class responseClass classes. Classes must implement
+  `Guzzle\Service\Command\ResponseClassInterface`
+* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These
+  additional properties also support locations and can be used to parse JSON responses where the outermost part of the
+  JSON is an array
+* Added support for nested renaming of JSON models (rename sentAs to name)
+* CachePlugin
+    * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
+    * Debug headers can now added to cached response in the CachePlugin
+
+## 3.2.0 - 2013-02-14
+
+* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
+* URLs with no path no longer contain a "/" by default
+* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url.
+* BadResponseException no longer includes the full request and response message
+* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface
+* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface
+* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription
+* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list
+* xmlEncoding can now be customized for the XML declaration of a XML service description operation
+* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value
+  aggregation and no longer uses callbacks
+* The URL encoding implementation of Guzzle\Http\QueryString can now be customized
+* Bug fix: Filters were not always invoked for array service description parameters
+* Bug fix: Redirects now use a target response body rather than a temporary response body
+* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
+* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
+
+## 3.1.2 - 2013-01-27
+
+* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
+  response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
+* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent
+* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444)
+* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
+* Setting default headers on a client after setting the user-agent will not erase the user-agent setting
+
+## 3.1.1 - 2013-01-20
+
+* Adding wildcard support to Guzzle\Common\Collection::getPath()
+* Adding alias support to ServiceBuilder configs
+* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
+
+## 3.1.0 - 2013-01-12
+
+* BC: CurlException now extends from RequestException rather than BadResponseException
+* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
+* Added getData to ServiceDescriptionInterface
+* Added context array to RequestInterface::setState()
+* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http
+* Bug: Adding required content-type when JSON request visitor adds JSON to a command
+* Bug: Fixing the serialization of a service description with custom data
+* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing
+  an array of successful and failed responses
+* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection
+* Added Guzzle\Http\IoEmittingEntityBody
+* Moved command filtration from validators to location visitors
+* Added `extends` attributes to service description parameters
+* Added getModels to ServiceDescriptionInterface
+
+## 3.0.7 - 2012-12-19
+
+* Fixing phar detection when forcing a cacert to system if null or true
+* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
+* Cleaning up `Guzzle\Common\Collection::inject` method
+* Adding a response_body location to service descriptions
+
+## 3.0.6 - 2012-12-09
+
+* CurlMulti performance improvements
+* Adding setErrorResponses() to Operation
+* composer.json tweaks
+
+## 3.0.5 - 2012-11-18
+
+* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
+* Bug: Response body can now be a string containing "0"
+* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert
+* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs
+* Added support for XML attributes in service description responses
+* DefaultRequestSerializer now supports array URI parameter values for URI template expansion
+* Added better mimetype guessing to requests and post files
+
+## 3.0.4 - 2012-11-11
+
+* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
+* Bug: Cookies can now be added that have a name, domain, or value set to "0"
+* Bug: Using the system cacert bundle when using the Phar
+* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures
+* Enhanced cookie jar de-duplication
+* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added
+* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
+* Added the ability to create any sort of hash for a stream rather than just an MD5 hash
+
+## 3.0.3 - 2012-11-04
+
+* Implementing redirects in PHP rather than cURL
+* Added PECL URI template extension and using as default parser if available
+* Bug: Fixed Content-Length parsing of Response factory
+* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams.
+* Adding ToArrayInterface throughout library
+* Fixing OauthPlugin to create unique nonce values per request
+
+## 3.0.2 - 2012-10-25
+
+* Magic methods are enabled by default on clients
+* Magic methods return the result of a command
+* Service clients no longer require a base_url option in the factory
+* Bug: Fixed an issue with URI templates where null template variables were being expanded
+
+## 3.0.1 - 2012-10-22
+
+* Models can now be used like regular collection objects by calling filter, map, etc.
+* Models no longer require a Parameter structure or initial data in the constructor
+* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
+
+## 3.0.0 - 2012-10-15
+
+* Rewrote service description format to be based on Swagger
+    * Now based on JSON schema
+    * Added nested input structures and nested response models
+    * Support for JSON and XML input and output models
+    * Renamed `commands` to `operations`
+    * Removed dot class notation
+    * Removed custom types
+* Broke the project into smaller top-level namespaces to be more component friendly
+* Removed support for XML configs and descriptions. Use arrays or JSON files.
+* Removed the Validation component and Inspector
+* Moved all cookie code to Guzzle\Plugin\Cookie
+* Magic methods on a Guzzle\Service\Client now return the command un-executed.
+* Calling getResult() or getResponse() on a command will lazily execute the command if needed.
+* Now shipping with cURL's CA certs and using it by default
+* Added previousResponse() method to response objects
+* No longer sending Accept and Accept-Encoding headers on every request
+* Only sending an Expect header by default when a payload is greater than 1MB
+* Added/moved client options:
+    * curl.blacklist to curl.option.blacklist
+    * Added ssl.certificate_authority
+* Added a Guzzle\Iterator component
+* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin
+* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin)
+* Added a more robust caching plugin
+* Added setBody to response objects
+* Updating LogPlugin to use a more flexible MessageFormatter
+* Added a completely revamped build process
+* Cleaning up Collection class and removing default values from the get method
+* Fixed ZF2 cache adapters
+
+## 2.8.8 - 2012-10-15
+
+* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
+
+## 2.8.7 - 2012-09-30
+
+* Bug: Fixed config file aliases for JSON includes
+* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
+* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload
+* Bug: Hardening request and response parsing to account for missing parts
+* Bug: Fixed PEAR packaging
+* Bug: Fixed Request::getInfo
+* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail
+* Adding the ability for the namespace Iterator factory to look in multiple directories
+* Added more getters/setters/removers from service descriptions
+* Added the ability to remove POST fields from OAuth signatures
+* OAuth plugin now supports 2-legged OAuth
+
+## 2.8.6 - 2012-09-05
+
+* Added the ability to modify and build service descriptions
+* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
+* Added a `json` parameter location
+* Now allowing dot notation for classes in the CacheAdapterFactory
+* Using the union of two arrays rather than an array_merge when extending service builder services and service params
+* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references
+  in service builder config files.
+* Services defined in two different config files that include one another will by default replace the previously
+  defined service, but you can now create services that extend themselves and merge their settings over the previous
+* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
+  '_default' with a default JSON configuration file.
+
+## 2.8.5 - 2012-08-29
+
+* Bug: Suppressed empty arrays from URI templates
+* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
+* Added support for HTTP responses that do not contain a reason phrase in the start-line
+* AbstractCommand commands are now invokable
+* Added a way to get the data used when signing an Oauth request before a request is sent
+
+## 2.8.4 - 2012-08-15
+
+* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
+* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable.
+* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream
+* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream
+* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5())
+* Added additional response status codes
+* Removed SSL information from the default User-Agent header
+* DELETE requests can now send an entity body
+* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries
+* Added the ability of the MockPlugin to consume mocked request bodies
+* LogPlugin now exposes request and response objects in the extras array
+
+## 2.8.3 - 2012-07-30
+
+* Bug: Fixed a case where empty POST requests were sent as GET requests
+* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
+* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
+* Added multiple inheritance to service description commands
+* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()`
+* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
+* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
+
+## 2.8.2 - 2012-07-24
+
+* Bug: Query string values set to 0 are no longer dropped from the query string
+* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()`
+* Bug: `+` is now treated as an encoded space when parsing query strings
+* QueryString and Collection performance improvements
+* Allowing dot notation for class paths in filters attribute of a service descriptions
+
+## 2.8.1 - 2012-07-16
+
+* Loosening Event Dispatcher dependency
+* POST redirects can now be customized using CURLOPT_POSTREDIR
+
+## 2.8.0 - 2012-07-15
+
+* BC: Guzzle\Http\Query
+    * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
+    * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding()
+    * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
+    * Changed the aggregation functions of QueryString to be static methods
+    * Can now use fromString() with querystrings that have a leading ?
+* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters
+* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
+* Cookies are no longer URL decoded by default
+* Bug: URI template variables set to null are no longer expanded
+
+## 2.7.2 - 2012-07-02
+
+* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
+* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
+* CachePlugin now allows for a custom request parameter function to check if a request can be cached
+* Bug fix: CachePlugin now only caches GET and HEAD requests by default
+* Bug fix: Using header glue when transferring headers over the wire
+* Allowing deeply nested arrays for composite variables in URI templates
+* Batch divisors can now return iterators or arrays
+
+## 2.7.1 - 2012-06-26
+
+* Minor patch to update version number in UA string
+* Updating build process
+
+## 2.7.0 - 2012-06-25
+
+* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
+* BC: Removed magic setX methods from commands
+* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method
+* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable.
+* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity)
+* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace
+* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin
+* Added the ability to set POST fields and files in a service description
+* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method
+* Adding a command.before_prepare event to clients
+* Added BatchClosureTransfer and BatchClosureDivisor
+* BatchTransferException now includes references to the batch divisor and transfer strategies
+* Fixed some tests so that they pass more reliably
+* Added Guzzle\Common\Log\ArrayLogAdapter
+
+## 2.6.6 - 2012-06-10
+
+* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
+* BC: Removing Guzzle\Service\Command\CommandSet
+* Adding generic batching system (replaces the batch queue plugin and command set)
+* Updating ZF cache and log adapters and now using ZF's composer repository
+* Bug: Setting the name of each ApiParam when creating through an ApiCommand
+* Adding result_type, result_doc, deprecated, and doc_url to service descriptions
+* Bug: Changed the default cookie header casing back to 'Cookie'
+
+## 2.6.5 - 2012-06-03
+
+* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
+* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
+* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data
+* BC: Renaming methods in the CookieJarInterface
+* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations
+* Making the default glue for HTTP headers ';' instead of ','
+* Adding a removeValue to Guzzle\Http\Message\Header
+* Adding getCookies() to request interface.
+* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
+
+## 2.6.4 - 2012-05-30
+
+* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
+* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
+* Bug: Fixing magic method command calls on clients
+* Bug: Email constraint only validates strings
+* Bug: Aggregate POST fields when POST files are present in curl handle
+* Bug: Fixing default User-Agent header
+* Bug: Only appending or prepending parameters in commands if they are specified
+* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes
+* Allowing the use of dot notation for class namespaces when using instance_of constraint
+* Added any_match validation constraint
+* Added an AsyncPlugin
+* Passing request object to the calculateWait method of the ExponentialBackoffPlugin
+* Allowing the result of a command object to be changed
+* Parsing location and type sub values when instantiating a service description rather than over and over at runtime
+
+## 2.6.3 - 2012-05-23
+
+* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
+* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
+* You can now use an array of data when creating PUT request bodies in the request factory.
+* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable.
+* [Http] Adding support for Content-Type in multipart POST uploads per upload
+* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1])
+* Adding more POST data operations for easier manipulation of POST data.
+* You can now set empty POST fields.
+* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files.
+* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
+* CS updates
+
+## 2.6.2 - 2012-05-19
+
+* [Http] Better handling of nested scope requests in CurlMulti.  Requests are now always prepares in the send() method rather than the addRequest() method.
+
+## 2.6.1 - 2012-05-19
+
+* [BC] Removing 'path' support in service descriptions.  Use 'uri'.
+* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
+* [BC] Removing Guzzle\Common\NullObject.  Use https://github.com/mtdowling/NullObject if you need it.
+* [BC] Removing Guzzle\Common\XmlElement.
+* All commands, both dynamic and concrete, have ApiCommand objects.
+* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits.
+* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
+* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
+
+## 2.6.0 - 2012-05-15
+
+* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
+* [BC] Executing a Command returns the result of the command rather than the command
+* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed.
+* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args.
+* [BC] Moving ResourceIterator* to Guzzle\Service\Resource
+* [BC] Completely refactored ResourceIterators to iterate over a cloned command object
+* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate
+* [BC] Guzzle\Guzzle is now deprecated
+* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject
+* Adding Guzzle\Version class to give version information about Guzzle
+* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate()
+* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data
+* ServiceDescription and ServiceBuilder are now cacheable using similar configs
+* Changing the format of XML and JSON service builder configs.  Backwards compatible.
+* Cleaned up Cookie parsing
+* Trimming the default Guzzle User-Agent header
+* Adding a setOnComplete() method to Commands that is called when a command completes
+* Keeping track of requests that were mocked in the MockPlugin
+* Fixed a caching bug in the CacheAdapterFactory
+* Inspector objects can be injected into a Command object
+* Refactoring a lot of code and tests to be case insensitive when dealing with headers
+* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL
+* Adding the ability to set global option overrides to service builder configs
+* Adding the ability to include other service builder config files from within XML and JSON files
+* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
+
+## 2.5.0 - 2012-05-08
+
+* Major performance improvements
+* [BC] Simplifying Guzzle\Common\Collection.  Please check to see if you are using features that are now deprecated.
+* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component.
+* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates.  Use "{}"
+* Added the ability to passed parameters to all requests created by a client
+* Added callback functionality to the ExponentialBackoffPlugin
+* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies.
+* Rewinding request stream bodies when retrying requests
+* Exception is thrown when JSON response body cannot be decoded
+* Added configurable magic method calls to clients and commands.  This is off by default.
+* Fixed a defect that added a hash to every parsed URL part
+* Fixed duplicate none generation for OauthPlugin.
+* Emitting an event each time a client is generated by a ServiceBuilder
+* Using an ApiParams object instead of a Collection for parameters of an ApiCommand
+* cache.* request parameters should be renamed to params.cache.*
+* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle.
+* Added the ability to disable type validation of service descriptions
+* ServiceDescriptions and ServiceBuilders are now Serializable
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/LICENSE	(revision 5534)
@@ -0,0 +1,19 @@
+Copyright (c) 2011-2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/README.md	(revision 5534)
@@ -0,0 +1,90 @@
+Guzzle, PHP HTTP client
+=======================
+
+[![Build Status](https://secure.travis-ci.org/guzzle/guzzle.svg?branch=master)](http://travis-ci.org/guzzle/guzzle)
+
+Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
+trivial to integrate with web services.
+
+- Simple interface for building query strings, POST requests, streaming large
+  uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
+  etc...
+- Can send both synchronous and asynchronous requests using the same interface.
+- Uses PSR-7 interfaces for requests, responses, and streams. This allows you
+  to utilize other PSR-7 compatible libraries with Guzzle.
+- Abstracts away the underlying HTTP transport, allowing you to write
+  environment and transport agnostic code; i.e., no hard dependency on cURL,
+  PHP streams, sockets, or non-blocking event loops.
+- Middleware system allows you to augment and compose client behavior.
+
+```php
+$client = new GuzzleHttp\Client();
+$res = $client->request('GET', 'https://api.github.com/user', [
+    'auth' => ['user', 'pass']
+]);
+echo $res->getStatusCode();
+// 200
+echo $res->getHeader('content-type');
+// 'application/json; charset=utf8'
+echo $res->getBody();
+// {"type":"User"...'
+
+// Send an asynchronous request.
+$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
+$promise = $client->sendAsync($request)->then(function ($response) {
+    echo 'I completed! ' . $response->getBody();
+});
+$promise->wait();
+```
+
+## Help and docs
+
+- [Documentation](http://guzzlephp.org/)
+- [stackoverflow](http://stackoverflow.com/questions/tagged/guzzle)
+- [Gitter](https://gitter.im/guzzle/guzzle)
+
+
+## Installing Guzzle
+
+The recommended way to install Guzzle is through
+[Composer](http://getcomposer.org).
+
+```bash
+# Install Composer
+curl -sS https://getcomposer.org/installer | php
+```
+
+Next, run the Composer command to install the latest stable version of Guzzle:
+
+```bash
+composer.phar require guzzlehttp/guzzle
+```
+
+After installing, you need to require Composer's autoloader:
+
+```php
+require 'vendor/autoload.php';
+```
+
+You can then later update Guzzle using composer:
+
+ ```bash
+composer.phar update
+ ```
+
+
+## Version Guidance
+
+| Version | Status      | Packagist           | Namespace    | Repo                | Docs                | PSR-7 |
+|---------|-------------|---------------------|--------------|---------------------|---------------------|-------|
+| 3.x     | EOL         | `guzzle/guzzle`     | `Guzzle`     | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No    |
+| 4.x     | EOL         | `guzzlehttp/guzzle` | `GuzzleHttp` | N/A                 | N/A                 | No    |
+| 5.x     | Maintained  | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No    |
+| 6.x     | Latest      | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes   |
+
+[guzzle-3-repo]: https://github.com/guzzle/guzzle3
+[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
+[guzzle-6-repo]: https://github.com/guzzle/guzzle
+[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/
+[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
+[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/UPGRADING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/UPGRADING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/UPGRADING.md	(revision 5534)
@@ -0,0 +1,1203 @@
+Guzzle Upgrade Guide
+====================
+
+5.0 to 6.0
+----------
+
+Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages.
+Due to the fact that these messages are immutable, this prompted a refactoring
+of Guzzle to use a middleware based system rather than an event system. Any
+HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
+updated to work with the new immutable PSR-7 request and response objects. Any
+event listeners or subscribers need to be updated to become middleware
+functions that wrap handlers (or are injected into a
+`GuzzleHttp\HandlerStack`).
+
+- Removed `GuzzleHttp\BatchResults`
+- Removed `GuzzleHttp\Collection`
+- Removed `GuzzleHttp\HasDataTrait`
+- Removed `GuzzleHttp\ToArrayInterface`
+- The `guzzlehttp/streams` dependency has been removed. Stream functionality
+  is now present in the `GuzzleHttp\Psr7` namespace provided by the
+  `guzzlehttp/psr7` package.
+- Guzzle no longer uses ReactPHP promises and now uses the
+  `guzzlehttp/promises` library. We use a custom promise library for three
+  significant reasons:
+  1. React promises (at the time of writing this) are recursive. Promise
+     chaining and promise resolution will eventually blow the stack. Guzzle
+     promises are not recursive as they use a sort of trampolining technique.
+     Note: there has been movement in the React project to modify promises to
+     no longer utilize recursion.
+  2. Guzzle needs to have the ability to synchronously block on a promise to
+     wait for a result. Guzzle promises allows this functionality (and does
+     not require the use of recursion).
+  3. Because we need to be able to wait on a result, doing so using React
+     promises requires wrapping react promises with RingPHP futures. This
+     overhead is no longer needed, reducing stack sizes, reducing complexity,
+     and improving performance.
+- `GuzzleHttp\Mimetypes` has been moved to a function in
+  `GuzzleHttp\Psr7\mimetype_from_extension` and
+  `GuzzleHttp\Psr7\mimetype_from_filename`.
+- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query
+  strings must now be passed into request objects as strings, or provided to
+  the `query` request option when creating requests with clients. The `query`
+  option uses PHP's `http_build_query` to convert an array to a string. If you
+  need a different serialization technique, you will need to pass the query
+  string in as a string. There are a couple helper functions that will make
+  working with query strings easier: `GuzzleHttp\Psr7\parse_query` and
+  `GuzzleHttp\Psr7\build_query`.
+- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware
+  system based on PSR-7, using RingPHP and it's middleware system as well adds
+  more complexity than the benefits it provides. All HTTP handlers that were
+  present in RingPHP have been modified to work directly with PSR-7 messages
+  and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces
+  complexity in Guzzle, removes a dependency, and improves performance. RingPHP
+  will be maintained for Guzzle 5 support, but will no longer be a part of
+  Guzzle 6.
+- As Guzzle now uses a middleware based systems the event system and RingPHP
+  integration has been removed. Note: while the event system has been removed,
+  it is possible to add your own type of event system that is powered by the
+  middleware system.
+  - Removed the `Event` namespace.
+  - Removed the `Subscriber` namespace.
+  - Removed `Transaction` class
+  - Removed `RequestFsm`
+  - Removed `RingBridge`
+  - `GuzzleHttp\Subscriber\Cookie` is now provided by
+    `GuzzleHttp\Middleware::cookies`
+  - `GuzzleHttp\Subscriber\HttpError` is now provided by
+    `GuzzleHttp\Middleware::httpError`
+  - `GuzzleHttp\Subscriber\History` is now provided by
+    `GuzzleHttp\Middleware::history`
+  - `GuzzleHttp\Subscriber\Mock` is now provided by
+    `GuzzleHttp\Handler\MockHandler`
+  - `GuzzleHttp\Subscriber\Prepare` is now provided by
+    `GuzzleHttp\PrepareBodyMiddleware`
+  - `GuzzleHttp\Subscriber\Redirect` is now provided by
+    `GuzzleHttp\RedirectMiddleware`
+- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in
+  `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone.
+- Static functions in `GuzzleHttp\Utils` have been moved to namespaced
+  functions under the `GuzzleHttp` namespace. This requires either a Composer
+  based autoloader or you to include functions.php.
+- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to
+  `GuzzleHttp\ClientInterface::getConfig`.
+- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed.
+- The `json` and `xml` methods of response objects has been removed. With the
+  migration to strictly adhering to PSR-7 as the interface for Guzzle messages,
+  adding methods to message interfaces would actually require Guzzle messages
+  to extend from PSR-7 messages rather then work with them directly.
+
+## Migrating to middleware
+
+The change to PSR-7 unfortunately required significant refactoring to Guzzle
+due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event
+system from plugins. The event system relied on mutability of HTTP messages and
+side effects in order to work. With immutable messages, you have to change your
+workflow to become more about either returning a value (e.g., functional
+middlewares) or setting a value on an object. Guzzle v6 has chosen the
+functional middleware approach.
+
+Instead of using the event system to listen for things like the `before` event,
+you now create a stack based middleware function that intercepts a request on
+the way in and the promise of the response on the way out. This is a much
+simpler and more predictable approach than the event system and works nicely
+with PSR-7 middleware. Due to the use of promises, the middleware system is
+also asynchronous.
+
+v5:
+
+```php
+use GuzzleHttp\Event\BeforeEvent;
+$client = new GuzzleHttp\Client();
+// Get the emitter and listen to the before event.
+$client->getEmitter()->on('before', function (BeforeEvent $e) {
+    // Guzzle v5 events relied on mutation
+    $e->getRequest()->setHeader('X-Foo', 'Bar');
+});
+```
+
+v6:
+
+In v6, you can modify the request before it is sent using the `mapRequest`
+middleware. The idiomatic way in v6 to modify the request/response lifecycle is
+to setup a handler middleware stack up front and inject the handler into a
+client.
+
+```php
+use GuzzleHttp\Middleware;
+// Create a handler stack that has all of the default middlewares attached
+$handler = GuzzleHttp\HandlerStack::create();
+// Push the handler onto the handler stack
+$handler->push(Middleware::mapRequest(function (RequestInterface $request) {
+    // Notice that we have to return a request object
+    return $request->withHeader('X-Foo', 'Bar');
+});
+// Inject the handler into the client
+$client = new GuzzleHttp\Client(['handler' => $handler]);
+```
+
+## POST Requests
+
+This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params)
+and `multipart` request options. `form_params` is an associative array of
+strings or array of strings and is used to serialize an
+`application/x-www-form-urlencoded` POST request. The
+[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart)
+option is now used to send a multipart/form-data POST request.
+
+`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add
+POST files to a multipart/form-data request.
+
+The `body` option no longer accepts an array to send POST requests. Please use
+`multipart` or `form_params` instead.
+
+The `base_url` option has been renamed to `base_uri`.
+
+4.x to 5.0
+----------
+
+## Rewritten Adapter Layer
+
+Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send
+HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor
+is still supported, but it has now been renamed to `handler`. Instead of
+passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP
+`callable` that follows the RingPHP specification.
+
+## Removed Fluent Interfaces
+
+[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil)
+from the following classes:
+
+- `GuzzleHttp\Collection`
+- `GuzzleHttp\Url`
+- `GuzzleHttp\Query`
+- `GuzzleHttp\Post\PostBody`
+- `GuzzleHttp\Cookie\SetCookie`
+
+## Removed functions.php
+
+Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following
+functions can be used as replacements.
+
+- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode`
+- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath`
+- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path`
+- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however,
+  deprecated in favor of using `GuzzleHttp\Pool::batch()`.
+
+The "procedural" global client has been removed with no replacement (e.g.,
+`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client`
+object as a replacement.
+
+## `throwImmediately` has been removed
+
+The concept of "throwImmediately" has been removed from exceptions and error
+events. This control mechanism was used to stop a transfer of concurrent
+requests from completing. This can now be handled by throwing the exception or
+by cancelling a pool of requests or each outstanding future request
+individually.
+
+## headers event has been removed
+
+Removed the "headers" event. This event was only useful for changing the
+body a response once the headers of the response were known. You can implement
+a similar behavior in a number of ways. One example might be to use a
+FnStream that has access to the transaction being sent. For example, when the
+first byte is written, you could check if the response headers match your
+expectations, and if so, change the actual stream body that is being
+written to.
+
+## Updates to HTTP Messages
+
+Removed the `asArray` parameter from
+`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
+value as an array, then use the newly added `getHeaderAsArray()` method of
+`MessageInterface`. This change makes the Guzzle interfaces compatible with
+the PSR-7 interfaces.
+
+3.x to 4.0
+----------
+
+## Overarching changes:
+
+- Now requires PHP 5.4 or greater.
+- No longer requires cURL to send requests.
+- Guzzle no longer wraps every exception it throws. Only exceptions that are
+  recoverable are now wrapped by Guzzle.
+- Various namespaces have been removed or renamed.
+- No longer requiring the Symfony EventDispatcher. A custom event dispatcher
+  based on the Symfony EventDispatcher is
+  now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant
+  speed and functionality improvements).
+
+Changes per Guzzle 3.x namespace are described below.
+
+## Batch
+
+The `Guzzle\Batch` namespace has been removed. This is best left to
+third-parties to implement on top of Guzzle's core HTTP library.
+
+## Cache
+
+The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement
+has been implemented yet, but hoping to utilize a PSR cache interface).
+
+## Common
+
+- Removed all of the wrapped exceptions. It's better to use the standard PHP
+  library for unrecoverable exceptions.
+- `FromConfigInterface` has been removed.
+- `Guzzle\Common\Version` has been removed. The VERSION constant can be found
+  at `GuzzleHttp\ClientInterface::VERSION`.
+
+### Collection
+
+- `getAll` has been removed. Use `toArray` to convert a collection to an array.
+- `inject` has been removed.
+- `keySearch` has been removed.
+- `getPath` no longer supports wildcard expressions. Use something better like
+  JMESPath for this.
+- `setPath` now supports appending to an existing array via the `[]` notation.
+
+### Events
+
+Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses
+`GuzzleHttp\Event\Emitter`.
+
+- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by
+  `GuzzleHttp\Event\EmitterInterface`.
+- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by
+  `GuzzleHttp\Event\Emitter`.
+- `Symfony\Component\EventDispatcher\Event` is replaced by
+  `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in
+  `GuzzleHttp\Event\EventInterface`.
+- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and
+  `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the
+  event emitter of a request, client, etc. now uses the `getEmitter` method
+  rather than the `getDispatcher` method.
+
+#### Emitter
+
+- Use the `once()` method to add a listener that automatically removes itself
+  the first time it is invoked.
+- Use the `listeners()` method to retrieve a list of event listeners rather than
+  the `getListeners()` method.
+- Use `emit()` instead of `dispatch()` to emit an event from an emitter.
+- Use `attach()` instead of `addSubscriber()` and `detach()` instead of
+  `removeSubscriber()`.
+
+```php
+$mock = new Mock();
+// 3.x
+$request->getEventDispatcher()->addSubscriber($mock);
+$request->getEventDispatcher()->removeSubscriber($mock);
+// 4.x
+$request->getEmitter()->attach($mock);
+$request->getEmitter()->detach($mock);
+```
+
+Use the `on()` method to add a listener rather than the `addListener()` method.
+
+```php
+// 3.x
+$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } );
+// 4.x
+$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } );
+```
+
+## Http
+
+### General changes
+
+- The cacert.pem certificate has been moved to `src/cacert.pem`.
+- Added the concept of adapters that are used to transfer requests over the
+  wire.
+- Simplified the event system.
+- Sending requests in parallel is still possible, but batching is no longer a
+  concept of the HTTP layer. Instead, you must use the `complete` and `error`
+  events to asynchronously manage parallel request transfers.
+- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`.
+- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`.
+- QueryAggregators have been rewritten so that they are simply callable
+  functions.
+- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in
+  `functions.php` for an easy to use static client instance.
+- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from
+  `GuzzleHttp\Exception\TransferException`.
+
+### Client
+
+Calling methods like `get()`, `post()`, `head()`, etc. no longer create and
+return a request, but rather creates a request, sends the request, and returns
+the response.
+
+```php
+// 3.0
+$request = $client->get('/');
+$response = $request->send();
+
+// 4.0
+$response = $client->get('/');
+
+// or, to mirror the previous behavior
+$request = $client->createRequest('GET', '/');
+$response = $client->send($request);
+```
+
+`GuzzleHttp\ClientInterface` has changed.
+
+- The `send` method no longer accepts more than one request. Use `sendAll` to
+  send multiple requests in parallel.
+- `setUserAgent()` has been removed. Use a default request option instead. You
+  could, for example, do something like:
+  `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`.
+- `setSslVerification()` has been removed. Use default request options instead,
+  like `$client->setConfig('defaults/verify', true)`.
+
+`GuzzleHttp\Client` has changed.
+
+- The constructor now accepts only an associative array. You can include a
+  `base_url` string or array to use a URI template as the base URL of a client.
+  You can also specify a `defaults` key that is an associative array of default
+  request options. You can pass an `adapter` to use a custom adapter,
+  `batch_adapter` to use a custom adapter for sending requests in parallel, or
+  a `message_factory` to change the factory used to create HTTP requests and
+  responses.
+- The client no longer emits a `client.create_request` event.
+- Creating requests with a client no longer automatically utilize a URI
+  template. You must pass an array into a creational method (e.g.,
+  `createRequest`, `get`, `put`, etc.) in order to expand a URI template.
+
+### Messages
+
+Messages no longer have references to their counterparts (i.e., a request no
+longer has a reference to it's response, and a response no loger has a
+reference to its request). This association is now managed through a
+`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to
+these transaction objects using request events that are emitted over the
+lifecycle of a request.
+
+#### Requests with a body
+
+- `GuzzleHttp\Message\EntityEnclosingRequest` and
+  `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The
+  separation between requests that contain a body and requests that do not
+  contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface`
+  handles both use cases.
+- Any method that previously accepts a `GuzzleHttp\Response` object now accept a
+  `GuzzleHttp\Message\ResponseInterface`.
+- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to
+  `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create
+  both requests and responses and is implemented in
+  `GuzzleHttp\Message\MessageFactory`.
+- POST field and file methods have been removed from the request object. You
+  must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface`
+  to control the format of a POST body. Requests that are created using a
+  standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use
+  a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if
+  the method is POST and no body is provided.
+
+```php
+$request = $client->createRequest('POST', '/');
+$request->getBody()->setField('foo', 'bar');
+$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r')));
+```
+
+#### Headers
+
+- `GuzzleHttp\Message\Header` has been removed. Header values are now simply
+  represented by an array of values or as a string. Header values are returned
+  as a string by default when retrieving a header value from a message. You can
+  pass an optional argument of `true` to retrieve a header value as an array
+  of strings instead of a single concatenated string.
+- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to
+  `GuzzleHttp\Post`. This interface has been simplified and now allows the
+  addition of arbitrary headers.
+- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most
+  of the custom headers are now handled separately in specific
+  subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has
+  been updated to properly handle headers that contain parameters (like the
+  `Link` header).
+
+#### Responses
+
+- `GuzzleHttp\Message\Response::getInfo()` and
+  `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event
+  system to retrieve this type of information.
+- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed.
+- `GuzzleHttp\Message\Response::getMessage()` has been removed.
+- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific
+  methods have moved to the CacheSubscriber.
+- Header specific helper functions like `getContentMd5()` have been removed.
+  Just use `getHeader('Content-MD5')` instead.
+- `GuzzleHttp\Message\Response::setRequest()` and
+  `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event
+  system to work with request and response objects as a transaction.
+- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the
+  Redirect subscriber instead.
+- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have
+  been removed. Use `getStatusCode()` instead.
+
+#### Streaming responses
+
+Streaming requests can now be created by a client directly, returning a
+`GuzzleHttp\Message\ResponseInterface` object that contains a body stream
+referencing an open PHP HTTP stream.
+
+```php
+// 3.0
+use Guzzle\Stream\PhpStreamRequestFactory;
+$request = $client->get('/');
+$factory = new PhpStreamRequestFactory();
+$stream = $factory->fromRequest($request);
+$data = $stream->read(1024);
+
+// 4.0
+$response = $client->get('/', ['stream' => true]);
+// Read some data off of the stream in the response body
+$data = $response->getBody()->read(1024);
+```
+
+#### Redirects
+
+The `configureRedirects()` method has been removed in favor of a
+`allow_redirects` request option.
+
+```php
+// Standard redirects with a default of a max of 5 redirects
+$request = $client->createRequest('GET', '/', ['allow_redirects' => true]);
+
+// Strict redirects with a custom number of redirects
+$request = $client->createRequest('GET', '/', [
+    'allow_redirects' => ['max' => 5, 'strict' => true]
+]);
+```
+
+#### EntityBody
+
+EntityBody interfaces and classes have been removed or moved to
+`GuzzleHttp\Stream`. All classes and interfaces that once required
+`GuzzleHttp\EntityBodyInterface` now require
+`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no
+longer uses `GuzzleHttp\EntityBody::factory` but now uses
+`GuzzleHttp\Stream\Stream::factory` or even better:
+`GuzzleHttp\Stream\create()`.
+
+- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface`
+- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream`
+- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream`
+- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream`
+- `Guzzle\Http\IoEmittyinEntityBody` has been removed.
+
+#### Request lifecycle events
+
+Requests previously submitted a large number of requests. The number of events
+emitted over the lifecycle of a request has been significantly reduced to make
+it easier to understand how to extend the behavior of a request. All events
+emitted during the lifecycle of a request now emit a custom
+`GuzzleHttp\Event\EventInterface` object that contains context providing
+methods and a way in which to modify the transaction at that specific point in
+time (e.g., intercept the request and set a response on the transaction).
+
+- `request.before_send` has been renamed to `before` and now emits a
+  `GuzzleHttp\Event\BeforeEvent`
+- `request.complete` has been renamed to `complete` and now emits a
+  `GuzzleHttp\Event\CompleteEvent`.
+- `request.sent` has been removed. Use `complete`.
+- `request.success` has been removed. Use `complete`.
+- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`.
+- `request.exception` has been removed. Use `error`.
+- `request.receive.status_line` has been removed.
+- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to
+  maintain a status update.
+- `curl.callback.write` has been removed. Use a custom `StreamInterface` to
+  intercept writes.
+- `curl.callback.read` has been removed. Use a custom `StreamInterface` to
+  intercept reads.
+
+`headers` is a new event that is emitted after the response headers of a
+request have been received before the body of the response is downloaded. This
+event emits a `GuzzleHttp\Event\HeadersEvent`.
+
+You can intercept a request and inject a response using the `intercept()` event
+of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and
+`GuzzleHttp\Event\ErrorEvent` event.
+
+See: http://docs.guzzlephp.org/en/latest/events.html
+
+## Inflection
+
+The `Guzzle\Inflection` namespace has been removed. This is not a core concern
+of Guzzle.
+
+## Iterator
+
+The `Guzzle\Iterator` namespace has been removed.
+
+- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and
+  `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of
+  Guzzle itself.
+- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent
+  class is shipped with PHP 5.4.
+- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because
+  it's easier to just wrap an iterator in a generator that maps values.
+
+For a replacement of these iterators, see https://github.com/nikic/iter
+
+## Log
+
+The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The
+`Guzzle\Log` namespace has been removed. Guzzle now relies on
+`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been
+moved to `GuzzleHttp\Subscriber\Log\Formatter`.
+
+## Parser
+
+The `Guzzle\Parser` namespace has been removed. This was previously used to
+make it possible to plug in custom parsers for cookies, messages, URI
+templates, and URLs; however, this level of complexity is not needed in Guzzle
+so it has been removed.
+
+- Cookie: Cookie parsing logic has been moved to
+  `GuzzleHttp\Cookie\SetCookie::fromString`.
+- Message: Message parsing logic for both requests and responses has been moved
+  to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only
+  used in debugging or deserializing messages, so it doesn't make sense for
+  Guzzle as a library to add this level of complexity to parsing messages.
+- UriTemplate: URI template parsing has been moved to
+  `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL
+  URI template library if it is installed.
+- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously
+  it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary,
+  then developers are free to subclass `GuzzleHttp\Url`.
+
+## Plugin
+
+The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`.
+Several plugins are shipping with the core Guzzle library under this namespace.
+
+- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar
+  code has moved to `GuzzleHttp\Cookie`.
+- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin.
+- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is
+  received.
+- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin.
+- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before
+  sending. This subscriber is attached to all requests by default.
+- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin.
+
+The following plugins have been removed (third-parties are free to re-implement
+these if needed):
+
+- `GuzzleHttp\Plugin\Async` has been removed.
+- `GuzzleHttp\Plugin\CurlAuth` has been removed.
+- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This
+  functionality should instead be implemented with event listeners that occur
+  after normal response parsing occurs in the guzzle/command package.
+
+The following plugins are not part of the core Guzzle package, but are provided
+in separate repositories:
+
+- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be muchs simpler
+  to build custom retry policies using simple functions rather than various
+  chained classes. See: https://github.com/guzzle/retry-subscriber
+- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to
+  https://github.com/guzzle/cache-subscriber
+- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to
+  https://github.com/guzzle/log-subscriber
+- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to
+  https://github.com/guzzle/message-integrity-subscriber
+- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to
+  `GuzzleHttp\Subscriber\MockSubscriber`.
+- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to
+  https://github.com/guzzle/oauth-subscriber
+
+## Service
+
+The service description layer of Guzzle has moved into two separate packages:
+
+- http://github.com/guzzle/command Provides a high level abstraction over web
+  services by representing web service operations using commands.
+- http://github.com/guzzle/guzzle-services Provides an implementation of
+  guzzle/command that provides request serialization and response parsing using
+  Guzzle service descriptions.
+
+## Stream
+
+Stream have moved to a separate package available at
+https://github.com/guzzle/streams.
+
+`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take
+on the responsibilities of `Guzzle\Http\EntityBody` and
+`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number
+of methods implemented by the `StreamInterface` has been drastically reduced to
+allow developers to more easily extend and decorate stream behavior.
+
+## Removed methods from StreamInterface
+
+- `getStream` and `setStream` have been removed to better encapsulate streams.
+- `getMetadata` and `setMetadata` have been removed in favor of
+  `GuzzleHttp\Stream\MetadataStreamInterface`.
+- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been
+  removed. This data is accessible when
+  using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`.
+- `rewind` has been removed. Use `seek(0)` for a similar behavior.
+
+## Renamed methods
+
+- `detachStream` has been renamed to `detach`.
+- `feof` has been renamed to `eof`.
+- `ftell` has been renamed to `tell`.
+- `readLine` has moved from an instance method to a static class method of
+  `GuzzleHttp\Stream\Stream`.
+
+## Metadata streams
+
+`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams
+that contain additional metadata accessible via `getMetadata()`.
+`GuzzleHttp\Stream\StreamInterface::getMetadata` and
+`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed.
+
+## StreamRequestFactory
+
+The entire concept of the StreamRequestFactory has been removed. The way this
+was used in Guzzle 3 broke the actual interface of sending streaming requests
+(instead of getting back a Response, you got a StreamInterface). Streeaming
+PHP requests are now implemented throught the `GuzzleHttp\Adapter\StreamAdapter`.
+
+3.6 to 3.7
+----------
+
+### Deprecations
+
+- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.:
+
+```php
+\Guzzle\Common\Version::$emitWarnings = true;
+```
+
+The following APIs and options have been marked as deprecated:
+
+- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead.
+- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
+- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
+- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
+- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
+- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
+- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
+- Marked `Guzzle\Common\Collection::inject()` as deprecated.
+- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use
+  `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or
+  `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));`
+
+3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational
+request methods. When paired with a client's configuration settings, these options allow you to specify default settings
+for various aspects of a request. Because these options make other previous configuration options redundant, several
+configuration options and methods of a client and AbstractCommand have been deprecated.
+
+- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`.
+- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`.
+- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')`
+- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0
+
+        $command = $client->getCommand('foo', array(
+            'command.headers' => array('Test' => '123'),
+            'command.response_body' => '/path/to/file'
+        ));
+
+        // Should be changed to:
+
+        $command = $client->getCommand('foo', array(
+            'command.request_options' => array(
+                'headers' => array('Test' => '123'),
+                'save_as' => '/path/to/file'
+            )
+        ));
+
+### Interface changes
+
+Additions and changes (you will need to update any implementations or subclasses you may have created):
+
+- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
+  createRequest, head, delete, put, patch, post, options, prepareRequest
+- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
+- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
+- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
+  `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
+  resource, string, or EntityBody into the $options parameter to specify the download location of the response.
+- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
+  default `array()`
+- Added `Guzzle\Stream\StreamInterface::isRepeatable`
+- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
+
+The following methods were removed from interfaces. All of these methods are still available in the concrete classes
+that implement them, but you should update your code to use alternative methods:
+
+- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
+  `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
+  `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or
+  `$client->setDefaultOption('headers/{header_name}', 'value')`. or
+  `$client->setDefaultOption('headers', array('header_name' => 'value'))`.
+- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`.
+- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail.
+- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail.
+- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail.
+- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin.
+- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin.
+- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin.
+
+### Cache plugin breaking changes
+
+- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
+  CacheStorageInterface. These two objects and interface will be removed in a future version.
+- Always setting X-cache headers on cached responses
+- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
+- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
+  $request, Response $response);`
+- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
+- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
+- Added `CacheStorageInterface::purge($url)`
+- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
+  $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
+  CanCacheStrategyInterface $canCache = null)`
+- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
+
+3.5 to 3.6
+----------
+
+* Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
+* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
+* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
+  For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader().
+  Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request.
+* Specific header implementations can be created for complex headers. When a message creates a header, it uses a
+  HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
+  CacheControl header implementation.
+* Moved getLinks() from Response to just be used on a Link header object.
+
+If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the
+HeaderInterface (e.g. toArray(), getAll(), etc.).
+
+### Interface changes
+
+* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
+* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
+* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
+  Guzzle\Http\Curl\RequestMediator
+* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
+* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
+* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
+
+### Removed deprecated functions
+
+* Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
+* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
+
+### Deprecations
+
+* The ability to case-insensitively search for header values
+* Guzzle\Http\Message\Header::hasExactHeader
+* Guzzle\Http\Message\Header::raw. Use getAll()
+* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
+  instead.
+
+### Other changes
+
+* All response header helper functions return a string rather than mixing Header objects and strings inconsistently
+* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle
+  directly via interfaces
+* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
+  but are a no-op until removed.
+* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
+  `Guzzle\Service\Command\ArrayCommandInterface`.
+* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
+  on a request while the request is still being transferred
+* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
+
+3.3 to 3.4
+----------
+
+Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
+
+3.2 to 3.3
+----------
+
+### Response::getEtag() quote stripping removed
+
+`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header
+
+### Removed `Guzzle\Http\Utils`
+
+The `Guzzle\Http\Utils` class was removed. This class was only used for testing.
+
+### Stream wrapper and type
+
+`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase.
+
+### curl.emit_io became emit_io
+
+Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the
+'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
+
+3.1 to 3.2
+----------
+
+### CurlMulti is no longer reused globally
+
+Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added
+to a single client can pollute requests dispatched from other clients.
+
+If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the
+ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is
+created.
+
+```php
+$multi = new Guzzle\Http\Curl\CurlMulti();
+$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json');
+$builder->addListener('service_builder.create_client', function ($event) use ($multi) {
+    $event['client']->setCurlMulti($multi);
+}
+});
+```
+
+### No default path
+
+URLs no longer have a default path value of '/' if no path was specified.
+
+Before:
+
+```php
+$request = $client->get('http://www.foo.com');
+echo $request->getUrl();
+// >> http://www.foo.com/
+```
+
+After:
+
+```php
+$request = $client->get('http://www.foo.com');
+echo $request->getUrl();
+// >> http://www.foo.com
+```
+
+### Less verbose BadResponseException
+
+The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and
+response information. You can, however, get access to the request and response object by calling `getRequest()` or
+`getResponse()` on the exception object.
+
+### Query parameter aggregation
+
+Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a
+setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is
+responsible for handling the aggregation of multi-valued query string variables into a flattened hash.
+
+2.8 to 3.x
+----------
+
+### Guzzle\Service\Inspector
+
+Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig`
+
+**Before**
+
+```php
+use Guzzle\Service\Inspector;
+
+class YourClient extends \Guzzle\Service\Client
+{
+    public static function factory($config = array())
+    {
+        $default = array();
+        $required = array('base_url', 'username', 'api_key');
+        $config = Inspector::fromConfig($config, $default, $required);
+
+        $client = new self(
+            $config->get('base_url'),
+            $config->get('username'),
+            $config->get('api_key')
+        );
+        $client->setConfig($config);
+
+        $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
+
+        return $client;
+    }
+```
+
+**After**
+
+```php
+use Guzzle\Common\Collection;
+
+class YourClient extends \Guzzle\Service\Client
+{
+    public static function factory($config = array())
+    {
+        $default = array();
+        $required = array('base_url', 'username', 'api_key');
+        $config = Collection::fromConfig($config, $default, $required);
+
+        $client = new self(
+            $config->get('base_url'),
+            $config->get('username'),
+            $config->get('api_key')
+        );
+        $client->setConfig($config);
+
+        $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
+
+        return $client;
+    }
+```
+
+### Convert XML Service Descriptions to JSON
+
+**Before**
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<client>
+    <commands>
+        <!-- Groups -->
+        <command name="list_groups" method="GET" uri="groups.json">
+            <doc>Get a list of groups</doc>
+        </command>
+        <command name="search_groups" method="GET" uri='search.json?query="{{query}} type:group"'>
+            <doc>Uses a search query to get a list of groups</doc>
+            <param name="query" type="string" required="true" />
+        </command>
+        <command name="create_group" method="POST" uri="groups.json">
+            <doc>Create a group</doc>
+            <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
+            <param name="Content-Type" location="header" static="application/json"/>
+        </command>
+        <command name="delete_group" method="DELETE" uri="groups/{{id}}.json">
+            <doc>Delete a group by ID</doc>
+            <param name="id" type="integer" required="true"/>
+        </command>
+        <command name="get_group" method="GET" uri="groups/{{id}}.json">
+            <param name="id" type="integer" required="true"/>
+        </command>
+        <command name="update_group" method="PUT" uri="groups/{{id}}.json">
+            <doc>Update a group</doc>
+            <param name="id" type="integer" required="true"/>
+            <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
+            <param name="Content-Type" location="header" static="application/json"/>
+        </command>
+    </commands>
+</client>
+```
+
+**After**
+
+```json
+{
+    "name":       "Zendesk REST API v2",
+    "apiVersion": "2012-12-31",
+    "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users",
+    "operations": {
+        "list_groups":  {
+            "httpMethod":"GET",
+            "uri":       "groups.json",
+            "summary":   "Get a list of groups"
+        },
+        "search_groups":{
+            "httpMethod":"GET",
+            "uri":       "search.json?query=\"{query} type:group\"",
+            "summary":   "Uses a search query to get a list of groups",
+            "parameters":{
+                "query":{
+                    "location":   "uri",
+                    "description":"Zendesk Search Query",
+                    "type":       "string",
+                    "required":   true
+                }
+            }
+        },
+        "create_group": {
+            "httpMethod":"POST",
+            "uri":       "groups.json",
+            "summary":   "Create a group",
+            "parameters":{
+                "data":        {
+                    "type":       "array",
+                    "location":   "body",
+                    "description":"Group JSON",
+                    "filters":    "json_encode",
+                    "required":   true
+                },
+                "Content-Type":{
+                    "type":    "string",
+                    "location":"header",
+                    "static":  "application/json"
+                }
+            }
+        },
+        "delete_group": {
+            "httpMethod":"DELETE",
+            "uri":       "groups/{id}.json",
+            "summary":   "Delete a group",
+            "parameters":{
+                "id":{
+                    "location":   "uri",
+                    "description":"Group to delete by ID",
+                    "type":       "integer",
+                    "required":   true
+                }
+            }
+        },
+        "get_group":    {
+            "httpMethod":"GET",
+            "uri":       "groups/{id}.json",
+            "summary":   "Get a ticket",
+            "parameters":{
+                "id":{
+                    "location":   "uri",
+                    "description":"Group to get by ID",
+                    "type":       "integer",
+                    "required":   true
+                }
+            }
+        },
+        "update_group": {
+            "httpMethod":"PUT",
+            "uri":       "groups/{id}.json",
+            "summary":   "Update a group",
+            "parameters":{
+                "id":          {
+                    "location":   "uri",
+                    "description":"Group to update by ID",
+                    "type":       "integer",
+                    "required":   true
+                },
+                "data":        {
+                    "type":       "array",
+                    "location":   "body",
+                    "description":"Group JSON",
+                    "filters":    "json_encode",
+                    "required":   true
+                },
+                "Content-Type":{
+                    "type":    "string",
+                    "location":"header",
+                    "static":  "application/json"
+                }
+            }
+        }
+}
+```
+
+### Guzzle\Service\Description\ServiceDescription
+
+Commands are now called Operations
+
+**Before**
+
+```php
+use Guzzle\Service\Description\ServiceDescription;
+
+$sd = new ServiceDescription();
+$sd->getCommands();     // @returns ApiCommandInterface[]
+$sd->hasCommand($name);
+$sd->getCommand($name); // @returns ApiCommandInterface|null
+$sd->addCommand($command); // @param ApiCommandInterface $command
+```
+
+**After**
+
+```php
+use Guzzle\Service\Description\ServiceDescription;
+
+$sd = new ServiceDescription();
+$sd->getOperations();           // @returns OperationInterface[]
+$sd->hasOperation($name);
+$sd->getOperation($name);       // @returns OperationInterface|null
+$sd->addOperation($operation);  // @param OperationInterface $operation
+```
+
+### Guzzle\Common\Inflection\Inflector
+
+Namespace is now `Guzzle\Inflection\Inflector`
+
+### Guzzle\Http\Plugin
+
+Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below.
+
+### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log
+
+Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively.
+
+**Before**
+
+```php
+use Guzzle\Common\Log\ClosureLogAdapter;
+use Guzzle\Http\Plugin\LogPlugin;
+
+/** @var \Guzzle\Http\Client */
+$client;
+
+// $verbosity is an integer indicating desired message verbosity level
+$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE);
+```
+
+**After**
+
+```php
+use Guzzle\Log\ClosureLogAdapter;
+use Guzzle\Log\MessageFormatter;
+use Guzzle\Plugin\Log\LogPlugin;
+
+/** @var \Guzzle\Http\Client */
+$client;
+
+// $format is a string indicating desired message format -- @see MessageFormatter
+$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT);
+```
+
+### Guzzle\Http\Plugin\CurlAuthPlugin
+
+Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`.
+
+### Guzzle\Http\Plugin\ExponentialBackoffPlugin
+
+Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes.
+
+**Before**
+
+```php
+use Guzzle\Http\Plugin\ExponentialBackoffPlugin;
+
+$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge(
+        ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429)
+    ));
+
+$client->addSubscriber($backoffPlugin);
+```
+
+**After**
+
+```php
+use Guzzle\Plugin\Backoff\BackoffPlugin;
+use Guzzle\Plugin\Backoff\HttpBackoffStrategy;
+
+// Use convenient factory method instead -- see implementation for ideas of what
+// you can do with chaining backoff strategies
+$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge(
+        HttpBackoffStrategy::getDefaultFailureCodes(), array(429)
+    ));
+$client->addSubscriber($backoffPlugin);
+```
+
+### Known Issues
+
+#### [BUG] Accept-Encoding header behavior changed unintentionally.
+
+(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e)
+
+In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to
+properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen.
+See issue #217 for a workaround, or use a version containing the fix.
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/composer.json	(revision 5534)
@@ -0,0 +1,41 @@
+{
+    "name": "guzzlehttp/guzzle",
+    "type": "library",
+    "description": "Guzzle is a PHP HTTP client library",
+    "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
+    "homepage": "http://guzzlephp.org/",
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Michael Dowling",
+            "email": "mtdowling@gmail.com",
+            "homepage": "https://github.com/mtdowling"
+        }
+    ],
+    "require": {
+        "php": ">=5.5.0",
+        "guzzlehttp/psr7": "~1.1",
+        "guzzlehttp/promises": "~1.0"
+    },
+    "require-dev": {
+        "ext-curl": "*",
+        "phpunit/phpunit": "~4.0",
+        "psr/log": "~1.0"
+    },
+    "autoload": {
+        "files": ["src/functions_include.php"],
+        "psr-4": {
+            "GuzzleHttp\\": "src/"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "GuzzleHttp\\Tests\\": "tests/"
+        }
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "6.1-dev"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Client.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Client.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Client.php	(revision 5534)
@@ -0,0 +1,397 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Cookie\CookieJar;
+use GuzzleHttp\Promise;
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\UriInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * @method ResponseInterface get($uri, array $options = [])
+ * @method ResponseInterface head($uri, array $options = [])
+ * @method ResponseInterface put($uri, array $options = [])
+ * @method ResponseInterface post($uri, array $options = [])
+ * @method ResponseInterface patch($uri, array $options = [])
+ * @method ResponseInterface delete($uri, array $options = [])
+ * @method Promise\PromiseInterface getAsync($uri, array $options = [])
+ * @method Promise\PromiseInterface headAsync($uri, array $options = [])
+ * @method Promise\PromiseInterface putAsync($uri, array $options = [])
+ * @method Promise\PromiseInterface postAsync($uri, array $options = [])
+ * @method Promise\PromiseInterface patchAsync($uri, array $options = [])
+ * @method Promise\PromiseInterface deleteAsync($uri, array $options = [])
+ */
+class Client implements ClientInterface
+{
+    /** @var array Default request options */
+    private $config;
+
+    /**
+     * Clients accept an array of constructor parameters.
+     *
+     * Here's an example of creating a client using a base_uri and an array of
+     * default request options to apply to each request:
+     *
+     *     $client = new Client([
+     *         'base_uri'        => 'http://www.foo.com/1.0/',
+     *         'timeout'         => 0,
+     *         'allow_redirects' => false,
+     *         'proxy'           => '192.168.16.1:10'
+     *     ]);
+     *
+     * Client configuration settings include the following options:
+     *
+     * - handler: (callable) Function that transfers HTTP requests over the
+     *   wire. The function is called with a Psr7\Http\Message\RequestInterface
+     *   and array of transfer options, and must return a
+     *   GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
+     *   Psr7\Http\Message\ResponseInterface on success. "handler" is a
+     *   constructor only option that cannot be overridden in per/request
+     *   options. If no handler is provided, a default handler will be created
+     *   that enables all of the request options below by attaching all of the
+     *   default middleware to the handler.
+     * - base_uri: (string|UriInterface) Base URI of the client that is merged
+     *   into relative URIs. Can be a string or instance of UriInterface.
+     * - **: any request option
+     *
+     * @param array $config Client configuration settings.
+     *
+     * @see \GuzzleHttp\RequestOptions for a list of available request options.
+     */
+    public function __construct(array $config = [])
+    {
+        if (!isset($config['handler'])) {
+            $config['handler'] = HandlerStack::create();
+        }
+
+        // Convert the base_uri to a UriInterface
+        if (isset($config['base_uri'])) {
+            $config['base_uri'] = Psr7\uri_for($config['base_uri']);
+        }
+
+        $this->configureDefaults($config);
+    }
+
+    public function __call($method, $args)
+    {
+        if (count($args) < 1) {
+            throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
+        }
+
+        $uri = $args[0];
+        $opts = isset($args[1]) ? $args[1] : [];
+
+        return substr($method, -5) === 'Async'
+            ? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
+            : $this->request($method, $uri, $opts);
+    }
+
+    public function sendAsync(RequestInterface $request, array $options = [])
+    {
+        // Merge the base URI into the request URI if needed.
+        $options = $this->prepareDefaults($options);
+
+        return $this->transfer(
+            $request->withUri($this->buildUri($request->getUri(), $options)),
+            $options
+        );
+    }
+
+    public function send(RequestInterface $request, array $options = [])
+    {
+        $options[RequestOptions::SYNCHRONOUS] = true;
+        return $this->sendAsync($request, $options)->wait();
+    }
+
+    public function requestAsync($method, $uri = null, array $options = [])
+    {
+        $options = $this->prepareDefaults($options);
+        // Remove request modifying parameter because it can be done up-front.
+        $headers = isset($options['headers']) ? $options['headers'] : [];
+        $body = isset($options['body']) ? $options['body'] : null;
+        $version = isset($options['version']) ? $options['version'] : '1.1';
+        // Merge the URI into the base URI.
+        $uri = $this->buildUri($uri, $options);
+        if (is_array($body)) {
+            $this->invalidBody();
+        }
+        $request = new Psr7\Request($method, $uri, $headers, $body, $version);
+        // Remove the option so that they are not doubly-applied.
+        unset($options['headers'], $options['body'], $options['version']);
+
+        return $this->transfer($request, $options);
+    }
+
+    public function request($method, $uri = null, array $options = [])
+    {
+        $options[RequestOptions::SYNCHRONOUS] = true;
+        return $this->requestAsync($method, $uri, $options)->wait();
+    }
+
+    public function getConfig($option = null)
+    {
+        return $option === null
+            ? $this->config
+            : (isset($this->config[$option]) ? $this->config[$option] : null);
+    }
+
+    private function buildUri($uri, array $config)
+    {
+        if (!isset($config['base_uri'])) {
+            return $uri instanceof UriInterface ? $uri : new Psr7\Uri($uri);
+        }
+
+        return Psr7\Uri::resolve(Psr7\uri_for($config['base_uri']), $uri);
+    }
+
+    /**
+     * Configures the default options for a client.
+     *
+     * @param array $config
+     */
+    private function configureDefaults(array $config)
+    {
+        $defaults = [
+            'allow_redirects' => RedirectMiddleware::$defaultSettings,
+            'http_errors'     => true,
+            'decode_content'  => true,
+            'verify'          => true,
+            'cookies'         => false
+        ];
+
+        // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set
+        if ($proxy = getenv('HTTP_PROXY')) {
+            $defaults['proxy']['http'] = $proxy;
+        }
+
+        if ($proxy = getenv('HTTPS_PROXY')) {
+            $defaults['proxy']['https'] = $proxy;
+        }
+
+        if ($noProxy = getenv('NO_PROXY')) {
+            $cleanedNoProxy = str_replace(' ', '', $noProxy);
+            $defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
+        }
+        
+        $this->config = $config + $defaults;
+
+        if (!empty($config['cookies']) && $config['cookies'] === true) {
+            $this->config['cookies'] = new CookieJar();
+        }
+
+        // Add the default user-agent header.
+        if (!isset($this->config['headers'])) {
+            $this->config['headers'] = ['User-Agent' => default_user_agent()];
+        } else {
+            // Add the User-Agent header if one was not already set.
+            foreach (array_keys($this->config['headers']) as $name) {
+                if (strtolower($name) === 'user-agent') {
+                    return;
+                }
+            }
+            $this->config['headers']['User-Agent'] = default_user_agent();
+        }
+    }
+
+    /**
+     * Merges default options into the array.
+     *
+     * @param array $options Options to modify by reference
+     *
+     * @return array
+     */
+    private function prepareDefaults($options)
+    {
+        $defaults = $this->config;
+
+        if (!empty($defaults['headers'])) {
+            // Default headers are only added if they are not present.
+            $defaults['_conditional'] = $defaults['headers'];
+            unset($defaults['headers']);
+        }
+
+        // Special handling for headers is required as they are added as
+        // conditional headers and as headers passed to a request ctor.
+        if (array_key_exists('headers', $options)) {
+            // Allows default headers to be unset.
+            if ($options['headers'] === null) {
+                $defaults['_conditional'] = null;
+                unset($options['headers']);
+            } elseif (!is_array($options['headers'])) {
+                throw new \InvalidArgumentException('headers must be an array');
+            }
+        }
+
+        // Shallow merge defaults underneath options.
+        $result = $options + $defaults;
+
+        // Remove null values.
+        foreach ($result as $k => $v) {
+            if ($v === null) {
+                unset($result[$k]);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Transfers the given request and applies request options.
+     *
+     * The URI of the request is not modified and the request options are used
+     * as-is without merging in default options.
+     *
+     * @param RequestInterface $request
+     * @param array            $options
+     *
+     * @return Promise\PromiseInterface
+     */
+    private function transfer(RequestInterface $request, array $options)
+    {
+        // save_to -> sink
+        if (isset($options['save_to'])) {
+            $options['sink'] = $options['save_to'];
+            unset($options['save_to']);
+        }
+
+        // exceptions -> http_error
+        if (isset($options['exceptions'])) {
+            $options['http_errors'] = $options['exceptions'];
+            unset($options['exceptions']);
+        }
+
+        $request = $this->applyOptions($request, $options);
+        $handler = $options['handler'];
+
+        try {
+            return Promise\promise_for($handler($request, $options));
+        } catch (\Exception $e) {
+            return Promise\rejection_for($e);
+        }
+    }
+
+    /**
+     * Applies the array of request options to a request.
+     *
+     * @param RequestInterface $request
+     * @param array            $options
+     *
+     * @return RequestInterface
+     */
+    private function applyOptions(RequestInterface $request, array &$options)
+    {
+        $modify = [];
+
+        if (isset($options['form_params'])) {
+            if (isset($options['multipart'])) {
+                throw new \InvalidArgumentException('You cannot use '
+                    . 'form_params and multipart at the same time. Use the '
+                    . 'form_params option if you want to send application/'
+                    . 'x-www-form-urlencoded requests, and the multipart '
+                    . 'option to send multipart/form-data requests.');
+            }
+            $options['body'] = http_build_query($options['form_params'], null, '&');
+            unset($options['form_params']);
+            $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
+        }
+
+        if (isset($options['multipart'])) {
+            $elements = $options['multipart'];
+            unset($options['multipart']);
+            $options['body'] = new Psr7\MultipartStream($elements);
+        }
+
+        if (!empty($options['decode_content'])
+            && $options['decode_content'] !== true
+        ) {
+            $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
+        }
+
+        if (isset($options['headers'])) {
+            if (isset($modify['set_headers'])) {
+                $modify['set_headers'] = $options['headers'] + $modify['set_headers'];
+            } else {
+                $modify['set_headers'] = $options['headers'];
+            }
+            unset($options['headers']);
+        }
+
+        if (isset($options['body'])) {
+            if (is_array($options['body'])) {
+                $this->invalidBody();
+            }
+            $modify['body'] = Psr7\stream_for($options['body']);
+            unset($options['body']);
+        }
+
+        if (!empty($options['auth'])) {
+            $value = $options['auth'];
+            $type = is_array($value)
+                ? (isset($value[2]) ? strtolower($value[2]) : 'basic')
+                : $value;
+            $config['auth'] = $value;
+            switch (strtolower($type)) {
+                case 'basic':
+                    $modify['set_headers']['Authorization'] = 'Basic '
+                        . base64_encode("$value[0]:$value[1]");
+                    break;
+                case 'digest':
+                    // @todo: Do not rely on curl
+                    $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
+                    $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
+                    break;
+            }
+        }
+
+        if (isset($options['query'])) {
+            $value = $options['query'];
+            if (is_array($value)) {
+                $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
+            }
+            if (!is_string($value)) {
+                throw new \InvalidArgumentException('query must be a string or array');
+            }
+            $modify['query'] = $value;
+            unset($options['query']);
+        }
+
+        if (isset($options['json'])) {
+            $modify['body'] = Psr7\stream_for(json_encode($options['json']));
+            $options['_conditional']['Content-Type'] = 'application/json';
+            unset($options['json']);
+        }
+
+        $request = Psr7\modify_request($request, $modify);
+        if ($request->getBody() instanceof Psr7\MultipartStream) {
+            // Use a multipart/form-data POST if a Content-Type is not set.
+            $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
+                . $request->getBody()->getBoundary();
+        }
+
+        // Merge in conditional headers if they are not present.
+        if (isset($options['_conditional'])) {
+            // Build up the changes so it's in a single clone of the message.
+            $modify = [];
+            foreach ($options['_conditional'] as $k => $v) {
+                if (!$request->hasHeader($k)) {
+                    $modify['set_headers'][$k] = $v;
+                }
+            }
+            $request = Psr7\modify_request($request, $modify);
+            // Don't pass this internal value along to middleware/handlers.
+            unset($options['_conditional']);
+        }
+
+        return $request;
+    }
+
+    private function invalidBody()
+    {
+        throw new \InvalidArgumentException('Passing in the "body" request '
+            . 'option as an array to send a POST request has been deprecated. '
+            . 'Please use the "form_params" request option to send a '
+            . 'application/x-www-form-urlencoded request, or a the "multipart" '
+            . 'request option to send a multipart/form-data request.');
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/ClientInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/ClientInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/ClientInterface.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Exception\GuzzleException;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Client interface for sending HTTP requests.
+ */
+interface ClientInterface
+{
+    const VERSION = '6.1.1';
+
+    /**
+     * Send an HTTP request.
+     *
+     * @param RequestInterface $request Request to send
+     * @param array            $options Request options to apply to the given
+     *                                  request and to the transfer.
+     *
+     * @return ResponseInterface
+     * @throws GuzzleException
+     */
+    public function send(RequestInterface $request, array $options = []);
+
+    /**
+     * Asynchronously send an HTTP request.
+     *
+     * @param RequestInterface $request Request to send
+     * @param array            $options Request options to apply to the given
+     *                                  request and to the transfer.
+     *
+     * @return PromiseInterface
+     */
+    public function sendAsync(RequestInterface $request, array $options = []);
+
+    /**
+     * Create and send an HTTP request.
+     *
+     * Use an absolute path to override the base path of the client, or a
+     * relative path to append to the base path of the client. The URL can
+     * contain the query string as well.
+     *
+     * @param string              $method  HTTP method
+     * @param string|UriInterface $uri     URI object or string.
+     * @param array               $options Request options to apply.
+     *
+     * @return ResponseInterface
+     * @throws GuzzleException
+     */
+    public function request($method, $uri, array $options = []);
+
+    /**
+     * Create and send an asynchronous HTTP request.
+     *
+     * Use an absolute path to override the base path of the client, or a
+     * relative path to append to the base path of the client. The URL can
+     * contain the query string as well. Use an array to provide a URL
+     * template and additional variables to use in the URL template expansion.
+     *
+     * @param string              $method  HTTP method
+     * @param string|UriInterface $uri     URI object or string.
+     * @param array               $options Request options to apply.
+     *
+     * @return PromiseInterface
+     */
+    public function requestAsync($method, $uri, array $options = []);
+
+    /**
+     * Get a client configuration option.
+     *
+     * These options include default request options of the client, a "handler"
+     * (if utilized by the concrete client), and a "base_uri" if utilized by
+     * the concrete client.
+     *
+     * @param string|null $option The config option to retrieve.
+     *
+     * @return mixed
+     */
+    public function getConfig($option = null);
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php	(revision 5534)
@@ -0,0 +1,277 @@
+<?php
+namespace GuzzleHttp\Cookie;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Cookie jar that stores cookies an an array
+ */
+class CookieJar implements CookieJarInterface
+{
+    /** @var SetCookie[] Loaded cookie data */
+    private $cookies = [];
+
+    /** @var bool */
+    private $strictMode;
+
+    /**
+     * @param bool $strictMode   Set to true to throw exceptions when invalid
+     *                           cookies are added to the cookie jar.
+     * @param array $cookieArray Array of SetCookie objects or a hash of
+     *                           arrays that can be used with the SetCookie
+     *                           constructor
+     */
+    public function __construct($strictMode = false, $cookieArray = [])
+    {
+        $this->strictMode = $strictMode;
+
+        foreach ($cookieArray as $cookie) {
+            if (!($cookie instanceof SetCookie)) {
+                $cookie = new SetCookie($cookie);
+            }
+            $this->setCookie($cookie);
+        }
+    }
+
+    /**
+     * Create a new Cookie jar from an associative array and domain.
+     *
+     * @param array  $cookies Cookies to create the jar from
+     * @param string $domain  Domain to set the cookies to
+     *
+     * @return self
+     */
+    public static function fromArray(array $cookies, $domain)
+    {
+        $cookieJar = new self();
+        foreach ($cookies as $name => $value) {
+            $cookieJar->setCookie(new SetCookie([
+                'Domain'  => $domain,
+                'Name'    => $name,
+                'Value'   => $value,
+                'Discard' => true
+            ]));
+        }
+
+        return $cookieJar;
+    }
+
+    /**
+     * Quote the cookie value if it is not already quoted and it contains
+     * problematic characters.
+     *
+     * @param string $value Value that may or may not need to be quoted
+     *
+     * @return string
+     */
+    public static function getCookieValue($value)
+    {
+        if (substr($value, 0, 1) !== '"' &&
+            substr($value, -1, 1) !== '"' &&
+            strpbrk($value, ';,=')
+        ) {
+            $value = '"' . $value . '"';
+        }
+
+        return $value;
+    }
+
+    /**
+     * Evaluate if this cookie should be persisted to storage
+     * that survives between requests.
+     *
+     * @param SetCookie $cookie Being evaluated.
+     * @param bool $allowSessionCookies If we should persist session cookies
+     * @return bool
+     */
+    public static function shouldPersist(
+        SetCookie $cookie,
+        $allowSessionCookies = false
+    ) {
+        if ($cookie->getExpires() || $allowSessionCookies) {
+            if (!$cookie->getDiscard()) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public function toArray()
+    {
+        return array_map(function (SetCookie $cookie) {
+            return $cookie->toArray();
+        }, $this->getIterator()->getArrayCopy());
+    }
+
+    public function clear($domain = null, $path = null, $name = null)
+    {
+        if (!$domain) {
+            $this->cookies = [];
+            return;
+        } elseif (!$path) {
+            $this->cookies = array_filter(
+                $this->cookies,
+                function (SetCookie $cookie) use ($path, $domain) {
+                    return !$cookie->matchesDomain($domain);
+                }
+            );
+        } elseif (!$name) {
+            $this->cookies = array_filter(
+                $this->cookies,
+                function (SetCookie $cookie) use ($path, $domain) {
+                    return !($cookie->matchesPath($path) &&
+                        $cookie->matchesDomain($domain));
+                }
+            );
+        } else {
+            $this->cookies = array_filter(
+                $this->cookies,
+                function (SetCookie $cookie) use ($path, $domain, $name) {
+                    return !($cookie->getName() == $name &&
+                        $cookie->matchesPath($path) &&
+                        $cookie->matchesDomain($domain));
+                }
+            );
+        }
+    }
+
+    public function clearSessionCookies()
+    {
+        $this->cookies = array_filter(
+            $this->cookies,
+            function (SetCookie $cookie) {
+                return !$cookie->getDiscard() && $cookie->getExpires();
+            }
+        );
+    }
+
+    public function setCookie(SetCookie $cookie)
+    {
+        // If the name string is empty (but not 0), ignore the set-cookie
+        // string entirely.
+        $name = $cookie->getName();
+        if (!$name && $name !== '0') {
+            return false;
+        }
+
+        // Only allow cookies with set and valid domain, name, value
+        $result = $cookie->validate();
+        if ($result !== true) {
+            if ($this->strictMode) {
+                throw new \RuntimeException('Invalid cookie: ' . $result);
+            } else {
+                $this->removeCookieIfEmpty($cookie);
+                return false;
+            }
+        }
+
+        // Resolve conflicts with previously set cookies
+        foreach ($this->cookies as $i => $c) {
+
+            // Two cookies are identical, when their path, and domain are
+            // identical.
+            if ($c->getPath() != $cookie->getPath() ||
+                $c->getDomain() != $cookie->getDomain() ||
+                $c->getName() != $cookie->getName()
+            ) {
+                continue;
+            }
+
+            // The previously set cookie is a discard cookie and this one is
+            // not so allow the new cookie to be set
+            if (!$cookie->getDiscard() && $c->getDiscard()) {
+                unset($this->cookies[$i]);
+                continue;
+            }
+
+            // If the new cookie's expiration is further into the future, then
+            // replace the old cookie
+            if ($cookie->getExpires() > $c->getExpires()) {
+                unset($this->cookies[$i]);
+                continue;
+            }
+
+            // If the value has changed, we better change it
+            if ($cookie->getValue() !== $c->getValue()) {
+                unset($this->cookies[$i]);
+                continue;
+            }
+
+            // The cookie exists, so no need to continue
+            return false;
+        }
+
+        $this->cookies[] = $cookie;
+
+        return true;
+    }
+
+    public function count()
+    {
+        return count($this->cookies);
+    }
+
+    public function getIterator()
+    {
+        return new \ArrayIterator(array_values($this->cookies));
+    }
+
+    public function extractCookies(
+        RequestInterface $request,
+        ResponseInterface $response
+    ) {
+        if ($cookieHeader = $response->getHeader('Set-Cookie')) {
+            foreach ($cookieHeader as $cookie) {
+                $sc = SetCookie::fromString($cookie);
+                if (!$sc->getDomain()) {
+                    $sc->setDomain($request->getUri()->getHost());
+                }
+                $this->setCookie($sc);
+            }
+        }
+    }
+
+    public function withCookieHeader(RequestInterface $request)
+    {
+        $values = [];
+        $uri = $request->getUri();
+        $scheme = $uri->getScheme();
+        $host = $uri->getHost();
+        $path = $uri->getPath() ?: '/';
+
+        foreach ($this->cookies as $cookie) {
+            if ($cookie->matchesPath($path) &&
+                $cookie->matchesDomain($host) &&
+                !$cookie->isExpired() &&
+                (!$cookie->getSecure() || $scheme == 'https')
+            ) {
+                $values[] = $cookie->getName() . '='
+                    . self::getCookieValue($cookie->getValue());
+            }
+        }
+
+        return $values
+            ? $request->withHeader('Cookie', implode('; ', $values))
+            : $request;
+    }
+
+    /**
+     * If a cookie already exists and the server asks to set it again with a
+     * null value, the cookie must be deleted.
+     *
+     * @param SetCookie $cookie
+     */
+    private function removeCookieIfEmpty(SetCookie $cookie)
+    {
+        $cookieValue = $cookie->getValue();
+        if ($cookieValue === null || $cookieValue === '') {
+            $this->clear(
+                $cookie->getDomain(),
+                $cookie->getPath(),
+                $cookie->getName()
+            );
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+namespace GuzzleHttp\Cookie;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Stores HTTP cookies.
+ *
+ * It extracts cookies from HTTP requests, and returns them in HTTP responses.
+ * CookieJarInterface instances automatically expire contained cookies when
+ * necessary. Subclasses are also responsible for storing and retrieving
+ * cookies from a file, database, etc.
+ *
+ * @link http://docs.python.org/2/library/cookielib.html Inspiration
+ */
+interface CookieJarInterface extends \Countable, \IteratorAggregate
+{
+    /**
+     * Create a request with added cookie headers.
+     *
+     * If no matching cookies are found in the cookie jar, then no Cookie
+     * header is added to the request and the same request is returned.
+     *
+     * @param RequestInterface $request Request object to modify.
+     *
+     * @return RequestInterface returns the modified request.
+     */
+    public function withCookieHeader(RequestInterface $request);
+
+    /**
+     * Extract cookies from an HTTP response and store them in the CookieJar.
+     *
+     * @param RequestInterface  $request  Request that was sent
+     * @param ResponseInterface $response Response that was received
+     */
+    public function extractCookies(
+        RequestInterface $request,
+        ResponseInterface $response
+    );
+
+    /**
+     * Sets a cookie in the cookie jar.
+     *
+     * @param SetCookie $cookie Cookie to set.
+     *
+     * @return bool Returns true on success or false on failure
+     */
+    public function setCookie(SetCookie $cookie);
+
+    /**
+     * Remove cookies currently held in the cookie jar.
+     *
+     * Invoking this method without arguments will empty the whole cookie jar.
+     * If given a $domain argument only cookies belonging to that domain will
+     * be removed. If given a $domain and $path argument, cookies belonging to
+     * the specified path within that domain are removed. If given all three
+     * arguments, then the cookie with the specified name, path and domain is
+     * removed.
+     *
+     * @param string $domain Clears cookies matching a domain
+     * @param string $path   Clears cookies matching a domain and path
+     * @param string $name   Clears cookies matching a domain, path, and name
+     *
+     * @return CookieJarInterface
+     */
+    public function clear($domain = null, $path = null, $name = null);
+
+    /**
+     * Discard all sessions cookies.
+     *
+     * Removes cookies that don't have an expire field or a have a discard
+     * field set to true. To be called when the user agent shuts down according
+     * to RFC 2965.
+     */
+    public function clearSessionCookies();
+
+    /**
+     * Converts the cookie jar to an array.
+     *
+     * @return array
+     */
+    public function toArray();
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php	(revision 5534)
@@ -0,0 +1,87 @@
+<?php
+namespace GuzzleHttp\Cookie;
+
+/**
+ * Persists non-session cookies using a JSON formatted file
+ */
+class FileCookieJar extends CookieJar
+{
+    /** @var string filename */
+    private $filename;
+
+    /** @var bool Control whether to persist session cookies or not. */
+    private $storeSessionCookies;
+    
+    /**
+     * Create a new FileCookieJar object
+     *
+     * @param string $cookieFile        File to store the cookie data
+     * @param bool $storeSessionCookies Set to true to store session cookies
+     *                                  in the cookie jar.
+     *
+     * @throws \RuntimeException if the file cannot be found or created
+     */
+    public function __construct($cookieFile, $storeSessionCookies = false)
+    {
+        $this->filename = $cookieFile;
+        $this->storeSessionCookies = $storeSessionCookies;
+
+        if (file_exists($cookieFile)) {
+            $this->load($cookieFile);
+        }
+    }
+
+    /**
+     * Saves the file when shutting down
+     */
+    public function __destruct()
+    {
+        $this->save($this->filename);
+    }
+
+    /**
+     * Saves the cookies to a file.
+     *
+     * @param string $filename File to save
+     * @throws \RuntimeException if the file cannot be found or created
+     */
+    public function save($filename)
+    {
+        $json = [];
+        foreach ($this as $cookie) {
+            /** @var SetCookie $cookie */
+            if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
+                $json[] = $cookie->toArray();
+            }
+        }
+
+        if (false === file_put_contents($filename, json_encode($json))) {
+            throw new \RuntimeException("Unable to save file {$filename}");
+        }
+    }
+
+    /**
+     * Load cookies from a JSON formatted file.
+     *
+     * Old cookies are kept unless overwritten by newly loaded ones.
+     *
+     * @param string $filename Cookie file to load.
+     * @throws \RuntimeException if the file cannot be loaded.
+     */
+    public function load($filename)
+    {
+        $json = file_get_contents($filename);
+        if (false === $json) {
+            throw new \RuntimeException("Unable to load file {$filename}");
+        }
+
+        $data = json_decode($json, true);
+        if (is_array($data)) {
+            foreach (json_decode($json, true) as $cookie) {
+                $this->setCookie(new SetCookie($cookie));
+            }
+        } elseif (strlen($data)) {
+            throw new \RuntimeException("Invalid cookie file: {$filename}");
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+namespace GuzzleHttp\Cookie;
+
+/**
+ * Persists cookies in the client session
+ */
+class SessionCookieJar extends CookieJar
+{
+    /** @var string session key */
+    private $sessionKey;
+    
+    /** @var bool Control whether to persist session cookies or not. */
+    private $storeSessionCookies;
+
+    /**
+     * Create a new SessionCookieJar object
+     *
+     * @param string $sessionKey        Session key name to store the cookie 
+     *                                  data in session
+     * @param bool $storeSessionCookies Set to true to store session cookies
+     *                                  in the cookie jar.
+     */
+    public function __construct($sessionKey, $storeSessionCookies = false)
+    {
+        $this->sessionKey = $sessionKey;
+        $this->storeSessionCookies = $storeSessionCookies;
+        $this->load();
+    }
+
+    /**
+     * Saves cookies to session when shutting down
+     */
+    public function __destruct()
+    {
+        $this->save();
+    }
+
+    /**
+     * Save cookies to the client session
+     */
+    public function save()
+    {
+        $json = [];
+        foreach ($this as $cookie) {
+            /** @var SetCookie $cookie */
+            if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
+                $json[] = $cookie->toArray();
+            }
+        }
+
+        $_SESSION[$this->sessionKey] = json_encode($json);
+    }
+
+    /**
+     * Load the contents of the client session into the data array
+     */
+    protected function load()
+    {
+        $cookieJar = isset($_SESSION[$this->sessionKey])
+            ? $_SESSION[$this->sessionKey]
+            : null;
+
+        $data = json_decode($cookieJar, true);
+        if (is_array($data)) {
+            foreach ($data as $cookie) {
+                $this->setCookie(new SetCookie($cookie));
+            }
+        } elseif (strlen($data)) {
+            throw new \RuntimeException("Invalid cookie data");
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php	(revision 5534)
@@ -0,0 +1,404 @@
+<?php
+namespace GuzzleHttp\Cookie;
+
+/**
+ * Set-Cookie object
+ */
+class SetCookie
+{
+    /** @var array */
+    private static $defaults = [
+        'Name'     => null,
+        'Value'    => null,
+        'Domain'   => null,
+        'Path'     => '/',
+        'Max-Age'  => null,
+        'Expires'  => null,
+        'Secure'   => false,
+        'Discard'  => false,
+        'HttpOnly' => false
+    ];
+
+    /** @var array Cookie data */
+    private $data;
+
+    /**
+     * Create a new SetCookie object from a string
+     *
+     * @param string $cookie Set-Cookie header string
+     *
+     * @return self
+     */
+    public static function fromString($cookie)
+    {
+        // Create the default return array
+        $data = self::$defaults;
+        // Explode the cookie string using a series of semicolons
+        $pieces = array_filter(array_map('trim', explode(';', $cookie)));
+        // The name of the cookie (first kvp) must include an equal sign.
+        if (empty($pieces) || !strpos($pieces[0], '=')) {
+            return new self($data);
+        }
+
+        // Add the cookie pieces into the parsed data array
+        foreach ($pieces as $part) {
+
+            $cookieParts = explode('=', $part, 2);
+            $key = trim($cookieParts[0]);
+            $value = isset($cookieParts[1])
+                ? trim($cookieParts[1], " \n\r\t\0\x0B")
+                : true;
+
+            // Only check for non-cookies when cookies have been found
+            if (empty($data['Name'])) {
+                $data['Name'] = $key;
+                $data['Value'] = $value;
+            } else {
+                foreach (array_keys(self::$defaults) as $search) {
+                    if (!strcasecmp($search, $key)) {
+                        $data[$search] = $value;
+                        continue 2;
+                    }
+                }
+                $data[$key] = $value;
+            }
+        }
+
+        return new self($data);
+    }
+
+    /**
+     * @param array $data Array of cookie data provided by a Cookie parser
+     */
+    public function __construct(array $data = [])
+    {
+        $this->data = array_replace(self::$defaults, $data);
+        // Extract the Expires value and turn it into a UNIX timestamp if needed
+        if (!$this->getExpires() && $this->getMaxAge()) {
+            // Calculate the Expires date
+            $this->setExpires(time() + $this->getMaxAge());
+        } elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
+            $this->setExpires($this->getExpires());
+        }
+    }
+
+    public function __toString()
+    {
+        $str = $this->data['Name'] . '=' . $this->data['Value'] . '; ';
+        foreach ($this->data as $k => $v) {
+            if ($k != 'Name' && $k != 'Value' && $v !== null && $v !== false) {
+                if ($k == 'Expires') {
+                    $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
+                } else {
+                    $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
+                }
+            }
+        }
+
+        return rtrim($str, '; ');
+    }
+
+    public function toArray()
+    {
+        return $this->data;
+    }
+
+    /**
+     * Get the cookie name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->data['Name'];
+    }
+
+    /**
+     * Set the cookie name
+     *
+     * @param string $name Cookie name
+     */
+    public function setName($name)
+    {
+        $this->data['Name'] = $name;
+    }
+
+    /**
+     * Get the cookie value
+     *
+     * @return string
+     */
+    public function getValue()
+    {
+        return $this->data['Value'];
+    }
+
+    /**
+     * Set the cookie value
+     *
+     * @param string $value Cookie value
+     */
+    public function setValue($value)
+    {
+        $this->data['Value'] = $value;
+    }
+
+    /**
+     * Get the domain
+     *
+     * @return string|null
+     */
+    public function getDomain()
+    {
+        return $this->data['Domain'];
+    }
+
+    /**
+     * Set the domain of the cookie
+     *
+     * @param string $domain
+     */
+    public function setDomain($domain)
+    {
+        $this->data['Domain'] = $domain;
+    }
+
+    /**
+     * Get the path
+     *
+     * @return string
+     */
+    public function getPath()
+    {
+        return $this->data['Path'];
+    }
+
+    /**
+     * Set the path of the cookie
+     *
+     * @param string $path Path of the cookie
+     */
+    public function setPath($path)
+    {
+        $this->data['Path'] = $path;
+    }
+
+    /**
+     * Maximum lifetime of the cookie in seconds
+     *
+     * @return int|null
+     */
+    public function getMaxAge()
+    {
+        return $this->data['Max-Age'];
+    }
+
+    /**
+     * Set the max-age of the cookie
+     *
+     * @param int $maxAge Max age of the cookie in seconds
+     */
+    public function setMaxAge($maxAge)
+    {
+        $this->data['Max-Age'] = $maxAge;
+    }
+
+    /**
+     * The UNIX timestamp when the cookie Expires
+     *
+     * @return mixed
+     */
+    public function getExpires()
+    {
+        return $this->data['Expires'];
+    }
+
+    /**
+     * Set the unix timestamp for which the cookie will expire
+     *
+     * @param int $timestamp Unix timestamp
+     */
+    public function setExpires($timestamp)
+    {
+        $this->data['Expires'] = is_numeric($timestamp)
+            ? (int) $timestamp
+            : strtotime($timestamp);
+    }
+
+    /**
+     * Get whether or not this is a secure cookie
+     *
+     * @return null|bool
+     */
+    public function getSecure()
+    {
+        return $this->data['Secure'];
+    }
+
+    /**
+     * Set whether or not the cookie is secure
+     *
+     * @param bool $secure Set to true or false if secure
+     */
+    public function setSecure($secure)
+    {
+        $this->data['Secure'] = $secure;
+    }
+
+    /**
+     * Get whether or not this is a session cookie
+     *
+     * @return null|bool
+     */
+    public function getDiscard()
+    {
+        return $this->data['Discard'];
+    }
+
+    /**
+     * Set whether or not this is a session cookie
+     *
+     * @param bool $discard Set to true or false if this is a session cookie
+     */
+    public function setDiscard($discard)
+    {
+        $this->data['Discard'] = $discard;
+    }
+
+    /**
+     * Get whether or not this is an HTTP only cookie
+     *
+     * @return bool
+     */
+    public function getHttpOnly()
+    {
+        return $this->data['HttpOnly'];
+    }
+
+    /**
+     * Set whether or not this is an HTTP only cookie
+     *
+     * @param bool $httpOnly Set to true or false if this is HTTP only
+     */
+    public function setHttpOnly($httpOnly)
+    {
+        $this->data['HttpOnly'] = $httpOnly;
+    }
+
+    /**
+     * Check if the cookie matches a path value.
+     *
+     * A request-path path-matches a given cookie-path if at least one of
+     * the following conditions holds:
+     *
+     * - The cookie-path and the request-path are identical.
+     * - The cookie-path is a prefix of the request-path, and the last
+     *   character of the cookie-path is %x2F ("/").
+     * - The cookie-path is a prefix of the request-path, and the first
+     *   character of the request-path that is not included in the cookie-
+     *   path is a %x2F ("/") character.
+     *
+     * @param string $requestPath Path to check against
+     *
+     * @return bool
+     */
+    public function matchesPath($requestPath)
+    {
+        $cookiePath = $this->getPath();
+
+        // Match on exact matches or when path is the default empty "/"
+        if ($cookiePath == '/' || $cookiePath == $requestPath) {
+            return true;
+        }
+
+        // Ensure that the cookie-path is a prefix of the request path.
+        if (0 !== strpos($requestPath, $cookiePath)) {
+            return false;
+        }
+
+        // Match if the last character of the cookie-path is "/"
+        if (substr($cookiePath, -1, 1) == '/') {
+            return true;
+        }
+
+        // Match if the first character not included in cookie path is "/"
+        return substr($requestPath, strlen($cookiePath), 1) == '/';
+    }
+
+    /**
+     * Check if the cookie matches a domain value
+     *
+     * @param string $domain Domain to check against
+     *
+     * @return bool
+     */
+    public function matchesDomain($domain)
+    {
+        // Remove the leading '.' as per spec in RFC 6265.
+        // http://tools.ietf.org/html/rfc6265#section-5.2.3
+        $cookieDomain = ltrim($this->getDomain(), '.');
+
+        // Domain not set or exact match.
+        if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
+            return true;
+        }
+
+        // Matching the subdomain according to RFC 6265.
+        // http://tools.ietf.org/html/rfc6265#section-5.1.3
+        if (filter_var($domain, FILTER_VALIDATE_IP)) {
+            return false;
+        }
+
+        return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/', $domain);
+    }
+
+    /**
+     * Check if the cookie is expired
+     *
+     * @return bool
+     */
+    public function isExpired()
+    {
+        return $this->getExpires() && time() > $this->getExpires();
+    }
+
+    /**
+     * Check if the cookie is valid according to RFC 6265
+     *
+     * @return bool|string Returns true if valid or an error message if invalid
+     */
+    public function validate()
+    {
+        // Names must not be empty, but can be 0
+        $name = $this->getName();
+        if (empty($name) && !is_numeric($name)) {
+            return 'The cookie name must not be empty';
+        }
+
+        // Check if any of the invalid characters are present in the cookie name
+        if (preg_match(
+            '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
+            $name)
+        ) {
+            return 'Cookie name must not contain invalid characters: ASCII '
+                . 'Control characters (0-31;127), space, tab and the '
+                . 'following characters: ()<>@,;:\"/?={}';
+        }
+
+        // Value must not be empty, but can be 0
+        $value = $this->getValue();
+        if (empty($value) && !is_numeric($value)) {
+            return 'The cookie value must not be empty';
+        }
+
+        // Domains must not be empty, but can be 0
+        // A "0" is not a valid internet domain, but may be used as server name
+        // in a private network.
+        $domain = $this->getDomain();
+        if (empty($domain) && !is_numeric($domain)) {
+            return 'The cookie domain must not be empty';
+        }
+
+        return true;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php	(revision 5534)
@@ -0,0 +1,7 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+/**
+ * Exception when an HTTP error occurs (4xx or 5xx error)
+ */
+class BadResponseException extends RequestException {}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php	(revision 5534)
@@ -0,0 +1,7 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+/**
+ * Exception when a client error is encountered (4xx codes)
+ */
+class ClientException extends BadResponseException {}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php	(revision 5534)
@@ -0,0 +1,37 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Exception thrown when a connection cannot be established.
+ *
+ * Note that no response is present for a ConnectException
+ */
+class ConnectException extends RequestException
+{
+    public function __construct(
+        $message,
+        RequestInterface $request,
+        \Exception $previous = null,
+        array $handlerContext = []
+    ) {
+        parent::__construct($message, $request, null, $previous, $handlerContext);
+    }
+
+    /**
+     * @return null
+     */
+    public function getResponse()
+    {
+        return null;
+    }
+
+    /**
+     * @return bool
+     */
+    public function hasResponse()
+    {
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php	(revision 5534)
@@ -0,0 +1,4 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+interface GuzzleException {}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php	(revision 5534)
@@ -0,0 +1,188 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use GuzzleHttp\Promise\PromiseInterface;
+
+/**
+ * HTTP Request exception
+ */
+class RequestException extends TransferException
+{
+    /** @var RequestInterface */
+    private $request;
+
+    /** @var ResponseInterface */
+    private $response;
+
+    /** @var array */
+    private $handlerContext;
+
+    public function __construct(
+        $message,
+        RequestInterface $request,
+        ResponseInterface $response = null,
+        \Exception $previous = null,
+        array $handlerContext = []
+    ) {
+        // Set the code of the exception if the response is set and not future.
+        $code = $response && !($response instanceof PromiseInterface)
+            ? $response->getStatusCode()
+            : 0;
+        parent::__construct($message, $code, $previous);
+        $this->request = $request;
+        $this->response = $response;
+        $this->handlerContext = $handlerContext;
+    }
+
+    /**
+     * Wrap non-RequestExceptions with a RequestException
+     *
+     * @param RequestInterface $request
+     * @param \Exception       $e
+     *
+     * @return RequestException
+     */
+    public static function wrapException(RequestInterface $request, \Exception $e)
+    {
+        return $e instanceof RequestException
+            ? $e
+            : new RequestException($e->getMessage(), $request, null, $e);
+    }
+
+    /**
+     * Factory method to create a new exception with a normalized error message
+     *
+     * @param RequestInterface  $request  Request
+     * @param ResponseInterface $response Response received
+     * @param \Exception        $previous Previous exception
+     * @param array             $ctx      Optional handler context.
+     *
+     * @return self
+     */
+    public static function create(
+        RequestInterface $request,
+        ResponseInterface $response = null,
+        \Exception $previous = null,
+        array $ctx = []
+    ) {
+        if (!$response) {
+            return new self(
+                'Error completing request',
+                $request,
+                null,
+                $previous,
+                $ctx
+            );
+        }
+
+        $level = floor($response->getStatusCode() / 100);
+        if ($level == '4') {
+            $label = 'Client error';
+            $className = __NAMESPACE__ . '\\ClientException';
+        } elseif ($level == '5') {
+            $label = 'Server error';
+            $className = __NAMESPACE__ . '\\ServerException';
+        } else {
+            $label = 'Unsuccessful request';
+            $className = __CLASS__;
+        }
+
+        // Server Error: `GET /` resulted in a `404 Not Found` response:
+        // <html> ... (truncated)
+        $message = sprintf(
+            '%s: `%s` resulted in a `%s` response',
+            $label,
+            $request->getMethod() . ' ' . $request->getUri(),
+            $response->getStatusCode() . ' ' . $response->getReasonPhrase()
+        );
+
+        $summary = static::getResponseBodySummary($response);
+
+        if ($summary !== null) {
+            $message .= ":\n{$summary}\n";
+        }
+
+        return new $className($message, $request, $response, $previous, $ctx);
+    }
+
+    /**
+     * Get a short summary of the response
+     *
+     * Will return `null` if the response is not printable.
+     *
+     * @param ResponseInterface $response
+     *
+     * @return string|null
+     */
+    public static function getResponseBodySummary(ResponseInterface $response)
+    {
+        $body = $response->getBody();
+
+        if (!$body->isSeekable()) {
+            return null;
+        }
+
+        $size = $body->getSize();
+        $summary = $body->read(120);
+        $body->rewind();
+
+        if ($size > 120) {
+            $summary .= ' (truncated...)';
+        }
+
+        // Matches any printable character, including unicode characters:
+        // letters, marks, numbers, punctuation, spacing, and separators.
+        if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
+            return null;
+        }
+
+        return $summary;
+    }
+
+    /**
+     * Get the request that caused the exception
+     *
+     * @return RequestInterface
+     */
+    public function getRequest()
+    {
+        return $this->request;
+    }
+
+    /**
+     * Get the associated response
+     *
+     * @return ResponseInterface|null
+     */
+    public function getResponse()
+    {
+        return $this->response;
+    }
+
+    /**
+     * Check if a response was received
+     *
+     * @return bool
+     */
+    public function hasResponse()
+    {
+        return $this->response !== null;
+    }
+
+    /**
+     * Get contextual information about the error from the underlying handler.
+     *
+     * The contents of this array will vary depending on which handler you are
+     * using. It may also be just an empty array. Relying on this data will
+     * couple you to a specific handler, but can give more debug information
+     * when needed.
+     *
+     * @return array
+     */
+    public function getHandlerContext()
+    {
+        return $this->handlerContext;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php	(revision 5534)
@@ -0,0 +1,27 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Exception thrown when a seek fails on a stream.
+ */
+class SeekException extends \RuntimeException implements GuzzleException
+{
+    private $stream;
+
+    public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
+    {
+        $this->stream = $stream;
+        $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
+        parent::__construct($msg);
+    }
+
+    /**
+     * @return StreamInterface
+     */
+    public function getStream()
+    {
+        return $this->stream;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php	(revision 5534)
@@ -0,0 +1,7 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+/**
+ * Exception when a server error is encountered (5xx codes)
+ */
+class ServerException extends BadResponseException {}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php	(revision 5534)
@@ -0,0 +1,4 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+class TooManyRedirectsException extends RequestException {}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php	(revision 5534)
@@ -0,0 +1,4 @@
+<?php
+namespace GuzzleHttp\Exception;
+
+class TransferException extends \RuntimeException implements GuzzleException {}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php	(revision 5534)
@@ -0,0 +1,531 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Exception\ConnectException;
+use GuzzleHttp\Promise\FulfilledPromise;
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\LazyOpenStream;
+use GuzzleHttp\TransferStats;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Creates curl resources from a request
+ */
+class CurlFactory implements CurlFactoryInterface
+{
+    /** @var array */
+    private $handles;
+
+    /** @var int Total number of idle handles to keep in cache */
+    private $maxHandles;
+
+    /**
+     * @param int $maxHandles Maximum number of idle handles.
+     */
+    public function __construct($maxHandles)
+    {
+        $this->maxHandles = $maxHandles;
+    }
+
+    public function create(RequestInterface $request, array $options)
+    {
+        if (isset($options['curl']['body_as_string'])) {
+            $options['_body_as_string'] = $options['curl']['body_as_string'];
+            unset($options['curl']['body_as_string']);
+        }
+
+        $easy = new EasyHandle;
+        $easy->request = $request;
+        $easy->options = $options;
+        $conf = $this->getDefaultConf($easy);
+        $this->applyMethod($easy, $conf);
+        $this->applyHandlerOptions($easy, $conf);
+        $this->applyHeaders($easy, $conf);
+        unset($conf['_headers']);
+
+        // Add handler options from the request configuration options
+        if (isset($options['curl'])) {
+            $conf = array_replace($conf, $options['curl']);
+        }
+
+        $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
+        $easy->handle = $this->handles
+            ? array_pop($this->handles)
+            : curl_init();
+        curl_setopt_array($easy->handle, $conf);
+
+        return $easy;
+    }
+
+    public function release(EasyHandle $easy)
+    {
+        $resource = $easy->handle;
+        unset($easy->handle);
+
+        if (count($this->handles) >= $this->maxHandles) {
+            curl_close($resource);
+        } else {
+            // Remove all callback functions as they can hold onto references
+            // and are not cleaned up by curl_reset. Using curl_setopt_array
+            // does not work for some reason, so removing each one
+            // individually.
+            curl_setopt($resource, CURLOPT_HEADERFUNCTION, null);
+            curl_setopt($resource, CURLOPT_READFUNCTION, null);
+            curl_setopt($resource, CURLOPT_WRITEFUNCTION, null);
+            curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null);
+            curl_reset($resource);
+            $this->handles[] = $resource;
+        }
+    }
+
+    /**
+     * Completes a cURL transaction, either returning a response promise or a
+     * rejected promise.
+     *
+     * @param callable             $handler
+     * @param EasyHandle           $easy
+     * @param CurlFactoryInterface $factory Dictates how the handle is released
+     *
+     * @return \GuzzleHttp\Promise\PromiseInterface
+     */
+    public static function finish(
+        callable $handler,
+        EasyHandle $easy,
+        CurlFactoryInterface $factory
+    ) {
+        if (isset($easy->options['on_stats'])) {
+            self::invokeStats($easy);
+        }
+
+        if (!$easy->response || $easy->errno) {
+            return self::finishError($handler, $easy, $factory);
+        }
+
+        // Return the response if it is present and there is no error.
+        $factory->release($easy);
+
+        // Rewind the body of the response if possible.
+        $body = $easy->response->getBody();
+        if ($body->isSeekable()) {
+            $body->rewind();
+        }
+
+        return new FulfilledPromise($easy->response);
+    }
+
+    private static function invokeStats(EasyHandle $easy)
+    {
+        $curlStats = curl_getinfo($easy->handle);
+        $stats = new TransferStats(
+            $easy->request,
+            $easy->response,
+            $curlStats['total_time'],
+            $easy->errno,
+            $curlStats
+        );
+        call_user_func($easy->options['on_stats'], $stats);
+    }
+
+    private static function finishError(
+        callable $handler,
+        EasyHandle $easy,
+        CurlFactoryInterface $factory
+    ) {
+        // Get error information and release the handle to the factory.
+        $ctx = [
+            'errno' => $easy->errno,
+            'error' => curl_error($easy->handle),
+        ] + curl_getinfo($easy->handle);
+        $factory->release($easy);
+
+        // Retry when nothing is present or when curl failed to rewind.
+        if (empty($easy->options['_err_message'])
+            && (!$easy->errno || $easy->errno == 65)
+        ) {
+            return self::retryFailedRewind($handler, $easy, $ctx);
+        }
+
+        return self::createRejection($easy, $ctx);
+    }
+
+    private static function createRejection(EasyHandle $easy, array $ctx)
+    {
+        static $connectionErrors = [
+            CURLE_OPERATION_TIMEOUTED  => true,
+            CURLE_COULDNT_RESOLVE_HOST => true,
+            CURLE_COULDNT_CONNECT      => true,
+            CURLE_SSL_CONNECT_ERROR    => true,
+            CURLE_GOT_NOTHING          => true,
+        ];
+
+        // If an exception was encountered during the onHeaders event, then
+        // return a rejected promise that wraps that exception.
+        if ($easy->onHeadersException) {
+            return new RejectedPromise(
+                new RequestException(
+                    'An error was encountered during the on_headers event',
+                    $easy->request,
+                    $easy->response,
+                    $easy->onHeadersException,
+                    $ctx
+                )
+            );
+        }
+
+        $message = sprintf(
+            'cURL error %s: %s (%s)',
+            $ctx['errno'],
+            $ctx['error'],
+            'see http://curl.haxx.se/libcurl/c/libcurl-errors.html'
+        );
+
+        // Create a connection exception if it was a specific error code.
+        $error = isset($connectionErrors[$easy->errno])
+            ? new ConnectException($message, $easy->request, null, $ctx)
+            : new RequestException($message, $easy->request, $easy->response, null, $ctx);
+
+        return new RejectedPromise($error);
+    }
+
+    private function getDefaultConf(EasyHandle $easy)
+    {
+        $conf = [
+            '_headers'             => $easy->request->getHeaders(),
+            CURLOPT_CUSTOMREQUEST  => $easy->request->getMethod(),
+            CURLOPT_URL            => (string) $easy->request->getUri(),
+            CURLOPT_RETURNTRANSFER => false,
+            CURLOPT_HEADER         => false,
+            CURLOPT_CONNECTTIMEOUT => 150,
+        ];
+
+        if (defined('CURLOPT_PROTOCOLS')) {
+            $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
+        }
+
+        $version = $easy->request->getProtocolVersion();
+        if ($version == 1.1) {
+            $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;
+        } elseif ($version == 2.0) {
+            $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0;
+        } else {
+            $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
+        }
+
+        return $conf;
+    }
+
+    private function applyMethod(EasyHandle $easy, array &$conf)
+    {
+        $body = $easy->request->getBody();
+        $size = $body->getSize();
+
+        if ($size === null || $size > 0) {
+            $this->applyBody($easy->request, $easy->options, $conf);
+            return;
+        }
+
+        $method = $easy->request->getMethod();
+        if ($method === 'PUT' || $method === 'POST') {
+            // See http://tools.ietf.org/html/rfc7230#section-3.3.2
+            if (!$easy->request->hasHeader('Content-Length')) {
+                $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
+            }
+        } elseif ($method === 'HEAD') {
+            $conf[CURLOPT_NOBODY] = true;
+            unset(
+                $conf[CURLOPT_WRITEFUNCTION],
+                $conf[CURLOPT_READFUNCTION],
+                $conf[CURLOPT_FILE],
+                $conf[CURLOPT_INFILE]
+            );
+        }
+    }
+
+    private function applyBody(RequestInterface $request, array $options, array &$conf)
+    {
+        $size = $request->hasHeader('Content-Length')
+            ? (int) $request->getHeaderLine('Content-Length')
+            : null;
+
+        // Send the body as a string if the size is less than 1MB OR if the
+        // [curl][body_as_string] request value is set.
+        if (($size !== null && $size < 1000000) ||
+            !empty($options['_body_as_string'])
+        ) {
+            $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody();
+            // Don't duplicate the Content-Length header
+            $this->removeHeader('Content-Length', $conf);
+            $this->removeHeader('Transfer-Encoding', $conf);
+        } else {
+            $conf[CURLOPT_UPLOAD] = true;
+            if ($size !== null) {
+                $conf[CURLOPT_INFILESIZE] = $size;
+                $this->removeHeader('Content-Length', $conf);
+            }
+            $body = $request->getBody();
+            $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) {
+                return $body->read($length);
+            };
+        }
+
+        // If the Expect header is not present, prevent curl from adding it
+        if (!$request->hasHeader('Expect')) {
+            $conf[CURLOPT_HTTPHEADER][] = 'Expect:';
+        }
+
+        // cURL sometimes adds a content-type by default. Prevent this.
+        if (!$request->hasHeader('Content-Type')) {
+            $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:';
+        }
+    }
+
+    private function applyHeaders(EasyHandle $easy, array &$conf)
+    {
+        foreach ($conf['_headers'] as $name => $values) {
+            foreach ($values as $value) {
+                $conf[CURLOPT_HTTPHEADER][] = "$name: $value";
+            }
+        }
+
+        // Remove the Accept header if one was not set
+        if (!$easy->request->hasHeader('Accept')) {
+            $conf[CURLOPT_HTTPHEADER][] = 'Accept:';
+        }
+    }
+
+    /**
+     * Remove a header from the options array.
+     *
+     * @param string $name    Case-insensitive header to remove
+     * @param array  $options Array of options to modify
+     */
+    private function removeHeader($name, array &$options)
+    {
+        foreach (array_keys($options['_headers']) as $key) {
+            if (!strcasecmp($key, $name)) {
+                unset($options['_headers'][$key]);
+                return;
+            }
+        }
+    }
+
+    private function applyHandlerOptions(EasyHandle $easy, array &$conf)
+    {
+        $options = $easy->options;
+        if (isset($options['verify'])) {
+            if ($options['verify'] === false) {
+                unset($conf[CURLOPT_CAINFO]);
+                $conf[CURLOPT_SSL_VERIFYHOST] = 0;
+                $conf[CURLOPT_SSL_VERIFYPEER] = false;
+            } else {
+                $conf[CURLOPT_SSL_VERIFYHOST] = 2;
+                $conf[CURLOPT_SSL_VERIFYPEER] = true;
+                if (is_string($options['verify'])) {
+                    $conf[CURLOPT_CAINFO] = $options['verify'];
+                    if (!file_exists($options['verify'])) {
+                        throw new \InvalidArgumentException(
+                            "SSL CA bundle not found: {$options['verify']}"
+                        );
+                    }
+                }
+            }
+        }
+
+        if (!empty($options['decode_content'])) {
+            $accept = $easy->request->getHeaderLine('Accept-Encoding');
+            if ($accept) {
+                $conf[CURLOPT_ENCODING] = $accept;
+            } else {
+                $conf[CURLOPT_ENCODING] = '';
+                // Don't let curl send the header over the wire
+                $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
+            }
+        }
+
+        if (isset($options['sink'])) {
+            $sink = $options['sink'];
+            if (!is_string($sink)) {
+                $sink = \GuzzleHttp\Psr7\stream_for($sink);
+            } elseif (!is_dir(dirname($sink))) {
+                // Ensure that the directory exists before failing in curl.
+                throw new \RuntimeException(sprintf(
+                    'Directory %s does not exist for sink value of %s',
+                    dirname($sink),
+                    $sink
+                ));
+            } else {
+                $sink = new LazyOpenStream($sink, 'w+');
+            }
+            $easy->sink = $sink;
+            $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) {
+                return $sink->write($write);
+            };
+        } else {
+            // Use a default temp stream if no sink was set.
+            $conf[CURLOPT_FILE] = fopen('php://temp', 'w+');
+            $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]);
+        }
+
+        if (isset($options['timeout'])) {
+            $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
+        }
+
+        if (isset($options['connect_timeout'])) {
+            $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
+        }
+
+        if (isset($options['proxy'])) {
+            if (!is_array($options['proxy'])) {
+                $conf[CURLOPT_PROXY] = $options['proxy'];
+            } else {
+                $scheme = $easy->request->getUri()->getScheme();
+                if (isset($options['proxy'][$scheme])) {
+                    $host = $easy->request->getUri()->getHost();
+                    if (!isset($options['proxy']['no']) ||
+                        !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])
+                    ) {
+                        $conf[CURLOPT_PROXY] = $options['proxy'][$scheme];
+                    }
+                }
+            }
+        }
+
+        if (isset($options['cert'])) {
+            $cert = $options['cert'];
+            if (is_array($cert)) {
+                $conf[CURLOPT_SSLCERTPASSWD] = $cert[1];
+                $cert = $cert[0];
+            }
+            if (!file_exists($cert)) {
+                throw new \InvalidArgumentException(
+                    "SSL certificate not found: {$cert}"
+                );
+            }
+            $conf[CURLOPT_SSLCERT] = $cert;
+        }
+
+        if (isset($options['ssl_key'])) {
+            $sslKey = $options['ssl_key'];
+            if (is_array($sslKey)) {
+                $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1];
+                $sslKey = $sslKey[0];
+            }
+            if (!file_exists($sslKey)) {
+                throw new \InvalidArgumentException(
+                    "SSL private key not found: {$sslKey}"
+                );
+            }
+            $conf[CURLOPT_SSLKEY] = $sslKey;
+        }
+
+        if (isset($options['progress'])) {
+            $progress = $options['progress'];
+            if (!is_callable($progress)) {
+                throw new \InvalidArgumentException(
+                    'progress client option must be callable'
+                );
+            }
+            $conf[CURLOPT_NOPROGRESS] = false;
+            $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) {
+                $args = func_get_args();
+                // PHP 5.5 pushed the handle onto the start of the args
+                if (is_resource($args[0])) {
+                    array_shift($args);
+                }
+                call_user_func_array($progress, $args);
+            };
+        }
+
+        if (!empty($options['debug'])) {
+            $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']);
+            $conf[CURLOPT_VERBOSE] = true;
+        }
+    }
+
+    /**
+     * This function ensures that a response was set on a transaction. If one
+     * was not set, then the request is retried if possible. This error
+     * typically means you are sending a payload, curl encountered a
+     * "Connection died, retrying a fresh connect" error, tried to rewind the
+     * stream, and then encountered a "necessary data rewind wasn't possible"
+     * error, causing the request to be sent through curl_multi_info_read()
+     * without an error status.
+     */
+    private static function retryFailedRewind(
+        callable $handler,
+        EasyHandle $easy,
+        array $ctx
+    ) {
+        try {
+            // Only rewind if the body has been read from.
+            $body = $easy->request->getBody();
+            if ($body->tell() > 0) {
+                $body->rewind();
+            }
+        } catch (\RuntimeException $e) {
+            $ctx['error'] = 'The connection unexpectedly failed without '
+                . 'providing an error. The request would have been retried, '
+                . 'but attempting to rewind the request body failed. '
+                . 'Exception: ' . $e;
+            return self::createRejection($easy, $ctx);
+        }
+
+        // Retry no more than 3 times before giving up.
+        if (!isset($easy->options['_curl_retries'])) {
+            $easy->options['_curl_retries'] = 1;
+        } elseif ($easy->options['_curl_retries'] == 2) {
+            $ctx['error'] = 'The cURL request was retried 3 times '
+                . 'and did not succeed. The most likely reason for the failure '
+                . 'is that cURL was unable to rewind the body of the request '
+                . 'and subsequent retries resulted in the same error. Turn on '
+                . 'the debug option to see what went wrong. See '
+                . 'https://bugs.php.net/bug.php?id=47204 for more information.';
+            return self::createRejection($easy, $ctx);
+        } else {
+            $easy->options['_curl_retries']++;
+        }
+
+        return $handler($easy->request, $easy->options);
+    }
+
+    private function createHeaderFn(EasyHandle $easy)
+    {
+        if (!isset($easy->options['on_headers'])) {
+            $onHeaders = null;
+        } elseif (!is_callable($easy->options['on_headers'])) {
+            throw new \InvalidArgumentException('on_headers must be callable');
+        } else {
+            $onHeaders = $easy->options['on_headers'];
+        }
+
+        return function ($ch, $h) use (
+            $onHeaders,
+            $easy,
+            &$startingResponse
+        ) {
+            $value = trim($h);
+            if ($value === '') {
+                $startingResponse = true;
+                $easy->createResponse();
+                if ($onHeaders) {
+                    try {
+                        $onHeaders($easy->response);
+                    } catch (\Exception $e) {
+                        // Associate the exception with the handle and trigger
+                        // a curl header write error by returning 0.
+                        $easy->onHeadersException = $e;
+                        return -1;
+                    }
+                }
+            } elseif ($startingResponse) {
+                $startingResponse = false;
+                $easy->headers = [$value];
+            } else {
+                $easy->headers[] = $value;
+            }
+            return strlen($h);
+        };
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php	(revision 5534)
@@ -0,0 +1,27 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use Psr\Http\Message\RequestInterface;
+
+interface CurlFactoryInterface
+{
+    /**
+     * Creates a cURL handle resource.
+     *
+     * @param RequestInterface $request Request
+     * @param array            $options Transfer options
+     *
+     * @return EasyHandle
+     * @throws \RuntimeException when an option cannot be applied
+     */
+    public function create(RequestInterface $request, array $options);
+
+    /**
+     * Release an easy handle, allowing it to be reused or closed.
+     *
+     * This function must call unset on the easy handle's "handle" property.
+     *
+     * @param EasyHandle $easy
+     */
+    public function release(EasyHandle $easy);
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php	(revision 5534)
@@ -0,0 +1,45 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * HTTP handler that uses cURL easy handles as a transport layer.
+ *
+ * When using the CurlHandler, custom curl options can be specified as an
+ * associative array of curl option constants mapping to values in the
+ * **curl** key of the "client" key of the request.
+ */
+class CurlHandler
+{
+    /** @var CurlFactoryInterface */
+    private $factory;
+
+    /**
+     * Accepts an associative array of options:
+     *
+     * - factory: Optional curl factory used to create cURL handles.
+     *
+     * @param array $options Array of options to use with the handler
+     */
+    public function __construct(array $options = [])
+    {
+        $this->factory = isset($options['handle_factory'])
+            ? $options['handle_factory']
+            : new CurlFactory(3);
+    }
+
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        if (isset($options['delay'])) {
+            usleep($options['delay'] * 1000);
+        }
+
+        $easy = $this->factory->create($request, $options);
+        curl_exec($easy->handle);
+        $easy->errno = curl_errno($easy->handle);
+
+        return CurlFactory::finish($this, $easy, $this->factory);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php	(revision 5534)
@@ -0,0 +1,197 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Returns an asynchronous response using curl_multi_* functions.
+ *
+ * When using the CurlMultiHandler, custom curl options can be specified as an
+ * associative array of curl option constants mapping to values in the
+ * **curl** key of the provided request options.
+ *
+ * @property resource $_mh Internal use only. Lazy loaded multi-handle.
+ */
+class CurlMultiHandler
+{
+    /** @var CurlFactoryInterface */
+    private $factory;
+    private $selectTimeout;
+    private $active;
+    private $handles = [];
+    private $delays = [];
+
+    /**
+     * This handler accepts the following options:
+     *
+     * - handle_factory: An optional factory  used to create curl handles
+     * - select_timeout: Optional timeout (in seconds) to block before timing
+     *   out while selecting curl handles. Defaults to 1 second.
+     *
+     * @param array $options
+     */
+    public function __construct(array $options = [])
+    {
+        $this->factory = isset($options['handle_factory'])
+            ? $options['handle_factory'] : new CurlFactory(50);
+        $this->selectTimeout = isset($options['select_timeout'])
+            ? $options['select_timeout'] : 1;
+    }
+
+    public function __get($name)
+    {
+        if ($name === '_mh') {
+            return $this->_mh = curl_multi_init();
+        }
+
+        throw new \BadMethodCallException();
+    }
+
+    public function __destruct()
+    {
+        if (isset($this->_mh)) {
+            curl_multi_close($this->_mh);
+            unset($this->_mh);
+        }
+    }
+
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        $easy = $this->factory->create($request, $options);
+        $id = (int) $easy->handle;
+
+        $promise = new Promise(
+            [$this, 'execute'],
+            function () use ($id) { return $this->cancel($id); }
+        );
+
+        $this->addRequest(['easy' => $easy, 'deferred' => $promise]);
+
+        return $promise;
+    }
+
+    /**
+     * Ticks the curl event loop.
+     */
+    public function tick()
+    {
+        // Add any delayed handles if needed.
+        if ($this->delays) {
+            $currentTime = microtime(true);
+            foreach ($this->delays as $id => $delay) {
+                if ($currentTime >= $delay) {
+                    unset($this->delays[$id]);
+                    curl_multi_add_handle(
+                        $this->_mh,
+                        $this->handles[$id]['easy']->handle
+                    );
+                }
+            }
+        }
+
+        // Step through the task queue which may add additional requests.
+        P\queue()->run();
+
+        if ($this->active &&
+            curl_multi_select($this->_mh, $this->selectTimeout) === -1
+        ) {
+            // Perform a usleep if a select returns -1.
+            // See: https://bugs.php.net/bug.php?id=61141
+            usleep(250);
+        }
+
+        while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
+
+        $this->processMessages();
+    }
+
+    /**
+     * Runs until all outstanding connections have completed.
+     */
+    public function execute()
+    {
+        $queue = P\queue();
+
+        while ($this->handles || !$queue->isEmpty()) {
+            // If there are no transfers, then sleep for the next delay
+            if (!$this->active && $this->delays) {
+                usleep($this->timeToNext());
+            }
+            $this->tick();
+        }
+    }
+
+    private function addRequest(array $entry)
+    {
+        $easy = $entry['easy'];
+        $id = (int) $easy->handle;
+        $this->handles[$id] = $entry;
+        if (empty($easy->options['delay'])) {
+            curl_multi_add_handle($this->_mh, $easy->handle);
+        } else {
+            $this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000);
+        }
+    }
+
+    /**
+     * Cancels a handle from sending and removes references to it.
+     *
+     * @param int $id Handle ID to cancel and remove.
+     *
+     * @return bool True on success, false on failure.
+     */
+    private function cancel($id)
+    {
+        // Cannot cancel if it has been processed.
+        if (!isset($this->handles[$id])) {
+            return false;
+        }
+
+        $handle = $this->handles[$id]['easy']->handle;
+        unset($this->delays[$id], $this->handles[$id]);
+        curl_multi_remove_handle($this->_mh, $handle);
+        curl_close($handle);
+
+        return true;
+    }
+
+    private function processMessages()
+    {
+        while ($done = curl_multi_info_read($this->_mh)) {
+            $id = (int) $done['handle'];
+            curl_multi_remove_handle($this->_mh, $done['handle']);
+
+            if (!isset($this->handles[$id])) {
+                // Probably was cancelled.
+                continue;
+            }
+
+            $entry = $this->handles[$id];
+            unset($this->handles[$id], $this->delays[$id]);
+            $entry['easy']->errno = $done['result'];
+            $entry['deferred']->resolve(
+                CurlFactory::finish(
+                    $this,
+                    $entry['easy'],
+                    $this->factory
+                )
+            );
+        }
+    }
+
+    private function timeToNext()
+    {
+        $currentTime = microtime(true);
+        $nextTime = PHP_INT_MAX;
+        foreach ($this->delays as $time) {
+            if ($time < $nextTime) {
+                $nextTime = $time;
+            }
+        }
+
+        return max(0, $currentTime - $nextTime);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php	(revision 5534)
@@ -0,0 +1,87 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Psr7\Response;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Represents a cURL easy handle and the data it populates.
+ *
+ * @internal
+ */
+final class EasyHandle
+{
+    /** @var resource cURL resource */
+    public $handle;
+
+    /** @var StreamInterface Where data is being written */
+    public $sink;
+
+    /** @var array Received HTTP headers so far */
+    public $headers = [];
+
+    /** @var ResponseInterface Received response (if any) */
+    public $response;
+
+    /** @var RequestInterface Request being sent */
+    public $request;
+
+    /** @var array Request options */
+    public $options = [];
+
+    /** @var int cURL error number (if any) */
+    public $errno = 0;
+
+    /** @var \Exception Exception during on_headers (if any) */
+    public $onHeadersException;
+
+    /**
+     * Attach a response to the easy handle based on the received headers.
+     *
+     * @throws \RuntimeException if no headers have been received.
+     */
+    public function createResponse()
+    {
+        if (empty($this->headers)) {
+            throw new \RuntimeException('No headers have been received');
+        }
+
+        // HTTP-version SP status-code SP reason-phrase
+        $startLine = explode(' ', array_shift($this->headers), 3);
+        $headers = \GuzzleHttp\headers_from_lines($this->headers);
+        $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
+
+        if (!empty($this->options['decode_content'])
+            && isset($normalizedKeys['content-encoding'])
+        ) {
+            unset($headers[$normalizedKeys['content-encoding']]);
+            if (isset($normalizedKeys['content-length'])) {
+                $bodyLength = (int) $this->sink->getSize();
+                if ($bodyLength) {
+                    $headers[$normalizedKeys['content-length']] = $bodyLength;
+                } else {
+                    unset($headers[$normalizedKeys['content-length']]);
+                }
+            }
+        }
+
+        // Attach a response to the easy handle with the parsed headers.
+        $this->response = new Response(
+            $startLine[1],
+            $headers,
+            $this->sink,
+            substr($startLine[0], 5),
+            isset($startLine[2]) ? (string) $startLine[2] : null
+        );
+    }
+
+    public function __get($name)
+    {
+        $msg = $name === 'handle'
+            ? 'The EasyHandle has been released'
+            : 'Invalid property: ' . $name;
+        throw new \BadMethodCallException($msg);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php	(revision 5534)
@@ -0,0 +1,176 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\TransferStats;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Handler that returns responses or throw exceptions from a queue.
+ */
+class MockHandler implements \Countable
+{
+    private $queue;
+    private $lastRequest;
+    private $lastOptions;
+    private $onFulfilled;
+    private $onRejected;
+
+    /**
+     * Creates a new MockHandler that uses the default handler stack list of
+     * middlewares.
+     *
+     * @param array $queue Array of responses, callables, or exceptions.
+     * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
+     * @param callable $onRejected  Callback to invoke when the return value is rejected.
+     *
+     * @return MockHandler
+     */
+    public static function createWithMiddleware(
+        array $queue = null,
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
+    }
+
+    /**
+     * The passed in value must be an array of
+     * {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions,
+     * callables, or Promises.
+     *
+     * @param array $queue
+     * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
+     * @param callable $onRejected  Callback to invoke when the return value is rejected.
+     */
+    public function __construct(
+        array $queue = null,
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        $this->onFulfilled = $onFulfilled;
+        $this->onRejected = $onRejected;
+
+        if ($queue) {
+            call_user_func_array([$this, 'append'], $queue);
+        }
+    }
+
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        if (!$this->queue) {
+            throw new \OutOfBoundsException('Mock queue is empty');
+        }
+
+        if (isset($options['delay'])) {
+            usleep($options['delay'] * 1000);
+        }
+
+        $this->lastRequest = $request;
+        $this->lastOptions = $options;
+        $response = array_shift($this->queue);
+
+        if (is_callable($response)) {
+            $response = $response($request, $options);
+        }
+
+        $response = $response instanceof \Exception
+            ? new RejectedPromise($response)
+            : \GuzzleHttp\Promise\promise_for($response);
+
+        return $response->then(
+            function ($value) use ($request, $options) {
+                $this->invokeStats($request, $options, $value);
+                if ($this->onFulfilled) {
+                    call_user_func($this->onFulfilled, $value);
+                }
+                if (isset($options['sink'])) {
+                    $contents = (string) $value->getBody();
+                    $sink = $options['sink'];
+
+                    if (is_resource($sink)) {
+                        fwrite($sink, $contents);
+                    } elseif (is_string($sink)) {
+                        file_put_contents($sink, $contents);
+                    } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) {
+                        $sink->write($contents);
+                    }
+                }
+
+                return $value;
+            },
+            function ($reason) use ($request, $options) {
+                $this->invokeStats($request, $options, null, $reason);
+                if ($this->onRejected) {
+                    call_user_func($this->onRejected, $reason);
+                }
+                return new RejectedPromise($reason);
+            }
+        );
+    }
+
+    /**
+     * Adds one or more variadic requests, exceptions, callables, or promises
+     * to the queue.
+     */
+    public function append()
+    {
+        foreach (func_get_args() as $value) {
+            if ($value instanceof ResponseInterface
+                || $value instanceof \Exception
+                || $value instanceof PromiseInterface
+                || is_callable($value)
+            ) {
+                $this->queue[] = $value;
+            } else {
+                throw new \InvalidArgumentException('Expected a response or '
+                    . 'exception. Found ' . \GuzzleHttp\describe_type($value));
+            }
+        }
+    }
+
+    /**
+     * Get the last received request.
+     *
+     * @return RequestInterface
+     */
+    public function getLastRequest()
+    {
+        return $this->lastRequest;
+    }
+
+    /**
+     * Get the last received request options.
+     *
+     * @return RequestInterface
+     */
+    public function getLastOptions()
+    {
+        return $this->lastOptions;
+    }
+
+    /**
+     * Returns the number of remaining items in the queue.
+     *
+     * @return int
+     */
+    public function count()
+    {
+        return count($this->queue);
+    }
+
+    private function invokeStats(
+        RequestInterface $request,
+        array $options,
+        ResponseInterface $response = null,
+        $reason = null
+    ) {
+        if (isset($options['on_stats'])) {
+            $stats = new TransferStats($request, $response, 0, $reason);
+            call_user_func($options['on_stats'], $stats);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php	(revision 5534)
@@ -0,0 +1,55 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\RequestOptions;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Provides basic proxies for handlers.
+ */
+class Proxy
+{
+    /**
+     * Sends synchronous requests to a specific handler while sending all other
+     * requests to another handler.
+     *
+     * @param callable $default Handler used for normal responses
+     * @param callable $sync    Handler used for synchronous responses.
+     *
+     * @return callable Returns the composed handler.
+     */
+    public static function wrapSync(
+        callable $default,
+        callable $sync
+    ) {
+        return function (RequestInterface $request, array $options) use ($default, $sync) {
+            return empty($options[RequestOptions::SYNCHRONOUS])
+                ? $default($request, $options)
+                : $sync($request, $options);
+        };
+    }
+
+    /**
+     * Sends streaming requests to a streaming compatible handler while sending
+     * all other requests to a default handler.
+     *
+     * This, for example, could be useful for taking advantage of the
+     * performance benefits of curl while still supporting true streaming
+     * through the StreamHandler.
+     *
+     * @param callable $default   Handler used for non-streaming responses
+     * @param callable $streaming Handler used for streaming responses
+     *
+     * @return callable Returns the composed handler.
+     */
+    public static function wrapStreaming(
+        callable $default,
+        callable $streaming
+    ) {
+        return function (RequestInterface $request, array $options) use ($default, $streaming) {
+            return empty($options['stream'])
+                ? $default($request, $options)
+                : $streaming($request, $options);
+        };
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php	(revision 5534)
@@ -0,0 +1,458 @@
+<?php
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Exception\ConnectException;
+use GuzzleHttp\Promise\FulfilledPromise;
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Psr7;
+use GuzzleHttp\TransferStats;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * HTTP handler that uses PHP's HTTP stream wrapper.
+ */
+class StreamHandler
+{
+    private $lastHeaders = [];
+
+    /**
+     * Sends an HTTP request.
+     *
+     * @param RequestInterface $request Request to send.
+     * @param array            $options Request transfer options.
+     *
+     * @return PromiseInterface
+     */
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        // Sleep if there is a delay specified.
+        if (isset($options['delay'])) {
+            usleep($options['delay'] * 1000);
+        }
+
+        $startTime = isset($options['on_stats']) ? microtime(true) : null;
+
+        try {
+            // Does not support the expect header.
+            $request = $request->withoutHeader('Expect');
+
+            // Append a content-length header if body size is zero to match
+            // cURL's behavior.
+            if (0 === $request->getBody()->getSize()) {
+                $request = $request->withHeader('Content-Length', 0);
+            }
+
+            return $this->createResponse(
+                $request,
+                $options,
+                $this->createStream($request, $options),
+                $startTime
+            );
+        } catch (\InvalidArgumentException $e) {
+            throw $e;
+        } catch (\Exception $e) {
+            // Determine if the error was a networking error.
+            $message = $e->getMessage();
+            // This list can probably get more comprehensive.
+            if (strpos($message, 'getaddrinfo') // DNS lookup failed
+                || strpos($message, 'Connection refused')
+                || strpos($message, "couldn't connect to host") // error on HHVM
+            ) {
+                $e = new ConnectException($e->getMessage(), $request, $e);
+            }
+            $e = RequestException::wrapException($request, $e);
+            $this->invokeStats($options, $request, $startTime, null, $e);
+
+            return new RejectedPromise($e);
+        }
+    }
+
+    private function invokeStats(
+        array $options,
+        RequestInterface $request,
+        $startTime,
+        ResponseInterface $response = null,
+        $error = null
+    ) {
+        if (isset($options['on_stats'])) {
+            $stats = new TransferStats(
+                $request,
+                $response,
+                microtime(true) - $startTime,
+                $error,
+                []
+            );
+            call_user_func($options['on_stats'], $stats);
+        }
+    }
+
+    private function createResponse(
+        RequestInterface $request,
+        array $options,
+        $stream,
+        $startTime
+    ) {
+        $hdrs = $this->lastHeaders;
+        $this->lastHeaders = [];
+        $parts = explode(' ', array_shift($hdrs), 3);
+        $ver = explode('/', $parts[0])[1];
+        $status = $parts[1];
+        $reason = isset($parts[2]) ? $parts[2] : null;
+        $headers = \GuzzleHttp\headers_from_lines($hdrs);
+        list ($stream, $headers) = $this->checkDecode($options, $headers, $stream);
+        $stream = Psr7\stream_for($stream);
+        $sink = $this->createSink($stream, $options);
+        $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
+
+        if (isset($options['on_headers'])) {
+            try {
+                $options['on_headers']($response);
+            } catch (\Exception $e) {
+                $msg = 'An error was encountered during the on_headers event';
+                $ex = new RequestException($msg, $request, $response, $e);
+                return new RejectedPromise($ex);
+            }
+        }
+
+        if ($sink !== $stream) {
+            $this->drain($stream, $sink);
+        }
+
+        $this->invokeStats($options, $request, $startTime, $response, null);
+
+        return new FulfilledPromise($response);
+    }
+
+    private function createSink(StreamInterface $stream, array $options)
+    {
+        if (!empty($options['stream'])) {
+            return $stream;
+        }
+
+        $sink = isset($options['sink'])
+            ? $options['sink']
+            : fopen('php://temp', 'r+');
+
+        return is_string($sink)
+            ? new Psr7\Stream(Psr7\try_fopen($sink, 'r+'))
+            : Psr7\stream_for($sink);
+    }
+
+    private function checkDecode(array $options, array $headers, $stream)
+    {
+        // Automatically decode responses when instructed.
+        if (!empty($options['decode_content'])) {
+            $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
+            if (isset($normalizedKeys['content-encoding'])) {
+                $encoding = $headers[$normalizedKeys['content-encoding']];
+                if ($encoding[0] == 'gzip' || $encoding[0] == 'deflate') {
+                    $stream = new Psr7\InflateStream(
+                        Psr7\stream_for($stream)
+                    );
+                    // Remove content-encoding header
+                    unset($headers[$normalizedKeys['content-encoding']]);
+                    // Fix content-length header
+                    if (isset($normalizedKeys['content-length'])) {
+                        $length = (int) $stream->getSize();
+                        if ($length == 0) {
+                            unset($headers[$normalizedKeys['content-length']]);
+                        } else {
+                            $headers[$normalizedKeys['content-length']] = [$length];
+                        }
+                    }
+                }
+            }
+        }
+
+        return [$stream, $headers];
+    }
+
+    /**
+     * Drains the source stream into the "sink" client option.
+     *
+     * @param StreamInterface $source
+     * @param StreamInterface $sink
+     *
+     * @return StreamInterface
+     * @throws \RuntimeException when the sink option is invalid.
+     */
+    private function drain(StreamInterface $source, StreamInterface $sink)
+    {
+        Psr7\copy_to_stream($source, $sink);
+        $sink->seek(0);
+        $source->close();
+
+        return $sink;
+    }
+
+    /**
+     * Create a resource and check to ensure it was created successfully
+     *
+     * @param callable $callback Callable that returns stream resource
+     *
+     * @return resource
+     * @throws \RuntimeException on error
+     */
+    private function createResource(callable $callback)
+    {
+        $errors = null;
+        set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
+            $errors[] = [
+                'message' => $msg,
+                'file'    => $file,
+                'line'    => $line
+            ];
+            return true;
+        });
+
+        $resource = $callback();
+        restore_error_handler();
+
+        if (!$resource) {
+            $message = 'Error creating resource: ';
+            foreach ($errors as $err) {
+                foreach ($err as $key => $value) {
+                    $message .= "[$key] $value" . PHP_EOL;
+                }
+            }
+            throw new \RuntimeException(trim($message));
+        }
+
+        return $resource;
+    }
+
+    private function createStream(RequestInterface $request, array $options)
+    {
+        static $methods;
+        if (!$methods) {
+            $methods = array_flip(get_class_methods(__CLASS__));
+        }
+
+        // HTTP/1.1 streams using the PHP stream wrapper require a
+        // Connection: close header
+        if ($request->getProtocolVersion() == '1.1'
+            && !$request->hasHeader('Connection')
+        ) {
+            $request = $request->withHeader('Connection', 'close');
+        }
+
+        // Ensure SSL is verified by default
+        if (!isset($options['verify'])) {
+            $options['verify'] = true;
+        }
+
+        $params = [];
+        $context = $this->getDefaultContext($request, $options);
+
+        if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
+            throw new \InvalidArgumentException('on_headers must be callable');
+        }
+
+        if (!empty($options)) {
+            foreach ($options as $key => $value) {
+                $method = "add_{$key}";
+                if (isset($methods[$method])) {
+                    $this->{$method}($request, $context, $value, $params);
+                }
+            }
+        }
+
+        if (isset($options['stream_context'])) {
+            if (!is_array($options['stream_context'])) {
+                throw new \InvalidArgumentException('stream_context must be an array');
+            }
+            $context = array_replace_recursive(
+                $context,
+                $options['stream_context']
+            );
+        }
+
+        $context = $this->createResource(
+            function () use ($context, $params) {
+                return stream_context_create($context, $params);
+            }
+        );
+
+        return $this->createResource(
+            function () use ($request, &$http_response_header, $context) {
+                $resource = fopen($request->getUri(), 'r', null, $context);
+                $this->lastHeaders = $http_response_header;
+                return $resource;
+            }
+        );
+    }
+
+    private function getDefaultContext(RequestInterface $request)
+    {
+        $headers = '';
+        foreach ($request->getHeaders() as $name => $value) {
+            foreach ($value as $val) {
+                $headers .= "$name: $val\r\n";
+            }
+        }
+
+        $context = [
+            'http' => [
+                'method'           => $request->getMethod(),
+                'header'           => $headers,
+                'protocol_version' => $request->getProtocolVersion(),
+                'ignore_errors'    => true,
+                'follow_location'  => 0,
+            ],
+        ];
+
+        $body = (string) $request->getBody();
+
+        if (!empty($body)) {
+            $context['http']['content'] = $body;
+            // Prevent the HTTP handler from adding a Content-Type header.
+            if (!$request->hasHeader('Content-Type')) {
+                $context['http']['header'] .= "Content-Type:\r\n";
+            }
+        }
+
+        $context['http']['header'] = rtrim($context['http']['header']);
+
+        return $context;
+    }
+
+    private function add_proxy(RequestInterface $request, &$options, $value, &$params)
+    {
+        if (!is_array($value)) {
+            $options['http']['proxy'] = $value;
+        } else {
+            $scheme = $request->getUri()->getScheme();
+            if (isset($value[$scheme])) {
+                if (!isset($value['no'])
+                    || !\GuzzleHttp\is_host_in_noproxy(
+                        $request->getUri()->getHost(),
+                        $value['no']
+                    )
+                ) {
+                    $options['http']['proxy'] = $value[$scheme];
+                }
+            }
+        }
+    }
+
+    private function add_timeout(RequestInterface $request, &$options, $value, &$params)
+    {
+        $options['http']['timeout'] = $value;
+    }
+
+    private function add_verify(RequestInterface $request, &$options, $value, &$params)
+    {
+        if ($value === true) {
+            // PHP 5.6 or greater will find the system cert by default. When
+            // < 5.6, use the Guzzle bundled cacert.
+            if (PHP_VERSION_ID < 50600) {
+                $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
+            }
+        } elseif (is_string($value)) {
+            $options['ssl']['cafile'] = $value;
+            if (!file_exists($value)) {
+                throw new \RuntimeException("SSL CA bundle not found: $value");
+            }
+        } elseif ($value === false) {
+            $options['ssl']['verify_peer'] = false;
+            $options['ssl']['verify_peer_name'] = false;
+            return;
+        } else {
+            throw new \InvalidArgumentException('Invalid verify request option');
+        }
+
+        $options['ssl']['verify_peer'] = true;
+        $options['ssl']['verify_peer_name'] = true;
+        $options['ssl']['allow_self_signed'] = false;
+    }
+
+    private function add_cert(RequestInterface $request, &$options, $value, &$params)
+    {
+        if (is_array($value)) {
+            $options['ssl']['passphrase'] = $value[1];
+            $value = $value[0];
+        }
+
+        if (!file_exists($value)) {
+            throw new \RuntimeException("SSL certificate not found: {$value}");
+        }
+
+        $options['ssl']['local_cert'] = $value;
+    }
+
+    private function add_progress(RequestInterface $request, &$options, $value, &$params)
+    {
+        $this->addNotification(
+            $params,
+            function ($code, $a, $b, $c, $transferred, $total) use ($value) {
+                if ($code == STREAM_NOTIFY_PROGRESS) {
+                    $value($total, $transferred, null, null);
+                }
+            }
+        );
+    }
+
+    private function add_debug(RequestInterface $request, &$options, $value, &$params)
+    {
+        if ($value === false) {
+            return;
+        }
+
+        static $map = [
+            STREAM_NOTIFY_CONNECT       => 'CONNECT',
+            STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
+            STREAM_NOTIFY_AUTH_RESULT   => 'AUTH_RESULT',
+            STREAM_NOTIFY_MIME_TYPE_IS  => 'MIME_TYPE_IS',
+            STREAM_NOTIFY_FILE_SIZE_IS  => 'FILE_SIZE_IS',
+            STREAM_NOTIFY_REDIRECTED    => 'REDIRECTED',
+            STREAM_NOTIFY_PROGRESS      => 'PROGRESS',
+            STREAM_NOTIFY_FAILURE       => 'FAILURE',
+            STREAM_NOTIFY_COMPLETED     => 'COMPLETED',
+            STREAM_NOTIFY_RESOLVE       => 'RESOLVE',
+        ];
+        static $args = ['severity', 'message', 'message_code',
+            'bytes_transferred', 'bytes_max'];
+
+        $value = \GuzzleHttp\debug_resource($value);
+        $ident = $request->getMethod() . ' ' . $request->getUri();
+        $this->addNotification(
+            $params,
+            function () use ($ident, $value, $map, $args) {
+                $passed = func_get_args();
+                $code = array_shift($passed);
+                fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
+                foreach (array_filter($passed) as $i => $v) {
+                    fwrite($value, $args[$i] . ': "' . $v . '" ');
+                }
+                fwrite($value, "\n");
+            }
+        );
+    }
+
+    private function addNotification(array &$params, callable $notify)
+    {
+        // Wrap the existing function if needed.
+        if (!isset($params['notification'])) {
+            $params['notification'] = $notify;
+        } else {
+            $params['notification'] = $this->callArray([
+                $params['notification'],
+                $notify
+            ]);
+        }
+    }
+
+    private function callArray(array $functions)
+    {
+        return function () use ($functions) {
+            $args = func_get_args();
+            foreach ($functions as $fn) {
+                call_user_func_array($fn, $args);
+            }
+        };
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/HandlerStack.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/HandlerStack.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/HandlerStack.php	(revision 5534)
@@ -0,0 +1,273 @@
+<?php
+namespace GuzzleHttp;
+
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Creates a composed Guzzle handler function by stacking middlewares on top of
+ * an HTTP handler function.
+ */
+class HandlerStack
+{
+    /** @var callable */
+    private $handler;
+
+    /** @var array */
+    private $stack = [];
+
+    /** @var callable|null */
+    private $cached;
+
+    /**
+     * Creates a default handler stack that can be used by clients.
+     *
+     * The returned handler will wrap the provided handler or use the most
+     * appropriate default handler for you system. The returned HandlerStack has
+     * support for cookies, redirects, HTTP error exceptions, and preparing a body
+     * before sending.
+     *
+     * The returned handler stack can be passed to a client in the "handler"
+     * option.
+     *
+     * @param callable $handler HTTP handler function to use with the stack. If no
+     *                          handler is provided, the best handler for your
+     *                          system will be utilized.
+     *
+     * @return HandlerStack
+     */
+    public static function create(callable $handler = null)
+    {
+        $stack = new self($handler ?: choose_handler());
+        $stack->push(Middleware::httpErrors(), 'http_errors');
+        $stack->push(Middleware::redirect(), 'allow_redirects');
+        $stack->push(Middleware::cookies(), 'cookies');
+        $stack->push(Middleware::prepareBody(), 'prepare_body');
+
+        return $stack;
+    }
+
+    /**
+     * @param callable $handler Underlying HTTP handler.
+     */
+    public function __construct(callable $handler = null)
+    {
+        $this->handler = $handler;
+    }
+
+    /**
+     * Invokes the handler stack as a composed handler
+     *
+     * @param RequestInterface $request
+     * @param array            $options
+     */
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        $handler = $this->resolve();
+
+        return $handler($request, $options);
+    }
+
+    /**
+     * Dumps a string representation of the stack.
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        $depth = 0;
+        $stack = [];
+        if ($this->handler) {
+            $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
+        }
+
+        $result = '';
+        foreach (array_reverse($this->stack) as $tuple) {
+            $depth++;
+            $str = "{$depth}) Name: '{$tuple[1]}', ";
+            $str .= "Function: " . $this->debugCallable($tuple[0]);
+            $result = "> {$str}\n{$result}";
+            $stack[] = $str;
+        }
+
+        foreach (array_keys($stack) as $k) {
+            $result .= "< {$stack[$k]}\n";
+        }
+
+        return $result;
+    }
+
+    /**
+     * Set the HTTP handler that actually returns a promise.
+     *
+     * @param callable $handler Accepts a request and array of options and
+     *                          returns a Promise.
+     */
+    public function setHandler(callable $handler)
+    {
+        $this->handler = $handler;
+        $this->cached = null;
+    }
+
+    /**
+     * Returns true if the builder has a handler.
+     *
+     * @return bool
+     */
+    public function hasHandler()
+    {
+        return (bool) $this->handler;
+    }
+
+    /**
+     * Unshift a middleware to the bottom of the stack.
+     *
+     * @param callable $middleware Middleware function
+     * @param string   $name       Name to register for this middleware.
+     */
+    public function unshift(callable $middleware, $name = null)
+    {
+        array_unshift($this->stack, [$middleware, $name]);
+        $this->cached = null;
+    }
+
+    /**
+     * Push a middleware to the top of the stack.
+     *
+     * @param callable $middleware Middleware function
+     * @param string   $name       Name to register for this middleware.
+     */
+    public function push(callable $middleware, $name = '')
+    {
+        $this->stack[] = [$middleware, $name];
+        $this->cached = null;
+    }
+
+    /**
+     * Add a middleware before another middleware by name.
+     *
+     * @param string   $findName   Middleware to find
+     * @param callable $middleware Middleware function
+     * @param string   $withName   Name to register for this middleware.
+     */
+    public function before($findName, callable $middleware, $withName = '')
+    {
+        $this->splice($findName, $withName, $middleware, true);
+    }
+
+    /**
+     * Add a middleware after another middleware by name.
+     *
+     * @param string   $findName   Middleware to find
+     * @param callable $middleware Middleware function
+     * @param string   $withName   Name to register for this middleware.
+     */
+    public function after($findName, callable $middleware, $withName = '')
+    {
+        $this->splice($findName, $withName, $middleware, false);
+    }
+
+    /**
+     * Remove a middleware by instance or name from the stack.
+     *
+     * @param callable|string $remove Middleware to remove by instance or name.
+     */
+    public function remove($remove)
+    {
+        $this->cached = null;
+        $idx = is_callable($remove) ? 0 : 1;
+        $this->stack = array_values(array_filter(
+            $this->stack,
+            function ($tuple) use ($idx, $remove) {
+                return $tuple[$idx] !== $remove;
+            }
+        ));
+    }
+
+    /**
+     * Compose the middleware and handler into a single callable function.
+     *
+     * @return callable
+     */
+    public function resolve()
+    {
+        if (!$this->cached) {
+            if (!($prev = $this->handler)) {
+                throw new \LogicException('No handler has been specified');
+            }
+
+            foreach (array_reverse($this->stack) as $fn) {
+                $prev = $fn[0]($prev);
+            }
+
+            $this->cached = $prev;
+        }
+
+        return $this->cached;
+    }
+
+    /**
+     * @param $name
+     * @return int
+     */
+    private function findByName($name)
+    {
+        foreach ($this->stack as $k => $v) {
+            if ($v[1] === $name) {
+                return $k;
+            }
+        }
+
+        throw new \InvalidArgumentException("Middleware not found: $name");
+    }
+
+    /**
+     * Splices a function into the middleware list at a specific position.
+     *
+     * @param          $findName
+     * @param          $withName
+     * @param callable $middleware
+     * @param          $before
+     */
+    private function splice($findName, $withName, callable $middleware, $before)
+    {
+        $this->cached = null;
+        $idx = $this->findByName($findName);
+        $tuple = [$middleware, $withName];
+
+        if ($before) {
+            if ($idx === 0) {
+                array_unshift($this->stack, $tuple);
+            } else {
+                $replacement = [$tuple, $this->stack[$idx]];
+                array_splice($this->stack, $idx, 1, $replacement);
+            }
+        } elseif ($idx === count($this->stack) - 1) {
+            $this->stack[] = $tuple;
+        } else {
+            $replacement = [$this->stack[$idx], $tuple];
+            array_splice($this->stack, $idx, 1, $replacement);
+        }
+    }
+
+    /**
+     * Provides a debug string for a given callable.
+     *
+     * @param array|callable $fn Function to write as a string.
+     *
+     * @return string
+     */
+    private function debugCallable($fn)
+    {
+        if (is_string($fn)) {
+            return "callable({$fn})";
+        }
+
+        if (is_array($fn)) {
+            return is_string($fn[0])
+                ? "callable({$fn[0]}::{$fn[1]})"
+                : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])";
+        }
+
+        return 'callable(' . spl_object_hash($fn) . ')';
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/MessageFormatter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/MessageFormatter.php	(revision 5534)
@@ -0,0 +1,182 @@
+<?php
+namespace GuzzleHttp;
+
+use Psr\Http\Message\MessageInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Formats log messages using variable substitutions for requests, responses,
+ * and other transactional data.
+ *
+ * The following variable substitutions are supported:
+ *
+ * - {request}:        Full HTTP request message
+ * - {response}:       Full HTTP response message
+ * - {ts}:             ISO 8601 date in GMT
+ * - {date_iso_8601}   ISO 8601 date in GMT
+ * - {date_common_log} Apache common log date using the configured timezone.
+ * - {host}:           Host of the request
+ * - {method}:         Method of the request
+ * - {uri}:            URI of the request
+ * - {host}:           Host of the request
+ * - {version}:        Protocol version
+ * - {target}:         Request target of the request (path + query + fragment)
+ * - {hostname}:       Hostname of the machine that sent the request
+ * - {code}:           Status code of the response (if available)
+ * - {phrase}:         Reason phrase of the response  (if available)
+ * - {error}:          Any error messages (if available)
+ * - {req_header_*}:   Replace `*` with the lowercased name of a request header to add to the message
+ * - {res_header_*}:   Replace `*` with the lowercased name of a response header to add to the message
+ * - {req_headers}:    Request headers
+ * - {res_headers}:    Response headers
+ * - {req_body}:       Request body
+ * - {res_body}:       Response body
+ */
+class MessageFormatter
+{
+    /**
+     * Apache Common Log Format.
+     * @link http://httpd.apache.org/docs/2.4/logs.html#common
+     * @var string
+     */
+    const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
+    const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
+    const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
+
+    /** @var string Template used to format log messages */
+    private $template;
+
+    /**
+     * @param string $template Log message template
+     */
+    public function __construct($template = self::CLF)
+    {
+        $this->template = $template ?: self::CLF;
+    }
+
+    /**
+     * Returns a formatted message string.
+     *
+     * @param RequestInterface  $request  Request that was sent
+     * @param ResponseInterface $response Response that was received
+     * @param \Exception        $error    Exception that was received
+     *
+     * @return string
+     */
+    public function format(
+        RequestInterface $request,
+        ResponseInterface $response = null,
+        \Exception $error = null
+    ) {
+        $cache = [];
+
+        return preg_replace_callback(
+            '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
+            function (array $matches) use ($request, $response, $error, &$cache) {
+
+                if (isset($cache[$matches[1]])) {
+                    return $cache[$matches[1]];
+                }
+
+                $result = '';
+                switch ($matches[1]) {
+                    case 'request':
+                        $result = Psr7\str($request);
+                        break;
+                    case 'response':
+                        $result = $response ? Psr7\str($response) : '';
+                        break;
+                    case 'req_headers':
+                        $result = trim($request->getMethod()
+                                . ' ' . $request->getRequestTarget())
+                            . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
+                            . $this->headers($request);
+                        break;
+                    case 'res_headers':
+                        $result = $response ?
+                            sprintf(
+                                'HTTP/%s %d %s',
+                                $response->getProtocolVersion(),
+                                $response->getStatusCode(),
+                                $response->getReasonPhrase()
+                            ) . "\r\n" . $this->headers($response)
+                            : 'NULL';
+                        break;
+                    case 'req_body':
+                        $result = $request->getBody();
+                        break;
+                    case 'res_body':
+                        $result = $response ? $response->getBody() : 'NULL';
+                        break;
+                    case 'ts':
+                    case 'date_iso_8601':
+                        $result = gmdate('c');
+                        break;
+                    case 'date_common_log':
+                        $result = date('d/M/Y:H:i:s O');
+                        break;
+                    case 'method':
+                        $result = $request->getMethod();
+                        break;
+                    case 'version':
+                        $result = $request->getProtocolVersion();
+                        break;
+                    case 'uri':
+                    case 'url':
+                        $result = $request->getUri();
+                        break;
+                    case 'target':
+                        $result = $request->getRequestTarget();
+                        break;
+                    case 'req_version':
+                        $result = $request->getProtocolVersion();
+                        break;
+                    case 'res_version':
+                        $result = $response
+                            ? $response->getProtocolVersion()
+                            : 'NULL';
+                        break;
+                    case 'host':
+                        $result = $request->getHeaderLine('Host');
+                        break;
+                    case 'hostname':
+                        $result = gethostname();
+                        break;
+                    case 'code':
+                        $result = $response ? $response->getStatusCode() : 'NULL';
+                        break;
+                    case 'phrase':
+                        $result = $response ? $response->getReasonPhrase() : 'NULL';
+                        break;
+                    case 'error':
+                        $result = $error ? $error->getMessage() : 'NULL';
+                        break;
+                    default:
+                        // handle prefixed dynamic headers
+                        if (strpos($matches[1], 'req_header_') === 0) {
+                            $result = $request->getHeaderLine(substr($matches[1], 11));
+                        } elseif (strpos($matches[1], 'res_header_') === 0) {
+                            $result = $response
+                                ? $response->getHeaderLine(substr($matches[1], 11))
+                                : 'NULL';
+                        }
+                }
+
+                $cache[$matches[1]] = $result;
+                return $result;
+            },
+            $this->template
+        );
+    }
+
+    private function headers(MessageInterface $message)
+    {
+        $result = '';
+        foreach ($message->getHeaders() as $name => $values) {
+            $result .= $name . ': ' . implode(', ', $values) . "\r\n";
+        }
+
+        return trim($result);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Middleware.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Middleware.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Middleware.php	(revision 5534)
@@ -0,0 +1,249 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Cookie\CookieJarInterface;
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+
+/**
+ * Functions used to create and wrap handlers with handler middleware.
+ */
+final class Middleware
+{
+    /**
+     * Middleware that adds cookies to requests.
+     *
+     * The options array must be set to a CookieJarInterface in order to use
+     * cookies. This is typically handled for you by a client.
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function cookies()
+    {
+        return function (callable $handler) {
+            return function ($request, array $options) use ($handler) {
+                if (empty($options['cookies'])) {
+                    return $handler($request, $options);
+                } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
+                    throw new \InvalidArgumentException('cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface');
+                }
+                $cookieJar = $options['cookies'];
+                $request = $cookieJar->withCookieHeader($request);
+                return $handler($request, $options)
+                    ->then(function ($response) use ($cookieJar, $request) {
+                        $cookieJar->extractCookies($request, $response);
+                        return $response;
+                    }
+                );
+            };
+        };
+    }
+
+    /**
+     * Middleware that throws exceptions for 4xx or 5xx responses when the
+     * "http_error" request option is set to true.
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function httpErrors()
+    {
+        return function (callable $handler) {
+            return function ($request, array $options) use ($handler) {
+                if (empty($options['http_errors'])) {
+                    return $handler($request, $options);
+                }
+                return $handler($request, $options)->then(
+                    function (ResponseInterface $response) use ($request, $handler) {
+                        $code = $response->getStatusCode();
+                        if ($code < 400) {
+                            return $response;
+                        }
+                        throw RequestException::create($request, $response);
+                    }
+                );
+            };
+        };
+    }
+
+    /**
+     * Middleware that pushes history data to an ArrayAccess container.
+     *
+     * @param array $container Container to hold the history (by reference).
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function history(array &$container)
+    {
+        return function (callable $handler) use (&$container) {
+            return function ($request, array $options) use ($handler, &$container) {
+                return $handler($request, $options)->then(
+                    function ($value) use ($request, &$container, $options) {
+                        $container[] = [
+                            'request'  => $request,
+                            'response' => $value,
+                            'error'    => null,
+                            'options'  => $options
+                        ];
+                        return $value;
+                    },
+                    function ($reason) use ($request, &$container, $options) {
+                        $container[] = [
+                            'request'  => $request,
+                            'response' => null,
+                            'error'    => $reason,
+                            'options'  => $options
+                        ];
+                        return new RejectedPromise($reason);
+                    }
+                );
+            };
+        };
+    }
+
+    /**
+     * Middleware that invokes a callback before and after sending a request.
+     *
+     * The provided listener cannot modify or alter the response. It simply
+     * "taps" into the chain to be notified before returning the promise. The
+     * before listener accepts a request and options array, and the after
+     * listener accepts a request, options array, and response promise.
+     *
+     * @param callable $before Function to invoke before forwarding the request.
+     * @param callable $after  Function invoked after forwarding.
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function tap(callable $before = null, callable $after = null)
+    {
+        return function (callable $handler) use ($before, $after) {
+            return function ($request, array $options) use ($handler, $before, $after) {
+                if ($before) {
+                    $before($request, $options);
+                }
+                $response = $handler($request, $options);
+                if ($after) {
+                    $after($request, $options, $response);
+                }
+                return $response;
+            };
+        };
+    }
+
+    /**
+     * Middleware that handles request redirects.
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function redirect()
+    {
+        return function (callable $handler) {
+            return new RedirectMiddleware($handler);
+        };
+    }
+
+    /**
+     * Middleware that retries requests based on the boolean result of
+     * invoking the provided "decider" function.
+     *
+     * If no delay function is provided, a simple implementation of exponential
+     * backoff will be utilized.
+     *
+     * @param callable $decider Function that accepts the number of retries,
+     *                          a request, [response], and [exception] and
+     *                          returns true if the request is to be retried.
+     * @param callable $delay   Function that accepts the number of retries and
+     *                          returns the number of milliseconds to delay.
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function retry(callable $decider, callable $delay = null)
+    {
+        return function (callable $handler) use ($decider, $delay) {
+            return new RetryMiddleware($decider, $handler, $delay);
+        };
+    }
+
+    /**
+     * Middleware that logs requests, responses, and errors using a message
+     * formatter.
+     *
+     * @param LoggerInterface  $logger Logs messages.
+     * @param MessageFormatter $formatter Formatter used to create message strings.
+     * @param string           $logLevel Level at which to log requests.
+     *
+     * @return callable Returns a function that accepts the next handler.
+     */
+    public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO)
+    {
+        return function (callable $handler) use ($logger, $formatter, $logLevel) {
+            return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
+                return $handler($request, $options)->then(
+                    function ($response) use ($logger, $request, $formatter, $logLevel) {
+                        $message = $formatter->format($request, $response);
+                        $logger->log($logLevel, $message);
+                        return $response;
+                    },
+                    function ($reason) use ($logger, $request, $formatter) {
+                        $response = $reason instanceof RequestException
+                            ? $reason->getResponse()
+                            : null;
+                        $message = $formatter->format($request, $response, $reason);
+                        $logger->notice($message);
+                        return \GuzzleHttp\Promise\rejection_for($reason);
+                    }
+                );
+            };
+        };
+    }
+
+    /**
+     * This middleware adds a default content-type if possible, a default
+     * content-length or transfer-encoding header, and the expect header.
+     *
+     * @return callable
+     */
+    public static function prepareBody()
+    {
+        return function (callable $handler) {
+            return new PrepareBodyMiddleware($handler);
+        };
+    }
+
+    /**
+     * Middleware that applies a map function to the request before passing to
+     * the next handler.
+     *
+     * @param callable $fn Function that accepts a RequestInterface and returns
+     *                     a RequestInterface.
+     * @return callable
+     */
+    public static function mapRequest(callable $fn)
+    {
+        return function (callable $handler) use ($fn) {
+            return function ($request, array $options) use ($handler, $fn) {
+                return $handler($fn($request), $options);
+            };
+        };
+    }
+
+    /**
+     * Middleware that applies a map function to the resolved promise's
+     * response.
+     *
+     * @param callable $fn Function that accepts a ResponseInterface and
+     *                     returns a ResponseInterface.
+     * @return callable
+     */
+    public static function mapResponse(callable $fn)
+    {
+        return function (callable $handler) use ($fn) {
+            return function ($request, array $options) use ($handler, $fn) {
+                return $handler($request, $options)->then($fn);
+            };
+        };
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Pool.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Pool.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/Pool.php	(revision 5534)
@@ -0,0 +1,123 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise\PromisorInterface;
+use Psr\Http\Message\RequestInterface;
+use GuzzleHttp\Promise\EachPromise;
+
+/**
+ * Sends and iterator of requests concurrently using a capped pool size.
+ *
+ * The pool will read from an iterator until it is cancelled or until the
+ * iterator is consumed. When a request is yielded, the request is sent after
+ * applying the "request_options" request options (if provided in the ctor).
+ *
+ * When a function is yielded by the iterator, the function is provided the
+ * "request_options" array that should be merged on top of any existing
+ * options, and the function MUST then return a wait-able promise.
+ */
+class Pool implements PromisorInterface
+{
+    /** @var EachPromise */
+    private $each;
+
+    /**
+     * @param ClientInterface $client   Client used to send the requests.
+     * @param array|\Iterator $requests Requests or functions that return
+     *                                  requests to send concurrently.
+     * @param array           $config   Associative array of options
+     *     - concurrency: (int) Maximum number of requests to send concurrently
+     *     - options: Array of request options to apply to each request.
+     *     - fulfilled: (callable) Function to invoke when a request completes.
+     *     - rejected: (callable) Function to invoke when a request is rejected.
+     */
+    public function __construct(
+        ClientInterface $client,
+        $requests,
+        array $config = []
+    ) {
+        // Backwards compatibility.
+        if (isset($config['pool_size'])) {
+            $config['concurrency'] = $config['pool_size'];
+        } elseif (!isset($config['concurrency'])) {
+            $config['concurrency'] = 25;
+        }
+
+        if (isset($config['options'])) {
+            $opts = $config['options'];
+            unset($config['options']);
+        } else {
+            $opts = [];
+        }
+
+        $iterable = \GuzzleHttp\Promise\iter_for($requests);
+        $requests = function () use ($iterable, $client, $opts) {
+            foreach ($iterable as $key => $rfn) {
+                if ($rfn instanceof RequestInterface) {
+                    yield $key => $client->sendAsync($rfn, $opts);
+                } elseif (is_callable($rfn)) {
+                    yield $key => $rfn($opts);
+                } else {
+                    throw new \InvalidArgumentException('Each value yielded by '
+                        . 'the iterator must be a Psr7\Http\Message\RequestInterface '
+                        . 'or a callable that returns a promise that fulfills '
+                        . 'with a Psr7\Message\Http\ResponseInterface object.');
+                }
+            }
+        };
+
+        $this->each = new EachPromise($requests(), $config);
+    }
+
+    public function promise()
+    {
+        return $this->each->promise();
+    }
+
+    /**
+     * Sends multiple requests concurrently and returns an array of responses
+     * and exceptions that uses the same ordering as the provided requests.
+     *
+     * IMPORTANT: This method keeps every request and response in memory, and
+     * as such, is NOT recommended when sending a large number or an
+     * indeterminate number of requests concurrently.
+     *
+     * @param ClientInterface $client   Client used to send the requests
+     * @param array|\Iterator $requests Requests to send concurrently.
+     * @param array           $options  Passes through the options available in
+     *                                  {@see GuzzleHttp\Pool::__construct}
+     *
+     * @return array Returns an array containing the response or an exception
+     *               in the same order that the requests were sent.
+     * @throws \InvalidArgumentException if the event format is incorrect.
+     */
+    public static function batch(
+        ClientInterface $client,
+        $requests,
+        array $options = []
+    ) {
+        $res = [];
+        self::cmpCallback($options, 'fulfilled', $res);
+        self::cmpCallback($options, 'rejected', $res);
+        $pool = new static($client, $requests, $options);
+        $pool->promise()->wait();
+        ksort($res);
+
+        return $res;
+    }
+
+    private static function cmpCallback(array &$options, $name, array &$results)
+    {
+        if (!isset($options[$name])) {
+            $options[$name] = function ($v, $k) use (&$results) {
+                $results[$k] = $v;
+            };
+        } else {
+            $currentFn = $options[$name];
+            $options[$name] = function ($v, $k) use (&$results, $currentFn) {
+                $currentFn($v, $k);
+                $results[$k] = $v;
+            };
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php	(revision 5534)
@@ -0,0 +1,112 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Prepares requests that contain a body, adding the Content-Length,
+ * Content-Type, and Expect headers.
+ */
+class PrepareBodyMiddleware
+{
+    /** @var callable  */
+    private $nextHandler;
+
+    /** @var array */
+    private static $skipMethods = ['GET' => true, 'HEAD' => true];
+
+    /**
+     * @param callable $nextHandler Next handler to invoke.
+     */
+    public function __construct(callable $nextHandler)
+    {
+        $this->nextHandler = $nextHandler;
+    }
+
+    /**
+     * @param RequestInterface $request
+     * @param array            $options
+     *
+     * @return PromiseInterface
+     */
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        $fn = $this->nextHandler;
+
+        // Don't do anything if the request has no body.
+        if (isset(self::$skipMethods[$request->getMethod()])
+            || $request->getBody()->getSize() === 0
+        ) {
+            return $fn($request, $options);
+        }
+
+        $modify = [];
+
+        // Add a default content-type if possible.
+        if (!$request->hasHeader('Content-Type')) {
+            if ($uri = $request->getBody()->getMetadata('uri')) {
+                if ($type = Psr7\mimetype_from_filename($uri)) {
+                    $modify['set_headers']['Content-Type'] = $type;
+                }
+            }
+        }
+
+        // Add a default content-length or transfer-encoding header.
+        if (!isset(self::$skipMethods[$request->getMethod()])
+            && !$request->hasHeader('Content-Length')
+            && !$request->hasHeader('Transfer-Encoding')
+        ) {
+            $size = $request->getBody()->getSize();
+            if ($size !== null) {
+                $modify['set_headers']['Content-Length'] = $size;
+            } else {
+                $modify['set_headers']['Transfer-Encoding'] = 'chunked';
+            }
+        }
+
+        // Add the expect header if needed.
+        $this->addExpectHeader($request, $options, $modify);
+
+        return $fn(Psr7\modify_request($request, $modify), $options);
+    }
+
+    private function addExpectHeader(
+        RequestInterface $request,
+        array $options,
+        array &$modify
+    ) {
+        // Determine if the Expect header should be used
+        if ($request->hasHeader('Expect')) {
+            return;
+        }
+
+        $expect = isset($options['expect']) ? $options['expect'] : null;
+
+        // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
+        if ($expect === false || $request->getProtocolVersion() < 1.1) {
+            return;
+        }
+
+        // The expect header is unconditionally enabled
+        if ($expect === true) {
+            $modify['set_headers']['Expect'] = '100-Continue';
+            return;
+        }
+
+        // By default, send the expect header when the payload is > 1mb
+        if ($expect === null) {
+            $expect = 1048576;
+        }
+
+        // Always add if the body cannot be rewound, the size cannot be
+        // determined, or the size is greater than the cutoff threshold
+        $body = $request->getBody();
+        $size = $body->getSize();
+
+        if ($size === null || $size >= (int) $expect || !$body->isSeekable()) {
+            $modify['set_headers']['Expect'] = '100-Continue';
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php	(revision 5534)
@@ -0,0 +1,231 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Exception\BadResponseException;
+use GuzzleHttp\Exception\TooManyRedirectsException;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Request redirect middleware.
+ *
+ * Apply this middleware like other middleware using
+ * {@see GuzzleHttp\Middleware::redirect()}.
+ */
+class RedirectMiddleware
+{
+    const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
+
+    public static $defaultSettings = [
+        'max'             => 5,
+        'protocols'       => ['http', 'https'],
+        'strict'          => false,
+        'referer'         => false,
+        'track_redirects' => false,
+    ];
+
+    /** @var callable  */
+    private $nextHandler;
+
+    /**
+     * @param callable $nextHandler Next handler to invoke.
+     */
+    public function __construct(callable $nextHandler)
+    {
+        $this->nextHandler = $nextHandler;
+    }
+
+    /**
+     * @param RequestInterface $request
+     * @param array            $options
+     *
+     * @return PromiseInterface
+     */
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        $fn = $this->nextHandler;
+
+        if (empty($options['allow_redirects'])) {
+            return $fn($request, $options);
+        }
+
+        if ($options['allow_redirects'] === true) {
+            $options['allow_redirects'] = self::$defaultSettings;
+        } elseif (!is_array($options['allow_redirects'])) {
+            throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
+        } else {
+            // Merge the default settings with the provided settings
+            $options['allow_redirects'] += self::$defaultSettings;
+        }
+
+        if (empty($options['allow_redirects']['max'])) {
+            return $fn($request, $options);
+        }
+
+        return $fn($request, $options)
+            ->then(function (ResponseInterface $response) use ($request, $options) {
+                return $this->checkRedirect($request, $options, $response);
+            });
+    }
+
+    /**
+     * @param RequestInterface  $request
+     * @param array             $options
+     * @param ResponseInterface|PromiseInterface $response
+     *
+     * @return ResponseInterface|PromiseInterface
+     */
+    public function checkRedirect(
+        RequestInterface $request,
+        array $options,
+        ResponseInterface $response
+    ) {
+        if (substr($response->getStatusCode(), 0, 1) != '3'
+            || !$response->hasHeader('Location')
+        ) {
+            return $response;
+        }
+
+        $this->guardMax($request, $options);
+        $nextRequest = $this->modifyRequest($request, $options, $response);
+
+        if (isset($options['allow_redirects']['on_redirect'])) {
+            call_user_func(
+                $options['allow_redirects']['on_redirect'],
+                $request,
+                $response,
+                $nextRequest->getUri()
+            );
+        }
+
+        /** @var PromiseInterface|ResponseInterface $promise */
+        $promise = $this($nextRequest, $options);
+
+        // Add headers to be able to track history of redirects.
+        if (!empty($options['allow_redirects']['track_redirects'])) {
+            return $this->withTracking(
+                $promise,
+                (string) $nextRequest->getUri()
+            );
+        }
+
+        return $promise;
+    }
+
+    private function withTracking(PromiseInterface $promise, $uri)
+    {
+        return $promise->then(
+            function (ResponseInterface $response) use ($uri) {
+                // Note that we are pushing to the front of the list as this
+                // would be an earlier response than what is currently present
+                // in the history header.
+                $header = $response->getHeader(self::HISTORY_HEADER);
+                array_unshift($header, $uri);
+                return $response->withHeader(self::HISTORY_HEADER, $header);
+            }
+        );
+    }
+
+    private function guardMax(RequestInterface $request, array &$options)
+    {
+        $current = isset($options['__redirect_count'])
+            ? $options['__redirect_count']
+            : 0;
+        $options['__redirect_count'] = $current + 1;
+        $max = $options['allow_redirects']['max'];
+
+        if ($options['__redirect_count'] > $max) {
+            throw new TooManyRedirectsException(
+                "Will not follow more than {$max} redirects",
+                $request
+            );
+        }
+    }
+
+    /**
+     * @param RequestInterface  $request
+     * @param array             $options
+     * @param ResponseInterface $response
+     *
+     * @return RequestInterface
+     */
+    public function modifyRequest(
+        RequestInterface $request,
+        array $options,
+        ResponseInterface $response
+    ) {
+        // Request modifications to apply.
+        $modify = [];
+        $protocols = $options['allow_redirects']['protocols'];
+
+        // Use a GET request if this is an entity enclosing request and we are
+        // not forcing RFC compliance, but rather emulating what all browsers
+        // would do.
+        $statusCode = $response->getStatusCode();
+        if ($statusCode == 303 ||
+            ($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict'])
+        ) {
+            $modify['method'] = 'GET';
+            $modify['body'] = '';
+        }
+
+        $modify['uri'] = $this->redirectUri($request, $response, $protocols);
+        Psr7\rewind_body($request);
+
+        // Add the Referer header if it is told to do so and only
+        // add the header if we are not redirecting from https to http.
+        if ($options['allow_redirects']['referer']
+            && $modify['uri']->getScheme() === $request->getUri()->getScheme()
+        ) {
+            $uri = $request->getUri()->withUserInfo('', '');
+            $modify['set_headers']['Referer'] = (string) $uri;
+        } else {
+            $modify['remove_headers'][] = 'Referer';
+        }
+
+        // Remove Authorization header if host is different.
+        if ($request->getUri()->getHost() !== $modify['uri']->getHost()) {
+            $modify['remove_headers'][] = 'Authorization';
+        }
+
+        return Psr7\modify_request($request, $modify);
+    }
+
+    /**
+     * Set the appropriate URL on the request based on the location header
+     *
+     * @param RequestInterface  $request
+     * @param ResponseInterface $response
+     * @param array             $protocols
+     *
+     * @return UriInterface
+     */
+    private function redirectUri(
+        RequestInterface $request,
+        ResponseInterface $response,
+        array $protocols
+    ) {
+        $location = Psr7\Uri::resolve(
+            $request->getUri(),
+            $response->getHeaderLine('Location')
+        );
+
+        // Ensure that the redirect URI is allowed based on the protocols.
+        if (!in_array($location->getScheme(), $protocols)) {
+            throw new BadResponseException(
+                sprintf(
+                    'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
+                    $location,
+                    implode(', ', $protocols)
+                ),
+                $request,
+                $response
+            );
+        }
+
+        return $location;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RequestOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RequestOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RequestOptions.php	(revision 5534)
@@ -0,0 +1,244 @@
+<?php
+namespace GuzzleHttp;
+
+/**
+ * This class contains a list of built-in Guzzle request options.
+ *
+ * More documentation for each option can be found at http://guzzlephp.org/.
+ *
+ * @link http://docs.guzzlephp.org/en/v6/request-options.html
+ */
+final class RequestOptions
+{
+    /**
+     * allow_redirects: (bool|array) Controls redirect behavior. Pass false
+     * to disable redirects, pass true to enable redirects, pass an
+     * associative to provide custom redirect settings. Defaults to "false".
+     * This option only works if your handler has the RedirectMiddleware. When
+     * passing an associative array, you can provide the following key value
+     * pairs:
+     *
+     * - max: (int, default=5) maximum number of allowed redirects.
+     * - strict: (bool, default=false) Set to true to use strict redirects
+     *   meaning redirect POST requests with POST requests vs. doing what most
+     *   browsers do which is redirect POST requests with GET requests
+     * - referer: (bool, default=true) Set to false to disable the Referer
+     *   header.
+     * - protocols: (array, default=['http', 'https']) Allowed redirect
+     *   protocols.
+     * - on_redirect: (callable) PHP callable that is invoked when a redirect
+     *   is encountered. The callable is invoked with the request, the redirect
+     *   response that was received, and the effective URI. Any return value
+     *   from the on_redirect function is ignored.
+     */
+    const ALLOW_REDIRECTS = 'allow_redirects';
+
+    /**
+     * auth: (array) Pass an array of HTTP authentication parameters to use
+     * with the request. The array must contain the username in index [0],
+     * the password in index [1], and you can optionally provide a built-in
+     * authentication type in index [2]. Pass null to disable authentication
+     * for a request.
+     */
+    const AUTH = 'auth';
+
+    /**
+     * body: (string|null|callable|iterator|object) Body to send in the
+     * request.
+     */
+    const BODY = 'body';
+
+    /**
+     * cert: (string|array) Set to a string to specify the path to a file
+     * containing a PEM formatted SSL client side certificate. If a password
+     * is required, then set cert to an array containing the path to the PEM
+     * file in the first array element followed by the certificate password
+     * in the second array element.
+     */
+    const CERT = 'cert';
+
+    /**
+     * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
+     * Specifies whether or not cookies are used in a request or what cookie
+     * jar to use or what cookies to send. This option only works if your
+     * handler has the `cookie` middleware. Valid values are `false` and
+     * an instance of {@see GuzzleHttp\Cookie\CookieJarInterface}.
+     */
+    const COOKIES = 'cookies';
+
+    /**
+     * connect_timeout: (float, default=0) Float describing the number of
+     * seconds to wait while trying to connect to a server. Use 0 to wait
+     * indefinitely (the default behavior).
+     */
+    const CONNECT_TIMEOUT = 'connect_timeout';
+
+    /**
+     * debug: (bool|resource) Set to true or set to a PHP stream returned by
+     * fopen()  enable debug output with the HTTP handler used to send a
+     * request.
+     */
+    const DEBUG = 'debug';
+
+    /**
+     * decode_content: (bool, default=true) Specify whether or not
+     * Content-Encoding responses (gzip, deflate, etc.) are automatically
+     * decoded.
+     */
+    const DECODE_CONTENT = 'decode_content';
+
+    /**
+     * delay: (int) The amount of time to delay before sending in milliseconds.
+     */
+    const DELAY = 'delay';
+
+    /**
+     * expect: (bool|integer) Controls the behavior of the
+     * "Expect: 100-Continue" header.
+     *
+     * Set to `true` to enable the "Expect: 100-Continue" header for all
+     * requests that sends a body. Set to `false` to disable the
+     * "Expect: 100-Continue" header for all requests. Set to a number so that
+     * the size of the payload must be greater than the number in order to send
+     * the Expect header. Setting to a number will send the Expect header for
+     * all requests in which the size of the payload cannot be determined or
+     * where the body is not rewindable.
+     *
+     * By default, Guzzle will add the "Expect: 100-Continue" header when the
+     * size of the body of a request is greater than 1 MB and a request is
+     * using HTTP/1.1.
+     */
+    const EXPECT = 'expect';
+
+    /**
+     * form_params: (array) Associative array of form field names to values
+     * where each value is a string or array of strings. Sets the Content-Type
+     * header to application/x-www-form-urlencoded when no Content-Type header
+     * is already present.
+     */
+    const FORM_PARAMS = 'form_params';
+
+    /**
+     * headers: (array) Associative array of HTTP headers. Each value MUST be
+     * a string or array of strings.
+     */
+    const HEADERS = 'headers';
+
+    /**
+     * http_errors: (bool, default=true) Set to false to disable exceptions
+     * when a non- successful HTTP response is received. By default,
+     * exceptions will be thrown for 4xx and 5xx responses. This option only
+     * works if your handler has the `httpErrors` middleware.
+     */
+    const HTTP_ERRORS = 'http_errors';
+
+    /**
+     * json: (mixed) Adds JSON data to a request. The provided value is JSON
+     * encoded and a Content-Type header of application/json will be added to
+     * the request if no Content-Type header is already present.
+     */
+    const JSON = 'json';
+
+    /**
+     * multipart: (array) Array of associative arrays, each containing a
+     * required "name" key mapping to the form field, name, a required
+     * "contents" key mapping to a StreamInterface|resource|string, an
+     * optional "headers" associative array of custom headers, and an
+     * optional "filename" key mapping to a string to send as the filename in
+     * the part. If no "filename" key is present, then no "filename" attribute
+     * will be added to the part.
+     */
+    const MULTIPART = 'multipart';
+
+    /**
+     * on_headers: (callable) A callable that is invoked when the HTTP headers
+     * of the response have been received but the body has not yet begun to
+     * download.
+     */
+    const ON_HEADERS = 'on_headers';
+
+    /**
+     * on_stats: (callable) allows you to get access to transfer statistics of
+     * a request and access the lower level transfer details of the handler
+     * associated with your client. ``on_stats`` is a callable that is invoked
+     * when a handler has finished sending a request. The callback is invoked
+     * with transfer statistics about the request, the response received, or
+     * the error encountered. Included in the data is the total amount of time
+     * taken to send the request.
+     */
+    const ON_STATS = 'on_stats';
+
+    /**
+     * progress: (callable) Defines a function to invoke when transfer
+     * progress is made. The function accepts the following positional
+     * arguments: the total number of bytes expected to be downloaded, the
+     * number of bytes downloaded so far, the number of bytes expected to be
+     * uploaded, the number of bytes uploaded so far.
+     */
+    const PROGRESS = 'progress';
+
+    /**
+     * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
+     * array to specify different proxies for different protocols (where the
+     * key is the protocol and the value is a proxy string).
+     */
+    const PROXY = 'proxy';
+
+    /**
+     * query: (array|string) Associative array of query string values to add
+     * to the request. This option uses PHP's http_build_query() to create
+     * the string representation. Pass a string value if you need more
+     * control than what this method provides
+     */
+    const QUERY = 'query';
+
+    /**
+     * sink: (resource|string|StreamInterface) Where the data of the
+     * response is written to. Defaults to a PHP temp stream. Providing a
+     * string will write data to a file by the given name.
+     */
+    const SINK = 'sink';
+
+    /**
+     * synchronous: (bool) Set to true to inform HTTP handlers that you intend
+     * on waiting on the response. This can be useful for optimizations. Note
+     * that a promise is still returned if you are using one of the async
+     * client methods.
+     */
+    const SYNCHRONOUS = 'synchronous';
+
+    /**
+     * ssl_key: (array|string) Specify the path to a file containing a private
+     * SSL key in PEM format. If a password is required, then set to an array
+     * containing the path to the SSL key in the first array element followed
+     * by the password required for the certificate in the second element.
+     */
+    const SSL_KEY = 'ssl_key';
+
+    /**
+     * stream: Set to true to attempt to stream a response rather than
+     * download it all up-front.
+     */
+    const STREAM = 'stream';
+
+    /**
+     * verify: (bool|string, default=true) Describes the SSL certificate
+     * verification behavior of a request. Set to true to enable SSL
+     * certificate verification using the system CA bundle when available
+     * (the default). Set to false to disable certificate verification (this
+     * is insecure!). Set to a string to provide the path to a CA bundle on
+     * disk to enable verification using a custom certificate.
+     */
+    const VERIFY = 'verify';
+
+    /**
+     * timeout: (float, default=0) Float describing the timeout of the
+     * request in seconds. Use 0 to wait indefinitely (the default behavior).
+     */
+    const TIMEOUT = 'timeout';
+
+    /**
+     * version: (float) Specifies the HTTP protocol version to attempt to use.
+     */
+    const VERSION = 'version';
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php	(revision 5534)
@@ -0,0 +1,111 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\Psr7;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Middleware that retries requests based on the boolean result of
+ * invoking the provided "decider" function.
+ */
+class RetryMiddleware
+{
+    /** @var callable  */
+    private $nextHandler;
+
+    /** @var callable */
+    private $decider;
+
+    /**
+     * @param callable $decider     Function that accepts the number of retries,
+     *                              a request, [response], and [exception] and
+     *                              returns true if the request is to be
+     *                              retried.
+     * @param callable $nextHandler Next handler to invoke.
+     * @param callable $delay       Function that accepts the number of retries
+     *                              and returns the number of milliseconds to
+     *                              delay.
+     */
+    public function __construct(
+        callable $decider,
+        callable $nextHandler,
+        callable $delay = null
+    ) {
+        $this->decider = $decider;
+        $this->nextHandler = $nextHandler;
+        $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
+    }
+
+    /**
+     * Default exponential backoff delay function.
+     *
+     * @param $retries
+     *
+     * @return int
+     */
+    public static function exponentialDelay($retries)
+    {
+        return (int) pow(2, $retries - 1);
+    }
+
+    /**
+     * @param RequestInterface $request
+     * @param array            $options
+     *
+     * @return PromiseInterface
+     */
+    public function __invoke(RequestInterface $request, array $options)
+    {
+        if (!isset($options['retries'])) {
+            $options['retries'] = 0;
+        }
+
+        $fn = $this->nextHandler;
+        return $fn($request, $options)
+            ->then(
+                $this->onFulfilled($request, $options),
+                $this->onRejected($request, $options)
+            );
+    }
+
+    private function onFulfilled(RequestInterface $req, array $options)
+    {
+        return function ($value) use ($req, $options) {
+            if (!call_user_func(
+                $this->decider,
+                $options['retries'],
+                $req,
+                $value,
+                null
+            )) {
+                return $value;
+            }
+            return $this->doRetry($req, $options);
+        };
+    }
+
+    private function onRejected(RequestInterface $req, array $options)
+    {
+        return function ($reason) use ($req, $options) {
+            if (!call_user_func(
+                $this->decider,
+                $options['retries'],
+                $req,
+                null,
+                $reason
+            )) {
+                return new RejectedPromise($reason);
+            }
+            return $this->doRetry($req, $options);
+        };
+    }
+
+    private function doRetry(RequestInterface $request, array $options)
+    {
+        $options['delay'] = call_user_func($this->delay, ++$options['retries']);
+
+        return $this($request, $options);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/TransferStats.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/TransferStats.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/TransferStats.php	(revision 5534)
@@ -0,0 +1,126 @@
+<?php
+namespace GuzzleHttp;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Represents data at the point after it was transferred either successfully
+ * or after a network error.
+ */
+final class TransferStats
+{
+    private $request;
+    private $response;
+    private $transferTime;
+    private $handlerStats;
+    private $handlerErrorData;
+
+    /**
+     * @param RequestInterface  $request          Request that was sent.
+     * @param ResponseInterface $response         Response received (if any)
+     * @param null              $transferTime     Total handler transfer time.
+     * @param mixed             $handlerErrorData Handler error data.
+     * @param array             $handlerStats     Handler specific stats.
+     */
+    public function __construct(
+        RequestInterface $request,
+        ResponseInterface $response = null,
+        $transferTime = null,
+        $handlerErrorData = null,
+        $handlerStats = []
+    ) {
+        $this->request = $request;
+        $this->response = $response;
+        $this->transferTime = $transferTime;
+        $this->handlerErrorData = $handlerErrorData;
+        $this->handlerStats = $handlerStats;
+    }
+
+    /**
+     * @return RequestInterface
+     */
+    public function getRequest()
+    {
+        return $this->request;
+    }
+
+    /**
+     * Returns the response that was received (if any).
+     *
+     * @return ResponseInterface|null
+     */
+    public function getResponse()
+    {
+        return $this->response;
+    }
+
+    /**
+     * Returns true if a response was received.
+     *
+     * @return bool
+     */
+    public function hasResponse()
+    {
+        return $this->response !== null;
+    }
+
+    /**
+     * Gets handler specific error data.
+     *
+     * This might be an exception, a integer representing an error code, or
+     * anything else. Relying on this value assumes that you know what handler
+     * you are using.
+     *
+     * @return mixed
+     */
+    public function getHandlerErrorData()
+    {
+        return $this->handlerErrorData;
+    }
+
+    /**
+     * Get the effective URI the request was sent to.
+     *
+     * @return UriInterface
+     */
+    public function getEffectiveUri()
+    {
+        return $this->request->getUri();
+    }
+
+    /**
+     * Get the estimated time the request was being transferred by the handler.
+     *
+     * @return float Time in seconds.
+     */
+    public function getTransferTime()
+    {
+        return $this->transferTime;
+    }
+
+    /**
+     * Gets an array of all of the handler specific transfer data.
+     *
+     * @return array
+     */
+    public function getHandlerStats()
+    {
+        return $this->handlerStats;
+    }
+
+    /**
+     * Get a specific handler statistic from the handler by name.
+     *
+     * @param string $stat Handler specific transfer stat to retrieve.
+     *
+     * @return mixed|null
+     */
+    public function getHandlerStat($stat)
+    {
+        return isset($this->handlerStats[$stat])
+            ? $this->handlerStats[$stat]
+            : null;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/UriTemplate.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/UriTemplate.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/UriTemplate.php	(revision 5534)
@@ -0,0 +1,241 @@
+<?php
+namespace GuzzleHttp;
+
+/**
+ * Expands URI templates. Userland implementation of PECL uri_template.
+ *
+ * @link http://tools.ietf.org/html/rfc6570
+ */
+class UriTemplate
+{
+    /** @var string URI template */
+    private $template;
+
+    /** @var array Variables to use in the template expansion */
+    private $variables;
+
+    /** @var array Hash for quick operator lookups */
+    private static $operatorHash = array(
+        ''  => array('prefix' => '',  'joiner' => ',', 'query' => false),
+        '+' => array('prefix' => '',  'joiner' => ',', 'query' => false),
+        '#' => array('prefix' => '#', 'joiner' => ',', 'query' => false),
+        '.' => array('prefix' => '.', 'joiner' => '.', 'query' => false),
+        '/' => array('prefix' => '/', 'joiner' => '/', 'query' => false),
+        ';' => array('prefix' => ';', 'joiner' => ';', 'query' => true),
+        '?' => array('prefix' => '?', 'joiner' => '&', 'query' => true),
+        '&' => array('prefix' => '&', 'joiner' => '&', 'query' => true)
+    );
+
+    /** @var array Delimiters */
+    private static $delims = array(':', '/', '?', '#', '[', ']', '@', '!', '$',
+        '&', '\'', '(', ')', '*', '+', ',', ';', '=');
+
+    /** @var array Percent encoded delimiters */
+    private static $delimsPct = array('%3A', '%2F', '%3F', '%23', '%5B', '%5D',
+        '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C',
+        '%3B', '%3D');
+
+    public function expand($template, array $variables)
+    {
+        if (false === strpos($template, '{')) {
+            return $template;
+        }
+
+        $this->template = $template;
+        $this->variables = $variables;
+
+        return preg_replace_callback(
+            '/\{([^\}]+)\}/',
+            [$this, 'expandMatch'],
+            $this->template
+        );
+    }
+
+    /**
+     * Parse an expression into parts
+     *
+     * @param string $expression Expression to parse
+     *
+     * @return array Returns an associative array of parts
+     */
+    private function parseExpression($expression)
+    {
+        $result = array();
+
+        if (isset(self::$operatorHash[$expression[0]])) {
+            $result['operator'] = $expression[0];
+            $expression = substr($expression, 1);
+        } else {
+            $result['operator'] = '';
+        }
+
+        foreach (explode(',', $expression) as $value) {
+            $value = trim($value);
+            $varspec = array();
+            if ($colonPos = strpos($value, ':')) {
+                $varspec['value'] = substr($value, 0, $colonPos);
+                $varspec['modifier'] = ':';
+                $varspec['position'] = (int) substr($value, $colonPos + 1);
+            } elseif (substr($value, -1) == '*') {
+                $varspec['modifier'] = '*';
+                $varspec['value'] = substr($value, 0, -1);
+            } else {
+                $varspec['value'] = (string) $value;
+                $varspec['modifier'] = '';
+            }
+            $result['values'][] = $varspec;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Process an expansion
+     *
+     * @param array $matches Matches met in the preg_replace_callback
+     *
+     * @return string Returns the replacement string
+     */
+    private function expandMatch(array $matches)
+    {
+        static $rfc1738to3986 = array('+' => '%20', '%7e' => '~');
+
+        $replacements = array();
+        $parsed = self::parseExpression($matches[1]);
+        $prefix = self::$operatorHash[$parsed['operator']]['prefix'];
+        $joiner = self::$operatorHash[$parsed['operator']]['joiner'];
+        $useQuery = self::$operatorHash[$parsed['operator']]['query'];
+
+        foreach ($parsed['values'] as $value) {
+
+            if (!isset($this->variables[$value['value']])) {
+                continue;
+            }
+
+            $variable = $this->variables[$value['value']];
+            $actuallyUseQuery = $useQuery;
+            $expanded = '';
+
+            if (is_array($variable)) {
+
+                $isAssoc = $this->isAssoc($variable);
+                $kvp = array();
+                foreach ($variable as $key => $var) {
+
+                    if ($isAssoc) {
+                        $key = rawurlencode($key);
+                        $isNestedArray = is_array($var);
+                    } else {
+                        $isNestedArray = false;
+                    }
+
+                    if (!$isNestedArray) {
+                        $var = rawurlencode($var);
+                        if ($parsed['operator'] == '+' ||
+                            $parsed['operator'] == '#'
+                        ) {
+                            $var = $this->decodeReserved($var);
+                        }
+                    }
+
+                    if ($value['modifier'] == '*') {
+                        if ($isAssoc) {
+                            if ($isNestedArray) {
+                                // Nested arrays must allow for deeply nested
+                                // structures.
+                                $var = strtr(
+                                    http_build_query([$key => $var]),
+                                    $rfc1738to3986
+                                );
+                            } else {
+                                $var = $key . '=' . $var;
+                            }
+                        } elseif ($key > 0 && $actuallyUseQuery) {
+                            $var = $value['value'] . '=' . $var;
+                        }
+                    }
+
+                    $kvp[$key] = $var;
+                }
+
+                if (empty($variable)) {
+                    $actuallyUseQuery = false;
+                } elseif ($value['modifier'] == '*') {
+                    $expanded = implode($joiner, $kvp);
+                    if ($isAssoc) {
+                        // Don't prepend the value name when using the explode
+                        // modifier with an associative array.
+                        $actuallyUseQuery = false;
+                    }
+                } else {
+                    if ($isAssoc) {
+                        // When an associative array is encountered and the
+                        // explode modifier is not set, then the result must be
+                        // a comma separated list of keys followed by their
+                        // respective values.
+                        foreach ($kvp as $k => &$v) {
+                            $v = $k . ',' . $v;
+                        }
+                    }
+                    $expanded = implode(',', $kvp);
+                }
+
+            } else {
+                if ($value['modifier'] == ':') {
+                    $variable = substr($variable, 0, $value['position']);
+                }
+                $expanded = rawurlencode($variable);
+                if ($parsed['operator'] == '+' || $parsed['operator'] == '#') {
+                    $expanded = $this->decodeReserved($expanded);
+                }
+            }
+
+            if ($actuallyUseQuery) {
+                if (!$expanded && $joiner != '&') {
+                    $expanded = $value['value'];
+                } else {
+                    $expanded = $value['value'] . '=' . $expanded;
+                }
+            }
+
+            $replacements[] = $expanded;
+        }
+
+        $ret = implode($joiner, $replacements);
+        if ($ret && $prefix) {
+            return $prefix . $ret;
+        }
+
+        return $ret;
+    }
+
+    /**
+     * Determines if an array is associative.
+     *
+     * This makes the assumption that input arrays are sequences or hashes.
+     * This assumption is a tradeoff for accuracy in favor of speed, but it
+     * should work in almost every case where input is supplied for a URI
+     * template.
+     *
+     * @param array $array Array to check
+     *
+     * @return bool
+     */
+    private function isAssoc(array $array)
+    {
+        return $array && array_keys($array)[0] !== 0;
+    }
+
+    /**
+     * Removes percent encoding on reserved characters (used with + and #
+     * modifiers).
+     *
+     * @param string $string String to fix
+     *
+     * @return string
+     */
+    private function decodeReserved($string)
+    {
+        return str_replace(self::$delimsPct, self::$delims, $string);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/functions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/functions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/functions.php	(revision 5534)
@@ -0,0 +1,284 @@
+<?php
+namespace GuzzleHttp;
+
+use GuzzleHttp\Handler\CurlHandler;
+use GuzzleHttp\Handler\CurlMultiHandler;
+use GuzzleHttp\Handler\Proxy;
+use GuzzleHttp\Handler\StreamHandler;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Expands a URI template
+ *
+ * @param string $template  URI template
+ * @param array  $variables Template variables
+ *
+ * @return string
+ */
+function uri_template($template, array $variables)
+{
+    if (extension_loaded('uri_template')) {
+        // @codeCoverageIgnoreStart
+        return \uri_template($template, $variables);
+        // @codeCoverageIgnoreEnd
+    }
+
+    static $uriTemplate;
+    if (!$uriTemplate) {
+        $uriTemplate = new UriTemplate();
+    }
+
+    return $uriTemplate->expand($template, $variables);
+}
+
+/**
+ * Debug function used to describe the provided value type and class.
+ *
+ * @param mixed $input
+ *
+ * @return string Returns a string containing the type of the variable and
+ *                if a class is provided, the class name.
+ */
+function describe_type($input)
+{
+    switch (gettype($input)) {
+        case 'object':
+            return 'object(' . get_class($input) . ')';
+        case 'array':
+            return 'array(' . count($input) . ')';
+        default:
+            ob_start();
+            var_dump($input);
+            // normalize float vs double
+            return str_replace('double(', 'float(', rtrim(ob_get_clean()));
+    }
+}
+
+/**
+ * Parses an array of header lines into an associative array of headers.
+ *
+ * @param array $lines Header lines array of strings in the following
+ *                     format: "Name: Value"
+ * @return array
+ */
+function headers_from_lines($lines)
+{
+    $headers = [];
+
+    foreach ($lines as $line) {
+        $parts = explode(':', $line, 2);
+        $headers[trim($parts[0])][] = isset($parts[1])
+            ? trim($parts[1])
+            : null;
+    }
+
+    return $headers;
+}
+
+/**
+ * Returns a debug stream based on the provided variable.
+ *
+ * @param mixed $value Optional value
+ *
+ * @return resource
+ */
+function debug_resource($value = null)
+{
+    if (is_resource($value)) {
+        return $value;
+    } elseif (defined('STDOUT')) {
+        return STDOUT;
+    }
+
+    return fopen('php://output', 'w');
+}
+
+/**
+ * Chooses and creates a default handler to use based on the environment.
+ *
+ * The returned handler is not wrapped by any default middlewares.
+ *
+ * @throws \RuntimeException if no viable Handler is available.
+ * @return callable Returns the best handler for the given system.
+ */
+function choose_handler()
+{
+    $handler = null;
+    if (function_exists('curl_multi_exec') && function_exists('curl_exec')) {
+        $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
+    } elseif (function_exists('curl_exec')) {
+        $handler = new CurlHandler();
+    } elseif (function_exists('curl_multi_exec')) {
+        $handler = new CurlMultiHandler();
+    }
+
+    if (ini_get('allow_url_fopen')) {
+        $handler = $handler
+            ? Proxy::wrapStreaming($handler, new StreamHandler())
+            : new StreamHandler();
+    } elseif (!$handler) {
+        throw new \RuntimeException('GuzzleHttp requires cURL, the '
+            . 'allow_url_fopen ini setting, or a custom HTTP handler.');
+    }
+
+    return $handler;
+}
+
+/**
+ * Get the default User-Agent string to use with Guzzle
+ *
+ * @return string
+ */
+function default_user_agent()
+{
+    static $defaultAgent = '';
+
+    if (!$defaultAgent) {
+        $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
+        if (extension_loaded('curl') && function_exists('curl_version')) {
+            $defaultAgent .= ' curl/' . \curl_version()['version'];
+        }
+        $defaultAgent .= ' PHP/' . PHP_VERSION;
+    }
+
+    return $defaultAgent;
+}
+
+/**
+ * Returns the default cacert bundle for the current system.
+ *
+ * First, the openssl.cafile and curl.cainfo php.ini settings are checked.
+ * If those settings are not configured, then the common locations for
+ * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X
+ * and Windows are checked. If any of these file locations are found on
+ * disk, they will be utilized.
+ *
+ * Note: the result of this function is cached for subsequent calls.
+ *
+ * @return string
+ * @throws \RuntimeException if no bundle can be found.
+ */
+function default_ca_bundle()
+{
+    static $cached = null;
+    static $cafiles = [
+        // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
+        '/etc/pki/tls/certs/ca-bundle.crt',
+        // Ubuntu, Debian (provided by the ca-certificates package)
+        '/etc/ssl/certs/ca-certificates.crt',
+        // FreeBSD (provided by the ca_root_nss package)
+        '/usr/local/share/certs/ca-root-nss.crt',
+        // OS X provided by homebrew (using the default path)
+        '/usr/local/etc/openssl/cert.pem',
+        // Google app engine
+        '/etc/ca-certificates.crt',
+        // Windows?
+        'C:\\windows\\system32\\curl-ca-bundle.crt',
+        'C:\\windows\\curl-ca-bundle.crt',
+    ];
+
+    if ($cached) {
+        return $cached;
+    }
+
+    if ($ca = ini_get('openssl.cafile')) {
+        return $cached = $ca;
+    }
+
+    if ($ca = ini_get('curl.cainfo')) {
+        return $cached = $ca;
+    }
+
+    foreach ($cafiles as $filename) {
+        if (file_exists($filename)) {
+            return $cached = $filename;
+        }
+    }
+
+    throw new \RuntimeException(<<< EOT
+No system CA bundle could be found in any of the the common system locations.
+PHP versions earlier than 5.6 are not properly configured to use the system's
+CA bundle by default. In order to verify peer certificates, you will need to
+supply the path on disk to a certificate bundle to the 'verify' request
+option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
+need a specific certificate bundle, then Mozilla provides a commonly used CA
+bundle which can be downloaded here (provided by the maintainer of cURL):
+https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once
+you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
+ini setting to point to the path to the file, allowing you to omit the 'verify'
+request option. See http://curl.haxx.se/docs/sslcerts.html for more
+information.
+EOT
+    );
+}
+
+/**
+ * Creates an associative array of lowercase header names to the actual
+ * header casing.
+ *
+ * @param array $headers
+ *
+ * @return array
+ */
+function normalize_header_keys(array $headers)
+{
+    $result = [];
+    foreach (array_keys($headers) as $key) {
+        $result[strtolower($key)] = $key;
+    }
+
+    return $result;
+}
+
+/**
+ * Returns true if the provided host matches any of the no proxy areas.
+ *
+ * This method will strip a port from the host if it is present. Each pattern
+ * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a
+ * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" ==
+ * "baz.foo.com", but ".foo.com" != "foo.com").
+ *
+ * Areas are matched in the following cases:
+ * 1. "*" (without quotes) always matches any hosts.
+ * 2. An exact match.
+ * 3. The area starts with "." and the area is the last part of the host. e.g.
+ *    '.mit.edu' will match any host that ends with '.mit.edu'.
+ *
+ * @param string $host         Host to check against the patterns.
+ * @param array  $noProxyArray An array of host patterns.
+ *
+ * @return bool
+ */
+function is_host_in_noproxy($host, array $noProxyArray)
+{
+    if (strlen($host) === 0) {
+        throw new \InvalidArgumentException('Empty host provided');
+    }
+
+    // Strip port if present.
+    if (strpos($host, ':')) {
+        $host = explode($host, ':', 2)[0];
+    }
+
+    foreach ($noProxyArray as $area) {
+        // Always match on wildcards.
+        if ($area === '*') {
+            return true;
+        } elseif (empty($area)) {
+            // Don't match on empty values.
+            continue;
+        } elseif ($area === $host) {
+            // Exact matches.
+            return true;
+        } else {
+            // Special match if the area when prefixed with ".". Remove any
+            // existing leading "." and add a new leading ".".
+            $area = '.' . ltrim($area, '.');
+            if (substr($host, -(strlen($area))) === $area) {
+                return true;
+            }
+        }
+    }
+
+    return false;
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/functions_include.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/functions_include.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/guzzle/src/functions_include.php	(revision 5534)
@@ -0,0 +1,6 @@
+<?php
+
+// Don't redefine the functions if included multiple times.
+if (!function_exists('GuzzleHttp\uri_template')) {
+    require __DIR__ . '/functions.php';
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/.gitignore
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/.gitignore	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/.gitignore	(revision 5534)
@@ -0,0 +1,11 @@
+phpunit.xml
+composer.phar
+composer.lock
+composer-test.lock
+vendor/
+build/artifacts/
+artifacts/
+docs/_build
+docs/*.pyc
+.idea
+.DS_STORE
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/.travis.yml
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/.travis.yml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/.travis.yml	(revision 5534)
@@ -0,0 +1,19 @@
+language: php
+
+php:
+  - 5.5
+  - 5.6
+  - 7.0
+  - hhvm
+
+sudo: false
+
+install:
+  - travis_retry composer install --no-interaction --prefer-source
+
+script: make test
+
+matrix:
+  allow_failures:
+    - php: hhvm
+  fast_finish: true
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,21 @@
+# CHANGELOG
+
+## 1.0.3 - 2015-10-15
+
+* Update EachPromise to immediately resolve when the underlying promise iterator
+  is empty. Previously, such a promise would throw an exception when its `wait`
+  function was called.
+
+## 1.0.2 - 2015-05-15
+
+* Conditionally require functions.php.
+
+## 1.0.1 - 2015-06-24
+
+* Updating EachPromise to call next on the underlying promise iterator as late
+  as possible to ensure that generators that generate new requests based on
+  callbacks are not iterated until after callbacks are invoked.
+
+## 1.0.0 - 2015-05-12
+
+* Initial release
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/LICENSE	(revision 5534)
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/Makefile
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/Makefile	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/Makefile	(revision 5534)
@@ -0,0 +1,13 @@
+all: clean test
+
+test:
+	vendor/bin/phpunit
+
+coverage:
+	vendor/bin/phpunit --coverage-html=artifacts/coverage
+
+view-coverage:
+	open artifacts/coverage/index.html
+
+clean:
+	rm -rf artifacts/*
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/README.md	(revision 5534)
@@ -0,0 +1,501 @@
+# Guzzle Promises
+
+[Promises/A+](https://promisesaplus.com/) implementation that handles promise
+chaining and resolution iteratively, allowing for "infinite" promise chaining
+while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/)
+for a general introduction to promises.
+
+- [Features](#features)
+- [Quick start](#quick-start)
+- [Synchronous wait](#synchronous-wait)
+- [Cancellation](#cancellation)
+- [API](#api)
+  - [Promise](#promise)
+  - [FulfilledPromise](#fulfilledpromise)
+  - [RejectedPromise](#rejectedpromise)
+- [Promise interop](#promise-interop)
+- [Implementation notes](#implementation-notes)
+
+
+# Features
+
+- [Promises/A+](https://promisesaplus.com/) implementation.
+- Promise resolution and chaining is handled iteratively, allowing for
+  "infinite" promise chaining.
+- Promises have a synchronous `wait` method.
+- Promises can be cancelled.
+- Works with any object that has a `then` function.
+- C# style async/await coroutine promises using
+  `GuzzleHttp\Promise\coroutine()`.
+
+
+# Quick start
+
+A *promise* represents the eventual result of an asynchronous operation. The
+primary way of interacting with a promise is through its `then` method, which
+registers callbacks to receive either a promise's eventual value or the reason
+why the promise cannot be fulfilled.
+
+
+## Callbacks
+
+Callbacks are registered with the `then` method by providing an optional 
+`$onFulfilled` followed by an optional `$onRejected` function.
+
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise->then(
+    // $onFulfilled
+    function ($value) {
+        echo 'The promise was fulfilled.';
+    },
+    // $onRejected
+    function ($reason) {
+        echo 'The promise was rejected.';
+    }
+);
+```
+
+*Resolving* a promise means that you either fulfill a promise with a *value* or
+reject a promise with a *reason*. Resolving a promises triggers callbacks
+registered with the promises's `then` method. These callbacks are triggered
+only once and in the order in which they were added.
+
+
+## Resolving a promise
+
+Promises are fulfilled using the `resolve($value)` method. Resolving a promise
+with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger
+all of the onFulfilled callbacks (resolving a promise with a rejected promise
+will reject the promise and trigger the `$onRejected` callbacks).
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise
+    ->then(function ($value) {
+        // Return a value and don't break the chain
+        return "Hello, " . $value;
+    })
+    // This then is executed after the first then and receives the value
+    // returned from the first then.
+    ->then(function ($value) {
+        echo $value;
+    });
+
+// Resolving the promise triggers the $onFulfilled callbacks and outputs
+// "Hello, reader".
+$promise->resolve('reader.');
+```
+
+
+## Promise forwarding
+
+Promises can be chained one after the other. Each then in the chain is a new
+promise. The return value of of a promise is what's forwarded to the next
+promise in the chain. Returning a promise in a `then` callback will cause the
+subsequent promises in the chain to only be fulfilled when the returned promise
+has been fulfilled. The next promise in the chain will be invoked with the
+resolved value of the promise.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$nextPromise = new Promise();
+
+$promise
+    ->then(function ($value) use ($nextPromise) {
+        echo $value;
+        return $nextPromise;
+    })
+    ->then(function ($value) {
+        echo $value;
+    });
+
+// Triggers the first callback and outputs "A"
+$promise->resolve('A');
+// Triggers the second callback and outputs "B"
+$nextPromise->resolve('B');
+```
+
+## Promise rejection
+
+When a promise is rejected, the `$onRejected` callbacks are invoked with the
+rejection reason.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise->then(null, function ($reason) {
+    echo $reason;
+});
+
+$promise->reject('Error!');
+// Outputs "Error!"
+```
+
+## Rejection forwarding
+
+If an exception is thrown in an `$onRejected` callback, subsequent
+`$onRejected` callbacks are invoked with the thrown exception as the reason.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise();
+$promise->then(null, function ($reason) {
+    throw new \Exception($reason);
+})->then(null, function ($reason) {
+    assert($reason->getMessage() === 'Error!');
+});
+
+$promise->reject('Error!');
+```
+
+You can also forward a rejection down the promise chain by returning a
+`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or
+`$onRejected` callback.
+
+```php
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\RejectedPromise;
+
+$promise = new Promise();
+$promise->then(null, function ($reason) {
+    return new RejectedPromise($reason);
+})->then(null, function ($reason) {
+    assert($reason === 'Error!');
+});
+
+$promise->reject('Error!');
+```
+
+If an exception is not thrown in a `$onRejected` callback and the callback
+does not return a rejected promise, downstream `$onFulfilled` callbacks are
+invoked using the value returned from the `$onRejected` callback.
+
+```php
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\RejectedPromise;
+
+$promise = new Promise();
+$promise
+    ->then(null, function ($reason) {
+        return "It's ok";
+    })
+    ->then(function ($value) {
+        assert($value === "It's ok");
+    });
+
+$promise->reject('Error!');
+```
+
+# Synchronous wait
+
+You can synchronously force promises to complete using a promise's `wait`
+method. When creating a promise, you can provide a wait function that is used
+to synchronously force a promise to complete. When a wait function is invoked
+it is expected to deliver a value to the promise or reject the promise. If the
+wait function does not deliver a value, then an exception is thrown. The wait
+function provided to a promise constructor is invoked when the `wait` function
+of the promise is called.
+
+```php
+$promise = new Promise(function () use (&$promise) {
+    $promise->deliver('foo');
+});
+
+// Calling wait will return the value of the promise.
+echo $promise->wait(); // outputs "foo"
+```
+
+If an exception is encountered while invoking the wait function of a promise,
+the promise is rejected with the exception and the exception is thrown.
+
+```php
+$promise = new Promise(function () use (&$promise) {
+    throw new \Exception('foo');
+});
+
+$promise->wait(); // throws the exception.
+```
+
+Calling `wait` on a promise that has been fulfilled will not trigger the wait
+function. It will simply return the previously delivered value.
+
+```php
+$promise = new Promise(function () { die('this is not called!'); });
+$promise->deliver('foo');
+echo $promise->wait(); // outputs "foo"
+```
+
+Calling `wait` on a promise that has been rejected will throw an exception. If
+the rejection reason is an instance of `\Exception` the reason is thrown.
+Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason
+can be obtained by calling the `getReason` method of the exception.
+
+```php
+$promise = new Promise();
+$promise->reject('foo');
+$promise->wait();
+```
+
+> PHP Fatal error:  Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo'
+
+
+## Unwrapping a promise
+
+When synchronously waiting on a promise, you are joining the state of the
+promise into the current state of execution (i.e., return the value of the
+promise if it was fulfilled or throw an exception if it was rejected). This is
+called "unwrapping" the promise. Waiting on a promise will by default unwrap
+the promise state.
+
+You can force a promise to resolve and *not* unwrap the state of the promise
+by passing `false` to the first argument of the `wait` function:
+
+```php
+$promise = new Promise();
+$promise->reject('foo');
+// This will not throw an exception. It simply ensures the promise has
+// been resolved.
+$promise->wait(false);
+```
+
+When unwrapping a promise, the delivered value of the promise will be waited
+upon until the unwrapped value is not a promise. This means that if you resolve
+promise A with a promise B and unwrap promise A, the value returned by the
+wait function will be the value delivered to promise B.
+
+**Note**: when you do not unwrap the promise, no value is returned.
+
+
+# Cancellation
+
+You can cancel a promise that has not yet been fulfilled using the `cancel()`
+method of a promise. When creating a promise you can provide an optional
+cancel function that when invoked cancels the action of computing a resolution
+of the promise.
+
+
+# API
+
+
+## Promise
+
+When creating a promise object, you can provide an optional `$waitFn` and
+`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is
+expected to resolve the promise. `$cancelFn` is a function with no arguments
+that is expected to cancel the computation of a promise. It is invoked when the
+`cancel()` method of a promise is called.
+
+```php
+use GuzzleHttp\Promise\Promise;
+
+$promise = new Promise(
+    function () use (&$promise) {
+        $promise->resolve('waited');
+    },
+    function () {
+        // do something that will cancel the promise computation (e.g., close
+        // a socket, cancel a database query, etc...)
+    }
+);
+
+assert('waited' === $promise->wait());
+```
+
+A promise has the following methods:
+
+- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface`
+  
+  Creates a new promise that is fulfilled or rejected when the promise is
+  resolved.
+
+- `wait($unwrap = true) : mixed`
+
+  Synchronously waits on the promise to complete.
+  
+  `$unwrap` controls whether or not the value of the promise is returned for a
+  fulfilled promise or if an exception is thrown if the promise is rejected.
+  This is set to `true` by default.
+
+- `cancel()`
+
+  Attempts to cancel the promise if possible. The promise being cancelled and
+  the parent most ancestor that has not yet been resolved will also be
+  cancelled. Any promises waiting on the cancelled promise to resolve will also
+  be cancelled.
+
+- `getState() : string`
+
+  Returns the state of the promise. One of `pending`, `fulfilled`, or
+  `rejected`.
+
+- `resolve($value)`
+
+  Fulfills the promise with the given `$value`.
+
+- `reject($reason)`
+
+  Rejects the promise with the given `$reason`.
+
+
+## FulfilledPromise
+
+A fulfilled promise can be created to represent a promise that has been
+fulfilled.
+
+```php
+use GuzzleHttp\Promise\FulfilledPromise;
+
+$promise = new FulfilledPromise('value');
+
+// Fulfilled callbacks are immediately invoked.
+$promise->then(function ($value) {
+    echo $value;
+});
+```
+
+
+## RejectedPromise
+
+A rejected promise can be created to represent a promise that has been
+rejected.
+
+```php
+use GuzzleHttp\Promise\RejectedPromise;
+
+$promise = new RejectedPromise('Error');
+
+// Rejected callbacks are immediately invoked.
+$promise->then(null, function ($reason) {
+    echo $reason;
+});
+```
+
+
+# Promise interop
+
+This library works with foreign promises that have a `then` method. This means
+you can use Guzzle promises with [React promises](https://github.com/reactphp/promise)
+for example. When a foreign promise is returned inside of a then method
+callback, promise resolution will occur recursively.
+
+```php
+// Create a React promise
+$deferred = new React\Promise\Deferred();
+$reactPromise = $deferred->promise();
+
+// Create a Guzzle promise that is fulfilled with a React promise.
+$guzzlePromise = new \GuzzleHttp\Promise\Promise();
+$guzzlePromise->then(function ($value) use ($reactPromise) {
+    // Do something something with the value...
+    // Return the React promise
+    return $reactPromise;
+});
+```
+
+Please note that wait and cancel chaining is no longer possible when forwarding
+a foreign promise. You will need to wrap a third-party promise with a Guzzle
+promise in order to utilize wait and cancel functions with foreign promises.
+
+
+## Event Loop Integration
+
+In order to keep the stack size constant, Guzzle promises are resolved
+asynchronously using a task queue. When waiting on promises synchronously, the
+task queue will be automatically run to ensure that the blocking promise and
+any forwarded promises are resolved. When using promises asynchronously in an
+event loop, you will need to run the task queue on each tick of the loop. If
+you do not run the task queue, then promises will not be resolved.
+
+You can run the task queue using the `run()` method of the global task queue
+instance.
+
+```php
+// Get the global task queue
+$queue = \GuzzleHttp\Promise\queue();
+$queue->run();
+```
+
+For example, you could use Guzzle promises with React using a periodic timer:
+
+```php
+$loop = React\EventLoop\Factory::create();
+$loop->addPeriodicTimer(0, [$queue, 'run']);
+```
+
+*TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
+
+
+# Implementation notes
+
+
+## Promise resolution and chaining is handled iteratively
+
+By shuffling pending handlers from one owner to another, promises are
+resolved iteratively, allowing for "infinite" then chaining.
+
+```php
+<?php
+require 'vendor/autoload.php';
+
+use GuzzleHttp\Promise\Promise;
+
+$parent = new Promise();
+$p = $parent;
+
+for ($i = 0; $i < 1000; $i++) {
+    $p = $p->then(function ($v) {
+        // The stack size remains constant (a good thing)
+        echo xdebug_get_stack_depth() . ', ';
+        return $v + 1;
+    });
+}
+
+$parent->resolve(0);
+var_dump($p->wait()); // int(1000)
+
+```
+
+When a promise is fulfilled or rejected with a non-promise value, the promise
+then takes ownership of the handlers of each child promise and delivers values
+down the chain without using recursion.
+
+When a promise is resolved with another promise, the original promise transfers
+all of its pending handlers to the new promise. When the new promise is
+eventually resolved, all of the pending handlers are delivered the forwarded
+value.
+
+
+## A promise is the deferred.
+
+Some promise libraries implement promises using a deferred object to represent
+a computation and a promise object to represent the delivery of the result of
+the computation. This is a nice separation of computation and delivery because
+consumers of the promise cannot modify the value that will be eventually
+delivered.
+
+One side effect of being able to implement promise resolution and chaining
+iteratively is that you need to be able for one promise to reach into the state
+of another promise to shuffle around ownership of handlers. In order to achieve
+this without making the handlers of a promise publicly mutable, a promise is
+also the deferred value, allowing promises of the same parent class to reach
+into and modify the private properties of promises of the same type. While this
+does allow consumers of the value to modify the resolution or rejection of the
+deferred, it is a small price to pay for keeping the stack size constant.
+
+```php
+$promise = new Promise();
+$promise->then(function ($value) { echo $value; });
+// The promise is the deferred value, so you can deliver a value to it.
+$promise->deliver('foo');
+// prints "foo"
+```
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/composer.json	(revision 5534)
@@ -0,0 +1,31 @@
+{
+    "name": "guzzlehttp/promises",
+    "type": "library",
+    "description": "Guzzle promises library",
+    "keywords": ["promise"],
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Michael Dowling",
+            "email": "mtdowling@gmail.com",
+            "homepage": "https://github.com/mtdowling"
+        }
+    ],
+    "require": {
+        "php": ">=5.5.0"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "~4.0"
+    },
+    "autoload": {
+        "psr-4": {
+            "GuzzleHttp\\Promise\\": "src/"
+        },
+        "files": ["src/functions_include.php"]
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "1.0-dev"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/phpunit.xml.dist
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/phpunit.xml.dist	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/phpunit.xml.dist	(revision 5534)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="./tests/bootstrap.php"
+         colors="true">
+  <testsuites>
+    <testsuite>
+      <directory>tests</directory>
+    </testsuite>
+  </testsuites>
+  <filter>
+    <whitelist>
+      <directory suffix=".php">src</directory>
+      <exclude>
+        <directory suffix="Interface.php">src/</directory>
+      </exclude>
+    </whitelist>
+  </filter>
+</phpunit>
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/AggregateException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/AggregateException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/AggregateException.php	(revision 5534)
@@ -0,0 +1,16 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * Exception thrown when too many errors occur in the some() or any() methods.
+ */
+class AggregateException extends RejectionException
+{
+    public function __construct($msg, array $reasons)
+    {
+        parent::__construct(
+            $reasons,
+            sprintf('%s; %d rejected promises', $msg, count($reasons))
+        );
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/CancellationException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/CancellationException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/CancellationException.php	(revision 5534)
@@ -0,0 +1,9 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * Exception that is set as the reason for a promise that has been cancelled.
+ */
+class CancellationException extends RejectionException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/EachPromise.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/EachPromise.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/EachPromise.php	(revision 5534)
@@ -0,0 +1,207 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * Represents a promise that iterates over many promises and invokes
+ * side-effect functions in the process.
+ */
+class EachPromise implements PromisorInterface
+{
+    private $pending = [];
+
+    /** @var \Iterator */
+    private $iterable;
+
+    /** @var callable|int */
+    private $concurrency;
+
+    /** @var callable */
+    private $onFulfilled;
+
+    /** @var callable */
+    private $onRejected;
+
+    /** @var Promise */
+    private $aggregate;
+
+    /**
+     * Configuration hash can include the following key value pairs:
+     *
+     * - fulfilled: (callable) Invoked when a promise fulfills. The function
+     *   is invoked with three arguments: the fulfillment value, the index
+     *   position from the iterable list of the promise, and the aggregate
+     *   promise that manages all of the promises. The aggregate promise may
+     *   be resolved from within the callback to short-circuit the promise.
+     * - rejected: (callable) Invoked when a promise is rejected. The
+     *   function is invoked with three arguments: the rejection reason, the
+     *   index position from the iterable list of the promise, and the
+     *   aggregate promise that manages all of the promises. The aggregate
+     *   promise may be resolved from within the callback to short-circuit
+     *   the promise.
+     * - concurrency: (integer) Pass this configuration option to limit the
+     *   allowed number of outstanding concurrently executing promises,
+     *   creating a capped pool of promises. There is no limit by default.
+     *
+     * @param mixed    $iterable Promises or values to iterate.
+     * @param array    $config   Configuration options
+     */
+    public function __construct($iterable, array $config = [])
+    {
+        $this->iterable = iter_for($iterable);
+
+        if (isset($config['concurrency'])) {
+            $this->concurrency = $config['concurrency'];
+        }
+
+        if (isset($config['fulfilled'])) {
+            $this->onFulfilled = $config['fulfilled'];
+        }
+
+        if (isset($config['rejected'])) {
+            $this->onRejected = $config['rejected'];
+        }
+    }
+
+    public function promise()
+    {
+        if ($this->aggregate) {
+            return $this->aggregate;
+        }
+
+        try {
+            $this->createPromise();
+            $this->iterable->rewind();
+            $this->refillPending();
+        } catch (\Exception $e) {
+            $this->aggregate->reject($e);
+        }
+
+        return $this->aggregate;
+    }
+
+    private function createPromise()
+    {
+        $this->aggregate = new Promise(function () {
+            reset($this->pending);
+            if (empty($this->pending) && !$this->iterable->valid()) {
+                $this->aggregate->resolve(null);
+                return;
+            }
+
+            // Consume a potentially fluctuating list of promises while
+            // ensuring that indexes are maintained (precluding array_shift).
+            while ($promise = current($this->pending)) {
+                next($this->pending);
+                $promise->wait();
+                if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
+                    return;
+                }
+            }
+        });
+
+        // Clear the references when the promise is resolved.
+        $clearFn = function () {
+            $this->iterable = $this->concurrency = $this->pending = null;
+            $this->onFulfilled = $this->onRejected = null;
+        };
+
+        $this->aggregate->then($clearFn, $clearFn);
+    }
+
+    private function refillPending()
+    {
+        if (!$this->concurrency) {
+            // Add all pending promises.
+            while ($this->addPending() && $this->advanceIterator());
+            return;
+        }
+
+        // Add only up to N pending promises.
+        $concurrency = is_callable($this->concurrency)
+            ? call_user_func($this->concurrency, count($this->pending))
+            : $this->concurrency;
+        $concurrency = max($concurrency - count($this->pending), 0);
+        // Concurrency may be set to 0 to disallow new promises.
+        if (!$concurrency) {
+            return;
+        }
+        // Add the first pending promise.
+        $this->addPending();
+        // Note this is special handling for concurrency=1 so that we do
+        // not advance the iterator after adding the first promise. This
+        // helps work around issues with generators that might not have the
+        // next value to yield until promise callbacks are called.
+        while (--$concurrency
+            && $this->advanceIterator()
+            && $this->addPending());
+    }
+
+    private function addPending()
+    {
+        if (!$this->iterable || !$this->iterable->valid()) {
+            return false;
+        }
+
+        $promise = promise_for($this->iterable->current());
+        $idx = $this->iterable->key();
+
+        $this->pending[$idx] = $promise->then(
+            function ($value) use ($idx) {
+                if ($this->onFulfilled) {
+                    call_user_func(
+                        $this->onFulfilled, $value, $idx, $this->aggregate
+                    );
+                }
+                $this->step($idx);
+            },
+            function ($reason) use ($idx) {
+                if ($this->onRejected) {
+                    call_user_func(
+                        $this->onRejected, $reason, $idx, $this->aggregate
+                    );
+                }
+                $this->step($idx);
+            }
+        );
+
+        return true;
+    }
+
+    private function advanceIterator()
+    {
+        try {
+            $this->iterable->next();
+            return true;
+        } catch (\Exception $e) {
+            $this->aggregate->reject($e);
+            return false;
+        }
+    }
+
+    private function step($idx)
+    {
+        // If the promise was already resolved, then ignore this step.
+        if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
+            return;
+        }
+
+        unset($this->pending[$idx]);
+        $this->advanceIterator();
+
+        if (!$this->checkIfFinished()) {
+            // Add more pending promises if possible.
+            $this->refillPending();
+        }
+    }
+
+    private function checkIfFinished()
+    {
+        if (!$this->pending && !$this->iterable->valid()) {
+            // Resolve the promise if there's nothing left to do.
+            $this->aggregate->resolve(null);
+            return true;
+        }
+
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/FulfilledPromise.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/FulfilledPromise.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/FulfilledPromise.php	(revision 5534)
@@ -0,0 +1,80 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * A promise that has been fulfilled.
+ *
+ * Thenning off of this promise will invoke the onFulfilled callback
+ * immediately and ignore other callbacks.
+ */
+class FulfilledPromise implements PromiseInterface
+{
+    private $value;
+
+    public function __construct($value)
+    {
+        if (method_exists($value, 'then')) {
+            throw new \InvalidArgumentException(
+                'You cannot create a FulfilledPromise with a promise.');
+        }
+
+        $this->value = $value;
+    }
+
+    public function then(
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        // Return itself if there is no onFulfilled function.
+        if (!$onFulfilled) {
+            return $this;
+        }
+
+        $queue = queue();
+        $p = new Promise([$queue, 'run']);
+        $value = $this->value;
+        $queue->add(static function () use ($p, $value, $onFulfilled) {
+            if ($p->getState() === self::PENDING) {
+                try {
+                    $p->resolve($onFulfilled($value));
+                } catch (\Exception $e) {
+                    $p->reject($e);
+                }
+            }
+        });
+
+        return $p;
+    }
+
+    public function otherwise(callable $onRejected)
+    {
+        return $this->then(null, $onRejected);
+    }
+
+    public function wait($unwrap = true, $defaultDelivery = null)
+    {
+        return $unwrap ? $this->value : null;
+    }
+
+    public function getState()
+    {
+        return self::FULFILLED;
+    }
+
+    public function resolve($value)
+    {
+        if ($value !== $this->value) {
+            throw new \LogicException("Cannot resolve a fulfilled promise");
+        }
+    }
+
+    public function reject($reason)
+    {
+        throw new \LogicException("Cannot reject a fulfilled promise");
+    }
+
+    public function cancel()
+    {
+        // pass
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/Promise.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/Promise.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/Promise.php	(revision 5534)
@@ -0,0 +1,268 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * Promises/A+ implementation that avoids recursion when possible.
+ *
+ * @link https://promisesaplus.com/
+ */
+class Promise implements PromiseInterface
+{
+    private $state = self::PENDING;
+    private $result;
+    private $cancelFn;
+    private $waitFn;
+    private $waitList;
+    private $handlers = [];
+
+    /**
+     * @param callable $waitFn   Fn that when invoked resolves the promise.
+     * @param callable $cancelFn Fn that when invoked cancels the promise.
+     */
+    public function __construct(
+        callable $waitFn = null,
+        callable $cancelFn = null
+    ) {
+        $this->waitFn = $waitFn;
+        $this->cancelFn = $cancelFn;
+    }
+
+    public function then(
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        if ($this->state === self::PENDING) {
+            $p = new Promise(null, [$this, 'cancel']);
+            $this->handlers[] = [$p, $onFulfilled, $onRejected];
+            $p->waitList = $this->waitList;
+            $p->waitList[] = $this;
+            return $p;
+        }
+
+        // Return a fulfilled promise and immediately invoke any callbacks.
+        if ($this->state === self::FULFILLED) {
+            return $onFulfilled
+                ? promise_for($this->result)->then($onFulfilled)
+                : promise_for($this->result);
+        }
+
+        // It's either cancelled or rejected, so return a rejected promise
+        // and immediately invoke any callbacks.
+        $rejection = rejection_for($this->result);
+        return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
+    }
+
+    public function otherwise(callable $onRejected)
+    {
+        return $this->then(null, $onRejected);
+    }
+
+    public function wait($unwrap = true)
+    {
+        $this->waitIfPending();
+
+        if (!$unwrap) {
+            return null;
+        }
+
+        if ($this->result instanceof PromiseInterface) {
+            return $this->result->wait($unwrap);
+        } elseif ($this->state === self::FULFILLED) {
+            return $this->result;
+        } else {
+            // It's rejected so "unwrap" and throw an exception.
+            throw exception_for($this->result);
+        }
+    }
+
+    public function getState()
+    {
+        return $this->state;
+    }
+
+    public function cancel()
+    {
+        if ($this->state !== self::PENDING) {
+            return;
+        }
+
+        $this->waitFn = $this->waitList = null;
+
+        if ($this->cancelFn) {
+            $fn = $this->cancelFn;
+            $this->cancelFn = null;
+            try {
+                $fn();
+            } catch (\Exception $e) {
+                $this->reject($e);
+            }
+        }
+
+        // Reject the promise only if it wasn't rejected in a then callback.
+        if ($this->state === self::PENDING) {
+            $this->reject(new CancellationException('Promise has been cancelled'));
+        }
+    }
+
+    public function resolve($value)
+    {
+        $this->settle(self::FULFILLED, $value);
+    }
+
+    public function reject($reason)
+    {
+        $this->settle(self::REJECTED, $reason);
+    }
+
+    private function settle($state, $value)
+    {
+        if ($this->state !== self::PENDING) {
+            // Ignore calls with the same resolution.
+            if ($state === $this->state && $value === $this->result) {
+                return;
+            }
+            throw $this->state === $state
+                ? new \LogicException("The promise is already {$state}.")
+                : new \LogicException("Cannot change a {$this->state} promise to {$state}");
+        }
+
+        if ($value === $this) {
+            throw new \LogicException('Cannot fulfill or reject a promise with itself');
+        }
+
+        // Clear out the state of the promise but stash the handlers.
+        $this->state = $state;
+        $this->result = $value;
+        $handlers = $this->handlers;
+        $this->handlers = null;
+        $this->waitList = $this->waitFn = null;
+        $this->cancelFn = null;
+
+        if (!$handlers) {
+            return;
+        }
+
+        // If the value was not a settled promise or a thenable, then resolve
+        // it in the task queue using the correct ID.
+        if (!method_exists($value, 'then')) {
+            $id = $state === self::FULFILLED ? 1 : 2;
+            // It's a success, so resolve the handlers in the queue.
+            queue()->add(static function () use ($id, $value, $handlers) {
+                foreach ($handlers as $handler) {
+                    self::callHandler($id, $value, $handler);
+                }
+            });
+        } elseif ($value instanceof Promise
+            && $value->getState() === self::PENDING
+        ) {
+            // We can just merge our handlers onto the next promise.
+            $value->handlers = array_merge($value->handlers, $handlers);
+        } else {
+            // Resolve the handlers when the forwarded promise is resolved.
+            $value->then(
+                static function ($value) use ($handlers) {
+                    foreach ($handlers as $handler) {
+                        self::callHandler(1, $value, $handler);
+                    }
+                },
+                static function ($reason) use ($handlers) {
+                    foreach ($handlers as $handler) {
+                        self::callHandler(2, $reason, $handler);
+                    }
+                }
+            );
+        }
+    }
+
+    /**
+     * Call a stack of handlers using a specific callback index and value.
+     *
+     * @param int   $index   1 (resolve) or 2 (reject).
+     * @param mixed $value   Value to pass to the callback.
+     * @param array $handler Array of handler data (promise and callbacks).
+     *
+     * @return array Returns the next group to resolve.
+     */
+    private static function callHandler($index, $value, array $handler)
+    {
+        /** @var PromiseInterface $promise */
+        $promise = $handler[0];
+
+        // The promise may have been cancelled or resolved before placing
+        // this thunk in the queue.
+        if ($promise->getState() !== self::PENDING) {
+            return;
+        }
+
+        try {
+            if (isset($handler[$index])) {
+                $promise->resolve($handler[$index]($value));
+            } elseif ($index === 1) {
+                // Forward resolution values as-is.
+                $promise->resolve($value);
+            } else {
+                // Forward rejections down the chain.
+                $promise->reject($value);
+            }
+        } catch (\Exception $reason) {
+            $promise->reject($reason);
+        }
+    }
+
+    private function waitIfPending()
+    {
+        if ($this->state !== self::PENDING) {
+            return;
+        } elseif ($this->waitFn) {
+            $this->invokeWaitFn();
+        } elseif ($this->waitList) {
+            $this->invokeWaitList();
+        } else {
+            // If there's not wait function, then reject the promise.
+            $this->reject('Cannot wait on a promise that has '
+                . 'no internal wait function. You must provide a wait '
+                . 'function when constructing the promise to be able to '
+                . 'wait on a promise.');
+        }
+
+        queue()->run();
+
+        if ($this->state === self::PENDING) {
+            $this->reject('Invoking the wait callback did not resolve the promise');
+        }
+    }
+
+    private function invokeWaitFn()
+    {
+        try {
+            $wfn = $this->waitFn;
+            $this->waitFn = null;
+            $wfn(true);
+        } catch (\Exception $reason) {
+            if ($this->state === self::PENDING) {
+                // The promise has not been resolved yet, so reject the promise
+                // with the exception.
+                $this->reject($reason);
+            } else {
+                // The promise was already resolved, so there's a problem in
+                // the application.
+                throw $reason;
+            }
+        }
+    }
+
+    private function invokeWaitList()
+    {
+        $waitList = $this->waitList;
+        $this->waitList = null;
+
+        foreach ($waitList as $result) {
+            descend:
+            $result->waitIfPending();
+            if ($result->result instanceof Promise) {
+                $result = $result->result;
+                goto descend;
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/PromiseInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/PromiseInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/PromiseInterface.php	(revision 5534)
@@ -0,0 +1,93 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * A promise represents the eventual result of an asynchronous operation.
+ *
+ * The primary way of interacting with a promise is through its then method,
+ * which registers callbacks to receive either a promiseâs eventual value or
+ * the reason why the promise cannot be fulfilled.
+ *
+ * @link https://promisesaplus.com/
+ */
+interface PromiseInterface
+{
+    const PENDING = 'pending';
+    const FULFILLED = 'fulfilled';
+    const REJECTED = 'rejected';
+
+    /**
+     * Appends fulfillment and rejection handlers to the promise, and returns
+     * a new promise resolving to the return value of the called handler.
+     *
+     * @param callable $onFulfilled Invoked when the promise fulfills.
+     * @param callable $onRejected  Invoked when the promise is rejected.
+     *
+     * @return PromiseInterface
+     */
+    public function then(
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    );
+
+    /**
+     * Appends a rejection handler callback to the promise, and returns a new
+     * promise resolving to the return value of the callback if it is called,
+     * or to its original fulfillment value if the promise is instead
+     * fulfilled.
+     *
+     * @param callable $onRejected Invoked when the promise is rejected.
+     *
+     * @return PromiseInterface
+     */
+    public function otherwise(callable $onRejected);
+
+    /**
+     * Get the state of the promise ("pending", "rejected", or "fulfilled").
+     *
+     * The three states can be checked against the constants defined on
+     * PromiseInterface: PENDING, FULFILLED, and REJECTED.
+     *
+     * @return string
+     */
+    public function getState();
+
+    /**
+     * Resolve the promise with the given value.
+     *
+     * @param mixed $value
+     * @throws \RuntimeException if the promise is already resolved.
+     */
+    public function resolve($value);
+
+    /**
+     * Reject the promise with the given reason.
+     *
+     * @param mixed $reason
+     * @throws \RuntimeException if the promise is already resolved.
+     */
+    public function reject($reason);
+
+    /**
+     * Cancels the promise if possible.
+     *
+     * @link https://github.com/promises-aplus/cancellation-spec/issues/7
+     */
+    public function cancel();
+
+    /**
+     * Waits until the promise completes if possible.
+     *
+     * Pass $unwrap as true to unwrap the result of the promise, either
+     * returning the resolved value or throwing the rejected exception.
+     *
+     * If the promise cannot be waited on, then the promise will be rejected.
+     *
+     * @param bool $unwrap
+     *
+     * @return mixed
+     * @throws \LogicException if the promise has no wait function or if the
+     *                         promise does not settle after waiting.
+     */
+    public function wait($unwrap = true);
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/PromisorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/PromisorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/PromisorInterface.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * Interface used with classes that return a promise.
+ */
+interface PromisorInterface
+{
+    /**
+     * Returns a promise.
+     *
+     * @return PromiseInterface
+     */
+    public function promise();
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/RejectedPromise.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/RejectedPromise.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/RejectedPromise.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * A promise that has been rejected.
+ *
+ * Thenning off of this promise will invoke the onRejected callback
+ * immediately and ignore other callbacks.
+ */
+class RejectedPromise implements PromiseInterface
+{
+    private $reason;
+
+    public function __construct($reason)
+    {
+        if (method_exists($reason, 'then')) {
+            throw new \InvalidArgumentException(
+                'You cannot create a RejectedPromise with a promise.');
+        }
+
+        $this->reason = $reason;
+    }
+
+    public function then(
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        // If there's no onRejected callback then just return self.
+        if (!$onRejected) {
+            return $this;
+        }
+
+        $queue = queue();
+        $reason = $this->reason;
+        $p = new Promise([$queue, 'run']);
+        $queue->add(static function () use ($p, $reason, $onRejected) {
+            if ($p->getState() === self::PENDING) {
+                try {
+                    // Return a resolved promise if onRejected does not throw.
+                    $p->resolve($onRejected($reason));
+                } catch (\Exception $e) {
+                    // onRejected threw, so return a rejected promise.
+                    $p->reject($e);
+                }
+            }
+        });
+
+        return $p;
+    }
+
+    public function otherwise(callable $onRejected)
+    {
+        return $this->then(null, $onRejected);
+    }
+
+    public function wait($unwrap = true, $defaultDelivery = null)
+    {
+        if ($unwrap) {
+            throw exception_for($this->reason);
+        }
+    }
+
+    public function getState()
+    {
+        return self::REJECTED;
+    }
+
+    public function resolve($value)
+    {
+        throw new \LogicException("Cannot resolve a rejected promise");
+    }
+
+    public function reject($reason)
+    {
+        if ($reason !== $this->reason) {
+            throw new \LogicException("Cannot reject a rejected promise");
+        }
+    }
+
+    public function cancel()
+    {
+        // pass
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/RejectionException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/RejectionException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/RejectionException.php	(revision 5534)
@@ -0,0 +1,47 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * A special exception that is thrown when waiting on a rejected promise.
+ *
+ * The reason value is available via the getReason() method.
+ */
+class RejectionException extends \RuntimeException
+{
+    /** @var mixed Rejection reason. */
+    private $reason;
+
+    /**
+     * @param mixed $reason       Rejection reason.
+     * @param string $description Optional description
+     */
+    public function __construct($reason, $description = null)
+    {
+        $this->reason = $reason;
+
+        $message = 'The promise was rejected';
+
+        if ($description) {
+            $message .= ' with reason: ' . $description;
+        } elseif (is_string($reason)
+            || (is_object($reason) && method_exists($reason, '__toString'))
+        ) {
+            $message .= ' with reason: ' . $this->reason;
+        } elseif ($reason instanceof \JsonSerializable) {
+            $message .= ' with reason: '
+                . json_encode($this->reason, JSON_PRETTY_PRINT);
+        }
+
+        parent::__construct($message);
+    }
+
+    /**
+     * Returns the rejection reason.
+     *
+     * @return mixed
+     */
+    public function getReason()
+    {
+        return $this->reason;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/TaskQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/TaskQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/TaskQueue.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * A task queue that executes tasks in a FIFO order.
+ *
+ * This task queue class is used to settle promises asynchronously and
+ * maintains a constant stack size. You can use the task queue asynchronously
+ * by calling the `run()` function of the global task queue in an event loop.
+ *
+ *     GuzzleHttp\Promise\queue()->run();
+ */
+class TaskQueue
+{
+    private $enableShutdown = true;
+    private $queue = [];
+
+    public function __construct($withShutdown = true)
+    {
+        if ($withShutdown) {
+            register_shutdown_function(function () {
+                if ($this->enableShutdown) {
+                    // Only run the tasks if an E_ERROR didn't occur.
+                    $err = error_get_last();
+                    if (!$err || ($err['type'] ^ E_ERROR)) {
+                        $this->run();
+                    }
+                }
+            });
+        }
+    }
+
+    /**
+     * Returns true if the queue is empty.
+     *
+     * @return bool
+     */
+    public function isEmpty()
+    {
+        return !$this->queue;
+    }
+
+    /**
+     * Adds a task to the queue that will be executed the next time run is
+     * called.
+     *
+     * @param callable $task
+     */
+    public function add(callable $task)
+    {
+        $this->queue[] = $task;
+    }
+
+    /**
+     * Execute all of the pending task in the queue.
+     */
+    public function run()
+    {
+        while ($task = array_shift($this->queue)) {
+            $task();
+        }
+    }
+
+    /**
+     * The task queue will be run and exhausted by default when the process
+     * exits IFF the exit is not the result of a PHP E_ERROR error.
+     *
+     * You can disable running the automatic shutdown of the queue by calling
+     * this function. If you disable the task queue shutdown process, then you
+     * MUST either run the task queue (as a result of running your event loop
+     * or manually using the run() method) or wait on each outstanding promise.
+     *
+     * Note: This shutdown will occur before any destructors are triggered.
+     */
+    public function disableShutdown()
+    {
+        $this->enableShutdown = false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/functions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/functions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/functions.php	(revision 5534)
@@ -0,0 +1,495 @@
+<?php
+namespace GuzzleHttp\Promise;
+
+/**
+ * Get the global task queue used for promise resolution.
+ *
+ * This task queue MUST be run in an event loop in order for promises to be
+ * settled asynchronously. It will be automatically run when synchronously
+ * waiting on a promise.
+ *
+ * <code>
+ * while ($eventLoop->isRunning()) {
+ *     GuzzleHttp\Promise\queue()->run();
+ * }
+ * </code>
+ *
+ * @return TaskQueue
+ */
+function queue()
+{
+    static $queue;
+
+    if (!$queue) {
+        $queue = new TaskQueue();
+    }
+
+    return $queue;
+}
+
+/**
+ * Adds a function to run in the task queue when it is next `run()` and returns
+ * a promise that is fulfilled or rejected with the result.
+ *
+ * @param callable $task Task function to run.
+ *
+ * @return PromiseInterface
+ */
+function task(callable $task)
+{
+    $queue = queue();
+    $promise = new Promise([$queue, 'run']);
+    $queue->add(function () use ($task, $promise) {
+        try {
+            $promise->resolve($task());
+        } catch (\Exception $e) {
+            $promise->reject($e);
+        }
+    });
+
+    return $promise;
+}
+
+/**
+ * Creates a promise for a value if the value is not a promise.
+ *
+ * @param mixed $value Promise or value.
+ *
+ * @return PromiseInterface
+ */
+function promise_for($value)
+{
+    if ($value instanceof PromiseInterface) {
+        return $value;
+    }
+
+    // Return a Guzzle promise that shadows the given promise.
+    if (method_exists($value, 'then')) {
+        $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
+        $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
+        $promise = new Promise($wfn, $cfn);
+        $value->then([$promise, 'resolve'], [$promise, 'reject']);
+        return $promise;
+    }
+
+    return new FulfilledPromise($value);
+}
+
+/**
+ * Creates a rejected promise for a reason if the reason is not a promise. If
+ * the provided reason is a promise, then it is returned as-is.
+ *
+ * @param mixed $reason Promise or reason.
+ *
+ * @return PromiseInterface
+ */
+function rejection_for($reason)
+{
+    if ($reason instanceof PromiseInterface) {
+        return $reason;
+    }
+
+    return new RejectedPromise($reason);
+}
+
+/**
+ * Create an exception for a rejected promise value.
+ *
+ * @param mixed $reason
+ *
+ * @return \Exception
+ */
+function exception_for($reason)
+{
+    return $reason instanceof \Exception
+        ? $reason
+        : new RejectionException($reason);
+}
+
+/**
+ * Returns an iterator for the given value.
+ *
+ * @param mixed $value
+ *
+ * @return \Iterator
+ */
+function iter_for($value)
+{
+    if ($value instanceof \Iterator) {
+        return $value;
+    } elseif (is_array($value)) {
+        return new \ArrayIterator($value);
+    } else {
+        return new \ArrayIterator([$value]);
+    }
+}
+
+/**
+ * Synchronously waits on a promise to resolve and returns an inspection state
+ * array.
+ *
+ * Returns a state associative array containing a "state" key mapping to a
+ * valid promise state. If the state of the promise is "fulfilled", the array
+ * will contain a "value" key mapping to the fulfilled value of the promise. If
+ * the promise is rejected, the array will contain a "reason" key mapping to
+ * the rejection reason of the promise.
+ *
+ * @param PromiseInterface $promise Promise or value.
+ *
+ * @return array
+ */
+function inspect(PromiseInterface $promise)
+{
+    try {
+        return [
+            'state' => PromiseInterface::FULFILLED,
+            'value' => $promise->wait()
+        ];
+    } catch (RejectionException $e) {
+        return ['state' => 'rejected', 'reason' => $e->getReason()];
+    } catch (\Exception $e) {
+        return ['state' => 'rejected', 'reason' => $e];
+    }
+}
+
+/**
+ * Waits on all of the provided promises, but does not unwrap rejected promises
+ * as thrown exception.
+ *
+ * Returns an array of inspection state arrays.
+ *
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
+ *
+ * @return array
+ * @see GuzzleHttp\Promise\inspect for the inspection state array format.
+ */
+function inspect_all($promises)
+{
+    $results = [];
+    foreach ($promises as $key => $promise) {
+        $results[$key] = inspect($promise);
+    }
+
+    return $results;
+}
+
+/**
+ * Waits on all of the provided promises and returns the fulfilled values.
+ *
+ * Returns an array that contains the value of each promise (in the same order
+ * the promises were provided). An exception is thrown if any of the promises
+ * are rejected.
+ *
+ * @param mixed $promises Iterable of PromiseInterface objects to wait on.
+ *
+ * @return array
+ * @throws \Exception on error
+ */
+function unwrap($promises)
+{
+    $results = [];
+    foreach ($promises as $key => $promise) {
+        $results[$key] = $promise->wait();
+    }
+
+    return $results;
+}
+
+/**
+ * Given an array of promises, return a promise that is fulfilled when all the
+ * items in the array are fulfilled.
+ *
+ * The promise's fulfillment value is an array with fulfillment values at
+ * respective positions to the original array. If any promise in the array
+ * rejects, the returned promise is rejected with the rejection reason.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return Promise
+ */
+function all($promises)
+{
+    $results = [];
+    return each(
+        $promises,
+        function ($value, $idx) use (&$results) {
+            $results[$idx] = $value;
+        },
+        function ($reason, $idx, Promise $aggregate) {
+            $aggregate->reject($reason);
+        }
+    )->then(function () use (&$results) {
+        ksort($results);
+        return $results;
+    });
+}
+
+/**
+ * Initiate a competitive race between multiple promises or values (values will
+ * become immediately fulfilled promises).
+ *
+ * When count amount of promises have been fulfilled, the returned promise is
+ * fulfilled with an array that contains the fulfillment values of the winners
+ * in order of resolution.
+ *
+ * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException}
+ * if the number of fulfilled promises is less than the desired $count.
+ *
+ * @param int   $count    Total number of promises.
+ * @param mixed $promises Promises or values.
+ *
+ * @return Promise
+ */
+function some($count, $promises)
+{
+    $results = [];
+    $rejections = [];
+
+    return each(
+        $promises,
+        function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
+            if ($p->getState() !== PromiseInterface::PENDING) {
+                return;
+            }
+            $results[$idx] = $value;
+            if (count($results) >= $count) {
+                $p->resolve(null);
+            }
+        },
+        function ($reason) use (&$rejections) {
+            $rejections[] = $reason;
+        }
+    )->then(
+        function () use (&$results, &$rejections, $count) {
+            if (count($results) !== $count) {
+                throw new AggregateException(
+                    'Not enough promises to fulfill count',
+                    $rejections
+                );
+            }
+            ksort($results);
+            return array_values($results);
+        }
+    );
+}
+
+/**
+ * Like some(), with 1 as count. However, if the promise fulfills, the
+ * fulfillment value is not an array of 1 but the value directly.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return PromiseInterface
+ */
+function any($promises)
+{
+    return some(1, $promises)->then(function ($values) { return $values[0]; });
+}
+
+/**
+ * Returns a promise that is fulfilled when all of the provided promises have
+ * been fulfilled or rejected.
+ *
+ * The returned promise is fulfilled with an array of inspection state arrays.
+ *
+ * @param mixed $promises Promises or values.
+ *
+ * @return Promise
+ * @see GuzzleHttp\Promise\inspect for the inspection state array format.
+ */
+function settle($promises)
+{
+    $results = [];
+
+    return each(
+        $promises,
+        function ($value, $idx) use (&$results) {
+            $results[$idx] = ['state' => 'fulfilled', 'value' => $value];
+        },
+        function ($reason, $idx) use (&$results) {
+            $results[$idx] = ['state' => 'rejected', 'reason' => $reason];
+        }
+    )->then(function () use (&$results) {
+        ksort($results);
+        return $results;
+    });
+}
+
+/**
+ * Given an iterator that yields promises or values, returns a promise that is
+ * fulfilled with a null value when the iterator has been consumed or the
+ * aggregate promise has been fulfilled or rejected.
+ *
+ * $onFulfilled is a function that accepts the fulfilled value, iterator
+ * index, and the aggregate promise. The callback can invoke any necessary side
+ * effects and choose to resolve or reject the aggregate promise if needed.
+ *
+ * $onRejected is a function that accepts the rejection reason, iterator
+ * index, and the aggregate promise. The callback can invoke any necessary side
+ * effects and choose to resolve or reject the aggregate promise if needed.
+ *
+ * @param mixed    $iterable    Iterator or array to iterate over.
+ * @param callable $onFulfilled
+ * @param callable $onRejected
+ *
+ * @return Promise
+ */
+function each(
+    $iterable,
+    callable $onFulfilled = null,
+    callable $onRejected = null
+) {
+    return (new EachPromise($iterable, [
+        'fulfilled' => $onFulfilled,
+        'rejected'  => $onRejected
+    ]))->promise();
+}
+
+/**
+ * Like each, but only allows a certain number of outstanding promises at any
+ * given time.
+ *
+ * $concurrency may be an integer or a function that accepts the number of
+ * pending promises and returns a numeric concurrency limit value to allow for
+ * dynamic a concurrency size.
+ *
+ * @param mixed        $iterable
+ * @param int|callable $concurrency
+ * @param callable     $onFulfilled
+ * @param callable     $onRejected
+ *
+ * @return mixed
+ */
+function each_limit(
+    $iterable,
+    $concurrency,
+    callable $onFulfilled = null,
+    callable $onRejected = null
+) {
+    return (new EachPromise($iterable, [
+        'fulfilled'   => $onFulfilled,
+        'rejected'    => $onRejected,
+        'concurrency' => $concurrency
+    ]))->promise();
+}
+
+/**
+ * Like each_limit, but ensures that no promise in the given $iterable argument
+ * is rejected. If any promise is rejected, then the aggregate promise is
+ * rejected with the encountered rejection.
+ *
+ * @param mixed        $iterable
+ * @param int|callable $concurrency
+ * @param callable     $onFulfilled
+ *
+ * @return mixed
+ */
+function each_limit_all(
+    $iterable,
+    $concurrency,
+    callable $onFulfilled = null
+) {
+    return each_limit(
+        $iterable,
+        $concurrency,
+        $onFulfilled,
+        function ($reason, $idx, PromiseInterface $aggregate) {
+            $aggregate->reject($reason);
+        }
+    );
+}
+
+/**
+ * Returns true if a promise is fulfilled.
+ *
+ * @param PromiseInterface $promise
+ *
+ * @return bool
+ */
+function is_fulfilled(PromiseInterface $promise)
+{
+    return $promise->getState() === PromiseInterface::FULFILLED;
+}
+
+/**
+ * Returns true if a promise is rejected.
+ *
+ * @param PromiseInterface $promise
+ *
+ * @return bool
+ */
+function is_rejected(PromiseInterface $promise)
+{
+    return $promise->getState() === PromiseInterface::REJECTED;
+}
+
+/**
+ * Returns true if a promise is fulfilled or rejected.
+ *
+ * @param PromiseInterface $promise
+ *
+ * @return bool
+ */
+function is_settled(PromiseInterface $promise)
+{
+    return $promise->getState() !== PromiseInterface::PENDING;
+}
+
+/**
+ * Creates a promise that is resolved using a generator that yields values or
+ * promises (somewhat similar to C#'s async keyword).
+ *
+ * When called, the coroutine function will start an instance of the generator
+ * and returns a promise that is fulfilled with its final yielded value.
+ *
+ * Control is returned back to the generator when the yielded promise settles.
+ * This can lead to less verbose code when doing lots of sequential async calls
+ * with minimal processing in between.
+ *
+ *     use GuzzleHttp\Promise;
+ *
+ *     function createPromise($value) {
+ *         return new Promise\FulfilledPromise($value);
+ *     }
+ *
+ *     $promise = Promise\coroutine(function () {
+ *         $value = (yield createPromise('a'));
+ *         try {
+ *             $value = (yield createPromise($value . 'b'));
+ *         } catch (\Exception $e) {
+ *             // The promise was rejected.
+ *         }
+ *         yield $value . 'c';
+ *     });
+ *
+ *     // Outputs "abc"
+ *     $promise->then(function ($v) { echo $v; });
+ *
+ * @param callable $generatorFn Generator function to wrap into a promise.
+ *
+ * @return Promise
+ * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
+ */
+function coroutine(callable $generatorFn)
+{
+    $generator = $generatorFn();
+    return __next_coroutine($generator->current(), $generator)->then();
+}
+
+/** @internal */
+function __next_coroutine($yielded, \Generator $generator)
+{
+    return promise_for($yielded)->then(
+        function ($value) use ($generator) {
+            $nextYield = $generator->send($value);
+            return $generator->valid()
+                ? __next_coroutine($nextYield, $generator)
+                : $value;
+        },
+        function ($reason) use ($generator) {
+            $nextYield = $generator->throw(exception_for($reason));
+            // The throw was caught, so keep iterating on the coroutine
+            return __next_coroutine($nextYield, $generator);
+        }
+    );
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/functions_include.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/functions_include.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/src/functions_include.php	(revision 5534)
@@ -0,0 +1,6 @@
+<?php
+
+// Don't redefine the functions if included multiple times.
+if (!function_exists('GuzzleHttp\Promise\promise_for')) {
+    require __DIR__ . '/functions.php';
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/AggregateExceptionTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/AggregateExceptionTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/AggregateExceptionTest.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\AggregateException;
+
+class AggregateExceptionTest extends \PHPUnit_Framework_TestCase
+{
+    public function testHasReason()
+    {
+        $e = new AggregateException('foo', ['baz', 'bar']);
+        $this->assertContains('foo', $e->getMessage());
+        $this->assertEquals(['baz', 'bar'], $e->getReason());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/EachPromiseTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/EachPromiseTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/EachPromiseTest.php	(revision 5534)
@@ -0,0 +1,294 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\Promise\FulfilledPromise;
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Promise\EachPromise;
+use GuzzleHttp\Promise as P;
+
+/**
+ * @covers GuzzleHttp\Promise\EachPromise
+ */
+class EachPromiseTest extends \PHPUnit_Framework_TestCase
+{
+    public function testReturnsSameInstance()
+    {
+        $each = new EachPromise([], ['concurrency' => 100]);
+        $this->assertSame($each->promise(), $each->promise());
+    }
+
+    public function testInvokesAllPromises()
+    {
+        $promises = [new Promise(), new Promise(), new Promise()];
+        $called = [];
+        $each = new EachPromise($promises, [
+            'fulfilled' => function ($value) use (&$called) {
+                $called[] = $value;
+            }
+        ]);
+        $p = $each->promise();
+        $promises[0]->resolve('a');
+        $promises[1]->resolve('c');
+        $promises[2]->resolve('b');
+        P\queue()->run();
+        $this->assertEquals(['a', 'c', 'b'], $called);
+        $this->assertEquals(PromiseInterface::FULFILLED, $p->getState());
+    }
+
+    public function testIsWaitable()
+    {
+        $a = new Promise(function () use (&$a) { $a->resolve('a'); });
+        $b = new Promise(function () use (&$b) { $b->resolve('b'); });
+        $called = [];
+        $each = new EachPromise([$a, $b], [
+            'fulfilled' => function ($value) use (&$called) { $called[] = $value; }
+        ]);
+        $p = $each->promise();
+        $this->assertNull($p->wait());
+        $this->assertEquals(PromiseInterface::FULFILLED, $p->getState());
+        $this->assertEquals(['a', 'b'], $called);
+    }
+
+    public function testCanResolveBeforeConsumingAll()
+    {
+        $called = 0;
+        $a = new Promise(function () use (&$a) { $a->resolve('a'); });
+        $b = new Promise(function () { $this->fail(); });
+        $each = new EachPromise([$a, $b], [
+            'fulfilled' => function ($value, $idx, Promise $aggregate) use (&$called) {
+                $this->assertSame($idx, 0);
+                $this->assertEquals('a', $value);
+                $aggregate->resolve(null);
+                $called++;
+            },
+            'rejected' => function (\Exception $reason) {
+                $this->fail($reason->getMessage());
+            }
+        ]);
+        $p = $each->promise();
+        $p->wait();
+        $this->assertNull($p->wait());
+        $this->assertEquals(1, $called);
+        $this->assertEquals(PromiseInterface::FULFILLED, $a->getState());
+        $this->assertEquals(PromiseInterface::PENDING, $b->getState());
+        // Resolving $b has no effect on the aggregate promise.
+        $b->resolve('foo');
+        $this->assertEquals(1, $called);
+    }
+
+    public function testLimitsPendingPromises()
+    {
+        $pending = [new Promise(), new Promise(), new Promise(), new Promise()];
+        $promises = new \ArrayIterator($pending);
+        $each = new EachPromise($promises, ['concurrency' => 2]);
+        $p = $each->promise();
+        $this->assertCount(2, $this->readAttribute($each, 'pending'));
+        $pending[0]->resolve('a');
+        $this->assertCount(2, $this->readAttribute($each, 'pending'));
+        $this->assertTrue($promises->valid());
+        $pending[1]->resolve('b');
+        P\queue()->run();
+        $this->assertCount(2, $this->readAttribute($each, 'pending'));
+        $this->assertTrue($promises->valid());
+        $promises[2]->resolve('c');
+        P\queue()->run();
+        $this->assertCount(1, $this->readAttribute($each, 'pending'));
+        $this->assertEquals(PromiseInterface::PENDING, $p->getState());
+        $promises[3]->resolve('d');
+        P\queue()->run();
+        $this->assertNull($this->readAttribute($each, 'pending'));
+        $this->assertEquals(PromiseInterface::FULFILLED, $p->getState());
+        $this->assertFalse($promises->valid());
+    }
+
+    public function testDynamicallyLimitsPendingPromises()
+    {
+        $calls = [];
+        $pendingFn = function ($count) use (&$calls) {
+            $calls[] = $count;
+            return 2;
+        };
+        $pending = [new Promise(), new Promise(), new Promise(), new Promise()];
+        $promises = new \ArrayIterator($pending);
+        $each = new EachPromise($promises, ['concurrency' => $pendingFn]);
+        $p = $each->promise();
+        $this->assertCount(2, $this->readAttribute($each, 'pending'));
+        $pending[0]->resolve('a');
+        $this->assertCount(2, $this->readAttribute($each, 'pending'));
+        $this->assertTrue($promises->valid());
+        $pending[1]->resolve('b');
+        $this->assertCount(2, $this->readAttribute($each, 'pending'));
+        P\queue()->run();
+        $this->assertTrue($promises->valid());
+        $promises[2]->resolve('c');
+        P\queue()->run();
+        $this->assertCount(1, $this->readAttribute($each, 'pending'));
+        $this->assertEquals(PromiseInterface::PENDING, $p->getState());
+        $promises[3]->resolve('d');
+        P\queue()->run();
+        $this->assertNull($this->readAttribute($each, 'pending'));
+        $this->assertEquals(PromiseInterface::FULFILLED, $p->getState());
+        $this->assertEquals([0, 1, 1, 1], $calls);
+        $this->assertFalse($promises->valid());
+    }
+
+    public function testClearsReferencesWhenResolved()
+    {
+        $called = false;
+        $a = new Promise(function () use (&$a, &$called) {
+            $a->resolve('a');
+            $called = true;
+        });
+        $each = new EachPromise([$a], [
+            'concurrency'       => function () { return 1; },
+            'fulfilled' => function () {},
+            'rejected'  => function () {}
+        ]);
+        $each->promise()->wait();
+        $this->assertNull($this->readAttribute($each, 'onFulfilled'));
+        $this->assertNull($this->readAttribute($each, 'onRejected'));
+        $this->assertNull($this->readAttribute($each, 'iterable'));
+        $this->assertNull($this->readAttribute($each, 'pending'));
+        $this->assertNull($this->readAttribute($each, 'concurrency'));
+        $this->assertTrue($called);
+    }
+
+    public function testCanBeCancelled()
+    {
+        $this->markTestIncomplete();
+    }
+
+    public function testFulfillsImmediatelyWhenGivenAnEmptyIterator()
+    {
+        $each = new EachPromise(new \ArrayIterator([]));
+        $result = $each->promise()->wait();
+    }
+
+    public function testDoesNotBlowStackWithFulfilledPromises()
+    {
+        $pending = [];
+        for ($i = 0; $i < 100; $i++) {
+            $pending[] = new FulfilledPromise($i);
+        }
+        $values = [];
+        $each = new EachPromise($pending, [
+            'fulfilled' => function ($value) use (&$values) {
+                $values[] = $value;
+            }
+        ]);
+        $called = false;
+        $each->promise()->then(function () use (&$called) {
+            $called = true;
+        });
+        $this->assertFalse($called);
+        P\queue()->run();
+        $this->assertTrue($called);
+        $this->assertEquals(range(0, 99), $values);
+    }
+
+    public function testDoesNotBlowStackWithRejectedPromises()
+    {
+        $pending = [];
+        for ($i = 0; $i < 100; $i++) {
+            $pending[] = new RejectedPromise($i);
+        }
+        $values = [];
+        $each = new EachPromise($pending, [
+            'rejected' => function ($value) use (&$values) {
+                $values[] = $value;
+            }
+        ]);
+        $called = false;
+        $each->promise()->then(
+            function () use (&$called) { $called = true; },
+            function () { $this->fail('Should not have rejected.'); }
+        );
+        $this->assertFalse($called);
+        P\queue()->run();
+        $this->assertTrue($called);
+        $this->assertEquals(range(0, 99), $values);
+    }
+
+    public function testReturnsPromiseForWhatever()
+    {
+        $called = [];
+        $arr = ['a', 'b'];
+        $each = new EachPromise($arr, [
+            'fulfilled' => function ($v) use (&$called) { $called[] = $v; }
+        ]);
+        $p = $each->promise();
+        $this->assertNull($p->wait());
+        $this->assertEquals(['a', 'b'], $called);
+    }
+
+    public function testRejectsAggregateWhenNextThrows()
+    {
+        $iter = function () {
+            yield 'a';
+            throw new \Exception('Failure');
+        };
+        $each = new EachPromise($iter());
+        $p = $each->promise();
+        $e = null;
+        $received = null;
+        $p->then(null, function ($reason) use (&$e) { $e = $reason; });
+        P\queue()->run();
+        $this->assertInstanceOf('Exception', $e);
+        $this->assertEquals('Failure', $e->getMessage());
+    }
+
+    public function testDoesNotCallNextOnIteratorUntilNeededWhenWaiting()
+    {
+        $results = [];
+        $values = [10];
+        $remaining = 9;
+        $iter = function () use (&$values) {
+            while ($value = array_pop($values)) {
+                yield $value;
+            }
+        };
+        $each = new EachPromise($iter(), [
+            'concurrency' => 1,
+            'fulfilled' => function ($r) use (&$results, &$values, &$remaining) {
+                $results[] = $r;
+                if ($remaining > 0) {
+                    $values[] = $remaining--;
+                }
+            }
+        ]);
+        $each->promise()->wait();
+        $this->assertEquals(range(10, 1), $results);
+    }
+
+    public function testDoesNotCallNextOnIteratorUntilNeededWhenAsync()
+    {
+        $firstPromise = new Promise();
+        $pending = [$firstPromise];
+        $values = [$firstPromise];
+        $results = [];
+        $remaining = 9;
+        $iter = function () use (&$values) {
+            while ($value = array_pop($values)) {
+                yield $value;
+            }
+        };
+        $each = new EachPromise($iter(), [
+            'concurrency' => 1,
+            'fulfilled' => function ($r) use (&$results, &$values, &$remaining, &$pending) {
+                $results[] = $r;
+                if ($remaining-- > 0) {
+                    $pending[] = $values[] = new Promise();
+                }
+            }
+        ]);
+        $i = 0;
+        $each->promise();
+        while ($promise = array_pop($pending)) {
+            $promise->resolve($i++);
+            P\queue()->run();
+        }
+        $this->assertEquals(range(0, 9), $results);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php	(revision 5534)
@@ -0,0 +1,108 @@
+<?php
+namespace GuzzleHttp\Tests\Promise;
+
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\FulfilledPromise;
+
+/**
+ * @covers GuzzleHttp\Promise\FulfilledPromise
+ */
+class FulfilledPromiseTest extends \PHPUnit_Framework_TestCase
+{
+    public function testReturnsValueWhenWaitedUpon()
+    {
+        $p = new FulfilledPromise('foo');
+        $this->assertEquals('fulfilled', $p->getState());
+        $this->assertEquals('foo', $p->wait(true));
+    }
+
+    public function testCannotCancel()
+    {
+        $p = new FulfilledPromise('foo');
+        $this->assertEquals('fulfilled', $p->getState());
+        $p->cancel();
+        $this->assertEquals('foo', $p->wait());
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @exepctedExceptionMessage Cannot resolve a fulfilled promise
+     */
+    public function testCannotResolve()
+    {
+        $p = new FulfilledPromise('foo');
+        $p->resolve('bar');
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @exepctedExceptionMessage Cannot reject a fulfilled promise
+     */
+    public function testCannotReject()
+    {
+        $p = new FulfilledPromise('foo');
+        $p->reject('bar');
+    }
+
+    public function testCanResolveWithSameValue()
+    {
+        $p = new FulfilledPromise('foo');
+        $p->resolve('foo');
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testCannotResolveWithPromise()
+    {
+        new FulfilledPromise(new Promise());
+    }
+
+    public function testReturnsSelfWhenNoOnFulfilled()
+    {
+        $p = new FulfilledPromise('a');
+        $this->assertSame($p, $p->then());
+    }
+
+    public function testAsynchronouslyInvokesOnFulfilled()
+    {
+        $p = new FulfilledPromise('a');
+        $r = null;
+        $f = function ($d) use (&$r) { $r = $d; };
+        $p2 = $p->then($f);
+        $this->assertNotSame($p, $p2);
+        $this->assertNull($r);
+        \GuzzleHttp\Promise\queue()->run();
+        $this->assertEquals('a', $r);
+    }
+
+    public function testReturnsNewRejectedWhenOnFulfilledFails()
+    {
+        $p = new FulfilledPromise('a');
+        $f = function () { throw new \Exception('b'); };
+        $p2 = $p->then($f);
+        $this->assertNotSame($p, $p2);
+        try {
+            $p2->wait();
+            $this->fail();
+        } catch (\Exception $e) {
+            $this->assertEquals('b', $e->getMessage());
+        }
+    }
+
+    public function testOtherwiseIsSugarForRejections()
+    {
+        $c = null;
+        $p = new FulfilledPromise('foo');
+        $p->otherwise(function ($v) use (&$c) { $c = $v; });
+        $this->assertNull($c);
+    }
+
+    public function testDoesNotTryToFulfillTwiceDuringTrampoline()
+    {
+        $fp = new FulfilledPromise('a');
+        $t1 = $fp->then(function ($v) { return $v . ' b'; });
+        $t1->resolve('why!');
+        $this->assertEquals('why!', $t1->wait());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php	(revision 5534)
@@ -0,0 +1,50 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\PromiseInterface;
+
+class NotPromiseInstance extends Thennable implements PromiseInterface
+{
+    private $nextPromise = null;
+
+    public function __construct()
+    {
+        $this->nextPromise = new Promise();
+    }
+
+    public function then(callable $res = null, callable $rej = null)
+    {
+        return $this->nextPromise->then($res, $rej);
+    }
+
+    public function otherwise(callable $onRejected)
+    {
+        return $this->then($onRejected);
+    }
+
+    public function resolve($value)
+    {
+        $this->nextPromise->resolve($value);
+    }
+
+    public function reject($reason)
+    {
+        $this->nextPromise->reject($reason);
+    }
+
+    public function wait($unwrap = true, $defaultResolution = null)
+    {
+
+    }
+
+    public function cancel()
+    {
+
+    }
+
+    public function getState()
+    {
+        return $this->nextPromise->getState();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/PromiseTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/PromiseTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/PromiseTest.php	(revision 5534)
@@ -0,0 +1,579 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\CancellationException;
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\RejectedPromise;
+use GuzzleHttp\Promise\RejectionException;
+
+/**
+ * @covers GuzzleHttp\Promise\Promise
+ */
+class PromiseTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @expectedException \LogicException
+     * @expectedExceptionMessage The promise is already fulfilled
+     */
+    public function testCannotResolveNonPendingPromise()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $p->resolve('bar');
+        $this->assertEquals('foo', $p->wait());
+    }
+
+    public function testCanResolveWithSameValue()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $p->resolve('foo');
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @expectedExceptionMessage Cannot change a fulfilled promise to rejected
+     */
+    public function testCannotRejectNonPendingPromise()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $p->reject('bar');
+        $this->assertEquals('foo', $p->wait());
+    }
+
+    public function testCanRejectWithSameValue()
+    {
+        $p = new Promise();
+        $p->reject('foo');
+        $p->reject('foo');
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @expectedExceptionMessage Cannot change a fulfilled promise to rejected
+     */
+    public function testCannotRejectResolveWithSameValue()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $p->reject('foo');
+    }
+
+    public function testInvokesWaitFunction()
+    {
+        $p = new Promise(function () use (&$p) { $p->resolve('10'); });
+        $this->assertEquals('10', $p->wait());
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\RejectionException
+     */
+    public function testRejectsAndThrowsWhenWaitFailsToResolve()
+    {
+        $p = new Promise(function () {});
+        $p->wait();
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\RejectionException
+     * @expectedExceptionMessage The promise was rejected with reason: foo
+     */
+    public function testThrowsWhenUnwrapIsRejectedWithNonException()
+    {
+        $p = new Promise(function () use (&$p) { $p->reject('foo'); });
+        $p->wait();
+    }
+
+    /**
+     * @expectedException \UnexpectedValueException
+     * @expectedExceptionMessage foo
+     */
+    public function testThrowsWhenUnwrapIsRejectedWithException()
+    {
+        $e = new \UnexpectedValueException('foo');
+        $p = new Promise(function () use (&$p, $e) { $p->reject($e); });
+        $p->wait();
+    }
+
+    public function testDoesNotUnwrapExceptionsWhenDisabled()
+    {
+        $p = new Promise(function () use (&$p) { $p->reject('foo'); });
+        $this->assertEquals('pending', $p->getState());
+        $p->wait(false);
+        $this->assertEquals('rejected', $p->getState());
+    }
+
+    public function testRejectsSelfWhenWaitThrows()
+    {
+        $e = new \UnexpectedValueException('foo');
+        $p = new Promise(function () use ($e) { throw $e; });
+        try {
+            $p->wait();
+            $this->fail();
+        } catch (\UnexpectedValueException $e) {
+            $this->assertEquals('rejected', $p->getState());
+        }
+    }
+
+    public function testWaitsOnNestedPromises()
+    {
+        $p = new Promise(function () use (&$p) { $p->resolve('_'); });
+        $p2 = new Promise(function () use (&$p2) { $p2->resolve('foo'); });
+        $p3 = $p->then(function () use ($p2) { return $p2; });
+        $this->assertSame('foo', $p3->wait());
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\RejectionException
+     */
+    public function testThrowsWhenWaitingOnPromiseWithNoWaitFunction()
+    {
+        $p = new Promise();
+        $p->wait();
+    }
+
+    public function testThrowsWaitExceptionAfterPromiseIsResolved()
+    {
+        $p = new Promise(function () use (&$p) {
+            $p->reject('Foo!');
+            throw new \Exception('Bar?');
+        });
+
+        try {
+            $p->wait();
+            $this->fail();
+        } catch (\Exception $e) {
+            $this->assertEquals('Bar?', $e->getMessage());
+        }
+    }
+
+    public function testGetsActualWaitValueFromThen()
+    {
+        $p = new Promise(function () use (&$p) { $p->reject('Foo!'); });
+        $p2 = $p->then(null, function ($reason) {
+            return new RejectedPromise([$reason]);
+        });
+
+        try {
+            $p2->wait();
+            $this->fail('Should have thrown');
+        } catch (RejectionException $e) {
+            $this->assertEquals(['Foo!'], $e->getReason());
+        }
+    }
+
+    public function testWaitBehaviorIsBasedOnLastPromiseInChain()
+    {
+        $p3 = new Promise(function () use (&$p3) { $p3->resolve('Whoop'); });
+        $p2 = new Promise(function () use (&$p2, $p3) { $p2->reject($p3); });
+        $p = new Promise(function () use (&$p, $p2) { $p->reject($p2); });
+        $this->assertEquals('Whoop', $p->wait());
+    }
+
+    public function testCannotCancelNonPending()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $p->cancel();
+        $this->assertEquals('fulfilled', $p->getState());
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\CancellationException
+     */
+    public function testCancelsPromiseWhenNoCancelFunction()
+    {
+        $p = new Promise();
+        $p->cancel();
+        $this->assertEquals('rejected', $p->getState());
+        $p->wait();
+    }
+
+    public function testCancelsPromiseWithCancelFunction()
+    {
+        $called = false;
+        $p = new Promise(null, function () use (&$called) { $called = true; });
+        $p->cancel();
+        $this->assertEquals('rejected', $p->getState());
+        $this->assertTrue($called);
+    }
+
+    public function testCancelsUppermostPendingPromise()
+    {
+        $called = false;
+        $p1 = new Promise(null, function () use (&$called) { $called = true; });
+        $p2 = $p1->then(function () {});
+        $p3 = $p2->then(function () {});
+        $p4 = $p3->then(function () {});
+        $p3->cancel();
+        $this->assertEquals('rejected', $p1->getState());
+        $this->assertEquals('rejected', $p2->getState());
+        $this->assertEquals('rejected', $p3->getState());
+        $this->assertEquals('pending', $p4->getState());
+        $this->assertTrue($called);
+
+        try {
+            $p3->wait();
+            $this->fail();
+        } catch (CancellationException $e) {
+            $this->assertContains('cancelled', $e->getMessage());
+        }
+
+        try {
+            $p4->wait();
+            $this->fail();
+        } catch (CancellationException $e) {
+            $this->assertContains('cancelled', $e->getMessage());
+        }
+
+        $this->assertEquals('rejected', $p4->getState());
+    }
+
+    public function testCancelsChildPromises()
+    {
+        $called1 = $called2 = $called3 = false;
+        $p1 = new Promise(null, function () use (&$called1) { $called1 = true; });
+        $p2 = new Promise(null, function () use (&$called2) { $called2 = true; });
+        $p3 = new Promise(null, function () use (&$called3) { $called3 = true; });
+        $p4 = $p2->then(function () use ($p3) { return $p3; });
+        $p5 = $p4->then(function () { $this->fail(); });
+        $p4->cancel();
+        $this->assertEquals('pending', $p1->getState());
+        $this->assertEquals('rejected', $p2->getState());
+        $this->assertEquals('rejected', $p4->getState());
+        $this->assertEquals('pending', $p5->getState());
+        $this->assertFalse($called1);
+        $this->assertTrue($called2);
+        $this->assertFalse($called3);
+    }
+
+    public function testRejectsPromiseWhenCancelFails()
+    {
+        $called = false;
+        $p = new Promise(null, function () use (&$called) {
+            $called = true;
+            throw new \Exception('e');
+        });
+        $p->cancel();
+        $this->assertEquals('rejected', $p->getState());
+        $this->assertTrue($called);
+        try {
+            $p->wait();
+            $this->fail();
+        } catch (\Exception $e) {
+            $this->assertEquals('e', $e->getMessage());
+        }
+    }
+
+    public function testCreatesPromiseWhenFulfilledAfterThen()
+    {
+        $p = new Promise();
+        $carry = null;
+        $p2 = $p->then(function ($v) use (&$carry) { $carry = $v; });
+        $this->assertNotSame($p, $p2);
+        $p->resolve('foo');
+        P\queue()->run();
+
+        $this->assertEquals('foo', $carry);
+    }
+
+    public function testCreatesPromiseWhenFulfilledBeforeThen()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $carry = null;
+        $p2 = $p->then(function ($v) use (&$carry) { $carry = $v; });
+        $this->assertNotSame($p, $p2);
+        $this->assertNull($carry);
+        \GuzzleHttp\Promise\queue()->run();
+        $this->assertEquals('foo', $carry);
+    }
+
+    public function testCreatesPromiseWhenFulfilledWithNoCallback()
+    {
+        $p = new Promise();
+        $p->resolve('foo');
+        $p2 = $p->then();
+        $this->assertNotSame($p, $p2);
+        $this->assertInstanceOf('GuzzleHttp\Promise\FulfilledPromise', $p2);
+    }
+
+    public function testCreatesPromiseWhenRejectedAfterThen()
+    {
+        $p = new Promise();
+        $carry = null;
+        $p2 = $p->then(null, function ($v) use (&$carry) { $carry = $v; });
+        $this->assertNotSame($p, $p2);
+        $p->reject('foo');
+        P\queue()->run();
+        $this->assertEquals('foo', $carry);
+    }
+
+    public function testCreatesPromiseWhenRejectedBeforeThen()
+    {
+        $p = new Promise();
+        $p->reject('foo');
+        $carry = null;
+        $p2 = $p->then(null, function ($v) use (&$carry) { $carry = $v; });
+        $this->assertNotSame($p, $p2);
+        $this->assertNull($carry);
+        P\queue()->run();
+        $this->assertEquals('foo', $carry);
+    }
+
+    public function testCreatesPromiseWhenRejectedWithNoCallback()
+    {
+        $p = new Promise();
+        $p->reject('foo');
+        $p2 = $p->then();
+        $this->assertNotSame($p, $p2);
+        $this->assertInstanceOf('GuzzleHttp\Promise\RejectedPromise', $p2);
+    }
+
+    public function testInvokesWaitFnsForThens()
+    {
+        $p = new Promise(function () use (&$p) { $p->resolve('a'); });
+        $p2 = $p
+            ->then(function ($v) { return $v . '-1-'; })
+            ->then(function ($v) { return $v . '2'; });
+        $this->assertEquals('a-1-2', $p2->wait());
+    }
+
+    public function testStacksThenWaitFunctions()
+    {
+        $p1 = new Promise(function () use (&$p1) { $p1->resolve('a'); });
+        $p2 = new Promise(function () use (&$p2) { $p2->resolve('b'); });
+        $p3 = new Promise(function () use (&$p3) { $p3->resolve('c'); });
+        $p4 = $p1
+            ->then(function () use ($p2) { return $p2; })
+            ->then(function () use ($p3) { return $p3; });
+        $this->assertEquals('c', $p4->wait());
+    }
+
+    public function testForwardsFulfilledDownChainBetweenGaps()
+    {
+        $p = new Promise();
+        $r = $r2 = null;
+        $p->then(null, null)
+            ->then(function ($v) use (&$r) { $r = $v; return $v . '2'; })
+            ->then(function ($v) use (&$r2) { $r2 = $v; });
+        $p->resolve('foo');
+        P\queue()->run();
+        $this->assertEquals('foo', $r);
+        $this->assertEquals('foo2', $r2);
+    }
+
+    public function testForwardsRejectedPromisesDownChainBetweenGaps()
+    {
+        $p = new Promise();
+        $r = $r2 = null;
+        $p->then(null, null)
+            ->then(null, function ($v) use (&$r) { $r = $v; return $v . '2'; })
+            ->then(function ($v) use (&$r2) { $r2 = $v; });
+        $p->reject('foo');
+        P\queue()->run();
+        $this->assertEquals('foo', $r);
+        $this->assertEquals('foo2', $r2);
+    }
+
+    public function testForwardsThrownPromisesDownChainBetweenGaps()
+    {
+        $e = new \Exception();
+        $p = new Promise();
+        $r = $r2 = null;
+        $p->then(null, null)
+            ->then(null, function ($v) use (&$r, $e) {
+                $r = $v;
+                throw $e;
+            })
+            ->then(
+                null,
+                function ($v) use (&$r2) { $r2 = $v; }
+            );
+        $p->reject('foo');
+        P\queue()->run();
+        $this->assertEquals('foo', $r);
+        $this->assertSame($e, $r2);
+    }
+
+    public function testForwardsReturnedRejectedPromisesDownChainBetweenGaps()
+    {
+        $p = new Promise();
+        $rejected = new RejectedPromise('bar');
+        $r = $r2 = null;
+        $p->then(null, null)
+            ->then(null, function ($v) use (&$r, $rejected) {
+                $r = $v;
+                return $rejected;
+            })
+            ->then(
+                null,
+                function ($v) use (&$r2) { $r2 = $v; }
+            );
+        $p->reject('foo');
+        P\queue()->run();
+        $this->assertEquals('foo', $r);
+        $this->assertEquals('bar', $r2);
+        try {
+            $p->wait();
+        } catch (RejectionException $e) {
+            $this->assertEquals('foo', $e->getReason());
+        }
+    }
+
+    public function testForwardsHandlersToNextPromise()
+    {
+        $p = new Promise();
+        $p2 = new Promise();
+        $resolved = null;
+        $p
+            ->then(function ($v) use ($p2) { return $p2; })
+            ->then(function ($value) use (&$resolved) { $resolved = $value; });
+        $p->resolve('a');
+        $p2->resolve('b');
+        P\queue()->run();
+        $this->assertEquals('b', $resolved);
+    }
+
+    public function testRemovesReferenceFromChildWhenParentWaitedUpon()
+    {
+        $r = null;
+        $p = new Promise(function () use (&$p) { $p->resolve('a'); });
+        $p2 = new Promise(function () use (&$p2) { $p2->resolve('b'); });
+        $pb = $p->then(
+            function ($v) use ($p2, &$r) {
+                $r = $v;
+                return $p2;
+            })
+            ->then(function ($v) { return $v . '.'; });
+        $this->assertEquals('a', $p->wait());
+        $this->assertEquals('b', $p2->wait());
+        $this->assertEquals('b.', $pb->wait());
+        $this->assertEquals('a', $r);
+    }
+
+    public function testForwardsHandlersWhenFulfilledPromiseIsReturned()
+    {
+        $res = [];
+        $p = new Promise();
+        $p2 = new Promise();
+        $p2->resolve('foo');
+        $p2->then(function ($v) use (&$res) { $res[] = 'A:' . $v; });
+        // $res is A:foo
+        $p
+            ->then(function () use ($p2, &$res) { $res[] = 'B'; return $p2; })
+            ->then(function ($v) use (&$res) { $res[] = 'C:' . $v; });
+        $p->resolve('a');
+        $p->then(function ($v) use (&$res) { $res[] = 'D:' . $v; });
+        P\queue()->run();
+        $this->assertEquals(['A:foo', 'B', 'D:a', 'C:foo'], $res);
+    }
+
+    public function testForwardsHandlersWhenRejectedPromiseIsReturned()
+    {
+        $res = [];
+        $p = new Promise();
+        $p2 = new Promise();
+        $p2->reject('foo');
+        $p2->then(null, function ($v) use (&$res) { $res[] = 'A:' . $v; });
+        $p->then(null, function () use ($p2, &$res) { $res[] = 'B'; return $p2; })
+            ->then(null, function ($v) use (&$res) { $res[] = 'C:' . $v; });
+        $p->reject('a');
+        $p->then(null, function ($v) use (&$res) { $res[] = 'D:' . $v; });
+        P\queue()->run();
+        $this->assertEquals(['A:foo', 'B', 'D:a', 'C:foo'], $res);
+    }
+
+    public function testDoesNotForwardRejectedPromise()
+    {
+        $res = [];
+        $p = new Promise();
+        $p2 = new Promise();
+        $p2->cancel();
+        $p2->then(function ($v) use (&$res) { $res[] = "B:$v"; return $v; });
+        $p->then(function ($v) use ($p2, &$res) { $res[] = "B:$v"; return $p2; })
+            ->then(function ($v) use (&$res) { $res[] = 'C:' . $v; });
+        $p->resolve('a');
+        $p->then(function ($v) use (&$res) { $res[] = 'D:' . $v; });
+        P\queue()->run();
+        $this->assertEquals(['B:a', 'D:a'], $res);
+    }
+
+    public function testRecursivelyForwardsWhenOnlyThennable()
+    {
+        $res = [];
+        $p = new Promise();
+        $p2 = new Thennable();
+        $p2->resolve('foo');
+        $p2->then(function ($v) use (&$res) { $res[] = 'A:' . $v; });
+        $p->then(function () use ($p2, &$res) { $res[] = 'B'; return $p2; })
+            ->then(function ($v) use (&$res) { $res[] = 'C:' . $v; });
+        $p->resolve('a');
+        $p->then(function ($v) use (&$res) { $res[] = 'D:' . $v; });
+        P\queue()->run();
+        $this->assertEquals(['A:foo', 'B', 'D:a', 'C:foo'], $res);
+    }
+
+    public function testRecursivelyForwardsWhenNotInstanceOfPromise()
+    {
+        $res = [];
+        $p = new Promise();
+        $p2 = new NotPromiseInstance();
+        $p2->then(function ($v) use (&$res) { $res[] = 'A:' . $v; });
+        $p->then(function () use ($p2, &$res) { $res[] = 'B'; return $p2; })
+            ->then(function ($v) use (&$res) { $res[] = 'C:' . $v; });
+        $p->resolve('a');
+        $p->then(function ($v) use (&$res) { $res[] = 'D:' . $v; });
+        P\queue()->run();
+        $this->assertEquals(['B', 'D:a'], $res);
+        $p2->resolve('foo');
+        P\queue()->run();
+        $this->assertEquals(['B', 'D:a', 'A:foo', 'C:foo'], $res);
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @expectedExceptionMessage Cannot fulfill or reject a promise with itself
+     */
+    public function testCannotResolveWithSelf()
+    {
+        $p = new Promise();
+        $p->resolve($p);
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @expectedExceptionMessage Cannot fulfill or reject a promise with itself
+     */
+    public function testCannotRejectWithSelf()
+    {
+        $p = new Promise();
+        $p->reject($p);
+    }
+
+    public function testDoesNotBlowStackWhenWaitingOnNestedThens()
+    {
+        $inner = new Promise(function () use (&$inner) { $inner->resolve(0); });
+        $prev = $inner;
+        for ($i = 1; $i < 100; $i++) {
+            $prev = $prev->then(function ($i) { return $i + 1; });
+        }
+
+        $parent = new Promise(function () use (&$parent, $prev) {
+            $parent->resolve($prev);
+        });
+
+        $this->assertEquals(99, $parent->wait());
+    }
+
+    public function testOtherwiseIsSugarForRejections()
+    {
+        $p = new Promise();
+        $p->reject('foo');
+        $p->otherwise(function ($v) use (&$c) { $c = $v; });
+        P\queue()->run();
+        $this->assertEquals($c, 'foo');
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php	(revision 5534)
@@ -0,0 +1,143 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\RejectedPromise;
+
+/**
+ * @covers GuzzleHttp\Promise\RejectedPromise
+ */
+class RejectedPromiseTest extends \PHPUnit_Framework_TestCase
+{
+    public function testThrowsReasonWhenWaitedUpon()
+    {
+        $p = new RejectedPromise('foo');
+        $this->assertEquals('rejected', $p->getState());
+        try {
+            $p->wait(true);
+            $this->fail();
+        } catch (\Exception $e) {
+            $this->assertEquals('rejected', $p->getState());
+            $this->assertContains('foo', $e->getMessage());
+        }
+    }
+
+    public function testCannotCancel()
+    {
+        $p = new RejectedPromise('foo');
+        $p->cancel();
+        $this->assertEquals('rejected', $p->getState());
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @exepctedExceptionMessage Cannot resolve a rejected promise
+     */
+    public function testCannotResolve()
+    {
+        $p = new RejectedPromise('foo');
+        $p->resolve('bar');
+    }
+
+    /**
+     * @expectedException \LogicException
+     * @exepctedExceptionMessage Cannot reject a rejected promise
+     */
+    public function testCannotReject()
+    {
+        $p = new RejectedPromise('foo');
+        $p->reject('bar');
+    }
+
+    public function testCanRejectWithSameValue()
+    {
+        $p = new RejectedPromise('foo');
+        $p->reject('foo');
+    }
+
+    public function testThrowsSpecificException()
+    {
+        $e = new \Exception();
+        $p = new RejectedPromise($e);
+        try {
+            $p->wait(true);
+            $this->fail();
+        } catch (\Exception $e2) {
+            $this->assertSame($e, $e2);
+        }
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testCannotResolveWithPromise()
+    {
+        new RejectedPromise(new Promise());
+    }
+
+    public function testReturnsSelfWhenNoOnReject()
+    {
+        $p = new RejectedPromise('a');
+        $this->assertSame($p, $p->then());
+    }
+
+    public function testInvokesOnRejectedAsynchronously()
+    {
+        $p = new RejectedPromise('a');
+        $r = null;
+        $f = function ($reason) use (&$r) { $r = $reason; };
+        $p->then(null, $f);
+        $this->assertNull($r);
+        \GuzzleHttp\Promise\queue()->run();
+        $this->assertEquals('a', $r);
+    }
+
+    public function testReturnsNewRejectedWhenOnRejectedFails()
+    {
+        $p = new RejectedPromise('a');
+        $f = function () { throw new \Exception('b'); };
+        $p2 = $p->then(null, $f);
+        $this->assertNotSame($p, $p2);
+        try {
+            $p2->wait();
+            $this->fail();
+        } catch (\Exception $e) {
+            $this->assertEquals('b', $e->getMessage());
+        }
+    }
+
+    public function testWaitingIsNoOp()
+    {
+        $p = new RejectedPromise('a');
+        $p->wait(false);
+    }
+
+    public function testOtherwiseIsSugarForRejections()
+    {
+        $p = new RejectedPromise('foo');
+        $p->otherwise(function ($v) use (&$c) { $c = $v; });
+        \GuzzleHttp\Promise\queue()->run();
+        $this->assertSame('foo', $c);
+    }
+
+    public function testCanResolveThenWithSuccess()
+    {
+        $actual = null;
+        $p = new RejectedPromise('foo');
+        $p->otherwise(function ($v) {
+            return $v . ' bar';
+        })->then(function ($v) use (&$actual) {
+            $actual = $v;
+        });
+        \GuzzleHttp\Promise\queue()->run();
+        $this->assertEquals('foo bar', $actual);
+    }
+
+    public function testDoesNotTryToRejectTwiceDuringTrampoline()
+    {
+        $fp = new RejectedPromise('a');
+        $t1 = $fp->then(null, function ($v) { return $v . ' b'; });
+        $t1->resolve('why!');
+        $this->assertEquals('why!', $t1->wait());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php	(revision 5534)
@@ -0,0 +1,47 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\RejectionException;
+
+class Thing1
+{
+    public function __construct($message)
+    {
+        $this->message = $message;
+    }
+
+    public function __toString()
+    {
+        return $this->message;
+    }
+}
+
+class Thing2 implements \JsonSerializable
+{
+    public function jsonSerialize()
+    {
+        return '{}';
+    }
+}
+
+/**
+ * @covers GuzzleHttp\Promise\RejectionException
+ */
+class RejectionExceptionTest extends \PHPUnit_Framework_TestCase
+{
+    public function testCanGetReasonFromException()
+    {
+        $thing = new Thing1('foo');
+        $e = new RejectionException($thing);
+
+        $this->assertSame($thing, $e->getReason());
+        $this->assertEquals('The promise was rejected with reason: foo', $e->getMessage());
+    }
+
+    public function testCanGetReasonMessageFromJson()
+    {
+        $reason = new Thing2();
+        $e = new RejectionException($reason);
+        $this->assertContains("{}", $e->getMessage());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/TaskQueueTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/TaskQueueTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/TaskQueueTest.php	(revision 5534)
@@ -0,0 +1,31 @@
+<?php
+namespace GuzzleHttp\Promise\Test;
+
+use GuzzleHttp\Promise\TaskQueue;
+
+class TaskQueueTest extends \PHPUnit_Framework_TestCase
+{
+    public function testKnowsIfEmpty()
+    {
+        $tq = new TaskQueue(false);
+        $this->assertTrue($tq->isEmpty());
+    }
+
+    public function testKnowsIfFull()
+    {
+        $tq = new TaskQueue(false);
+        $tq->add(function () {});
+        $this->assertFalse($tq->isEmpty());
+    }
+
+    public function testExecutesTasksInOrder()
+    {
+        $tq = new TaskQueue(false);
+        $called = [];
+        $tq->add(function () use (&$called) { $called[] = 'a'; });
+        $tq->add(function () use (&$called) { $called[] = 'b'; });
+        $tq->add(function () use (&$called) { $called[] = 'c'; });
+        $tq->run();
+        $this->assertEquals(['a', 'b', 'c'], $called);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/Thennable.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/Thennable.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/Thennable.php	(revision 5534)
@@ -0,0 +1,24 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise\Promise;
+
+class Thennable
+{
+    private $nextPromise = null;
+
+    public function __construct()
+    {
+        $this->nextPromise = new Promise();
+    }
+
+    public function then(callable $res = null, callable $rej = null)
+    {
+        return $this->nextPromise->then($res, $rej);
+    }
+
+    public function resolve($value)
+    {
+        $this->nextPromise->resolve($value);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/bootstrap.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/bootstrap.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/bootstrap.php	(revision 5534)
@@ -0,0 +1,4 @@
+<?php
+require __DIR__ . '/../vendor/autoload.php';
+require __DIR__ . '/Thennable.php';
+require __DIR__ . '/NotPromiseInstance.php';
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/functionsTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/functionsTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/promises/tests/functionsTest.php	(revision 5534)
@@ -0,0 +1,694 @@
+<?php
+namespace GuzzleHttp\Promise\Tests;
+
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\FulfilledPromise;
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\RejectedPromise;
+
+class FunctionsTest extends \PHPUnit_Framework_TestCase
+{
+    public function testCreatesPromiseForValue()
+    {
+        $p = \GuzzleHttp\Promise\promise_for('foo');
+        $this->assertInstanceOf('GuzzleHttp\Promise\FulfilledPromise', $p);
+    }
+
+    public function testReturnsPromiseForPromise()
+    {
+        $p = new Promise();
+        $this->assertSame($p, \GuzzleHttp\Promise\promise_for($p));
+    }
+
+    public function testReturnsPromiseForThennable()
+    {
+        $p = new Thennable();
+        $wrapped = \GuzzleHttp\Promise\promise_for($p);
+        $this->assertNotSame($p, $wrapped);
+        $this->assertInstanceOf('GuzzleHttp\Promise\PromiseInterface', $wrapped);
+        $p->resolve('foo');
+        P\queue()->run();
+        $this->assertEquals('foo', $wrapped->wait());
+    }
+
+    public function testReturnsRejection()
+    {
+        $p = \GuzzleHttp\Promise\rejection_for('fail');
+        $this->assertInstanceOf('GuzzleHttp\Promise\RejectedPromise', $p);
+        $this->assertEquals('fail', $this->readAttribute($p, 'reason'));
+    }
+
+    public function testReturnsPromisesAsIsInRejectionFor()
+    {
+        $a = new Promise();
+        $b = \GuzzleHttp\Promise\rejection_for($a);
+        $this->assertSame($a, $b);
+    }
+
+    public function testWaitsOnAllPromisesIntoArray()
+    {
+        $e = new \Exception();
+        $a = new Promise(function () use (&$a) { $a->resolve('a'); });
+        $b = new Promise(function () use (&$b) { $b->reject('b'); });
+        $c = new Promise(function () use (&$c, $e) { $c->reject($e); });
+        $results = \GuzzleHttp\Promise\inspect_all([$a, $b, $c]);
+        $this->assertEquals([
+            ['state' => 'fulfilled', 'value' => 'a'],
+            ['state' => 'rejected', 'reason' => 'b'],
+            ['state' => 'rejected', 'reason' => $e]
+        ], $results);
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\RejectionException
+     */
+    public function testUnwrapsPromisesWithNoDefaultAndFailure()
+    {
+        $promises = [new FulfilledPromise('a'), new Promise()];
+        \GuzzleHttp\Promise\unwrap($promises);
+    }
+
+    public function testUnwrapsPromisesWithNoDefault()
+    {
+        $promises = [new FulfilledPromise('a')];
+        $this->assertEquals(['a'], \GuzzleHttp\Promise\unwrap($promises));
+    }
+
+    public function testUnwrapsPromisesWithKeys()
+    {
+        $promises = [
+            'foo' => new FulfilledPromise('a'),
+            'bar' => new FulfilledPromise('b'),
+        ];
+        $this->assertEquals([
+            'foo' => 'a',
+            'bar' => 'b'
+        ], \GuzzleHttp\Promise\unwrap($promises));
+    }
+
+    public function testAllAggregatesSortedArray()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $c = new Promise();
+        $d = \GuzzleHttp\Promise\all([$a, $b, $c]);
+        $b->resolve('b');
+        $a->resolve('a');
+        $c->resolve('c');
+        $d->then(
+            function ($value) use (&$result) { $result = $value; },
+            function ($reason) use (&$result) { $result = $reason; }
+        );
+        P\queue()->run();
+        $this->assertEquals(['a', 'b', 'c'], $result);
+    }
+
+    public function testAllThrowsWhenAnyRejected()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $c = new Promise();
+        $d = \GuzzleHttp\Promise\all([$a, $b, $c]);
+        $b->resolve('b');
+        $a->reject('fail');
+        $c->resolve('c');
+        $d->then(
+            function ($value) use (&$result) { $result = $value; },
+            function ($reason) use (&$result) { $result = $reason; }
+        );
+        P\queue()->run();
+        $this->assertEquals('fail', $result);
+    }
+
+    public function testSomeAggregatesSortedArrayWithMax()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $c = new Promise();
+        $d = \GuzzleHttp\Promise\some(2, [$a, $b, $c]);
+        $b->resolve('b');
+        $c->resolve('c');
+        $a->resolve('a');
+        $d->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals(['b', 'c'], $result);
+    }
+
+    public function testSomeRejectsWhenTooManyRejections()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $d = \GuzzleHttp\Promise\some(2, [$a, $b]);
+        $a->reject('bad');
+        $b->resolve('good');
+        P\queue()->run();
+        $this->assertEquals($a::REJECTED, $d->getState());
+        $d->then(null, function ($reason) use (&$called) {
+            $called = $reason;
+        });
+        P\queue()->run();
+        $this->assertInstanceOf('GuzzleHttp\Promise\AggregateException', $called);
+        $this->assertContains('bad', $called->getReason());
+    }
+
+    public function testCanWaitUntilSomeCountIsSatisfied()
+    {
+        $a = new Promise(function () use (&$a) { $a->resolve('a'); });
+        $b = new Promise(function () use (&$b) { $b->resolve('b'); });
+        $c = new Promise(function () use (&$c) { $c->resolve('c'); });
+        $d = \GuzzleHttp\Promise\some(2, [$a, $b, $c]);
+        $this->assertEquals(['a', 'b'], $d->wait());
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\AggregateException
+     * @expectedExceptionMessage Not enough promises to fulfill count
+     */
+    public function testThrowsIfImpossibleToWaitForSomeCount()
+    {
+        $a = new Promise(function () use (&$a) { $a->resolve('a'); });
+        $d = \GuzzleHttp\Promise\some(2, [$a]);
+        $d->wait();
+    }
+
+    /**
+     * @expectedException \GuzzleHttp\Promise\AggregateException
+     * @expectedExceptionMessage Not enough promises to fulfill count
+     */
+    public function testThrowsIfResolvedWithoutCountTotalResults()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $d = \GuzzleHttp\Promise\some(3, [$a, $b]);
+        $a->resolve('a');
+        $b->resolve('b');
+        $d->wait();
+    }
+
+    public function testAnyReturnsFirstMatch()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $c = \GuzzleHttp\Promise\any([$a, $b]);
+        $b->resolve('b');
+        $a->resolve('a');
+        //P\queue()->run();
+        //$this->assertEquals('fulfilled', $c->getState());
+        $c->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals('b', $result);
+    }
+
+    public function testSettleFulfillsWithFulfilledAndRejected()
+    {
+        $a = new Promise();
+        $b = new Promise();
+        $c = new Promise();
+        $d = \GuzzleHttp\Promise\settle([$a, $b, $c]);
+        $b->resolve('b');
+        $c->resolve('c');
+        $a->reject('a');
+        P\queue()->run();
+        $this->assertEquals('fulfilled', $d->getState());
+        $d->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals([
+            ['state' => 'rejected', 'reason' => 'a'],
+            ['state' => 'fulfilled', 'value' => 'b'],
+            ['state' => 'fulfilled', 'value' => 'c']
+        ], $result);
+    }
+
+    public function testCanInspectFulfilledPromise()
+    {
+        $p = new FulfilledPromise('foo');
+        $this->assertEquals([
+            'state' => 'fulfilled',
+            'value' => 'foo'
+        ], \GuzzleHttp\Promise\inspect($p));
+    }
+
+    public function testCanInspectRejectedPromise()
+    {
+        $p = new RejectedPromise('foo');
+        $this->assertEquals([
+            'state'  => 'rejected',
+            'reason' => 'foo'
+        ], \GuzzleHttp\Promise\inspect($p));
+    }
+
+    public function testCanInspectRejectedPromiseWithNormalException()
+    {
+        $e = new \Exception('foo');
+        $p = new RejectedPromise($e);
+        $this->assertEquals([
+            'state'  => 'rejected',
+            'reason' => $e
+        ], \GuzzleHttp\Promise\inspect($p));
+    }
+
+    public function testCallsEachLimit()
+    {
+        $p = new Promise();
+        $aggregate = \GuzzleHttp\Promise\each_limit($p, 2);
+        $p->resolve('a');
+        P\queue()->run();
+        $this->assertEquals($p::FULFILLED, $aggregate->getState());
+    }
+
+    public function testEachLimitAllRejectsOnFailure()
+    {
+        $p = [new FulfilledPromise('a'), new RejectedPromise('b')];
+        $aggregate = \GuzzleHttp\Promise\each_limit_all($p, 2);
+        P\queue()->run();
+        $this->assertEquals(P\PromiseInterface::REJECTED, $aggregate->getState());
+        $result = \GuzzleHttp\Promise\inspect($aggregate);
+        $this->assertEquals('b', $result['reason']);
+    }
+
+    public function testIterForReturnsIterator()
+    {
+        $iter = new \ArrayIterator();
+        $this->assertSame($iter, \GuzzleHttp\Promise\iter_for($iter));
+    }
+
+    public function testKnowsIfFulfilled()
+    {
+        $p = new FulfilledPromise(null);
+        $this->assertTrue(P\is_fulfilled($p));
+        $this->assertFalse(P\is_rejected($p));
+    }
+
+    public function testKnowsIfRejected()
+    {
+        $p = new RejectedPromise(null);
+        $this->assertTrue(P\is_rejected($p));
+        $this->assertFalse(P\is_fulfilled($p));
+    }
+
+    public function testKnowsIfSettled()
+    {
+        $p = new RejectedPromise(null);
+        $this->assertTrue(P\is_settled($p));
+        $p = new Promise();
+        $this->assertFalse(P\is_settled($p));
+    }
+
+    public function testReturnsTrampoline()
+    {
+        $this->assertInstanceOf('GuzzleHttp\Promise\TaskQueue', P\queue());
+        $this->assertSame(P\queue(), P\queue());
+    }
+
+    public function testCanScheduleThunk()
+    {
+        $tramp = P\queue();
+        $promise = P\task(function () { return 'Hi!'; });
+        $c = null;
+        $promise->then(function ($v) use (&$c) { $c = $v; });
+        $this->assertNull($c);
+        $tramp->run();
+        $this->assertEquals('Hi!', $c);
+    }
+
+    public function testCanScheduleThunkWithRejection()
+    {
+        $tramp = P\queue();
+        $promise = P\task(function () { throw new \Exception('Hi!'); });
+        $c = null;
+        $promise->otherwise(function ($v) use (&$c) { $c = $v; });
+        $this->assertNull($c);
+        $tramp->run();
+        $this->assertEquals('Hi!', $c->getMessage());
+    }
+
+    public function testCanScheduleThunkWithWait()
+    {
+        $tramp = P\queue();
+        $promise = P\task(function () { return 'a'; });
+        $this->assertEquals('a', $promise->wait());
+        $tramp->run();
+    }
+
+    public function testYieldsFromCoroutine()
+    {
+        $promise = P\coroutine(function () {
+            $value = (yield new P\FulfilledPromise('a'));
+            yield  $value . 'b';
+        });
+        $promise->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals('ab', $result);
+    }
+
+    public function testCanCatchExceptionsInCoroutine()
+    {
+        $promise = P\coroutine(function () {
+            try {
+                yield new P\RejectedPromise('a');
+                $this->fail('Should have thrown into the coroutine!');
+            } catch (P\RejectionException $e) {
+                $value = (yield new P\FulfilledPromise($e->getReason()));
+                yield  $value . 'b';
+            }
+        });
+        $promise->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals(P\PromiseInterface::FULFILLED, $promise->getState());
+        $this->assertEquals('ab', $result);
+    }
+
+    public function testRejectsParentExceptionWhenException()
+    {
+        $promise = P\coroutine(function () {
+            yield new P\FulfilledPromise(0);
+            throw new \Exception('a');
+        });
+        $promise->then(
+            function () { $this->fail(); },
+            function ($reason) use (&$result) { $result = $reason; }
+        );
+        P\queue()->run();
+        $this->assertInstanceOf('Exception', $result);
+        $this->assertEquals('a', $result->getMessage());
+    }
+
+    public function testCanRejectFromRejectionCallback()
+    {
+        $promise = P\coroutine(function () {
+            yield new P\FulfilledPromise(0);
+            yield new P\RejectedPromise('no!');
+        });
+        $promise->then(
+            function () { $this->fail(); },
+            function ($reason) use (&$result) { $result = $reason; }
+        );
+        P\queue()->run();
+        $this->assertInstanceOf('GuzzleHttp\Promise\RejectionException', $result);
+        $this->assertEquals('no!', $result->getReason());
+    }
+
+    public function testCanAsyncReject()
+    {
+        $rej = new P\Promise();
+        $promise = P\coroutine(function () use ($rej) {
+            yield new P\FulfilledPromise(0);
+            yield $rej;
+        });
+        $promise->then(
+            function () { $this->fail(); },
+            function ($reason) use (&$result) { $result = $reason; }
+        );
+        $rej->reject('no!');
+        P\queue()->run();
+        $this->assertInstanceOf('GuzzleHttp\Promise\RejectionException', $result);
+        $this->assertEquals('no!', $result->getReason());
+    }
+
+    public function testCanCatchAndThrowOtherException()
+    {
+        $promise = P\coroutine(function () {
+            try {
+                yield new P\RejectedPromise('a');
+                $this->fail('Should have thrown into the coroutine!');
+            } catch (P\RejectionException $e) {
+                throw new \Exception('foo');
+            }
+        });
+        $promise->otherwise(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals(P\PromiseInterface::REJECTED, $promise->getState());
+        $this->assertContains('foo', $result->getMessage());
+    }
+
+    public function testCanCatchAndYieldOtherException()
+    {
+        $promise = P\coroutine(function () {
+            try {
+                yield new P\RejectedPromise('a');
+                $this->fail('Should have thrown into the coroutine!');
+            } catch (P\RejectionException $e) {
+                yield new P\RejectedPromise('foo');
+            }
+        });
+        $promise->otherwise(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals(P\PromiseInterface::REJECTED, $promise->getState());
+        $this->assertContains('foo', $result->getMessage());
+    }
+
+    public function createLotsOfSynchronousPromise()
+    {
+        return P\coroutine(function () {
+            $value = 0;
+            for ($i = 0; $i < 1000; $i++) {
+                $value = (yield new P\FulfilledPromise($i));
+            }
+            yield $value;
+        });
+    }
+
+    public function testLotsOfSynchronousDoesNotBlowStack()
+    {
+        $promise = $this->createLotsOfSynchronousPromise();
+        $promise->then(function ($v) use (&$r) { $r = $v; });
+        P\queue()->run();
+        $this->assertEquals(999, $r);
+    }
+
+    public function testLotsOfSynchronousWaitDoesNotBlowStack()
+    {
+        $promise = $this->createLotsOfSynchronousPromise();
+        $promise->then(function ($v) use (&$r) { $r = $v; });
+        $this->assertEquals(999, $promise->wait());
+        $this->assertEquals(999, $r);
+    }
+
+    private function createLotsOfFlappingPromise()
+    {
+        return P\coroutine(function () {
+            $value = 0;
+            for ($i = 0; $i < 1000; $i++) {
+                try {
+                    if ($i % 2) {
+                        $value = (yield new P\FulfilledPromise($i));
+                    } else {
+                        $value = (yield new P\RejectedPromise($i));
+                    }
+                } catch (\Exception $e) {
+                    $value = (yield new P\FulfilledPromise($i));
+                }
+            }
+            yield $value;
+        });
+    }
+
+    public function testLotsOfTryCatchingDoesNotBlowStack()
+    {
+        $promise = $this->createLotsOfFlappingPromise();
+        $promise->then(function ($v) use (&$r) { $r = $v; });
+        P\queue()->run();
+        $this->assertEquals(999, $r);
+    }
+
+    public function testLotsOfTryCatchingWaitingDoesNotBlowStack()
+    {
+        $promise = $this->createLotsOfFlappingPromise();
+        $promise->then(function ($v) use (&$r) { $r = $v; });
+        $this->assertEquals(999, $promise->wait());
+        $this->assertEquals(999, $r);
+    }
+
+    public function testAsyncPromisesWithCorrectlyYieldedValues()
+    {
+        $promises = [
+            new P\Promise(),
+            new P\Promise(),
+            new P\Promise()
+        ];
+
+        $promise = P\coroutine(function () use ($promises) {
+            $value = null;
+            $this->assertEquals('skip', (yield new P\FulfilledPromise('skip')));
+            foreach ($promises as $idx => $p) {
+                $value = (yield $p);
+                $this->assertEquals($value, $idx);
+                $this->assertEquals('skip', (yield new P\FulfilledPromise('skip')));
+            }
+            $this->assertEquals('skip', (yield new P\FulfilledPromise('skip')));
+            yield $value;
+        });
+
+        $promises[0]->resolve(0);
+        $promises[1]->resolve(1);
+        $promises[2]->resolve(2);
+
+        $promise->then(function ($v) use (&$r) { $r = $v; });
+        P\queue()->run();
+        $this->assertEquals(2, $r);
+    }
+
+    public function testYieldFinalWaitablePromise()
+    {
+        $p1 = new P\Promise(function () use (&$p1) {
+            $p1->resolve('skip me');
+        });
+        $p2 = new P\Promise(function () use (&$p2) {
+            $p2->resolve('hello!');
+        });
+        $co = P\coroutine(function() use ($p1, $p2) {
+            yield $p1;
+            yield $p2;
+        });
+        P\queue()->run();
+        $this->assertEquals('hello!', $co->wait());
+    }
+
+    public function testCanYieldFinalPendingPromise()
+    {
+        $p1 = new P\Promise();
+        $p2 = new P\Promise();
+        $co = P\coroutine(function() use ($p1, $p2) {
+            yield $p1;
+            yield $p2;
+        });
+        $p1->resolve('a');
+        $p2->resolve('b');
+        $co->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals('b', $result);
+    }
+
+    public function testCanNestYieldsAndFailures()
+    {
+        $p1 = new P\Promise();
+        $p2 = new P\Promise();
+        $p3 = new P\Promise();
+        $p4 = new P\Promise();
+        $p5 = new P\Promise();
+        $co = P\coroutine(function() use ($p1, $p2, $p3, $p4, $p5) {
+            try {
+                yield $p1;
+            } catch (\Exception $e) {
+                yield $p2;
+                try {
+                    yield $p3;
+                    yield $p4;
+                } catch (\Exception $e) {
+                    yield $p5;
+                }
+            }
+        });
+        $p1->reject('a');
+        $p2->resolve('b');
+        $p3->resolve('c');
+        $p4->reject('d');
+        $p5->resolve('e');
+        $co->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals('e', $result);
+    }
+
+    public function testCanYieldErrorsAndSuccessesWithoutRecursion()
+    {
+        $promises = [];
+        for ($i = 0; $i < 20; $i++) {
+            $promises[] = new P\Promise();
+        }
+
+        $co = P\coroutine(function() use ($promises) {
+            for ($i = 0; $i < 20; $i += 4) {
+                try {
+                    yield $promises[$i];
+                    yield $promises[$i + 1];
+                } catch (\Exception $e) {
+                    yield $promises[$i + 2];
+                    yield $promises[$i + 3];
+                }
+            }
+        });
+
+        for ($i = 0; $i < 20; $i += 4) {
+            $promises[$i]->resolve($i);
+            $promises[$i + 1]->reject($i + 1);
+            $promises[$i + 2]->resolve($i + 2);
+            $promises[$i + 3]->resolve($i + 3);
+        }
+
+        $co->then(function ($value) use (&$result) { $result = $value; });
+        P\queue()->run();
+        $this->assertEquals('19', $result);
+    }
+
+    public function testCanWaitOnPromiseAfterFulfilled()
+    {
+        $f = function () {
+            static $i = 0;
+            $i++;
+            return $p = new P\Promise(function () use (&$p, $i) {
+                $p->resolve($i . '-bar');
+            });
+        };
+
+        $promises = [];
+        for ($i = 0; $i < 20; $i++) {
+            $promises[] = $f();
+        }
+
+        $p = P\coroutine(function () use ($promises) {
+            yield new P\FulfilledPromise('foo!');
+            foreach ($promises as $promise) {
+                yield $promise;
+            }
+        });
+
+        $this->assertEquals('20-bar', $p->wait());
+    }
+
+    public function testCanWaitOnErroredPromises()
+    {
+        $p1 = new P\Promise(function () use (&$p1) { $p1->reject('a'); });
+        $p2 = new P\Promise(function () use (&$p2) { $p2->resolve('b'); });
+        $p3 = new P\Promise(function () use (&$p3) { $p3->resolve('c'); });
+        $p4 = new P\Promise(function () use (&$p4) { $p4->reject('d'); });
+        $p5 = new P\Promise(function () use (&$p5) { $p5->resolve('e'); });
+        $p6 = new P\Promise(function () use (&$p6) { $p6->reject('f'); });
+
+        $co = P\coroutine(function() use ($p1, $p2, $p3, $p4, $p5, $p6) {
+            try {
+                yield $p1;
+            } catch (\Exception $e) {
+                yield $p2;
+                try {
+                    yield $p3;
+                    yield $p4;
+                } catch (\Exception $e) {
+                    yield $p5;
+                    yield $p6;
+                }
+            }
+        });
+
+        $res = P\inspect($co);
+        $this->assertEquals('f', $res['reason']);
+    }
+
+    public function testCoroutineOtherwiseIntegrationTest()
+    {
+        $a = new P\Promise();
+        $b = new P\Promise();
+        $promise = P\coroutine(function () use ($a, $b) {
+            // Execute the pool of commands concurrently, and process errors.
+            yield $a;
+            yield $b;
+        })->otherwise(function (\Exception $e) {
+            // Throw errors from the operations as a specific Multipart error.
+            throw new \OutOfBoundsException('a', 0, $e);
+        });
+        $a->resolve('a');
+        $b->reject('b');
+        $reason = P\inspect($promise)['reason'];
+        $this->assertInstanceOf('OutOfBoundsException', $reason);
+        $this->assertInstanceOf('GuzzleHttp\Promise\RejectionException', $reason->getPrevious());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/.gitignore
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/.gitignore	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/.gitignore	(revision 5534)
@@ -0,0 +1,11 @@
+phpunit.xml
+composer.phar
+composer.lock
+composer-test.lock
+vendor/
+build/artifacts/
+artifacts/
+docs/_build
+docs/*.pyc
+.idea
+.DS_STORE
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/.travis.yml
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/.travis.yml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/.travis.yml	(revision 5534)
@@ -0,0 +1,20 @@
+language: php
+
+php:
+  - 5.4
+  - 5.5
+  - 5.6
+  - 7.0
+  - hhvm
+
+sudo: false
+
+install:
+  - travis_retry composer install --no-interaction --prefer-source
+
+script: make test
+
+matrix:
+  allow_failures:
+    - php: hhvm
+  fast_finish: true
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,39 @@
+# CHANGELOG
+
+## 1.2.2 - 2016-01-22
+
+* Added support for URIs without any authority.
+* Added support for HTTP 451 'Unavailable For Legal Reasons.'
+* Added support for using '0' as a filename.
+* Added support for including non-standard ports in Host headers.
+
+## 1.2.1 - 2015-11-02
+
+* Now supporting negative offsets when seeking to SEEK_END.
+
+## 1.2.0 - 2015-08-15
+
+* Body as `"0"` is now properly added to a response.
+* Now allowing forward seeking in CachingStream.
+* Now properly parsing HTTP requests that contain proxy targets in
+  `parse_request`.
+* functions.php is now conditionally required.
+* user-info is no longer dropped when resolving URIs.
+
+## 1.1.0 - 2015-06-24
+
+* URIs can now be relative.
+* `multipart/form-data` headers are now overridden case-insensitively.
+* URI paths no longer encode the following characters because they are allowed
+  in URIs: "(", ")", "*", "!", "'"
+* A port is no longer added to a URI when the scheme is missing and no port is
+  present.
+
+## 1.0.0 - 2015-05-19
+
+Initial release.
+
+Currently unsupported:
+
+- `Psr\Http\Message\ServerRequestInterface`
+- `Psr\Http\Message\UploadedFileInterface`
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/LICENSE	(revision 5534)
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/Makefile
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/Makefile	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/Makefile	(revision 5534)
@@ -0,0 +1,29 @@
+all: clean test
+
+test:
+	vendor/bin/phpunit $(TEST)
+
+coverage:
+	vendor/bin/phpunit --coverage-html=artifacts/coverage $(TEST)
+
+view-coverage:
+	open artifacts/coverage/index.html
+
+check-tag:
+	$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
+
+tag: check-tag
+	@echo Tagging $(TAG)
+	chag update $(TAG)
+	git commit -a -m '$(TAG) release'
+	chag tag
+	@echo "Release has been created. Push using 'make release'"
+	@echo "Changes made in the release commit"
+	git diff HEAD~1 HEAD
+
+release: check-tag
+	git push origin master
+	git push origin $(TAG)
+
+clean:
+	rm -rf artifacts/*
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/README.md	(revision 5534)
@@ -0,0 +1,583 @@
+# PSR-7 Message Implementation
+
+This repository contains a partial [PSR-7](http://www.php-fig.org/psr/psr-7/)
+message implementation, several stream decorators, and some helpful
+functionality like query string parsing.  Currently missing
+ServerRequestInterface and UploadedFileInterface; a pull request for these features is welcome.
+
+
+[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7)
+
+
+# Stream implementation
+
+This package comes with a number of stream implementations and stream
+decorators.
+
+
+## AppendStream
+
+`GuzzleHttp\Psr7\AppendStream`
+
+Reads from multiple streams, one after the other.
+
+```php
+use GuzzleHttp\Psr7;
+
+$a = Psr7\stream_for('abc, ');
+$b = Psr7\stream_for('123.');
+$composed = new Psr7\AppendStream([$a, $b]);
+
+$composed->addStream(Psr7\stream_for(' Above all listen to me'));
+
+echo $composed(); // abc, 123. Above all listen to me.
+```
+
+
+## BufferStream
+
+`GuzzleHttp\Psr7\BufferStream`
+
+Provides a buffer stream that can be written to to fill a buffer, and read
+from to remove bytes from the buffer.
+
+This stream returns a "hwm" metadata value that tells upstream consumers
+what the configured high water mark of the stream is, or the maximum
+preferred size of the buffer.
+
+```php
+use GuzzleHttp\Psr7;
+
+// When more than 1024 bytes are in the buffer, it will begin returning
+// false to writes. This is an indication that writers should slow down.
+$buffer = new Psr7\BufferStream(1024);
+```
+
+
+## CachingStream
+
+The CachingStream is used to allow seeking over previously read bytes on
+non-seekable streams. This can be useful when transferring a non-seekable
+entity body fails due to needing to rewind the stream (for example, resulting
+from a redirect). Data that is read from the remote stream will be buffered in
+a PHP temp stream so that previously read bytes are cached first in memory,
+then on disk.
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
+$stream = new Psr7\CachingStream($original);
+
+$stream->read(1024);
+echo $stream->tell();
+// 1024
+
+$stream->seek(0);
+echo $stream->tell();
+// 0
+```
+
+
+## DroppingStream
+
+`GuzzleHttp\Psr7\DroppingStream`
+
+Stream decorator that begins dropping data once the size of the underlying
+stream becomes too full.
+
+```php
+use GuzzleHttp\Psr7;
+
+// Create an empty stream
+$stream = Psr7\stream_for();
+
+// Start dropping data when the stream has more than 10 bytes
+$dropping = new Psr7\DroppingStream($stream, 10);
+
+$stream->write('01234567890123456789');
+echo $stream; // 0123456789
+```
+
+
+## FnStream
+
+`GuzzleHttp\Psr7\FnStream`
+
+Compose stream implementations based on a hash of functions.
+
+Allows for easy testing and extension of a provided stream without needing to
+to create a concrete class for a simple extension point.
+
+```php
+
+use GuzzleHttp\Psr7;
+
+$stream = Psr7\stream_for('hi');
+$fnStream = Psr7\FnStream::decorate($stream, [
+    'rewind' => function () use ($stream) {
+        echo 'About to rewind - ';
+        $stream->rewind();
+        echo 'rewound!';
+    }
+]);
+
+$fnStream->rewind();
+// Outputs: About to rewind - rewound!
+```
+
+
+## InflateStream
+
+`GuzzleHttp\Psr7\InflateStream`
+
+Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
+
+This stream decorator skips the first 10 bytes of the given stream to remove
+the gzip header, converts the provided stream to a PHP stream resource,
+then appends the zlib.inflate filter. The stream is then converted back
+to a Guzzle stream resource to be used as a Guzzle stream.
+
+
+## LazyOpenStream
+
+`GuzzleHttp\Psr7\LazyOpenStream`
+
+Lazily reads or writes to a file that is opened only after an IO operation
+take place on the stream.
+
+```php
+use GuzzleHttp\Psr7;
+
+$stream = new Psr7\LazyOpenStream('/path/to/file', 'r');
+// The file has not yet been opened...
+
+echo $stream->read(10);
+// The file is opened and read from only when needed.
+```
+
+
+## LimitStream
+
+`GuzzleHttp\Psr7\LimitStream`
+
+LimitStream can be used to read a subset or slice of an existing stream object.
+This can be useful for breaking a large file into smaller pieces to be sent in
+chunks (e.g. Amazon S3's multipart upload API).
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
+echo $original->getSize();
+// >>> 1048576
+
+// Limit the size of the body to 1024 bytes and start reading from byte 2048
+$stream = new Psr7\LimitStream($original, 1024, 2048);
+echo $stream->getSize();
+// >>> 1024
+echo $stream->tell();
+// >>> 0
+```
+
+
+## MultipartStream
+
+`GuzzleHttp\Psr7\MultipartStream`
+
+Stream that when read returns bytes for a streaming multipart or
+multipart/form-data stream.
+
+
+## NoSeekStream
+
+`GuzzleHttp\Psr7\NoSeekStream`
+
+NoSeekStream wraps a stream and does not allow seeking.
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\stream_for('foo');
+$noSeek = new Psr7\NoSeekStream($original);
+
+echo $noSeek->read(3);
+// foo
+var_export($noSeek->isSeekable());
+// false
+$noSeek->seek(0);
+var_export($noSeek->read(3));
+// NULL
+```
+
+
+## PumpStream
+
+`GuzzleHttp\Psr7\PumpStream`
+
+Provides a read only stream that pumps data from a PHP callable.
+
+When invoking the provided callable, the PumpStream will pass the amount of
+data requested to read to the callable. The callable can choose to ignore
+this value and return fewer or more bytes than requested. Any extra data
+returned by the provided callable is buffered internally until drained using
+the read() function of the PumpStream. The provided callable MUST return
+false when there is no more data to read.
+
+
+## Implementing stream decorators
+
+Creating a stream decorator is very easy thanks to the
+`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that
+implement `Psr\Http\Message\StreamInterface` by proxying to an underlying
+stream. Just `use` the `StreamDecoratorTrait` and implement your custom
+methods.
+
+For example, let's say we wanted to call a specific function each time the last
+byte is read from a stream. This could be implemented by overriding the
+`read()` method.
+
+```php
+use Psr\Http\Message\StreamInterface;
+use GuzzleHttp\Psr7\StreamDecoratorTrait;
+
+class EofCallbackStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    private $callback;
+
+    public function __construct(StreamInterface $stream, callable $cb)
+    {
+        $this->stream = $stream;
+        $this->callback = $cb;
+    }
+
+    public function read($length)
+    {
+        $result = $this->stream->read($length);
+
+        // Invoke the callback when EOF is hit.
+        if ($this->eof()) {
+            call_user_func($this->callback);
+        }
+
+        return $result;
+    }
+}
+```
+
+This decorator could be added to any existing stream and used like so:
+
+```php
+use GuzzleHttp\Psr7;
+
+$original = Psr7\stream_for('foo');
+
+$eofStream = new EofCallbackStream($original, function () {
+    echo 'EOF!';
+});
+
+$eofStream->read(2);
+$eofStream->read(1);
+// echoes "EOF!"
+$eofStream->seek(0);
+$eofStream->read(3);
+// echoes "EOF!"
+```
+
+
+## PHP StreamWrapper
+
+You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a
+PSR-7 stream as a PHP stream resource.
+
+Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP
+stream from a PSR-7 stream.
+
+```php
+use GuzzleHttp\Psr7\StreamWrapper;
+
+$stream = GuzzleHttp\Psr7\stream_for('hello!');
+$resource = StreamWrapper::getResource($stream);
+echo fread($resource, 6); // outputs hello!
+```
+
+
+# Function API
+
+There are various functions available under the `GuzzleHttp\Psr7` namespace.
+
+
+## `function str`
+
+`function str(MessageInterface $message)`
+
+Returns the string representation of an HTTP message.
+
+```php
+$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
+echo GuzzleHttp\Psr7\str($request);
+```
+
+
+## `function uri_for`
+
+`function uri_for($uri)`
+
+This function accepts a string or `Psr\Http\Message\UriInterface` and returns a
+UriInterface for the given value. If the value is already a `UriInterface`, it
+is returned as-is.
+
+```php
+$uri = GuzzleHttp\Psr7\uri_for('http://example.com');
+assert($uri === GuzzleHttp\Psr7\uri_for($uri));
+```
+
+
+## `function stream_for`
+
+`function stream_for($resource = '', array $options = [])`
+
+Create a new stream based on the input type.
+
+Options is an associative array that can contain the following keys:
+
+* - metadata: Array of custom metadata.
+* - size: Size of the stream.
+
+This method accepts the following `$resource` types:
+
+- `Psr\Http\Message\StreamInterface`: Returns the value as-is.
+- `string`: Creates a stream object that uses the given string as the contents.
+- `resource`: Creates a stream object that wraps the given PHP stream resource.
+- `Iterator`: If the provided value implements `Iterator`, then a read-only
+  stream object will be created that wraps the given iterable. Each time the
+  stream is read from, data from the iterator will fill a buffer and will be
+  continuously called until the buffer is equal to the requested read size.
+  Subsequent read calls will first read from the buffer and then call `next`
+  on the underlying iterator until it is exhausted.
+- `object` with `__toString()`: If the object has the `__toString()` method,
+  the object will be cast to a string and then a stream will be returned that
+  uses the string value.
+- `NULL`: When `null` is passed, an empty stream object is returned.
+- `callable` When a callable is passed, a read-only stream object will be
+  created that invokes the given callable. The callable is invoked with the
+  number of suggested bytes to read. The callable can return any number of
+  bytes, but MUST return `false` when there is no more data to return. The
+  stream object that wraps the callable will invoke the callable until the
+  number of requested bytes are available. Any additional bytes will be
+  buffered and used in subsequent reads.
+
+```php
+$stream = GuzzleHttp\Psr7\stream_for('foo');
+$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r'));
+
+$generator function ($bytes) {
+    for ($i = 0; $i < $bytes; $i++) {
+        yield ' ';
+    }
+}
+
+$stream = GuzzleHttp\Psr7\stream_for($generator(100));
+```
+
+
+## `function parse_header`
+
+`function parse_header($header)`
+
+Parse an array of header values containing ";" separated data into an array of
+associative arrays representing the header key value pair data of the header.
+When a parameter does not contain a value, but just contains a key, this
+function will inject a key with a '' string value.
+
+
+## `function normalize_header`
+
+`function normalize_header($header)`
+
+Converts an array of header values that may contain comma separated headers
+into an array of headers with no comma separated values.
+
+
+## `function modify_request`
+
+`function modify_request(RequestInterface $request, array $changes)`
+
+Clone and modify a request with the given changes. This method is useful for
+reducing the number of clones needed to mutate a message.
+
+The changes can be one of:
+
+- method: (string) Changes the HTTP method.
+- set_headers: (array) Sets the given headers.
+- remove_headers: (array) Remove the given headers.
+- body: (mixed) Sets the given body.
+- uri: (UriInterface) Set the URI.
+- query: (string) Set the query string value of the URI.
+- version: (string) Set the protocol version.
+
+
+## `function rewind_body`
+
+`function rewind_body(MessageInterface $message)`
+
+Attempts to rewind a message body and throws an exception on failure. The body
+of the message will only be rewound if a call to `tell()` returns a value other
+than `0`.
+
+
+## `function try_fopen`
+
+`function try_fopen($filename, $mode)`
+
+Safely opens a PHP stream resource using a filename.
+
+When fopen fails, PHP normally raises a warning. This function adds an error
+handler that checks for errors and throws an exception instead.
+
+
+## `function copy_to_string`
+
+`function copy_to_string(StreamInterface $stream, $maxLen = -1)`
+
+Copy the contents of a stream into a string until the given number of bytes
+have been read.
+
+
+## `function copy_to_stream`
+
+`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)`
+
+Copy the contents of a stream into another stream until the given number of
+bytes have been read.
+
+
+## `function hash`
+
+`function hash(StreamInterface $stream, $algo, $rawOutput = false)`
+
+Calculate a hash of a Stream. This method reads the entire stream to calculate
+a rolling hash (based on PHP's hash_init functions).
+
+
+## `function readline`
+
+`function readline(StreamInterface $stream, $maxLength = null)`
+
+Read a line from the stream up to the maximum allowed buffer length.
+
+
+## `function parse_request`
+
+`function parse_request($message)`
+
+Parses a request message string into a request object.
+
+
+## `function parse_response`
+
+`function parse_response($message)`
+
+Parses a response message string into a response object.
+
+
+## `function parse_query`
+
+`function parse_query($str, $urlEncoding = true)`
+
+Parse a query string into an associative array.
+
+If multiple values are found for the same key, the value of that key value pair
+will become an array. This function does not parse nested PHP style arrays into
+an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into
+`['foo[a]' => '1', 'foo[b]' => '2']`).
+
+
+## `function build_query`
+
+`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)`
+
+Build a query string from an array of key value pairs.
+
+This function can use the return value of parseQuery() to build a query string.
+This function does not modify the provided keys when an array is encountered
+(like http_build_query would).
+
+
+## `function mimetype_from_filename`
+
+`function mimetype_from_filename($filename)`
+
+Determines the mimetype of a file by looking at its extension.
+
+
+## `function mimetype_from_extension`
+
+`function mimetype_from_extension($extension)`
+
+Maps a file extensions to a mimetype.
+
+
+# Static URI methods
+
+The `GuzzleHttp\Psr7\Uri` class has several static methods to manipulate URIs.
+
+
+## `GuzzleHttp\Psr7\Uri::removeDotSegments`
+
+`public static function removeDotSegments($path) -> UriInterface`
+
+Removes dot segments from a path and returns the new path.
+
+See http://tools.ietf.org/html/rfc3986#section-5.2.4
+
+
+## `GuzzleHttp\Psr7\Uri::resolve`
+
+`public static function resolve(UriInterface $base, $rel) -> UriInterface`
+
+Resolve a base URI with a relative URI and return a new URI.
+
+See http://tools.ietf.org/html/rfc3986#section-5
+
+
+## `GuzzleHttp\Psr7\Uri::withQueryValue`
+
+`public static function withQueryValue(UriInterface $uri, $key, $value) -> UriInterface`
+
+Create a new URI with a specific query string value.
+
+Any existing query string values that exactly match the provided key are
+removed and replaced with the given key value pair.
+
+Note: this function will convert "=" to "%3D" and "&" to "%26".
+
+
+## `GuzzleHttp\Psr7\Uri::withoutQueryValue`
+
+`public static function withoutQueryValue(UriInterface $uri, $key, $value) -> UriInterface`
+
+Create a new URI with a specific query string value removed.
+
+Any existing query string values that exactly match the provided key are
+removed.
+
+Note: this function will convert "=" to "%3D" and "&" to "%26".
+
+
+## `GuzzleHttp\Psr7\Uri::fromParts`
+
+`public static function fromParts(array $parts) -> UriInterface`
+
+Create a `GuzzleHttp\Psr7\Uri` object from a hash of `parse_url` parts.
+
+
+# Not Implemented
+
+A few aspects of PSR-7 are not implemented in this project. A pull request for
+any of these features is welcome:
+
+- `Psr\Http\Message\ServerRequestInterface`
+- `Psr\Http\Message\UploadedFileInterface`
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/composer.json	(revision 5534)
@@ -0,0 +1,35 @@
+{
+    "name": "guzzlehttp/psr7",
+    "type": "library",
+    "description": "PSR-7 message implementation",
+    "keywords": ["message", "stream", "http", "uri"],
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "Michael Dowling",
+            "email": "mtdowling@gmail.com",
+            "homepage": "https://github.com/mtdowling"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0",
+        "psr/http-message": "~1.0"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "~4.0"
+    },
+    "provide": {
+        "psr/http-message-implementation": "1.0"
+    },
+    "autoload": {
+        "psr-4": {
+            "GuzzleHttp\\Psr7\\": "src/"
+        },
+        "files": ["src/functions_include.php"]
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "1.0-dev"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/phpunit.xml.dist
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/phpunit.xml.dist	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/phpunit.xml.dist	(revision 5534)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="./tests/bootstrap.php"
+         colors="true">
+  <testsuites>
+    <testsuite>
+      <directory>tests</directory>
+    </testsuite>
+  </testsuites>
+  <filter>
+    <whitelist>
+      <directory suffix=".php">src</directory>
+      <exclude>
+        <directory suffix="Interface.php">src/</directory>
+      </exclude>
+    </whitelist>
+  </filter>
+</phpunit>
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/AppendStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/AppendStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/AppendStream.php	(revision 5534)
@@ -0,0 +1,233 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Reads from multiple streams, one after the other.
+ *
+ * This is a read-only stream decorator.
+ */
+class AppendStream implements StreamInterface
+{
+    /** @var StreamInterface[] Streams being decorated */
+    private $streams = [];
+
+    private $seekable = true;
+    private $current = 0;
+    private $pos = 0;
+    private $detached = false;
+
+    /**
+     * @param StreamInterface[] $streams Streams to decorate. Each stream must
+     *                                   be readable.
+     */
+    public function __construct(array $streams = [])
+    {
+        foreach ($streams as $stream) {
+            $this->addStream($stream);
+        }
+    }
+
+    public function __toString()
+    {
+        try {
+            $this->rewind();
+            return $this->getContents();
+        } catch (\Exception $e) {
+            return '';
+        }
+    }
+
+    /**
+     * Add a stream to the AppendStream
+     *
+     * @param StreamInterface $stream Stream to append. Must be readable.
+     *
+     * @throws \InvalidArgumentException if the stream is not readable
+     */
+    public function addStream(StreamInterface $stream)
+    {
+        if (!$stream->isReadable()) {
+            throw new \InvalidArgumentException('Each stream must be readable');
+        }
+
+        // The stream is only seekable if all streams are seekable
+        if (!$stream->isSeekable()) {
+            $this->seekable = false;
+        }
+
+        $this->streams[] = $stream;
+    }
+
+    public function getContents()
+    {
+        return copy_to_string($this);
+    }
+
+    /**
+     * Closes each attached stream.
+     *
+     * {@inheritdoc}
+     */
+    public function close()
+    {
+        $this->pos = $this->current = 0;
+
+        foreach ($this->streams as $stream) {
+            $stream->close();
+        }
+
+        $this->streams = [];
+    }
+
+    /**
+     * Detaches each attached stream
+     *
+     * {@inheritdoc}
+     */
+    public function detach()
+    {
+        $this->close();
+        $this->detached = true;
+    }
+
+    public function tell()
+    {
+        return $this->pos;
+    }
+
+    /**
+     * Tries to calculate the size by adding the size of each stream.
+     *
+     * If any of the streams do not return a valid number, then the size of the
+     * append stream cannot be determined and null is returned.
+     *
+     * {@inheritdoc}
+     */
+    public function getSize()
+    {
+        $size = 0;
+
+        foreach ($this->streams as $stream) {
+            $s = $stream->getSize();
+            if ($s === null) {
+                return null;
+            }
+            $size += $s;
+        }
+
+        return $size;
+    }
+
+    public function eof()
+    {
+        return !$this->streams ||
+            ($this->current >= count($this->streams) - 1 &&
+             $this->streams[$this->current]->eof());
+    }
+
+    public function rewind()
+    {
+        $this->seek(0);
+    }
+
+    /**
+     * Attempts to seek to the given position. Only supports SEEK_SET.
+     *
+     * {@inheritdoc}
+     */
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        if (!$this->seekable) {
+            throw new \RuntimeException('This AppendStream is not seekable');
+        } elseif ($whence !== SEEK_SET) {
+            throw new \RuntimeException('The AppendStream can only seek with SEEK_SET');
+        }
+
+        $this->pos = $this->current = 0;
+
+        // Rewind each stream
+        foreach ($this->streams as $i => $stream) {
+            try {
+                $stream->rewind();
+            } catch (\Exception $e) {
+                throw new \RuntimeException('Unable to seek stream '
+                    . $i . ' of the AppendStream', 0, $e);
+            }
+        }
+
+        // Seek to the actual position by reading from each stream
+        while ($this->pos < $offset && !$this->eof()) {
+            $result = $this->read(min(8096, $offset - $this->pos));
+            if ($result === '') {
+                break;
+            }
+        }
+    }
+
+    /**
+     * Reads from all of the appended streams until the length is met or EOF.
+     *
+     * {@inheritdoc}
+     */
+    public function read($length)
+    {
+        $buffer = '';
+        $total = count($this->streams) - 1;
+        $remaining = $length;
+        $progressToNext = false;
+
+        while ($remaining > 0) {
+
+            // Progress to the next stream if needed.
+            if ($progressToNext || $this->streams[$this->current]->eof()) {
+                $progressToNext = false;
+                if ($this->current === $total) {
+                    break;
+                }
+                $this->current++;
+            }
+
+            $result = $this->streams[$this->current]->read($remaining);
+
+            // Using a loose comparison here to match on '', false, and null
+            if ($result == null) {
+                $progressToNext = true;
+                continue;
+            }
+
+            $buffer .= $result;
+            $remaining = $length - strlen($buffer);
+        }
+
+        $this->pos += strlen($buffer);
+
+        return $buffer;
+    }
+
+    public function isReadable()
+    {
+        return true;
+    }
+
+    public function isWritable()
+    {
+        return false;
+    }
+
+    public function isSeekable()
+    {
+        return $this->seekable;
+    }
+
+    public function write($string)
+    {
+        throw new \RuntimeException('Cannot write to an AppendStream');
+    }
+
+    public function getMetadata($key = null)
+    {
+        return $key ? null : [];
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/BufferStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/BufferStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/BufferStream.php	(revision 5534)
@@ -0,0 +1,137 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Provides a buffer stream that can be written to to fill a buffer, and read
+ * from to remove bytes from the buffer.
+ *
+ * This stream returns a "hwm" metadata value that tells upstream consumers
+ * what the configured high water mark of the stream is, or the maximum
+ * preferred size of the buffer.
+ */
+class BufferStream implements StreamInterface
+{
+    private $hwm;
+    private $buffer = '';
+
+    /**
+     * @param int $hwm High water mark, representing the preferred maximum
+     *                 buffer size. If the size of the buffer exceeds the high
+     *                 water mark, then calls to write will continue to succeed
+     *                 but will return false to inform writers to slow down
+     *                 until the buffer has been drained by reading from it.
+     */
+    public function __construct($hwm = 16384)
+    {
+        $this->hwm = $hwm;
+    }
+
+    public function __toString()
+    {
+        return $this->getContents();
+    }
+
+    public function getContents()
+    {
+        $buffer = $this->buffer;
+        $this->buffer = '';
+
+        return $buffer;
+    }
+
+    public function close()
+    {
+        $this->buffer = '';
+    }
+
+    public function detach()
+    {
+        $this->close();
+    }
+
+    public function getSize()
+    {
+        return strlen($this->buffer);
+    }
+
+    public function isReadable()
+    {
+        return true;
+    }
+
+    public function isWritable()
+    {
+        return true;
+    }
+
+    public function isSeekable()
+    {
+        return false;
+    }
+
+    public function rewind()
+    {
+        $this->seek(0);
+    }
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        throw new \RuntimeException('Cannot seek a BufferStream');
+    }
+
+    public function eof()
+    {
+        return strlen($this->buffer) === 0;
+    }
+
+    public function tell()
+    {
+        throw new \RuntimeException('Cannot determine the position of a BufferStream');
+    }
+
+    /**
+     * Reads data from the buffer.
+     */
+    public function read($length)
+    {
+        $currentLength = strlen($this->buffer);
+
+        if ($length >= $currentLength) {
+            // No need to slice the buffer because we don't have enough data.
+            $result = $this->buffer;
+            $this->buffer = '';
+        } else {
+            // Slice up the result to provide a subset of the buffer.
+            $result = substr($this->buffer, 0, $length);
+            $this->buffer = substr($this->buffer, $length);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Writes data to the buffer.
+     */
+    public function write($string)
+    {
+        $this->buffer .= $string;
+
+        // TODO: What should happen here?
+        if (strlen($this->buffer) >= $this->hwm) {
+            return false;
+        }
+
+        return strlen($string);
+    }
+
+    public function getMetadata($key = null)
+    {
+        if ($key == 'hwm') {
+            return $this->hwm;
+        }
+
+        return $key ? null : [];
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/CachingStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/CachingStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/CachingStream.php	(revision 5534)
@@ -0,0 +1,135 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that can cache previously read bytes from a sequentially
+ * read stream.
+ */
+class CachingStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    /** @var StreamInterface Stream being wrapped */
+    private $remoteStream;
+
+    /** @var int Number of bytes to skip reading due to a write on the buffer */
+    private $skipReadBytes = 0;
+
+    /**
+     * We will treat the buffer object as the body of the stream
+     *
+     * @param StreamInterface $stream Stream to cache
+     * @param StreamInterface $target Optionally specify where data is cached
+     */
+    public function __construct(
+        StreamInterface $stream,
+        StreamInterface $target = null
+    ) {
+        $this->remoteStream = $stream;
+        $this->stream = $target ?: new Stream(fopen('php://temp', 'r+'));
+    }
+
+    public function getSize()
+    {
+        return max($this->stream->getSize(), $this->remoteStream->getSize());
+    }
+
+    public function rewind()
+    {
+        $this->seek(0);
+    }
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        if ($whence == SEEK_SET) {
+            $byte = $offset;
+        } elseif ($whence == SEEK_CUR) {
+            $byte = $offset + $this->tell();
+        } elseif ($whence == SEEK_END) {
+            $size = $this->remoteStream->getSize();
+            if ($size === null) {
+                $size = $this->cacheEntireStream();
+            }
+            $byte = $size + $offset;
+        } else {
+            throw new \InvalidArgumentException('Invalid whence');
+        }
+
+        $diff = $byte - $this->stream->getSize();
+
+        if ($diff > 0) {
+            // If the seek byte is greater the number of read bytes, then read
+            // the difference of bytes to cache the bytes and inherently seek.
+            $this->read($diff);
+        } else {
+            // We can just do a normal seek since we've already seen this byte.
+            $this->stream->seek($byte);
+        }
+    }
+
+    public function read($length)
+    {
+        // Perform a regular read on any previously read data from the buffer
+        $data = $this->stream->read($length);
+        $remaining = $length - strlen($data);
+
+        // More data was requested so read from the remote stream
+        if ($remaining) {
+            // If data was written to the buffer in a position that would have
+            // been filled from the remote stream, then we must skip bytes on
+            // the remote stream to emulate overwriting bytes from that
+            // position. This mimics the behavior of other PHP stream wrappers.
+            $remoteData = $this->remoteStream->read(
+                $remaining + $this->skipReadBytes
+            );
+
+            if ($this->skipReadBytes) {
+                $len = strlen($remoteData);
+                $remoteData = substr($remoteData, $this->skipReadBytes);
+                $this->skipReadBytes = max(0, $this->skipReadBytes - $len);
+            }
+
+            $data .= $remoteData;
+            $this->stream->write($remoteData);
+        }
+
+        return $data;
+    }
+
+    public function write($string)
+    {
+        // When appending to the end of the currently read stream, you'll want
+        // to skip bytes from being read from the remote stream to emulate
+        // other stream wrappers. Basically replacing bytes of data of a fixed
+        // length.
+        $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell();
+        if ($overflow > 0) {
+            $this->skipReadBytes += $overflow;
+        }
+
+        return $this->stream->write($string);
+    }
+
+    public function eof()
+    {
+        return $this->stream->eof() && $this->remoteStream->eof();
+    }
+
+    /**
+     * Close both the remote stream and buffer stream
+     */
+    public function close()
+    {
+        $this->remoteStream->close() && $this->stream->close();
+    }
+
+    private function cacheEntireStream()
+    {
+        $target = new FnStream(['write' => 'strlen']);
+        copy_to_stream($this, $target);
+
+        return $this->tell();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/DroppingStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/DroppingStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/DroppingStream.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that begins dropping data once the size of the underlying
+ * stream becomes too full.
+ */
+class DroppingStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    private $maxLength;
+
+    /**
+     * @param StreamInterface $stream    Underlying stream to decorate.
+     * @param int             $maxLength Maximum size before dropping data.
+     */
+    public function __construct(StreamInterface $stream, $maxLength)
+    {
+        $this->stream = $stream;
+        $this->maxLength = $maxLength;
+    }
+
+    public function write($string)
+    {
+        $diff = $this->maxLength - $this->stream->getSize();
+
+        // Begin returning 0 when the underlying stream is too large.
+        if ($diff <= 0) {
+            return 0;
+        }
+
+        // Write the stream or a subset of the stream if needed.
+        if (strlen($string) < $diff) {
+            return $this->stream->write($string);
+        }
+
+        return $this->stream->write(substr($string, 0, $diff));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/FnStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/FnStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/FnStream.php	(revision 5534)
@@ -0,0 +1,149 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Compose stream implementations based on a hash of functions.
+ *
+ * Allows for easy testing and extension of a provided stream without needing
+ * to create a concrete class for a simple extension point.
+ */
+class FnStream implements StreamInterface
+{
+    /** @var array */
+    private $methods;
+
+    /** @var array Methods that must be implemented in the given array */
+    private static $slots = ['__toString', 'close', 'detach', 'rewind',
+        'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write',
+        'isReadable', 'read', 'getContents', 'getMetadata'];
+
+    /**
+     * @param array $methods Hash of method name to a callable.
+     */
+    public function __construct(array $methods)
+    {
+        $this->methods = $methods;
+
+        // Create the functions on the class
+        foreach ($methods as $name => $fn) {
+            $this->{'_fn_' . $name} = $fn;
+        }
+    }
+
+    /**
+     * Lazily determine which methods are not implemented.
+     * @throws \BadMethodCallException
+     */
+    public function __get($name)
+    {
+        throw new \BadMethodCallException(str_replace('_fn_', '', $name)
+            . '() is not implemented in the FnStream');
+    }
+
+    /**
+     * The close method is called on the underlying stream only if possible.
+     */
+    public function __destruct()
+    {
+        if (isset($this->_fn_close)) {
+            call_user_func($this->_fn_close);
+        }
+    }
+
+    /**
+     * Adds custom functionality to an underlying stream by intercepting
+     * specific method calls.
+     *
+     * @param StreamInterface $stream  Stream to decorate
+     * @param array           $methods Hash of method name to a closure
+     *
+     * @return FnStream
+     */
+    public static function decorate(StreamInterface $stream, array $methods)
+    {
+        // If any of the required methods were not provided, then simply
+        // proxy to the decorated stream.
+        foreach (array_diff(self::$slots, array_keys($methods)) as $diff) {
+            $methods[$diff] = [$stream, $diff];
+        }
+
+        return new self($methods);
+    }
+
+    public function __toString()
+    {
+        return call_user_func($this->_fn___toString);
+    }
+
+    public function close()
+    {
+        return call_user_func($this->_fn_close);
+    }
+
+    public function detach()
+    {
+        return call_user_func($this->_fn_detach);
+    }
+
+    public function getSize()
+    {
+        return call_user_func($this->_fn_getSize);
+    }
+
+    public function tell()
+    {
+        return call_user_func($this->_fn_tell);
+    }
+
+    public function eof()
+    {
+        return call_user_func($this->_fn_eof);
+    }
+
+    public function isSeekable()
+    {
+        return call_user_func($this->_fn_isSeekable);
+    }
+
+    public function rewind()
+    {
+        call_user_func($this->_fn_rewind);
+    }
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        call_user_func($this->_fn_seek, $offset, $whence);
+    }
+
+    public function isWritable()
+    {
+        return call_user_func($this->_fn_isWritable);
+    }
+
+    public function write($string)
+    {
+        return call_user_func($this->_fn_write, $string);
+    }
+
+    public function isReadable()
+    {
+        return call_user_func($this->_fn_isReadable);
+    }
+
+    public function read($length)
+    {
+        return call_user_func($this->_fn_read, $length);
+    }
+
+    public function getContents()
+    {
+        return call_user_func($this->_fn_getContents);
+    }
+
+    public function getMetadata($key = null)
+    {
+        return call_user_func($this->_fn_getMetadata, $key);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/InflateStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/InflateStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/InflateStream.php	(revision 5534)
@@ -0,0 +1,29 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
+ *
+ * This stream decorator skips the first 10 bytes of the given stream to remove
+ * the gzip header, converts the provided stream to a PHP stream resource,
+ * then appends the zlib.inflate filter. The stream is then converted back
+ * to a Guzzle stream resource to be used as a Guzzle stream.
+ *
+ * @link http://tools.ietf.org/html/rfc1952
+ * @link http://php.net/manual/en/filters.compression.php
+ */
+class InflateStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    public function __construct(StreamInterface $stream)
+    {
+        // Skip the first 10 bytes
+        $stream = new LimitStream($stream, -1, 10);
+        $resource = StreamWrapper::getResource($stream);
+        stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
+        $this->stream = new Stream($resource);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/LazyOpenStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/LazyOpenStream.php	(revision 5534)
@@ -0,0 +1,39 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Lazily reads or writes to a file that is opened only after an IO operation
+ * take place on the stream.
+ */
+class LazyOpenStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    /** @var string File to open */
+    private $filename;
+
+    /** @var string $mode */
+    private $mode;
+
+    /**
+     * @param string $filename File to lazily open
+     * @param string $mode     fopen mode to use when opening the stream
+     */
+    public function __construct($filename, $mode)
+    {
+        $this->filename = $filename;
+        $this->mode = $mode;
+    }
+
+    /**
+     * Creates the underlying stream lazily when required.
+     *
+     * @return StreamInterface
+     */
+    protected function createStream()
+    {
+        return stream_for(try_fopen($this->filename, $this->mode));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/LimitStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/LimitStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/LimitStream.php	(revision 5534)
@@ -0,0 +1,155 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+
+/**
+ * Decorator used to return only a subset of a stream
+ */
+class LimitStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    /** @var int Offset to start reading from */
+    private $offset;
+
+    /** @var int Limit the number of bytes that can be read */
+    private $limit;
+
+    /**
+     * @param StreamInterface $stream Stream to wrap
+     * @param int             $limit  Total number of bytes to allow to be read
+     *                                from the stream. Pass -1 for no limit.
+     * @param int|null        $offset Position to seek to before reading (only
+     *                                works on seekable streams).
+     */
+    public function __construct(
+        StreamInterface $stream,
+        $limit = -1,
+        $offset = 0
+    ) {
+        $this->stream = $stream;
+        $this->setLimit($limit);
+        $this->setOffset($offset);
+    }
+
+    public function eof()
+    {
+        // Always return true if the underlying stream is EOF
+        if ($this->stream->eof()) {
+            return true;
+        }
+
+        // No limit and the underlying stream is not at EOF
+        if ($this->limit == -1) {
+            return false;
+        }
+
+        return $this->stream->tell() >= $this->offset + $this->limit;
+    }
+
+    /**
+     * Returns the size of the limited subset of data
+     * {@inheritdoc}
+     */
+    public function getSize()
+    {
+        if (null === ($length = $this->stream->getSize())) {
+            return null;
+        } elseif ($this->limit == -1) {
+            return $length - $this->offset;
+        } else {
+            return min($this->limit, $length - $this->offset);
+        }
+    }
+
+    /**
+     * Allow for a bounded seek on the read limited stream
+     * {@inheritdoc}
+     */
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        if ($whence !== SEEK_SET || $offset < 0) {
+            throw new \RuntimeException(sprintf(
+                'Cannot seek to offset % with whence %s',
+                $offset,
+                $whence
+            ));
+        }
+
+        $offset += $this->offset;
+
+        if ($this->limit !== -1) {
+            if ($offset > $this->offset + $this->limit) {
+                $offset = $this->offset + $this->limit;
+            }
+        }
+
+        $this->stream->seek($offset);
+    }
+
+    /**
+     * Give a relative tell()
+     * {@inheritdoc}
+     */
+    public function tell()
+    {
+        return $this->stream->tell() - $this->offset;
+    }
+
+    /**
+     * Set the offset to start limiting from
+     *
+     * @param int $offset Offset to seek to and begin byte limiting from
+     *
+     * @throws \RuntimeException if the stream cannot be seeked.
+     */
+    public function setOffset($offset)
+    {
+        $current = $this->stream->tell();
+
+        if ($current !== $offset) {
+            // If the stream cannot seek to the offset position, then read to it
+            if ($this->stream->isSeekable()) {
+                $this->stream->seek($offset);
+            } elseif ($current > $offset) {
+                throw new \RuntimeException("Could not seek to stream offset $offset");
+            } else {
+                $this->stream->read($offset - $current);
+            }
+        }
+
+        $this->offset = $offset;
+    }
+
+    /**
+     * Set the limit of bytes that the decorator allows to be read from the
+     * stream.
+     *
+     * @param int $limit Number of bytes to allow to be read from the stream.
+     *                   Use -1 for no limit.
+     */
+    public function setLimit($limit)
+    {
+        $this->limit = $limit;
+    }
+
+    public function read($length)
+    {
+        if ($this->limit == -1) {
+            return $this->stream->read($length);
+        }
+
+        // Check if the current position is less than the total allowed
+        // bytes + original offset
+        $remaining = ($this->offset + $this->limit) - $this->stream->tell();
+        if ($remaining > 0) {
+            // Only return the amount of requested data, ensuring that the byte
+            // limit is not exceeded
+            return $this->stream->read(min($remaining, $length));
+        }
+
+        return '';
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/MessageTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/MessageTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/MessageTrait.php	(revision 5534)
@@ -0,0 +1,158 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Trait implementing functionality common to requests and responses.
+ */
+trait MessageTrait
+{
+    /** @var array Cached HTTP header collection with lowercase key to values */
+    private $headers = [];
+
+    /** @var array Actual key to list of values per header. */
+    private $headerLines = [];
+
+    /** @var string */
+    private $protocol = '1.1';
+
+    /** @var StreamInterface */
+    private $stream;
+
+    public function getProtocolVersion()
+    {
+        return $this->protocol;
+    }
+
+    public function withProtocolVersion($version)
+    {
+        if ($this->protocol === $version) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->protocol = $version;
+        return $new;
+    }
+
+    public function getHeaders()
+    {
+        return $this->headerLines;
+    }
+
+    public function hasHeader($header)
+    {
+        return isset($this->headers[strtolower($header)]);
+    }
+
+    public function getHeader($header)
+    {
+        $name = strtolower($header);
+        return isset($this->headers[$name]) ? $this->headers[$name] : [];
+    }
+
+    public function getHeaderLine($header)
+    {
+        return implode(', ', $this->getHeader($header));
+    }
+
+    public function withHeader($header, $value)
+    {
+        $new = clone $this;
+        $header = trim($header);
+        $name = strtolower($header);
+
+        if (!is_array($value)) {
+            $new->headers[$name] = [trim($value)];
+        } else {
+            $new->headers[$name] = $value;
+            foreach ($new->headers[$name] as &$v) {
+                $v = trim($v);
+            }
+        }
+
+        // Remove the header lines.
+        foreach (array_keys($new->headerLines) as $key) {
+            if (strtolower($key) === $name) {
+                unset($new->headerLines[$key]);
+            }
+        }
+
+        // Add the header line.
+        $new->headerLines[$header] = $new->headers[$name];
+
+        return $new;
+    }
+
+    public function withAddedHeader($header, $value)
+    {
+        if (!$this->hasHeader($header)) {
+            return $this->withHeader($header, $value);
+        }
+
+        $new = clone $this;
+        $new->headers[strtolower($header)][] = $value;
+        $new->headerLines[$header][] = $value;
+        return $new;
+    }
+
+    public function withoutHeader($header)
+    {
+        if (!$this->hasHeader($header)) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $name = strtolower($header);
+        unset($new->headers[$name]);
+
+        foreach (array_keys($new->headerLines) as $key) {
+            if (strtolower($key) === $name) {
+                unset($new->headerLines[$key]);
+            }
+        }
+
+        return $new;
+    }
+
+    public function getBody()
+    {
+        if (!$this->stream) {
+            $this->stream = stream_for('');
+        }
+
+        return $this->stream;
+    }
+
+    public function withBody(StreamInterface $body)
+    {
+        if ($body === $this->stream) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->stream = $body;
+        return $new;
+    }
+
+    private function setHeaders(array $headers)
+    {
+        $this->headerLines = $this->headers = [];
+        foreach ($headers as $header => $value) {
+            $header = trim($header);
+            $name = strtolower($header);
+            if (!is_array($value)) {
+                $value = trim($value);
+                $this->headers[$name][] = $value;
+                $this->headerLines[$header][] = $value;
+            } else {
+                foreach ($value as $v) {
+                    $v = trim($v);
+                    $this->headers[$name][] = $v;
+                    $this->headerLines[$header][] = $v;
+                }
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/MultipartStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/MultipartStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/MultipartStream.php	(revision 5534)
@@ -0,0 +1,153 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream that when read returns bytes for a streaming multipart or
+ * multipart/form-data stream.
+ */
+class MultipartStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    private $boundary;
+
+    /**
+     * @param array  $elements Array of associative arrays, each containing a
+     *                         required "name" key mapping to the form field,
+     *                         name, a required "contents" key mapping to a
+     *                         StreamInterface/resource/string, an optional
+     *                         "headers" associative array of custom headers,
+     *                         and an optional "filename" key mapping to a
+     *                         string to send as the filename in the part.
+     * @param string $boundary You can optionally provide a specific boundary
+     *
+     * @throws \InvalidArgumentException
+     */
+    public function __construct(array $elements = [], $boundary = null)
+    {
+        $this->boundary = $boundary ?: uniqid();
+        $this->stream = $this->createStream($elements);
+    }
+
+    /**
+     * Get the boundary
+     *
+     * @return string
+     */
+    public function getBoundary()
+    {
+        return $this->boundary;
+    }
+
+    public function isWritable()
+    {
+        return false;
+    }
+
+    /**
+     * Get the headers needed before transferring the content of a POST file
+     */
+    private function getHeaders(array $headers)
+    {
+        $str = '';
+        foreach ($headers as $key => $value) {
+            $str .= "{$key}: {$value}\r\n";
+        }
+
+        return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
+    }
+
+    /**
+     * Create the aggregate stream that will be used to upload the POST data
+     */
+    protected function createStream(array $elements)
+    {
+        $stream = new AppendStream();
+
+        foreach ($elements as $element) {
+            $this->addElement($stream, $element);
+        }
+
+        // Add the trailing boundary with CRLF
+        $stream->addStream(stream_for("--{$this->boundary}--\r\n"));
+
+        return $stream;
+    }
+
+    private function addElement(AppendStream $stream, array $element)
+    {
+        foreach (['contents', 'name'] as $key) {
+            if (!array_key_exists($key, $element)) {
+                throw new \InvalidArgumentException("A '{$key}' key is required");
+            }
+        }
+
+        $element['contents'] = stream_for($element['contents']);
+
+        if (empty($element['filename'])) {
+            $uri = $element['contents']->getMetadata('uri');
+            if (substr($uri, 0, 6) !== 'php://') {
+                $element['filename'] = $uri;
+            }
+        }
+
+        list($body, $headers) = $this->createElement(
+            $element['name'],
+            $element['contents'],
+            isset($element['filename']) ? $element['filename'] : null,
+            isset($element['headers']) ? $element['headers'] : []
+        );
+
+        $stream->addStream(stream_for($this->getHeaders($headers)));
+        $stream->addStream($body);
+        $stream->addStream(stream_for("\r\n"));
+    }
+
+    /**
+     * @return array
+     */
+    private function createElement($name, $stream, $filename, array $headers)
+    {
+        // Set a default content-disposition header if one was no provided
+        $disposition = $this->getHeader($headers, 'content-disposition');
+        if (!$disposition) {
+            $headers['Content-Disposition'] = ($filename === '0' || $filename)
+                ? sprintf('form-data; name="%s"; filename="%s"',
+                    $name,
+                    basename($filename))
+                : "form-data; name=\"{$name}\"";
+        }
+
+        // Set a default content-length header if one was no provided
+        $length = $this->getHeader($headers, 'content-length');
+        if (!$length) {
+            if ($length = $stream->getSize()) {
+                $headers['Content-Length'] = (string) $length;
+            }
+        }
+
+        // Set a default Content-Type if one was not supplied
+        $type = $this->getHeader($headers, 'content-type');
+        if (!$type && ($filename === '0' || $filename)) {
+            if ($type = mimetype_from_filename($filename)) {
+                $headers['Content-Type'] = $type;
+            }
+        }
+
+        return [$stream, $headers];
+    }
+
+    private function getHeader(array $headers, $key)
+    {
+        $lowercaseHeader = strtolower($key);
+        foreach ($headers as $k => $v) {
+            if (strtolower($k) === $lowercaseHeader) {
+                return $v;
+            }
+        }
+
+        return null;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/NoSeekStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/NoSeekStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/NoSeekStream.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that prevents a stream from being seeked
+ */
+class NoSeekStream implements StreamInterface
+{
+    use StreamDecoratorTrait;
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        throw new \RuntimeException('Cannot seek a NoSeekStream');
+    }
+
+    public function isSeekable()
+    {
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/PumpStream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/PumpStream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/PumpStream.php	(revision 5534)
@@ -0,0 +1,165 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Provides a read only stream that pumps data from a PHP callable.
+ *
+ * When invoking the provided callable, the PumpStream will pass the amount of
+ * data requested to read to the callable. The callable can choose to ignore
+ * this value and return fewer or more bytes than requested. Any extra data
+ * returned by the provided callable is buffered internally until drained using
+ * the read() function of the PumpStream. The provided callable MUST return
+ * false when there is no more data to read.
+ */
+class PumpStream implements StreamInterface
+{
+    /** @var callable */
+    private $source;
+
+    /** @var int */
+    private $size;
+
+    /** @var int */
+    private $tellPos = 0;
+
+    /** @var array */
+    private $metadata;
+
+    /** @var BufferStream */
+    private $buffer;
+
+    /**
+     * @param callable $source Source of the stream data. The callable MAY
+     *                         accept an integer argument used to control the
+     *                         amount of data to return. The callable MUST
+     *                         return a string when called, or false on error
+     *                         or EOF.
+     * @param array $options   Stream options:
+     *                         - metadata: Hash of metadata to use with stream.
+     *                         - size: Size of the stream, if known.
+     */
+    public function __construct(callable $source, array $options = [])
+    {
+        $this->source = $source;
+        $this->size = isset($options['size']) ? $options['size'] : null;
+        $this->metadata = isset($options['metadata']) ? $options['metadata'] : [];
+        $this->buffer = new BufferStream();
+    }
+
+    public function __toString()
+    {
+        try {
+            return copy_to_string($this);
+        } catch (\Exception $e) {
+            return '';
+        }
+    }
+
+    public function close()
+    {
+        $this->detach();
+    }
+
+    public function detach()
+    {
+        $this->tellPos = false;
+        $this->source = null;
+    }
+
+    public function getSize()
+    {
+        return $this->size;
+    }
+
+    public function tell()
+    {
+        return $this->tellPos;
+    }
+
+    public function eof()
+    {
+        return !$this->source;
+    }
+
+    public function isSeekable()
+    {
+        return false;
+    }
+
+    public function rewind()
+    {
+        $this->seek(0);
+    }
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        throw new \RuntimeException('Cannot seek a PumpStream');
+    }
+
+    public function isWritable()
+    {
+        return false;
+    }
+
+    public function write($string)
+    {
+        throw new \RuntimeException('Cannot write to a PumpStream');
+    }
+
+    public function isReadable()
+    {
+        return true;
+    }
+
+    public function read($length)
+    {
+        $data = $this->buffer->read($length);
+        $readLen = strlen($data);
+        $this->tellPos += $readLen;
+        $remaining = $length - $readLen;
+
+        if ($remaining) {
+            $this->pump($remaining);
+            $data .= $this->buffer->read($remaining);
+            $this->tellPos += strlen($data) - $readLen;
+        }
+
+        return $data;
+    }
+
+    public function getContents()
+    {
+        $result = '';
+        while (!$this->eof()) {
+            $result .= $this->read(1000000);
+        }
+
+        return $result;
+    }
+
+    public function getMetadata($key = null)
+    {
+        if (!$key) {
+            return $this->metadata;
+        }
+
+        return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
+    }
+
+    private function pump($length)
+    {
+        if ($this->source) {
+            do {
+                $data = call_user_func($this->source, $length);
+                if ($data === false || $data === null) {
+                    $this->source = null;
+                    return;
+                }
+                $this->buffer->write($data);
+                $length -= strlen($data);
+            } while ($length > 0);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Request.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Request.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Request.php	(revision 5534)
@@ -0,0 +1,149 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use InvalidArgumentException;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * PSR-7 request implementation.
+ */
+class Request implements RequestInterface
+{
+    use MessageTrait {
+        withHeader as protected withParentHeader;
+    }
+
+    /** @var string */
+    private $method;
+
+    /** @var null|string */
+    private $requestTarget;
+
+    /** @var null|UriInterface */
+    private $uri;
+
+    /**
+     * @param null|string $method HTTP method for the request.
+     * @param null|string|UriInterface $uri URI for the request.
+     * @param array $headers Headers for the message.
+     * @param string|resource|StreamInterface $body Message body.
+     * @param string $protocolVersion HTTP protocol version.
+     *
+     * @throws InvalidArgumentException for an invalid URI
+     */
+    public function __construct(
+        $method,
+        $uri,
+        array $headers = [],
+        $body = null,
+        $protocolVersion = '1.1'
+    ) {
+        if (is_string($uri)) {
+            $uri = new Uri($uri);
+        } elseif (!($uri instanceof UriInterface)) {
+            throw new \InvalidArgumentException(
+                'URI must be a string or Psr\Http\Message\UriInterface'
+            );
+        }
+
+        $this->method = strtoupper($method);
+        $this->uri = $uri;
+        $this->setHeaders($headers);
+        $this->protocol = $protocolVersion;
+
+        $host = $uri->getHost();
+        if ($host && !$this->hasHeader('Host')) {
+            $this->updateHostFromUri($host);
+        }
+
+        if ($body) {
+            $this->stream = stream_for($body);
+        }
+    }
+
+    public function getRequestTarget()
+    {
+        if ($this->requestTarget !== null) {
+            return $this->requestTarget;
+        }
+
+        $target = $this->uri->getPath();
+        if ($target == null) {
+            $target = '/';
+        }
+        if ($this->uri->getQuery()) {
+            $target .= '?' . $this->uri->getQuery();
+        }
+
+        return $target;
+    }
+
+    public function withRequestTarget($requestTarget)
+    {
+        if (preg_match('#\s#', $requestTarget)) {
+            throw new InvalidArgumentException(
+                'Invalid request target provided; cannot contain whitespace'
+            );
+        }
+
+        $new = clone $this;
+        $new->requestTarget = $requestTarget;
+        return $new;
+    }
+
+    public function getMethod()
+    {
+        return $this->method;
+    }
+
+    public function withMethod($method)
+    {
+        $new = clone $this;
+        $new->method = strtoupper($method);
+        return $new;
+    }
+
+    public function getUri()
+    {
+        return $this->uri;
+    }
+
+    public function withUri(UriInterface $uri, $preserveHost = false)
+    {
+        if ($uri === $this->uri) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->uri = $uri;
+
+        if (!$preserveHost) {
+            if ($host = $uri->getHost()) {
+                $new->updateHostFromUri($host);
+            }
+        }
+
+        return $new;
+    }
+
+    public function withHeader($header, $value)
+    {
+        /** @var Request $newInstance */
+        $newInstance = $this->withParentHeader($header, $value);
+        return $newInstance;
+    }
+
+    private function updateHostFromUri($host)
+    {
+        // Ensure Host is the first header.
+        // See: http://tools.ietf.org/html/rfc7230#section-5.4
+        if ($port = $this->uri->getPort()) {
+            $host .= ':' . $port;
+        }
+
+        $this->headerLines = ['Host' => [$host]] + $this->headerLines;
+        $this->headers = ['host' => [$host]] + $this->headers;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Response.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Response.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Response.php	(revision 5534)
@@ -0,0 +1,131 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * PSR-7 response implementation.
+ */
+class Response implements ResponseInterface
+{
+    use MessageTrait;
+
+    /** @var array Map of standard HTTP status code/reason phrases */
+    private static $phrases = [
+        100 => 'Continue',
+        101 => 'Switching Protocols',
+        102 => 'Processing',
+        200 => 'OK',
+        201 => 'Created',
+        202 => 'Accepted',
+        203 => 'Non-Authoritative Information',
+        204 => 'No Content',
+        205 => 'Reset Content',
+        206 => 'Partial Content',
+        207 => 'Multi-status',
+        208 => 'Already Reported',
+        300 => 'Multiple Choices',
+        301 => 'Moved Permanently',
+        302 => 'Found',
+        303 => 'See Other',
+        304 => 'Not Modified',
+        305 => 'Use Proxy',
+        306 => 'Switch Proxy',
+        307 => 'Temporary Redirect',
+        400 => 'Bad Request',
+        401 => 'Unauthorized',
+        402 => 'Payment Required',
+        403 => 'Forbidden',
+        404 => 'Not Found',
+        405 => 'Method Not Allowed',
+        406 => 'Not Acceptable',
+        407 => 'Proxy Authentication Required',
+        408 => 'Request Time-out',
+        409 => 'Conflict',
+        410 => 'Gone',
+        411 => 'Length Required',
+        412 => 'Precondition Failed',
+        413 => 'Request Entity Too Large',
+        414 => 'Request-URI Too Large',
+        415 => 'Unsupported Media Type',
+        416 => 'Requested range not satisfiable',
+        417 => 'Expectation Failed',
+        418 => 'I\'m a teapot',
+        422 => 'Unprocessable Entity',
+        423 => 'Locked',
+        424 => 'Failed Dependency',
+        425 => 'Unordered Collection',
+        426 => 'Upgrade Required',
+        428 => 'Precondition Required',
+        429 => 'Too Many Requests',
+        431 => 'Request Header Fields Too Large',
+        451 => 'Unavailable For Legal Reasons',
+        500 => 'Internal Server Error',
+        501 => 'Not Implemented',
+        502 => 'Bad Gateway',
+        503 => 'Service Unavailable',
+        504 => 'Gateway Time-out',
+        505 => 'HTTP Version not supported',
+        506 => 'Variant Also Negotiates',
+        507 => 'Insufficient Storage',
+        508 => 'Loop Detected',
+        511 => 'Network Authentication Required',
+    ];
+
+    /** @var null|string */
+    private $reasonPhrase = '';
+
+    /** @var int */
+    private $statusCode = 200;
+
+    /**
+     * @param int    $status  Status code for the response, if any.
+     * @param array  $headers Headers for the response, if any.
+     * @param mixed  $body    Stream body.
+     * @param string $version Protocol version.
+     * @param string $reason  Reason phrase (a default will be used if possible).
+     */
+    public function __construct(
+        $status = 200,
+        array $headers = [],
+        $body = null,
+        $version = '1.1',
+        $reason = null
+    ) {
+        $this->statusCode = (int) $status;
+
+        if ($body !== null) {
+            $this->stream = stream_for($body);
+        }
+
+        $this->setHeaders($headers);
+        if (!$reason && isset(self::$phrases[$this->statusCode])) {
+            $this->reasonPhrase = self::$phrases[$status];
+        } else {
+            $this->reasonPhrase = (string) $reason;
+        }
+
+        $this->protocol = $version;
+    }
+
+    public function getStatusCode()
+    {
+        return $this->statusCode;
+    }
+
+    public function getReasonPhrase()
+    {
+        return $this->reasonPhrase;
+    }
+
+    public function withStatus($code, $reasonPhrase = '')
+    {
+        $new = clone $this;
+        $new->statusCode = (int) $code;
+        if (!$reasonPhrase && isset(self::$phrases[$new->statusCode])) {
+            $reasonPhrase = self::$phrases[$new->statusCode];
+        }
+        $new->reasonPhrase = $reasonPhrase;
+        return $new;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Stream.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Stream.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Stream.php	(revision 5534)
@@ -0,0 +1,245 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * PHP stream implementation.
+ *
+ * @var $stream
+ */
+class Stream implements StreamInterface
+{
+    private $stream;
+    private $size;
+    private $seekable;
+    private $readable;
+    private $writable;
+    private $uri;
+    private $customMetadata;
+
+    /** @var array Hash of readable and writable stream types */
+    private static $readWriteHash = [
+        'read' => [
+            'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
+            'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
+            'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
+            'x+t' => true, 'c+t' => true, 'a+' => true
+        ],
+        'write' => [
+            'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
+            'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true,
+            'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
+            'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true
+        ]
+    ];
+
+    /**
+     * This constructor accepts an associative array of options.
+     *
+     * - size: (int) If a read stream would otherwise have an indeterminate
+     *   size, but the size is known due to foreknownledge, then you can
+     *   provide that size, in bytes.
+     * - metadata: (array) Any additional metadata to return when the metadata
+     *   of the stream is accessed.
+     *
+     * @param resource $stream  Stream resource to wrap.
+     * @param array    $options Associative array of options.
+     *
+     * @throws \InvalidArgumentException if the stream is not a stream resource
+     */
+    public function __construct($stream, $options = [])
+    {
+        if (!is_resource($stream)) {
+            throw new \InvalidArgumentException('Stream must be a resource');
+        }
+
+        if (isset($options['size'])) {
+            $this->size = $options['size'];
+        }
+
+        $this->customMetadata = isset($options['metadata'])
+            ? $options['metadata']
+            : [];
+
+        $this->stream = $stream;
+        $meta = stream_get_meta_data($this->stream);
+        $this->seekable = $meta['seekable'];
+        $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]);
+        $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]);
+        $this->uri = $this->getMetadata('uri');
+    }
+
+    public function __get($name)
+    {
+        if ($name == 'stream') {
+            throw new \RuntimeException('The stream is detached');
+        }
+
+        throw new \BadMethodCallException('No value for ' . $name);
+    }
+
+    /**
+     * Closes the stream when the destructed
+     */
+    public function __destruct()
+    {
+        $this->close();
+    }
+
+    public function __toString()
+    {
+        try {
+            $this->seek(0);
+            return (string) stream_get_contents($this->stream);
+        } catch (\Exception $e) {
+            return '';
+        }
+    }
+
+    public function getContents()
+    {
+        $contents = stream_get_contents($this->stream);
+
+        if ($contents === false) {
+            throw new \RuntimeException('Unable to read stream contents');
+        }
+
+        return $contents;
+    }
+
+    public function close()
+    {
+        if (isset($this->stream)) {
+            if (is_resource($this->stream)) {
+                fclose($this->stream);
+            }
+            $this->detach();
+        }
+    }
+
+    public function detach()
+    {
+        if (!isset($this->stream)) {
+            return null;
+        }
+
+        $result = $this->stream;
+        unset($this->stream);
+        $this->size = $this->uri = null;
+        $this->readable = $this->writable = $this->seekable = false;
+
+        return $result;
+    }
+
+    public function getSize()
+    {
+        if ($this->size !== null) {
+            return $this->size;
+        }
+
+        if (!isset($this->stream)) {
+            return null;
+        }
+
+        // Clear the stat cache if the stream has a URI
+        if ($this->uri) {
+            clearstatcache(true, $this->uri);
+        }
+
+        $stats = fstat($this->stream);
+        if (isset($stats['size'])) {
+            $this->size = $stats['size'];
+            return $this->size;
+        }
+
+        return null;
+    }
+
+    public function isReadable()
+    {
+        return $this->readable;
+    }
+
+    public function isWritable()
+    {
+        return $this->writable;
+    }
+
+    public function isSeekable()
+    {
+        return $this->seekable;
+    }
+
+    public function eof()
+    {
+        return !$this->stream || feof($this->stream);
+    }
+
+    public function tell()
+    {
+        $result = ftell($this->stream);
+
+        if ($result === false) {
+            throw new \RuntimeException('Unable to determine stream position');
+        }
+
+        return $result;
+    }
+
+    public function rewind()
+    {
+        $this->seek(0);
+    }
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        if (!$this->seekable) {
+            throw new \RuntimeException('Stream is not seekable');
+        } elseif (fseek($this->stream, $offset, $whence) === -1) {
+            throw new \RuntimeException('Unable to seek to stream position '
+                . $offset . ' with whence ' . var_export($whence, true));
+        }
+    }
+
+    public function read($length)
+    {
+        if (!$this->readable) {
+            throw new \RuntimeException('Cannot read from non-readable stream');
+        }
+
+        return fread($this->stream, $length);
+    }
+
+    public function write($string)
+    {
+        if (!$this->writable) {
+            throw new \RuntimeException('Cannot write to a non-writable stream');
+        }
+
+        // We can't know the size after writing anything
+        $this->size = null;
+        $result = fwrite($this->stream, $string);
+
+        if ($result === false) {
+            throw new \RuntimeException('Unable to write to stream');
+        }
+
+        return $result;
+    }
+
+    public function getMetadata($key = null)
+    {
+        if (!isset($this->stream)) {
+            return $key ? null : [];
+        } elseif (!$key) {
+            return $this->customMetadata + stream_get_meta_data($this->stream);
+        } elseif (isset($this->customMetadata[$key])) {
+            return $this->customMetadata[$key];
+        }
+
+        $meta = stream_get_meta_data($this->stream);
+
+        return isset($meta[$key]) ? $meta[$key] : null;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php	(revision 5534)
@@ -0,0 +1,149 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator trait
+ * @property StreamInterface stream
+ */
+trait StreamDecoratorTrait
+{
+    /**
+     * @param StreamInterface $stream Stream to decorate
+     */
+    public function __construct(StreamInterface $stream)
+    {
+        $this->stream = $stream;
+    }
+
+    /**
+     * Magic method used to create a new stream if streams are not added in
+     * the constructor of a decorator (e.g., LazyOpenStream).
+     *
+     * @param string $name Name of the property (allows "stream" only).
+     *
+     * @return StreamInterface
+     */
+    public function __get($name)
+    {
+        if ($name == 'stream') {
+            $this->stream = $this->createStream();
+            return $this->stream;
+        }
+
+        throw new \UnexpectedValueException("$name not found on class");
+    }
+
+    public function __toString()
+    {
+        try {
+            if ($this->isSeekable()) {
+                $this->seek(0);
+            }
+            return $this->getContents();
+        } catch (\Exception $e) {
+            // Really, PHP? https://bugs.php.net/bug.php?id=53648
+            trigger_error('StreamDecorator::__toString exception: '
+                . (string) $e, E_USER_ERROR);
+            return '';
+        }
+    }
+
+    public function getContents()
+    {
+        return copy_to_string($this);
+    }
+
+    /**
+     * Allow decorators to implement custom methods
+     *
+     * @param string $method Missing method name
+     * @param array  $args   Method arguments
+     *
+     * @return mixed
+     */
+    public function __call($method, array $args)
+    {
+        $result = call_user_func_array([$this->stream, $method], $args);
+
+        // Always return the wrapped object if the result is a return $this
+        return $result === $this->stream ? $this : $result;
+    }
+
+    public function close()
+    {
+        $this->stream->close();
+    }
+
+    public function getMetadata($key = null)
+    {
+        return $this->stream->getMetadata($key);
+    }
+
+    public function detach()
+    {
+        return $this->stream->detach();
+    }
+
+    public function getSize()
+    {
+        return $this->stream->getSize();
+    }
+
+    public function eof()
+    {
+        return $this->stream->eof();
+    }
+
+    public function tell()
+    {
+        return $this->stream->tell();
+    }
+
+    public function isReadable()
+    {
+        return $this->stream->isReadable();
+    }
+
+    public function isWritable()
+    {
+        return $this->stream->isWritable();
+    }
+
+    public function isSeekable()
+    {
+        return $this->stream->isSeekable();
+    }
+
+    public function rewind()
+    {
+        $this->seek(0);
+    }
+
+    public function seek($offset, $whence = SEEK_SET)
+    {
+        $this->stream->seek($offset, $whence);
+    }
+
+    public function read($length)
+    {
+        return $this->stream->read($length);
+    }
+
+    public function write($string)
+    {
+        return $this->stream->write($string);
+    }
+
+    /**
+     * Implement in subclasses to dynamically create streams when requested.
+     *
+     * @return StreamInterface
+     * @throws \BadMethodCallException
+     */
+    protected function createStream()
+    {
+        throw new \BadMethodCallException('Not implemented');
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/StreamWrapper.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/StreamWrapper.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/StreamWrapper.php	(revision 5534)
@@ -0,0 +1,121 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Converts Guzzle streams into PHP stream resources.
+ */
+class StreamWrapper
+{
+    /** @var resource */
+    public $context;
+
+    /** @var StreamInterface */
+    private $stream;
+
+    /** @var string r, r+, or w */
+    private $mode;
+
+    /**
+     * Returns a resource representing the stream.
+     *
+     * @param StreamInterface $stream The stream to get a resource for
+     *
+     * @return resource
+     * @throws \InvalidArgumentException if stream is not readable or writable
+     */
+    public static function getResource(StreamInterface $stream)
+    {
+        self::register();
+
+        if ($stream->isReadable()) {
+            $mode = $stream->isWritable() ? 'r+' : 'r';
+        } elseif ($stream->isWritable()) {
+            $mode = 'w';
+        } else {
+            throw new \InvalidArgumentException('The stream must be readable, '
+                . 'writable, or both.');
+        }
+
+        return fopen('guzzle://stream', $mode, null, stream_context_create([
+            'guzzle' => ['stream' => $stream]
+        ]));
+    }
+
+    /**
+     * Registers the stream wrapper if needed
+     */
+    public static function register()
+    {
+        if (!in_array('guzzle', stream_get_wrappers())) {
+            stream_wrapper_register('guzzle', __CLASS__);
+        }
+    }
+
+    public function stream_open($path, $mode, $options, &$opened_path)
+    {
+        $options = stream_context_get_options($this->context);
+
+        if (!isset($options['guzzle']['stream'])) {
+            return false;
+        }
+
+        $this->mode = $mode;
+        $this->stream = $options['guzzle']['stream'];
+
+        return true;
+    }
+
+    public function stream_read($count)
+    {
+        return $this->stream->read($count);
+    }
+
+    public function stream_write($data)
+    {
+        return (int) $this->stream->write($data);
+    }
+
+    public function stream_tell()
+    {
+        return $this->stream->tell();
+    }
+
+    public function stream_eof()
+    {
+        return $this->stream->eof();
+    }
+
+    public function stream_seek($offset, $whence)
+    {
+        $this->stream->seek($offset, $whence);
+
+        return true;
+    }
+
+    public function stream_stat()
+    {
+        static $modeMap = [
+            'r'  => 33060,
+            'r+' => 33206,
+            'w'  => 33188
+        ];
+
+        return [
+            'dev'     => 0,
+            'ino'     => 0,
+            'mode'    => $modeMap[$this->mode],
+            'nlink'   => 0,
+            'uid'     => 0,
+            'gid'     => 0,
+            'rdev'    => 0,
+            'size'    => $this->stream->getSize() ?: 0,
+            'atime'   => 0,
+            'mtime'   => 0,
+            'ctime'   => 0,
+            'blksize' => 0,
+            'blocks'  => 0
+        ];
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Uri.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Uri.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/Uri.php	(revision 5534)
@@ -0,0 +1,606 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Basic PSR-7 URI implementation.
+ *
+ * @link https://github.com/phly/http This class is based upon
+ *     Matthew Weier O'Phinney's URI implementation in phly/http.
+ */
+class Uri implements UriInterface
+{
+    private static $schemes = [
+        'http'  => 80,
+        'https' => 443,
+    ];
+
+    private static $charUnreserved = 'a-zA-Z0-9_\-\.~';
+    private static $charSubDelims = '!\$&\'\(\)\*\+,;=';
+    private static $replaceQuery = ['=' => '%3D', '&' => '%26'];
+
+    /** @var string Uri scheme. */
+    private $scheme = '';
+
+    /** @var string Uri user info. */
+    private $userInfo = '';
+
+    /** @var string Uri host. */
+    private $host = '';
+
+    /** @var int|null Uri port. */
+    private $port;
+
+    /** @var string Uri path. */
+    private $path = '';
+
+    /** @var string Uri query string. */
+    private $query = '';
+
+    /** @var string Uri fragment. */
+    private $fragment = '';
+
+    /**
+     * @param string $uri URI to parse and wrap.
+     */
+    public function __construct($uri = '')
+    {
+        if ($uri != null) {
+            $parts = parse_url($uri);
+            if ($parts === false) {
+                throw new \InvalidArgumentException("Unable to parse URI: $uri");
+            }
+            $this->applyParts($parts);
+        }
+    }
+
+    public function __toString()
+    {
+        return self::createUriString(
+            $this->scheme,
+            $this->getAuthority(),
+            $this->getPath(),
+            $this->query,
+            $this->fragment
+        );
+    }
+
+    /**
+     * Removes dot segments from a path and returns the new path.
+     *
+     * @param string $path
+     *
+     * @return string
+     * @link http://tools.ietf.org/html/rfc3986#section-5.2.4
+     */
+    public static function removeDotSegments($path)
+    {
+        static $noopPaths = ['' => true, '/' => true, '*' => true];
+        static $ignoreSegments = ['.' => true, '..' => true];
+
+        if (isset($noopPaths[$path])) {
+            return $path;
+        }
+
+        $results = [];
+        $segments = explode('/', $path);
+        foreach ($segments as $segment) {
+            if ($segment == '..') {
+                array_pop($results);
+            } elseif (!isset($ignoreSegments[$segment])) {
+                $results[] = $segment;
+            }
+        }
+
+        $newPath = implode('/', $results);
+        // Add the leading slash if necessary
+        if (substr($path, 0, 1) === '/' &&
+            substr($newPath, 0, 1) !== '/'
+        ) {
+            $newPath = '/' . $newPath;
+        }
+
+        // Add the trailing slash if necessary
+        if ($newPath != '/' && isset($ignoreSegments[end($segments)])) {
+            $newPath .= '/';
+        }
+
+        return $newPath;
+    }
+
+    /**
+     * Resolve a base URI with a relative URI and return a new URI.
+     *
+     * @param UriInterface $base Base URI
+     * @param string       $rel  Relative URI
+     *
+     * @return UriInterface
+     */
+    public static function resolve(UriInterface $base, $rel)
+    {
+        if ($rel === null || $rel === '') {
+            return $base;
+        }
+
+        if (!($rel instanceof UriInterface)) {
+            $rel = new self($rel);
+        }
+
+        // Return the relative uri as-is if it has a scheme.
+        if ($rel->getScheme()) {
+            return $rel->withPath(static::removeDotSegments($rel->getPath()));
+        }
+
+        $relParts = [
+            'scheme'    => $rel->getScheme(),
+            'authority' => $rel->getAuthority(),
+            'path'      => $rel->getPath(),
+            'query'     => $rel->getQuery(),
+            'fragment'  => $rel->getFragment()
+        ];
+
+        $parts = [
+            'scheme'    => $base->getScheme(),
+            'authority' => $base->getAuthority(),
+            'path'      => $base->getPath(),
+            'query'     => $base->getQuery(),
+            'fragment'  => $base->getFragment()
+        ];
+
+        if (!empty($relParts['authority'])) {
+            $parts['authority'] = $relParts['authority'];
+            $parts['path'] = self::removeDotSegments($relParts['path']);
+            $parts['query'] = $relParts['query'];
+            $parts['fragment'] = $relParts['fragment'];
+        } elseif (!empty($relParts['path'])) {
+            if (substr($relParts['path'], 0, 1) == '/') {
+                $parts['path'] = self::removeDotSegments($relParts['path']);
+                $parts['query'] = $relParts['query'];
+                $parts['fragment'] = $relParts['fragment'];
+            } else {
+                if (!empty($parts['authority']) && empty($parts['path'])) {
+                    $mergedPath = '/';
+                } else {
+                    $mergedPath = substr($parts['path'], 0, strrpos($parts['path'], '/') + 1);
+                }
+                $parts['path'] = self::removeDotSegments($mergedPath . $relParts['path']);
+                $parts['query'] = $relParts['query'];
+                $parts['fragment'] = $relParts['fragment'];
+            }
+        } elseif (!empty($relParts['query'])) {
+            $parts['query'] = $relParts['query'];
+        } elseif ($relParts['fragment'] != null) {
+            $parts['fragment'] = $relParts['fragment'];
+        }
+
+        return new self(static::createUriString(
+            $parts['scheme'],
+            $parts['authority'],
+            $parts['path'],
+            $parts['query'],
+            $parts['fragment']
+        ));
+    }
+
+    /**
+     * Create a new URI with a specific query string value removed.
+     *
+     * Any existing query string values that exactly match the provided key are
+     * removed.
+     *
+     * Note: this function will convert "=" to "%3D" and "&" to "%26".
+     *
+     * @param UriInterface $uri URI to use as a base.
+     * @param string       $key Query string key value pair to remove.
+     *
+     * @return UriInterface
+     */
+    public static function withoutQueryValue(UriInterface $uri, $key)
+    {
+        $current = $uri->getQuery();
+        if (!$current) {
+            return $uri;
+        }
+
+        $result = [];
+        foreach (explode('&', $current) as $part) {
+            if (explode('=', $part)[0] !== $key) {
+                $result[] = $part;
+            };
+        }
+
+        return $uri->withQuery(implode('&', $result));
+    }
+
+    /**
+     * Create a new URI with a specific query string value.
+     *
+     * Any existing query string values that exactly match the provided key are
+     * removed and replaced with the given key value pair.
+     *
+     * Note: this function will convert "=" to "%3D" and "&" to "%26".
+     *
+     * @param UriInterface $uri URI to use as a base.
+     * @param string $key   Key to set.
+     * @param string $value Value to set.
+     *
+     * @return UriInterface
+     */
+    public static function withQueryValue(UriInterface $uri, $key, $value)
+    {
+        $current = $uri->getQuery();
+        $key = strtr($key, self::$replaceQuery);
+
+        if (!$current) {
+            $result = [];
+        } else {
+            $result = [];
+            foreach (explode('&', $current) as $part) {
+                if (explode('=', $part)[0] !== $key) {
+                    $result[] = $part;
+                };
+            }
+        }
+
+        if ($value !== null) {
+            $result[] = $key . '=' . strtr($value, self::$replaceQuery);
+        } else {
+            $result[] = $key;
+        }
+
+        return $uri->withQuery(implode('&', $result));
+    }
+
+    /**
+     * Create a URI from a hash of parse_url parts.
+     *
+     * @param array $parts
+     *
+     * @return self
+     */
+    public static function fromParts(array $parts)
+    {
+        $uri = new self();
+        $uri->applyParts($parts);
+        return $uri;
+    }
+
+    public function getScheme()
+    {
+        return $this->scheme;
+    }
+
+    public function getAuthority()
+    {
+        if (empty($this->host)) {
+            return '';
+        }
+
+        $authority = $this->host;
+        if (!empty($this->userInfo)) {
+            $authority = $this->userInfo . '@' . $authority;
+        }
+
+        if ($this->isNonStandardPort($this->scheme, $this->host, $this->port)) {
+            $authority .= ':' . $this->port;
+        }
+
+        return $authority;
+    }
+
+    public function getUserInfo()
+    {
+        return $this->userInfo;
+    }
+
+    public function getHost()
+    {
+        return $this->host;
+    }
+
+    public function getPort()
+    {
+        return $this->port;
+    }
+
+    public function getPath()
+    {
+        return $this->path == null ? '' : $this->path;
+    }
+
+    public function getQuery()
+    {
+        return $this->query;
+    }
+
+    public function getFragment()
+    {
+        return $this->fragment;
+    }
+
+    public function withScheme($scheme)
+    {
+        $scheme = $this->filterScheme($scheme);
+
+        if ($this->scheme === $scheme) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->scheme = $scheme;
+        $new->port = $new->filterPort($new->scheme, $new->host, $new->port);
+        return $new;
+    }
+
+    public function withUserInfo($user, $password = null)
+    {
+        $info = $user;
+        if ($password) {
+            $info .= ':' . $password;
+        }
+
+        if ($this->userInfo === $info) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->userInfo = $info;
+        return $new;
+    }
+
+    public function withHost($host)
+    {
+        if ($this->host === $host) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->host = $host;
+        return $new;
+    }
+
+    public function withPort($port)
+    {
+        $port = $this->filterPort($this->scheme, $this->host, $port);
+
+        if ($this->port === $port) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->port = $port;
+        return $new;
+    }
+
+    public function withPath($path)
+    {
+        if (!is_string($path)) {
+            throw new \InvalidArgumentException(
+                'Invalid path provided; must be a string'
+            );
+        }
+
+        $path = $this->filterPath($path);
+
+        if ($this->path === $path) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->path = $path;
+        return $new;
+    }
+
+    public function withQuery($query)
+    {
+        if (!is_string($query) && !method_exists($query, '__toString')) {
+            throw new \InvalidArgumentException(
+                'Query string must be a string'
+            );
+        }
+
+        $query = (string) $query;
+        if (substr($query, 0, 1) === '?') {
+            $query = substr($query, 1);
+        }
+
+        $query = $this->filterQueryAndFragment($query);
+
+        if ($this->query === $query) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->query = $query;
+        return $new;
+    }
+
+    public function withFragment($fragment)
+    {
+        if (substr($fragment, 0, 1) === '#') {
+            $fragment = substr($fragment, 1);
+        }
+
+        $fragment = $this->filterQueryAndFragment($fragment);
+
+        if ($this->fragment === $fragment) {
+            return $this;
+        }
+
+        $new = clone $this;
+        $new->fragment = $fragment;
+        return $new;
+    }
+
+    /**
+     * Apply parse_url parts to a URI.
+     *
+     * @param $parts Array of parse_url parts to apply.
+     */
+    private function applyParts(array $parts)
+    {
+        $this->scheme = isset($parts['scheme'])
+            ? $this->filterScheme($parts['scheme'])
+            : '';
+        $this->userInfo = isset($parts['user']) ? $parts['user'] : '';
+        $this->host = isset($parts['host']) ? $parts['host'] : '';
+        $this->port = !empty($parts['port'])
+            ? $this->filterPort($this->scheme, $this->host, $parts['port'])
+            : null;
+        $this->path = isset($parts['path'])
+            ? $this->filterPath($parts['path'])
+            : '';
+        $this->query = isset($parts['query'])
+            ? $this->filterQueryAndFragment($parts['query'])
+            : '';
+        $this->fragment = isset($parts['fragment'])
+            ? $this->filterQueryAndFragment($parts['fragment'])
+            : '';
+        if (isset($parts['pass'])) {
+            $this->userInfo .= ':' . $parts['pass'];
+        }
+    }
+
+    /**
+     * Create a URI string from its various parts
+     *
+     * @param string $scheme
+     * @param string $authority
+     * @param string $path
+     * @param string $query
+     * @param string $fragment
+     * @return string
+     */
+    private static function createUriString($scheme, $authority, $path, $query, $fragment)
+    {
+        $uri = '';
+
+        if (!empty($scheme)) {
+            $uri .= $scheme . ':';
+        }
+
+        $hierPart = '';
+
+        if (!empty($authority)) {
+            if (!empty($scheme)) {
+                $hierPart .= '//';
+            }
+            $hierPart .= $authority;
+        }
+
+        if ($path != null) {
+            // Add a leading slash if necessary.
+            if ($hierPart && substr($path, 0, 1) !== '/') {
+                $hierPart .= '/';
+            }
+            $hierPart .= $path;
+        }
+
+        $uri .= $hierPart;
+
+        if ($query != null) {
+            $uri .= '?' . $query;
+        }
+
+        if ($fragment != null) {
+            $uri .= '#' . $fragment;
+        }
+
+        return $uri;
+    }
+
+    /**
+     * Is a given port non-standard for the current scheme?
+     *
+     * @param string $scheme
+     * @param string $host
+     * @param int $port
+     * @return bool
+     */
+    private static function isNonStandardPort($scheme, $host, $port)
+    {
+        if (!$scheme && $port) {
+            return true;
+        }
+
+        if (!$host || !$port) {
+            return false;
+        }
+
+        return !isset(static::$schemes[$scheme]) || $port !== static::$schemes[$scheme];
+    }
+
+    /**
+     * @param string $scheme
+     *
+     * @return string
+     */
+    private function filterScheme($scheme)
+    {
+        $scheme = strtolower($scheme);
+        $scheme = rtrim($scheme, ':/');
+
+        return $scheme;
+    }
+
+    /**
+     * @param string $scheme
+     * @param string $host
+     * @param int $port
+     *
+     * @return int|null
+     *
+     * @throws \InvalidArgumentException If the port is invalid.
+     */
+    private function filterPort($scheme, $host, $port)
+    {
+        if (null !== $port) {
+            $port = (int) $port;
+            if (1 > $port || 0xffff < $port) {
+                throw new \InvalidArgumentException(
+                    sprintf('Invalid port: %d. Must be between 1 and 65535', $port)
+                );
+            }
+        }
+
+        return $this->isNonStandardPort($scheme, $host, $port) ? $port : null;
+    }
+
+    /**
+     * Filters the path of a URI
+     *
+     * @param $path
+     *
+     * @return string
+     */
+    private function filterPath($path)
+    {
+        return preg_replace_callback(
+            '/(?:[^' . self::$charUnreserved . self::$charSubDelims . ':@\/%]+|%(?![A-Fa-f0-9]{2}))/',
+            [$this, 'rawurlencodeMatchZero'],
+            $path
+        );
+    }
+
+    /**
+     * Filters the query string or fragment of a URI.
+     *
+     * @param $str
+     *
+     * @return string
+     */
+    private function filterQueryAndFragment($str)
+    {
+        return preg_replace_callback(
+            '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/',
+            [$this, 'rawurlencodeMatchZero'],
+            $str
+        );
+    }
+
+    private function rawurlencodeMatchZero(array $match)
+    {
+        return rawurlencode($match[0]);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/functions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/functions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/functions.php	(revision 5534)
@@ -0,0 +1,810 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\MessageInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Returns the string representation of an HTTP message.
+ *
+ * @param MessageInterface $message Message to convert to a string.
+ *
+ * @return string
+ */
+function str(MessageInterface $message)
+{
+    if ($message instanceof RequestInterface) {
+        $msg = trim($message->getMethod() . ' '
+                . $message->getRequestTarget())
+            . ' HTTP/' . $message->getProtocolVersion();
+        if (!$message->hasHeader('host')) {
+            $msg .= "\r\nHost: " . $message->getUri()->getHost();
+        }
+    } elseif ($message instanceof ResponseInterface) {
+        $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
+            . $message->getStatusCode() . ' '
+            . $message->getReasonPhrase();
+    } else {
+        throw new \InvalidArgumentException('Unknown message type');
+    }
+
+    foreach ($message->getHeaders() as $name => $values) {
+        $msg .= "\r\n{$name}: " . implode(', ', $values);
+    }
+
+    return "{$msg}\r\n\r\n" . $message->getBody();
+}
+
+/**
+ * Returns a UriInterface for the given value.
+ *
+ * This function accepts a string or {@see Psr\Http\Message\UriInterface} and
+ * returns a UriInterface for the given value. If the value is already a
+ * `UriInterface`, it is returned as-is.
+ *
+ * @param string|UriInterface $uri
+ *
+ * @return UriInterface
+ * @throws \InvalidArgumentException
+ */
+function uri_for($uri)
+{
+    if ($uri instanceof UriInterface) {
+        return $uri;
+    } elseif (is_string($uri)) {
+        return new Uri($uri);
+    }
+
+    throw new \InvalidArgumentException('URI must be a string or UriInterface');
+}
+
+/**
+ * Create a new stream based on the input type.
+ *
+ * Options is an associative array that can contain the following keys:
+ * - metadata: Array of custom metadata.
+ * - size: Size of the stream.
+ *
+ * @param resource|string|StreamInterface $resource Entity body data
+ * @param array                           $options  Additional options
+ *
+ * @return Stream
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
+ */
+function stream_for($resource = '', array $options = [])
+{
+    switch (gettype($resource)) {
+        case 'string':
+            $stream = fopen('php://temp', 'r+');
+            if ($resource !== '') {
+                fwrite($stream, $resource);
+                fseek($stream, 0);
+            }
+            return new Stream($stream, $options);
+        case 'resource':
+            return new Stream($resource, $options);
+        case 'object':
+            if ($resource instanceof StreamInterface) {
+                return $resource;
+            } elseif ($resource instanceof \Iterator) {
+                return new PumpStream(function () use ($resource) {
+                    if (!$resource->valid()) {
+                        return false;
+                    }
+                    $result = $resource->current();
+                    $resource->next();
+                    return $result;
+                }, $options);
+            } elseif (method_exists($resource, '__toString')) {
+                return stream_for((string) $resource, $options);
+            }
+            break;
+        case 'NULL':
+            return new Stream(fopen('php://temp', 'r+'), $options);
+    }
+
+    if (is_callable($resource)) {
+        return new PumpStream($resource, $options);
+    }
+
+    throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
+}
+
+/**
+ * Parse an array of header values containing ";" separated data into an
+ * array of associative arrays representing the header key value pair
+ * data of the header. When a parameter does not contain a value, but just
+ * contains a key, this function will inject a key with a '' string value.
+ *
+ * @param string|array $header Header to parse into components.
+ *
+ * @return array Returns the parsed header values.
+ */
+function parse_header($header)
+{
+    static $trimmed = "\"'  \n\t\r";
+    $params = $matches = [];
+
+    foreach (normalize_header($header) as $val) {
+        $part = [];
+        foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
+            if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
+                $m = $matches[0];
+                if (isset($m[1])) {
+                    $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
+                } else {
+                    $part[] = trim($m[0], $trimmed);
+                }
+            }
+        }
+        if ($part) {
+            $params[] = $part;
+        }
+    }
+
+    return $params;
+}
+
+/**
+ * Converts an array of header values that may contain comma separated
+ * headers into an array of headers with no comma separated values.
+ *
+ * @param string|array $header Header to normalize.
+ *
+ * @return array Returns the normalized header field values.
+ */
+function normalize_header($header)
+{
+    if (!is_array($header)) {
+        return array_map('trim', explode(',', $header));
+    }
+
+    $result = [];
+    foreach ($header as $value) {
+        foreach ((array) $value as $v) {
+            if (strpos($v, ',') === false) {
+                $result[] = $v;
+                continue;
+            }
+            foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
+                $result[] = trim($vv);
+            }
+        }
+    }
+
+    return $result;
+}
+
+/**
+ * Clone and modify a request with the given changes.
+ *
+ * The changes can be one of:
+ * - method: (string) Changes the HTTP method.
+ * - set_headers: (array) Sets the given headers.
+ * - remove_headers: (array) Remove the given headers.
+ * - body: (mixed) Sets the given body.
+ * - uri: (UriInterface) Set the URI.
+ * - query: (string) Set the query string value of the URI.
+ * - version: (string) Set the protocol version.
+ *
+ * @param RequestInterface $request Request to clone and modify.
+ * @param array            $changes Changes to apply.
+ *
+ * @return RequestInterface
+ */
+function modify_request(RequestInterface $request, array $changes)
+{
+    if (!$changes) {
+        return $request;
+    }
+
+    $headers = $request->getHeaders();
+
+    if (!isset($changes['uri'])) {
+        $uri = $request->getUri();
+    } else {
+        // Remove the host header if one is on the URI
+        if ($host = $changes['uri']->getHost()) {
+            $changes['set_headers']['Host'] = $host;
+
+            if ($port = $changes['uri']->getPort()) {
+                $standardPorts = ['http' => 80, 'https' => 443];
+                $scheme = $changes['uri']->getScheme();
+                if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
+                    $changes['set_headers']['Host'] .= ':'.$port;
+                }
+            }
+        }
+        $uri = $changes['uri'];
+    }
+
+    if (!empty($changes['remove_headers'])) {
+        $headers = _caseless_remove($changes['remove_headers'], $headers);
+    }
+
+    if (!empty($changes['set_headers'])) {
+        $headers = _caseless_remove(array_keys($changes['set_headers']), $headers);
+        $headers = $changes['set_headers'] + $headers;
+    }
+
+    if (isset($changes['query'])) {
+        $uri = $uri->withQuery($changes['query']);
+    }
+
+    return new Request(
+        isset($changes['method']) ? $changes['method'] : $request->getMethod(),
+        $uri,
+        $headers,
+        isset($changes['body']) ? $changes['body'] : $request->getBody(),
+        isset($changes['version'])
+            ? $changes['version']
+            : $request->getProtocolVersion()
+    );
+}
+
+/**
+ * Attempts to rewind a message body and throws an exception on failure.
+ *
+ * The body of the message will only be rewound if a call to `tell()` returns a
+ * value other than `0`.
+ *
+ * @param MessageInterface $message Message to rewind
+ *
+ * @throws \RuntimeException
+ */
+function rewind_body(MessageInterface $message)
+{
+    $body = $message->getBody();
+
+    if ($body->tell()) {
+        $body->rewind();
+    }
+}
+
+/**
+ * Safely opens a PHP stream resource using a filename.
+ *
+ * When fopen fails, PHP normally raises a warning. This function adds an
+ * error handler that checks for errors and throws an exception instead.
+ *
+ * @param string $filename File to open
+ * @param string $mode     Mode used to open the file
+ *
+ * @return resource
+ * @throws \RuntimeException if the file cannot be opened
+ */
+function try_fopen($filename, $mode)
+{
+    $ex = null;
+    set_error_handler(function () use ($filename, $mode, &$ex) {
+        $ex = new \RuntimeException(sprintf(
+            'Unable to open %s using mode %s: %s',
+            $filename,
+            $mode,
+            func_get_args()[1]
+        ));
+    });
+
+    $handle = fopen($filename, $mode);
+    restore_error_handler();
+
+    if ($ex) {
+        /** @var $ex \RuntimeException */
+        throw $ex;
+    }
+
+    return $handle;
+}
+
+/**
+ * Copy the contents of a stream into a string until the given number of
+ * bytes have been read.
+ *
+ * @param StreamInterface $stream Stream to read
+ * @param int             $maxLen Maximum number of bytes to read. Pass -1
+ *                                to read the entire stream.
+ * @return string
+ * @throws \RuntimeException on error.
+ */
+function copy_to_string(StreamInterface $stream, $maxLen = -1)
+{
+    $buffer = '';
+
+    if ($maxLen === -1) {
+        while (!$stream->eof()) {
+            $buf = $stream->read(1048576);
+            // Using a loose equality here to match on '' and false.
+            if ($buf == null) {
+                break;
+            }
+            $buffer .= $buf;
+        }
+        return $buffer;
+    }
+
+    $len = 0;
+    while (!$stream->eof() && $len < $maxLen) {
+        $buf = $stream->read($maxLen - $len);
+        // Using a loose equality here to match on '' and false.
+        if ($buf == null) {
+            break;
+        }
+        $buffer .= $buf;
+        $len = strlen($buffer);
+    }
+
+    return $buffer;
+}
+
+/**
+ * Copy the contents of a stream into another stream until the given number
+ * of bytes have been read.
+ *
+ * @param StreamInterface $source Stream to read from
+ * @param StreamInterface $dest   Stream to write to
+ * @param int             $maxLen Maximum number of bytes to read. Pass -1
+ *                                to read the entire stream.
+ *
+ * @throws \RuntimeException on error.
+ */
+function copy_to_stream(
+    StreamInterface $source,
+    StreamInterface $dest,
+    $maxLen = -1
+) {
+    if ($maxLen === -1) {
+        while (!$source->eof()) {
+            if (!$dest->write($source->read(1048576))) {
+                break;
+            }
+        }
+        return;
+    }
+
+    $bytes = 0;
+    while (!$source->eof()) {
+        $buf = $source->read($maxLen - $bytes);
+        if (!($len = strlen($buf))) {
+            break;
+        }
+        $bytes += $len;
+        $dest->write($buf);
+        if ($bytes == $maxLen) {
+            break;
+        }
+    }
+}
+
+/**
+ * Calculate a hash of a Stream
+ *
+ * @param StreamInterface $stream    Stream to calculate the hash for
+ * @param string          $algo      Hash algorithm (e.g. md5, crc32, etc)
+ * @param bool            $rawOutput Whether or not to use raw output
+ *
+ * @return string Returns the hash of the stream
+ * @throws \RuntimeException on error.
+ */
+function hash(
+    StreamInterface $stream,
+    $algo,
+    $rawOutput = false
+) {
+    $pos = $stream->tell();
+
+    if ($pos > 0) {
+        $stream->rewind();
+    }
+
+    $ctx = hash_init($algo);
+    while (!$stream->eof()) {
+        hash_update($ctx, $stream->read(1048576));
+    }
+
+    $out = hash_final($ctx, (bool) $rawOutput);
+    $stream->seek($pos);
+
+    return $out;
+}
+
+/**
+ * Read a line from the stream up to the maximum allowed buffer length
+ *
+ * @param StreamInterface $stream    Stream to read from
+ * @param int             $maxLength Maximum buffer length
+ *
+ * @return string|bool
+ */
+function readline(StreamInterface $stream, $maxLength = null)
+{
+    $buffer = '';
+    $size = 0;
+
+    while (!$stream->eof()) {
+        // Using a loose equality here to match on '' and false.
+        if (null == ($byte = $stream->read(1))) {
+            return $buffer;
+        }
+        $buffer .= $byte;
+        // Break when a new line is found or the max length - 1 is reached
+        if ($byte == PHP_EOL || ++$size == $maxLength - 1) {
+            break;
+        }
+    }
+
+    return $buffer;
+}
+
+/**
+ * Parses a request message string into a request object.
+ *
+ * @param string $message Request message string.
+ *
+ * @return Request
+ */
+function parse_request($message)
+{
+    $data = _parse_message($message);
+    $matches = [];
+    if (!preg_match('/^[a-zA-Z]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
+        throw new \InvalidArgumentException('Invalid request string');
+    }
+    $parts = explode(' ', $data['start-line'], 3);
+    $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
+
+    $request = new Request(
+        $parts[0],
+        $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1],
+        $data['headers'],
+        $data['body'],
+        $version
+    );
+
+    return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
+}
+
+/**
+ * Parses a response message string into a response object.
+ *
+ * @param string $message Response message string.
+ *
+ * @return Response
+ */
+function parse_response($message)
+{
+    $data = _parse_message($message);
+    if (!preg_match('/^HTTP\/.* [0-9]{3} .*/', $data['start-line'])) {
+        throw new \InvalidArgumentException('Invalid response string');
+    }
+    $parts = explode(' ', $data['start-line'], 3);
+
+    return new Response(
+        $parts[1],
+        $data['headers'],
+        $data['body'],
+        explode('/', $parts[0])[1],
+        isset($parts[2]) ? $parts[2] : null
+    );
+}
+
+/**
+ * Parse a query string into an associative array.
+ *
+ * If multiple values are found for the same key, the value of that key
+ * value pair will become an array. This function does not parse nested
+ * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
+ * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
+ *
+ * @param string      $str         Query string to parse
+ * @param bool|string $urlEncoding How the query string is encoded
+ *
+ * @return array
+ */
+function parse_query($str, $urlEncoding = true)
+{
+    $result = [];
+
+    if ($str === '') {
+        return $result;
+    }
+
+    if ($urlEncoding === true) {
+        $decoder = function ($value) {
+            return rawurldecode(str_replace('+', ' ', $value));
+        };
+    } elseif ($urlEncoding == PHP_QUERY_RFC3986) {
+        $decoder = 'rawurldecode';
+    } elseif ($urlEncoding == PHP_QUERY_RFC1738) {
+        $decoder = 'urldecode';
+    } else {
+        $decoder = function ($str) { return $str; };
+    }
+
+    foreach (explode('&', $str) as $kvp) {
+        $parts = explode('=', $kvp, 2);
+        $key = $decoder($parts[0]);
+        $value = isset($parts[1]) ? $decoder($parts[1]) : null;
+        if (!isset($result[$key])) {
+            $result[$key] = $value;
+        } else {
+            if (!is_array($result[$key])) {
+                $result[$key] = [$result[$key]];
+            }
+            $result[$key][] = $value;
+        }
+    }
+
+    return $result;
+}
+
+/**
+ * Build a query string from an array of key value pairs.
+ *
+ * This function can use the return value of parseQuery() to build a query
+ * string. This function does not modify the provided keys when an array is
+ * encountered (like http_build_query would).
+ *
+ * @param array     $params   Query string parameters.
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
+ *                            to encode using RFC3986, or PHP_QUERY_RFC1738
+ *                            to encode using RFC1738.
+ * @return string
+ */
+function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
+{
+    if (!$params) {
+        return '';
+    }
+
+    if ($encoding === false) {
+        $encoder = function ($str) { return $str; };
+    } elseif ($encoding == PHP_QUERY_RFC3986) {
+        $encoder = 'rawurlencode';
+    } elseif ($encoding == PHP_QUERY_RFC1738) {
+        $encoder = 'urlencode';
+    } else {
+        throw new \InvalidArgumentException('Invalid type');
+    }
+
+    $qs = '';
+    foreach ($params as $k => $v) {
+        $k = $encoder($k);
+        if (!is_array($v)) {
+            $qs .= $k;
+            if ($v !== null) {
+                $qs .= '=' . $encoder($v);
+            }
+            $qs .= '&';
+        } else {
+            foreach ($v as $vv) {
+                $qs .= $k;
+                if ($vv !== null) {
+                    $qs .= '=' . $encoder($vv);
+                }
+                $qs .= '&';
+            }
+        }
+    }
+
+    return $qs ? (string) substr($qs, 0, -1) : '';
+}
+
+/**
+ * Determines the mimetype of a file by looking at its extension.
+ *
+ * @param $filename
+ *
+ * @return null|string
+ */
+function mimetype_from_filename($filename)
+{
+    return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
+}
+
+/**
+ * Maps a file extensions to a mimetype.
+ *
+ * @param $extension string The file extension.
+ *
+ * @return string|null
+ * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
+ */
+function mimetype_from_extension($extension)
+{
+    static $mimetypes = [
+        '7z' => 'application/x-7z-compressed',
+        'aac' => 'audio/x-aac',
+        'ai' => 'application/postscript',
+        'aif' => 'audio/x-aiff',
+        'asc' => 'text/plain',
+        'asf' => 'video/x-ms-asf',
+        'atom' => 'application/atom+xml',
+        'avi' => 'video/x-msvideo',
+        'bmp' => 'image/bmp',
+        'bz2' => 'application/x-bzip2',
+        'cer' => 'application/pkix-cert',
+        'crl' => 'application/pkix-crl',
+        'crt' => 'application/x-x509-ca-cert',
+        'css' => 'text/css',
+        'csv' => 'text/csv',
+        'cu' => 'application/cu-seeme',
+        'deb' => 'application/x-debian-package',
+        'doc' => 'application/msword',
+        'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+        'dvi' => 'application/x-dvi',
+        'eot' => 'application/vnd.ms-fontobject',
+        'eps' => 'application/postscript',
+        'epub' => 'application/epub+zip',
+        'etx' => 'text/x-setext',
+        'flac' => 'audio/flac',
+        'flv' => 'video/x-flv',
+        'gif' => 'image/gif',
+        'gz' => 'application/gzip',
+        'htm' => 'text/html',
+        'html' => 'text/html',
+        'ico' => 'image/x-icon',
+        'ics' => 'text/calendar',
+        'ini' => 'text/plain',
+        'iso' => 'application/x-iso9660-image',
+        'jar' => 'application/java-archive',
+        'jpe' => 'image/jpeg',
+        'jpeg' => 'image/jpeg',
+        'jpg' => 'image/jpeg',
+        'js' => 'text/javascript',
+        'json' => 'application/json',
+        'latex' => 'application/x-latex',
+        'log' => 'text/plain',
+        'm4a' => 'audio/mp4',
+        'm4v' => 'video/mp4',
+        'mid' => 'audio/midi',
+        'midi' => 'audio/midi',
+        'mov' => 'video/quicktime',
+        'mp3' => 'audio/mpeg',
+        'mp4' => 'video/mp4',
+        'mp4a' => 'audio/mp4',
+        'mp4v' => 'video/mp4',
+        'mpe' => 'video/mpeg',
+        'mpeg' => 'video/mpeg',
+        'mpg' => 'video/mpeg',
+        'mpg4' => 'video/mp4',
+        'oga' => 'audio/ogg',
+        'ogg' => 'audio/ogg',
+        'ogv' => 'video/ogg',
+        'ogx' => 'application/ogg',
+        'pbm' => 'image/x-portable-bitmap',
+        'pdf' => 'application/pdf',
+        'pgm' => 'image/x-portable-graymap',
+        'png' => 'image/png',
+        'pnm' => 'image/x-portable-anymap',
+        'ppm' => 'image/x-portable-pixmap',
+        'ppt' => 'application/vnd.ms-powerpoint',
+        'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+        'ps' => 'application/postscript',
+        'qt' => 'video/quicktime',
+        'rar' => 'application/x-rar-compressed',
+        'ras' => 'image/x-cmu-raster',
+        'rss' => 'application/rss+xml',
+        'rtf' => 'application/rtf',
+        'sgm' => 'text/sgml',
+        'sgml' => 'text/sgml',
+        'svg' => 'image/svg+xml',
+        'swf' => 'application/x-shockwave-flash',
+        'tar' => 'application/x-tar',
+        'tif' => 'image/tiff',
+        'tiff' => 'image/tiff',
+        'torrent' => 'application/x-bittorrent',
+        'ttf' => 'application/x-font-ttf',
+        'txt' => 'text/plain',
+        'wav' => 'audio/x-wav',
+        'webm' => 'video/webm',
+        'wma' => 'audio/x-ms-wma',
+        'wmv' => 'video/x-ms-wmv',
+        'woff' => 'application/x-font-woff',
+        'wsdl' => 'application/wsdl+xml',
+        'xbm' => 'image/x-xbitmap',
+        'xls' => 'application/vnd.ms-excel',
+        'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+        'xml' => 'application/xml',
+        'xpm' => 'image/x-xpixmap',
+        'xwd' => 'image/x-xwindowdump',
+        'yaml' => 'text/yaml',
+        'yml' => 'text/yaml',
+        'zip' => 'application/zip',
+    ];
+
+    $extension = strtolower($extension);
+
+    return isset($mimetypes[$extension])
+        ? $mimetypes[$extension]
+        : null;
+}
+
+/**
+ * Parses an HTTP message into an associative array.
+ *
+ * The array contains the "start-line" key containing the start line of
+ * the message, "headers" key containing an associative array of header
+ * array values, and a "body" key containing the body of the message.
+ *
+ * @param string $message HTTP request or response to parse.
+ *
+ * @return array
+ * @internal
+ */
+function _parse_message($message)
+{
+    if (!$message) {
+        throw new \InvalidArgumentException('Invalid message');
+    }
+
+    // Iterate over each line in the message, accounting for line endings
+    $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
+    $result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => ''];
+    array_shift($lines);
+
+    for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) {
+        $line = $lines[$i];
+        // If two line breaks were encountered, then this is the end of body
+        if (empty($line)) {
+            if ($i < $totalLines - 1) {
+                $result['body'] = implode('', array_slice($lines, $i + 2));
+            }
+            break;
+        }
+        if (strpos($line, ':')) {
+            $parts = explode(':', $line, 2);
+            $key = trim($parts[0]);
+            $value = isset($parts[1]) ? trim($parts[1]) : '';
+            $result['headers'][$key][] = $value;
+        }
+    }
+
+    return $result;
+}
+
+/**
+ * Constructs a URI for an HTTP request message.
+ *
+ * @param string $path    Path from the start-line
+ * @param array  $headers Array of headers (each value an array).
+ *
+ * @return string
+ * @internal
+ */
+function _parse_request_uri($path, array $headers)
+{
+    $hostKey = array_filter(array_keys($headers), function ($k) {
+        return strtolower($k) === 'host';
+    });
+
+    // If no host is found, then a full URI cannot be constructed.
+    if (!$hostKey) {
+        return $path;
+    }
+
+    $host = $headers[reset($hostKey)][0];
+    $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
+
+    return $scheme . '://' . $host . '/' . ltrim($path, '/');
+}
+
+/** @internal */
+function _caseless_remove($keys, array $data)
+{
+    $result = [];
+
+    foreach ($keys as &$key) {
+        $key = strtolower($key);
+    }
+
+    foreach ($data as $k => $v) {
+        if (!in_array(strtolower($k), $keys)) {
+            $result[$k] = $v;
+        }
+    }
+
+    return $result;
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/functions_include.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/functions_include.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/src/functions_include.php	(revision 5534)
@@ -0,0 +1,6 @@
+<?php
+
+// Don't redefine the functions if included multiple times.
+if (!function_exists('GuzzleHttp\Psr7\str')) {
+    require __DIR__ . '/functions.php';
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/AppendStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/AppendStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/AppendStreamTest.php	(revision 5534)
@@ -0,0 +1,186 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\AppendStream;
+use GuzzleHttp\Psr7;
+
+class AppendStreamTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage Each stream must be readable
+     */
+    public function testValidatesStreamsAreReadable()
+    {
+        $a = new AppendStream();
+        $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isReadable'])
+            ->getMockForAbstractClass();
+        $s->expects($this->once())
+            ->method('isReadable')
+            ->will($this->returnValue(false));
+        $a->addStream($s);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage The AppendStream can only seek with SEEK_SET
+     */
+    public function testValidatesSeekType()
+    {
+        $a = new AppendStream();
+        $a->seek(100, SEEK_CUR);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Unable to seek stream 0 of the AppendStream
+     */
+    public function testTriesToRewindOnSeek()
+    {
+        $a = new AppendStream();
+        $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isReadable', 'rewind', 'isSeekable'])
+            ->getMockForAbstractClass();
+        $s->expects($this->once())
+            ->method('isReadable')
+            ->will($this->returnValue(true));
+        $s->expects($this->once())
+            ->method('isSeekable')
+            ->will($this->returnValue(true));
+        $s->expects($this->once())
+            ->method('rewind')
+            ->will($this->throwException(new \RuntimeException()));
+        $a->addStream($s);
+        $a->seek(10);
+    }
+
+    public function testSeeksToPositionByReading()
+    {
+        $a = new AppendStream([
+            Psr7\stream_for('foo'),
+            Psr7\stream_for('bar'),
+            Psr7\stream_for('baz'),
+        ]);
+
+        $a->seek(3);
+        $this->assertEquals(3, $a->tell());
+        $this->assertEquals('bar', $a->read(3));
+
+        $a->seek(6);
+        $this->assertEquals(6, $a->tell());
+        $this->assertEquals('baz', $a->read(3));
+    }
+
+    public function testDetachesEachStream()
+    {
+        $s1 = Psr7\stream_for('foo');
+        $s2 = Psr7\stream_for('bar');
+        $a = new AppendStream([$s1, $s2]);
+        $this->assertSame('foobar', (string) $a);
+        $a->detach();
+        $this->assertSame('', (string) $a);
+        $this->assertSame(0, $a->getSize());
+    }
+
+    public function testClosesEachStream()
+    {
+        $s1 = Psr7\stream_for('foo');
+        $a = new AppendStream([$s1]);
+        $a->close();
+        $this->assertSame('', (string) $a);
+    }
+
+    /**
+     * @expectedExceptionMessage Cannot write to an AppendStream
+     * @expectedException \RuntimeException
+     */
+    public function testIsNotWritable()
+    {
+        $a = new AppendStream([Psr7\stream_for('foo')]);
+        $this->assertFalse($a->isWritable());
+        $this->assertTrue($a->isSeekable());
+        $this->assertTrue($a->isReadable());
+        $a->write('foo');
+    }
+
+    public function testDoesNotNeedStreams()
+    {
+        $a = new AppendStream();
+        $this->assertEquals('', (string) $a);
+    }
+
+    public function testCanReadFromMultipleStreams()
+    {
+        $a = new AppendStream([
+            Psr7\stream_for('foo'),
+            Psr7\stream_for('bar'),
+            Psr7\stream_for('baz'),
+        ]);
+        $this->assertFalse($a->eof());
+        $this->assertSame(0, $a->tell());
+        $this->assertEquals('foo', $a->read(3));
+        $this->assertEquals('bar', $a->read(3));
+        $this->assertEquals('baz', $a->read(3));
+        $this->assertSame('', $a->read(1));
+        $this->assertTrue($a->eof());
+        $this->assertSame(9, $a->tell());
+        $this->assertEquals('foobarbaz', (string) $a);
+    }
+
+    public function testCanDetermineSizeFromMultipleStreams()
+    {
+        $a = new AppendStream([
+            Psr7\stream_for('foo'),
+            Psr7\stream_for('bar')
+        ]);
+        $this->assertEquals(6, $a->getSize());
+
+        $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isSeekable', 'isReadable'])
+            ->getMockForAbstractClass();
+        $s->expects($this->once())
+            ->method('isSeekable')
+            ->will($this->returnValue(null));
+        $s->expects($this->once())
+            ->method('isReadable')
+            ->will($this->returnValue(true));
+        $a->addStream($s);
+        $this->assertNull($a->getSize());
+    }
+
+    public function testCatchesExceptionsWhenCastingToString()
+    {
+        $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isSeekable', 'read', 'isReadable', 'eof'])
+            ->getMockForAbstractClass();
+        $s->expects($this->once())
+            ->method('isSeekable')
+            ->will($this->returnValue(true));
+        $s->expects($this->once())
+            ->method('read')
+            ->will($this->throwException(new \RuntimeException('foo')));
+        $s->expects($this->once())
+            ->method('isReadable')
+            ->will($this->returnValue(true));
+        $s->expects($this->any())
+            ->method('eof')
+            ->will($this->returnValue(false));
+        $a = new AppendStream([$s]);
+        $this->assertFalse($a->eof());
+        $this->assertSame('', (string) $a);
+    }
+
+    public function testCanDetach()
+    {
+        $s = new AppendStream();
+        $s->detach();
+    }
+
+    public function testReturnsEmptyMetadata()
+    {
+        $s = new AppendStream();
+        $this->assertEquals([], $s->getMetadata());
+        $this->assertNull($s->getMetadata('foo'));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/BufferStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/BufferStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/BufferStreamTest.php	(revision 5534)
@@ -0,0 +1,63 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\BufferStream;
+
+class BufferStreamTest extends \PHPUnit_Framework_TestCase
+{
+    public function testHasMetadata()
+    {
+        $b = new BufferStream(10);
+        $this->assertTrue($b->isReadable());
+        $this->assertTrue($b->isWritable());
+        $this->assertFalse($b->isSeekable());
+        $this->assertEquals(null, $b->getMetadata('foo'));
+        $this->assertEquals(10, $b->getMetadata('hwm'));
+        $this->assertEquals([], $b->getMetadata());
+    }
+
+    public function testRemovesReadDataFromBuffer()
+    {
+        $b = new BufferStream();
+        $this->assertEquals(3, $b->write('foo'));
+        $this->assertEquals(3, $b->getSize());
+        $this->assertFalse($b->eof());
+        $this->assertEquals('foo', $b->read(10));
+        $this->assertTrue($b->eof());
+        $this->assertEquals('', $b->read(10));
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Cannot determine the position of a BufferStream
+     */
+    public function testCanCastToStringOrGetContents()
+    {
+        $b = new BufferStream();
+        $b->write('foo');
+        $b->write('baz');
+        $this->assertEquals('foo', $b->read(3));
+        $b->write('bar');
+        $this->assertEquals('bazbar', (string) $b);
+        $b->tell();
+    }
+
+    public function testDetachClearsBuffer()
+    {
+        $b = new BufferStream();
+        $b->write('foo');
+        $b->detach();
+        $this->assertTrue($b->eof());
+        $this->assertEquals(3, $b->write('abc'));
+        $this->assertEquals('abc', $b->read(10));
+    }
+
+    public function testExceedingHighwaterMarkReturnsFalseButStillBuffers()
+    {
+        $b = new BufferStream(5);
+        $this->assertEquals(3, $b->write('hi '));
+        $this->assertFalse($b->write('hello'));
+        $this->assertEquals('hi hello', (string) $b);
+        $this->assertEquals(4, $b->write('test'));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/CachingStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/CachingStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/CachingStreamTest.php	(revision 5534)
@@ -0,0 +1,166 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\CachingStream;
+
+/**
+ * @covers GuzzleHttp\Psr7\CachingStream
+ */
+class CachingStreamTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var CachingStream */
+    protected $body;
+    protected $decorated;
+
+    public function setUp()
+    {
+        $this->decorated = Psr7\stream_for('testing');
+        $this->body = new CachingStream($this->decorated);
+    }
+
+    public function tearDown()
+    {
+        $this->decorated->close();
+        $this->body->close();
+    }
+
+    public function testUsesRemoteSizeIfPossible()
+    {
+        $body = Psr7\stream_for('test');
+        $caching = new CachingStream($body);
+        $this->assertEquals(4, $caching->getSize());
+    }
+
+    public function testReadsUntilCachedToByte()
+    {
+        $this->body->seek(5);
+        $this->assertEquals('n', $this->body->read(1));
+        $this->body->seek(0);
+        $this->assertEquals('t', $this->body->read(1));
+    }
+
+    public function testCanSeekNearEndWithSeekEnd()
+    {
+        $baseStream = Psr7\stream_for(implode('', range('a', 'z')));
+        $cached = new CachingStream($baseStream);
+        $cached->seek(-1, SEEK_END);
+        $this->assertEquals(25, $baseStream->tell());
+        $this->assertEquals('z', $cached->read(1));
+        $this->assertEquals(26, $cached->getSize());
+    }
+
+    public function testCanSeekToEndWithSeekEnd()
+    {
+        $baseStream = Psr7\stream_for(implode('', range('a', 'z')));
+        $cached = new CachingStream($baseStream);
+        $cached->seek(0, SEEK_END);
+        $this->assertEquals(26, $baseStream->tell());
+        $this->assertEquals('', $cached->read(1));
+        $this->assertEquals(26, $cached->getSize());
+    }
+
+    public function testCanUseSeekEndWithUnknownSize()
+    {
+        $baseStream = Psr7\stream_for('testing');
+        $decorated = Psr7\FnStream::decorate($baseStream, [
+            'getSize' => function () { return null; }
+        ]);
+        $cached = new CachingStream($decorated);
+        $cached->seek(-1, SEEK_END);
+        $this->assertEquals('g', $cached->read(1));
+    }
+
+    public function testRewindUsesSeek()
+    {
+        $a = Psr7\stream_for('foo');
+        $d = $this->getMockBuilder('GuzzleHttp\Psr7\CachingStream')
+            ->setMethods(array('seek'))
+            ->setConstructorArgs(array($a))
+            ->getMock();
+        $d->expects($this->once())
+            ->method('seek')
+            ->with(0)
+            ->will($this->returnValue(true));
+        $d->seek(0);
+    }
+
+    public function testCanSeekToReadBytes()
+    {
+        $this->assertEquals('te', $this->body->read(2));
+        $this->body->seek(0);
+        $this->assertEquals('test', $this->body->read(4));
+        $this->assertEquals(4, $this->body->tell());
+        $this->body->seek(2);
+        $this->assertEquals(2, $this->body->tell());
+        $this->body->seek(2, SEEK_CUR);
+        $this->assertEquals(4, $this->body->tell());
+        $this->assertEquals('ing', $this->body->read(3));
+    }
+
+    public function testWritesToBufferStream()
+    {
+        $this->body->read(2);
+        $this->body->write('hi');
+        $this->body->seek(0);
+        $this->assertEquals('tehiing', (string) $this->body);
+    }
+
+    public function testSkipsOverwrittenBytes()
+    {
+        $decorated = Psr7\stream_for(
+            implode("\n", array_map(function ($n) {
+                return str_pad($n, 4, '0', STR_PAD_LEFT);
+            }, range(0, 25)))
+        );
+
+        $body = new CachingStream($decorated);
+
+        $this->assertEquals("0000\n", Psr7\readline($body));
+        $this->assertEquals("0001\n", Psr7\readline($body));
+        // Write over part of the body yet to be read, so skip some bytes
+        $this->assertEquals(5, $body->write("TEST\n"));
+        $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes'));
+        // Read, which skips bytes, then reads
+        $this->assertEquals("0003\n", Psr7\readline($body));
+        $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes'));
+        $this->assertEquals("0004\n", Psr7\readline($body));
+        $this->assertEquals("0005\n", Psr7\readline($body));
+
+        // Overwrite part of the cached body (so don't skip any bytes)
+        $body->seek(5);
+        $this->assertEquals(5, $body->write("ABCD\n"));
+        $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes'));
+        $this->assertEquals("TEST\n", Psr7\readline($body));
+        $this->assertEquals("0003\n", Psr7\readline($body));
+        $this->assertEquals("0004\n", Psr7\readline($body));
+        $this->assertEquals("0005\n", Psr7\readline($body));
+        $this->assertEquals("0006\n", Psr7\readline($body));
+        $this->assertEquals(5, $body->write("1234\n"));
+        $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes'));
+
+        // Seek to 0 and ensure the overwritten bit is replaced
+        $body->seek(0);
+        $this->assertEquals("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", $body->read(50));
+
+        // Ensure that casting it to a string does not include the bit that was overwritten
+        $this->assertContains("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", (string) $body);
+    }
+
+    public function testClosesBothStreams()
+    {
+        $s = fopen('php://temp', 'r');
+        $a = Psr7\stream_for($s);
+        $d = new CachingStream($a);
+        $d->close();
+        $this->assertFalse(is_resource($s));
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testEnsuresValidWhence()
+    {
+        $this->body->seek(10, -123456);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/DroppingStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/DroppingStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/DroppingStreamTest.php	(revision 5534)
@@ -0,0 +1,26 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\BufferStream;
+use GuzzleHttp\Psr7\DroppingStream;
+
+class DroppingStreamTest extends \PHPUnit_Framework_TestCase
+{
+    public function testBeginsDroppingWhenSizeExceeded()
+    {
+        $stream = new BufferStream();
+        $drop = new DroppingStream($stream, 5);
+        $this->assertEquals(3, $drop->write('hel'));
+        $this->assertEquals(2, $drop->write('lo'));
+        $this->assertEquals(5, $drop->getSize());
+        $this->assertEquals('hello', $drop->read(5));
+        $this->assertEquals(0, $drop->getSize());
+        $drop->write('12345678910');
+        $this->assertEquals(5, $stream->getSize());
+        $this->assertEquals(5, $drop->getSize());
+        $this->assertEquals('12345', (string) $drop);
+        $this->assertEquals(0, $drop->getSize());
+        $drop->write('hello');
+        $this->assertSame(0, $drop->write('test'));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/FnStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/FnStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/FnStreamTest.php	(revision 5534)
@@ -0,0 +1,90 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\FnStream;
+
+/**
+ * @covers GuzzleHttp\Psr7\FnStream
+ */
+class FnStreamTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @expectedException \BadMethodCallException
+     * @expectedExceptionMessage seek() is not implemented in the FnStream
+     */
+    public function testThrowsWhenNotImplemented()
+    {
+        (new FnStream([]))->seek(1);
+    }
+
+    public function testProxiesToFunction()
+    {
+        $s = new FnStream([
+            'read' => function ($len) {
+                $this->assertEquals(3, $len);
+                return 'foo';
+            }
+        ]);
+
+        $this->assertEquals('foo', $s->read(3));
+    }
+
+    public function testCanCloseOnDestruct()
+    {
+        $called = false;
+        $s = new FnStream([
+            'close' => function () use (&$called) {
+                $called = true;
+            }
+        ]);
+        unset($s);
+        $this->assertTrue($called);
+    }
+
+    public function testDoesNotRequireClose()
+    {
+        $s = new FnStream([]);
+        unset($s);
+    }
+
+    public function testDecoratesStream()
+    {
+        $a = Psr7\stream_for('foo');
+        $b = FnStream::decorate($a, []);
+        $this->assertEquals(3, $b->getSize());
+        $this->assertEquals($b->isWritable(), true);
+        $this->assertEquals($b->isReadable(), true);
+        $this->assertEquals($b->isSeekable(), true);
+        $this->assertEquals($b->read(3), 'foo');
+        $this->assertEquals($b->tell(), 3);
+        $this->assertEquals($a->tell(), 3);
+        $this->assertSame('', $a->read(1));
+        $this->assertEquals($b->eof(), true);
+        $this->assertEquals($a->eof(), true);
+        $b->seek(0);
+        $this->assertEquals('foo', (string) $b);
+        $b->seek(0);
+        $this->assertEquals('foo', $b->getContents());
+        $this->assertEquals($a->getMetadata(), $b->getMetadata());
+        $b->seek(0, SEEK_END);
+        $b->write('bar');
+        $this->assertEquals('foobar', (string) $b);
+        $this->assertInternalType('resource', $b->detach());
+        $b->close();
+    }
+
+    public function testDecoratesWithCustomizations()
+    {
+        $called = false;
+        $a = Psr7\stream_for('foo');
+        $b = FnStream::decorate($a, [
+            'read' => function ($len) use (&$called, $a) {
+                $called = true;
+                return $a->read($len);
+            }
+        ]);
+        $this->assertEquals('foo', $b->read(3));
+        $this->assertTrue($called);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/FunctionsTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/FunctionsTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/FunctionsTest.php	(revision 5534)
@@ -0,0 +1,596 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\FnStream;
+use GuzzleHttp\Psr7\NoSeekStream;
+
+class FunctionsTest extends \PHPUnit_Framework_TestCase
+{
+    public function testCopiesToString()
+    {
+        $s = Psr7\stream_for('foobaz');
+        $this->assertEquals('foobaz', Psr7\copy_to_string($s));
+        $s->seek(0);
+        $this->assertEquals('foo', Psr7\copy_to_string($s, 3));
+        $this->assertEquals('baz', Psr7\copy_to_string($s, 3));
+        $this->assertEquals('', Psr7\copy_to_string($s));
+    }
+
+    public function testCopiesToStringStopsWhenReadFails()
+    {
+        $s1 = Psr7\stream_for('foobaz');
+        $s1 = FnStream::decorate($s1, [
+            'read' => function () { return ''; }
+        ]);
+        $result = Psr7\copy_to_string($s1);
+        $this->assertEquals('', $result);
+    }
+
+    public function testCopiesToStream()
+    {
+        $s1 = Psr7\stream_for('foobaz');
+        $s2 = Psr7\stream_for('');
+        Psr7\copy_to_stream($s1, $s2);
+        $this->assertEquals('foobaz', (string) $s2);
+        $s2 = Psr7\stream_for('');
+        $s1->seek(0);
+        Psr7\copy_to_stream($s1, $s2, 3);
+        $this->assertEquals('foo', (string) $s2);
+        Psr7\copy_to_stream($s1, $s2, 3);
+        $this->assertEquals('foobaz', (string) $s2);
+    }
+
+    public function testStopsCopyToStreamWhenWriteFails()
+    {
+        $s1 = Psr7\stream_for('foobaz');
+        $s2 = Psr7\stream_for('');
+        $s2 = FnStream::decorate($s2, ['write' => function () { return 0; }]);
+        Psr7\copy_to_stream($s1, $s2);
+        $this->assertEquals('', (string) $s2);
+    }
+
+    public function testStopsCopyToSteamWhenWriteFailsWithMaxLen()
+    {
+        $s1 = Psr7\stream_for('foobaz');
+        $s2 = Psr7\stream_for('');
+        $s2 = FnStream::decorate($s2, ['write' => function () { return 0; }]);
+        Psr7\copy_to_stream($s1, $s2, 10);
+        $this->assertEquals('', (string) $s2);
+    }
+
+    public function testStopsCopyToSteamWhenReadFailsWithMaxLen()
+    {
+        $s1 = Psr7\stream_for('foobaz');
+        $s1 = FnStream::decorate($s1, ['read' => function () { return ''; }]);
+        $s2 = Psr7\stream_for('');
+        Psr7\copy_to_stream($s1, $s2, 10);
+        $this->assertEquals('', (string) $s2);
+    }
+
+    public function testReadsLines()
+    {
+        $s = Psr7\stream_for("foo\nbaz\nbar");
+        $this->assertEquals("foo\n", Psr7\readline($s));
+        $this->assertEquals("baz\n", Psr7\readline($s));
+        $this->assertEquals("bar", Psr7\readline($s));
+    }
+
+    public function testReadsLinesUpToMaxLength()
+    {
+        $s = Psr7\stream_for("12345\n");
+        $this->assertEquals("123", Psr7\readline($s, 4));
+        $this->assertEquals("45\n", Psr7\readline($s));
+    }
+
+    public function testReadsLineUntilFalseReturnedFromRead()
+    {
+        $s = $this->getMockBuilder('GuzzleHttp\Psr7\Stream')
+            ->setMethods(['read', 'eof'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $s->expects($this->exactly(2))
+            ->method('read')
+            ->will($this->returnCallback(function () {
+                static $c = false;
+                if ($c) {
+                    return false;
+                }
+                $c = true;
+                return 'h';
+            }));
+        $s->expects($this->exactly(2))
+            ->method('eof')
+            ->will($this->returnValue(false));
+        $this->assertEquals("h", Psr7\readline($s));
+    }
+
+    public function testCalculatesHash()
+    {
+        $s = Psr7\stream_for('foobazbar');
+        $this->assertEquals(md5('foobazbar'), Psr7\hash($s, 'md5'));
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     */
+    public function testCalculatesHashThrowsWhenSeekFails()
+    {
+        $s = new NoSeekStream(Psr7\stream_for('foobazbar'));
+        $s->read(2);
+        Psr7\hash($s, 'md5');
+    }
+
+    public function testCalculatesHashSeeksToOriginalPosition()
+    {
+        $s = Psr7\stream_for('foobazbar');
+        $s->seek(4);
+        $this->assertEquals(md5('foobazbar'), Psr7\hash($s, 'md5'));
+        $this->assertEquals(4, $s->tell());
+    }
+
+    public function testOpensFilesSuccessfully()
+    {
+        $r = Psr7\try_fopen(__FILE__, 'r');
+        $this->assertInternalType('resource', $r);
+        fclose($r);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Unable to open /path/to/does/not/exist using mode r
+     */
+    public function testThrowsExceptionNotWarning()
+    {
+        Psr7\try_fopen('/path/to/does/not/exist', 'r');
+    }
+
+    public function parseQueryProvider()
+    {
+        return [
+            // Does not need to parse when the string is empty
+            ['', []],
+            // Can parse mult-values items
+            ['q=a&q=b', ['q' => ['a', 'b']]],
+            // Can parse multi-valued items that use numeric indices
+            ['q[0]=a&q[1]=b', ['q[0]' => 'a', 'q[1]' => 'b']],
+            // Can parse duplicates and does not include numeric indices
+            ['q[]=a&q[]=b', ['q[]' => ['a', 'b']]],
+            // Ensures that the value of "q" is an array even though one value
+            ['q[]=a', ['q[]' => 'a']],
+            // Does not modify "." to "_" like PHP's parse_str()
+            ['q.a=a&q.b=b', ['q.a' => 'a', 'q.b' => 'b']],
+            // Can decode %20 to " "
+            ['q%20a=a%20b', ['q a' => 'a b']],
+            // Can parse funky strings with no values by assigning each to null
+            ['q&a', ['q' => null, 'a' => null]],
+            // Does not strip trailing equal signs
+            ['data=abc=', ['data' => 'abc=']],
+            // Can store duplicates without affecting other values
+            ['foo=a&foo=b&?Âµ=c', ['foo' => ['a', 'b'], '?Âµ' => 'c']],
+            // Sets value to null when no "=" is present
+            ['foo', ['foo' => null]],
+            // Preserves "0" keys.
+            ['0', ['0' => null]],
+            // Sets the value to an empty string when "=" is present
+            ['0=', ['0' => '']],
+            // Preserves falsey keys
+            ['var=0', ['var' => '0']],
+            ['a[b][c]=1&a[b][c]=2', ['a[b][c]' => ['1', '2']]],
+            ['a[b]=c&a[d]=e', ['a[b]' => 'c', 'a[d]' => 'e']],
+            // Ensure it doesn't leave things behind with repeated values
+            // Can parse mult-values items
+            ['q=a&q=b&q=c', ['q' => ['a', 'b', 'c']]],
+        ];
+    }
+
+    /**
+     * @dataProvider parseQueryProvider
+     */
+    public function testParsesQueries($input, $output)
+    {
+        $result = Psr7\parse_query($input);
+        $this->assertSame($output, $result);
+    }
+
+    public function testDoesNotDecode()
+    {
+        $str = 'foo%20=bar';
+        $data = Psr7\parse_query($str, false);
+        $this->assertEquals(['foo%20' => 'bar'], $data);
+    }
+
+    /**
+     * @dataProvider parseQueryProvider
+     */
+    public function testParsesAndBuildsQueries($input, $output)
+    {
+        $result = Psr7\parse_query($input, false);
+        $this->assertSame($input, Psr7\build_query($result, false));
+    }
+
+    public function testEncodesWithRfc1738()
+    {
+        $str = Psr7\build_query(['foo bar' => 'baz+'], PHP_QUERY_RFC1738);
+        $this->assertEquals('foo+bar=baz%2B', $str);
+    }
+
+    public function testEncodesWithRfc3986()
+    {
+        $str = Psr7\build_query(['foo bar' => 'baz+'], PHP_QUERY_RFC3986);
+        $this->assertEquals('foo%20bar=baz%2B', $str);
+    }
+
+    public function testDoesNotEncode()
+    {
+        $str = Psr7\build_query(['foo bar' => 'baz+'], false);
+        $this->assertEquals('foo bar=baz+', $str);
+    }
+
+    public function testCanControlDecodingType()
+    {
+        $result = Psr7\parse_query('var=foo+bar', PHP_QUERY_RFC3986);
+        $this->assertEquals('foo+bar', $result['var']);
+        $result = Psr7\parse_query('var=foo+bar', PHP_QUERY_RFC1738);
+        $this->assertEquals('foo bar', $result['var']);
+    }
+
+    public function testParsesRequestMessages()
+    {
+        $req = "GET /abc HTTP/1.0\r\nHost: foo.com\r\nFoo: Bar\r\nBaz: Bam\r\nBaz: Qux\r\n\r\nTest";
+        $request = Psr7\parse_request($req);
+        $this->assertEquals('GET', $request->getMethod());
+        $this->assertEquals('/abc', $request->getRequestTarget());
+        $this->assertEquals('1.0', $request->getProtocolVersion());
+        $this->assertEquals('foo.com', $request->getHeaderLine('Host'));
+        $this->assertEquals('Bar', $request->getHeaderLine('Foo'));
+        $this->assertEquals('Bam, Qux', $request->getHeaderLine('Baz'));
+        $this->assertEquals('Test', (string) $request->getBody());
+        $this->assertEquals('http://foo.com/abc', (string) $request->getUri());
+    }
+
+    public function testParsesRequestMessagesWithHttpsScheme()
+    {
+        $req = "PUT /abc?baz=bar HTTP/1.1\r\nHost: foo.com:443\r\n\r\n";
+        $request = Psr7\parse_request($req);
+        $this->assertEquals('PUT', $request->getMethod());
+        $this->assertEquals('/abc?baz=bar', $request->getRequestTarget());
+        $this->assertEquals('1.1', $request->getProtocolVersion());
+        $this->assertEquals('foo.com:443', $request->getHeaderLine('Host'));
+        $this->assertEquals('', (string) $request->getBody());
+        $this->assertEquals('https://foo.com/abc?baz=bar', (string) $request->getUri());
+    }
+
+    public function testParsesRequestMessagesWithUriWhenHostIsNotFirst()
+    {
+        $req = "PUT / HTTP/1.1\r\nFoo: Bar\r\nHost: foo.com\r\n\r\n";
+        $request = Psr7\parse_request($req);
+        $this->assertEquals('PUT', $request->getMethod());
+        $this->assertEquals('/', $request->getRequestTarget());
+        $this->assertEquals('http://foo.com/', (string) $request->getUri());
+    }
+
+    public function testParsesRequestMessagesWithFullUri()
+    {
+        $req = "GET https://www.google.com:443/search?q=foobar HTTP/1.1\r\nHost: www.google.com\r\n\r\n";
+        $request = Psr7\parse_request($req);
+        $this->assertEquals('GET', $request->getMethod());
+        $this->assertEquals('https://www.google.com:443/search?q=foobar', $request->getRequestTarget());
+        $this->assertEquals('1.1', $request->getProtocolVersion());
+        $this->assertEquals('www.google.com', $request->getHeaderLine('Host'));
+        $this->assertEquals('', (string) $request->getBody());
+        $this->assertEquals('https://www.google.com/search?q=foobar', (string) $request->getUri());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testValidatesRequestMessages()
+    {
+        Psr7\parse_request("HTTP/1.1 200 OK\r\n\r\n");
+    }
+
+    public function testParsesResponseMessages()
+    {
+        $res = "HTTP/1.0 200 OK\r\nFoo: Bar\r\nBaz: Bam\r\nBaz: Qux\r\n\r\nTest";
+        $response = Psr7\parse_response($res);
+        $this->assertEquals(200, $response->getStatusCode());
+        $this->assertEquals('OK', $response->getReasonPhrase());
+        $this->assertEquals('1.0', $response->getProtocolVersion());
+        $this->assertEquals('Bar', $response->getHeaderLine('Foo'));
+        $this->assertEquals('Bam, Qux', $response->getHeaderLine('Baz'));
+        $this->assertEquals('Test', (string) $response->getBody());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testValidatesResponseMessages()
+    {
+        Psr7\parse_response("GET / HTTP/1.1\r\n\r\n");
+    }
+
+    public function testDetermineMimetype()
+    {
+        $this->assertNull(Psr7\mimetype_from_extension('not-a-real-extension'));
+        $this->assertEquals(
+            'application/json',
+            Psr7\mimetype_from_extension('json')
+        );
+        $this->assertEquals(
+            'image/jpeg',
+            Psr7\mimetype_from_filename('/tmp/images/IMG034821.JPEG')
+        );
+    }
+
+    public function testCreatesUriForValue()
+    {
+        $this->assertInstanceOf('GuzzleHttp\Psr7\Uri', Psr7\uri_for('/foo'));
+        $this->assertInstanceOf(
+            'GuzzleHttp\Psr7\Uri',
+            Psr7\uri_for(new Psr7\Uri('/foo'))
+        );
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testValidatesUri()
+    {
+        Psr7\uri_for([]);
+    }
+
+    public function testKeepsPositionOfResource()
+    {
+        $h = fopen(__FILE__, 'r');
+        fseek($h, 10);
+        $stream = Psr7\stream_for($h);
+        $this->assertEquals(10, $stream->tell());
+        $stream->close();
+    }
+
+    public function testCreatesWithFactory()
+    {
+        $stream = Psr7\stream_for('foo');
+        $this->assertInstanceOf('GuzzleHttp\Psr7\Stream', $stream);
+        $this->assertEquals('foo', $stream->getContents());
+        $stream->close();
+    }
+
+    public function testFactoryCreatesFromEmptyString()
+    {
+        $s = Psr7\stream_for();
+        $this->assertInstanceOf('GuzzleHttp\Psr7\Stream', $s);
+    }
+
+    public function testFactoryCreatesFromNull()
+    {
+        $s = Psr7\stream_for(null);
+        $this->assertInstanceOf('GuzzleHttp\Psr7\Stream', $s);
+    }
+
+    public function testFactoryCreatesFromResource()
+    {
+        $r = fopen(__FILE__, 'r');
+        $s = Psr7\stream_for($r);
+        $this->assertInstanceOf('GuzzleHttp\Psr7\Stream', $s);
+        $this->assertSame(file_get_contents(__FILE__), (string) $s);
+    }
+
+    public function testFactoryCreatesFromObjectWithToString()
+    {
+        $r = new HasToString();
+        $s = Psr7\stream_for($r);
+        $this->assertInstanceOf('GuzzleHttp\Psr7\Stream', $s);
+        $this->assertEquals('foo', (string) $s);
+    }
+
+    public function testCreatePassesThrough()
+    {
+        $s = Psr7\stream_for('foo');
+        $this->assertSame($s, Psr7\stream_for($s));
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testThrowsExceptionForUnknown()
+    {
+        Psr7\stream_for(new \stdClass());
+    }
+
+    public function testReturnsCustomMetadata()
+    {
+        $s = Psr7\stream_for('foo', ['metadata' => ['hwm' => 3]]);
+        $this->assertEquals(3, $s->getMetadata('hwm'));
+        $this->assertArrayHasKey('hwm', $s->getMetadata());
+    }
+
+    public function testCanSetSize()
+    {
+        $s = Psr7\stream_for('', ['size' => 10]);
+        $this->assertEquals(10, $s->getSize());
+    }
+
+    public function testCanCreateIteratorBasedStream()
+    {
+        $a = new \ArrayIterator(['foo', 'bar', '123']);
+        $p = Psr7\stream_for($a);
+        $this->assertInstanceOf('GuzzleHttp\Psr7\PumpStream', $p);
+        $this->assertEquals('foo', $p->read(3));
+        $this->assertFalse($p->eof());
+        $this->assertEquals('b', $p->read(1));
+        $this->assertEquals('a', $p->read(1));
+        $this->assertEquals('r12', $p->read(3));
+        $this->assertFalse($p->eof());
+        $this->assertEquals('3', $p->getContents());
+        $this->assertTrue($p->eof());
+        $this->assertEquals(9, $p->tell());
+    }
+
+    public function testConvertsRequestsToStrings()
+    {
+        $request = new Psr7\Request('PUT', 'http://foo.com/hi?123', [
+            'Baz' => 'bar',
+            'Qux' => ' ipsum'
+        ], 'hello', '1.0');
+        $this->assertEquals(
+            "PUT /hi?123 HTTP/1.0\r\nHost: foo.com\r\nBaz: bar\r\nQux: ipsum\r\n\r\nhello",
+            Psr7\str($request)
+        );
+    }
+
+    public function testConvertsResponsesToStrings()
+    {
+        $response = new Psr7\Response(200, [
+            'Baz' => 'bar',
+            'Qux' => ' ipsum'
+        ], 'hello', '1.0', 'FOO');
+        $this->assertEquals(
+            "HTTP/1.0 200 FOO\r\nBaz: bar\r\nQux: ipsum\r\n\r\nhello",
+            Psr7\str($response)
+        );
+    }
+
+    public function parseParamsProvider()
+    {
+        $res1 = array(
+            array(
+                '<http:/.../front.jpeg>',
+                'rel' => 'front',
+                'type' => 'image/jpeg',
+            ),
+            array(
+                '<http://.../back.jpeg>',
+                'rel' => 'back',
+                'type' => 'image/jpeg',
+            ),
+        );
+        return array(
+            array(
+                '<http:/.../front.jpeg>; rel="front"; type="image/jpeg", <http://.../back.jpeg>; rel=back; type="image/jpeg"',
+                $res1
+            ),
+            array(
+                '<http:/.../front.jpeg>; rel="front"; type="image/jpeg",<http://.../back.jpeg>; rel=back; type="image/jpeg"',
+                $res1
+            ),
+            array(
+                'foo="baz"; bar=123, boo, test="123", foobar="foo;bar"',
+                array(
+                    array('foo' => 'baz', 'bar' => '123'),
+                    array('boo'),
+                    array('test' => '123'),
+                    array('foobar' => 'foo;bar')
+                )
+            ),
+            array(
+                '<http://.../side.jpeg?test=1>; rel="side"; type="image/jpeg",<http://.../side.jpeg?test=2>; rel=side; type="image/jpeg"',
+                array(
+                    array('<http://.../side.jpeg?test=1>', 'rel' => 'side', 'type' => 'image/jpeg'),
+                    array('<http://.../side.jpeg?test=2>', 'rel' => 'side', 'type' => 'image/jpeg')
+                )
+            ),
+            array(
+                '',
+                array()
+            )
+        );
+    }
+    /**
+     * @dataProvider parseParamsProvider
+     */
+    public function testParseParams($header, $result)
+    {
+        $this->assertEquals($result, Psr7\parse_header($header));
+    }
+
+    public function testParsesArrayHeaders()
+    {
+        $header = ['a, b', 'c', 'd, e'];
+        $this->assertEquals(['a', 'b', 'c', 'd', 'e'], Psr7\normalize_header($header));
+    }
+
+    public function testRewindsBody()
+    {
+        $body = Psr7\stream_for('abc');
+        $res = new Psr7\Response(200, [], $body);
+        Psr7\rewind_body($res);
+        $this->assertEquals(0, $body->tell());
+        $body->rewind(1);
+        Psr7\rewind_body($res);
+        $this->assertEquals(0, $body->tell());
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     */
+    public function testThrowsWhenBodyCannotBeRewound()
+    {
+        $body = Psr7\stream_for('abc');
+        $body->read(1);
+        $body = FnStream::decorate($body, [
+            'rewind' => function () { throw new \RuntimeException('a'); }
+        ]);
+        $res = new Psr7\Response(200, [], $body);
+        Psr7\rewind_body($res);
+    }
+
+    public function testCanModifyRequestWithUri()
+    {
+        $r1 = new Psr7\Request('GET', 'http://foo.com');
+        $r2 = Psr7\modify_request($r1, [
+            'uri' => new Psr7\Uri('http://www.foo.com')
+        ]);
+        $this->assertEquals('http://www.foo.com', (string) $r2->getUri());
+        $this->assertEquals('www.foo.com', (string) $r2->getHeaderLine('host'));
+    }
+
+    public function testCanModifyRequestWithUriAndPort()
+    {
+        $r1 = new Psr7\Request('GET', 'http://foo.com:8000');
+        $r2 = Psr7\modify_request($r1, [
+            'uri' => new Psr7\Uri('http://www.foo.com:8000')
+        ]);
+        $this->assertEquals('http://www.foo.com:8000', (string) $r2->getUri());
+        $this->assertEquals('www.foo.com:8000', (string) $r2->getHeaderLine('host'));
+    }
+
+    public function testCanModifyRequestWithCaseInsensitiveHeader()
+    {
+        $r1 = new Psr7\Request('GET', 'http://foo.com', ['User-Agent' => 'foo']);
+        $r2 = Psr7\modify_request($r1, ['set_headers' => ['User-agent' => 'bar']]);
+        $this->assertEquals('bar', $r2->getHeaderLine('User-Agent'));
+        $this->assertEquals('bar', $r2->getHeaderLine('User-agent'));
+    }
+
+    public function testReturnsAsIsWhenNoChanges()
+    {
+        $request = new Psr7\Request('GET', 'http://foo.com');
+        $this->assertSame($request, Psr7\modify_request($request, []));
+    }
+
+    public function testReturnsUriAsIsWhenNoChanges()
+    {
+        $r1 = new Psr7\Request('GET', 'http://foo.com');
+        $r2 = Psr7\modify_request($r1, ['set_headers' => ['foo' => 'bar']]);
+        $this->assertNotSame($r1, $r2);
+        $this->assertEquals('bar', $r2->getHeaderLine('foo'));
+    }
+
+    public function testRemovesHeadersFromMessage()
+    {
+        $r1 = new Psr7\Request('GET', 'http://foo.com', ['foo' => 'bar']);
+        $r2 = Psr7\modify_request($r1, ['remove_headers' => ['foo']]);
+        $this->assertNotSame($r1, $r2);
+        $this->assertFalse($r2->hasHeader('foo'));
+    }
+
+    public function testAddsQueryToUri()
+    {
+        $r1 = new Psr7\Request('GET', 'http://foo.com');
+        $r2 = Psr7\modify_request($r1, ['query' => 'foo=bar']);
+        $this->assertNotSame($r1, $r2);
+        $this->assertEquals('foo=bar', $r2->getUri()->getQuery());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php	(revision 5534)
@@ -0,0 +1,16 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\InflateStream;
+
+class InflateStreamtest extends \PHPUnit_Framework_TestCase
+{
+    public function testInflatesStreams()
+    {
+        $content = gzencode('test');
+        $a = Psr7\stream_for($content);
+        $b = new InflateStream($a);
+        $this->assertEquals('test', (string) $b);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/LazyOpenStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/LazyOpenStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/LazyOpenStreamTest.php	(revision 5534)
@@ -0,0 +1,64 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\LazyOpenStream;
+
+class LazyOpenStreamTest extends \PHPUnit_Framework_TestCase
+{
+    private $fname;
+
+    public function setup()
+    {
+        $this->fname = tempnam('/tmp', 'tfile');
+
+        if (file_exists($this->fname)) {
+            unlink($this->fname);
+        }
+    }
+
+    public function tearDown()
+    {
+        if (file_exists($this->fname)) {
+            unlink($this->fname);
+        }
+    }
+
+    public function testOpensLazily()
+    {
+        $l = new LazyOpenStream($this->fname, 'w+');
+        $l->write('foo');
+        $this->assertInternalType('array', $l->getMetadata());
+        $this->assertFileExists($this->fname);
+        $this->assertEquals('foo', file_get_contents($this->fname));
+        $this->assertEquals('foo', (string) $l);
+    }
+
+    public function testProxiesToFile()
+    {
+        file_put_contents($this->fname, 'foo');
+        $l = new LazyOpenStream($this->fname, 'r');
+        $this->assertEquals('foo', $l->read(4));
+        $this->assertTrue($l->eof());
+        $this->assertEquals(3, $l->tell());
+        $this->assertTrue($l->isReadable());
+        $this->assertTrue($l->isSeekable());
+        $this->assertFalse($l->isWritable());
+        $l->seek(1);
+        $this->assertEquals('oo', $l->getContents());
+        $this->assertEquals('foo', (string) $l);
+        $this->assertEquals(3, $l->getSize());
+        $this->assertInternalType('array', $l->getMetadata());
+        $l->close();
+    }
+
+    public function testDetachesUnderlyingStream()
+    {
+        file_put_contents($this->fname, 'foo');
+        $l = new LazyOpenStream($this->fname, 'r');
+        $r = $l->detach();
+        $this->assertInternalType('resource', $r);
+        fseek($r, 0);
+        $this->assertEquals('foo', stream_get_contents($r));
+        fclose($r);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/LimitStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/LimitStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/LimitStreamTest.php	(revision 5534)
@@ -0,0 +1,166 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\FnStream;
+use GuzzleHttp\Psr7\Stream;
+use GuzzleHttp\Psr7\LimitStream;
+use GuzzleHttp\Psr7\NoSeekStream;
+
+/**
+ * @covers GuzzleHttp\Psr7\LimitStream
+ */
+class LimitStreamTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var LimitStream */
+    protected $body;
+
+    /** @var Stream */
+    protected $decorated;
+
+    public function setUp()
+    {
+        $this->decorated = Psr7\stream_for(fopen(__FILE__, 'r'));
+        $this->body = new LimitStream($this->decorated, 10, 3);
+    }
+
+    public function testReturnsSubset()
+    {
+        $body = new LimitStream(Psr7\stream_for('foo'), -1, 1);
+        $this->assertEquals('oo', (string) $body);
+        $this->assertTrue($body->eof());
+        $body->seek(0);
+        $this->assertFalse($body->eof());
+        $this->assertEquals('oo', $body->read(100));
+        $this->assertSame('', $body->read(1));
+        $this->assertTrue($body->eof());
+    }
+
+    public function testReturnsSubsetWhenCastToString()
+    {
+        $body = Psr7\stream_for('foo_baz_bar');
+        $limited = new LimitStream($body, 3, 4);
+        $this->assertEquals('baz', (string) $limited);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Unable to seek to stream position 10 with whence 0
+     */
+    public function testEnsuresPositionCanBeekSeekedTo()
+    {
+        new LimitStream(Psr7\stream_for(''), 0, 10);
+    }
+
+    public function testReturnsSubsetOfEmptyBodyWhenCastToString()
+    {
+        $body = Psr7\stream_for('01234567891234');
+        $limited = new LimitStream($body, 0, 10);
+        $this->assertEquals('', (string) $limited);
+    }
+
+    public function testReturnsSpecificSubsetOBodyWhenCastToString()
+    {
+        $body = Psr7\stream_for('0123456789abcdef');
+        $limited = new LimitStream($body, 3, 10);
+        $this->assertEquals('abc', (string) $limited);
+    }
+
+    public function testSeeksWhenConstructed()
+    {
+        $this->assertEquals(0, $this->body->tell());
+        $this->assertEquals(3, $this->decorated->tell());
+    }
+
+    public function testAllowsBoundedSeek()
+    {
+        $this->body->seek(100);
+        $this->assertEquals(10, $this->body->tell());
+        $this->assertEquals(13, $this->decorated->tell());
+        $this->body->seek(0);
+        $this->assertEquals(0, $this->body->tell());
+        $this->assertEquals(3, $this->decorated->tell());
+        try {
+            $this->body->seek(-10);
+            $this->fail();
+        } catch (\RuntimeException $e) {}
+        $this->assertEquals(0, $this->body->tell());
+        $this->assertEquals(3, $this->decorated->tell());
+        $this->body->seek(5);
+        $this->assertEquals(5, $this->body->tell());
+        $this->assertEquals(8, $this->decorated->tell());
+        // Fail
+        try {
+            $this->body->seek(1000, SEEK_END);
+            $this->fail();
+        } catch (\RuntimeException $e) {}
+    }
+
+    public function testReadsOnlySubsetOfData()
+    {
+        $data = $this->body->read(100);
+        $this->assertEquals(10, strlen($data));
+        $this->assertSame('', $this->body->read(1000));
+
+        $this->body->setOffset(10);
+        $newData = $this->body->read(100);
+        $this->assertEquals(10, strlen($newData));
+        $this->assertNotSame($data, $newData);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Could not seek to stream offset 2
+     */
+    public function testThrowsWhenCurrentGreaterThanOffsetSeek()
+    {
+        $a = Psr7\stream_for('foo_bar');
+        $b = new NoSeekStream($a);
+        $c = new LimitStream($b);
+        $a->getContents();
+        $c->setOffset(2);
+    }
+
+    public function testCanGetContentsWithoutSeeking()
+    {
+        $a = Psr7\stream_for('foo_bar');
+        $b = new NoSeekStream($a);
+        $c = new LimitStream($b);
+        $this->assertEquals('foo_bar', $c->getContents());
+    }
+
+    public function testClaimsConsumedWhenReadLimitIsReached()
+    {
+        $this->assertFalse($this->body->eof());
+        $this->body->read(1000);
+        $this->assertTrue($this->body->eof());
+    }
+
+    public function testContentLengthIsBounded()
+    {
+        $this->assertEquals(10, $this->body->getSize());
+    }
+
+    public function testGetContentsIsBasedOnSubset()
+    {
+        $body = new LimitStream(Psr7\stream_for('foobazbar'), 3, 3);
+        $this->assertEquals('baz', $body->getContents());
+    }
+
+    public function testReturnsNullIfSizeCannotBeDetermined()
+    {
+        $a = new FnStream([
+            'getSize' => function () { return null; },
+            'tell'    => function () { return 0; },
+        ]);
+        $b = new LimitStream($a);
+        $this->assertNull($b->getSize());
+    }
+
+    public function testLengthLessOffsetWhenNoLimitSize()
+    {
+        $a = Psr7\stream_for('foo_bar');
+        $b = new LimitStream($a, -1, 4);
+        $this->assertEquals(3, $b->getSize());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/MultipartStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/MultipartStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/MultipartStreamTest.php	(revision 5534)
@@ -0,0 +1,214 @@
+<?php
+namespace GuzzleHttp\Tests;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\MultipartStream;
+
+class MultipartStreamTest extends \PHPUnit_Framework_TestCase
+{
+    public function testCreatesDefaultBoundary()
+    {
+        $b = new MultipartStream();
+        $this->assertNotEmpty($b->getBoundary());
+    }
+
+    public function testCanProvideBoundary()
+    {
+        $b = new MultipartStream([], 'foo');
+        $this->assertEquals('foo', $b->getBoundary());
+    }
+
+    public function testIsNotWritable()
+    {
+        $b = new MultipartStream();
+        $this->assertFalse($b->isWritable());
+    }
+
+    public function testCanCreateEmptyStream()
+    {
+        $b = new MultipartStream();
+        $boundary = $b->getBoundary();
+        $this->assertSame("--{$boundary}--\r\n", $b->getContents());
+        $this->assertSame(strlen($boundary) + 6, $b->getSize());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testValidatesFilesArrayElement()
+    {
+        new MultipartStream([['foo' => 'bar']]);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testEnsuresFileHasName()
+    {
+        new MultipartStream([['contents' => 'bar']]);
+    }
+
+    public function testSerializesFields()
+    {
+        $b = new MultipartStream([
+            [
+                'name'     => 'foo',
+                'contents' => 'bar'
+            ],
+            [
+                'name' => 'baz',
+                'contents' => 'bam'
+            ]
+        ], 'boundary');
+        $this->assertEquals(
+            "--boundary\r\nContent-Disposition: form-data; name=\"foo\"\r\nContent-Length: 3\r\n\r\n"
+            . "bar\r\n--boundary\r\nContent-Disposition: form-data; name=\"baz\"\r\nContent-Length: 3"
+            . "\r\n\r\nbam\r\n--boundary--\r\n", (string) $b);
+    }
+
+    public function testSerializesFiles()
+    {
+        $f1 = Psr7\FnStream::decorate(Psr7\stream_for('foo'), [
+            'getMetadata' => function () {
+                return '/foo/bar.txt';
+            }
+        ]);
+
+        $f2 = Psr7\FnStream::decorate(Psr7\stream_for('baz'), [
+            'getMetadata' => function () {
+                return '/foo/baz.jpg';
+            }
+        ]);
+
+        $f3 = Psr7\FnStream::decorate(Psr7\stream_for('bar'), [
+            'getMetadata' => function () {
+                return '/foo/bar.gif';
+            }
+        ]);
+
+        $b = new MultipartStream([
+            [
+                'name'     => 'foo',
+                'contents' => $f1
+            ],
+            [
+                'name' => 'qux',
+                'contents' => $f2
+            ],
+            [
+                'name'     => 'qux',
+                'contents' => $f3
+            ],
+        ], 'boundary');
+
+        $expected = <<<EOT
+--boundary
+Content-Disposition: form-data; name="foo"; filename="bar.txt"
+Content-Length: 3
+Content-Type: text/plain
+
+foo
+--boundary
+Content-Disposition: form-data; name="qux"; filename="baz.jpg"
+Content-Length: 3
+Content-Type: image/jpeg
+
+baz
+--boundary
+Content-Disposition: form-data; name="qux"; filename="bar.gif"
+Content-Length: 3
+Content-Type: image/gif
+
+bar
+--boundary--
+
+EOT;
+
+        $this->assertEquals($expected, str_replace("\r", '', $b));
+    }
+
+    public function testSerializesFilesWithCustomHeaders()
+    {
+        $f1 = Psr7\FnStream::decorate(Psr7\stream_for('foo'), [
+            'getMetadata' => function () {
+                return '/foo/bar.txt';
+            }
+        ]);
+
+        $b = new MultipartStream([
+            [
+                'name' => 'foo',
+                'contents' => $f1,
+                'headers'  => [
+                    'x-foo' => 'bar',
+                    'content-disposition' => 'custom'
+                ]
+            ]
+        ], 'boundary');
+
+        $expected = <<<EOT
+--boundary
+x-foo: bar
+content-disposition: custom
+Content-Length: 3
+Content-Type: text/plain
+
+foo
+--boundary--
+
+EOT;
+
+        $this->assertEquals($expected, str_replace("\r", '', $b));
+    }
+
+    public function testSerializesFilesWithCustomHeadersAndMultipleValues()
+    {
+        $f1 = Psr7\FnStream::decorate(Psr7\stream_for('foo'), [
+            'getMetadata' => function () {
+                return '/foo/bar.txt';
+            }
+        ]);
+
+        $f2 = Psr7\FnStream::decorate(Psr7\stream_for('baz'), [
+            'getMetadata' => function () {
+                return '/foo/baz.jpg';
+            }
+        ]);
+
+        $b = new MultipartStream([
+            [
+                'name'     => 'foo',
+                'contents' => $f1,
+                'headers'  => [
+                    'x-foo' => 'bar',
+                    'content-disposition' => 'custom'
+                ]
+            ],
+            [
+                'name'     => 'foo',
+                'contents' => $f2,
+                'headers'  => ['cOntenT-Type' => 'custom'],
+            ]
+        ], 'boundary');
+
+        $expected = <<<EOT
+--boundary
+x-foo: bar
+content-disposition: custom
+Content-Length: 3
+Content-Type: text/plain
+
+foo
+--boundary
+cOntenT-Type: custom
+Content-Disposition: form-data; name="foo"; filename="baz.jpg"
+Content-Length: 3
+
+baz
+--boundary--
+
+EOT;
+
+        $this->assertEquals($expected, str_replace("\r", '', $b));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php	(revision 5534)
@@ -0,0 +1,40 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\NoSeekStream;
+
+/**
+ * @covers GuzzleHttp\Psr7\NoSeekStream
+ * @covers GuzzleHttp\Psr7\StreamDecoratorTrait
+ */
+class NoSeekStreamTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Cannot seek a NoSeekStream
+     */
+    public function testCannotSeek()
+    {
+        $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isSeekable', 'seek'])
+            ->getMockForAbstractClass();
+        $s->expects($this->never())->method('seek');
+        $s->expects($this->never())->method('isSeekable');
+        $wrapped = new NoSeekStream($s);
+        $this->assertFalse($wrapped->isSeekable());
+        $wrapped->seek(2);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     * @expectedExceptionMessage Cannot write to a non-writable stream
+     */
+    public function testHandlesClose()
+    {
+        $s = Psr7\stream_for('foo');
+        $wrapped = new NoSeekStream($s);
+        $wrapped->close();
+        $wrapped->write('foo');
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/PumpStreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/PumpStreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/PumpStreamTest.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\LimitStream;
+use GuzzleHttp\Psr7\PumpStream;
+use GuzzleHttp\Psr7;
+
+class PumpStreamTest extends \PHPUnit_Framework_TestCase
+{
+    public function testHasMetadataAndSize()
+    {
+        $p = new PumpStream(function () {}, [
+            'metadata' => ['foo' => 'bar'],
+            'size'     => 100
+        ]);
+
+        $this->assertEquals('bar', $p->getMetadata('foo'));
+        $this->assertEquals(['foo' => 'bar'], $p->getMetadata());
+        $this->assertEquals(100, $p->getSize());
+    }
+
+    public function testCanReadFromCallable()
+    {
+        $p = Psr7\stream_for(function ($size) {
+            return 'a';
+        });
+        $this->assertEquals('a', $p->read(1));
+        $this->assertEquals(1, $p->tell());
+        $this->assertEquals('aaaaa', $p->read(5));
+        $this->assertEquals(6, $p->tell());
+    }
+
+    public function testStoresExcessDataInBuffer()
+    {
+        $called = [];
+        $p = Psr7\stream_for(function ($size) use (&$called) {
+            $called[] = $size;
+            return 'abcdef';
+        });
+        $this->assertEquals('a', $p->read(1));
+        $this->assertEquals('b', $p->read(1));
+        $this->assertEquals('cdef', $p->read(4));
+        $this->assertEquals('abcdefabc', $p->read(9));
+        $this->assertEquals([1, 9, 3], $called);
+    }
+
+    public function testInifiniteStreamWrappedInLimitStream()
+    {
+        $p = Psr7\stream_for(function () { return 'a'; });
+        $s = new LimitStream($p, 5);
+        $this->assertEquals('aaaaa', (string) $s);
+    }
+
+    public function testDescribesCapabilities()
+    {
+        $p = Psr7\stream_for(function () {});
+        $this->assertTrue($p->isReadable());
+        $this->assertFalse($p->isSeekable());
+        $this->assertFalse($p->isWritable());
+        $this->assertNull($p->getSize());
+        $this->assertEquals('', $p->getContents());
+        $this->assertEquals('', (string) $p);
+        $p->close();
+        $this->assertEquals('', $p->read(10));
+        $this->assertTrue($p->eof());
+
+        try {
+            $this->assertFalse($p->write('aa'));
+            $this->fail();
+        } catch (\RuntimeException $e) {}
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/RequestTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/RequestTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/RequestTest.php	(revision 5534)
@@ -0,0 +1,157 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\Request;
+use GuzzleHttp\Psr7\Uri;
+
+/**
+ * @covers GuzzleHttp\Psr7\Request
+ */
+class RequestTest extends \PHPUnit_Framework_TestCase
+{
+    public function testRequestUriMayBeString()
+    {
+        $r = new Request('GET', '/');
+        $this->assertEquals('/', (string) $r->getUri());
+    }
+
+    public function testRequestUriMayBeUri()
+    {
+        $uri = new Uri('/');
+        $r = new Request('GET', $uri);
+        $this->assertSame($uri, $r->getUri());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testValidateRequestUri()
+    {
+        new Request('GET', true);
+    }
+
+    public function testCanConstructWithBody()
+    {
+        $r = new Request('GET', '/', [], 'baz');
+        $this->assertEquals('baz', (string) $r->getBody());
+    }
+
+    public function testCapitalizesMethod()
+    {
+        $r = new Request('get', '/');
+        $this->assertEquals('GET', $r->getMethod());
+    }
+
+    public function testCapitalizesWithMethod()
+    {
+        $r = new Request('GET', '/');
+        $this->assertEquals('PUT', $r->withMethod('put')->getMethod());
+    }
+
+    public function testWithUri()
+    {
+        $r1 = new Request('GET', '/');
+        $u1 = $r1->getUri();
+        $u2 = new Uri('http://www.example.com');
+        $r2 = $r1->withUri($u2);
+        $this->assertNotSame($r1, $r2);
+        $this->assertSame($u2, $r2->getUri());
+        $this->assertSame($u1, $r1->getUri());
+    }
+
+    public function testSameInstanceWhenSameUri()
+    {
+        $r1 = new Request('GET', 'http://foo.com');
+        $r2 = $r1->withUri($r1->getUri());
+        $this->assertSame($r1, $r2);
+    }
+
+    public function testWithRequestTarget()
+    {
+        $r1 = new Request('GET', '/');
+        $r2 = $r1->withRequestTarget('*');
+        $this->assertEquals('*', $r2->getRequestTarget());
+        $this->assertEquals('/', $r1->getRequestTarget());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testRequestTargetDoesNotAllowSpaces()
+    {
+        $r1 = new Request('GET', '/');
+        $r1->withRequestTarget('/foo bar');
+    }
+
+    public function testRequestTargetDefaultsToSlash()
+    {
+        $r1 = new Request('GET', '');
+        $this->assertEquals('/', $r1->getRequestTarget());
+        $r2 = new Request('GET', '*');
+        $this->assertEquals('*', $r2->getRequestTarget());
+        $r3 = new Request('GET', 'http://foo.com/bar baz/');
+        $this->assertEquals('/bar%20baz/', $r3->getRequestTarget());
+    }
+
+    public function testBuildsRequestTarget()
+    {
+        $r1 = new Request('GET', 'http://foo.com/baz?bar=bam');
+        $this->assertEquals('/baz?bar=bam', $r1->getRequestTarget());
+    }
+
+    public function testHostIsAddedFirst()
+    {
+        $r = new Request('GET', 'http://foo.com/baz?bar=bam', ['Foo' => 'Bar']);
+        $this->assertEquals([
+            'Host' => ['foo.com'],
+            'Foo'  => ['Bar']
+        ], $r->getHeaders());
+    }
+
+    public function testCanGetHeaderAsCsv()
+    {
+        $r = new Request('GET', 'http://foo.com/baz?bar=bam', [
+            'Foo' => ['a', 'b', 'c']
+        ]);
+        $this->assertEquals('a, b, c', $r->getHeaderLine('Foo'));
+        $this->assertEquals('', $r->getHeaderLine('Bar'));
+    }
+
+    public function testHostIsNotOverwrittenWhenPreservingHost()
+    {
+        $r = new Request('GET', 'http://foo.com/baz?bar=bam', ['Host' => 'a.com']);
+        $this->assertEquals(['Host' => ['a.com']], $r->getHeaders());
+        $r2 = $r->withUri(new Uri('http://www.foo.com/bar'), true);
+        $this->assertEquals('a.com', $r2->getHeaderLine('Host'));
+    }
+
+    public function testOverridesHostWithUri()
+    {
+        $r = new Request('GET', 'http://foo.com/baz?bar=bam');
+        $this->assertEquals(['Host' => ['foo.com']], $r->getHeaders());
+        $r2 = $r->withUri(new Uri('http://www.baz.com/bar'));
+        $this->assertEquals('www.baz.com', $r2->getHeaderLine('Host'));
+    }
+
+    public function testAggregatesHeaders()
+    {
+        $r = new Request('GET', 'http://foo.com', [
+            'ZOO' => 'zoobar',
+            'zoo' => ['foobar', 'zoobar']
+        ]);
+        $this->assertEquals('zoobar, foobar, zoobar', $r->getHeaderLine('zoo'));
+    }
+
+    public function testAddsPortToHeader()
+    {
+        $r = new Request('GET', 'http://foo.com:8124/bar');
+        $this->assertEquals('foo.com:8124', $r->getHeaderLine('host'));
+    }
+
+    public function testAddsPortToHeaderAndReplacePreviousPort()
+    {
+        $r = new Request('GET', 'http://foo.com:8124/bar');
+        $r = $r->withUri(new Uri('http://foo.com:8125/bar'));
+        $this->assertEquals('foo.com:8125', $r->getHeaderLine('host'));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/ResponseTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/ResponseTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/ResponseTest.php	(revision 5534)
@@ -0,0 +1,146 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\Response;
+use GuzzleHttp\Psr7;
+
+/**
+ * @covers GuzzleHttp\Psr7\MessageTrait
+ * @covers GuzzleHttp\Psr7\Response
+ */
+class ResponseTest extends \PHPUnit_Framework_TestCase
+{
+    public function testAddsDefaultReason()
+    {
+        $r = new Response('200');
+        $this->assertSame(200, $r->getStatusCode());
+        $this->assertEquals('OK', $r->getReasonPhrase());
+    }
+
+    public function testCanGiveCustomReason()
+    {
+        $r = new Response(200, [], null, '1.1', 'bar');
+        $this->assertEquals('bar', $r->getReasonPhrase());
+    }
+
+    public function testCanGiveCustomProtocolVersion()
+    {
+        $r = new Response(200, [], null, '1000');
+        $this->assertEquals('1000', $r->getProtocolVersion());
+    }
+
+    public function testCanCreateNewResponseWithStatusAndNoReason()
+    {
+        $r = new Response(200);
+        $r2 = $r->withStatus(201);
+        $this->assertEquals(200, $r->getStatusCode());
+        $this->assertEquals('OK', $r->getReasonPhrase());
+        $this->assertEquals(201, $r2->getStatusCode());
+        $this->assertEquals('Created', $r2->getReasonPhrase());
+    }
+
+    public function testCanCreateNewResponseWithStatusAndReason()
+    {
+        $r = new Response(200);
+        $r2 = $r->withStatus(201, 'Foo');
+        $this->assertEquals(200, $r->getStatusCode());
+        $this->assertEquals('OK', $r->getReasonPhrase());
+        $this->assertEquals(201, $r2->getStatusCode());
+        $this->assertEquals('Foo', $r2->getReasonPhrase());
+    }
+
+    public function testCreatesResponseWithAddedHeaderArray()
+    {
+        $r = new Response();
+        $r2 = $r->withAddedHeader('foo', ['baz', 'bar']);
+        $this->assertFalse($r->hasHeader('foo'));
+        $this->assertEquals('baz, bar', $r2->getHeaderLine('foo'));
+    }
+
+    public function testReturnsIdentityWhenRemovingMissingHeader()
+    {
+        $r = new Response();
+        $this->assertSame($r, $r->withoutHeader('foo'));
+    }
+
+    public function testAlwaysReturnsBody()
+    {
+        $r = new Response();
+        $this->assertInstanceOf('Psr\Http\Message\StreamInterface', $r->getBody());
+    }
+
+    public function testCanSetHeaderAsArray()
+    {
+        $r = new Response(200, [
+            'foo' => ['baz ', ' bar ']
+        ]);
+        $this->assertEquals('baz, bar', $r->getHeaderLine('foo'));
+        $this->assertEquals(['baz', 'bar'], $r->getHeader('foo'));
+    }
+
+    public function testSameInstanceWhenSameBody()
+    {
+        $r = new Response(200, [], 'foo');
+        $b = $r->getBody();
+        $this->assertSame($r, $r->withBody($b));
+    }
+
+    public function testNewInstanceWhenNewBody()
+    {
+        $r = new Response(200, [], 'foo');
+        $b2 = Psr7\stream_for('abc');
+        $this->assertNotSame($r, $r->withBody($b2));
+    }
+
+    public function testSameInstanceWhenSameProtocol()
+    {
+        $r = new Response(200);
+        $this->assertSame($r, $r->withProtocolVersion('1.1'));
+    }
+
+    public function testNewInstanceWhenNewProtocol()
+    {
+        $r = new Response(200);
+        $this->assertNotSame($r, $r->withProtocolVersion('1.0'));
+    }
+
+    public function testNewInstanceWhenRemovingHeader()
+    {
+        $r = new Response(200, ['Foo' => 'Bar']);
+        $r2 = $r->withoutHeader('Foo');
+        $this->assertNotSame($r, $r2);
+        $this->assertFalse($r2->hasHeader('foo'));
+    }
+
+    public function testNewInstanceWhenAddingHeader()
+    {
+        $r = new Response(200, ['Foo' => 'Bar']);
+        $r2 = $r->withAddedHeader('Foo', 'Baz');
+        $this->assertNotSame($r, $r2);
+        $this->assertEquals('Bar, Baz', $r2->getHeaderLine('foo'));
+    }
+
+    public function testNewInstanceWhenAddingHeaderThatWasNotThereBefore()
+    {
+        $r = new Response(200, ['Foo' => 'Bar']);
+        $r2 = $r->withAddedHeader('Baz', 'Bam');
+        $this->assertNotSame($r, $r2);
+        $this->assertEquals('Bam', $r2->getHeaderLine('Baz'));
+        $this->assertEquals('Bar', $r2->getHeaderLine('Foo'));
+    }
+
+    public function testRemovesPreviouslyAddedHeaderOfDifferentCase()
+    {
+        $r = new Response(200, ['Foo' => 'Bar']);
+        $r2 = $r->withHeader('foo', 'Bam');
+        $this->assertNotSame($r, $r2);
+        $this->assertEquals('Bam', $r2->getHeaderLine('Foo'));
+    }
+
+    public function testBodyConsistent()
+    {
+        $r = new Response(200, [], '0');
+        $this->assertEquals('0', (string)$r->getBody());
+    }
+    
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamDecoratorTraitTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamDecoratorTraitTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamDecoratorTraitTest.php	(revision 5534)
@@ -0,0 +1,137 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+use GuzzleHttp\Psr7;
+use GuzzleHttp\Psr7\StreamDecoratorTrait;
+
+class Str implements StreamInterface
+{
+    use StreamDecoratorTrait;
+}
+
+/**
+ * @covers GuzzleHttp\Psr7\StreamDecoratorTrait
+ */
+class StreamDecoratorTraitTest extends \PHPUnit_Framework_TestCase
+{
+    private $a;
+    private $b;
+    private $c;
+
+    public function setUp()
+    {
+        $this->c = fopen('php://temp', 'r+');
+        fwrite($this->c, 'foo');
+        fseek($this->c, 0);
+        $this->a = Psr7\stream_for($this->c);
+        $this->b = new Str($this->a);
+    }
+
+    public function testCatchesExceptionsWhenCastingToString()
+    {
+        $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['read'])
+            ->getMockForAbstractClass();
+        $s->expects($this->once())
+            ->method('read')
+            ->will($this->throwException(new \Exception('foo')));
+        $msg = '';
+        set_error_handler(function ($errNo, $str) use (&$msg) { $msg = $str; });
+        echo new Str($s);
+        restore_error_handler();
+        $this->assertContains('foo', $msg);
+    }
+
+    public function testToString()
+    {
+        $this->assertEquals('foo', (string) $this->b);
+    }
+
+    public function testHasSize()
+    {
+        $this->assertEquals(3, $this->b->getSize());
+    }
+
+    public function testReads()
+    {
+        $this->assertEquals('foo', $this->b->read(10));
+    }
+
+    public function testCheckMethods()
+    {
+        $this->assertEquals($this->a->isReadable(), $this->b->isReadable());
+        $this->assertEquals($this->a->isWritable(), $this->b->isWritable());
+        $this->assertEquals($this->a->isSeekable(), $this->b->isSeekable());
+    }
+
+    public function testSeeksAndTells()
+    {
+        $this->b->seek(1);
+        $this->assertEquals(1, $this->a->tell());
+        $this->assertEquals(1, $this->b->tell());
+        $this->b->seek(0);
+        $this->assertEquals(0, $this->a->tell());
+        $this->assertEquals(0, $this->b->tell());
+        $this->b->seek(0, SEEK_END);
+        $this->assertEquals(3, $this->a->tell());
+        $this->assertEquals(3, $this->b->tell());
+    }
+
+    public function testGetsContents()
+    {
+        $this->assertEquals('foo', $this->b->getContents());
+        $this->assertEquals('', $this->b->getContents());
+        $this->b->seek(1);
+        $this->assertEquals('oo', $this->b->getContents(1));
+    }
+
+    public function testCloses()
+    {
+        $this->b->close();
+        $this->assertFalse(is_resource($this->c));
+    }
+
+    public function testDetaches()
+    {
+        $this->b->detach();
+        $this->assertFalse($this->b->isReadable());
+    }
+
+    public function testWrapsMetadata()
+    {
+        $this->assertSame($this->b->getMetadata(), $this->a->getMetadata());
+        $this->assertSame($this->b->getMetadata('uri'), $this->a->getMetadata('uri'));
+    }
+
+    public function testWrapsWrites()
+    {
+        $this->b->seek(0, SEEK_END);
+        $this->b->write('foo');
+        $this->assertEquals('foofoo', (string) $this->a);
+    }
+
+    /**
+     * @expectedException \UnexpectedValueException
+     */
+    public function testThrowsWithInvalidGetter()
+    {
+        $this->b->foo;
+    }
+
+    /**
+     * @expectedException \BadMethodCallException
+     */
+    public function testThrowsWhenGetterNotImplemented()
+    {
+        $s = new BadStream();
+        $s->stream;
+    }
+}
+
+class BadStream
+{
+    use StreamDecoratorTrait;
+
+    public function __construct() {}
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamTest.php	(revision 5534)
@@ -0,0 +1,161 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\NoSeekStream;
+use GuzzleHttp\Psr7\Stream;
+
+/**
+ * @covers GuzzleHttp\Psr7\Stream
+ */
+class StreamTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testConstructorThrowsExceptionOnInvalidArgument()
+    {
+        new Stream(true);
+    }
+
+    public function testConstructorInitializesProperties()
+    {
+        $handle = fopen('php://temp', 'r+');
+        fwrite($handle, 'data');
+        $stream = new Stream($handle);
+        $this->assertTrue($stream->isReadable());
+        $this->assertTrue($stream->isWritable());
+        $this->assertTrue($stream->isSeekable());
+        $this->assertEquals('php://temp', $stream->getMetadata('uri'));
+        $this->assertInternalType('array', $stream->getMetadata());
+        $this->assertEquals(4, $stream->getSize());
+        $this->assertFalse($stream->eof());
+        $stream->close();
+    }
+
+    public function testStreamClosesHandleOnDestruct()
+    {
+        $handle = fopen('php://temp', 'r');
+        $stream = new Stream($handle);
+        unset($stream);
+        $this->assertFalse(is_resource($handle));
+    }
+
+    public function testConvertsToString()
+    {
+        $handle = fopen('php://temp', 'w+');
+        fwrite($handle, 'data');
+        $stream = new Stream($handle);
+        $this->assertEquals('data', (string) $stream);
+        $this->assertEquals('data', (string) $stream);
+        $stream->close();
+    }
+
+    public function testGetsContents()
+    {
+        $handle = fopen('php://temp', 'w+');
+        fwrite($handle, 'data');
+        $stream = new Stream($handle);
+        $this->assertEquals('', $stream->getContents());
+        $stream->seek(0);
+        $this->assertEquals('data', $stream->getContents());
+        $this->assertEquals('', $stream->getContents());
+    }
+
+    public function testChecksEof()
+    {
+        $handle = fopen('php://temp', 'w+');
+        fwrite($handle, 'data');
+        $stream = new Stream($handle);
+        $this->assertFalse($stream->eof());
+        $stream->read(4);
+        $this->assertTrue($stream->eof());
+        $stream->close();
+    }
+
+    public function testGetSize()
+    {
+        $size = filesize(__FILE__);
+        $handle = fopen(__FILE__, 'r');
+        $stream = new Stream($handle);
+        $this->assertEquals($size, $stream->getSize());
+        // Load from cache
+        $this->assertEquals($size, $stream->getSize());
+        $stream->close();
+    }
+
+    public function testEnsuresSizeIsConsistent()
+    {
+        $h = fopen('php://temp', 'w+');
+        $this->assertEquals(3, fwrite($h, 'foo'));
+        $stream = new Stream($h);
+        $this->assertEquals(3, $stream->getSize());
+        $this->assertEquals(4, $stream->write('test'));
+        $this->assertEquals(7, $stream->getSize());
+        $this->assertEquals(7, $stream->getSize());
+        $stream->close();
+    }
+
+    public function testProvidesStreamPosition()
+    {
+        $handle = fopen('php://temp', 'w+');
+        $stream = new Stream($handle);
+        $this->assertEquals(0, $stream->tell());
+        $stream->write('foo');
+        $this->assertEquals(3, $stream->tell());
+        $stream->seek(1);
+        $this->assertEquals(1, $stream->tell());
+        $this->assertSame(ftell($handle), $stream->tell());
+        $stream->close();
+    }
+
+    public function testCanDetachStream()
+    {
+        $r = fopen('php://temp', 'w+');
+        $stream = new Stream($r);
+        $stream->write('foo');
+        $this->assertTrue($stream->isReadable());
+        $this->assertSame($r, $stream->detach());
+        $stream->detach();
+
+        $this->assertFalse($stream->isReadable());
+        $this->assertFalse($stream->isWritable());
+        $this->assertFalse($stream->isSeekable());
+
+        $throws = function (callable $fn) use ($stream) {
+            try {
+                $fn($stream);
+                $this->fail();
+            } catch (\Exception $e) {}
+        };
+
+        $throws(function ($stream) { $stream->read(10); });
+        $throws(function ($stream) { $stream->write('bar'); });
+        $throws(function ($stream) { $stream->seek(10); });
+        $throws(function ($stream) { $stream->tell(); });
+        $throws(function ($stream) { $stream->eof(); });
+        $throws(function ($stream) { $stream->getSize(); });
+        $throws(function ($stream) { $stream->getContents(); });
+        $this->assertSame('', (string) $stream);
+        $stream->close();
+    }
+
+    public function testCloseClearProperties()
+    {
+        $handle = fopen('php://temp', 'r+');
+        $stream = new Stream($handle);
+        $stream->close();
+
+        $this->assertFalse($stream->isSeekable());
+        $this->assertFalse($stream->isReadable());
+        $this->assertFalse($stream->isWritable());
+        $this->assertNull($stream->getSize());
+        $this->assertEmpty($stream->getMetadata());
+    }
+
+    public function testDoesNotThrowInToString()
+    {
+        $s = \GuzzleHttp\Psr7\stream_for('foo');
+        $s = new NoSeekStream($s);
+        $this->assertEquals('foo', (string) $s);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamWrapperTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamWrapperTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/StreamWrapperTest.php	(revision 5534)
@@ -0,0 +1,100 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\StreamWrapper;
+use GuzzleHttp\Psr7;
+
+/**
+ * @covers GuzzleHttp\Psr7\StreamWrapper
+ */
+class StreamWrapperTest extends \PHPUnit_Framework_TestCase
+{
+    public function testResource()
+    {
+        $stream = Psr7\stream_for('foo');
+        $handle = StreamWrapper::getResource($stream);
+        $this->assertSame('foo', fread($handle, 3));
+        $this->assertSame(3, ftell($handle));
+        $this->assertSame(3, fwrite($handle, 'bar'));
+        $this->assertSame(0, fseek($handle, 0));
+        $this->assertSame('foobar', fread($handle, 6));
+        $this->assertSame('', fread($handle, 1));
+        $this->assertTrue(feof($handle));
+
+        // This fails on HHVM for some reason
+        if (!defined('HHVM_VERSION')) {
+            $this->assertEquals([
+                'dev'     => 0,
+                'ino'     => 0,
+                'mode'    => 33206,
+                'nlink'   => 0,
+                'uid'     => 0,
+                'gid'     => 0,
+                'rdev'    => 0,
+                'size'    => 6,
+                'atime'   => 0,
+                'mtime'   => 0,
+                'ctime'   => 0,
+                'blksize' => 0,
+                'blocks'  => 0,
+                0         => 0,
+                1         => 0,
+                2         => 33206,
+                3         => 0,
+                4         => 0,
+                5         => 0,
+                6         => 0,
+                7         => 6,
+                8         => 0,
+                9         => 0,
+                10        => 0,
+                11        => 0,
+                12        => 0,
+            ], fstat($handle));
+        }
+
+        $this->assertTrue(fclose($handle));
+        $this->assertSame('foobar', (string) $stream);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testValidatesStream()
+    {
+        $stream = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isReadable', 'isWritable'])
+            ->getMockForAbstractClass();
+        $stream->expects($this->once())
+            ->method('isReadable')
+            ->will($this->returnValue(false));
+        $stream->expects($this->once())
+            ->method('isWritable')
+            ->will($this->returnValue(false));
+        StreamWrapper::getResource($stream);
+    }
+
+    /**
+     * @expectedException \PHPUnit_Framework_Error_Warning
+     */
+    public function testReturnsFalseWhenStreamDoesNotExist()
+    {
+        fopen('guzzle://foo', 'r');
+    }
+
+    public function testCanOpenReadonlyStream()
+    {
+        $stream = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
+            ->setMethods(['isReadable', 'isWritable'])
+            ->getMockForAbstractClass();
+        $stream->expects($this->once())
+            ->method('isReadable')
+            ->will($this->returnValue(false));
+        $stream->expects($this->once())
+            ->method('isWritable')
+            ->will($this->returnValue(true));
+        $r = StreamWrapper::getResource($stream);
+        $this->assertInternalType('resource', $r);
+        fclose($r);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/UriTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/UriTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/UriTest.php	(revision 5534)
@@ -0,0 +1,281 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+use GuzzleHttp\Psr7\Uri;
+
+/**
+ * @covers GuzzleHttp\Psr7\Uri
+ */
+class UriTest extends \PHPUnit_Framework_TestCase
+{
+    const RFC3986_BASE = "http://a/b/c/d;p?q";
+
+    public function testParsesProvidedUrl()
+    {
+        $uri = new Uri('https://michael:test@test.com:443/path/123?q=abc#test');
+
+        // Standard port 443 for https gets ignored.
+        $this->assertEquals(
+            'https://michael:test@test.com/path/123?q=abc#test',
+            (string) $uri
+        );
+
+        $this->assertEquals('test', $uri->getFragment());
+        $this->assertEquals('test.com', $uri->getHost());
+        $this->assertEquals('/path/123', $uri->getPath());
+        $this->assertEquals(null, $uri->getPort());
+        $this->assertEquals('q=abc', $uri->getQuery());
+        $this->assertEquals('https', $uri->getScheme());
+        $this->assertEquals('michael:test', $uri->getUserInfo());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage Unable to parse URI
+     */
+    public function testValidatesUriCanBeParsed()
+    {
+        new Uri('///');
+    }
+
+    public function testCanTransformAndRetrievePartsIndividually()
+    {
+        $uri = (new Uri(''))
+            ->withFragment('#test')
+            ->withHost('example.com')
+            ->withPath('path/123')
+            ->withPort(8080)
+            ->withQuery('?q=abc')
+            ->withScheme('http')
+            ->withUserInfo('user', 'pass');
+
+        // Test getters.
+        $this->assertEquals('user:pass@example.com:8080', $uri->getAuthority());
+        $this->assertEquals('test', $uri->getFragment());
+        $this->assertEquals('example.com', $uri->getHost());
+        $this->assertEquals('path/123', $uri->getPath());
+        $this->assertEquals(8080, $uri->getPort());
+        $this->assertEquals('q=abc', $uri->getQuery());
+        $this->assertEquals('http', $uri->getScheme());
+        $this->assertEquals('user:pass', $uri->getUserInfo());
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testPortMustBeValid()
+    {
+        (new Uri(''))->withPort(100000);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testPathMustBeValid()
+    {
+        (new Uri(''))->withPath([]);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testQueryMustBeValid()
+    {
+        (new Uri(''))->withQuery(new \stdClass);
+    }
+
+    public function testAllowsFalseyUrlParts()
+    {
+        $url = new Uri('http://a:1/0?0#0');
+        $this->assertSame('a', $url->getHost());
+        $this->assertEquals(1, $url->getPort());
+        $this->assertSame('/0', $url->getPath());
+        $this->assertEquals('0', (string) $url->getQuery());
+        $this->assertSame('0', $url->getFragment());
+        $this->assertEquals('http://a:1/0?0#0', (string) $url);
+        $url = new Uri('');
+        $this->assertSame('', (string) $url);
+        $url = new Uri('0');
+        $this->assertSame('0', (string) $url);
+        $url = new Uri('/');
+        $this->assertSame('/', (string) $url);
+    }
+
+    /**
+     * @dataProvider getResolveTestCases
+     */
+    public function testResolvesUris($base, $rel, $expected)
+    {
+        $uri = new Uri($base);
+        $actual = Uri::resolve($uri, $rel);
+        $this->assertEquals($expected, (string) $actual);
+    }
+
+    public function getResolveTestCases()
+    {
+        return [
+            //[self::RFC3986_BASE, 'g:h',           'g:h'],
+            [self::RFC3986_BASE, 'g',             'http://a/b/c/g'],
+            [self::RFC3986_BASE, './g',           'http://a/b/c/g'],
+            [self::RFC3986_BASE, 'g/',            'http://a/b/c/g/'],
+            [self::RFC3986_BASE, '/g',            'http://a/g'],
+            [self::RFC3986_BASE, '//g',           'http://g'],
+            [self::RFC3986_BASE, '?y',            'http://a/b/c/d;p?y'],
+            [self::RFC3986_BASE, 'g?y',           'http://a/b/c/g?y'],
+            [self::RFC3986_BASE, '#s',            'http://a/b/c/d;p?q#s'],
+            [self::RFC3986_BASE, 'g#s',           'http://a/b/c/g#s'],
+            [self::RFC3986_BASE, 'g?y#s',         'http://a/b/c/g?y#s'],
+            [self::RFC3986_BASE, ';x',            'http://a/b/c/;x'],
+            [self::RFC3986_BASE, 'g;x',           'http://a/b/c/g;x'],
+            [self::RFC3986_BASE, 'g;x?y#s',       'http://a/b/c/g;x?y#s'],
+            [self::RFC3986_BASE, '',              self::RFC3986_BASE],
+            [self::RFC3986_BASE, '.',             'http://a/b/c/'],
+            [self::RFC3986_BASE, './',            'http://a/b/c/'],
+            [self::RFC3986_BASE, '..',            'http://a/b/'],
+            [self::RFC3986_BASE, '../',           'http://a/b/'],
+            [self::RFC3986_BASE, '../g',          'http://a/b/g'],
+            [self::RFC3986_BASE, '../..',         'http://a/'],
+            [self::RFC3986_BASE, '../../',        'http://a/'],
+            [self::RFC3986_BASE, '../../g',       'http://a/g'],
+            [self::RFC3986_BASE, '../../../g',    'http://a/g'],
+            [self::RFC3986_BASE, '../../../../g', 'http://a/g'],
+            [self::RFC3986_BASE, '/./g',          'http://a/g'],
+            [self::RFC3986_BASE, '/../g',         'http://a/g'],
+            [self::RFC3986_BASE, 'g.',            'http://a/b/c/g.'],
+            [self::RFC3986_BASE, '.g',            'http://a/b/c/.g'],
+            [self::RFC3986_BASE, 'g..',           'http://a/b/c/g..'],
+            [self::RFC3986_BASE, '..g',           'http://a/b/c/..g'],
+            [self::RFC3986_BASE, './../g',        'http://a/b/g'],
+            [self::RFC3986_BASE, 'foo////g',      'http://a/b/c/foo////g'],
+            [self::RFC3986_BASE, './g/.',         'http://a/b/c/g/'],
+            [self::RFC3986_BASE, 'g/./h',         'http://a/b/c/g/h'],
+            [self::RFC3986_BASE, 'g/../h',        'http://a/b/c/h'],
+            [self::RFC3986_BASE, 'g;x=1/./y',     'http://a/b/c/g;x=1/y'],
+            [self::RFC3986_BASE, 'g;x=1/../y',    'http://a/b/c/y'],
+            ['http://u@a/b/c/d;p?q', '.',         'http://u@a/b/c/'],
+            ['http://u:p@a/b/c/d;p?q', '.',       'http://u:p@a/b/c/'],
+            //[self::RFC3986_BASE, 'http:g',        'http:g'],
+        ];
+    }
+
+    public function testAddAndRemoveQueryValues()
+    {
+        $uri = new Uri('http://foo.com/bar');
+        $uri = Uri::withQueryValue($uri, 'a', 'b');
+        $uri = Uri::withQueryValue($uri, 'c', 'd');
+        $uri = Uri::withQueryValue($uri, 'e', null);
+        $this->assertEquals('a=b&c=d&e', $uri->getQuery());
+
+        $uri = Uri::withoutQueryValue($uri, 'c');
+        $uri = Uri::withoutQueryValue($uri, 'e');
+        $this->assertEquals('a=b', $uri->getQuery());
+        $uri = Uri::withoutQueryValue($uri, 'a');
+        $uri = Uri::withoutQueryValue($uri, 'a');
+        $this->assertEquals('', $uri->getQuery());
+    }
+
+    public function testGetAuthorityReturnsCorrectPort()
+    {
+        // HTTPS non-standard port
+        $uri = new Uri('https://foo.co:99');
+        $this->assertEquals('foo.co:99', $uri->getAuthority());
+
+        // HTTP non-standard port
+        $uri = new Uri('http://foo.co:99');
+        $this->assertEquals('foo.co:99', $uri->getAuthority());
+
+        // No scheme
+        $uri = new Uri('foo.co:99');
+        $this->assertEquals('foo.co:99', $uri->getAuthority());
+
+        // No host or port
+        $uri = new Uri('http:');
+        $this->assertEquals('', $uri->getAuthority());
+
+        // No host or port
+        $uri = new Uri('http://foo.co');
+        $this->assertEquals('foo.co', $uri->getAuthority());
+    }
+
+    public function pathTestProvider()
+    {
+        return [
+            // Percent encode spaces.
+            ['http://foo.com/baz bar', 'http://foo.com/baz%20bar'],
+            // Don't encoding something that's already encoded.
+            ['http://foo.com/baz%20bar', 'http://foo.com/baz%20bar'],
+            // Percent encode invalid percent encodings
+            ['http://foo.com/baz%2-bar', 'http://foo.com/baz%252-bar'],
+            // Don't encode path segments
+            ['http://foo.com/baz/bar/bam?a', 'http://foo.com/baz/bar/bam?a'],
+            ['http://foo.com/baz+bar', 'http://foo.com/baz+bar'],
+            ['http://foo.com/baz:bar', 'http://foo.com/baz:bar'],
+            ['http://foo.com/baz@bar', 'http://foo.com/baz@bar'],
+            ['http://foo.com/baz(bar);bam/', 'http://foo.com/baz(bar);bam/'],
+            ['http://foo.com/a-zA-Z0-9.-_~!$&\'()*+,;=:@', 'http://foo.com/a-zA-Z0-9.-_~!$&\'()*+,;=:@'],
+        ];
+    }
+
+    /**
+     * @dataProvider pathTestProvider
+     */
+    public function testUriEncodesPathProperly($input, $output)
+    {
+        $uri = new Uri($input);
+        $this->assertEquals((string) $uri, $output);
+    }
+
+    public function testDoesNotAddPortWhenNoPort()
+    {
+        $this->assertEquals('bar', new Uri('//bar'));
+        $this->assertEquals('bar', (new Uri('//bar'))->getHost());
+    }
+
+    public function testAllowsForRelativeUri()
+    {
+        $uri = (new Uri)->withPath('foo');
+        $this->assertEquals('foo', $uri->getPath());
+        $this->assertEquals('foo', (string) $uri);
+    }
+
+    public function testAddsSlashForRelativeUriStringWithHost()
+    {
+        $uri = (new Uri)->withPath('foo')->withHost('bar.com');
+        $this->assertEquals('foo', $uri->getPath());
+        $this->assertEquals('bar.com/foo', (string) $uri);
+    }
+
+    /**
+     * @dataProvider pathTestNoAuthority
+     */
+    public function testNoAuthority($input)
+    {
+        $uri = new Uri($input);
+
+        $this->assertEquals($input, (string) $uri);
+    }
+
+    public function pathTestNoAuthority()
+    {
+        return [
+            // path-rootless
+            ['urn:example:animal:ferret:nose'],
+            // path-absolute
+            ['urn:/example:animal:ferret:nose'],
+            ['urn:/'],
+            // path-empty
+            ['urn:'],
+            ['urn'],
+        ];
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage Unable to parse URI
+     */
+    public function testNoAuthorityWithInvalidPath()
+    {
+        $input = 'urn://example:animal:ferret:nose';
+        $uri = new Uri($input);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/bootstrap.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/bootstrap.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/guzzlehttp/psr7/tests/bootstrap.php	(revision 5534)
@@ -0,0 +1,11 @@
+<?php
+namespace GuzzleHttp\Tests\Psr7;
+
+require __DIR__ . '/../vendor/autoload.php';
+
+class HasToString
+{
+    public function __toString() {
+        return 'foo';
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/LICENSE	(revision 5534)
@@ -0,0 +1,19 @@
+Copyright (c) 2014 PHP Framework Interoperability Group
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights 
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
+copies of the Software, and to permit persons to whom the Software is 
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in 
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/README.md	(revision 5534)
@@ -0,0 +1,13 @@
+PSR Http Message
+================
+
+This repository holds all interfaces/classes/traits related to
+[PSR-7](http://www.php-fig.org/psr/psr-7/).
+
+Note that this is not a HTTP message implementation of its own. It is merely an
+interface that describes a HTTP message. See the specification for more details.
+
+Usage
+-----
+
+We'll certainly need some stuff in here.
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/composer.json	(revision 5534)
@@ -0,0 +1,25 @@
+{
+    "name": "psr/http-message",
+    "description": "Common interface for HTTP messages",
+    "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"],
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "PHP-FIG",
+            "homepage": "http://www.php-fig.org/"
+        }
+    ],
+    "require": {
+        "php": ">=5.3.0"
+    },
+    "autoload": {
+        "psr-4": {
+            "Psr\\Http\\Message\\": "src/"
+        }
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "1.0.x-dev"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/MessageInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/MessageInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/MessageInterface.php	(revision 5534)
@@ -0,0 +1,187 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * HTTP messages consist of requests from a client to a server and responses
+ * from a server to a client. This interface defines the methods common to
+ * each.
+ *
+ * Messages are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ *
+ * @link http://www.ietf.org/rfc/rfc7230.txt
+ * @link http://www.ietf.org/rfc/rfc7231.txt
+ */
+interface MessageInterface
+{
+    /**
+     * Retrieves the HTTP protocol version as a string.
+     *
+     * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
+     *
+     * @return string HTTP protocol version.
+     */
+    public function getProtocolVersion();
+
+    /**
+     * Return an instance with the specified HTTP protocol version.
+     *
+     * The version string MUST contain only the HTTP version number (e.g.,
+     * "1.1", "1.0").
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * new protocol version.
+     *
+     * @param string $version HTTP protocol version
+     * @return self
+     */
+    public function withProtocolVersion($version);
+
+    /**
+     * Retrieves all message header values.
+     *
+     * The keys represent the header name as it will be sent over the wire, and
+     * each value is an array of strings associated with the header.
+     *
+     *     // Represent the headers as a string
+     *     foreach ($message->getHeaders() as $name => $values) {
+     *         echo $name . ": " . implode(", ", $values);
+     *     }
+     *
+     *     // Emit headers iteratively:
+     *     foreach ($message->getHeaders() as $name => $values) {
+     *         foreach ($values as $value) {
+     *             header(sprintf('%s: %s', $name, $value), false);
+     *         }
+     *     }
+     *
+     * While header names are not case-sensitive, getHeaders() will preserve the
+     * exact case in which headers were originally specified.
+     *
+     * @return array Returns an associative array of the message's headers. Each
+     *     key MUST be a header name, and each value MUST be an array of strings
+     *     for that header.
+     */
+    public function getHeaders();
+
+    /**
+     * Checks if a header exists by the given case-insensitive name.
+     *
+     * @param string $name Case-insensitive header field name.
+     * @return bool Returns true if any header names match the given header
+     *     name using a case-insensitive string comparison. Returns false if
+     *     no matching header name is found in the message.
+     */
+    public function hasHeader($name);
+
+    /**
+     * Retrieves a message header value by the given case-insensitive name.
+     *
+     * This method returns an array of all the header values of the given
+     * case-insensitive header name.
+     *
+     * If the header does not appear in the message, this method MUST return an
+     * empty array.
+     *
+     * @param string $name Case-insensitive header field name.
+     * @return string[] An array of string values as provided for the given
+     *    header. If the header does not appear in the message, this method MUST
+     *    return an empty array.
+     */
+    public function getHeader($name);
+
+    /**
+     * Retrieves a comma-separated string of the values for a single header.
+     *
+     * This method returns all of the header values of the given
+     * case-insensitive header name as a string concatenated together using
+     * a comma.
+     *
+     * NOTE: Not all header values may be appropriately represented using
+     * comma concatenation. For such headers, use getHeader() instead
+     * and supply your own delimiter when concatenating.
+     *
+     * If the header does not appear in the message, this method MUST return
+     * an empty string.
+     *
+     * @param string $name Case-insensitive header field name.
+     * @return string A string of values as provided for the given header
+     *    concatenated together using a comma. If the header does not appear in
+     *    the message, this method MUST return an empty string.
+     */
+    public function getHeaderLine($name);
+
+    /**
+     * Return an instance with the provided value replacing the specified header.
+     *
+     * While header names are case-insensitive, the casing of the header will
+     * be preserved by this function, and returned from getHeaders().
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * new and/or updated header and value.
+     *
+     * @param string $name Case-insensitive header field name.
+     * @param string|string[] $value Header value(s).
+     * @return self
+     * @throws \InvalidArgumentException for invalid header names or values.
+     */
+    public function withHeader($name, $value);
+
+    /**
+     * Return an instance with the specified header appended with the given value.
+     *
+     * Existing values for the specified header will be maintained. The new
+     * value(s) will be appended to the existing list. If the header did not
+     * exist previously, it will be added.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * new header and/or value.
+     *
+     * @param string $name Case-insensitive header field name to add.
+     * @param string|string[] $value Header value(s).
+     * @return self
+     * @throws \InvalidArgumentException for invalid header names or values.
+     */
+    public function withAddedHeader($name, $value);
+
+    /**
+     * Return an instance without the specified header.
+     *
+     * Header resolution MUST be done without case-sensitivity.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that removes
+     * the named header.
+     *
+     * @param string $name Case-insensitive header field name to remove.
+     * @return self
+     */
+    public function withoutHeader($name);
+
+    /**
+     * Gets the body of the message.
+     *
+     * @return StreamInterface Returns the body as a stream.
+     */
+    public function getBody();
+
+    /**
+     * Return an instance with the specified message body.
+     *
+     * The body MUST be a StreamInterface object.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return a new instance that has the
+     * new body stream.
+     *
+     * @param StreamInterface $body Body.
+     * @return self
+     * @throws \InvalidArgumentException When the body is not valid.
+     */
+    public function withBody(StreamInterface $body);
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/RequestInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/RequestInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/RequestInterface.php	(revision 5534)
@@ -0,0 +1,129 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Representation of an outgoing, client-side request.
+ *
+ * Per the HTTP specification, this interface includes properties for
+ * each of the following:
+ *
+ * - Protocol version
+ * - HTTP method
+ * - URI
+ * - Headers
+ * - Message body
+ *
+ * During construction, implementations MUST attempt to set the Host header from
+ * a provided URI if no Host header is provided.
+ *
+ * Requests are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ */
+interface RequestInterface extends MessageInterface
+{
+    /**
+     * Retrieves the message's request target.
+     *
+     * Retrieves the message's request-target either as it will appear (for
+     * clients), as it appeared at request (for servers), or as it was
+     * specified for the instance (see withRequestTarget()).
+     *
+     * In most cases, this will be the origin-form of the composed URI,
+     * unless a value was provided to the concrete implementation (see
+     * withRequestTarget() below).
+     *
+     * If no URI is available, and no request-target has been specifically
+     * provided, this method MUST return the string "/".
+     *
+     * @return string
+     */
+    public function getRequestTarget();
+
+    /**
+     * Return an instance with the specific request-target.
+     *
+     * If the request needs a non-origin-form request-target â e.g., for
+     * specifying an absolute-form, authority-form, or asterisk-form â
+     * this method may be used to create an instance with the specified
+     * request-target, verbatim.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * changed request target.
+     *
+     * @link http://tools.ietf.org/html/rfc7230#section-2.7 (for the various
+     *     request-target forms allowed in request messages)
+     * @param mixed $requestTarget
+     * @return self
+     */
+    public function withRequestTarget($requestTarget);
+
+    /**
+     * Retrieves the HTTP method of the request.
+     *
+     * @return string Returns the request method.
+     */
+    public function getMethod();
+
+    /**
+     * Return an instance with the provided HTTP method.
+     *
+     * While HTTP method names are typically all uppercase characters, HTTP
+     * method names are case-sensitive and thus implementations SHOULD NOT
+     * modify the given string.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * changed request method.
+     *
+     * @param string $method Case-sensitive method.
+     * @return self
+     * @throws \InvalidArgumentException for invalid HTTP methods.
+     */
+    public function withMethod($method);
+
+    /**
+     * Retrieves the URI instance.
+     *
+     * This method MUST return a UriInterface instance.
+     *
+     * @link http://tools.ietf.org/html/rfc3986#section-4.3
+     * @return UriInterface Returns a UriInterface instance
+     *     representing the URI of the request.
+     */
+    public function getUri();
+
+    /**
+     * Returns an instance with the provided URI.
+     *
+     * This method MUST update the Host header of the returned request by
+     * default if the URI contains a host component. If the URI does not
+     * contain a host component, any pre-existing Host header MUST be carried
+     * over to the returned request.
+     *
+     * You can opt-in to preserving the original state of the Host header by
+     * setting `$preserveHost` to `true`. When `$preserveHost` is set to
+     * `true`, this method interacts with the Host header in the following ways:
+     *
+     * - If the the Host header is missing or empty, and the new URI contains
+     *   a host component, this method MUST update the Host header in the returned
+     *   request.
+     * - If the Host header is missing or empty, and the new URI does not contain a
+     *   host component, this method MUST NOT update the Host header in the returned
+     *   request.
+     * - If a Host header is present and non-empty, this method MUST NOT update
+     *   the Host header in the returned request.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * new UriInterface instance.
+     *
+     * @link http://tools.ietf.org/html/rfc3986#section-4.3
+     * @param UriInterface $uri New request URI to use.
+     * @param bool $preserveHost Preserve the original state of the Host header.
+     * @return self
+     */
+    public function withUri(UriInterface $uri, $preserveHost = false);
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/ResponseInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/ResponseInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/ResponseInterface.php	(revision 5534)
@@ -0,0 +1,68 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Representation of an outgoing, server-side response.
+ *
+ * Per the HTTP specification, this interface includes properties for
+ * each of the following:
+ *
+ * - Protocol version
+ * - Status code and reason phrase
+ * - Headers
+ * - Message body
+ *
+ * Responses are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ */
+interface ResponseInterface extends MessageInterface
+{
+    /**
+     * Gets the response status code.
+     *
+     * The status code is a 3-digit integer result code of the server's attempt
+     * to understand and satisfy the request.
+     *
+     * @return int Status code.
+     */
+    public function getStatusCode();
+
+    /**
+     * Return an instance with the specified status code and, optionally, reason phrase.
+     *
+     * If no reason phrase is specified, implementations MAY choose to default
+     * to the RFC 7231 or IANA recommended reason phrase for the response's
+     * status code.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * updated status and reason phrase.
+     *
+     * @link http://tools.ietf.org/html/rfc7231#section-6
+     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
+     * @param int $code The 3-digit integer result code to set.
+     * @param string $reasonPhrase The reason phrase to use with the
+     *     provided status code; if none is provided, implementations MAY
+     *     use the defaults as suggested in the HTTP specification.
+     * @return self
+     * @throws \InvalidArgumentException For invalid status code arguments.
+     */
+    public function withStatus($code, $reasonPhrase = '');
+
+    /**
+     * Gets the response reason phrase associated with the status code.
+     *
+     * Because a reason phrase is not a required element in a response
+     * status line, the reason phrase value MAY be null. Implementations MAY
+     * choose to return the default RFC 7231 recommended reason phrase (or those
+     * listed in the IANA HTTP Status Code Registry) for the response's
+     * status code.
+     *
+     * @link http://tools.ietf.org/html/rfc7231#section-6
+     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
+     * @return string Reason phrase; must return an empty string if none present.
+     */
+    public function getReasonPhrase();
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/ServerRequestInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/ServerRequestInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/ServerRequestInterface.php	(revision 5534)
@@ -0,0 +1,261 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Representation of an incoming, server-side HTTP request.
+ *
+ * Per the HTTP specification, this interface includes properties for
+ * each of the following:
+ *
+ * - Protocol version
+ * - HTTP method
+ * - URI
+ * - Headers
+ * - Message body
+ *
+ * Additionally, it encapsulates all data as it has arrived to the
+ * application from the CGI and/or PHP environment, including:
+ *
+ * - The values represented in $_SERVER.
+ * - Any cookies provided (generally via $_COOKIE)
+ * - Query string arguments (generally via $_GET, or as parsed via parse_str())
+ * - Upload files, if any (as represented by $_FILES)
+ * - Deserialized body parameters (generally from $_POST)
+ *
+ * $_SERVER values MUST be treated as immutable, as they represent application
+ * state at the time of request; as such, no methods are provided to allow
+ * modification of those values. The other values provide such methods, as they
+ * can be restored from $_SERVER or the request body, and may need treatment
+ * during the application (e.g., body parameters may be deserialized based on
+ * content type).
+ *
+ * Additionally, this interface recognizes the utility of introspecting a
+ * request to derive and match additional parameters (e.g., via URI path
+ * matching, decrypting cookie values, deserializing non-form-encoded body
+ * content, matching authorization headers to users, etc). These parameters
+ * are stored in an "attributes" property.
+ *
+ * Requests are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ */
+interface ServerRequestInterface extends RequestInterface
+{
+    /**
+     * Retrieve server parameters.
+     *
+     * Retrieves data related to the incoming request environment,
+     * typically derived from PHP's $_SERVER superglobal. The data IS NOT
+     * REQUIRED to originate from $_SERVER.
+     *
+     * @return array
+     */
+    public function getServerParams();
+
+    /**
+     * Retrieve cookies.
+     *
+     * Retrieves cookies sent by the client to the server.
+     *
+     * The data MUST be compatible with the structure of the $_COOKIE
+     * superglobal.
+     *
+     * @return array
+     */
+    public function getCookieParams();
+
+    /**
+     * Return an instance with the specified cookies.
+     *
+     * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST
+     * be compatible with the structure of $_COOKIE. Typically, this data will
+     * be injected at instantiation.
+     *
+     * This method MUST NOT update the related Cookie header of the request
+     * instance, nor related values in the server params.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * updated cookie values.
+     *
+     * @param array $cookies Array of key/value pairs representing cookies.
+     * @return self
+     */
+    public function withCookieParams(array $cookies);
+
+    /**
+     * Retrieve query string arguments.
+     *
+     * Retrieves the deserialized query string arguments, if any.
+     *
+     * Note: the query params might not be in sync with the URI or server
+     * params. If you need to ensure you are only getting the original
+     * values, you may need to parse the query string from `getUri()->getQuery()`
+     * or from the `QUERY_STRING` server param.
+     *
+     * @return array
+     */
+    public function getQueryParams();
+
+    /**
+     * Return an instance with the specified query string arguments.
+     *
+     * These values SHOULD remain immutable over the course of the incoming
+     * request. They MAY be injected during instantiation, such as from PHP's
+     * $_GET superglobal, or MAY be derived from some other value such as the
+     * URI. In cases where the arguments are parsed from the URI, the data
+     * MUST be compatible with what PHP's parse_str() would return for
+     * purposes of how duplicate query parameters are handled, and how nested
+     * sets are handled.
+     *
+     * Setting query string arguments MUST NOT change the URI stored by the
+     * request, nor the values in the server params.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * updated query string arguments.
+     *
+     * @param array $query Array of query string arguments, typically from
+     *     $_GET.
+     * @return self
+     */
+    public function withQueryParams(array $query);
+
+    /**
+     * Retrieve normalized file upload data.
+     *
+     * This method returns upload metadata in a normalized tree, with each leaf
+     * an instance of Psr\Http\Message\UploadedFileInterface.
+     *
+     * These values MAY be prepared from $_FILES or the message body during
+     * instantiation, or MAY be injected via withUploadedFiles().
+     *
+     * @return array An array tree of UploadedFileInterface instances; an empty
+     *     array MUST be returned if no data is present.
+     */
+    public function getUploadedFiles();
+
+    /**
+     * Create a new instance with the specified uploaded files.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * updated body parameters.
+     *
+     * @param array An array tree of UploadedFileInterface instances.
+     * @return self
+     * @throws \InvalidArgumentException if an invalid structure is provided.
+     */
+    public function withUploadedFiles(array $uploadedFiles);
+
+    /**
+     * Retrieve any parameters provided in the request body.
+     *
+     * If the request Content-Type is either application/x-www-form-urlencoded
+     * or multipart/form-data, and the request method is POST, this method MUST
+     * return the contents of $_POST.
+     *
+     * Otherwise, this method may return any results of deserializing
+     * the request body content; as parsing returns structured content, the
+     * potential types MUST be arrays or objects only. A null value indicates
+     * the absence of body content.
+     *
+     * @return null|array|object The deserialized body parameters, if any.
+     *     These will typically be an array or object.
+     */
+    public function getParsedBody();
+
+    /**
+     * Return an instance with the specified body parameters.
+     *
+     * These MAY be injected during instantiation.
+     *
+     * If the request Content-Type is either application/x-www-form-urlencoded
+     * or multipart/form-data, and the request method is POST, use this method
+     * ONLY to inject the contents of $_POST.
+     *
+     * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of
+     * deserializing the request body content. Deserialization/parsing returns
+     * structured data, and, as such, this method ONLY accepts arrays or objects,
+     * or a null value if nothing was available to parse.
+     *
+     * As an example, if content negotiation determines that the request data
+     * is a JSON payload, this method could be used to create a request
+     * instance with the deserialized parameters.
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * updated body parameters.
+     *
+     * @param null|array|object $data The deserialized body data. This will
+     *     typically be in an array or object.
+     * @return self
+     * @throws \InvalidArgumentException if an unsupported argument type is
+     *     provided.
+     */
+    public function withParsedBody($data);
+
+    /**
+     * Retrieve attributes derived from the request.
+     *
+     * The request "attributes" may be used to allow injection of any
+     * parameters derived from the request: e.g., the results of path
+     * match operations; the results of decrypting cookies; the results of
+     * deserializing non-form-encoded message bodies; etc. Attributes
+     * will be application and request specific, and CAN be mutable.
+     *
+     * @return array Attributes derived from the request.
+     */
+    public function getAttributes();
+
+    /**
+     * Retrieve a single derived request attribute.
+     *
+     * Retrieves a single derived request attribute as described in
+     * getAttributes(). If the attribute has not been previously set, returns
+     * the default value as provided.
+     *
+     * This method obviates the need for a hasAttribute() method, as it allows
+     * specifying a default value to return if the attribute is not found.
+     *
+     * @see getAttributes()
+     * @param string $name The attribute name.
+     * @param mixed $default Default value to return if the attribute does not exist.
+     * @return mixed
+     */
+    public function getAttribute($name, $default = null);
+
+    /**
+     * Return an instance with the specified derived request attribute.
+     *
+     * This method allows setting a single derived request attribute as
+     * described in getAttributes().
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that has the
+     * updated attribute.
+     *
+     * @see getAttributes()
+     * @param string $name The attribute name.
+     * @param mixed $value The value of the attribute.
+     * @return self
+     */
+    public function withAttribute($name, $value);
+
+    /**
+     * Return an instance that removes the specified derived request attribute.
+     *
+     * This method allows removing a single derived request attribute as
+     * described in getAttributes().
+     *
+     * This method MUST be implemented in such a way as to retain the
+     * immutability of the message, and MUST return an instance that removes
+     * the attribute.
+     *
+     * @see getAttributes()
+     * @param string $name The attribute name.
+     * @return self
+     */
+    public function withoutAttribute($name);
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/StreamInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/StreamInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/StreamInterface.php	(revision 5534)
@@ -0,0 +1,158 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Describes a data stream.
+ *
+ * Typically, an instance will wrap a PHP stream; this interface provides
+ * a wrapper around the most common operations, including serialization of
+ * the entire stream to a string.
+ */
+interface StreamInterface
+{
+    /**
+     * Reads all data from the stream into a string, from the beginning to end.
+     *
+     * This method MUST attempt to seek to the beginning of the stream before
+     * reading data and read the stream until the end is reached.
+     *
+     * Warning: This could attempt to load a large amount of data into memory.
+     *
+     * This method MUST NOT raise an exception in order to conform with PHP's
+     * string casting operations.
+     *
+     * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
+     * @return string
+     */
+    public function __toString();
+
+    /**
+     * Closes the stream and any underlying resources.
+     *
+     * @return void
+     */
+    public function close();
+
+    /**
+     * Separates any underlying resources from the stream.
+     *
+     * After the stream has been detached, the stream is in an unusable state.
+     *
+     * @return resource|null Underlying PHP stream, if any
+     */
+    public function detach();
+
+    /**
+     * Get the size of the stream if known.
+     *
+     * @return int|null Returns the size in bytes if known, or null if unknown.
+     */
+    public function getSize();
+
+    /**
+     * Returns the current position of the file read/write pointer
+     *
+     * @return int Position of the file pointer
+     * @throws \RuntimeException on error.
+     */
+    public function tell();
+
+    /**
+     * Returns true if the stream is at the end of the stream.
+     *
+     * @return bool
+     */
+    public function eof();
+
+    /**
+     * Returns whether or not the stream is seekable.
+     *
+     * @return bool
+     */
+    public function isSeekable();
+
+    /**
+     * Seek to a position in the stream.
+     *
+     * @link http://www.php.net/manual/en/function.fseek.php
+     * @param int $offset Stream offset
+     * @param int $whence Specifies how the cursor position will be calculated
+     *     based on the seek offset. Valid values are identical to the built-in
+     *     PHP $whence values for `fseek()`.  SEEK_SET: Set position equal to
+     *     offset bytes SEEK_CUR: Set position to current location plus offset
+     *     SEEK_END: Set position to end-of-stream plus offset.
+     * @throws \RuntimeException on failure.
+     */
+    public function seek($offset, $whence = SEEK_SET);
+
+    /**
+     * Seek to the beginning of the stream.
+     *
+     * If the stream is not seekable, this method will raise an exception;
+     * otherwise, it will perform a seek(0).
+     *
+     * @see seek()
+     * @link http://www.php.net/manual/en/function.fseek.php
+     * @throws \RuntimeException on failure.
+     */
+    public function rewind();
+
+    /**
+     * Returns whether or not the stream is writable.
+     *
+     * @return bool
+     */
+    public function isWritable();
+
+    /**
+     * Write data to the stream.
+     *
+     * @param string $string The string that is to be written.
+     * @return int Returns the number of bytes written to the stream.
+     * @throws \RuntimeException on failure.
+     */
+    public function write($string);
+
+    /**
+     * Returns whether or not the stream is readable.
+     *
+     * @return bool
+     */
+    public function isReadable();
+
+    /**
+     * Read data from the stream.
+     *
+     * @param int $length Read up to $length bytes from the object and return
+     *     them. Fewer than $length bytes may be returned if underlying stream
+     *     call returns fewer bytes.
+     * @return string Returns the data read from the stream, or an empty string
+     *     if no bytes are available.
+     * @throws \RuntimeException if an error occurs.
+     */
+    public function read($length);
+
+    /**
+     * Returns the remaining contents in a string
+     *
+     * @return string
+     * @throws \RuntimeException if unable to read or an error occurs while
+     *     reading.
+     */
+    public function getContents();
+
+    /**
+     * Get stream metadata as an associative array or retrieve a specific key.
+     *
+     * The keys returned are identical to the keys returned from PHP's
+     * stream_get_meta_data() function.
+     *
+     * @link http://php.net/manual/en/function.stream-get-meta-data.php
+     * @param string $key Specific metadata to retrieve.
+     * @return array|mixed|null Returns an associative array if no key is
+     *     provided. Returns a specific key value if a key is provided and the
+     *     value is found, or null if the key is not found.
+     */
+    public function getMetadata($key = null);
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/UploadedFileInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/UploadedFileInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/UploadedFileInterface.php	(revision 5534)
@@ -0,0 +1,123 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Value object representing a file uploaded through an HTTP request.
+ *
+ * Instances of this interface are considered immutable; all methods that
+ * might change state MUST be implemented such that they retain the internal
+ * state of the current instance and return an instance that contains the
+ * changed state.
+ */
+interface UploadedFileInterface
+{
+    /**
+     * Retrieve a stream representing the uploaded file.
+     *
+     * This method MUST return a StreamInterface instance, representing the
+     * uploaded file. The purpose of this method is to allow utilizing native PHP
+     * stream functionality to manipulate the file upload, such as
+     * stream_copy_to_stream() (though the result will need to be decorated in a
+     * native PHP stream wrapper to work with such functions).
+     *
+     * If the moveTo() method has been called previously, this method MUST raise
+     * an exception.
+     *
+     * @return StreamInterface Stream representation of the uploaded file.
+     * @throws \RuntimeException in cases when no stream is available or can be
+     *     created.
+     */
+    public function getStream();
+
+    /**
+     * Move the uploaded file to a new location.
+     *
+     * Use this method as an alternative to move_uploaded_file(). This method is
+     * guaranteed to work in both SAPI and non-SAPI environments.
+     * Implementations must determine which environment they are in, and use the
+     * appropriate method (move_uploaded_file(), rename(), or a stream
+     * operation) to perform the operation.
+     *
+     * $targetPath may be an absolute path, or a relative path. If it is a
+     * relative path, resolution should be the same as used by PHP's rename()
+     * function.
+     *
+     * The original file or stream MUST be removed on completion.
+     *
+     * If this method is called more than once, any subsequent calls MUST raise
+     * an exception.
+     *
+     * When used in an SAPI environment where $_FILES is populated, when writing
+     * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
+     * used to ensure permissions and upload status are verified correctly.
+     *
+     * If you wish to move to a stream, use getStream(), as SAPI operations
+     * cannot guarantee writing to stream destinations.
+     *
+     * @see http://php.net/is_uploaded_file
+     * @see http://php.net/move_uploaded_file
+     * @param string $targetPath Path to which to move the uploaded file.
+     * @throws \InvalidArgumentException if the $path specified is invalid.
+     * @throws \RuntimeException on any error during the move operation, or on
+     *     the second or subsequent call to the method.
+     */
+    public function moveTo($targetPath);
+    
+    /**
+     * Retrieve the file size.
+     *
+     * Implementations SHOULD return the value stored in the "size" key of
+     * the file in the $_FILES array if available, as PHP calculates this based
+     * on the actual size transmitted.
+     *
+     * @return int|null The file size in bytes or null if unknown.
+     */
+    public function getSize();
+    
+    /**
+     * Retrieve the error associated with the uploaded file.
+     *
+     * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
+     *
+     * If the file was uploaded successfully, this method MUST return
+     * UPLOAD_ERR_OK.
+     *
+     * Implementations SHOULD return the value stored in the "error" key of
+     * the file in the $_FILES array.
+     *
+     * @see http://php.net/manual/en/features.file-upload.errors.php
+     * @return int One of PHP's UPLOAD_ERR_XXX constants.
+     */
+    public function getError();
+    
+    /**
+     * Retrieve the filename sent by the client.
+     *
+     * Do not trust the value returned by this method. A client could send
+     * a malicious filename with the intention to corrupt or hack your
+     * application.
+     *
+     * Implementations SHOULD return the value stored in the "name" key of
+     * the file in the $_FILES array.
+     *
+     * @return string|null The filename sent by the client or null if none
+     *     was provided.
+     */
+    public function getClientFilename();
+    
+    /**
+     * Retrieve the media type sent by the client.
+     *
+     * Do not trust the value returned by this method. A client could send
+     * a malicious media type with the intention to corrupt or hack your
+     * application.
+     *
+     * Implementations SHOULD return the value stored in the "type" key of
+     * the file in the $_FILES array.
+     *
+     * @return string|null The media type sent by the client or null if none
+     *     was provided.
+     */
+    public function getClientMediaType();
+}
Index: /lib/shariff-backend-php-master/vendor/psr/http-message/src/UriInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/http-message/src/UriInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/http-message/src/UriInterface.php	(revision 5534)
@@ -0,0 +1,323 @@
+<?php
+namespace Psr\Http\Message;
+
+/**
+ * Value object representing a URI.
+ *
+ * This interface is meant to represent URIs according to RFC 3986 and to
+ * provide methods for most common operations. Additional functionality for
+ * working with URIs can be provided on top of the interface or externally.
+ * Its primary use is for HTTP requests, but may also be used in other
+ * contexts.
+ *
+ * Instances of this interface are considered immutable; all methods that
+ * might change state MUST be implemented such that they retain the internal
+ * state of the current instance and return an instance that contains the
+ * changed state.
+ *
+ * Typically the Host header will be also be present in the request message.
+ * For server-side requests, the scheme will typically be discoverable in the
+ * server parameters.
+ *
+ * @link http://tools.ietf.org/html/rfc3986 (the URI specification)
+ */
+interface UriInterface
+{
+    /**
+     * Retrieve the scheme component of the URI.
+     *
+     * If no scheme is present, this method MUST return an empty string.
+     *
+     * The value returned MUST be normalized to lowercase, per RFC 3986
+     * Section 3.1.
+     *
+     * The trailing ":" character is not part of the scheme and MUST NOT be
+     * added.
+     *
+     * @see https://tools.ietf.org/html/rfc3986#section-3.1
+     * @return string The URI scheme.
+     */
+    public function getScheme();
+
+    /**
+     * Retrieve the authority component of the URI.
+     *
+     * If no authority information is present, this method MUST return an empty
+     * string.
+     *
+     * The authority syntax of the URI is:
+     *
+     * <pre>
+     * [user-info@]host[:port]
+     * </pre>
+     *
+     * If the port component is not set or is the standard port for the current
+     * scheme, it SHOULD NOT be included.
+     *
+     * @see https://tools.ietf.org/html/rfc3986#section-3.2
+     * @return string The URI authority, in "[user-info@]host[:port]" format.
+     */
+    public function getAuthority();
+
+    /**
+     * Retrieve the user information component of the URI.
+     *
+     * If no user information is present, this method MUST return an empty
+     * string.
+     *
+     * If a user is present in the URI, this will return that value;
+     * additionally, if the password is also present, it will be appended to the
+     * user value, with a colon (":") separating the values.
+     *
+     * The trailing "@" character is not part of the user information and MUST
+     * NOT be added.
+     *
+     * @return string The URI user information, in "username[:password]" format.
+     */
+    public function getUserInfo();
+
+    /**
+     * Retrieve the host component of the URI.
+     *
+     * If no host is present, this method MUST return an empty string.
+     *
+     * The value returned MUST be normalized to lowercase, per RFC 3986
+     * Section 3.2.2.
+     *
+     * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
+     * @return string The URI host.
+     */
+    public function getHost();
+
+    /**
+     * Retrieve the port component of the URI.
+     *
+     * If a port is present, and it is non-standard for the current scheme,
+     * this method MUST return it as an integer. If the port is the standard port
+     * used with the current scheme, this method SHOULD return null.
+     *
+     * If no port is present, and no scheme is present, this method MUST return
+     * a null value.
+     *
+     * If no port is present, but a scheme is present, this method MAY return
+     * the standard port for that scheme, but SHOULD return null.
+     *
+     * @return null|int The URI port.
+     */
+    public function getPort();
+
+    /**
+     * Retrieve the path component of the URI.
+     *
+     * The path can either be empty or absolute (starting with a slash) or
+     * rootless (not starting with a slash). Implementations MUST support all
+     * three syntaxes.
+     *
+     * Normally, the empty path "" and absolute path "/" are considered equal as
+     * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically
+     * do this normalization because in contexts with a trimmed base path, e.g.
+     * the front controller, this difference becomes significant. It's the task
+     * of the user to handle both "" and "/".
+     *
+     * The value returned MUST be percent-encoded, but MUST NOT double-encode
+     * any characters. To determine what characters to encode, please refer to
+     * RFC 3986, Sections 2 and 3.3.
+     *
+     * As an example, if the value should include a slash ("/") not intended as
+     * delimiter between path segments, that value MUST be passed in encoded
+     * form (e.g., "%2F") to the instance.
+     *
+     * @see https://tools.ietf.org/html/rfc3986#section-2
+     * @see https://tools.ietf.org/html/rfc3986#section-3.3
+     * @return string The URI path.
+     */
+    public function getPath();
+
+    /**
+     * Retrieve the query string of the URI.
+     *
+     * If no query string is present, this method MUST return an empty string.
+     *
+     * The leading "?" character is not part of the query and MUST NOT be
+     * added.
+     *
+     * The value returned MUST be percent-encoded, but MUST NOT double-encode
+     * any characters. To determine what characters to encode, please refer to
+     * RFC 3986, Sections 2 and 3.4.
+     *
+     * As an example, if a value in a key/value pair of the query string should
+     * include an ampersand ("&") not intended as a delimiter between values,
+     * that value MUST be passed in encoded form (e.g., "%26") to the instance.
+     *
+     * @see https://tools.ietf.org/html/rfc3986#section-2
+     * @see https://tools.ietf.org/html/rfc3986#section-3.4
+     * @return string The URI query string.
+     */
+    public function getQuery();
+
+    /**
+     * Retrieve the fragment component of the URI.
+     *
+     * If no fragment is present, this method MUST return an empty string.
+     *
+     * The leading "#" character is not part of the fragment and MUST NOT be
+     * added.
+     *
+     * The value returned MUST be percent-encoded, but MUST NOT double-encode
+     * any characters. To determine what characters to encode, please refer to
+     * RFC 3986, Sections 2 and 3.5.
+     *
+     * @see https://tools.ietf.org/html/rfc3986#section-2
+     * @see https://tools.ietf.org/html/rfc3986#section-3.5
+     * @return string The URI fragment.
+     */
+    public function getFragment();
+
+    /**
+     * Return an instance with the specified scheme.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified scheme.
+     *
+     * Implementations MUST support the schemes "http" and "https" case
+     * insensitively, and MAY accommodate other schemes if required.
+     *
+     * An empty scheme is equivalent to removing the scheme.
+     *
+     * @param string $scheme The scheme to use with the new instance.
+     * @return self A new instance with the specified scheme.
+     * @throws \InvalidArgumentException for invalid or unsupported schemes.
+     */
+    public function withScheme($scheme);
+
+    /**
+     * Return an instance with the specified user information.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified user information.
+     *
+     * Password is optional, but the user information MUST include the
+     * user; an empty string for the user is equivalent to removing user
+     * information.
+     *
+     * @param string $user The user name to use for authority.
+     * @param null|string $password The password associated with $user.
+     * @return self A new instance with the specified user information.
+     */
+    public function withUserInfo($user, $password = null);
+
+    /**
+     * Return an instance with the specified host.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified host.
+     *
+     * An empty host value is equivalent to removing the host.
+     *
+     * @param string $host The hostname to use with the new instance.
+     * @return self A new instance with the specified host.
+     * @throws \InvalidArgumentException for invalid hostnames.
+     */
+    public function withHost($host);
+
+    /**
+     * Return an instance with the specified port.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified port.
+     *
+     * Implementations MUST raise an exception for ports outside the
+     * established TCP and UDP port ranges.
+     *
+     * A null value provided for the port is equivalent to removing the port
+     * information.
+     *
+     * @param null|int $port The port to use with the new instance; a null value
+     *     removes the port information.
+     * @return self A new instance with the specified port.
+     * @throws \InvalidArgumentException for invalid ports.
+     */
+    public function withPort($port);
+
+    /**
+     * Return an instance with the specified path.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified path.
+     *
+     * The path can either be empty or absolute (starting with a slash) or
+     * rootless (not starting with a slash). Implementations MUST support all
+     * three syntaxes.
+     *
+     * If the path is intended to be domain-relative rather than path relative then
+     * it must begin with a slash ("/"). Paths not starting with a slash ("/")
+     * are assumed to be relative to some base path known to the application or
+     * consumer.
+     *
+     * Users can provide both encoded and decoded path characters.
+     * Implementations ensure the correct encoding as outlined in getPath().
+     *
+     * @param string $path The path to use with the new instance.
+     * @return self A new instance with the specified path.
+     * @throws \InvalidArgumentException for invalid paths.
+     */
+    public function withPath($path);
+
+    /**
+     * Return an instance with the specified query string.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified query string.
+     *
+     * Users can provide both encoded and decoded query characters.
+     * Implementations ensure the correct encoding as outlined in getQuery().
+     *
+     * An empty query string value is equivalent to removing the query string.
+     *
+     * @param string $query The query string to use with the new instance.
+     * @return self A new instance with the specified query string.
+     * @throws \InvalidArgumentException for invalid query strings.
+     */
+    public function withQuery($query);
+
+    /**
+     * Return an instance with the specified URI fragment.
+     *
+     * This method MUST retain the state of the current instance, and return
+     * an instance that contains the specified URI fragment.
+     *
+     * Users can provide both encoded and decoded fragment characters.
+     * Implementations ensure the correct encoding as outlined in getFragment().
+     *
+     * An empty fragment value is equivalent to removing the fragment.
+     *
+     * @param string $fragment The fragment to use with the new instance.
+     * @return self A new instance with the specified fragment.
+     */
+    public function withFragment($fragment);
+
+    /**
+     * Return the string representation as a URI reference.
+     *
+     * Depending on which components of the URI are present, the resulting
+     * string is either a full URI or relative reference according to RFC 3986,
+     * Section 4.1. The method concatenates the various components of the URI,
+     * using the appropriate delimiters:
+     *
+     * - If a scheme is present, it MUST be suffixed by ":".
+     * - If an authority is present, it MUST be prefixed by "//".
+     * - The path can be concatenated without delimiters. But there are two
+     *   cases where the path has to be adjusted to make the URI reference
+     *   valid as PHP does not allow to throw an exception in __toString():
+     *     - If the path is rootless and an authority is present, the path MUST
+     *       be prefixed by "/".
+     *     - If the path is starting with more than one "/" and no authority is
+     *       present, the starting slashes MUST be reduced to one.
+     * - If a query is present, it MUST be prefixed by "?".
+     * - If a fragment is present, it MUST be prefixed by "#".
+     *
+     * @see http://tools.ietf.org/html/rfc3986#section-4.1
+     * @return string
+     */
+    public function __toString();
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/.gitignore
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/.gitignore	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/.gitignore	(revision 5534)
@@ -0,0 +1,1 @@
+vendor
Index: /lib/shariff-backend-php-master/vendor/psr/log/LICENSE
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/LICENSE	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/LICENSE	(revision 5534)
@@ -0,0 +1,19 @@
+Copyright (c) 2012 PHP Framework Interoperability Group
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights 
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
+copies of the Software, and to permit persons to whom the Software is 
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in 
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/AbstractLogger.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/AbstractLogger.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/AbstractLogger.php	(revision 5534)
@@ -0,0 +1,120 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * This is a simple Logger implementation that other Loggers can inherit from.
+ *
+ * It simply delegates all log-level-specific methods to the `log` method to
+ * reduce boilerplate code that a simple Logger that does the same thing with
+ * messages regardless of the error level has to implement.
+ */
+abstract class AbstractLogger implements LoggerInterface
+{
+    /**
+     * System is unusable.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function emergency($message, array $context = array())
+    {
+        $this->log(LogLevel::EMERGENCY, $message, $context);
+    }
+
+    /**
+     * Action must be taken immediately.
+     *
+     * Example: Entire website down, database unavailable, etc. This should
+     * trigger the SMS alerts and wake you up.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function alert($message, array $context = array())
+    {
+        $this->log(LogLevel::ALERT, $message, $context);
+    }
+
+    /**
+     * Critical conditions.
+     *
+     * Example: Application component unavailable, unexpected exception.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function critical($message, array $context = array())
+    {
+        $this->log(LogLevel::CRITICAL, $message, $context);
+    }
+
+    /**
+     * Runtime errors that do not require immediate action but should typically
+     * be logged and monitored.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function error($message, array $context = array())
+    {
+        $this->log(LogLevel::ERROR, $message, $context);
+    }
+
+    /**
+     * Exceptional occurrences that are not errors.
+     *
+     * Example: Use of deprecated APIs, poor use of an API, undesirable things
+     * that are not necessarily wrong.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function warning($message, array $context = array())
+    {
+        $this->log(LogLevel::WARNING, $message, $context);
+    }
+
+    /**
+     * Normal but significant events.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function notice($message, array $context = array())
+    {
+        $this->log(LogLevel::NOTICE, $message, $context);
+    }
+
+    /**
+     * Interesting events.
+     *
+     * Example: User logs in, SQL logs.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function info($message, array $context = array())
+    {
+        $this->log(LogLevel::INFO, $message, $context);
+    }
+
+    /**
+     * Detailed debug information.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function debug($message, array $context = array())
+    {
+        $this->log(LogLevel::DEBUG, $message, $context);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,7 @@
+<?php
+
+namespace Psr\Log;
+
+class InvalidArgumentException extends \InvalidArgumentException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LogLevel.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LogLevel.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LogLevel.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * Describes log levels
+ */
+class LogLevel
+{
+    const EMERGENCY = 'emergency';
+    const ALERT = 'alert';
+    const CRITICAL = 'critical';
+    const ERROR = 'error';
+    const WARNING = 'warning';
+    const NOTICE = 'notice';
+    const INFO = 'info';
+    const DEBUG = 'debug';
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerAwareInterface.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * Describes a logger-aware instance
+ */
+interface LoggerAwareInterface
+{
+    /**
+     * Sets a logger instance on the object
+     *
+     * @param LoggerInterface $logger
+     * @return null
+     */
+    public function setLogger(LoggerInterface $logger);
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerAwareTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerAwareTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerAwareTrait.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * Basic Implementation of LoggerAwareInterface.
+ */
+trait LoggerAwareTrait
+{
+    /** @var LoggerInterface */
+    protected $logger;
+
+    /**
+     * Sets a logger.
+     * 
+     * @param LoggerInterface $logger
+     */
+    public function setLogger(LoggerInterface $logger)
+    {
+        $this->logger = $logger;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerInterface.php	(revision 5534)
@@ -0,0 +1,114 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * Describes a logger instance
+ *
+ * The message MUST be a string or object implementing __toString().
+ *
+ * The message MAY contain placeholders in the form: {foo} where foo
+ * will be replaced by the context data in key "foo".
+ *
+ * The context array can contain arbitrary data, the only assumption that
+ * can be made by implementors is that if an Exception instance is given
+ * to produce a stack trace, it MUST be in a key named "exception".
+ *
+ * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
+ * for the full interface specification.
+ */
+interface LoggerInterface
+{
+    /**
+     * System is unusable.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function emergency($message, array $context = array());
+
+    /**
+     * Action must be taken immediately.
+     *
+     * Example: Entire website down, database unavailable, etc. This should
+     * trigger the SMS alerts and wake you up.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function alert($message, array $context = array());
+
+    /**
+     * Critical conditions.
+     *
+     * Example: Application component unavailable, unexpected exception.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function critical($message, array $context = array());
+
+    /**
+     * Runtime errors that do not require immediate action but should typically
+     * be logged and monitored.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function error($message, array $context = array());
+
+    /**
+     * Exceptional occurrences that are not errors.
+     *
+     * Example: Use of deprecated APIs, poor use of an API, undesirable things
+     * that are not necessarily wrong.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function warning($message, array $context = array());
+
+    /**
+     * Normal but significant events.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function notice($message, array $context = array());
+
+    /**
+     * Interesting events.
+     *
+     * Example: User logs in, SQL logs.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function info($message, array $context = array());
+
+    /**
+     * Detailed debug information.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function debug($message, array $context = array());
+
+    /**
+     * Logs with an arbitrary level.
+     *
+     * @param mixed $level
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function log($level, $message, array $context = array());
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/LoggerTrait.php	(revision 5534)
@@ -0,0 +1,131 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * This is a simple Logger trait that classes unable to extend AbstractLogger
+ * (because they extend another class, etc) can include.
+ *
+ * It simply delegates all log-level-specific methods to the `log` method to 
+ * reduce boilerplate code that a simple Logger that does the same thing with 
+ * messages regardless of the error level has to implement.
+ */
+trait LoggerTrait
+{
+    /**
+     * System is unusable.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function emergency($message, array $context = array())
+    {
+        $this->log(LogLevel::EMERGENCY, $message, $context);
+    }
+
+    /**
+     * Action must be taken immediately.
+     *
+     * Example: Entire website down, database unavailable, etc. This should
+     * trigger the SMS alerts and wake you up.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function alert($message, array $context = array())
+    {
+        $this->log(LogLevel::ALERT, $message, $context);
+    }
+
+    /**
+     * Critical conditions.
+     *
+     * Example: Application component unavailable, unexpected exception.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function critical($message, array $context = array())
+    {
+        $this->log(LogLevel::CRITICAL, $message, $context);
+    }
+
+    /**
+     * Runtime errors that do not require immediate action but should typically
+     * be logged and monitored.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function error($message, array $context = array())
+    {
+        $this->log(LogLevel::ERROR, $message, $context);
+    }
+
+    /**
+     * Exceptional occurrences that are not errors.
+     *
+     * Example: Use of deprecated APIs, poor use of an API, undesirable things
+     * that are not necessarily wrong.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function warning($message, array $context = array())
+    {
+        $this->log(LogLevel::WARNING, $message, $context);
+    }
+
+    /**
+     * Normal but significant events.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function notice($message, array $context = array())
+    {
+        $this->log(LogLevel::NOTICE, $message, $context);
+    }
+
+    /**
+     * Interesting events.
+     *
+     * Example: User logs in, SQL logs.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function info($message, array $context = array())
+    {
+        $this->log(LogLevel::INFO, $message, $context);
+    }
+
+    /**
+     * Detailed debug information.
+     *
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function debug($message, array $context = array())
+    {
+        $this->log(LogLevel::DEBUG, $message, $context);
+    }
+
+    /**
+     * Logs with an arbitrary level.
+     *
+     * @param mixed $level
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    abstract public function log($level, $message, array $context = array());
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/NullLogger.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/NullLogger.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/NullLogger.php	(revision 5534)
@@ -0,0 +1,27 @@
+<?php
+
+namespace Psr\Log;
+
+/**
+ * This Logger can be used to avoid conditional log calls
+ *
+ * Logging should always be optional, and if no logger is provided to your
+ * library creating a NullLogger instance to have something to throw logs at
+ * is a good way to avoid littering your code with `if ($this->logger) { }`
+ * blocks.
+ */
+class NullLogger extends AbstractLogger
+{
+    /**
+     * Logs with an arbitrary level.
+     *
+     * @param mixed $level
+     * @param string $message
+     * @param array $context
+     * @return null
+     */
+    public function log($level, $message, array $context = array())
+    {
+        // noop
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php	(revision 5534)
@@ -0,0 +1,116 @@
+<?php
+
+namespace Psr\Log\Test;
+
+use Psr\Log\LogLevel;
+
+/**
+ * Provides a base test class for ensuring compliance with the LoggerInterface
+ *
+ * Implementors can extend the class and implement abstract methods to run this as part of their test suite
+ */
+abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @return LoggerInterface
+     */
+    abstract function getLogger();
+
+    /**
+     * This must return the log messages in order with a simple formatting: "<LOG LEVEL> <MESSAGE>"
+     *
+     * Example ->error('Foo') would yield "error Foo"
+     *
+     * @return string[]
+     */
+    abstract function getLogs();
+
+    public function testImplements()
+    {
+        $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger());
+    }
+
+    /**
+     * @dataProvider provideLevelsAndMessages
+     */
+    public function testLogsAtAllLevels($level, $message)
+    {
+        $logger = $this->getLogger();
+        $logger->{$level}($message, array('user' => 'Bob'));
+        $logger->log($level, $message, array('user' => 'Bob'));
+
+        $expected = array(
+            $level.' message of level '.$level.' with context: Bob',
+            $level.' message of level '.$level.' with context: Bob',
+        );
+        $this->assertEquals($expected, $this->getLogs());
+    }
+
+    public function provideLevelsAndMessages()
+    {
+        return array(
+            LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'),
+            LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'),
+            LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'),
+            LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'),
+            LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'),
+            LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'),
+            LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'),
+            LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'),
+        );
+    }
+
+    /**
+     * @expectedException Psr\Log\InvalidArgumentException
+     */
+    public function testThrowsOnInvalidLevel()
+    {
+        $logger = $this->getLogger();
+        $logger->log('invalid level', 'Foo');
+    }
+
+    public function testContextReplacement()
+    {
+        $logger = $this->getLogger();
+        $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar'));
+
+        $expected = array('info {Message {nothing} Bob Bar a}');
+        $this->assertEquals($expected, $this->getLogs());
+    }
+
+    public function testObjectCastToString()
+    {
+        $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
+        $dummy->expects($this->once())
+            ->method('__toString')
+            ->will($this->returnValue('DUMMY'));
+
+        $this->getLogger()->warning($dummy);
+    }
+
+    public function testContextCanContainAnything()
+    {
+        $context = array(
+            'bool' => true,
+            'null' => null,
+            'string' => 'Foo',
+            'int' => 0,
+            'float' => 0.5,
+            'nested' => array('with object' => new DummyTest),
+            'object' => new \DateTime,
+            'resource' => fopen('php://memory', 'r'),
+        );
+
+        $this->getLogger()->warning('Crazy context data', $context);
+    }
+
+    public function testContextExceptionKeyCanBeExceptionOrOtherValues()
+    {
+        $this->getLogger()->warning('Random message', array('exception' => 'oops'));
+        $this->getLogger()->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail')));
+    }
+}
+
+class DummyTest
+{
+}
Index: /lib/shariff-backend-php-master/vendor/psr/log/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/README.md	(revision 5534)
@@ -0,0 +1,45 @@
+PSR Log
+=======
+
+This repository holds all interfaces/classes/traits related to
+[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md).
+
+Note that this is not a logger of its own. It is merely an interface that
+describes a logger. See the specification for more details.
+
+Usage
+-----
+
+If you need a logger, you can use the interface like this:
+
+```php
+<?php
+
+use Psr\Log\LoggerInterface;
+
+class Foo
+{
+    private $logger;
+
+    public function __construct(LoggerInterface $logger = null)
+    {
+        $this->logger = $logger;
+    }
+
+    public function doSomething()
+    {
+        if ($this->logger) {
+            $this->logger->info('Doing work');
+        }
+
+        // do something useful
+    }
+}
+```
+
+You can then pick one of the implementations of the interface to get a logger.
+
+If you want to implement the interface, you can require this package and
+implement `Psr\Log\LoggerInterface` in your code. Please read the
+[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
+for details.
Index: /lib/shariff-backend-php-master/vendor/psr/log/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/psr/log/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/psr/log/composer.json	(revision 5534)
@@ -0,0 +1,17 @@
+{
+    "name": "psr/log",
+    "description": "Common interface for logging libraries",
+    "keywords": ["psr", "psr-3", "log"],
+    "license": "MIT",
+    "authors": [
+        {
+            "name": "PHP-FIG",
+            "homepage": "http://www.php-fig.org/"
+        }
+    ],
+    "autoload": {
+        "psr-0": {
+            "Psr\\Log\\": ""
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/.gitattributes
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/.gitattributes	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/.gitattributes	(revision 5534)
@@ -0,0 +1,10 @@
+/tests export-ignore
+/CodeSniffer/Standards/Generic/Tests export-ignore
+/CodeSniffer/Standards/MySource/Tests export-ignore
+/CodeSniffer/Standards/PEAR/Tests export-ignore
+/CodeSniffer/Standards/PSR1/Tests export-ignore
+/CodeSniffer/Standards/PSR2/Tests export-ignore
+/CodeSniffer/Standards/Squiz/Tests export-ignore
+/CodeSniffer/Standards/Zend/Tests export-ignore
+.travis.yml export-ignore
+package.xml export-ignore
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/.gitignore
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/.gitignore	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/.gitignore	(revision 5534)
@@ -0,0 +1,5 @@
+/CodeSniffer.conf
+/phpcs.xml
+/phpunit.xml
+.idea/*
+/vendor/
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,13 @@
+Contributing
+-------------
+
+Before you contribute code to PHP\_CodeSniffer, please make sure it conforms to the PHPCS coding standard and that the PHP\_CodeSniffer unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed PEAR version. If you do this, you can run the following commands to check if everything is ready to submit:
+
+    cd PHP_CodeSniffer
+    php scripts/phpcs . --standard=PHPCS -np
+
+Which should give you no output, indicating that there are no coding standard errors. And then:
+
+    phpunit
+
+Which should give you no failures or errors. You can ignore any skipped tests as these are for external tools.
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist	(revision 5534)
@@ -0,0 +1,9 @@
+<?php
+ $phpCodeSnifferConfig = array (
+  'default_standard' => 'PSR2',
+  'report_format' => 'summary',
+  'show_warnings' => '0',
+  'show_progress' => '1',
+  'report_width' => '120',
+)
+?>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer.php	(revision 5534)
@@ -0,0 +1,2516 @@
+<?php
+/**
+ * PHP_CodeSniffer tokenizes PHP code and detects violations of a
+ * defined set of coding standards.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+spl_autoload_register(array('PHP_CodeSniffer', 'autoload'));
+
+if (class_exists('PHP_CodeSniffer_Exception', true) === false) {
+    throw new Exception('Class PHP_CodeSniffer_Exception not found');
+}
+
+if (class_exists('PHP_CodeSniffer_File', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_File not found');
+}
+
+if (class_exists('PHP_CodeSniffer_Fixer', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Fixer not found');
+}
+
+if (class_exists('PHP_CodeSniffer_Tokens', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Tokens not found');
+}
+
+if (class_exists('PHP_CodeSniffer_CLI', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_CLI not found');
+}
+
+if (interface_exists('PHP_CodeSniffer_Sniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Interface PHP_CodeSniffer_Sniff not found');
+}
+
+/**
+ * PHP_CodeSniffer tokenizes PHP code and detects violations of a
+ * defined set of coding standards.
+ *
+ * Standards are specified by classes that implement the PHP_CodeSniffer_Sniff
+ * interface. A sniff registers what token types it wishes to listen for, then
+ * PHP_CodeSniffer encounters that token, the sniff is invoked and passed
+ * information about where the token was found in the stack, and the token stack
+ * itself.
+ *
+ * Sniff files and their containing class must be prefixed with Sniff, and
+ * have an extension of .php.
+ *
+ * Multiple PHP_CodeSniffer operations can be performed by re-calling the
+ * process function with different parameters.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer
+{
+
+    /**
+     * The current version.
+     *
+     * @var string
+     */
+    const VERSION = '2.5.1';
+
+    /**
+     * Package stability; either stable, beta or alpha.
+     *
+     * @var string
+     */
+    const STABILITY = 'stable';
+
+    /**
+     * The file or directory that is currently being processed.
+     *
+     * @var string
+     */
+    protected $file = '';
+
+    /**
+     * The directories that the processed rulesets are in.
+     *
+     * This is declared static because it is also used in the
+     * autoloader to look for sniffs outside the PHPCS install.
+     * This way, standards designed to be installed inside PHPCS can
+     * also be used from outside the PHPCS Standards directory.
+     *
+     * @var string
+     */
+    protected static $rulesetDirs = array();
+
+    /**
+     * The CLI object controlling the run.
+     *
+     * @var PHP_CodeSniffer_CLI
+     */
+    public $cli = null;
+
+    /**
+     * The Reporting object controlling report generation.
+     *
+     * @var PHP_CodeSniffer_Reporting
+     */
+    public $reporting = null;
+
+    /**
+     * An array of sniff objects that are being used to check files.
+     *
+     * @var array(PHP_CodeSniffer_Sniff)
+     */
+    protected $listeners = array();
+
+    /**
+     * An array of sniffs that are being used to check files.
+     *
+     * @var array(string)
+     */
+    protected $sniffs = array();
+
+    /**
+     * The listeners array, indexed by token type.
+     *
+     * @var array
+     */
+    private $_tokenListeners = array();
+
+    /**
+     * An array of rules from the ruleset.xml file.
+     *
+     * It may be empty, indicating that the ruleset does not override
+     * any of the default sniff settings.
+     *
+     * @var array
+     */
+    protected $ruleset = array();
+
+    /**
+     * An array of patterns to use for skipping files.
+     *
+     * @var array
+     */
+    protected $ignorePatterns = array();
+
+    /**
+     * An array of extensions for files we will check.
+     *
+     * @var array
+     */
+    public $allowedFileExtensions = array();
+
+    /**
+     * An array of default extensions and associated tokenizers.
+     *
+     * If no extensions are set, these will be used as the defaults.
+     * If extensions are set, these will be used when the correct tokenizer
+     * can not be determined, such as when checking a passed filename instead
+     * of files in a directory.
+     *
+     * @var array
+     */
+    public $defaultFileExtensions = array(
+                                     'php' => 'PHP',
+                                     'inc' => 'PHP',
+                                     'js'  => 'JS',
+                                     'css' => 'CSS',
+                                    );
+
+    /**
+     * An array of variable types for param/var we will check.
+     *
+     * @var array(string)
+     */
+    public static $allowedTypes = array(
+                                   'array',
+                                   'boolean',
+                                   'float',
+                                   'integer',
+                                   'mixed',
+                                   'object',
+                                   'string',
+                                   'resource',
+                                   'callable',
+                                  );
+
+
+    /**
+     * Constructs a PHP_CodeSniffer object.
+     *
+     * @param int    $verbosity   The verbosity level.
+     *                            1: Print progress information.
+     *                            2: Print tokenizer debug information.
+     *                            3: Print sniff debug information.
+     * @param int    $tabWidth    The number of spaces each tab represents.
+     *                            If greater than zero, tabs will be replaced
+     *                            by spaces before testing each file.
+     * @param string $encoding    The charset of the sniffed files.
+     *                            This is important for some reports that output
+     *                            with utf-8 encoding as you don't want it double
+     *                            encoding messages.
+     * @param bool   $interactive If TRUE, will stop after each file with errors
+     *                            and wait for user input.
+     *
+     * @see process()
+     */
+    public function __construct(
+        $verbosity=0,
+        $tabWidth=0,
+        $encoding='iso-8859-1',
+        $interactive=false
+    ) {
+        if ($verbosity !== null) {
+            $this->setVerbosity($verbosity);
+        }
+
+        if ($tabWidth !== null) {
+            $this->setTabWidth($tabWidth);
+        }
+
+        if ($encoding !== null) {
+            $this->setEncoding($encoding);
+        }
+
+        if ($interactive !== null) {
+            $this->setInteractive($interactive);
+        }
+
+        if (defined('PHPCS_DEFAULT_ERROR_SEV') === false) {
+            define('PHPCS_DEFAULT_ERROR_SEV', 5);
+        }
+
+        if (defined('PHPCS_DEFAULT_WARN_SEV') === false) {
+            define('PHPCS_DEFAULT_WARN_SEV', 5);
+        }
+
+        if (defined('PHP_CODESNIFFER_CBF') === false) {
+            define('PHP_CODESNIFFER_CBF', false);
+        }
+
+        // Set default CLI object in case someone is running us
+        // without using the command line script.
+        $this->cli = new PHP_CodeSniffer_CLI();
+        $this->cli->errorSeverity   = PHPCS_DEFAULT_ERROR_SEV;
+        $this->cli->warningSeverity = PHPCS_DEFAULT_WARN_SEV;
+        $this->cli->dieOnUnknownArg = false;
+
+        $this->reporting = new PHP_CodeSniffer_Reporting();
+
+    }//end __construct()
+
+
+    /**
+     * Autoload static method for loading classes and interfaces.
+     *
+     * @param string $className The name of the class or interface.
+     *
+     * @return void
+     */
+    public static function autoload($className)
+    {
+        if (substr($className, 0, 4) === 'PHP_') {
+            $newClassName = substr($className, 4);
+        } else {
+            $newClassName = $className;
+        }
+
+        $path = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $newClassName).'.php';
+
+        if (is_file(dirname(__FILE__).DIRECTORY_SEPARATOR.$path) === true) {
+            // Check standard file locations based on class name.
+            include dirname(__FILE__).DIRECTORY_SEPARATOR.$path;
+            return;
+        } else {
+            // Check for included sniffs.
+            $installedPaths = PHP_CodeSniffer::getInstalledStandardPaths();
+            foreach ($installedPaths as $installedPath) {
+                if (is_file($installedPath.DIRECTORY_SEPARATOR.$path) === true) {
+                    include $installedPath.DIRECTORY_SEPARATOR.$path;
+                    return;
+                }
+            }
+
+            // Check standard file locations based on the loaded rulesets.
+            foreach (self::$rulesetDirs as $rulesetDir) {
+                if (is_file(dirname($rulesetDir).DIRECTORY_SEPARATOR.$path) === true) {
+                    include_once dirname($rulesetDir).DIRECTORY_SEPARATOR.$path;
+                    return;
+                }
+            }
+        }//end if
+
+        // Everything else.
+        @include $path;
+
+    }//end autoload()
+
+
+    /**
+     * Sets the verbosity level.
+     *
+     * @param int $verbosity The verbosity level.
+     *                       1: Print progress information.
+     *                       2: Print tokenizer debug information.
+     *                       3: Print sniff debug information.
+     *
+     * @return void
+     */
+    public function setVerbosity($verbosity)
+    {
+        if (defined('PHP_CODESNIFFER_VERBOSITY') === false) {
+            define('PHP_CODESNIFFER_VERBOSITY', $verbosity);
+        }
+
+    }//end setVerbosity()
+
+
+    /**
+     * Sets the tab width.
+     *
+     * @param int $tabWidth The number of spaces each tab represents.
+     *                      If greater than zero, tabs will be replaced
+     *                      by spaces before testing each file.
+     *
+     * @return void
+     */
+    public function setTabWidth($tabWidth)
+    {
+        if (defined('PHP_CODESNIFFER_TAB_WIDTH') === false) {
+            define('PHP_CODESNIFFER_TAB_WIDTH', $tabWidth);
+        }
+
+    }//end setTabWidth()
+
+
+    /**
+     * Sets the encoding.
+     *
+     * @param string $encoding The charset of the sniffed files.
+     *                         This is important for some reports that output
+     *                         with utf-8 encoding as you don't want it double
+     *                         encoding messages.
+     *
+     * @return void
+     */
+    public function setEncoding($encoding)
+    {
+        if (defined('PHP_CODESNIFFER_ENCODING') === false) {
+            define('PHP_CODESNIFFER_ENCODING', $encoding);
+        }
+
+    }//end setEncoding()
+
+
+    /**
+     * Sets the interactive flag.
+     *
+     * @param bool $interactive If TRUE, will stop after each file with errors
+     *                          and wait for user input.
+     *
+     * @return void
+     */
+    public function setInteractive($interactive)
+    {
+        if (defined('PHP_CODESNIFFER_INTERACTIVE') === false) {
+            define('PHP_CODESNIFFER_INTERACTIVE', $interactive);
+        }
+
+    }//end setInteractive()
+
+
+    /**
+     * Sets an array of file extensions that we will allow checking of.
+     *
+     * If the extension is one of the defaults, a specific tokenizer
+     * will be used. Otherwise, the PHP tokenizer will be used for
+     * all extensions passed.
+     *
+     * @param array $extensions An array of file extensions.
+     *
+     * @return void
+     */
+    public function setAllowedFileExtensions(array $extensions)
+    {
+        $newExtensions = array();
+        foreach ($extensions as $ext) {
+            $slash = strpos($ext, '/');
+            if ($slash !== false) {
+                // They specified the tokenizer too.
+                list($ext, $tokenizer) = explode('/', $ext);
+                $newExtensions[$ext]   = strtoupper($tokenizer);
+                continue;
+            }
+
+            if (isset($this->allowedFileExtensions[$ext]) === true) {
+                $newExtensions[$ext] = $this->allowedFileExtensions[$ext];
+            } else if (isset($this->defaultFileExtensions[$ext]) === true) {
+                $newExtensions[$ext] = $this->defaultFileExtensions[$ext];
+            } else {
+                $newExtensions[$ext] = 'PHP';
+            }
+        }
+
+        $this->allowedFileExtensions = $newExtensions;
+
+    }//end setAllowedFileExtensions()
+
+
+    /**
+     * Sets an array of ignore patterns that we use to skip files and folders.
+     *
+     * Patterns are not case sensitive.
+     *
+     * @param array $patterns An array of ignore patterns. The pattern is the key
+     *                        and the value is either "absolute" or "relative",
+     *                        depending on how the pattern should be applied to a
+     *                        file path.
+     *
+     * @return void
+     */
+    public function setIgnorePatterns(array $patterns)
+    {
+        $this->ignorePatterns = $patterns;
+
+    }//end setIgnorePatterns()
+
+
+    /**
+     * Gets the array of ignore patterns.
+     *
+     * Optionally takes a listener to get ignore patterns specified
+     * for that sniff only.
+     *
+     * @param string $listener The listener to get patterns for. If NULL, all
+     *                         patterns are returned.
+     *
+     * @return array
+     */
+    public function getIgnorePatterns($listener=null)
+    {
+        if ($listener === null) {
+            return $this->ignorePatterns;
+        }
+
+        if (isset($this->ignorePatterns[$listener]) === true) {
+            return $this->ignorePatterns[$listener];
+        }
+
+        return array();
+
+    }//end getIgnorePatterns()
+
+
+    /**
+     * Sets the internal CLI object.
+     *
+     * @param object $cli The CLI object controlling the run.
+     *
+     * @return void
+     */
+    public function setCli($cli)
+    {
+        $this->cli = $cli;
+
+    }//end setCli()
+
+
+    /**
+     * Start a PHP_CodeSniffer run.
+     *
+     * @param string|array $files        The files and directories to process. For
+     *                                   directories, each sub directory will also
+     *                                   be traversed for source files.
+     * @param string|array $standards    The set of code sniffs we are testing
+     *                                   against.
+     * @param array        $restrictions The sniff codes to restrict the
+     *                                   violations to.
+     * @param boolean      $local        If true, don't recurse into directories.
+     *
+     * @return void
+     */
+    public function process($files, $standards, array $restrictions=array(), $local=false)
+    {
+        $files = (array) $files;
+        $this->initStandard($standards, $restrictions);
+        $this->processFiles($files, $local);
+
+    }//end process()
+
+
+    /**
+     * Initialise the standard that the run will use.
+     *
+     * @param string|array $standards    The set of code sniffs we are testing
+     *                                   against.
+     * @param array        $restrictions The sniff codes to restrict the
+     *
+     * @return void
+     */
+    public function initStandard($standards, array $restrictions=array())
+    {
+        $standards = (array) $standards;
+
+        // Reset the members.
+        $this->listeners       = array();
+        $this->sniffs          = array();
+        $this->ruleset         = array();
+        $this->_tokenListeners = array();
+        self::$rulesetDirs     = array();
+
+        // Ensure this option is enabled or else line endings will not always
+        // be detected properly for files created on a Mac with the /r line ending.
+        ini_set('auto_detect_line_endings', true);
+
+        $sniffs = array();
+        foreach ($standards as $standard) {
+            $installed = $this->getInstalledStandardPath($standard);
+            if ($installed !== null) {
+                $standard = $installed;
+            } else {
+                $standard = self::realpath($standard);
+                if (is_dir($standard) === true
+                    && is_file(self::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml')) === true
+                ) {
+                    $standard = self::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml');
+                }
+            }
+
+            if (PHP_CODESNIFFER_VERBOSITY === 1) {
+                $ruleset = simplexml_load_string(file_get_contents($standard));
+                if ($ruleset !== false) {
+                    $standardName = (string) $ruleset['name'];
+                }
+
+                echo "Registering sniffs in the $standardName standard... ";
+                if (count($standards) > 1 || PHP_CODESNIFFER_VERBOSITY > 2) {
+                    echo PHP_EOL;
+                }
+            }
+
+            $sniffs = array_merge($sniffs, $this->processRuleset($standard));
+        }//end foreach
+
+        $sniffRestrictions = array();
+        foreach ($restrictions as $sniffCode) {
+            $parts = explode('.', strtolower($sniffCode));
+            $sniffRestrictions[] = $parts[0].'_sniffs_'.$parts[1].'_'.$parts[2].'sniff';
+        }
+
+        $this->registerSniffs($sniffs, $sniffRestrictions);
+        $this->populateTokenListeners();
+
+        if (PHP_CODESNIFFER_VERBOSITY === 1) {
+            $numSniffs = count($this->sniffs);
+            echo "DONE ($numSniffs sniffs registered)".PHP_EOL;
+        }
+
+    }//end initStandard()
+
+
+    /**
+     * Processes the files/directories that PHP_CodeSniffer was constructed with.
+     *
+     * @param string|array $files The files and directories to process. For
+     *                            directories, each sub directory will also
+     *                            be traversed for source files.
+     * @param boolean      $local If true, don't recurse into directories.
+     *
+     * @return void
+     * @throws PHP_CodeSniffer_Exception If files are invalid.
+     */
+    public function processFiles($files, $local=false)
+    {
+        $files        = (array) $files;
+        $cliValues    = $this->cli->getCommandLineValues();
+        $showProgress = $cliValues['showProgress'];
+        $useColors    = $cliValues['colors'];
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'Creating file list... ';
+        }
+
+        if (empty($this->allowedFileExtensions) === true) {
+            $this->allowedFileExtensions = $this->defaultFileExtensions;
+        }
+
+        $todo     = $this->getFilesToProcess($files, $local);
+        $numFiles = count($todo);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo "DONE ($numFiles files in queue)".PHP_EOL;
+        }
+
+        $numProcessed = 0;
+        $dots         = 0;
+        $maxLength    = strlen($numFiles);
+        $lastDir      = '';
+        foreach ($todo as $file) {
+            $this->file = $file;
+            $currDir    = dirname($file);
+            if ($lastDir !== $currDir) {
+                if (PHP_CODESNIFFER_VERBOSITY > 0 || PHP_CODESNIFFER_CBF === true) {
+                    echo 'Changing into directory '.$currDir.PHP_EOL;
+                }
+
+                $lastDir = $currDir;
+            }
+
+            $phpcsFile = $this->processFile($file, null);
+            $numProcessed++;
+
+            if (PHP_CODESNIFFER_VERBOSITY > 0
+                || PHP_CODESNIFFER_INTERACTIVE === true
+                || $showProgress === false
+            ) {
+                continue;
+            }
+
+            // Show progress information.
+            if ($phpcsFile === null) {
+                echo 'S';
+            } else {
+                $errors   = $phpcsFile->getErrorCount();
+                $warnings = $phpcsFile->getWarningCount();
+                if ($errors > 0) {
+                    if ($useColors === true) {
+                        echo "\033[31m";
+                    }
+
+                    echo 'E';
+                } else if ($warnings > 0) {
+                    if ($useColors === true) {
+                        echo "\033[33m";
+                    }
+
+                    echo 'W';
+                } else {
+                    echo '.';
+                }
+
+                if ($useColors === true) {
+                    echo "\033[0m";
+                }
+            }//end if
+
+            $dots++;
+            if ($dots === 60) {
+                $padding = ($maxLength - strlen($numProcessed));
+                echo str_repeat(' ', $padding);
+                $percent = round(($numProcessed / $numFiles) * 100);
+                echo " $numProcessed / $numFiles ($percent%)".PHP_EOL;
+                $dots = 0;
+            }
+        }//end foreach
+
+        if (PHP_CODESNIFFER_VERBOSITY === 0
+            && PHP_CODESNIFFER_INTERACTIVE === false
+            && $showProgress === true
+        ) {
+            echo PHP_EOL.PHP_EOL;
+        }
+
+    }//end processFiles()
+
+
+    /**
+     * Processes a single ruleset and returns a list of the sniffs it represents.
+     *
+     * Rules founds within the ruleset are processed immediately, but sniff classes
+     * are not registered by this method.
+     *
+     * @param string $rulesetPath The path to a ruleset XML file.
+     * @param int    $depth       How many nested processing steps we are in. This
+     *                            is only used for debug output.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If the ruleset path is invalid.
+     */
+    public function processRuleset($rulesetPath, $depth=0)
+    {
+        $rulesetPath = self::realpath($rulesetPath);
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo str_repeat("\t", $depth);
+            echo "Processing ruleset $rulesetPath".PHP_EOL;
+        }
+
+        $ruleset = simplexml_load_string(file_get_contents($rulesetPath));
+        if ($ruleset === false) {
+            throw new PHP_CodeSniffer_Exception("Ruleset $rulesetPath is not valid");
+        }
+
+        $ownSniffs      = array();
+        $includedSniffs = array();
+        $excludedSniffs = array();
+        $cliValues      = $this->cli->getCommandLineValues();
+
+        $rulesetDir          = dirname($rulesetPath);
+        $rulesetName         = basename($rulesetPath);
+        self::$rulesetDirs[] = $rulesetDir;
+
+        if (is_dir($rulesetDir.DIRECTORY_SEPARATOR.'Sniffs') === true) {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\tAdding sniff files from \"/.../".basename($rulesetDir)."/Sniffs/\" directory".PHP_EOL;
+            }
+
+            $ownSniffs = $this->_expandSniffDirectory($rulesetDir.DIRECTORY_SEPARATOR.'Sniffs', $depth);
+        }
+
+        foreach ($ruleset->rule as $rule) {
+            if (isset($rule['ref']) === false
+                || $this->_shouldProcessElement($rule) === false
+            ) {
+                continue;
+            }
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\tProcessing rule \"".$rule['ref'].'"'.PHP_EOL;
+            }
+
+            $includedSniffs = array_merge(
+                $includedSniffs,
+                $this->_expandRulesetReference($rule['ref'], $rulesetDir, $depth)
+            );
+
+            if (isset($rule->exclude) === true) {
+                foreach ($rule->exclude as $exclude) {
+                    if ($this->_shouldProcessElement($exclude) === false) {
+                        continue;
+                    }
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo "\t\tExcluding rule \"".$exclude['name'].'"'.PHP_EOL;
+                    }
+
+                    // Check if a single code is being excluded, which is a shortcut
+                    // for setting the severity of the message to 0.
+                    $parts = explode('.', $exclude['name']);
+                    if (count($parts) === 4) {
+                        $this->ruleset[(string) $exclude['name']]['severity'] = 0;
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", $depth);
+                            echo "\t\t=> severity set to 0".PHP_EOL;
+                        }
+                    } else {
+                        $excludedSniffs = array_merge(
+                            $excludedSniffs,
+                            $this->_expandRulesetReference($exclude['name'], $rulesetDir, ($depth + 1))
+                        );
+                    }
+                }//end foreach
+            }//end if
+
+            $this->_processRule($rule, $depth);
+        }//end foreach
+
+        // Process custom command line arguments.
+        $cliArgs = array();
+        foreach ($ruleset->{'arg'} as $arg) {
+            if ($this->_shouldProcessElement($arg) === false) {
+                continue;
+            }
+
+            if (isset($arg['name']) === true) {
+                $argString = '--'.(string) $arg['name'];
+                if (isset($arg['value']) === true) {
+                    $argString .= '='.(string) $arg['value'];
+                }
+            } else {
+                $argString = '-'.(string) $arg['value'];
+            }
+
+            $cliArgs[] = $argString;
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t=> set command line value $argString".PHP_EOL;
+            }
+        }//end foreach
+
+        // Set custom php ini values as CLI args.
+        foreach ($ruleset->{'ini'} as $arg) {
+            if ($this->_shouldProcessElement($arg) === false) {
+                continue;
+            }
+
+            if (isset($arg['name']) === false) {
+                continue;
+            }
+
+            $name      = (string) $arg['name'];
+            $argString = $name;
+            if (isset($arg['value']) === true) {
+                $value      = (string) $arg['value'];
+                $argString .= "=$value";
+            } else {
+                $value = 'true';
+            }
+
+            $cliArgs[] = '-d';
+            $cliArgs[] = $argString;
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t=> set PHP ini value $name to $value".PHP_EOL;
+            }
+        }//end foreach
+
+        if (empty($cliValues['files']) === true) {
+            // Process hard-coded file paths.
+            foreach ($ruleset->{'file'} as $file) {
+                $file      = (string) $file;
+                $cliArgs[] = $file;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t=> added \"$file\" to the file list".PHP_EOL;
+                }
+            }
+        }
+
+        if (empty($cliArgs) === false) {
+            $this->cli->setCommandLineValues($cliArgs);
+        }
+
+        // Process custom sniff config settings.
+        foreach ($ruleset->{'config'} as $config) {
+            if ($this->_shouldProcessElement($config) === false) {
+                continue;
+            }
+
+            $this->setConfigData((string) $config['name'], (string) $config['value'], true);
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t=> set config value ".(string) $config['name'].': '.(string) $config['value'].PHP_EOL;
+            }
+        }
+
+        // Process custom ignore pattern rules.
+        foreach ($ruleset->{'exclude-pattern'} as $pattern) {
+            if ($this->_shouldProcessElement($pattern) === false) {
+                continue;
+            }
+
+            if (isset($pattern['type']) === false) {
+                $pattern['type'] = 'absolute';
+            }
+
+            $this->ignorePatterns[(string) $pattern] = (string) $pattern['type'];
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t=> added global ".(string) $pattern['type'].' ignore pattern: '.(string) $pattern.PHP_EOL;
+            }
+        }
+
+        $includedSniffs = array_unique(array_merge($ownSniffs, $includedSniffs));
+        $excludedSniffs = array_unique($excludedSniffs);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $included = count($includedSniffs);
+            $excluded = count($excludedSniffs);
+            echo str_repeat("\t", $depth);
+            echo "=> Ruleset processing complete; included $included sniffs and excluded $excluded".PHP_EOL;
+        }
+
+        // Merge our own sniff list with our externally included
+        // sniff list, but filter out any excluded sniffs.
+        $files = array();
+        foreach ($includedSniffs as $sniff) {
+            if (in_array($sniff, $excludedSniffs) === true) {
+                continue;
+            } else {
+                $files[] = self::realpath($sniff);
+            }
+        }
+
+        return $files;
+
+    }//end processRuleset()
+
+
+    /**
+     * Expands a directory into a list of sniff files within.
+     *
+     * @param string $directory The path to a directory.
+     * @param int    $depth     How many nested processing steps we are in. This
+     *                          is only used for debug output.
+     *
+     * @return array
+     */
+    private function _expandSniffDirectory($directory, $depth=0)
+    {
+        $sniffs = array();
+
+        if (defined('RecursiveDirectoryIterator::FOLLOW_SYMLINKS') === true) {
+            $rdi = new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
+        } else {
+            $rdi = new RecursiveDirectoryIterator($directory);
+        }
+
+        $di = new RecursiveIteratorIterator($rdi, 0, RecursiveIteratorIterator::CATCH_GET_CHILD);
+
+        $dirLen = strlen($directory);
+
+        foreach ($di as $file) {
+            $filename = $file->getFilename();
+
+            // Skip hidden files.
+            if (substr($filename, 0, 1) === '.') {
+                continue;
+            }
+
+            // We are only interested in PHP and sniff files.
+            $fileParts = explode('.', $filename);
+            if (array_pop($fileParts) !== 'php') {
+                continue;
+            }
+
+            $basename = basename($filename, '.php');
+            if (substr($basename, -5) !== 'Sniff') {
+                continue;
+            }
+
+            $path = $file->getPathname();
+
+            // Skip files in hidden directories within the Sniffs directory of this
+            // standard. We use the offset with strpos() to allow hidden directories
+            // before, valid example:
+            // /home/foo/.composer/vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/...
+            if (strpos($path, DIRECTORY_SEPARATOR.'.', $dirLen) !== false) {
+                continue;
+            }
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t\t=> $path".PHP_EOL;
+            }
+
+            $sniffs[] = $path;
+        }//end foreach
+
+        return $sniffs;
+
+    }//end _expandSniffDirectory()
+
+
+    /**
+     * Expands a ruleset reference into a list of sniff files.
+     *
+     * @param string $ref        The reference from the ruleset XML file.
+     * @param string $rulesetDir The directory of the ruleset XML file, used to
+     *                           evaluate relative paths.
+     * @param int    $depth      How many nested processing steps we are in. This
+     *                           is only used for debug output.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If the reference is invalid.
+     */
+    private function _expandRulesetReference($ref, $rulesetDir, $depth=0)
+    {
+        // Ignore internal sniffs codes as they are used to only
+        // hide and change internal messages.
+        if (substr($ref, 0, 9) === 'Internal.') {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t\t* ignoring internal sniff code *".PHP_EOL;
+            }
+
+            return array();
+        }
+
+        // As sniffs can't begin with a full stop, assume references in
+        // this format are relative paths and attempt to convert them
+        // to absolute paths. If this fails, let the reference run through
+        // the normal checks and have it fail as normal.
+        if (substr($ref, 0, 1) === '.') {
+            $realpath = self::realpath($rulesetDir.'/'.$ref);
+            if ($realpath !== false) {
+                $ref = $realpath;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t=> $ref".PHP_EOL;
+                }
+            }
+        }
+
+        // As sniffs can't begin with a tilde, assume references in
+        // this format at relative to the user's home directory.
+        if (substr($ref, 0, 2) === '~/') {
+            $realpath = self::realpath($ref);
+            if ($realpath !== false) {
+                $ref = $realpath;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t=> $ref".PHP_EOL;
+                }
+            }
+        }
+
+        if (is_file($ref) === true) {
+            if (substr($ref, -9) === 'Sniff.php') {
+                // A single external sniff.
+                self::$rulesetDirs[] = dirname(dirname(dirname($ref)));
+                return array($ref);
+            }
+        } else {
+            // See if this is a whole standard being referenced.
+            $path = $this->getInstalledStandardPath($ref);
+            if (self::isPharFile($path) === true && strpos($path, 'ruleset.xml') === false) {
+                // If the ruleset exists inside the phar file, use it.
+                if (file_exists($path.DIRECTORY_SEPARATOR.'ruleset.xml') === true) {
+                    $path = $path.DIRECTORY_SEPARATOR.'ruleset.xml';
+                } else {
+                    $path = null;
+                }
+            }
+
+            if ($path !== null) {
+                $ref = $path;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t=> $ref".PHP_EOL;
+                }
+            } else if (is_dir($ref) === false) {
+                // Work out the sniff path.
+                $sepPos = strpos($ref, DIRECTORY_SEPARATOR);
+                if ($sepPos !== false) {
+                    $stdName = substr($ref, 0, $sepPos);
+                    $path    = substr($ref, $sepPos);
+                } else {
+                    $parts   = explode('.', $ref);
+                    $stdName = $parts[0];
+                    if (count($parts) === 1) {
+                        // A whole standard?
+                        $path = '';
+                    } else if (count($parts) === 2) {
+                        // A directory of sniffs?
+                        $path = DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR.$parts[1];
+                    } else {
+                        // A single sniff?
+                        $path = DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR.$parts[1].DIRECTORY_SEPARATOR.$parts[2].'Sniff.php';
+                    }
+                }
+
+                $newRef  = false;
+                $stdPath = $this->getInstalledStandardPath($stdName);
+                if ($stdPath !== null && $path !== '') {
+                    if (self::isPharFile($stdPath) === true
+                        && strpos($stdPath, 'ruleset.xml') === false
+                    ) {
+                        // Phar files can only return the directory,
+                        // since ruleset can be omitted if building one standard.
+                        $newRef = self::realpath($stdPath.$path);
+                    } else {
+                        $newRef = self::realpath(dirname($stdPath).$path);
+                    }
+                }
+
+                if ($newRef === false) {
+                    // The sniff is not locally installed, so check if it is being
+                    // referenced as a remote sniff outside the install. We do this
+                    // by looking through all directories where we have found ruleset
+                    // files before, looking for ones for this particular standard,
+                    // and seeing if it is in there.
+                    foreach (self::$rulesetDirs as $dir) {
+                        if (strtolower(basename($dir)) !== strtolower($stdName)) {
+                            continue;
+                        }
+
+                        $newRef = self::realpath($dir.$path);
+
+                        if ($newRef !== false) {
+                            $ref = $newRef;
+                        }
+                    }
+                } else {
+                    $ref = $newRef;
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t=> $ref".PHP_EOL;
+                }
+            }//end if
+        }//end if
+
+        if (is_dir($ref) === true) {
+            if (is_file($ref.DIRECTORY_SEPARATOR.'ruleset.xml') === true) {
+                // We are referencing an external coding standard.
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t* rule is referencing a standard using directory name; processing *".PHP_EOL;
+                }
+
+                return $this->processRuleset($ref.DIRECTORY_SEPARATOR.'ruleset.xml', ($depth + 2));
+            } else {
+                // We are referencing a whole directory of sniffs.
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t* rule is referencing a directory of sniffs *".PHP_EOL;
+                    echo str_repeat("\t", $depth);
+                    echo "\t\tAdding sniff files from directory".PHP_EOL;
+                }
+
+                return $this->_expandSniffDirectory($ref, ($depth + 1));
+            }
+        } else {
+            if (is_file($ref) === false) {
+                $error = "Referenced sniff \"$ref\" does not exist";
+                throw new PHP_CodeSniffer_Exception($error);
+            }
+
+            if (substr($ref, -9) === 'Sniff.php') {
+                // A single sniff.
+                return array($ref);
+            } else {
+                // Assume an external ruleset.xml file.
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo "\t\t* rule is referencing a standard using ruleset path; processing *".PHP_EOL;
+                }
+
+                return $this->processRuleset($ref, ($depth + 2));
+            }
+        }//end if
+
+    }//end _expandRulesetReference()
+
+
+    /**
+     * Processes a rule from a ruleset XML file, overriding built-in defaults.
+     *
+     * @param SimpleXMLElement $rule  The rule object from a ruleset XML file.
+     * @param int              $depth How many nested processing steps we are in.
+     *                                This is only used for debug output.
+     *
+     * @return void
+     */
+    private function _processRule($rule, $depth=0)
+    {
+        $code = (string) $rule['ref'];
+
+        // Custom severity.
+        if (isset($rule->severity) === true
+            && $this->_shouldProcessElement($rule->severity) === true
+        ) {
+            if (isset($this->ruleset[$code]) === false) {
+                $this->ruleset[$code] = array();
+            }
+
+            $this->ruleset[$code]['severity'] = (int) $rule->severity;
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t\t=> severity set to ".(int) $rule->severity.PHP_EOL;
+            }
+        }
+
+        // Custom message type.
+        if (isset($rule->type) === true
+            && $this->_shouldProcessElement($rule->type) === true
+        ) {
+            if (isset($this->ruleset[$code]) === false) {
+                $this->ruleset[$code] = array();
+            }
+
+            $this->ruleset[$code]['type'] = (string) $rule->type;
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t\t=> message type set to ".(string) $rule->type.PHP_EOL;
+            }
+        }
+
+        // Custom message.
+        if (isset($rule->message) === true
+            && $this->_shouldProcessElement($rule->message) === true
+        ) {
+            if (isset($this->ruleset[$code]) === false) {
+                $this->ruleset[$code] = array();
+            }
+
+            $this->ruleset[$code]['message'] = (string) $rule->message;
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t\t=> message set to ".(string) $rule->message.PHP_EOL;
+            }
+        }
+
+        // Custom properties.
+        if (isset($rule->properties) === true
+            && $this->_shouldProcessElement($rule->properties) === true
+        ) {
+            foreach ($rule->properties->property as $prop) {
+                if ($this->_shouldProcessElement($prop) === false) {
+                    continue;
+                }
+
+                if (isset($this->ruleset[$code]) === false) {
+                    $this->ruleset[$code] = array(
+                                             'properties' => array(),
+                                            );
+                } else if (isset($this->ruleset[$code]['properties']) === false) {
+                    $this->ruleset[$code]['properties'] = array();
+                }
+
+                $name = (string) $prop['name'];
+                if (isset($prop['type']) === true
+                    && (string) $prop['type'] === 'array'
+                ) {
+                    $value  = (string) $prop['value'];
+                    $values = array();
+                    foreach (explode(',', $value) as $val) {
+                        $v = '';
+
+                        list($k,$v) = explode('=>', $val.'=>');
+                        if ($v !== '') {
+                            $values[$k] = $v;
+                        } else {
+                            $values[] = $k;
+                        }
+                    }
+
+                    $this->ruleset[$code]['properties'][$name] = $values;
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo "\t\t=> array property \"$name\" set to \"$value\"".PHP_EOL;
+                    }
+                } else {
+                    $this->ruleset[$code]['properties'][$name] = (string) $prop['value'];
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo "\t\t=> property \"$name\" set to \"".(string) $prop['value'].'"'.PHP_EOL;
+                    }
+                }//end if
+            }//end foreach
+        }//end if
+
+        // Ignore patterns.
+        foreach ($rule->{'exclude-pattern'} as $pattern) {
+            if ($this->_shouldProcessElement($pattern) === false) {
+                continue;
+            }
+
+            if (isset($this->ignorePatterns[$code]) === false) {
+                $this->ignorePatterns[$code] = array();
+            }
+
+            if (isset($pattern['type']) === false) {
+                $pattern['type'] = 'absolute';
+            }
+
+            $this->ignorePatterns[$code][(string) $pattern] = (string) $pattern['type'];
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo str_repeat("\t", $depth);
+                echo "\t\t=> added sniff-specific ".(string) $pattern['type'].' ignore pattern: '.(string) $pattern.PHP_EOL;
+            }
+        }
+
+    }//end _processRule()
+
+
+    /**
+     * Determine if an element should be processed or ignored.
+     *
+     * @param SimpleXMLElement $element An object from a ruleset XML file.
+     * @param int              $depth   How many nested processing steps we are in.
+     *                                  This is only used for debug output.
+     *
+     * @return bool
+     */
+    private function _shouldProcessElement($element, $depth=0)
+    {
+        if (isset($element['phpcbf-only']) === false
+            && isset($element['phpcs-only']) === false
+        ) {
+            // No exceptions are being made.
+            return true;
+        }
+
+        if (PHP_CODESNIFFER_CBF === true
+            && isset($element['phpcbf-only']) === true
+            && (string) $element['phpcbf-only'] === 'true'
+        ) {
+            return true;
+        }
+
+        if (PHP_CODESNIFFER_CBF === false
+            && isset($element['phpcs-only']) === true
+            && (string) $element['phpcs-only'] === 'true'
+        ) {
+            return true;
+        }
+
+        return false;
+
+    }//end _shouldProcessElement()
+
+
+    /**
+     * Loads and stores sniffs objects used for sniffing files.
+     *
+     * @param array $files        Paths to the sniff files to register.
+     * @param array $restrictions The sniff class names to restrict the allowed
+     *                            listeners to.
+     *
+     * @return void
+     * @throws PHP_CodeSniffer_Exception If a sniff file path is invalid.
+     */
+    public function registerSniffs($files, $restrictions)
+    {
+        $listeners = array();
+
+        foreach ($files as $file) {
+            // Work out where the position of /StandardName/Sniffs/... is
+            // so we can determine what the class will be called.
+            $sniffPos = strrpos($file, DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR);
+            if ($sniffPos === false) {
+                continue;
+            }
+
+            $slashPos = strrpos(substr($file, 0, $sniffPos), DIRECTORY_SEPARATOR);
+            if ($slashPos === false) {
+                continue;
+            }
+
+            $className = substr($file, ($slashPos + 1));
+
+            if (substr_count($className, DIRECTORY_SEPARATOR) !== 3) {
+                throw new PHP_CodeSniffer_Exception("Sniff file $className is not valid; sniff files must be located in a .../StandardName/Sniffs/CategoryName/ directory");
+            }
+
+            $className = substr($className, 0, -4);
+            $className = str_replace(DIRECTORY_SEPARATOR, '_', $className);
+
+            // If they have specified a list of sniffs to restrict to, check
+            // to see if this sniff is allowed.
+            if (empty($restrictions) === false
+                && in_array(strtolower($className), $restrictions) === false
+            ) {
+                continue;
+            }
+
+            include_once $file;
+
+            // Support the use of PHP namespaces. If the class name we included
+            // contains namespace separators instead of underscores, use this as the
+            // class name from now on.
+            $classNameNS = str_replace('_', '\\', $className);
+            if (class_exists($classNameNS, false) === true) {
+                $className = $classNameNS;
+            }
+
+            // Skip abstract classes.
+            $reflection = new ReflectionClass($className);
+            if ($reflection->isAbstract() === true) {
+                continue;
+            }
+
+            $listeners[$className] = $className;
+
+            if (PHP_CODESNIFFER_VERBOSITY > 2) {
+                echo "Registered $className".PHP_EOL;
+            }
+        }//end foreach
+
+        $this->sniffs = $listeners;
+
+    }//end registerSniffs()
+
+
+    /**
+     * Populates the array of PHP_CodeSniffer_Sniff's for this file.
+     *
+     * @return void
+     * @throws PHP_CodeSniffer_Exception If sniff registration fails.
+     */
+    public function populateTokenListeners()
+    {
+        // Construct a list of listeners indexed by token being listened for.
+        $this->_tokenListeners = array();
+
+        foreach ($this->sniffs as $listenerClass) {
+            // Work out the internal code for this sniff. Detect usage of namespace
+            // separators instead of underscores to support PHP namespaces.
+            if (strstr($listenerClass, '\\') === false) {
+                $parts = explode('_', $listenerClass);
+            } else {
+                $parts = explode('\\', $listenerClass);
+            }
+
+            $code = $parts[0].'.'.$parts[2].'.'.$parts[3];
+            $code = substr($code, 0, -5);
+
+            $this->listeners[$listenerClass] = new $listenerClass();
+
+            // Set custom properties.
+            if (isset($this->ruleset[$code]['properties']) === true) {
+                foreach ($this->ruleset[$code]['properties'] as $name => $value) {
+                    $this->setSniffProperty($listenerClass, $name, $value);
+                }
+            }
+
+            $tokenizers = array();
+            $vars       = get_class_vars($listenerClass);
+            if (isset($vars['supportedTokenizers']) === true) {
+                foreach ($vars['supportedTokenizers'] as $tokenizer) {
+                    $tokenizers[$tokenizer] = $tokenizer;
+                }
+            } else {
+                $tokenizers = array('PHP' => 'PHP');
+            }
+
+            $tokens = $this->listeners[$listenerClass]->register();
+            if (is_array($tokens) === false) {
+                $msg = "Sniff $listenerClass register() method must return an array";
+                throw new PHP_CodeSniffer_Exception($msg);
+            }
+
+            $parts          = explode('_', str_replace('\\', '_', $listenerClass));
+            $listenerSource = $parts[0].'.'.$parts[2].'.'.substr($parts[3], 0, -5);
+            $ignorePatterns = array();
+            $patterns       = $this->getIgnorePatterns($listenerSource);
+            foreach ($patterns as $pattern => $type) {
+                // While there is support for a type of each pattern
+                // (absolute or relative) we don't actually support it here.
+                $replacements = array(
+                                 '\\,' => ',',
+                                 '*'   => '.*',
+                                );
+
+                $ignorePatterns[] = strtr($pattern, $replacements);
+            }
+
+            foreach ($tokens as $token) {
+                if (isset($this->_tokenListeners[$token]) === false) {
+                    $this->_tokenListeners[$token] = array();
+                }
+
+                if (isset($this->_tokenListeners[$token][$listenerClass]) === false) {
+                    $this->_tokenListeners[$token][$listenerClass] = array(
+                                                                      'class'      => $listenerClass,
+                                                                      'source'     => $listenerSource,
+                                                                      'tokenizers' => $tokenizers,
+                                                                      'ignore'     => $ignorePatterns,
+                                                                     );
+                }
+            }
+        }//end foreach
+
+    }//end populateTokenListeners()
+
+
+    /**
+     * Set a single property for a sniff.
+     *
+     * @param string $listenerClass The class name of the sniff.
+     * @param string $name          The name of the property to change.
+     * @param string $value         The new value of the property.
+     *
+     * @return void
+     */
+    public function setSniffProperty($listenerClass, $name, $value)
+    {
+        // Setting a property for a sniff we are not using.
+        if (isset($this->listeners[$listenerClass]) === false) {
+            return;
+        }
+
+        $name = trim($name);
+        if (is_string($value) === true) {
+            $value = trim($value);
+        }
+
+        // Special case for booleans.
+        if ($value === 'true') {
+            $value = true;
+        } else if ($value === 'false') {
+            $value = false;
+        }
+
+        $this->listeners[$listenerClass]->$name = $value;
+
+    }//end setSniffProperty()
+
+
+    /**
+     * Get a list of files that will be processed.
+     *
+     * If passed directories, this method will find all files within them.
+     * The method will also perform file extension and ignore pattern filtering.
+     *
+     * @param string  $paths A list of file or directory paths to process.
+     * @param boolean $local If true, only process 1 level of files in directories
+     *
+     * @return array
+     * @throws Exception If there was an error opening a directory.
+     * @see    shouldProcessFile()
+     */
+    public function getFilesToProcess($paths, $local=false)
+    {
+        $files = array();
+
+        foreach ($paths as $path) {
+            if (is_dir($path) === true || self::isPharFile($path) === true) {
+                if (self::isPharFile($path) === true) {
+                    $path = 'phar://'.$path;
+                }
+
+                if ($local === true) {
+                    $di = new DirectoryIterator($path);
+                } else {
+                    $di = new RecursiveIteratorIterator(
+                        new RecursiveDirectoryIterator($path),
+                        0,
+                        RecursiveIteratorIterator::CATCH_GET_CHILD
+                    );
+                }
+
+                foreach ($di as $file) {
+                    // Check if the file exists after all symlinks are resolved.
+                    $filePath = self::realpath($file->getPathname());
+                    if ($filePath === false) {
+                        continue;
+                    }
+
+                    if (is_dir($filePath) === true) {
+                        continue;
+                    }
+
+                    if ($this->shouldProcessFile($file->getPathname(), $path) === false) {
+                        continue;
+                    }
+
+                    $files[] = $file->getPathname();
+                }//end foreach
+            } else {
+                if ($this->shouldIgnoreFile($path, dirname($path)) === true) {
+                    continue;
+                }
+
+                $files[] = $path;
+            }//end if
+        }//end foreach
+
+        return $files;
+
+    }//end getFilesToProcess()
+
+
+    /**
+     * Checks filtering rules to see if a file should be checked.
+     *
+     * Checks both file extension filters and path ignore filters.
+     *
+     * @param string $path    The path to the file being checked.
+     * @param string $basedir The directory to use for relative path checks.
+     *
+     * @return bool
+     */
+    public function shouldProcessFile($path, $basedir)
+    {
+        // Check that the file's extension is one we are checking.
+        // We are strict about checking the extension and we don't
+        // let files through with no extension or that start with a dot.
+        $fileName  = basename($path);
+        $fileParts = explode('.', $fileName);
+        if ($fileParts[0] === $fileName || $fileParts[0] === '') {
+            return false;
+        }
+
+        // Checking multi-part file extensions, so need to create a
+        // complete extension list and make sure one is allowed.
+        $extensions = array();
+        array_shift($fileParts);
+        foreach ($fileParts as $part) {
+            $extensions[implode('.', $fileParts)] = 1;
+            array_shift($fileParts);
+        }
+
+        $matches = array_intersect_key($extensions, $this->allowedFileExtensions);
+        if (empty($matches) === true) {
+            return false;
+        }
+
+        // If the file's path matches one of our ignore patterns, skip it.
+        if ($this->shouldIgnoreFile($path, $basedir) === true) {
+            return false;
+        }
+
+        return true;
+
+    }//end shouldProcessFile()
+
+
+    /**
+     * Checks filtering rules to see if a file should be ignored.
+     *
+     * @param string $path    The path to the file being checked.
+     * @param string $basedir The directory to use for relative path checks.
+     *
+     * @return bool
+     */
+    public function shouldIgnoreFile($path, $basedir)
+    {
+        $relativePath = $path;
+        if (strpos($path, $basedir) === 0) {
+            // The +1 cuts off the directory separator as well.
+            $relativePath = substr($path, (strlen($basedir) + 1));
+        }
+
+        foreach ($this->ignorePatterns as $pattern => $type) {
+            if (is_array($type) === true) {
+                // A sniff specific ignore pattern.
+                continue;
+            }
+
+            // Maintains backwards compatibility in case the ignore pattern does
+            // not have a relative/absolute value.
+            if (is_int($pattern) === true) {
+                $pattern = $type;
+                $type    = 'absolute';
+            }
+
+            $replacements = array(
+                             '\\,' => ',',
+                             '*'   => '.*',
+                            );
+
+            // We assume a / directory separator, as do the exclude rules
+            // most developers write, so we need a special case for any system
+            // that is different.
+            if (DIRECTORY_SEPARATOR === '\\') {
+                $replacements['/'] = '\\\\';
+            }
+
+            $pattern = strtr($pattern, $replacements);
+
+            if ($type === 'relative') {
+                $testPath = $relativePath;
+            } else {
+                $testPath = $path;
+            }
+
+            $pattern = '`'.$pattern.'`i';
+            if (preg_match($pattern, $testPath) === 1) {
+                return true;
+            }
+        }//end foreach
+
+        return false;
+
+    }//end shouldIgnoreFile()
+
+
+    /**
+     * Run the code sniffs over a single given file.
+     *
+     * Processes the file and runs the PHP_CodeSniffer sniffs to verify that it
+     * conforms with the standard. Returns the processed file object, or NULL
+     * if no file was processed due to error.
+     *
+     * @param string $file     The file to process.
+     * @param string $contents The contents to parse. If NULL, the content
+     *                         is taken from the file system.
+     *
+     * @return PHP_CodeSniffer_File
+     * @throws PHP_CodeSniffer_Exception If the file could not be processed.
+     * @see    _processFile()
+     */
+    public function processFile($file, $contents=null)
+    {
+        if ($contents === null && file_exists($file) === false) {
+            throw new PHP_CodeSniffer_Exception("Source file $file does not exist");
+        }
+
+        $filePath = self::realpath($file);
+        if ($filePath === false) {
+            $filePath = $file;
+        }
+
+        // Before we go and spend time tokenizing this file, just check
+        // to see if there is a tag up top to indicate that the whole
+        // file should be ignored. It must be on one of the first two lines.
+        $firstContent = $contents;
+        if ($contents === null && is_readable($filePath) === true) {
+            $handle = fopen($filePath, 'r');
+            if ($handle !== false) {
+                $firstContent  = fgets($handle);
+                $firstContent .= fgets($handle);
+                fclose($handle);
+
+                if (strpos($firstContent, '@codingStandardsIgnoreFile') !== false) {
+                    // We are ignoring the whole file.
+                    if (PHP_CODESNIFFER_VERBOSITY > 0) {
+                        echo 'Ignoring '.basename($filePath).PHP_EOL;
+                    }
+
+                    return null;
+                }
+            }
+        }//end if
+
+        try {
+            $phpcsFile = $this->_processFile($file, $contents);
+        } catch (Exception $e) {
+            $trace = $e->getTrace();
+
+            $filename = $trace[0]['args'][0];
+            if (is_object($filename) === true
+                && get_class($filename) === 'PHP_CodeSniffer_File'
+            ) {
+                $filename = $filename->getFilename();
+            } else if (is_numeric($filename) === true) {
+                // See if we can find the PHP_CodeSniffer_File object.
+                foreach ($trace as $data) {
+                    if (isset($data['args'][0]) === true
+                        && ($data['args'][0] instanceof PHP_CodeSniffer_File) === true
+                    ) {
+                        $filename = $data['args'][0]->getFilename();
+                    }
+                }
+            } else if (is_string($filename) === false) {
+                $filename = (string) $filename;
+            }
+
+            $errorMessage = '"'.$e->getMessage().'" at '.$e->getFile().':'.$e->getLine();
+            $error        = "An error occurred during processing; checking has been aborted. The error message was: $errorMessage";
+
+            $phpcsFile = new PHP_CodeSniffer_File(
+                $filename,
+                $this->_tokenListeners,
+                $this->ruleset,
+                $this
+            );
+
+            $phpcsFile->addError($error, null);
+        }//end try
+
+        $cliValues = $this->cli->getCommandLineValues();
+
+        if (PHP_CODESNIFFER_INTERACTIVE === false) {
+            // Cache the report data for this file so we can unset it to save memory.
+            $this->reporting->cacheFileReport($phpcsFile, $cliValues);
+            $phpcsFile->cleanUp();
+            return $phpcsFile;
+        }
+
+        /*
+            Running interactively.
+            Print the error report for the current file and then wait for user input.
+        */
+
+        // Get current violations and then clear the list to make sure
+        // we only print violations for a single file each time.
+        $numErrors = null;
+        while ($numErrors !== 0) {
+            $numErrors = ($phpcsFile->getErrorCount() + $phpcsFile->getWarningCount());
+            if ($numErrors === 0) {
+                continue;
+            }
+
+            $reportClass = $this->reporting->factory('full');
+            $reportData  = $this->reporting->prepareFileReport($phpcsFile);
+            $reportClass->generateFileReport($reportData, $phpcsFile, $cliValues['showSources'], $cliValues['reportWidth']);
+
+            echo '<ENTER> to recheck, [s] to skip or [q] to quit : ';
+            $input = fgets(STDIN);
+            $input = trim($input);
+
+            switch ($input) {
+            case 's':
+                break(2);
+            case 'q':
+                exit(0);
+                break;
+            default:
+                // Repopulate the sniffs because some of them save their state
+                // and only clear it when the file changes, but we are rechecking
+                // the same file.
+                $this->populateTokenListeners();
+                $phpcsFile = $this->_processFile($file, $contents);
+                break;
+            }
+        }//end while
+
+        return $phpcsFile;
+
+    }//end processFile()
+
+
+    /**
+     * Process the sniffs for a single file.
+     *
+     * Does raw processing only. No interactive support or error checking.
+     *
+     * @param string $file     The file to process.
+     * @param string $contents The contents to parse. If NULL, the content
+     *                         is taken from the file system.
+     *
+     * @return PHP_CodeSniffer_File
+     * @see    processFile()
+     */
+    private function _processFile($file, $contents)
+    {
+        $stdin     = false;
+        $cliValues = $this->cli->getCommandLineValues();
+        if (empty($cliValues['files']) === true) {
+            $stdin = true;
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0 || (PHP_CODESNIFFER_CBF === true && $stdin === false)) {
+            $startTime = microtime(true);
+            echo 'Processing '.basename($file).' ';
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo PHP_EOL;
+            }
+        }
+
+        $phpcsFile = new PHP_CodeSniffer_File(
+            $file,
+            $this->_tokenListeners,
+            $this->ruleset,
+            $this
+        );
+
+        $phpcsFile->start($contents);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0 || (PHP_CODESNIFFER_CBF === true && $stdin === false)) {
+            $timeTaken = ((microtime(true) - $startTime) * 1000);
+            if ($timeTaken < 1000) {
+                $timeTaken = round($timeTaken);
+                echo "DONE in {$timeTaken}ms";
+            } else {
+                $timeTaken = round(($timeTaken / 1000), 2);
+                echo "DONE in $timeTaken secs";
+            }
+
+            if (PHP_CODESNIFFER_CBF === true) {
+                $errors = $phpcsFile->getFixableCount();
+                echo " ($errors fixable violations)".PHP_EOL;
+            } else {
+                $errors   = $phpcsFile->getErrorCount();
+                $warnings = $phpcsFile->getWarningCount();
+                echo " ($errors errors, $warnings warnings)".PHP_EOL;
+            }
+        }
+
+        return $phpcsFile;
+
+    }//end _processFile()
+
+
+    /**
+     * Generates documentation for a coding standard.
+     *
+     * @param string $standard  The standard to generate docs for
+     * @param array  $sniffs    A list of sniffs to limit the docs to.
+     * @param string $generator The name of the generator class to use.
+     *
+     * @return void
+     */
+    public function generateDocs($standard, array $sniffs=array(), $generator='Text')
+    {
+        if (class_exists('PHP_CodeSniffer_DocGenerators_'.$generator, true) === false) {
+            throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_DocGenerators_'.$generator.' not found');
+        }
+
+        $class     = "PHP_CodeSniffer_DocGenerators_$generator";
+        $generator = new $class($standard, $sniffs);
+
+        $generator->generate();
+
+    }//end generateDocs()
+
+
+    /**
+     * Gets the array of PHP_CodeSniffer_Sniff's.
+     *
+     * @return PHP_CodeSniffer_Sniff[]
+     */
+    public function getSniffs()
+    {
+        return $this->listeners;
+
+    }//end getSniffs()
+
+
+    /**
+     * Gets the array of PHP_CodeSniffer_Sniff's indexed by token type.
+     *
+     * @return array
+     */
+    public function getTokenSniffs()
+    {
+        return $this->_tokenListeners;
+
+    }//end getTokenSniffs()
+
+
+    /**
+     * Returns true if the specified string is in the camel caps format.
+     *
+     * @param string  $string      The string the verify.
+     * @param boolean $classFormat If true, check to see if the string is in the
+     *                             class format. Class format strings must start
+     *                             with a capital letter and contain no
+     *                             underscores.
+     * @param boolean $public      If true, the first character in the string
+     *                             must be an a-z character. If false, the
+     *                             character must be an underscore. This
+     *                             argument is only applicable if $classFormat
+     *                             is false.
+     * @param boolean $strict      If true, the string must not have two capital
+     *                             letters next to each other. If false, a
+     *                             relaxed camel caps policy is used to allow
+     *                             for acronyms.
+     *
+     * @return boolean
+     */
+    public static function isCamelCaps(
+        $string,
+        $classFormat=false,
+        $public=true,
+        $strict=true
+    ) {
+        // Check the first character first.
+        if ($classFormat === false) {
+            $legalFirstChar = '';
+            if ($public === false) {
+                $legalFirstChar = '[_]';
+            }
+
+            if ($strict === false) {
+                // Can either start with a lowercase letter, or multiple uppercase
+                // in a row, representing an acronym.
+                $legalFirstChar .= '([A-Z]{2,}|[a-z])';
+            } else {
+                $legalFirstChar .= '[a-z]';
+            }
+        } else {
+            $legalFirstChar = '[A-Z]';
+        }
+
+        if (preg_match("/^$legalFirstChar/", $string) === 0) {
+            return false;
+        }
+
+        // Check that the name only contains legal characters.
+        $legalChars = 'a-zA-Z0-9';
+        if (preg_match("|[^$legalChars]|", substr($string, 1)) > 0) {
+            return false;
+        }
+
+        if ($strict === true) {
+            // Check that there are not two capital letters next to each other.
+            $length          = strlen($string);
+            $lastCharWasCaps = $classFormat;
+
+            for ($i = 1; $i < $length; $i++) {
+                $ascii = ord($string{$i});
+                if ($ascii >= 48 && $ascii <= 57) {
+                    // The character is a number, so it cant be a capital.
+                    $isCaps = false;
+                } else {
+                    if (strtoupper($string{$i}) === $string{$i}) {
+                        $isCaps = true;
+                    } else {
+                        $isCaps = false;
+                    }
+                }
+
+                if ($isCaps === true && $lastCharWasCaps === true) {
+                    return false;
+                }
+
+                $lastCharWasCaps = $isCaps;
+            }
+        }//end if
+
+        return true;
+
+    }//end isCamelCaps()
+
+
+    /**
+     * Returns true if the specified string is in the underscore caps format.
+     *
+     * @param string $string The string to verify.
+     *
+     * @return boolean
+     */
+    public static function isUnderscoreName($string)
+    {
+        // If there are space in the name, it can't be valid.
+        if (strpos($string, ' ') !== false) {
+            return false;
+        }
+
+        $validName = true;
+        $nameBits  = explode('_', $string);
+
+        if (preg_match('|^[A-Z]|', $string) === 0) {
+            // Name does not begin with a capital letter.
+            $validName = false;
+        } else {
+            foreach ($nameBits as $bit) {
+                if ($bit === '') {
+                    continue;
+                }
+
+                if ($bit{0} !== strtoupper($bit{0})) {
+                    $validName = false;
+                    break;
+                }
+            }
+        }
+
+        return $validName;
+
+    }//end isUnderscoreName()
+
+
+    /**
+     * Returns a valid variable type for param/var tag.
+     *
+     * If type is not one of the standard type, it must be a custom type.
+     * Returns the correct type name suggestion if type name is invalid.
+     *
+     * @param string $varType The variable type to process.
+     *
+     * @return string
+     */
+    public static function suggestType($varType)
+    {
+        if ($varType === '') {
+            return '';
+        }
+
+        if (in_array($varType, self::$allowedTypes) === true) {
+            return $varType;
+        } else {
+            $lowerVarType = strtolower($varType);
+            switch ($lowerVarType) {
+            case 'bool':
+                return 'boolean';
+            case 'double':
+            case 'real':
+                return 'float';
+            case 'int':
+                return 'integer';
+            case 'array()':
+                return 'array';
+            }//end switch
+
+            if (strpos($lowerVarType, 'array(') !== false) {
+                // Valid array declaration:
+                // array, array(type), array(type1 => type2).
+                $matches = array();
+                $pattern = '/^array\(\s*([^\s^=^>]*)(\s*=>\s*(.*))?\s*\)/i';
+                if (preg_match($pattern, $varType, $matches) !== 0) {
+                    $type1 = '';
+                    if (isset($matches[1]) === true) {
+                        $type1 = $matches[1];
+                    }
+
+                    $type2 = '';
+                    if (isset($matches[3]) === true) {
+                        $type2 = $matches[3];
+                    }
+
+                    $type1 = self::suggestType($type1);
+                    $type2 = self::suggestType($type2);
+                    if ($type2 !== '') {
+                        $type2 = ' => '.$type2;
+                    }
+
+                    return "array($type1$type2)";
+                } else {
+                    return 'array';
+                }//end if
+            } else if (in_array($lowerVarType, self::$allowedTypes) === true) {
+                // A valid type, but not lower cased.
+                return $lowerVarType;
+            } else {
+                // Must be a custom type name.
+                return $varType;
+            }//end if
+        }//end if
+
+    }//end suggestType()
+
+
+    /**
+     * Prepares token content for output to screen.
+     *
+     * Replaces invisible characters so they are visible. On non-Windows
+     * OSes it will also colour the invisible characters.
+     *
+     * @param string $content The content to prepare.
+     *
+     * @return string
+     */
+    public static function prepareForOutput($content)
+    {
+        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+            $content = str_replace("\r", '\r', $content);
+            $content = str_replace("\n", '\n', $content);
+            $content = str_replace("\t", '\t', $content);
+        } else {
+            $content = str_replace("\r", "\033[30;1m\\r\033[0m", $content);
+            $content = str_replace("\n", "\033[30;1m\\n\033[0m", $content);
+            $content = str_replace("\t", "\033[30;1m\\t\033[0m", $content);
+            $content = str_replace(' ', "\033[30;1mÂ·\033[0m", $content);
+        }
+
+        return $content;
+
+    }//end prepareForOutput()
+
+
+    /**
+     * Get a list paths where standards are installed.
+     *
+     * @return array
+     */
+    public static function getInstalledStandardPaths()
+    {
+        $installedPaths = array(dirname(__FILE__).DIRECTORY_SEPARATOR.'CodeSniffer'.DIRECTORY_SEPARATOR.'Standards');
+        $configPaths    = PHP_CodeSniffer::getConfigData('installed_paths');
+        if ($configPaths !== null) {
+            $installedPaths = array_merge($installedPaths, explode(',', $configPaths));
+        }
+
+        $resolvedInstalledPaths = array();
+        foreach ($installedPaths as $installedPath) {
+            if (substr($installedPath, 0, 1) === '.') {
+                $installedPath = dirname(__FILE__).DIRECTORY_SEPARATOR.$installedPath;
+            }
+
+            $resolvedInstalledPaths[] = $installedPath;
+        }
+
+        return $resolvedInstalledPaths;
+
+    }//end getInstalledStandardPaths()
+
+
+    /**
+     * Get a list of all coding standards installed.
+     *
+     * Coding standards are directories located in the
+     * CodeSniffer/Standards directory. Valid coding standards
+     * include a Sniffs subdirectory.
+     *
+     * @param boolean $includeGeneric If true, the special "Generic"
+     *                                coding standard will be included
+     *                                if installed.
+     * @param string  $standardsDir   A specific directory to look for standards
+     *                                in. If not specified, PHP_CodeSniffer will
+     *                                look in its default locations.
+     *
+     * @return array
+     * @see    isInstalledStandard()
+     */
+    public static function getInstalledStandards(
+        $includeGeneric=false,
+        $standardsDir=''
+    ) {
+        $installedStandards = array();
+
+        if ($standardsDir === '') {
+            $installedPaths = self::getInstalledStandardPaths();
+        } else {
+            $installedPaths = array($standardsDir);
+        }
+
+        foreach ($installedPaths as $standardsDir) {
+            $di = new DirectoryIterator($standardsDir);
+            foreach ($di as $file) {
+                if ($file->isDir() === true && $file->isDot() === false) {
+                    $filename = $file->getFilename();
+
+                    // Ignore the special "Generic" standard.
+                    if ($includeGeneric === false && $filename === 'Generic') {
+                        continue;
+                    }
+
+                    // Valid coding standard dirs include a ruleset.
+                    $csFile = $file->getPathname().'/ruleset.xml';
+                    if (is_file($csFile) === true) {
+                        $installedStandards[] = $filename;
+                    }
+                }
+            }
+        }//end foreach
+
+        return $installedStandards;
+
+    }//end getInstalledStandards()
+
+
+    /**
+     * Determine if a standard is installed.
+     *
+     * Coding standards are directories located in the
+     * CodeSniffer/Standards directory. Valid coding standards
+     * include a ruleset.xml file.
+     *
+     * @param string $standard The name of the coding standard.
+     *
+     * @return boolean
+     * @see    getInstalledStandards()
+     */
+    public static function isInstalledStandard($standard)
+    {
+        $path = self::getInstalledStandardPath($standard);
+        if ($path !== null && strpos($path, 'ruleset.xml') !== false) {
+            return true;
+        } else {
+            // This could be a custom standard, installed outside our
+            // standards directory.
+            $standard = self::realPath($standard);
+
+            // Might be an actual ruleset file itself.
+            // If it has an XML extension, let's at least try it.
+            if (is_file($standard) === true
+                && (substr(strtolower($standard), -4) === '.xml'
+                || substr(strtolower($standard), -9) === '.xml.dist')
+            ) {
+                return true;
+            }
+
+            // If it is a directory with a ruleset.xml file in it,
+            // it is a standard.
+            $ruleset = rtrim($standard, ' /\\').DIRECTORY_SEPARATOR.'ruleset.xml';
+            if (is_file($ruleset) === true) {
+                return true;
+            }
+        }//end if
+
+        return false;
+
+    }//end isInstalledStandard()
+
+
+    /**
+     * Return the path of an installed coding standard.
+     *
+     * Coding standards are directories located in the
+     * CodeSniffer/Standards directory. Valid coding standards
+     * include a ruleset.xml file.
+     *
+     * @param string $standard The name of the coding standard.
+     *
+     * @return string|null
+     */
+    public static function getInstalledStandardPath($standard)
+    {
+        $installedPaths = self::getInstalledStandardPaths();
+        foreach ($installedPaths as $installedPath) {
+            $standardPath = $installedPath.DIRECTORY_SEPARATOR.$standard;
+            $path         = self::realpath($standardPath.DIRECTORY_SEPARATOR.'ruleset.xml');
+            if (is_file($path) === true) {
+                return $path;
+            } else if (self::isPharFile($standardPath) === true) {
+                $path = self::realpath($standardPath);
+                if ($path !== false) {
+                    return $path;
+                }
+            }
+        }
+
+        return null;
+
+    }//end getInstalledStandardPath()
+
+
+    /**
+     * Get a single config value.
+     *
+     * Config data is stored in the data dir, in a file called
+     * CodeSniffer.conf. It is a simple PHP array.
+     *
+     * @param string $key The name of the config value.
+     *
+     * @return string|null
+     * @see    setConfigData()
+     * @see    getAllConfigData()
+     */
+    public static function getConfigData($key)
+    {
+        $phpCodeSnifferConfig = self::getAllConfigData();
+
+        if ($phpCodeSnifferConfig === null) {
+            return null;
+        }
+
+        if (isset($phpCodeSnifferConfig[$key]) === false) {
+            return null;
+        }
+
+        return $phpCodeSnifferConfig[$key];
+
+    }//end getConfigData()
+
+
+    /**
+     * Set a single config value.
+     *
+     * Config data is stored in the data dir, in a file called
+     * CodeSniffer.conf. It is a simple PHP array.
+     *
+     * @param string      $key   The name of the config value.
+     * @param string|null $value The value to set. If null, the config
+     *                           entry is deleted, reverting it to the
+     *                           default value.
+     * @param boolean     $temp  Set this config data temporarily for this
+     *                           script run. This will not write the config
+     *                           data to the config file.
+     *
+     * @return boolean
+     * @see    getConfigData()
+     * @throws PHP_CodeSniffer_Exception If the config file can not be written.
+     */
+    public static function setConfigData($key, $value, $temp=false)
+    {
+        if ($temp === false) {
+            $path = '';
+            if (is_callable('Phar::running') === true) {
+                $path = Phar::running(false);
+            }
+
+            if ($path !== '') {
+                $configFile = dirname($path).'/CodeSniffer.conf';
+            } else {
+                $configFile = dirname(__FILE__).'/CodeSniffer.conf';
+                if (is_file($configFile) === false
+                    && strpos('@data_dir@', '@data_dir') === false
+                ) {
+                    // If data_dir was replaced, this is a PEAR install and we can
+                    // use the PEAR data dir to store the conf file.
+                    $configFile = '@data_dir@/PHP_CodeSniffer/CodeSniffer.conf';
+                }
+            }
+
+            if (is_file($configFile) === true
+                && is_writable($configFile) === false
+            ) {
+                $error = 'Config file '.$configFile.' is not writable';
+                throw new PHP_CodeSniffer_Exception($error);
+            }
+        }//end if
+
+        $phpCodeSnifferConfig = self::getAllConfigData();
+
+        if ($value === null) {
+            if (isset($phpCodeSnifferConfig[$key]) === true) {
+                unset($phpCodeSnifferConfig[$key]);
+            }
+        } else {
+            $phpCodeSnifferConfig[$key] = $value;
+        }
+
+        if ($temp === false) {
+            $output  = '<'.'?php'."\n".' $phpCodeSnifferConfig = ';
+            $output .= var_export($phpCodeSnifferConfig, true);
+            $output .= "\n?".'>';
+
+            if (file_put_contents($configFile, $output) === false) {
+                return false;
+            }
+        }
+
+        $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = $phpCodeSnifferConfig;
+
+        return true;
+
+    }//end setConfigData()
+
+
+    /**
+     * Get all config data in an array.
+     *
+     * @return array<string, string>
+     * @see    getConfigData()
+     */
+    public static function getAllConfigData()
+    {
+        if (isset($GLOBALS['PHP_CODESNIFFER_CONFIG_DATA']) === true) {
+            return $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'];
+        }
+
+        $path = '';
+        if (is_callable('Phar::running') === true) {
+            $path = Phar::running(false);
+        }
+
+        if ($path !== '') {
+            $configFile = dirname($path).'/CodeSniffer.conf';
+        } else {
+            $configFile = dirname(__FILE__).'/CodeSniffer.conf';
+            if (is_file($configFile) === false) {
+                $configFile = '@data_dir@/PHP_CodeSniffer/CodeSniffer.conf';
+            }
+        }
+
+        if (is_file($configFile) === false) {
+            $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = array();
+            return array();
+        }
+
+        include $configFile;
+        $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = $phpCodeSnifferConfig;
+        return $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'];
+
+    }//end getAllConfigData()
+
+
+    /**
+     * Return TRUE, if the path is a phar file.
+     *
+     * @param string $path The path to use.
+     *
+     * @return mixed
+     */
+    public static function isPharFile($path)
+    {
+        if (strpos($path, 'phar://') === 0) {
+            return true;
+        }
+
+        return false;
+
+    }//end isPharFile()
+
+
+    /**
+     * CodeSniffer alternative for realpath.
+     *
+     * Allows for phar support.
+     *
+     * @param string $path The path to use.
+     *
+     * @return mixed
+     */
+    public static function realpath($path)
+    {
+        // Support the path replacement of ~ with the user's home directory.
+        if (substr($path, 0, 2) === '~/') {
+            $homeDir = getenv('HOME');
+            if ($homeDir !== false) {
+                $path = $homeDir.substr($path, 1);
+            }
+        }
+
+        // No extra work needed if this is not a phar file.
+        if (self::isPharFile($path) === false) {
+            return realpath($path);
+        }
+
+        // Before trying to break down the file path,
+        // check if it exists first because it will mostly not
+        // change after running the below code.
+        if (file_exists($path) === true) {
+            return $path;
+        }
+
+        $phar  = Phar::running(false);
+        $extra = str_replace('phar://'.$phar, '', $path);
+        $path  = realpath($phar);
+        if ($path === false) {
+            return false;
+        }
+
+        $path = 'phar://'.$path.$extra;
+        if (file_exists($path) === true) {
+            return $path;
+        }
+
+        return false;
+
+    }//end realpath()
+
+
+    /**
+     * CodeSniffer alternative for chdir().
+     *
+     * Allows for phar support.
+     *
+     * @param string $path The path to use.
+     *
+     * @return void
+     */
+    public static function chdir($path)
+    {
+        if (self::isPharFile($path) === true) {
+            $phar = Phar::running(false);
+            chdir(dirname($phar));
+        } else {
+            chdir($path);
+        }
+
+    }//end chdir()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php	(revision 5534)
@@ -0,0 +1,1322 @@
+<?php
+/**
+ * A class to process command line phpcs scripts.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+error_reporting(E_ALL | E_STRICT);
+
+// Installations via Composer: make sure that we autoload all dependencies.
+if (file_exists($a = dirname(__FILE__).'/../../../autoload.php') === true) {
+    include_once $a;
+} else if (file_exists($a = dirname(__FILE__).'/../vendor/autoload.php') === true) {
+    include_once $a;
+}
+
+if (file_exists($a = dirname(__FILE__).'/../CodeSniffer.php') === true) {
+    // Running from a git clone.
+    include_once $a;
+} else {
+    // PEAR installed.
+    include_once 'PHP/CodeSniffer.php';
+}
+
+/**
+ * A class to process command line phpcs scripts.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_CLI
+{
+
+    /**
+     * An array of all values specified on the command line.
+     *
+     * @var array
+     */
+    protected $values = array();
+
+    /**
+     * The minimum severity level errors must have to be displayed.
+     *
+     * @var bool
+     */
+    public $errorSeverity = 0;
+
+    /**
+     * The minimum severity level warnings must have to be displayed.
+     *
+     * @var bool
+     */
+    public $warningSeverity = 0;
+
+    /**
+     * Whether or not to kill the process when an unknown command line arg is found.
+     *
+     * If FALSE, arguments that are not command line options or file/directory paths
+     * will be ignored and execution will continue.
+     *
+     * @var bool
+     */
+    public $dieOnUnknownArg = true;
+
+    /**
+     * An array of the current command line arguments we are processing.
+     *
+     * @var array
+     */
+    private $_cliArgs = array();
+
+
+    /**
+     * Run the PHPCS script.
+     *
+     * @return array
+     */
+    public function runphpcs()
+    {
+        if (defined('PHP_CODESNIFFER_CBF') === false) {
+            define('PHP_CODESNIFFER_CBF', false);
+        }
+
+        if (is_file(dirname(__FILE__).'/../CodeSniffer/Reporting.php') === true) {
+            include_once dirname(__FILE__).'/../CodeSniffer/Reporting.php';
+        } else {
+            include_once 'PHP/CodeSniffer/Reporting.php';
+        }
+
+        PHP_CodeSniffer_Reporting::startTiming();
+        $this->checkRequirements();
+        $numErrors = $this->process();
+        if ($numErrors === 0) {
+            exit(0);
+        } else {
+            exit(1);
+        }
+
+    }//end runphpcs()
+
+
+    /**
+     * Run the PHPCBF script.
+     *
+     * @return array
+     */
+    public function runphpcbf()
+    {
+        if (defined('PHP_CODESNIFFER_CBF') === false) {
+            define('PHP_CODESNIFFER_CBF', true);
+        }
+
+        if (is_file(dirname(__FILE__).'/../CodeSniffer/Reporting.php') === true) {
+            include_once dirname(__FILE__).'/../CodeSniffer/Reporting.php';
+        } else {
+            include_once 'PHP/CodeSniffer/Reporting.php';
+        }
+
+        PHP_CodeSniffer_Reporting::startTiming();
+        $this->checkRequirements();
+
+        $this->dieOnUnknownArg = false;
+
+        // Override some of the command line settings that might break the fixes.
+        $cliValues = $this->getCommandLineValues();
+        $cliValues['verbosity']    = 0;
+        $cliValues['showProgress'] = false;
+        $cliValues['generator']    = '';
+        $cliValues['explain']      = false;
+        $cliValues['interactive']  = false;
+        $cliValues['showSources']  = false;
+        $cliValues['reportFile']   = null;
+        $cliValues['reports']      = array();
+
+        $suffix = '';
+        if (isset($cliValues['suffix']) === true) {
+            $suffix = $cliValues['suffix'];
+        }
+
+        $allowPatch = true;
+        if (isset($cliValues['no-patch']) === true || empty($cliValues['files']) === true) {
+            // They either asked for this,
+            // or they are using STDIN, which can't use diff.
+            $allowPatch = false;
+        }
+
+        if ($suffix === '' && $allowPatch === true) {
+            // Using the diff/patch tools.
+            $diffFile = getcwd().'/phpcbf-fixed.diff';
+            $cliValues['reports'] = array('diff' => $diffFile);
+            if (file_exists($diffFile) === true) {
+                unlink($diffFile);
+            }
+        } else {
+            // Replace the file without the patch command
+            // or writing to a file with a new suffix.
+            $cliValues['reports']       = array('cbf' => null);
+            $cliValues['phpcbf-suffix'] = $suffix;
+        }
+
+        $numErrors = $this->process($cliValues);
+
+        if ($suffix === '' && $allowPatch === true) {
+            if (file_exists($diffFile) === false) {
+                // Nothing to fix.
+                if ($numErrors === 0) {
+                    // And no errors reported.
+                    $exit = 0;
+                } else {
+                    // Errors we can't fix.
+                    $exit = 2;
+                }
+            } else {
+                if (filesize($diffFile) < 10) {
+                    // Empty or bad diff file.
+                    if ($numErrors === 0) {
+                        // And no errors reported.
+                        $exit = 0;
+                    } else {
+                        // Errors we can't fix.
+                        $exit = 2;
+                    }
+                } else {
+                    $cmd    = "patch -p0 -ui \"$diffFile\"";
+                    $output = array();
+                    $retVal = null;
+                    exec($cmd, $output, $retVal);
+
+                    if ($retVal === 0) {
+                        // Everything went well.
+                        $filesPatched = count($output);
+                        echo "Patched $filesPatched file";
+                        if ($filesPatched > 1) {
+                            echo 's';
+                        }
+
+                        echo PHP_EOL;
+                        $exit = 1;
+                    } else {
+                        print_r($output);
+                        echo "Returned: $retVal".PHP_EOL;
+                        $exit = 3;
+                    }
+                }//end if
+
+                unlink($diffFile);
+            }//end if
+        } else {
+            // File are being patched manually, so we can't tell
+            // how many errors were fixed.
+            $exit = 1;
+        }//end if
+
+        if ($exit === 0) {
+            echo 'No fixable errors were found'.PHP_EOL;
+        } else if ($exit === 2) {
+            echo 'PHPCBF could not fix all the errors found'.PHP_EOL;
+        }
+
+        PHP_CodeSniffer_Reporting::printRunTime();
+        exit($exit);
+
+    }//end runphpcbf()
+
+
+    /**
+     * Exits if the minimum requirements of PHP_CodSniffer are not met.
+     *
+     * @return array
+     */
+    public function checkRequirements()
+    {
+        // Check the PHP version.
+        if (version_compare(PHP_VERSION, '5.1.2') === -1) {
+            echo 'ERROR: PHP_CodeSniffer requires PHP version 5.1.2 or greater.'.PHP_EOL;
+            exit(2);
+        }
+
+        if (extension_loaded('tokenizer') === false) {
+            echo 'ERROR: PHP_CodeSniffer requires the tokenizer extension to be enabled.'.PHP_EOL;
+            exit(2);
+        }
+
+    }//end checkRequirements()
+
+
+    /**
+     * Get a list of default values for all possible command line arguments.
+     *
+     * @return array
+     */
+    public function getDefaults()
+    {
+        if (defined('PHP_CODESNIFFER_IN_TESTS') === true) {
+            return array();
+        }
+
+        // The default values for config settings.
+        $defaults['files']           = array();
+        $defaults['standard']        = null;
+        $defaults['verbosity']       = 0;
+        $defaults['interactive']     = false;
+        $defaults['colors']          = false;
+        $defaults['explain']         = false;
+        $defaults['local']           = false;
+        $defaults['showSources']     = false;
+        $defaults['extensions']      = array();
+        $defaults['sniffs']          = array();
+        $defaults['ignored']         = array();
+        $defaults['reportFile']      = null;
+        $defaults['generator']       = '';
+        $defaults['reports']         = array();
+        $defaults['bootstrap']       = array();
+        $defaults['errorSeverity']   = null;
+        $defaults['warningSeverity'] = null;
+
+        $reportFormat = PHP_CodeSniffer::getConfigData('report_format');
+        if ($reportFormat !== null) {
+            $defaults['reports'][$reportFormat] = null;
+        }
+
+        $tabWidth = PHP_CodeSniffer::getConfigData('tab_width');
+        if ($tabWidth === null) {
+            $defaults['tabWidth'] = 0;
+        } else {
+            $defaults['tabWidth'] = (int) $tabWidth;
+        }
+
+        $encoding = PHP_CodeSniffer::getConfigData('encoding');
+        if ($encoding === null) {
+            $defaults['encoding'] = 'iso-8859-1';
+        } else {
+            $defaults['encoding'] = strtolower($encoding);
+        }
+
+        $severity = PHP_CodeSniffer::getConfigData('severity');
+        if ($severity !== null) {
+            $defaults['errorSeverity']   = (int) $severity;
+            $defaults['warningSeverity'] = (int) $severity;
+        }
+
+        $severity = PHP_CodeSniffer::getConfigData('error_severity');
+        if ($severity !== null) {
+            $defaults['errorSeverity'] = (int) $severity;
+        }
+
+        $severity = PHP_CodeSniffer::getConfigData('warning_severity');
+        if ($severity !== null) {
+            $defaults['warningSeverity'] = (int) $severity;
+        }
+
+        $showWarnings = PHP_CodeSniffer::getConfigData('show_warnings');
+        if ($showWarnings !== null) {
+            $showWarnings = (bool) $showWarnings;
+            if ($showWarnings === false) {
+                $defaults['warningSeverity'] = 0;
+            }
+        }
+
+        $reportWidth = PHP_CodeSniffer::getConfigData('report_width');
+        if ($reportWidth !== null) {
+            $defaults['reportWidth'] = $this->_validateReportWidth($reportWidth);
+        } else {
+            // Use function defaults.
+            $defaults['reportWidth'] = null;
+        }
+
+        $showProgress = PHP_CodeSniffer::getConfigData('show_progress');
+        if ($showProgress === null) {
+            $defaults['showProgress'] = false;
+        } else {
+            $defaults['showProgress'] = (bool) $showProgress;
+        }
+
+        $colors = PHP_CodeSniffer::getConfigData('colors');
+        if ($colors === null) {
+            $defaults['colors'] = false;
+        } else {
+            $defaults['colors'] = (bool) $colors;
+        }
+
+        if (PHP_CodeSniffer::isPharFile(dirname(dirname(__FILE__))) === true) {
+            // If this is a phar file, check for the standard in the config.
+            $standard = PHP_CodeSniffer::getConfigData('standard');
+            if ($standard !== null) {
+                $defaults['standard'] = $standard;
+            }
+        }
+
+        return $defaults;
+
+    }//end getDefaults()
+
+
+    /**
+     * Gets the processed command line values.
+     *
+     * If the values have not yet been set, the values will be sourced
+     * from the command line arguments.
+     *
+     * @return array
+     */
+    public function getCommandLineValues()
+    {
+        if (empty($this->values) === false) {
+            return $this->values;
+        }
+
+        $values = $this->getDefaults();
+
+        $args = $_SERVER['argv'];
+        array_shift($args);
+
+        $this->setCommandLineValues($args);
+        return $this->values;
+
+    }//end getCommandLineValues()
+
+
+    /**
+     * Set the command line values.
+     *
+     * @param array $args An array of command line arguments to process.
+     *
+     * @return void
+     */
+    public function setCommandLineValues($args)
+    {
+        if (defined('PHP_CODESNIFFER_IN_TESTS') === true) {
+            $this->values = array();
+        } else if (empty($this->values) === true) {
+            $this->values = $this->getDefaults();
+        }
+
+        $this->_cliArgs = $args;
+        $numArgs        = count($args);
+
+        for ($i = 0; $i < $numArgs; $i++) {
+            $arg = $this->_cliArgs[$i];
+            if ($arg === '') {
+                continue;
+            }
+
+            if ($arg{0} === '-') {
+                if ($arg === '-' || $arg === '--') {
+                    // Empty argument, ignore it.
+                    continue;
+                }
+
+                if ($arg{1} === '-') {
+                    $this->processLongArgument(substr($arg, 2), $i);
+                } else {
+                    $switches = str_split($arg);
+                    foreach ($switches as $switch) {
+                        if ($switch === '-') {
+                            continue;
+                        }
+
+                        $this->processShortArgument($switch, $i);
+                    }
+                }
+            } else {
+                $this->processUnknownArgument($arg, $i);
+            }//end if
+        }//end for
+
+    }//end setCommandLineValues()
+
+
+    /**
+     * Processes a short (-e) command line argument.
+     *
+     * @param string $arg The command line argument.
+     * @param int    $pos The position of the argument on the command line.
+     *
+     * @return void
+     */
+    public function processShortArgument($arg, $pos)
+    {
+        switch ($arg) {
+        case 'h':
+        case '?':
+            $this->printUsage();
+            exit(0);
+            break;
+        case 'i' :
+            $this->printInstalledStandards();
+            exit(0);
+            break;
+        case 'v' :
+            if (isset($this->values['verbosity']) === false) {
+                $this->values['verbosity'] = 1;
+            } else {
+                $this->values['verbosity']++;
+            }
+            break;
+        case 'l' :
+            $this->values['local'] = true;
+            break;
+        case 's' :
+            $this->values['showSources'] = true;
+            break;
+        case 'a' :
+            $this->values['interactive'] = true;
+            break;
+        case 'e':
+            $this->values['explain'] = true;
+            break;
+        case 'p' :
+            $this->values['showProgress'] = true;
+            break;
+        case 'd' :
+            $ini = explode('=', $this->_cliArgs[($pos + 1)]);
+            $this->_cliArgs[($pos + 1)] = '';
+            if (isset($ini[1]) === true) {
+                ini_set($ini[0], $ini[1]);
+            } else {
+                ini_set($ini[0], true);
+            }
+            break;
+        case 'n' :
+            $this->values['warningSeverity'] = 0;
+            break;
+        case 'w' :
+            $this->values['warningSeverity'] = null;
+            break;
+        default:
+            if ($this->dieOnUnknownArg === false) {
+                $this->values[$arg] = $arg;
+            } else {
+                $this->processUnknownArgument('-'.$arg, $pos);
+            }
+        }//end switch
+
+    }//end processShortArgument()
+
+
+    /**
+     * Processes a long (--example) command line argument.
+     *
+     * @param string $arg The command line argument.
+     * @param int    $pos The position of the argument on the command line.
+     *
+     * @return void
+     */
+    public function processLongArgument($arg, $pos)
+    {
+        switch ($arg) {
+        case 'help':
+            $this->printUsage();
+            exit(0);
+        case 'version':
+            echo 'PHP_CodeSniffer version '.PHP_CodeSniffer::VERSION.' ('.PHP_CodeSniffer::STABILITY.') ';
+            echo 'by Squiz (http://www.squiz.net)'.PHP_EOL;
+            exit(0);
+        case 'colors':
+            $this->values['colors'] = true;
+            break;
+        case 'no-colors':
+            $this->values['colors'] = false;
+            break;
+        case 'config-set':
+            if (isset($this->_cliArgs[($pos + 1)]) === false
+                || isset($this->_cliArgs[($pos + 2)]) === false
+            ) {
+                echo 'ERROR: Setting a config option requires a name and value'.PHP_EOL.PHP_EOL;
+                $this->printUsage();
+                exit(0);
+            }
+
+            $key     = $this->_cliArgs[($pos + 1)];
+            $value   = $this->_cliArgs[($pos + 2)];
+            $current = PHP_CodeSniffer::getConfigData($key);
+
+            try {
+                PHP_CodeSniffer::setConfigData($key, $value);
+            } catch (Exception $e) {
+                echo $e->getMessage().PHP_EOL;
+                exit(2);
+            }
+
+            if ($current === null) {
+                echo "Config value \"$key\" added successfully".PHP_EOL;
+            } else {
+                echo "Config value \"$key\" updated successfully; old value was \"$current\"".PHP_EOL;
+            }
+            exit(0);
+        case 'config-delete':
+            if (isset($this->_cliArgs[($pos + 1)]) === false) {
+                echo 'ERROR: Deleting a config option requires the name of the option'.PHP_EOL.PHP_EOL;
+                $this->printUsage();
+                exit(0);
+            }
+
+            $key     = $this->_cliArgs[($pos + 1)];
+            $current = PHP_CodeSniffer::getConfigData($key);
+            if ($current === null) {
+                echo "Config value \"$key\" has not been set".PHP_EOL;
+            } else {
+                try {
+                    PHP_CodeSniffer::setConfigData($key, null);
+                } catch (Exception $e) {
+                    echo $e->getMessage().PHP_EOL;
+                    exit(2);
+                }
+
+                echo "Config value \"$key\" removed successfully; old value was \"$current\"".PHP_EOL;
+            }
+            exit(0);
+        case 'config-show':
+            $data = PHP_CodeSniffer::getAllConfigData();
+            $this->printConfigData($data);
+            exit(0);
+        case 'runtime-set':
+            if (isset($this->_cliArgs[($pos + 1)]) === false
+                || isset($this->_cliArgs[($pos + 2)]) === false
+            ) {
+                echo 'ERROR: Setting a runtime config option requires a name and value'.PHP_EOL.PHP_EOL;
+                $this->printUsage();
+                exit(0);
+            }
+
+            $key   = $this->_cliArgs[($pos + 1)];
+            $value = $this->_cliArgs[($pos + 2)];
+            $this->_cliArgs[($pos + 1)] = '';
+            $this->_cliArgs[($pos + 2)] = '';
+            PHP_CodeSniffer::setConfigData($key, $value, true);
+            break;
+        default:
+            if (substr($arg, 0, 7) === 'sniffs=') {
+                $sniffs = explode(',', substr($arg, 7));
+                foreach ($sniffs as $sniff) {
+                    if (substr_count($sniff, '.') !== 2) {
+                        echo 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
+                        $this->printUsage();
+                        exit(2);
+                    }
+                }
+
+                $this->values['sniffs'] = $sniffs;
+            } else if (substr($arg, 0, 10) === 'bootstrap=') {
+                $files = explode(',', substr($arg, 10));
+                foreach ($files as $file) {
+                    $path = PHP_CodeSniffer::realpath($file);
+                    if ($path === false) {
+                        echo 'ERROR: The specified bootstrap file "'.$file.'" does not exist'.PHP_EOL.PHP_EOL;
+                        $this->printUsage();
+                        exit(2);
+                    }
+
+                    $this->values['bootstrap'][] = $path;
+                }
+            } else if (substr($arg, 0, 12) === 'report-file=') {
+                $this->values['reportFile'] = PHP_CodeSniffer::realpath(substr($arg, 12));
+
+                // It may not exist and return false instead.
+                if ($this->values['reportFile'] === false) {
+                    $this->values['reportFile'] = substr($arg, 12);
+
+                    $dir = dirname($this->values['reportFile']);
+                    if (is_dir($dir) === false) {
+                        echo 'ERROR: The specified report file path "'.$this->values['reportFile'].'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
+                        $this->printUsage();
+                        exit(2);
+                    }
+
+                    if ($dir === '.') {
+                        // Passed report file is a file in the current directory.
+                        $this->values['reportFile'] = getcwd().'/'.basename($this->values['reportFile']);
+                    } else {
+                        $dir = PHP_CodeSniffer::realpath(getcwd().'/'.$dir);
+                        if ($dir !== false) {
+                            // Report file path is relative.
+                            $this->values['reportFile'] = $dir.'/'.basename($this->values['reportFile']);
+                        }
+                    }
+                }//end if
+
+                if (is_dir($this->values['reportFile']) === true) {
+                    echo 'ERROR: The specified report file path "'.$this->values['reportFile'].'" is a directory'.PHP_EOL.PHP_EOL;
+                    $this->printUsage();
+                    exit(2);
+                }
+            } else if (substr($arg, 0, 13) === 'report-width=') {
+                $this->values['reportWidth'] = $this->_validateReportWidth(substr($arg, 13));
+            } else if (substr($arg, 0, 7) === 'report='
+                || substr($arg, 0, 7) === 'report-'
+            ) {
+                if ($arg[6] === '-') {
+                    // This is a report with file output.
+                    $split = strpos($arg, '=');
+                    if ($split === false) {
+                        $report = substr($arg, 7);
+                        $output = null;
+                    } else {
+                        $report = substr($arg, 7, ($split - 7));
+                        $output = substr($arg, ($split + 1));
+                        if ($output === false) {
+                            $output = null;
+                        } else {
+                            $dir = dirname($output);
+                            if ($dir === '.') {
+                                // Passed report file is a filename in the current directory.
+                                $output = getcwd().'/'.basename($output);
+                            } else {
+                                $dir = PHP_CodeSniffer::realpath(getcwd().'/'.$dir);
+                                if ($dir !== false) {
+                                    // Report file path is relative.
+                                    $output = $dir.'/'.basename($output);
+                                }
+                            }
+                        }//end if
+                    }//end if
+                } else {
+                    // This is a single report.
+                    $report = substr($arg, 7);
+                    $output = null;
+                }//end if
+
+                $this->values['reports'][$report] = $output;
+            } else if (substr($arg, 0, 9) === 'standard=') {
+                $standards = trim(substr($arg, 9));
+                if ($standards !== '') {
+                    $this->values['standard'] = explode(',', $standards);
+                }
+            } else if (substr($arg, 0, 11) === 'extensions=') {
+                $this->values['extensions'] = array_merge($this->values['extensions'], explode(',', substr($arg, 11)));
+            } else if (substr($arg, 0, 9) === 'severity=') {
+                $this->values['errorSeverity']   = (int) substr($arg, 9);
+                $this->values['warningSeverity'] = $this->values['errorSeverity'];
+            } else if (substr($arg, 0, 15) === 'error-severity=') {
+                $this->values['errorSeverity'] = (int) substr($arg, 15);
+            } else if (substr($arg, 0, 17) === 'warning-severity=') {
+                $this->values['warningSeverity'] = (int) substr($arg, 17);
+            } else if (substr($arg, 0, 7) === 'ignore=') {
+                // Split the ignore string on commas, unless the comma is escaped
+                // using 1 or 3 slashes (\, or \\\,).
+                $ignored = preg_split(
+                    '/(?<=(?<!\\\\)\\\\\\\\),|(?<!\\\\),/',
+                    substr($arg, 7)
+                );
+                foreach ($ignored as $pattern) {
+                    $pattern = trim($pattern);
+                    if ($pattern === '') {
+                        continue;
+                    }
+
+                    $this->values['ignored'][$pattern] = 'absolute';
+                }
+            } else if (substr($arg, 0, 10) === 'generator=') {
+                $this->values['generator'] = substr($arg, 10);
+            } else if (substr($arg, 0, 9) === 'encoding=') {
+                $this->values['encoding'] = strtolower(substr($arg, 9));
+            } else if (substr($arg, 0, 10) === 'tab-width=') {
+                $this->values['tabWidth'] = (int) substr($arg, 10);
+            } else {
+                if ($this->dieOnUnknownArg === false) {
+                    $eqPos = strpos($arg, '=');
+                    if ($eqPos === false) {
+                        $this->values[$arg] = $arg;
+                    } else {
+                        $value = substr($arg, ($eqPos + 1));
+                        $arg   = substr($arg, 0, $eqPos);
+                        $this->values[$arg] = $value;
+                    }
+                } else {
+                    $this->processUnknownArgument('--'.$arg, $pos);
+                }
+            }//end if
+
+            break;
+        }//end switch
+
+    }//end processLongArgument()
+
+
+    /**
+     * Processes an unknown command line argument.
+     *
+     * Assumes all unknown arguments are files and folders to check.
+     *
+     * @param string $arg The command line argument.
+     * @param int    $pos The position of the argument on the command line.
+     *
+     * @return void
+     */
+    public function processUnknownArgument($arg, $pos)
+    {
+        // We don't know about any additional switches; just files.
+        if ($arg{0} === '-') {
+            if ($this->dieOnUnknownArg === false) {
+                return;
+            }
+
+            echo 'ERROR: option "'.$arg.'" not known.'.PHP_EOL.PHP_EOL;
+            $this->printUsage();
+            exit(2);
+        }
+
+        $file = PHP_CodeSniffer::realpath($arg);
+        if (file_exists($file) === false) {
+            if ($this->dieOnUnknownArg === false) {
+                return;
+            }
+
+            echo 'ERROR: The file "'.$arg.'" does not exist.'.PHP_EOL.PHP_EOL;
+            $this->printUsage();
+            exit(2);
+        } else {
+            $this->values['files'][] = $file;
+        }
+
+    }//end processUnknownArgument()
+
+
+    /**
+     * Runs PHP_CodeSniffer over files and directories.
+     *
+     * @param array $values An array of values determined from CLI args.
+     *
+     * @return int The number of error and warning messages shown.
+     * @see    getCommandLineValues()
+     */
+    public function process($values=array())
+    {
+        if (empty($values) === true) {
+            $values = $this->getCommandLineValues();
+        } else {
+            $values       = array_merge($this->getDefaults(), $values);
+            $this->values = $values;
+        }
+
+        if ($values['generator'] !== '') {
+            $phpcs = new PHP_CodeSniffer($values['verbosity']);
+            if ($values['standard'] === null) {
+                $values['standard'] = $this->validateStandard(null);
+            }
+
+            foreach ($values['standard'] as $standard) {
+                $phpcs->generateDocs(
+                    $standard,
+                    $values['sniffs'],
+                    $values['generator']
+                );
+            }
+
+            exit(0);
+        }
+
+        // If no standard is supplied, get the default.
+        $values['standard'] = $this->validateStandard($values['standard']);
+        foreach ($values['standard'] as $standard) {
+            if (PHP_CodeSniffer::isInstalledStandard($standard) === false) {
+                // They didn't select a valid coding standard, so help them
+                // out by letting them know which standards are installed.
+                echo 'ERROR: the "'.$standard.'" coding standard is not installed. ';
+                $this->printInstalledStandards();
+                exit(2);
+            }
+        }
+
+        if ($values['explain'] === true) {
+            foreach ($values['standard'] as $standard) {
+                $this->explainStandard($standard);
+            }
+
+            exit(0);
+        }
+
+        $phpcs = new PHP_CodeSniffer($values['verbosity'], null, null, null);
+        $phpcs->setCli($this);
+        $phpcs->initStandard($values['standard'], $values['sniffs']);
+        $values = $this->values;
+
+        $phpcs->setTabWidth($values['tabWidth']);
+        $phpcs->setEncoding($values['encoding']);
+        $phpcs->setInteractive($values['interactive']);
+
+        // Set file extensions if they were specified. Otherwise,
+        // let PHP_CodeSniffer decide on the defaults.
+        if (empty($values['extensions']) === false) {
+            $phpcs->setAllowedFileExtensions($values['extensions']);
+        }
+
+        // Set ignore patterns if they were specified.
+        if (empty($values['ignored']) === false) {
+            $ignorePatterns = array_merge($phpcs->getIgnorePatterns(), $values['ignored']);
+            $phpcs->setIgnorePatterns($ignorePatterns);
+        }
+
+        // Set some convenience member vars.
+        if ($values['errorSeverity'] === null) {
+            $this->errorSeverity = PHPCS_DEFAULT_ERROR_SEV;
+        } else {
+            $this->errorSeverity = $values['errorSeverity'];
+        }
+
+        if ($values['warningSeverity'] === null) {
+            $this->warningSeverity = PHPCS_DEFAULT_WARN_SEV;
+        } else {
+            $this->warningSeverity = $values['warningSeverity'];
+        }
+
+        if (empty($values['reports']) === true) {
+            $values['reports']['full'] = $values['reportFile'];
+            $this->values['reports']   = $values['reports'];
+        }
+
+        // Include bootstrap files.
+        foreach ($values['bootstrap'] as $bootstrap) {
+            include $bootstrap;
+        }
+
+        $phpcs->processFiles($values['files'], $values['local']);
+
+        if (empty($values['files']) === true) {
+            // Check if they are passing in the file contents.
+            $handle       = fopen('php://stdin', 'r');
+            $fileContents = stream_get_contents($handle);
+            fclose($handle);
+
+            if ($fileContents === '') {
+                // No files and no content passed in.
+                echo 'ERROR: You must supply at least one file or directory to process.'.PHP_EOL.PHP_EOL;
+                $this->printUsage();
+                exit(2);
+            } else {
+                if ($fileContents !== '') {
+                    $phpcs->processFile('STDIN', $fileContents);
+                }
+            }
+        }
+
+        // Interactive runs don't require a final report and it doesn't really
+        // matter what the retun value is because we know it isn't being read
+        // by a script.
+        if ($values['interactive'] === true) {
+            return 0;
+        }
+
+        return $this->printErrorReport(
+            $phpcs,
+            $values['reports'],
+            $values['showSources'],
+            $values['reportFile'],
+            $values['reportWidth']
+        );
+
+    }//end process()
+
+
+    /**
+     * Prints the error report for the run.
+     *
+     * Note that this function may actually print multiple reports
+     * as the user may have specified a number of output formats.
+     *
+     * @param PHP_CodeSniffer $phpcs       The PHP_CodeSniffer object containing
+     *                                     the errors.
+     * @param array           $reports     A list of reports to print.
+     * @param bool            $showSources TRUE if report should show error sources
+     *                                     (not used by all reports).
+     * @param string          $reportFile  A default file to log report output to.
+     * @param int             $reportWidth How wide the screen reports should be.
+     *
+     * @return int The number of error and warning messages shown.
+     */
+    public function printErrorReport(
+        PHP_CodeSniffer $phpcs,
+        $reports,
+        $showSources,
+        $reportFile,
+        $reportWidth
+    ) {
+        if (empty($reports) === true) {
+            $reports['full'] = $reportFile;
+        }
+
+        $errors   = 0;
+        $warnings = 0;
+        $toScreen = false;
+
+        foreach ($reports as $report => $output) {
+            if ($output === null) {
+                $output = $reportFile;
+            }
+
+            if ($reportFile === null) {
+                $toScreen = true;
+            }
+
+            // We don't add errors here because the number of
+            // errors reported by each report type will always be the
+            // same, so we really just need 1 number.
+            $result = $phpcs->reporting->printReport(
+                $report,
+                $showSources,
+                $this->values,
+                $output,
+                $reportWidth
+            );
+
+            $errors   = $result['errors'];
+            $warnings = $result['warnings'];
+        }//end foreach
+
+        // Only print timer output if no reports were
+        // printed to the screen so we don't put additional output
+        // in something like an XML report. If we are printing to screen,
+        // the report types would have already worked out who should
+        // print the timer info.
+        if (PHP_CODESNIFFER_INTERACTIVE === false
+            && ($toScreen === false
+            || (($errors + $warnings) === 0 && $this->values['showProgress'] === true))
+        ) {
+            PHP_CodeSniffer_Reporting::printRunTime();
+        }
+
+        // They should all return the same value, so it
+        // doesn't matter which return value we end up using.
+        $ignoreWarnings = PHP_CodeSniffer::getConfigData('ignore_warnings_on_exit');
+        $ignoreErrors   = PHP_CodeSniffer::getConfigData('ignore_errors_on_exit');
+
+        $return = ($errors + $warnings);
+        if ($ignoreErrors !== null) {
+            $ignoreErrors = (bool) $ignoreErrors;
+            if ($ignoreErrors === true) {
+                $return -= $errors;
+            }
+        }
+
+        if ($ignoreWarnings !== null) {
+            $ignoreWarnings = (bool) $ignoreWarnings;
+            if ($ignoreWarnings === true) {
+                $return -= $warnings;
+            }
+        }
+
+        return $return;
+
+    }//end printErrorReport()
+
+
+    /**
+     * Convert the passed standards into valid standards.
+     *
+     * Checks things like default values and case.
+     *
+     * @param array $standards The standards to validate.
+     *
+     * @return array
+     */
+    public function validateStandard($standards)
+    {
+        if ($standards === null) {
+            // They did not supply a standard to use.
+            // Look for a default ruleset in the current directory or higher.
+            $currentDir = getcwd();
+
+            do {
+                $default = $currentDir.DIRECTORY_SEPARATOR.'phpcs.xml';
+                if (is_file($default) === true) {
+                    return array($default);
+                }
+
+                $default = $currentDir.DIRECTORY_SEPARATOR.'phpcs.xml.dist';
+                if (is_file($default) === true) {
+                    return array($default);
+                }
+
+                $lastDir    = $currentDir;
+                $currentDir = dirname($currentDir);
+            } while ($currentDir !== '.' && $currentDir !== $lastDir);
+
+            // Try to get the default from the config system.
+            $standard = PHP_CodeSniffer::getConfigData('default_standard');
+            if ($standard === null) {
+                // Product default standard.
+                $standard = 'PEAR';
+            }
+
+            return array($standard);
+        }//end if
+
+        $cleaned   = array();
+        $standards = (array) $standards;
+
+        // Check if the standard name is valid, or if the case is invalid.
+        $installedStandards = PHP_CodeSniffer::getInstalledStandards();
+        foreach ($standards as $standard) {
+            foreach ($installedStandards as $validStandard) {
+                if (strtolower($standard) === strtolower($validStandard)) {
+                    $standard = $validStandard;
+                    break;
+                }
+            }
+
+            $cleaned[] = $standard;
+        }
+
+        return $cleaned;
+
+    }//end validateStandard()
+
+
+    /**
+     * Prints a report showing the sniffs contained in a standard.
+     *
+     * @param string $standard The standard to validate.
+     *
+     * @return void
+     */
+    public function explainStandard($standard)
+    {
+        $phpcs = new PHP_CodeSniffer();
+        $phpcs->process(array(), $standard);
+        $sniffs = $phpcs->getSniffs();
+        $sniffs = array_keys($sniffs);
+        sort($sniffs);
+
+        ob_start();
+
+        $lastStandard = '';
+        $lastCount    = '';
+        $sniffCount   = count($sniffs);
+        $sniffs[]     = '___';
+
+        echo PHP_EOL."The $standard standard contains $sniffCount sniffs".PHP_EOL;
+
+        ob_start();
+
+        foreach ($sniffs as $sniff) {
+            $parts = explode('_', str_replace('\\', '_', $sniff));
+            if ($lastStandard === '') {
+                $lastStandard = $parts[0];
+            }
+
+            if ($parts[0] !== $lastStandard) {
+                $sniffList = ob_get_contents();
+                ob_end_clean();
+
+                echo PHP_EOL.$lastStandard.' ('.$lastCount.' sniffs)'.PHP_EOL;
+                echo str_repeat('-', (strlen($lastStandard.$lastCount) + 10));
+                echo PHP_EOL;
+                echo $sniffList;
+
+                $lastStandard = $parts[0];
+                $lastCount    = 0;
+
+                ob_start();
+            }
+
+            echo '  '.$parts[0].'.'.$parts[2].'.'.substr($parts[3], 0, -5).PHP_EOL;
+            $lastCount++;
+        }//end foreach
+
+        ob_end_clean();
+
+    }//end explainStandard()
+
+
+    /**
+     * Prints out the gathered config data.
+     *
+     * @param array $data The config data to print.
+     *
+     * @return void
+     */
+    public function printConfigData($data)
+    {
+        $max  = 0;
+        $keys = array_keys($data);
+        foreach ($keys as $key) {
+            $len = strlen($key);
+            if (strlen($key) > $max) {
+                $max = $len;
+            }
+        }
+
+        if ($max === 0) {
+            return;
+        }
+
+        $max += 2;
+        ksort($data);
+        foreach ($data as $name => $value) {
+            echo str_pad($name.': ', $max).$value.PHP_EOL;
+        }
+
+    }//end printConfigData()
+
+
+    /**
+     * Prints out the usage information for this script.
+     *
+     * @return void
+     */
+    public function printUsage()
+    {
+        if (PHP_CODESNIFFER_CBF === true) {
+            $this->printPHPCBFUsage();
+        } else {
+            $this->printPHPCSUsage();
+        }
+
+    }//end printUsage()
+
+
+    /**
+     * Prints out the usage information for PHPCS.
+     *
+     * @return void
+     */
+    public function printPHPCSUsage()
+    {
+        echo 'Usage: phpcs [-nwlsaepvi] [-d key[=value]] [--colors] [--no-colors]'.PHP_EOL;
+        echo '    [--report=<report>] [--report-file=<reportFile>] [--report-<report>=<reportFile>] ...'.PHP_EOL;
+        echo '    [--report-width=<reportWidth>] [--generator=<generator>] [--tab-width=<tabWidth>]'.PHP_EOL;
+        echo '    [--severity=<severity>] [--error-severity=<severity>] [--warning-severity=<severity>]'.PHP_EOL;
+        echo '    [--runtime-set key value] [--config-set key value] [--config-delete key] [--config-show]'.PHP_EOL;
+        echo '    [--standard=<standard>] [--sniffs=<sniffs>] [--encoding=<encoding>]'.PHP_EOL;
+        echo '    [--extensions=<extensions>] [--ignore=<patterns>] [--bootstrap=<bootstrap>] <file> ...'.PHP_EOL;
+        echo '                      Set runtime value (see --config-set) '.PHP_EOL;
+        echo '        -n            Do not print warnings (shortcut for --warning-severity=0)'.PHP_EOL;
+        echo '        -w            Print both warnings and errors (this is the default)'.PHP_EOL;
+        echo '        -l            Local directory only, no recursion'.PHP_EOL;
+        echo '        -s            Show sniff codes in all reports'.PHP_EOL;
+        echo '        -a            Run interactively'.PHP_EOL;
+        echo '        -e            Explain a standard by showing the sniffs it includes'.PHP_EOL;
+        echo '        -p            Show progress of the run'.PHP_EOL;
+        echo '        -v[v][v]      Print verbose output'.PHP_EOL;
+        echo '        -i            Show a list of installed coding standards'.PHP_EOL;
+        echo '        -d            Set the [key] php.ini value to [value] or [true] if value is omitted'.PHP_EOL;
+        echo '        --help        Print this help message'.PHP_EOL;
+        echo '        --version     Print version information'.PHP_EOL;
+        echo '        --colors      Use colors in output'.PHP_EOL;
+        echo '        --no-colors   Do not use colors in output (this is the default)'.PHP_EOL;
+        echo '        <file>        One or more files and/or directories to check'.PHP_EOL;
+        echo '        <bootstrap>   A comma separated list of files to run before processing starts'.PHP_EOL;
+        echo '        <encoding>    The encoding of the files being checked (default is iso-8859-1)'.PHP_EOL;
+        echo '        <extensions>  A comma separated list of file extensions to check'.PHP_EOL;
+        echo '                      (extension filtering only valid when checking a directory)'.PHP_EOL;
+        echo '                      The type of the file can be specified using: ext/type'.PHP_EOL;
+        echo '                      e.g., module/php,es/js'.PHP_EOL;
+        echo '        <generator>   Uses either the "HMTL", "Markdown" or "Text" generator'.PHP_EOL;
+        echo '                      (forces documentation generation instead of checking)'.PHP_EOL;
+        echo '        <patterns>    A comma separated list of patterns to ignore files and directories'.PHP_EOL;
+        echo '        <report>      Print either the "full", "xml", "checkstyle", "csv"'.PHP_EOL;
+        echo '                      "json", "emacs", "source", "summary", "diff"'.PHP_EOL;
+        echo '                      "svnblame", "gitblame", "hgblame" or "notifysend" report'.PHP_EOL;
+        echo '                      (the "full" report is printed by default)'.PHP_EOL;
+        echo '        <reportFile>  Write the report to the specified file path'.PHP_EOL;
+        echo '        <reportWidth> How many columns wide screen reports should be printed'.PHP_EOL;
+        echo '                      or set to "auto" to use current screen width, where supported'.PHP_EOL;
+        echo '        <sniffs>      A comma separated list of sniff codes to limit the check to'.PHP_EOL;
+        echo '                      (all sniffs must be part of the specified standard)'.PHP_EOL;
+        echo '        <severity>    The minimum severity required to display an error or warning'.PHP_EOL;
+        echo '        <standard>    The name or path of the coding standard to use'.PHP_EOL;
+        echo '        <tabWidth>    The number of spaces each tab represents'.PHP_EOL;
+
+    }//end printPHPCSUsage()
+
+
+    /**
+     * Prints out the usage information for PHPCBF.
+     *
+     * @return void
+     */
+    public function printPHPCBFUsage()
+    {
+        echo 'Usage: phpcbf [-nwli] [-d key[=value]]'.PHP_EOL;
+        echo '    [--standard=<standard>] [--sniffs=<sniffs>] [--suffix=<suffix>]'.PHP_EOL;
+        echo '    [--severity=<severity>] [--error-severity=<severity>] [--warning-severity=<severity>]'.PHP_EOL;
+        echo '    [--tab-width=<tabWidth>] [--encoding=<encoding>]'.PHP_EOL;
+        echo '    [--extensions=<extensions>] [--ignore=<patterns>] [--bootstrap=<bootstrap>] <file> ...'.PHP_EOL;
+        echo '        -n            Do not fix warnings (shortcut for --warning-severity=0)'.PHP_EOL;
+        echo '        -w            Fix both warnings and errors (on by default)'.PHP_EOL;
+        echo '        -l            Local directory only, no recursion'.PHP_EOL;
+        echo '        -i            Show a list of installed coding standards'.PHP_EOL;
+        echo '        -d            Set the [key] php.ini value to [value] or [true] if value is omitted'.PHP_EOL;
+        echo '        --help        Print this help message'.PHP_EOL;
+        echo '        --version     Print version information'.PHP_EOL;
+        echo '        --no-patch    Do not make use of the "diff" or "patch" programs'.PHP_EOL;
+        echo '        <file>        One or more files and/or directories to fix'.PHP_EOL;
+        echo '        <bootstrap>   A comma separated list of files to run before processing starts'.PHP_EOL;
+        echo '        <encoding>    The encoding of the files being fixed (default is iso-8859-1)'.PHP_EOL;
+        echo '        <extensions>  A comma separated list of file extensions to fix'.PHP_EOL;
+        echo '                      (extension filtering only valid when checking a directory)'.PHP_EOL;
+        echo '                      The type of the file can be specified using: ext/type'.PHP_EOL;
+        echo '                      e.g., module/php,es/js'.PHP_EOL;
+        echo '        <patterns>    A comma separated list of patterns to ignore files and directories'.PHP_EOL;
+        echo '        <sniffs>      A comma separated list of sniff codes to limit the fixes to'.PHP_EOL;
+        echo '                      (all sniffs must be part of the specified standard)'.PHP_EOL;
+        echo '        <severity>    The minimum severity required to fix an error or warning'.PHP_EOL;
+        echo '        <standard>    The name or path of the coding standard to use'.PHP_EOL;
+        echo '        <suffix>      Write modified files to a filename using this suffix'.PHP_EOL;
+        echo '                      ("diff" and "patch" are not used in this mode)'.PHP_EOL;
+        echo '        <tabWidth>    The number of spaces each tab represents'.PHP_EOL;
+
+    }//end printPHPCBFUsage()
+
+
+    /**
+     * Prints out a list of installed coding standards.
+     *
+     * @return void
+     */
+    public function printInstalledStandards()
+    {
+        $installedStandards = PHP_CodeSniffer::getInstalledStandards();
+        $numStandards       = count($installedStandards);
+
+        if ($numStandards === 0) {
+            echo 'No coding standards are installed.'.PHP_EOL;
+        } else {
+            $lastStandard = array_pop($installedStandards);
+            if ($numStandards === 1) {
+                echo "The only coding standard installed is $lastStandard".PHP_EOL;
+            } else {
+                $standardList  = implode(', ', $installedStandards);
+                $standardList .= ' and '.$lastStandard;
+                echo 'The installed coding standards are '.$standardList.PHP_EOL;
+            }
+        }
+
+    }//end printInstalledStandards()
+
+
+    /**
+     * Set report width based on terminal width.
+     *
+     * @param int $width The width of the report. If "auto" then will
+     *                   be replaced by the terminal width.
+     *
+     * @return void
+     */
+    private function _validateReportWidth($width)
+    {
+        if ($width === 'auto'
+            && preg_match('|\d+ (\d+)|', shell_exec('stty size 2>&1'), $matches) === 1
+        ) {
+            return (int) $matches[1];
+        }
+
+        return (int) $width;
+
+    }//end _validateReportWidth()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Generator.php	(revision 5534)
@@ -0,0 +1,184 @@
+<?php
+/**
+ * The base class for all PHP_CodeSniffer documentation generators.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * The base class for all PHP_CodeSniffer documentation generators.
+ *
+ * Documentation generators are used to print documentation about code sniffs
+ * in a standard.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+abstract class PHP_CodeSniffer_DocGenerators_Generator
+{
+
+    /**
+     * The name of the coding standard we are generating docs for.
+     *
+     * @var string
+     */
+    private $_standard = '';
+
+    /**
+     * An array of sniffs that we are limiting the generated docs to.
+     *
+     * If this array is empty, docs are generated for all sniffs in the
+     * supplied coding standard.
+     *
+     * @var string
+     */
+    private $_sniffs = array();
+
+
+    /**
+     * Constructs a PHP_CodeSniffer_DocGenerators_Generator object.
+     *
+     * @param string $standard The name of the coding standard to generate
+     *                         docs for.
+     * @param array  $sniffs   An array of sniffs that we are limiting the
+     *                         generated docs to.
+     *
+     * @see generate()
+     */
+    public function __construct($standard, array $sniffs=array())
+    {
+        $this->_standard = $standard;
+        $this->_sniffs   = $sniffs;
+
+    }//end __construct()
+
+
+    /**
+     * Retrieves the title of the sniff from the DOMNode supplied.
+     *
+     * @param DOMNode $doc The DOMNode object for the sniff.
+     *                     It represents the "documentation" tag in the XML
+     *                     standard file.
+     *
+     * @return string
+     */
+    protected function getTitle(DOMNode $doc)
+    {
+        return $doc->getAttribute('title');
+
+    }//end getTitle()
+
+
+    /**
+     * Retrieves the name of the standard we are generating docs for.
+     *
+     * @return string
+     */
+    protected function getStandard()
+    {
+        return $this->_standard;
+
+    }//end getStandard()
+
+
+    /**
+     * Generates the documentation for a standard.
+     *
+     * It's probably wise for doc generators to override this method so they
+     * have control over how the docs are produced. Otherwise, the processSniff
+     * method should be overridden to output content for each sniff.
+     *
+     * @return void
+     * @see    processSniff()
+     */
+    public function generate()
+    {
+        $standardFiles = $this->getStandardFiles();
+
+        foreach ($standardFiles as $standard) {
+            $doc = new DOMDocument();
+            $doc->load($standard);
+            $documentation = $doc->getElementsByTagName('documentation')->item(0);
+            $this->processSniff($documentation);
+        }
+
+    }//end generate()
+
+
+    /**
+     * Returns a list of paths to XML standard files for all sniffs in a standard.
+     *
+     * Any sniffs that do not have an XML standard file are obviously not included
+     * in the returned array. If documentation is only being generated for some
+     * sniffs (ie. $this->_sniffs is not empty) then all others sniffs will
+     * be filtered from the results as well.
+     *
+     * @return string[]
+     */
+    protected function getStandardFiles()
+    {
+        $phpcs = new PHP_CodeSniffer();
+        $phpcs->process(array(), $this->_standard);
+        $sniffs = $phpcs->getSniffs();
+
+        $standardFiles = array();
+        foreach ($sniffs as $className => $sniffClass) {
+            $object = new ReflectionObject($sniffClass);
+            $sniff  = $object->getFilename();
+            if (empty($this->_sniffs) === false) {
+                // We are limiting the docs to certain sniffs only, so filter
+                // out any unwanted sniffs.
+                $parts     = explode('_', $className);
+                $sniffName = $parts[0].'.'.$parts[2].'.'.substr($parts[3], 0, -5);
+                if (in_array($sniffName, $this->_sniffs) === false) {
+                    continue;
+                }
+            }
+
+            $standardFile = str_replace(
+                DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR,
+                DIRECTORY_SEPARATOR.'Docs'.DIRECTORY_SEPARATOR,
+                $sniff
+            );
+            $standardFile = str_replace('Sniff.php', 'Standard.xml', $standardFile);
+
+            if (is_file($standardFile) === true) {
+                $standardFiles[] = $standardFile;
+            }
+        }//end foreach
+
+        return $standardFiles;
+
+    }//end getStandardFiles()
+
+
+    /**
+     * Process the documentation for a single sniff.
+     *
+     * Doc generators must implement this function to produce output.
+     *
+     * @param DOMNode $doc The DOMNode object for the sniff.
+     *                     It represents the "documentation" tag in the XML
+     *                     standard file.
+     *
+     * @return void
+     * @see    generate()
+     */
+    protected abstract function processSniff(DOMNode $doc);
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/HTML.php	(revision 5534)
@@ -0,0 +1,292 @@
+<?php
+/**
+ * A doc generator that outputs documentation in one big HTML file.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_DocGenerators_Generator', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_DocGenerators_Generator not found');
+}
+
+/**
+ * A doc generator that outputs documentation in one big HTML file.
+ *
+ * Output is in one large HTML file and is designed for you to style with
+ * your own stylesheet. It contains a table of contents at the top with anchors
+ * to each sniff.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_DocGenerators_HTML extends PHP_CodeSniffer_DocGenerators_Generator
+{
+
+
+    /**
+     * Generates the documentation for a standard.
+     *
+     * @return void
+     * @see    processSniff()
+     */
+    public function generate()
+    {
+        ob_start();
+        $this->printHeader();
+
+        $standardFiles = $this->getStandardFiles();
+        $this->printToc($standardFiles);
+
+        foreach ($standardFiles as $standard) {
+            $doc = new DOMDocument();
+            $doc->load($standard);
+            $documentation = $doc->getElementsByTagName('documentation')->item(0);
+            $this->processSniff($documentation);
+        }
+
+        $this->printFooter();
+
+        $content = ob_get_contents();
+        ob_end_clean();
+
+        echo $content;
+
+    }//end generate()
+
+
+    /**
+     * Print the header of the HTML page.
+     *
+     * @return void
+     */
+    protected function printHeader()
+    {
+        $standard = $this->getStandard();
+        echo '<html>'.PHP_EOL;
+        echo ' <head>'.PHP_EOL;
+        echo "  <title>$standard Coding Standards</title>".PHP_EOL;
+        echo '  <style>
+                    body {
+                        background-color: #FFFFFF;
+                        font-size: 14px;
+                        font-family: Arial, Helvetica, sans-serif;
+                        color: #000000;
+                    }
+
+                    h1 {
+                        color: #666666;
+                        font-size: 20px;
+                        font-weight: bold;
+                        margin-top: 0px;
+                        background-color: #E6E7E8;
+                        padding: 20px;
+                        border: 1px solid #BBBBBB;
+                    }
+
+                    h2 {
+                        color: #00A5E3;
+                        font-size: 16px;
+                        font-weight: normal;
+                        margin-top: 50px;
+                    }
+
+                    .code-comparison {
+                        width: 100%;
+                    }
+
+                    .code-comparison td {
+                        border: 1px solid #CCCCCC;
+                    }
+
+                    .code-comparison-title, .code-comparison-code {
+                        font-family: Arial, Helvetica, sans-serif;
+                        font-size: 12px;
+                        color: #000000;
+                        vertical-align: top;
+                        padding: 4px;
+                        width: 50%;
+                        background-color: #F1F1F1;
+                        line-height: 15px;
+                    }
+
+                    .code-comparison-code {
+                        font-family: Courier;
+                        background-color: #F9F9F9;
+                    }
+
+                    .code-comparison-highlight {
+                        background-color: #DDF1F7;
+                        border: 1px solid #00A5E3;
+                        line-height: 15px;
+                    }
+
+                    .tag-line {
+                        text-align: center;
+                        width: 100%;
+                        margin-top: 30px;
+                        font-size: 12px;
+                    }
+
+                    .tag-line a {
+                        color: #000000;
+                    }
+                </style>'.PHP_EOL;
+        echo ' </head>'.PHP_EOL;
+        echo ' <body>'.PHP_EOL;
+        echo "  <h1>$standard Coding Standards</h1>".PHP_EOL;
+
+    }//end printHeader()
+
+
+    /**
+     * Print the table of contents for the standard.
+     *
+     * The TOC is just an unordered list of bookmarks to sniffs on the page.
+     *
+     * @param array $standardFiles An array of paths to the XML standard files.
+     *
+     * @return void
+     */
+    protected function printToc($standardFiles)
+    {
+        echo '  <h2>Table of Contents</h2>'.PHP_EOL;
+        echo '  <ul class="toc">'.PHP_EOL;
+
+        foreach ($standardFiles as $standard) {
+            $doc = new DOMDocument();
+            $doc->load($standard);
+            $documentation = $doc->getElementsByTagName('documentation')->item(0);
+            $title         = $this->getTitle($documentation);
+            echo '   <li><a href="#'.str_replace(' ', '-', $title)."\">$title</a></li>".PHP_EOL;
+        }
+
+        echo '  </ul>'.PHP_EOL;
+
+    }//end printToc()
+
+
+    /**
+     * Print the footer of the HTML page.
+     *
+     * @return void
+     */
+    protected function printFooter()
+    {
+        // Turn off errors so we don't get timezone warnings if people
+        // don't have their timezone set.
+        $errorLevel = error_reporting(0);
+        echo '  <div class="tag-line">';
+        echo 'Documentation generated on '.date('r');
+        echo ' by <a href="https://github.com/squizlabs/PHP_CodeSniffer">PHP_CodeSniffer '.PHP_CodeSniffer::VERSION.'</a>';
+        echo '</div>'.PHP_EOL;
+        error_reporting($errorLevel);
+
+        echo ' </body>'.PHP_EOL;
+        echo '</html>'.PHP_EOL;
+
+    }//end printFooter()
+
+
+    /**
+     * Process the documentation for a single sniff.
+     *
+     * @param DOMNode $doc The DOMNode object for the sniff.
+     *                     It represents the "documentation" tag in the XML
+     *                     standard file.
+     *
+     * @return void
+     */
+    public function processSniff(DOMNode $doc)
+    {
+        $title = $this->getTitle($doc);
+        echo '  <a name="'.str_replace(' ', '-', $title).'" />'.PHP_EOL;
+        echo "  <h2>$title</h2>".PHP_EOL;
+
+        foreach ($doc->childNodes as $node) {
+            if ($node->nodeName === 'standard') {
+                $this->printTextBlock($node);
+            } else if ($node->nodeName === 'code_comparison') {
+                $this->printCodeComparisonBlock($node);
+            }
+        }
+
+    }//end processSniff()
+
+
+    /**
+     * Print a text block found in a standard.
+     *
+     * @param DOMNode $node The DOMNode object for the text block.
+     *
+     * @return void
+     */
+    protected function printTextBlock($node)
+    {
+        $content = trim($node->nodeValue);
+        $content = htmlspecialchars($content);
+
+        // Allow em tags only.
+        $content = str_replace('&lt;em&gt;', '<em>', $content);
+        $content = str_replace('&lt;/em&gt;', '</em>', $content);
+
+        echo "  <p class=\"text\">$content</p>".PHP_EOL;
+
+    }//end printTextBlock()
+
+
+    /**
+     * Print a code comparison block found in a standard.
+     *
+     * @param DOMNode $node The DOMNode object for the code comparison block.
+     *
+     * @return void
+     */
+    protected function printCodeComparisonBlock($node)
+    {
+        $codeBlocks = $node->getElementsByTagName('code');
+
+        $firstTitle = $codeBlocks->item(0)->getAttribute('title');
+        $first      = trim($codeBlocks->item(0)->nodeValue);
+        $first      = str_replace('<?php', '&lt;?php', $first);
+        $first      = str_replace("\n", '</br>', $first);
+        $first      = str_replace(' ', '&nbsp;', $first);
+        $first      = str_replace('<em>', '<span class="code-comparison-highlight">', $first);
+        $first      = str_replace('</em>', '</span>', $first);
+
+        $secondTitle = $codeBlocks->item(1)->getAttribute('title');
+        $second      = trim($codeBlocks->item(1)->nodeValue);
+        $second      = str_replace('<?php', '&lt;?php', $second);
+        $second      = str_replace("\n", '</br>', $second);
+        $second      = str_replace(' ', '&nbsp;', $second);
+        $second      = str_replace('<em>', '<span class="code-comparison-highlight">', $second);
+        $second      = str_replace('</em>', '</span>', $second);
+
+        echo '  <table class="code-comparison">'.PHP_EOL;
+        echo '   <tr>'.PHP_EOL;
+        echo "    <td class=\"code-comparison-title\">$firstTitle</td>".PHP_EOL;
+        echo "    <td class=\"code-comparison-title\">$secondTitle</td>".PHP_EOL;
+        echo '   </tr>'.PHP_EOL;
+        echo '   <tr>'.PHP_EOL;
+        echo "    <td class=\"code-comparison-code\">$first</td>".PHP_EOL;
+        echo "    <td class=\"code-comparison-code\">$second</td>".PHP_EOL;
+        echo '   </tr>'.PHP_EOL;
+        echo '  </table>'.PHP_EOL;
+
+    }//end printCodeComparisonBlock()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Markdown.php	(revision 5534)
@@ -0,0 +1,179 @@
+<?php
+/**
+ * A doc generator that outputs documentation in Markdown format.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Stefano Kowalke <blueduck@gmx.net>
+ * @copyright 2014 Arroba IT
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_DocGenerators_Generator', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_DocGenerators_Generator not found');
+}
+
+/**
+ * A doc generator that outputs documentation in Markdown format.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Stefano Kowalke <blueduck@gmx.net>
+ * @copyright 2014 Arroba IT
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_DocGenerators_Markdown extends PHP_CodeSniffer_DocGenerators_Generator
+{
+
+
+    /**
+     * Generates the documentation for a standard.
+     *
+     * @return void
+     * @see    processSniff()
+     */
+    public function generate()
+    {
+        ob_start();
+        $this->printHeader();
+
+        $standardFiles = $this->getStandardFiles();
+
+        foreach ($standardFiles as $standard) {
+            $doc = new DOMDocument();
+            $doc->load($standard);
+            $documentation = $doc->getElementsByTagName('documentation')->item(0);
+            $this->processSniff($documentation);
+        }
+
+        $this->printFooter();
+        $content = ob_get_contents();
+        ob_end_clean();
+
+        echo $content;
+
+    }//end generate()
+
+
+    /**
+     * Print the markdown header.
+     *
+     * @return void
+     */
+    protected function printHeader()
+    {
+        $standard = $this->getStandard();
+
+        echo "# $standard Coding Standard".PHP_EOL;
+
+    }//end printHeader()
+
+
+    /**
+     * Print the markdown footer.
+     *
+     * @return void
+     */
+    protected function printFooter()
+    {
+        // Turn off errors so we don't get timezone warnings if people
+        // don't have their timezone set.
+        error_reporting(0);
+        echo 'Documentation generated on '.date('r');
+        echo ' by [PHP_CodeSniffer '.PHP_CodeSniffer::VERSION.'](https://github.com/squizlabs/PHP_CodeSniffer)';
+
+    }//end printFooter()
+
+
+    /**
+     * Process the documentation for a single sniff.
+     *
+     * @param DOMNode $doc The DOMNode object for the sniff.
+     *                     It represents the "documentation" tag in the XML
+     *                     standard file.
+     *
+     * @return void
+     */
+    protected function processSniff(DOMNode $doc)
+    {
+        $title = $this->getTitle($doc);
+        echo "## $title".PHP_EOL;
+
+        foreach ($doc->childNodes as $node) {
+            if ($node->nodeName === 'standard') {
+                $this->printTextBlock($node);
+            } else if ($node->nodeName === 'code_comparison') {
+                $this->printCodeComparisonBlock($node);
+            }
+        }
+
+    }//end processSniff()
+
+
+    /**
+     * Print a text block found in a standard.
+     *
+     * @param DOMNode $node The DOMNode object for the text block.
+     *
+     * @return void
+     */
+    protected function printTextBlock(DOMNode $node)
+    {
+        $content = trim($node->nodeValue);
+        $content = htmlspecialchars($content);
+
+        $content = str_replace('&lt;em&gt;', '*', $content);
+        $content = str_replace('&lt;/em&gt;', '*', $content);
+
+        echo $content.PHP_EOL;
+
+    }//end printTextBlock()
+
+
+    /**
+     * Print a code comparison block found in a standard.
+     *
+     * @param DOMNode $node The DOMNode object for the code comparison block.
+     *
+     * @return void
+     */
+    protected function printCodeComparisonBlock(DOMNode $node)
+    {
+        $codeBlocks = $node->getElementsByTagName('code');
+
+        $firstTitle = $codeBlocks->item(0)->getAttribute('title');
+        $first      = trim($codeBlocks->item(0)->nodeValue);
+        $first      = str_replace("\n", "\n    ", $first);
+        $first      = str_replace('<em>', '', $first);
+        $first      = str_replace('</em>', '', $first);
+
+        $secondTitle = $codeBlocks->item(1)->getAttribute('title');
+        $second      = trim($codeBlocks->item(1)->nodeValue);
+        $second      = str_replace("\n", "\n    ", $second);
+        $second      = str_replace('<em>', '', $second);
+        $second      = str_replace('</em>', '', $second);
+
+        echo '  <table>'.PHP_EOL;
+        echo '   <tr>'.PHP_EOL;
+        echo "    <th>$firstTitle</th>".PHP_EOL;
+        echo "    <th>$secondTitle</th>".PHP_EOL;
+        echo '   </tr>'.PHP_EOL;
+        echo '   <tr>'.PHP_EOL;
+        echo '<td>'.PHP_EOL.PHP_EOL;
+        echo "    $first".PHP_EOL.PHP_EOL;
+        echo '</td>'.PHP_EOL;
+        echo '<td>'.PHP_EOL.PHP_EOL;
+        echo "    $second".PHP_EOL.PHP_EOL;
+        echo '</td>'.PHP_EOL;
+        echo '   </tr>'.PHP_EOL;
+        echo '  </table>'.PHP_EOL;
+
+    }//end printCodeComparisonBlock()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/Text.php	(revision 5534)
@@ -0,0 +1,265 @@
+<?php
+/**
+ * A doc generator that outputs text-based documentation.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_DocGenerators_Generator', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_DocGenerators_Generator not found');
+}
+
+/**
+ * A doc generator that outputs text-based documentation.
+ *
+ * Output is designed to be displayed in a terminal and is wrapped to 100 characters.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_DocGenerators_Text extends PHP_CodeSniffer_DocGenerators_Generator
+{
+
+
+    /**
+     * Process the documentation for a single sniff.
+     *
+     * @param DOMNode $doc The DOMNode object for the sniff.
+     *                     It represents the "documentation" tag in the XML
+     *                     standard file.
+     *
+     * @return void
+     */
+    public function processSniff(DOMNode $doc)
+    {
+        $this->printTitle($doc);
+
+        foreach ($doc->childNodes as $node) {
+            if ($node->nodeName === 'standard') {
+                $this->printTextBlock($node);
+            } else if ($node->nodeName === 'code_comparison') {
+                $this->printCodeComparisonBlock($node);
+            }
+        }
+
+    }//end processSniff()
+
+
+    /**
+     * Prints the title area for a single sniff.
+     *
+     * @param DOMNode $doc The DOMNode object for the sniff.
+     *                     It represents the "documentation" tag in the XML
+     *                     standard file.
+     *
+     * @return void
+     */
+    protected function printTitle(DOMNode $doc)
+    {
+        $title    = $this->getTitle($doc);
+        $standard = $this->getStandard();
+
+        echo PHP_EOL;
+        echo str_repeat('-', (strlen("$standard CODING STANDARD: $title") + 4));
+        echo strtoupper(PHP_EOL."| $standard CODING STANDARD: $title |".PHP_EOL);
+        echo str_repeat('-', (strlen("$standard CODING STANDARD: $title") + 4));
+        echo PHP_EOL.PHP_EOL;
+
+    }//end printTitle()
+
+
+    /**
+     * Print a text block found in a standard.
+     *
+     * @param DOMNode $node The DOMNode object for the text block.
+     *
+     * @return void
+     */
+    protected function printTextBlock($node)
+    {
+        $text = trim($node->nodeValue);
+        $text = str_replace('<em>', '*', $text);
+        $text = str_replace('</em>', '*', $text);
+
+        $lines    = array();
+        $tempLine = '';
+        $words    = explode(' ', $text);
+
+        foreach ($words as $word) {
+            if (strlen($tempLine.$word) >= 99) {
+                if (strlen($tempLine.$word) === 99) {
+                    // Adding the extra space will push us to the edge
+                    // so we are done.
+                    $lines[]  = $tempLine.$word;
+                    $tempLine = '';
+                } else if (strlen($tempLine.$word) === 100) {
+                    // We are already at the edge, so we are done.
+                    $lines[]  = $tempLine.$word;
+                    $tempLine = '';
+                } else {
+                    $lines[]  = rtrim($tempLine);
+                    $tempLine = $word.' ';
+                }
+            } else {
+                $tempLine .= $word.' ';
+            }
+        }//end foreach
+
+        if ($tempLine !== '') {
+            $lines[] = rtrim($tempLine);
+        }
+
+        echo implode(PHP_EOL, $lines).PHP_EOL.PHP_EOL;
+
+    }//end printTextBlock()
+
+
+    /**
+     * Print a code comparison block found in a standard.
+     *
+     * @param DOMNode $node The DOMNode object for the code comparison block.
+     *
+     * @return void
+     */
+    protected function printCodeComparisonBlock($node)
+    {
+        $codeBlocks = $node->getElementsByTagName('code');
+        $first      = trim($codeBlocks->item(0)->nodeValue);
+        $firstTitle = $codeBlocks->item(0)->getAttribute('title');
+
+        $firstTitleLines = array();
+        $tempTitle       = '';
+        $words           = explode(' ', $firstTitle);
+
+        foreach ($words as $word) {
+            if (strlen($tempTitle.$word) >= 45) {
+                if (strlen($tempTitle.$word) === 45) {
+                    // Adding the extra space will push us to the edge
+                    // so we are done.
+                    $firstTitleLines[] = $tempTitle.$word;
+                    $tempTitle         = '';
+                } else if (strlen($tempTitle.$word) === 46) {
+                    // We are already at the edge, so we are done.
+                    $firstTitleLines[] = $tempTitle.$word;
+                    $tempTitle         = '';
+                } else {
+                    $firstTitleLines[] = $tempTitle;
+                    $tempTitle         = $word;
+                }
+            } else {
+                $tempTitle .= $word.' ';
+            }
+        }//end foreach
+
+        if ($tempTitle !== '') {
+            $firstTitleLines[] = $tempTitle;
+        }
+
+        $first      = str_replace('<em>', '', $first);
+        $first      = str_replace('</em>', '', $first);
+        $firstLines = explode("\n", $first);
+
+        $second      = trim($codeBlocks->item(1)->nodeValue);
+        $secondTitle = $codeBlocks->item(1)->getAttribute('title');
+
+        $secondTitleLines = array();
+        $tempTitle        = '';
+        $words            = explode(' ', $secondTitle);
+
+        foreach ($words as $word) {
+            if (strlen($tempTitle.$word) >= 45) {
+                if (strlen($tempTitle.$word) === 45) {
+                    // Adding the extra space will push us to the edge
+                    // so we are done.
+                    $secondTitleLines[] = $tempTitle.$word;
+                    $tempTitle          = '';
+                } else if (strlen($tempTitle.$word) === 46) {
+                    // We are already at the edge, so we are done.
+                    $secondTitleLines[] = $tempTitle.$word;
+                    $tempTitle          = '';
+                } else {
+                    $secondTitleLines[] = $tempTitle;
+                    $tempTitle          = $word;
+                }
+            } else {
+                $tempTitle .= $word.' ';
+            }
+        }//end foreach
+
+        if ($tempTitle !== '') {
+            $secondTitleLines[] = $tempTitle;
+        }
+
+        $second      = str_replace('<em>', '', $second);
+        $second      = str_replace('</em>', '', $second);
+        $secondLines = explode("\n", $second);
+
+        $maxCodeLines  = max(count($firstLines), count($secondLines));
+        $maxTitleLines = max(count($firstTitleLines), count($secondTitleLines));
+
+        echo str_repeat('-', 41);
+        echo ' CODE COMPARISON ';
+        echo str_repeat('-', 42).PHP_EOL;
+
+        for ($i = 0; $i < $maxTitleLines; $i++) {
+            if (isset($firstTitleLines[$i]) === true) {
+                $firstLineText = $firstTitleLines[$i];
+            } else {
+                $firstLineText = '';
+            }
+
+            if (isset($secondTitleLines[$i]) === true) {
+                $secondLineText = $secondTitleLines[$i];
+            } else {
+                $secondLineText = '';
+            }
+
+            echo '| ';
+            echo $firstLineText.str_repeat(' ', (46 - strlen($firstLineText)));
+            echo ' | ';
+            echo $secondLineText.str_repeat(' ', (47 - strlen($secondLineText)));
+            echo ' |'.PHP_EOL;
+        }//end for
+
+        echo str_repeat('-', 100).PHP_EOL;
+
+        for ($i = 0; $i < $maxCodeLines; $i++) {
+            if (isset($firstLines[$i]) === true) {
+                $firstLineText = $firstLines[$i];
+            } else {
+                $firstLineText = '';
+            }
+
+            if (isset($secondLines[$i]) === true) {
+                $secondLineText = $secondLines[$i];
+            } else {
+                $secondLineText = '';
+            }
+
+            echo '| ';
+            echo $firstLineText.str_repeat(' ', (47 - strlen($firstLineText)));
+            echo '| ';
+            echo $secondLineText.str_repeat(' ', (48 - strlen($secondLineText)));
+            echo '|'.PHP_EOL;
+        }//end for
+
+        echo str_repeat('-', 100).PHP_EOL.PHP_EOL;
+
+    }//end printCodeComparisonBlock()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Exception.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Exception.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Exception.php	(revision 5534)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * An exception thrown by PHP_CodeSniffer when it encounters an unrecoverable error.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * An exception thrown by PHP_CodeSniffer when it encounters an unrecoverable error.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Exception extends Exception
+{
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php	(revision 5534)
@@ -0,0 +1,3660 @@
+<?php
+/**
+ * A PHP_CodeSniffer_File object represents a PHP source file and the tokens
+ * associated with it.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * A PHP_CodeSniffer_File object represents a PHP source file and the tokens
+ * associated with it.
+ *
+ * It provides a means for traversing the token stack, along with
+ * other token related operations. If a PHP_CodeSniffer_Sniff finds and error or
+ *  warning within a PHP_CodeSniffer_File, you can raise an error using the
+ *  addError() or addWarning() methods.
+ *
+ * <b>Token Information</b>
+ *
+ * Each token within the stack contains information about itself:
+ *
+ * <code>
+ *   array(
+ *    'code'       => 301,       // the token type code (see token_get_all())
+ *    'content'    => 'if',      // the token content
+ *    'type'       => 'T_IF',    // the token name
+ *    'line'       => 56,        // the line number when the token is located
+ *    'column'     => 12,        // the column in the line where this token
+ *                               // starts (starts from 1)
+ *    'level'      => 2          // the depth a token is within the scopes open
+ *    'conditions' => array(     // a list of scope condition token
+ *                               // positions => codes that
+ *                     2 => 50,  // opened the scopes that this token exists
+ *                     9 => 353, // in (see conditional tokens section below)
+ *                    ),
+ *   );
+ * </code>
+ *
+ * <b>Conditional Tokens</b>
+ *
+ * In addition to the standard token fields, conditions contain information to
+ * determine where their scope begins and ends:
+ *
+ * <code>
+ *   array(
+ *    'scope_condition' => 38, // the token position of the condition
+ *    'scope_opener'    => 41, // the token position that started the scope
+ *    'scope_closer'    => 70, // the token position that ended the scope
+ *   );
+ * </code>
+ *
+ * The condition, the scope opener and the scope closer each contain this
+ * information.
+ *
+ * <b>Parenthesis Tokens</b>
+ *
+ * Each parenthesis token (T_OPEN_PARENTHESIS and T_CLOSE_PARENTHESIS) has a
+ * reference to their opening and closing parenthesis, one being itself, the
+ * other being its opposite.
+ *
+ * <code>
+ *   array(
+ *    'parenthesis_opener' => 34,
+ *    'parenthesis_closer' => 40,
+ *   );
+ * </code>
+ *
+ * Some tokens can "own" a set of parenthesis. For example a T_FUNCTION token
+ * has parenthesis around its argument list. These tokens also have the
+ * parenthesis_opener and and parenthesis_closer indices. Not all parenthesis
+ * have owners, for example parenthesis used for arithmetic operations and
+ * function calls. The parenthesis tokens that have an owner have the following
+ * auxiliary array indices.
+ *
+ * <code>
+ *   array(
+ *    'parenthesis_opener' => 34,
+ *    'parenthesis_closer' => 40,
+ *    'parenthesis_owner'  => 33,
+ *   );
+ * </code>
+ *
+ * Each token within a set of parenthesis also has an array index
+ * 'nested_parenthesis' which is an array of the
+ * left parenthesis => right parenthesis token positions.
+ *
+ * <code>
+ *   'nested_parenthesis' => array(
+ *                             12 => 15
+ *                             11 => 14
+ *                            );
+ * </code>
+ *
+ * <b>Extended Tokens</b>
+ *
+ * PHP_CodeSniffer extends and augments some of the tokens created by
+ * <i>token_get_all()</i>. A full list of these tokens can be seen in the
+ * <i>Tokens.php</i> file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_File
+{
+
+    /**
+     * The absolute path to the file associated with this object.
+     *
+     * @var string
+     */
+    private $_file = '';
+
+    /**
+     * The EOL character this file uses.
+     *
+     * @var string
+     */
+    public $eolChar = '';
+
+    /**
+     * The PHP_CodeSniffer object controlling this run.
+     *
+     * @var PHP_CodeSniffer
+     */
+    public $phpcs = null;
+
+    /**
+     * The Fixer object to control fixing errors.
+     *
+     * @var PHP_CodeSniffer_Fixer
+     */
+    public $fixer = null;
+
+    /**
+     * The tokenizer being used for this file.
+     *
+     * @var object
+     */
+    public $tokenizer = null;
+
+    /**
+     * The tokenizer being used for this file.
+     *
+     * @var string
+     */
+    public $tokenizerType = 'PHP';
+
+    /**
+     * The number of tokens in this file.
+     *
+     * Stored here to save calling count() everywhere.
+     *
+     * @var int
+     */
+    public $numTokens = 0;
+
+    /**
+     * The tokens stack map.
+     *
+     * Note that the tokens in this array differ in format to the tokens
+     * produced by token_get_all(). Tokens are initially produced with
+     * token_get_all(), then augmented so that it's easier to process them.
+     *
+     * @var array()
+     * @see Tokens.php
+     */
+    private $_tokens = array();
+
+    /**
+     * The errors raised from PHP_CodeSniffer_Sniffs.
+     *
+     * @var array()
+     * @see getErrors()
+     */
+    private $_errors = array();
+
+    /**
+     * The warnings raised from PHP_CodeSniffer_Sniffs.
+     *
+     * @var array()
+     * @see getWarnings()
+     */
+    private $_warnings = array();
+
+    /**
+     * The metrics recorded from PHP_CodeSniffer_Sniffs.
+     *
+     * @var array()
+     * @see getMetrics()
+     */
+    private $_metrics = array();
+
+    /**
+     * Record the errors and warnings raised.
+     *
+     * @var bool
+     */
+    private $_recordErrors = true;
+
+    /**
+     * An array of lines that are being ignored.
+     *
+     * @var array()
+     */
+    private static $_ignoredLines = array();
+
+    /**
+     * An array of sniffs that are being ignored.
+     *
+     * @var array()
+     */
+    private $_ignoredListeners = array();
+
+    /**
+     * An array of message codes that are being ignored.
+     *
+     * @var array()
+     */
+    private $_ignoredCodes = array();
+
+    /**
+     * The total number of errors raised.
+     *
+     * @var int
+     */
+    private $_errorCount = 0;
+
+    /**
+     * The total number of warnings raised.
+     *
+     * @var int
+     */
+    private $_warningCount = 0;
+
+    /**
+     * The total number of errors/warnings that can be fixed.
+     *
+     * @var int
+     */
+    private $_fixableCount = 0;
+
+    /**
+     * An array of sniffs listening to this file's processing.
+     *
+     * @var array(PHP_CodeSniffer_Sniff)
+     */
+    private $_listeners = array();
+
+    /**
+     * The class name of the sniff currently processing the file.
+     *
+     * @var string
+     */
+    private $_activeListener = '';
+
+    /**
+     * An array of sniffs being processed and how long they took.
+     *
+     * @var array()
+     */
+    private $_listenerTimes = array();
+
+    /**
+     * An array of rules from the ruleset.xml file.
+     *
+     * This value gets set by PHP_CodeSniffer when the object is created.
+     * It may be empty, indicating that the ruleset does not override
+     * any of the default sniff settings.
+     *
+     * @var array
+     */
+    protected $ruleset = array();
+
+
+    /**
+     * Constructs a PHP_CodeSniffer_File.
+     *
+     * @param string          $file      The absolute path to the file to process.
+     * @param array(string)   $listeners The initial listeners listening to processing of this file.
+     *                                   to processing of this file.
+     * @param array           $ruleset   An array of rules from the ruleset.xml file.
+     *                                   ruleset.xml file.
+     * @param PHP_CodeSniffer $phpcs     The PHP_CodeSniffer object controlling this run.
+     *                                   this run.
+     *
+     * @throws PHP_CodeSniffer_Exception If the register() method does
+     *                                   not return an array.
+     */
+    public function __construct(
+        $file,
+        array $listeners,
+        array $ruleset,
+        PHP_CodeSniffer $phpcs
+    ) {
+        $this->_file      = trim($file);
+        $this->_listeners = $listeners;
+        $this->ruleset    = $ruleset;
+        $this->phpcs      = $phpcs;
+        $this->fixer      = new PHP_CodeSniffer_Fixer();
+
+        if (PHP_CODESNIFFER_INTERACTIVE === false) {
+            $cliValues = $phpcs->cli->getCommandLineValues();
+            if (isset($cliValues['showSources']) === true
+                && $cliValues['showSources'] !== true
+            ) {
+                $recordErrors = false;
+                foreach ($cliValues['reports'] as $report => $output) {
+                    $reportClass = $phpcs->reporting->factory($report);
+                    if (property_exists($reportClass, 'recordErrors') === false
+                        || $reportClass->recordErrors === true
+                    ) {
+                        $recordErrors = true;
+                        break;
+                    }
+                }
+
+                $this->_recordErrors = $recordErrors;
+            }
+        }
+
+    }//end __construct()
+
+
+    /**
+     * Sets the name of the currently active sniff.
+     *
+     * @param string $activeListener The class name of the current sniff.
+     *
+     * @return void
+     */
+    public function setActiveListener($activeListener)
+    {
+        $this->_activeListener = $activeListener;
+
+    }//end setActiveListener()
+
+
+    /**
+     * Adds a listener to the token stack that listens to the specific tokens.
+     *
+     * When PHP_CodeSniffer encounters on the the tokens specified in $tokens,
+     * it invokes the process method of the sniff.
+     *
+     * @param PHP_CodeSniffer_Sniff $listener The listener to add to the
+     *                                        listener stack.
+     * @param array(int)            $tokens   The token types the listener wishes to
+     *                                        listen to.
+     *
+     * @return void
+     */
+    public function addTokenListener(PHP_CodeSniffer_Sniff $listener, array $tokens)
+    {
+        $class = get_class($listener);
+        foreach ($tokens as $token) {
+            if (isset($this->_listeners[$token]) === false) {
+                $this->_listeners[$token] = array();
+            }
+
+            if (isset($this->_listeners[$token][$class]) === false) {
+                $this->_listeners[$token][$class] = $listener;
+            }
+        }
+
+    }//end addTokenListener()
+
+
+    /**
+     * Removes a listener from listening from the specified tokens.
+     *
+     * @param PHP_CodeSniffer_Sniff $listener The listener to remove from the
+     *                                        listener stack.
+     * @param array(int)            $tokens   The token types the listener wishes to
+     *                                        stop listen to.
+     *
+     * @return void
+     */
+    public function removeTokenListener(
+        PHP_CodeSniffer_Sniff $listener,
+        array $tokens
+    ) {
+        $class = get_class($listener);
+        foreach ($tokens as $token) {
+            if (isset($this->_listeners[$token]) === false) {
+                continue;
+            }
+
+            unset($this->_listeners[$token][$class]);
+        }
+
+    }//end removeTokenListener()
+
+
+    /**
+     * Rebuilds the list of listeners to ensure their state is cleared.
+     *
+     * @return void
+     */
+    public function refreshTokenListeners()
+    {
+        $this->phpcs->populateTokenListeners();
+        $this->_listeners = $this->phpcs->getTokenSniffs();
+
+    }//end refreshTokenListeners()
+
+
+    /**
+     * Returns the token stack for this file.
+     *
+     * @return array
+     */
+    public function getTokens()
+    {
+        return $this->_tokens;
+
+    }//end getTokens()
+
+
+    /**
+     * Starts the stack traversal and tells listeners when tokens are found.
+     *
+     * @param string $contents The contents to parse. If NULL, the content
+     *                         is taken from the file system.
+     *
+     * @return void
+     */
+    public function start($contents=null)
+    {
+        $this->_errors       = array();
+        $this->_warnings     = array();
+        $this->_errorCount   = 0;
+        $this->_warningCount = 0;
+        $this->_fixableCount = 0;
+
+        // Reset the ignored lines because lines numbers may have changed
+        // if we are fixing this file.
+        self::$_ignoredLines = array();
+
+        try {
+            $this->eolChar = self::detectLineEndings($this->_file, $contents);
+        } catch (PHP_CodeSniffer_Exception $e) {
+            $this->addWarning($e->getMessage(), null, 'Internal.DetectLineEndings');
+            return;
+        }
+
+        // If this is standard input, see if a filename was passed in as well.
+        // This is done by including: phpcs_input_file: [file path]
+        // as the first line of content.
+        if ($this->_file === 'STDIN' && $contents !== null) {
+            if (substr($contents, 0, 17) === 'phpcs_input_file:') {
+                $eolPos      = strpos($contents, $this->eolChar);
+                $filename    = trim(substr($contents, 17, ($eolPos - 17)));
+                $contents    = substr($contents, ($eolPos + strlen($this->eolChar)));
+                $this->_file = $filename;
+            }
+        }
+
+        $this->_parse($contents);
+        $this->fixer->startFile($this);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 2) {
+            echo "\t*** START TOKEN PROCESSING ***".PHP_EOL;
+        }
+
+        $foundCode        = false;
+        $listeners        = $this->phpcs->getSniffs();
+        $listenerIgnoreTo = array();
+        $inTests          = defined('PHP_CODESNIFFER_IN_TESTS');
+
+        // Foreach of the listeners that have registered to listen for this
+        // token, get them to process it.
+        foreach ($this->_tokens as $stackPtr => $token) {
+            // Check for ignored lines.
+            if ($token['code'] === T_COMMENT
+                || $token['code'] === T_DOC_COMMENT_TAG
+                || ($inTests === true && $token['code'] === T_INLINE_HTML)
+            ) {
+                if (strpos($token['content'], '@codingStandards') !== false) {
+                    if (strpos($token['content'], '@codingStandardsIgnoreFile') !== false) {
+                        // Ignoring the whole file, just a little late.
+                        $this->_errors       = array();
+                        $this->_warnings     = array();
+                        $this->_errorCount   = 0;
+                        $this->_warningCount = 0;
+                        $this->_fixableCount = 0;
+                        return;
+                    } else if (strpos($token['content'], '@codingStandardsChangeSetting') !== false) {
+                        $start         = strpos($token['content'], '@codingStandardsChangeSetting');
+                        $comment       = substr($token['content'], ($start + 30));
+                        $parts         = explode(' ', $comment);
+                        $sniffParts    = explode('.', $parts[0]);
+                        $listenerClass = $sniffParts[0].'_Sniffs_'.$sniffParts[1].'_'.$sniffParts[2].'Sniff';
+                        $this->phpcs->setSniffProperty($listenerClass, $parts[1], $parts[2]);
+                    }//end if
+                }//end if
+            }//end if
+
+            if (PHP_CODESNIFFER_VERBOSITY > 2) {
+                $type    = $token['type'];
+                $content = PHP_CodeSniffer::prepareForOutput($token['content']);
+                echo "\t\tProcess token $stackPtr: $type => $content".PHP_EOL;
+            }
+
+            if ($token['code'] !== T_INLINE_HTML) {
+                $foundCode = true;
+            }
+
+            if (isset($this->_listeners[$token['code']]) === false) {
+                continue;
+            }
+
+            foreach ($this->_listeners[$token['code']] as $listenerData) {
+                if (isset($this->_ignoredListeners[$listenerData['class']]) === true
+                    || (isset($listenerIgnoreTo[$listenerData['class']]) === true
+                    && $listenerIgnoreTo[$listenerData['class']] > $stackPtr)
+                ) {
+                    // This sniff is ignoring past this token, or the whole file.
+                    continue;
+                }
+
+                // Make sure this sniff supports the tokenizer
+                // we are currently using.
+                $class = $listenerData['class'];
+
+                if (isset($listenerData['tokenizers'][$this->tokenizerType]) === false) {
+                    continue;
+                }
+
+                // If the file path matches one of our ignore patterns, skip it.
+                // While there is support for a type of each pattern
+                // (absolute or relative) we don't actually support it here.
+                foreach ($listenerData['ignore'] as $pattern) {
+                    // We assume a / directory separator, as do the exclude rules
+                    // most developers write, so we need a special case for any system
+                    // that is different.
+                    if (DIRECTORY_SEPARATOR === '\\') {
+                        $pattern = str_replace('/', '\\\\', $pattern);
+                    }
+
+                    $pattern = '`'.$pattern.'`i';
+                    if (preg_match($pattern, $this->_file) === 1) {
+                        $this->_ignoredListeners[$class] = true;
+                        continue(2);
+                    }
+                }
+
+                $this->_activeListener = $class;
+
+                if (PHP_CODESNIFFER_VERBOSITY > 2) {
+                    $startTime = microtime(true);
+                    echo "\t\t\tProcessing ".$this->_activeListener.'... ';
+                }
+
+                $ignoreTo = $listeners[$class]->process($this, $stackPtr);
+                if ($ignoreTo !== null) {
+                    $listenerIgnoreTo[$this->_activeListener] = $ignoreTo;
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 2) {
+                    $timeTaken = (microtime(true) - $startTime);
+                    if (isset($this->_listenerTimes[$this->_activeListener]) === false) {
+                        $this->_listenerTimes[$this->_activeListener] = 0;
+                    }
+
+                    $this->_listenerTimes[$this->_activeListener] += $timeTaken;
+
+                    $timeTaken = round(($timeTaken), 4);
+                    echo "DONE in $timeTaken seconds".PHP_EOL;
+                }
+
+                $this->_activeListener = '';
+            }//end foreach
+        }//end foreach
+
+        if ($this->_recordErrors === false) {
+            $this->_errors   = array();
+            $this->_warnings = array();
+        }
+
+        // If short open tags are off but the file being checked uses
+        // short open tags, the whole content will be inline HTML
+        // and nothing will be checked. So try and handle this case.
+        if ($foundCode === false && $this->tokenizerType === 'PHP') {
+            $shortTags = (bool) ini_get('short_open_tag');
+            if ($shortTags === false) {
+                $error = 'No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.';
+                $this->addWarning($error, null, 'Internal.NoCodeFound');
+            }
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 2) {
+            echo "\t*** END TOKEN PROCESSING ***".PHP_EOL;
+            echo "\t*** START SNIFF PROCESSING REPORT ***".PHP_EOL;
+
+            asort($this->_listenerTimes, SORT_NUMERIC);
+            $this->_listenerTimes = array_reverse($this->_listenerTimes, true);
+            foreach ($this->_listenerTimes as $listener => $timeTaken) {
+                echo "\t$listener: ".round(($timeTaken), 4).' secs'.PHP_EOL;
+            }
+
+            echo "\t*** END SNIFF PROCESSING REPORT ***".PHP_EOL;
+        }
+
+    }//end start()
+
+
+    /**
+     * Remove vars stored in this file that are no longer required.
+     *
+     * @return void
+     */
+    public function cleanUp()
+    {
+        $this->_tokens    = null;
+        $this->_listeners = null;
+
+    }//end cleanUp()
+
+
+    /**
+     * Tokenizes the file and prepares it for the test run.
+     *
+     * @param string $contents The contents to parse. If NULL, the content
+     *                         is taken from the file system.
+     *
+     * @return void
+     */
+    private function _parse($contents=null)
+    {
+        if ($contents === null && empty($this->_tokens) === false) {
+            // File has already been parsed.
+            return;
+        }
+
+        $stdin     = false;
+        $cliValues = $this->phpcs->cli->getCommandLineValues();
+        if (empty($cliValues['files']) === true) {
+            $stdin = true;
+        }
+
+        // Determine the tokenizer from the file extension.
+        $fileParts = explode('.', $this->_file);
+        $extension = array_pop($fileParts);
+        if (isset($this->phpcs->allowedFileExtensions[$extension]) === true) {
+            $tokenizerClass      = 'PHP_CodeSniffer_Tokenizers_'.$this->phpcs->allowedFileExtensions[$extension];
+            $this->tokenizerType = $this->phpcs->allowedFileExtensions[$extension];
+        } else if (isset($this->phpcs->defaultFileExtensions[$extension]) === true) {
+            $tokenizerClass      = 'PHP_CodeSniffer_Tokenizers_'.$this->phpcs->defaultFileExtensions[$extension];
+            $this->tokenizerType = $this->phpcs->defaultFileExtensions[$extension];
+        } else {
+            // Revert to default.
+            $tokenizerClass = 'PHP_CodeSniffer_Tokenizers_'.$this->tokenizerType;
+        }
+
+        $tokenizer       = new $tokenizerClass();
+        $this->tokenizer = $tokenizer;
+
+        if ($contents === null) {
+            $contents = file_get_contents($this->_file);
+        }
+
+        try {
+            $tabWidth = null;
+            $encoding = null;
+            if (defined('PHP_CODESNIFFER_IN_TESTS') === true) {
+                $cliValues = $this->phpcs->cli->getCommandLineValues();
+                if (isset($cliValues['tabWidth']) === true) {
+                    $tabWidth = $cliValues['tabWidth'];
+                }
+
+                if (isset($cliValues['encoding']) === true) {
+                    $encoding = $cliValues['encoding'];
+                }
+            }
+
+            $this->_tokens = self::tokenizeString($contents, $tokenizer, $this->eolChar, $tabWidth, $encoding);
+        } catch (PHP_CodeSniffer_Exception $e) {
+            $this->addWarning($e->getMessage(), null, 'Internal.Tokenizer.Exception');
+            if (PHP_CODESNIFFER_VERBOSITY > 0 || (PHP_CODESNIFFER_CBF === true && $stdin === false)) {
+                echo "[$this->tokenizerType => tokenizer error]... ";
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo PHP_EOL;
+                }
+            }
+
+            return;
+        }//end try
+
+        $this->numTokens = count($this->_tokens);
+
+        // Check for mixed line endings as these can cause tokenizer errors and we
+        // should let the user know that the results they get may be incorrect.
+        // This is done by removing all backslashes, removing the newline char we
+        // detected, then converting newlines chars into text. If any backslashes
+        // are left at the end, we have additional newline chars in use.
+        $contents = str_replace('\\', '', $contents);
+        $contents = str_replace($this->eolChar, '', $contents);
+        $contents = str_replace("\n", '\n', $contents);
+        $contents = str_replace("\r", '\r', $contents);
+        if (strpos($contents, '\\') !== false) {
+            $error = 'File has mixed line endings; this may cause incorrect results';
+            $this->addWarning($error, 0, 'Internal.LineEndings.Mixed');
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0 || (PHP_CODESNIFFER_CBF === true && $stdin === false)) {
+            if ($this->numTokens === 0) {
+                $numLines = 0;
+            } else {
+                $numLines = $this->_tokens[($this->numTokens - 1)]['line'];
+            }
+
+            echo "[$this->tokenizerType => $this->numTokens tokens in $numLines lines]... ";
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo PHP_EOL;
+            }
+        }
+
+    }//end _parse()
+
+
+    /**
+     * Opens a file and detects the EOL character being used.
+     *
+     * @param string $file     The full path to the file.
+     * @param string $contents The contents to parse. If NULL, the content
+     *                         is taken from the file system.
+     *
+     * @return string
+     * @throws PHP_CodeSniffer_Exception If $file could not be opened.
+     */
+    public static function detectLineEndings($file, $contents=null)
+    {
+        if ($contents === null) {
+            // Determine the newline character being used in this file.
+            // Will be either \r, \r\n or \n.
+            if (is_readable($file) === false) {
+                $error = 'Error opening file; file no longer exists or you do not have access to read the file';
+                throw new PHP_CodeSniffer_Exception($error);
+            } else {
+                $handle = fopen($file, 'r');
+                if ($handle === false) {
+                    $error = 'Error opening file; could not auto-detect line endings';
+                    throw new PHP_CodeSniffer_Exception($error);
+                }
+            }
+
+            $firstLine = fgets($handle);
+            fclose($handle);
+
+            $eolChar = substr($firstLine, -1);
+            if ($eolChar === "\n") {
+                $secondLastChar = substr($firstLine, -2, 1);
+                if ($secondLastChar === "\r") {
+                    $eolChar = "\r\n";
+                }
+            } else if ($eolChar !== "\r") {
+                // Must not be an EOL char at the end of the line.
+                // Probably a one-line file, so assume \n as it really
+                // doesn't matter considering there are no newlines.
+                $eolChar = "\n";
+            }
+        } else {
+            if (preg_match("/\r\n?|\n/", $contents, $matches) !== 1) {
+                // Assuming there are no newlines.
+                $eolChar = "\n";
+            } else {
+                $eolChar = $matches[0];
+            }
+        }//end if
+
+        return $eolChar;
+
+    }//end detectLineEndings()
+
+
+    /**
+     * Records an error against a specific token in the file.
+     *
+     * @param string  $error    The error message.
+     * @param int     $stackPtr The stack position where the error occurred.
+     * @param string  $code     A violation code unique to the sniff message.
+     * @param array   $data     Replacements for the error message.
+     * @param int     $severity The severity level for this error. A value of 0
+     *                          will be converted into the default severity level.
+     * @param boolean $fixable  Can the error be fixed by the sniff?
+     *
+     * @return boolean
+     */
+    public function addError(
+        $error,
+        $stackPtr,
+        $code='',
+        $data=array(),
+        $severity=0,
+        $fixable=false
+    ) {
+        if ($stackPtr === null) {
+            $line   = 1;
+            $column = 1;
+        } else {
+            $line   = $this->_tokens[$stackPtr]['line'];
+            $column = $this->_tokens[$stackPtr]['column'];
+        }
+
+        return $this->_addError($error, $line, $column, $code, $data, $severity, $fixable);
+
+    }//end addError()
+
+
+    /**
+     * Records a warning against a specific token in the file.
+     *
+     * @param string  $warning  The error message.
+     * @param int     $stackPtr The stack position where the error occurred.
+     * @param string  $code     A violation code unique to the sniff message.
+     * @param array   $data     Replacements for the warning message.
+     * @param int     $severity The severity level for this warning. A value of 0
+     *                          will be converted into the default severity level.
+     * @param boolean $fixable  Can the warning be fixed by the sniff?
+     *
+     * @return boolean
+     */
+    public function addWarning(
+        $warning,
+        $stackPtr,
+        $code='',
+        $data=array(),
+        $severity=0,
+        $fixable=false
+    ) {
+        if ($stackPtr === null) {
+            $line   = 1;
+            $column = 1;
+        } else {
+            $line   = $this->_tokens[$stackPtr]['line'];
+            $column = $this->_tokens[$stackPtr]['column'];
+        }
+
+        return $this->_addWarning($warning, $line, $column, $code, $data, $severity, $fixable);
+
+    }//end addWarning()
+
+
+    /**
+     * Records an error against a specific line in the file.
+     *
+     * @param string $error    The error message.
+     * @param int    $line     The line on which the error occurred.
+     * @param string $code     A violation code unique to the sniff message.
+     * @param array  $data     Replacements for the error message.
+     * @param int    $severity The severity level for this error. A value of 0 will be converted into the default severity level.
+     *                          will be converted into the default severity level.
+     *
+     * @return boolean
+     */
+    public function addErrorOnLine(
+        $error,
+        $line,
+        $code='',
+        $data=array(),
+        $severity=0
+    ) {
+        return $this->_addError($error, $line, 1, $code, $data, $severity, false);
+
+    }//end addErrorOnLine()
+
+
+    /**
+     * Records a warning against a specific token in the file.
+     *
+     * @param string $warning  The error message.
+     * @param int    $line     The line on which the warning occurred.
+     * @param string $code     A violation code unique to the sniff message.
+     * @param array  $data     Replacements for the warning message.
+     * @param int    $severity The severity level for this warning. A value of 0 will be converted into the default severity level.
+     *                          will be converted into the default severity level.
+     *
+     * @return boolean
+     */
+    public function addWarningOnLine(
+        $warning,
+        $line,
+        $code='',
+        $data=array(),
+        $severity=0
+    ) {
+        return $this->_addWarning($warning, $line, 1, $code, $data, $severity, false);
+
+    }//end addWarningOnLine()
+
+
+    /**
+     * Records a fixable error against a specific token in the file.
+     *
+     * Returns true if the error was recorded and should be fixed.
+     *
+     * @param string $error    The error message.
+     * @param int    $stackPtr The stack position where the error occurred.
+     * @param string $code     A violation code unique to the sniff message.
+     * @param array  $data     Replacements for the error message.
+     * @param int    $severity The severity level for this error. A value of 0
+     *                         will be converted into the default severity level.
+     *
+     * @return boolean
+     */
+    public function addFixableError(
+        $error,
+        $stackPtr,
+        $code='',
+        $data=array(),
+        $severity=0
+    ) {
+        $recorded = $this->addError($error, $stackPtr, $code, $data, $severity, true);
+        if ($recorded === true && $this->fixer->enabled === true) {
+            return true;
+        }
+
+        return false;
+
+    }//end addFixableError()
+
+
+    /**
+     * Records a fixable warning against a specific token in the file.
+     *
+     * Returns true if the warning was recorded and should be fixed.
+     *
+     * @param string $warning  The error message.
+     * @param int    $stackPtr The stack position where the error occurred.
+     * @param string $code     A violation code unique to the sniff message.
+     * @param array  $data     Replacements for the warning message.
+     * @param int    $severity The severity level for this warning. A value of 0
+     *                         will be converted into the default severity level.
+     *
+     * @return boolean
+     */
+    public function addFixableWarning(
+        $warning,
+        $stackPtr,
+        $code='',
+        $data=array(),
+        $severity=0
+    ) {
+        $recorded = $this->addWarning($warning, $stackPtr, $code, $data, $severity, true);
+        if ($recorded === true && $this->fixer->enabled === true) {
+            return true;
+        }
+
+        return false;
+
+    }//end addFixableWarning()
+
+
+    /**
+     * Adds an error to the error stack.
+     *
+     * @param string  $error    The error message.
+     * @param int     $line     The line on which the error occurred.
+     * @param int     $column   The column at which the error occurred.
+     * @param string  $code     A violation code unique to the sniff message.
+     * @param array   $data     Replacements for the error message.
+     * @param int     $severity The severity level for this error. A value of 0
+     *                          will be converted into the default severity level.
+     * @param boolean $fixable  Can the error be fixed by the sniff?
+     *
+     * @return boolean
+     */
+    private function _addError($error, $line, $column, $code, $data, $severity, $fixable)
+    {
+        if (isset(self::$_ignoredLines[$line]) === true) {
+            return false;
+        }
+
+        // Work out which sniff generated the error.
+        if (substr($code, 0, 9) === 'Internal.') {
+            // Any internal message.
+            $sniff     = $code;
+            $sniffCode = $code;
+        } else {
+            $parts = explode('_', str_replace('\\', '_', $this->_activeListener));
+            if (isset($parts[3]) === true) {
+                $sniff = $parts[0].'.'.$parts[2].'.'.$parts[3];
+
+                // Remove "Sniff" from the end.
+                $sniff = substr($sniff, 0, -5);
+            } else {
+                $sniff = 'unknownSniff';
+            }
+
+            $sniffCode = $sniff;
+            if ($code !== '') {
+                $sniffCode .= '.'.$code;
+            }
+        }//end if
+
+        // If we know this sniff code is being ignored for this file, return early.
+        if (isset($this->_ignoredCodes[$sniffCode]) === true) {
+            return false;
+        }
+
+        // Make sure this message type has not been set to "warning".
+        if (isset($this->ruleset[$sniffCode]['type']) === true
+            && $this->ruleset[$sniffCode]['type'] === 'warning'
+        ) {
+            // Pass this off to the warning handler.
+            return $this->_addWarning($error, $line, $column, $code, $data, $severity, $fixable);
+        } else if ($this->phpcs->cli->errorSeverity === 0) {
+            // Don't bother doing any processing as errors are just going to
+            // be hidden in the reports anyway.
+            return false;
+        }
+
+        // Make sure we are interested in this severity level.
+        if (isset($this->ruleset[$sniffCode]['severity']) === true) {
+            $severity = $this->ruleset[$sniffCode]['severity'];
+        } else if ($severity === 0) {
+            $severity = PHPCS_DEFAULT_ERROR_SEV;
+        }
+
+        if ($this->phpcs->cli->errorSeverity > $severity) {
+            return false;
+        }
+
+        // Make sure we are not ignoring this file.
+        $patterns = $this->phpcs->getIgnorePatterns($sniffCode);
+        foreach ($patterns as $pattern => $type) {
+            // While there is support for a type of each pattern
+            // (absolute or relative) we don't actually support it here.
+            $replacements = array(
+                             '\\,' => ',',
+                             '*'   => '.*',
+                            );
+
+            // We assume a / directory separator, as do the exclude rules
+            // most developers write, so we need a special case for any system
+            // that is different.
+            if (DIRECTORY_SEPARATOR === '\\') {
+                $replacements['/'] = '\\\\';
+            }
+
+            $pattern = '`'.strtr($pattern, $replacements).'`i';
+            if (preg_match($pattern, $this->_file) === 1) {
+                $this->_ignoredCodes[$sniffCode] = true;
+                return false;
+            }
+        }//end foreach
+
+        $this->_errorCount++;
+        if ($fixable === true) {
+            $this->_fixableCount++;
+        }
+
+        if ($this->_recordErrors === false) {
+            if (isset($this->_errors[$line]) === false) {
+                $this->_errors[$line] = 0;
+            }
+
+            $this->_errors[$line]++;
+            return true;
+        }
+
+        // Work out the error message.
+        if (isset($this->ruleset[$sniffCode]['message']) === true) {
+            $error = $this->ruleset[$sniffCode]['message'];
+        }
+
+        if (empty($data) === true) {
+            $message = $error;
+        } else {
+            $message = vsprintf($error, $data);
+        }
+
+        if (isset($this->_errors[$line]) === false) {
+            $this->_errors[$line] = array();
+        }
+
+        if (isset($this->_errors[$line][$column]) === false) {
+            $this->_errors[$line][$column] = array();
+        }
+
+        $this->_errors[$line][$column][] = array(
+                                            'message'  => $message,
+                                            'source'   => $sniffCode,
+                                            'severity' => $severity,
+                                            'fixable'  => $fixable,
+                                           );
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1
+            && $this->fixer->enabled === true
+            && $fixable === true
+        ) {
+            @ob_end_clean();
+            echo "\tE: [Line $line] $message ($sniffCode)".PHP_EOL;
+            ob_start();
+        }
+
+        return true;
+
+    }//end _addError()
+
+
+    /**
+     * Adds an warning to the warning stack.
+     *
+     * @param string  $warning  The error message.
+     * @param int     $line     The line on which the warning occurred.
+     * @param int     $column   The column at which the warning occurred.
+     * @param string  $code     A violation code unique to the sniff message.
+     * @param array   $data     Replacements for the warning message.
+     * @param int     $severity The severity level for this warning. A value of 0
+     *                          will be converted into the default severity level.
+     * @param boolean $fixable  Can the warning be fixed by the sniff?
+     *
+     * @return boolean
+     */
+    private function _addWarning($warning, $line, $column, $code, $data, $severity, $fixable)
+    {
+        if (isset(self::$_ignoredLines[$line]) === true) {
+            return false;
+        }
+
+        // Work out which sniff generated the warning.
+        if (substr($code, 0, 9) === 'Internal.') {
+            // Any internal message.
+            $sniff     = $code;
+            $sniffCode = $code;
+        } else {
+            $parts = explode('_', str_replace('\\', '_', $this->_activeListener));
+            if (isset($parts[3]) === true) {
+                $sniff = $parts[0].'.'.$parts[2].'.'.$parts[3];
+
+                // Remove "Sniff" from the end.
+                $sniff = substr($sniff, 0, -5);
+            } else {
+                $sniff = 'unknownSniff';
+            }
+
+            $sniffCode = $sniff;
+            if ($code !== '') {
+                $sniffCode .= '.'.$code;
+            }
+        }//end if
+
+        // If we know this sniff code is being ignored for this file, return early.
+        if (isset($this->_ignoredCodes[$sniffCode]) === true) {
+            return false;
+        }
+
+        // Make sure this message type has not been set to "error".
+        if (isset($this->ruleset[$sniffCode]['type']) === true
+            && $this->ruleset[$sniffCode]['type'] === 'error'
+        ) {
+            // Pass this off to the error handler.
+            return $this->_addError($warning, $line, $column, $code, $data, $severity, $fixable);
+        } else if ($this->phpcs->cli->warningSeverity === 0) {
+            // Don't bother doing any processing as warnings are just going to
+            // be hidden in the reports anyway.
+            return false;
+        }
+
+        // Make sure we are interested in this severity level.
+        if (isset($this->ruleset[$sniffCode]['severity']) === true) {
+            $severity = $this->ruleset[$sniffCode]['severity'];
+        } else if ($severity === 0) {
+            $severity = PHPCS_DEFAULT_WARN_SEV;
+        }
+
+        if ($this->phpcs->cli->warningSeverity > $severity) {
+            return false;
+        }
+
+        // Make sure we are not ignoring this file.
+        $patterns = $this->phpcs->getIgnorePatterns($sniffCode);
+        foreach ($patterns as $pattern => $type) {
+            // While there is support for a type of each pattern
+            // (absolute or relative) we don't actually support it here.
+            $replacements = array(
+                             '\\,' => ',',
+                             '*'   => '.*',
+                            );
+
+            // We assume a / directory separator, as do the exclude rules
+            // most developers write, so we need a special case for any system
+            // that is different.
+            if (DIRECTORY_SEPARATOR === '\\') {
+                $replacements['/'] = '\\\\';
+            }
+
+            $pattern = '`'.strtr($pattern, $replacements).'`i';
+            if (preg_match($pattern, $this->_file) === 1) {
+                $this->_ignoredCodes[$sniffCode] = true;
+                return false;
+            }
+        }//end foreach
+
+        $this->_warningCount++;
+        if ($fixable === true) {
+            $this->_fixableCount++;
+        }
+
+        if ($this->_recordErrors === false) {
+            if (isset($this->_warnings[$line]) === false) {
+                $this->_warnings[$line] = 0;
+            }
+
+            $this->_warnings[$line]++;
+            return true;
+        }
+
+        // Work out the warning message.
+        if (isset($this->ruleset[$sniffCode]['message']) === true) {
+            $warning = $this->ruleset[$sniffCode]['message'];
+        }
+
+        if (empty($data) === true) {
+            $message = $warning;
+        } else {
+            $message = vsprintf($warning, $data);
+        }
+
+        if (isset($this->_warnings[$line]) === false) {
+            $this->_warnings[$line] = array();
+        }
+
+        if (isset($this->_warnings[$line][$column]) === false) {
+            $this->_warnings[$line][$column] = array();
+        }
+
+        $this->_warnings[$line][$column][] = array(
+                                              'message'  => $message,
+                                              'source'   => $sniffCode,
+                                              'severity' => $severity,
+                                              'fixable'  => $fixable,
+                                             );
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1
+            && $this->fixer->enabled === true
+            && $fixable === true
+        ) {
+            @ob_end_clean();
+            echo "\tW: $message ($sniffCode)".PHP_EOL;
+            ob_start();
+        }
+
+        return true;
+
+    }//end _addWarning()
+
+
+    /**
+     * Adds an warning to the warning stack.
+     *
+     * @param int    $stackPtr The stack position where the metric was recorded.
+     * @param string $metric   The name of the metric being recorded.
+     * @param string $value    The value of the metric being recorded.
+     *
+     * @return boolean
+     */
+    public function recordMetric($stackPtr, $metric, $value)
+    {
+        if (isset($this->_metrics[$metric]) === false) {
+            $this->_metrics[$metric] = array(
+                                        'values' => array(
+                                                     $value => array($stackPtr),
+                                                    ),
+                                       );
+        } else {
+            if (isset($this->_metrics[$metric]['values'][$value]) === false) {
+                $this->_metrics[$metric]['values'][$value] = array($stackPtr);
+            } else {
+                $this->_metrics[$metric]['values'][$value][] = $stackPtr;
+            }
+        }
+
+        return true;
+
+    }//end recordMetric()
+
+
+    /**
+     * Returns the number of errors raised.
+     *
+     * @return int
+     */
+    public function getErrorCount()
+    {
+        return $this->_errorCount;
+
+    }//end getErrorCount()
+
+
+    /**
+     * Returns the number of warnings raised.
+     *
+     * @return int
+     */
+    public function getWarningCount()
+    {
+        return $this->_warningCount;
+
+    }//end getWarningCount()
+
+
+    /**
+     * Returns the number of successes recorded.
+     *
+     * @return int
+     */
+    public function getSuccessCount()
+    {
+        return $this->_successCount;
+
+    }//end getSuccessCount()
+
+
+    /**
+     * Returns the number of fixable errors/warnings raised.
+     *
+     * @return int
+     */
+    public function getFixableCount()
+    {
+        return $this->_fixableCount;
+
+    }//end getFixableCount()
+
+
+    /**
+     * Returns the list of ignored lines.
+     *
+     * @return array
+     */
+    public function getIgnoredLines()
+    {
+        return self::$_ignoredLines;
+
+    }//end getIgnoredLines()
+
+
+    /**
+     * Returns the errors raised from processing this file.
+     *
+     * @return array
+     */
+    public function getErrors()
+    {
+        return $this->_errors;
+
+    }//end getErrors()
+
+
+    /**
+     * Returns the warnings raised from processing this file.
+     *
+     * @return array
+     */
+    public function getWarnings()
+    {
+        return $this->_warnings;
+
+    }//end getWarnings()
+
+
+    /**
+     * Returns the metrics found while processing this file.
+     *
+     * @return array
+     */
+    public function getMetrics()
+    {
+        return $this->_metrics;
+
+    }//end getMetrics()
+
+
+    /**
+     * Returns the absolute filename of this file.
+     *
+     * @return string
+     */
+    public function getFilename()
+    {
+        return $this->_file;
+
+    }//end getFilename()
+
+
+    /**
+     * Creates an array of tokens when given some PHP code.
+     *
+     * Starts by using token_get_all() but does a lot of extra processing
+     * to insert information about the context of the token.
+     *
+     * @param string $string    The string to tokenize.
+     * @param object $tokenizer A tokenizer class to use to tokenize the string.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     * @param int    $tabWidth  The number of spaces each tab respresents.
+     * @param string $encoding  The charset of the sniffed file.
+     *
+     * @throws PHP_CodeSniffer_Exception If the file cannot be processed.
+     * @return array
+     */
+    public static function tokenizeString($string, $tokenizer, $eolChar='\n', $tabWidth=null, $encoding=null)
+    {
+        // Minified files often have a very large number of characters per line
+        // and cause issues when tokenizing.
+        if (get_class($tokenizer) !== 'PHP_CodeSniffer_Tokenizers_PHP') {
+            $numChars = strlen($string);
+            $numLines = (substr_count($string, $eolChar) + 1);
+            $average  = ($numChars / $numLines);
+            if ($average > 100) {
+                throw new PHP_CodeSniffer_Exception('File appears to be minified and cannot be processed');
+            }
+        }
+
+        $tokens = $tokenizer->tokenizeString($string, $eolChar);
+
+        if ($tabWidth === null) {
+            $tabWidth = PHP_CODESNIFFER_TAB_WIDTH;
+        }
+
+        if ($encoding === null) {
+            $encoding = PHP_CODESNIFFER_ENCODING;
+        }
+
+        self::_createPositionMap($tokens, $tokenizer, $eolChar, $encoding, $tabWidth);
+        self::_createTokenMap($tokens, $tokenizer, $eolChar);
+        self::_createParenthesisNestingMap($tokens, $tokenizer, $eolChar);
+        self::_createScopeMap($tokens, $tokenizer, $eolChar);
+
+        self::_createLevelMap($tokens, $tokenizer, $eolChar);
+
+        // Allow the tokenizer to do additional processing if required.
+        $tokenizer->processAdditional($tokens, $eolChar);
+
+        return $tokens;
+
+    }//end tokenizeString()
+
+
+    /**
+     * Sets token position information.
+     *
+     * Can also convert tabs into spaces. Each tab can represent between
+     * 1 and $width spaces, so this cannot be a straight string replace.
+     *
+     * @param array  $tokens    The array of tokens to process.
+     * @param object $tokenizer The tokenizer being used to process this file.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     * @param string $encoding  The charset of the sniffed file.
+     * @param int    $tabWidth  The number of spaces that each tab represents.
+     *                          Set to 0 to disable tab replacement.
+     *
+     * @return void
+     */
+    private static function _createPositionMap(&$tokens, $tokenizer, $eolChar, $encoding, $tabWidth)
+    {
+        $currColumn    = 1;
+        $lineNumber    = 1;
+        $eolLen        = (strlen($eolChar) * -1);
+        $tokenizerType = get_class($tokenizer);
+        $ignoring      = false;
+        $inTests       = defined('PHP_CODESNIFFER_IN_TESTS');
+
+        $checkEncoding = false;
+        if ($encoding !== 'iso-8859-1' && function_exists('iconv_strlen') === true) {
+            $checkEncoding = true;
+        }
+
+        $tokensWithTabs = array(
+                           T_WHITESPACE               => true,
+                           T_COMMENT                  => true,
+                           T_DOC_COMMENT              => true,
+                           T_DOC_COMMENT_WHITESPACE   => true,
+                           T_DOC_COMMENT_STRING       => true,
+                           T_CONSTANT_ENCAPSED_STRING => true,
+                           T_DOUBLE_QUOTED_STRING     => true,
+                           T_HEREDOC                  => true,
+                           T_NOWDOC                   => true,
+                           T_INLINE_HTML              => true,
+                          );
+
+        $numTokens = count($tokens);
+        for ($i = 0; $i < $numTokens; $i++) {
+            $tokens[$i]['line']   = $lineNumber;
+            $tokens[$i]['column'] = $currColumn;
+
+            if ($tokenizerType === 'PHP_CodeSniffer_Tokenizers_PHP'
+                && isset(PHP_CodeSniffer_Tokens::$knownLengths[$tokens[$i]['code']]) === true
+            ) {
+                // There are no tabs in the tokens we know the length of.
+                $length      = PHP_CodeSniffer_Tokens::$knownLengths[$tokens[$i]['code']];
+                $currColumn += $length;
+            } else if ($tabWidth === 0
+                || isset($tokensWithTabs[$tokens[$i]['code']]) === false
+                || strpos($tokens[$i]['content'], "\t") === false
+            ) {
+                // There are no tabs in this content, or we aren't replacing them.
+                if ($checkEncoding === true) {
+                    // Not using the default encoding, so take a bit more care.
+                    $length = @iconv_strlen($tokens[$i]['content'], $encoding);
+                    if ($length === false) {
+                        // String contained invalid characters, so revert to default.
+                        $length = strlen($tokens[$i]['content']);
+                    }
+                } else {
+                    $length = strlen($tokens[$i]['content']);
+                }
+
+                $currColumn += $length;
+            } else {
+                if (str_replace("\t", '', $tokens[$i]['content']) === '') {
+                    // String only contains tabs, so we can shortcut the process.
+                    $numTabs = strlen($tokens[$i]['content']);
+
+                    $newContent   = '';
+                    $firstTabSize = ($tabWidth - ($currColumn % $tabWidth) + 1);
+                    $length       = ($firstTabSize + ($tabWidth * ($numTabs - 1)));
+                    $currColumn  += $length;
+                    $newContent   = str_repeat(' ', $length);
+                } else {
+                    // We need to determine the length of each tab.
+                    $tabs = explode("\t", $tokens[$i]['content']);
+
+                    $numTabs    = (count($tabs) - 1);
+                    $tabNum     = 0;
+                    $newContent = '';
+                    $length     = 0;
+
+                    foreach ($tabs as $content) {
+                        if ($content !== '') {
+                            $newContent .= $content;
+                            if ($checkEncoding === true) {
+                                // Not using the default encoding, so take a bit more care.
+                                $contentLength = @iconv_strlen($content, $encoding);
+                                if ($contentLength === false) {
+                                    // String contained invalid characters, so revert to default.
+                                    $contentLength = strlen($content);
+                                }
+                            } else {
+                                $contentLength = strlen($content);
+                            }
+
+                            $currColumn += $contentLength;
+                            $length     += $contentLength;
+                        }
+
+                        // The last piece of content does not have a tab after it.
+                        if ($tabNum === $numTabs) {
+                            break;
+                        }
+
+                        // Process the tab that comes after the content.
+                        $lastCurrColumn = $currColumn;
+                        $tabNum++;
+
+                        // Move the pointer to the next tab stop.
+                        if (($currColumn % $tabWidth) === 0) {
+                            // This is the first tab, and we are already at a
+                            // tab stop, so this tab counts as a single space.
+                            $currColumn++;
+                        } else {
+                            $currColumn++;
+                            while (($currColumn % $tabWidth) !== 0) {
+                                $currColumn++;
+                            }
+
+                            $currColumn++;
+                        }
+
+                        $length     += ($currColumn - $lastCurrColumn);
+                        $newContent .= str_repeat(' ', ($currColumn - $lastCurrColumn));
+                    }//end foreach
+                }//end if
+
+                $tokens[$i]['orig_content'] = $tokens[$i]['content'];
+                $tokens[$i]['content']      = $newContent;
+            }//end if
+
+            $tokens[$i]['length'] = $length;
+
+            if (isset(PHP_CodeSniffer_Tokens::$knownLengths[$tokens[$i]['code']]) === false
+                && strpos($tokens[$i]['content'], $eolChar) !== false
+            ) {
+                $lineNumber++;
+                $currColumn = 1;
+
+                // Newline chars are not counted in the token length.
+                $tokens[$i]['length'] += $eolLen;
+            }
+
+            if ($tokens[$i]['code'] === T_COMMENT
+                || $tokens[$i]['code'] === T_DOC_COMMENT_TAG
+                || ($inTests === true && $tokens[$i]['code'] === T_INLINE_HTML)
+            ) {
+                if (strpos($tokens[$i]['content'], '@codingStandards') !== false) {
+                    if ($ignoring === false
+                        && strpos($tokens[$i]['content'], '@codingStandardsIgnoreStart') !== false
+                    ) {
+                        $ignoring = true;
+                    } else if ($ignoring === true
+                        && strpos($tokens[$i]['content'], '@codingStandardsIgnoreEnd') !== false
+                    ) {
+                        $ignoring = false;
+                        // Ignore this comment too.
+                        self::$_ignoredLines[$tokens[$i]['line']] = true;
+                    } else if ($ignoring === false
+                        && strpos($tokens[$i]['content'], '@codingStandardsIgnoreLine') !== false
+                    ) {
+                        self::$_ignoredLines[($tokens[$i]['line'] + 1)] = true;
+                        // Ignore this comment too.
+                        self::$_ignoredLines[$tokens[$i]['line']] = true;
+                    }
+                }
+            }//end if
+
+            if ($ignoring === true) {
+                self::$_ignoredLines[$tokens[$i]['line']] = true;
+            }
+        }//end for
+
+    }//end _createPositionMap()
+
+
+    /**
+     * Creates a map of brackets positions.
+     *
+     * @param array  $tokens    The array of tokens to process.
+     * @param object $tokenizer The tokenizer being used to process this file.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    private static function _createTokenMap(&$tokens, $tokenizer, $eolChar)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START TOKEN MAP ***".PHP_EOL;
+        }
+
+        $squareOpeners = array();
+        $curlyOpeners  = array();
+        $numTokens     = count($tokens);
+
+        $openers   = array();
+        $openOwner = null;
+
+        for ($i = 0; $i < $numTokens; $i++) {
+            /*
+                Parenthesis mapping.
+            */
+
+            if (isset(PHP_CodeSniffer_Tokens::$parenthesisOpeners[$tokens[$i]['code']]) === true) {
+                $tokens[$i]['parenthesis_opener'] = null;
+                $tokens[$i]['parenthesis_closer'] = null;
+                $tokens[$i]['parenthesis_owner']  = $i;
+                $openOwner = $i;
+            } else if ($tokens[$i]['code'] === T_OPEN_PARENTHESIS) {
+                $openers[] = $i;
+                $tokens[$i]['parenthesis_opener'] = $i;
+                if ($openOwner !== null) {
+                    $tokens[$openOwner]['parenthesis_opener'] = $i;
+                    $tokens[$i]['parenthesis_owner']          = $openOwner;
+                    $openOwner = null;
+                }
+            } else if ($tokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
+                // Did we set an owner for this set of parenthesis?
+                $numOpeners = count($openers);
+                if ($numOpeners !== 0) {
+                    $opener = array_pop($openers);
+                    if (isset($tokens[$opener]['parenthesis_owner']) === true) {
+                        $owner = $tokens[$opener]['parenthesis_owner'];
+
+                        $tokens[$owner]['parenthesis_closer'] = $i;
+                        $tokens[$i]['parenthesis_owner']      = $owner;
+                    }
+
+                    $tokens[$i]['parenthesis_opener']      = $opener;
+                    $tokens[$i]['parenthesis_closer']      = $i;
+                    $tokens[$opener]['parenthesis_closer'] = $i;
+                }
+            }//end if
+
+            /*
+                Bracket mapping.
+            */
+
+            switch ($tokens[$i]['code']) {
+            case T_OPEN_SQUARE_BRACKET:
+                $squareOpeners[] = $i;
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", count($squareOpeners));
+                    echo str_repeat("\t", count($curlyOpeners));
+                    echo "=> Found square bracket opener at $i".PHP_EOL;
+                }
+                break;
+            case T_OPEN_CURLY_BRACKET:
+                if (isset($tokens[$i]['scope_closer']) === false) {
+                    $curlyOpeners[] = $i;
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", count($squareOpeners));
+                        echo str_repeat("\t", count($curlyOpeners));
+                        echo "=> Found curly bracket opener at $i".PHP_EOL;
+                    }
+                }
+                break;
+            case T_CLOSE_SQUARE_BRACKET:
+                if (empty($squareOpeners) === false) {
+                    $opener = array_pop($squareOpeners);
+                    $tokens[$i]['bracket_opener']      = $opener;
+                    $tokens[$i]['bracket_closer']      = $i;
+                    $tokens[$opener]['bracket_opener'] = $opener;
+                    $tokens[$opener]['bracket_closer'] = $i;
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", count($squareOpeners));
+                        echo str_repeat("\t", count($curlyOpeners));
+                        echo "\t=> Found square bracket closer at $i for $opener".PHP_EOL;
+                    }
+                }
+                break;
+            case T_CLOSE_CURLY_BRACKET:
+                if (empty($curlyOpeners) === false
+                    && isset($tokens[$i]['scope_opener']) === false
+                ) {
+                    $opener = array_pop($curlyOpeners);
+                    $tokens[$i]['bracket_opener']      = $opener;
+                    $tokens[$i]['bracket_closer']      = $i;
+                    $tokens[$opener]['bracket_opener'] = $opener;
+                    $tokens[$opener]['bracket_closer'] = $i;
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", count($squareOpeners));
+                        echo str_repeat("\t", count($curlyOpeners));
+                        echo "\t=> Found curly bracket closer at $i for $opener".PHP_EOL;
+                    }
+                }
+                break;
+            default:
+                continue;
+            }//end switch
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END TOKEN MAP ***".PHP_EOL;
+        }
+
+    }//end _createTokenMap()
+
+
+    /**
+     * Creates a map for the parenthesis tokens that surround other tokens.
+     *
+     * @param array  $tokens    The array of tokens to process.
+     * @param object $tokenizer The tokenizer being used to process this file.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    private static function _createParenthesisNestingMap(
+        &$tokens,
+        $tokenizer,
+        $eolChar
+    ) {
+        $numTokens = count($tokens);
+        $map       = array();
+        for ($i = 0; $i < $numTokens; $i++) {
+            if (isset($tokens[$i]['parenthesis_opener']) === true
+                && $i === $tokens[$i]['parenthesis_opener']
+            ) {
+                if (empty($map) === false) {
+                    $tokens[$i]['nested_parenthesis'] = $map;
+                }
+
+                if (isset($tokens[$i]['parenthesis_closer']) === true) {
+                    $map[$tokens[$i]['parenthesis_opener']]
+                        = $tokens[$i]['parenthesis_closer'];
+                }
+            } else if (isset($tokens[$i]['parenthesis_closer']) === true
+                && $i === $tokens[$i]['parenthesis_closer']
+            ) {
+                array_pop($map);
+                if (empty($map) === false) {
+                    $tokens[$i]['nested_parenthesis'] = $map;
+                }
+            } else {
+                if (empty($map) === false) {
+                    $tokens[$i]['nested_parenthesis'] = $map;
+                }
+            }//end if
+        }//end for
+
+    }//end _createParenthesisNestingMap()
+
+
+    /**
+     * Creates a scope map of tokens that open scopes.
+     *
+     * @param array  $tokens    The array of tokens to process.
+     * @param object $tokenizer The tokenizer being used to process this file.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     *
+     * @return void
+     * @see    _recurseScopeMap()
+     */
+    private static function _createScopeMap(&$tokens, $tokenizer, $eolChar)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START SCOPE MAP ***".PHP_EOL;
+            $isWin = false;
+            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+                $isWin = true;
+            }
+        }
+
+        $numTokens = count($tokens);
+        for ($i = 0; $i < $numTokens; $i++) {
+            // Check to see if the current token starts a new scope.
+            if (isset($tokenizer->scopeOpeners[$tokens[$i]['code']]) === true) {
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $type    = $tokens[$i]['type'];
+                    $content = PHP_CodeSniffer::prepareForOutput($tokens[$i]['content']);
+                    echo "\tStart scope map at $i:$type => $content".PHP_EOL;
+                }
+
+                if (isset($tokens[$i]['scope_condition']) === true) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t* already processed, skipping *".PHP_EOL;
+                    }
+
+                    continue;
+                }
+
+                $i = self::_recurseScopeMap(
+                    $tokens,
+                    $numTokens,
+                    $tokenizer,
+                    $eolChar,
+                    $i
+                );
+            }//end if
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END SCOPE MAP ***".PHP_EOL;
+        }
+
+    }//end _createScopeMap()
+
+
+    /**
+     * Recurses though the scope openers to build a scope map.
+     *
+     * @param array  $tokens    The array of tokens to process.
+     * @param int    $numTokens The size of the tokens array.
+     * @param object $tokenizer The tokenizer being used to process this file.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     * @param int    $stackPtr  The position in the stack of the token that
+     *                          opened the scope (eg. an IF token or FOR token).
+     * @param int    $depth     How many scope levels down we are.
+     * @param int    $ignore    How many curly braces we are ignoring.
+     *
+     * @return int The position in the stack that closed the scope.
+     */
+    private static function _recurseScopeMap(
+        &$tokens,
+        $numTokens,
+        $tokenizer,
+        $eolChar,
+        $stackPtr,
+        $depth=1,
+        &$ignore=0
+    ) {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo str_repeat("\t", $depth);
+            echo "=> Begin scope map recursion at token $stackPtr with depth $depth".PHP_EOL;
+
+            $isWin = false;
+            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+                $isWin = true;
+            }
+        }
+
+        $opener    = null;
+        $currType  = $tokens[$stackPtr]['code'];
+        $startLine = $tokens[$stackPtr]['line'];
+
+        // We will need this to restore the value if we end up
+        // returning a token ID that causes our calling function to go back
+        // over already ignored braces.
+        $originalIgnore = $ignore;
+
+        // If the start token for this scope opener is the same as
+        // the scope token, we have already found our opener.
+        if (isset($tokenizer->scopeOpeners[$currType]['start'][$currType]) === true) {
+            $opener = $stackPtr;
+        }
+
+        for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {
+            $tokenType = $tokens[$i]['code'];
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $type    = $tokens[$i]['type'];
+                $line    = $tokens[$i]['line'];
+                $content = PHP_CodeSniffer::prepareForOutput($tokens[$i]['content']);
+
+                echo str_repeat("\t", $depth);
+                echo "Process token $i on line $line [";
+                if ($opener !== null) {
+                    echo "opener:$opener;";
+                }
+
+                if ($ignore > 0) {
+                    echo "ignore=$ignore;";
+                }
+
+                echo "]: $type => $content".PHP_EOL;
+            }//end if
+
+            // Very special case for IF statements in PHP that can be defined without
+            // scope tokens. E.g., if (1) 1; 1 ? (1 ? 1 : 1) : 1;
+            // If an IF statement below this one has an opener but no
+            // keyword, the opener will be incorrectly assigned to this IF statement.
+            if (($currType === T_IF || $currType === T_ELSE)
+                && $opener === null
+                && $tokens[$i]['code'] === T_SEMICOLON
+            ) {
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $type = $tokens[$stackPtr]['type'];
+                    echo str_repeat("\t", $depth);
+                    echo "=> Found semicolon before scope opener for $stackPtr:$type, bailing".PHP_EOL;
+                }
+
+                return $i;
+            }
+
+            if ($opener !== null
+                && (isset($tokens[$i]['scope_opener']) === false
+                || $tokenizer->scopeOpeners[$tokens[$stackPtr]['code']]['shared'] === true)
+                && isset($tokenizer->scopeOpeners[$currType]['end'][$tokenType]) === true
+            ) {
+                if ($ignore > 0 && $tokenType === T_CLOSE_CURLY_BRACKET) {
+                    // The last opening bracket must have been for a string
+                    // offset or alike, so let's ignore it.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo '* finished ignoring curly brace *'.PHP_EOL;
+                    }
+
+                    $ignore--;
+                    continue;
+                } else if ($tokens[$opener]['code'] === T_OPEN_CURLY_BRACKET
+                    && $tokenType !== T_CLOSE_CURLY_BRACKET
+                ) {
+                    // The opener is a curly bracket so the closer must be a curly bracket as well.
+                    // We ignore this closer to handle cases such as T_ELSE or T_ELSEIF being considered
+                    // a closer of T_IF when it should not.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type = $tokens[$stackPtr]['type'];
+                        echo str_repeat("\t", $depth);
+                        echo "=> Ignoring non-curly scope closer for $stackPtr:$type".PHP_EOL;
+                    }
+                } else {
+                    $scopeCloser = $i;
+                    $todo        = array(
+                                    $stackPtr,
+                                    $opener,
+                                   );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type       = $tokens[$stackPtr]['type'];
+                        $closerType = $tokens[$scopeCloser]['type'];
+                        echo str_repeat("\t", $depth);
+                        echo "=> Found scope closer ($scopeCloser:$closerType) for $stackPtr:$type".PHP_EOL;
+                    }
+
+                    $validCloser = true;
+                    if (($tokens[$stackPtr]['code'] === T_IF || $tokens[$stackPtr]['code'] === T_ELSEIF)
+                        && ($tokenType === T_ELSE || $tokenType === T_ELSEIF)
+                    ) {
+                        // To be a closer, this token must have an opener.
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", $depth);
+                            echo "* closer needs to be tested *".PHP_EOL;
+                        }
+
+                        $i = self::_recurseScopeMap(
+                            $tokens,
+                            $numTokens,
+                            $tokenizer,
+                            $eolChar,
+                            $i,
+                            ($depth + 1),
+                            $ignore
+                        );
+
+                        if (isset($tokens[$scopeCloser]['scope_opener']) === false) {
+                            $validCloser = false;
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                echo str_repeat("\t", $depth);
+                                echo "* closer is not valid (no opener found) *".PHP_EOL;
+                            }
+                        } else if ($tokens[$tokens[$scopeCloser]['scope_opener']]['code'] !== $tokens[$opener]['code']) {
+                            $validCloser = false;
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                echo str_repeat("\t", $depth);
+                                $type       = $tokens[$tokens[$scopeCloser]['scope_opener']]['type'];
+                                $openerType = $tokens[$opener]['type'];
+                                echo "* closer is not valid (mismatched opener type; $type != $openerType) *".PHP_EOL;
+                            }
+                        } else if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", $depth);
+                            echo "* closer was valid *".PHP_EOL;
+                        }
+                    } else {
+                        // The closer was not processed, so we need to
+                        // complete that token as well.
+                        $todo[] = $scopeCloser;
+                    }//end if
+
+                    if ($validCloser === true) {
+                        foreach ($todo as $token) {
+                            $tokens[$token]['scope_condition'] = $stackPtr;
+                            $tokens[$token]['scope_opener']    = $opener;
+                            $tokens[$token]['scope_closer']    = $scopeCloser;
+                        }
+
+                        if ($tokenizer->scopeOpeners[$tokens[$stackPtr]['code']]['shared'] === true) {
+                            // As we are going back to where we started originally, restore
+                            // the ignore value back to its original value.
+                            $ignore = $originalIgnore;
+                            return $opener;
+                        } else if ($scopeCloser === $i
+                            && isset($tokenizer->scopeOpeners[$tokenType]) === true
+                        ) {
+                            // Unset scope_condition here or else the token will appear to have
+                            // already been processed, and it will be skipped. Normally we want that,
+                            // but in this case, the token is both a closer and an opener, so
+                            // it needs to act like an opener. This is also why we return the
+                            // token before this one; so the closer has a chance to be processed
+                            // a second time, but as an opener.
+                            unset($tokens[$scopeCloser]['scope_condition']);
+                            return ($i - 1);
+                        } else {
+                            return $i;
+                        }
+                    } else {
+                        continue;
+                    }//end if
+                }//end if
+            }//end if
+
+            // Is this an opening condition ?
+            if (isset($tokenizer->scopeOpeners[$tokenType]) === true) {
+                if ($opener === null) {
+                    if ($tokenType === T_USE) {
+                        // PHP use keywords are special because they can be
+                        // used as blocks but also inline in function definitions.
+                        // So if we find them nested inside another opener, just skip them.
+                        continue;
+                    }
+
+                    if ($tokenType === T_FUNCTION
+                        && $tokens[$stackPtr]['code'] !== T_FUNCTION
+                    ) {
+                        // Probably a closure, so process it manually.
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type = $tokens[$stackPtr]['type'];
+                            echo str_repeat("\t", $depth);
+                            echo "=> Found function before scope opener for $stackPtr:$type, processing manually".PHP_EOL;
+                        }
+
+                        if (isset($tokens[$i]['scope_closer']) === true) {
+                            // We've already processed this closure.
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                echo str_repeat("\t", $depth);
+                                echo '* already processed, skipping *'.PHP_EOL;
+                            }
+
+                            $i = $tokens[$i]['scope_closer'];
+                            continue;
+                        }
+
+                        $i = self::_recurseScopeMap(
+                            $tokens,
+                            $numTokens,
+                            $tokenizer,
+                            $eolChar,
+                            $i,
+                            ($depth + 1),
+                            $ignore
+                        );
+
+                        continue;
+                    }//end if
+
+                    // Found another opening condition but still haven't
+                    // found our opener, so we are never going to find one.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type = $tokens[$stackPtr]['type'];
+                        echo str_repeat("\t", $depth);
+                        echo "=> Found new opening condition before scope opener for $stackPtr:$type, bailing".PHP_EOL;
+                    }
+
+                    return $stackPtr;
+                }//end if
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo '* token is an opening condition *'.PHP_EOL;
+                }
+
+                $isShared = ($tokenizer->scopeOpeners[$tokenType]['shared'] === true);
+
+                if (isset($tokens[$i]['scope_condition']) === true) {
+                    // We've been here before.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo '* already processed, skipping *'.PHP_EOL;
+                    }
+
+                    if ($isShared === false
+                        && isset($tokens[$i]['scope_closer']) === true
+                    ) {
+                        $i = $tokens[$i]['scope_closer'];
+                    }
+
+                    continue;
+                } else if ($currType === $tokenType
+                    && $isShared === false
+                    && $opener === null
+                ) {
+                    // We haven't yet found our opener, but we have found another
+                    // scope opener which is the same type as us, and we don't
+                    // share openers, so we will never find one.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo '* it was another token\'s opener, bailing *'.PHP_EOL;
+                    }
+
+                    return $stackPtr;
+                } else {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", $depth);
+                        echo '* searching for opener *'.PHP_EOL;
+                    }
+
+                    if (isset($tokenizer->scopeOpeners[$tokenType]['end'][T_CLOSE_CURLY_BRACKET]) === true) {
+                        $oldIgnore = $ignore;
+                        $ignore    = 0;
+                    }
+
+                    // PHP has a max nesting level for functions. Stop before we hit that limit
+                    // because too many loops means we've run into trouble anyway.
+                    if ($depth > 50) {
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", $depth);
+                            echo '* reached maximum nesting level; aborting *'.PHP_EOL;
+                        }
+
+                        throw new PHP_CodeSniffer_Exception('Maximum nesting level reached; file could not be processed');
+                    }
+
+                    $oldDepth = $depth;
+                    if ($isShared === true
+                        && isset($tokenizer->scopeOpeners[$tokenType]['with'][$currType]) === true
+                    ) {
+                        // Don't allow the depth to increment because this is
+                        // possibly not a true nesting if we are sharing our closer.
+                        // This can happen, for example, when a SWITCH has a large
+                        // number of CASE statements with the same shared BREAK.
+                        $depth--;
+                    }
+
+                    $i = self::_recurseScopeMap(
+                        $tokens,
+                        $numTokens,
+                        $tokenizer,
+                        $eolChar,
+                        $i,
+                        ($depth + 1),
+                        $ignore
+                    );
+
+                    $depth = $oldDepth;
+
+                    if (isset($tokenizer->scopeOpeners[$tokenType]['end'][T_CLOSE_CURLY_BRACKET]) === true) {
+                        $ignore = $oldIgnore;
+                    }
+                }//end if
+            }//end if
+
+            if (isset($tokenizer->scopeOpeners[$currType]['start'][$tokenType]) === true
+                && $opener === null
+            ) {
+                if ($tokenType === T_OPEN_CURLY_BRACKET) {
+                    if (isset($tokens[$stackPtr]['parenthesis_closer']) === true
+                        && $i < $tokens[$stackPtr]['parenthesis_closer']
+                    ) {
+                        // We found a curly brace inside the condition of the
+                        // current scope opener, so it must be a string offset.
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", $depth);
+                            echo '* ignoring curly brace *'.PHP_EOL;
+                        }
+
+                        $ignore++;
+                    } else {
+                        // Make sure this is actually an opener and not a
+                        // string offset (e.g., $var{0}).
+                        for ($x = ($i - 1); $x > 0; $x--) {
+                            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === true) {
+                                continue;
+                            } else {
+                                // If the first non-whitespace/comment token is a
+                                // variable or object operator then this is an opener
+                                // for a string offset and not a scope.
+                                if ($tokens[$x]['code'] === T_VARIABLE
+                                    || $tokens[$x]['code'] === T_OBJECT_OPERATOR
+                                ) {
+                                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                        echo str_repeat("\t", $depth);
+                                        echo '* ignoring curly brace *'.PHP_EOL;
+                                    }
+
+                                    $ignore++;
+                                }//end if
+
+                                break;
+                            }//end if
+                        }//end for
+                    }//end if
+                }//end if
+
+                if ($ignore === 0 || $tokenType !== T_OPEN_CURLY_BRACKET) {
+                    // We found the opening scope token for $currType.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type = $tokens[$stackPtr]['type'];
+                        echo str_repeat("\t", $depth);
+                        echo "=> Found scope opener for $stackPtr:$type".PHP_EOL;
+                    }
+
+                    $opener = $i;
+                }
+            } else if ($tokenType === T_OPEN_PARENTHESIS) {
+                if (isset($tokens[$i]['parenthesis_owner']) === true) {
+                    $owner = $tokens[$i]['parenthesis_owner'];
+                    if (isset(PHP_CodeSniffer_Tokens::$scopeOpeners[$tokens[$owner]['code']]) === true
+                        && isset($tokens[$i]['parenthesis_closer']) === true
+                    ) {
+                        // If we get into here, then we opened a parenthesis for
+                        // a scope (eg. an if or else if) so we need to update the
+                        // start of the line so that when we check to see
+                        // if the closing parenthesis is more than 3 lines away from
+                        // the statement, we check from the closing parenthesis.
+                        $startLine = $tokens[$tokens[$i]['parenthesis_closer']]['line'];
+                    }
+                }
+            } else if ($tokenType === T_OPEN_CURLY_BRACKET && $opener !== null) {
+                // We opened something that we don't have a scope opener for.
+                // Examples of this are curly brackets for string offsets etc.
+                // We want to ignore this so that we don't have an invalid scope
+                // map.
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo '* ignoring curly brace *'.PHP_EOL;
+                }
+
+                $ignore++;
+            } else if ($tokenType === T_CLOSE_CURLY_BRACKET && $ignore > 0) {
+                // We found the end token for the opener we were ignoring.
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", $depth);
+                    echo '* finished ignoring curly brace *'.PHP_EOL;
+                }
+
+                $ignore--;
+            } else if ($opener === null
+                && isset($tokenizer->scopeOpeners[$currType]) === true
+            ) {
+                // If we still haven't found the opener after 3 lines,
+                // we're not going to find it, unless we know it requires
+                // an opener (in which case we better keep looking) or the last
+                // token was empty (in which case we'll just confirm there is
+                // more code in this file and not just a big comment).
+                if ($tokens[$i]['line'] >= ($startLine + 3)
+                    && isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[($i - 1)]['code']]) === false
+                ) {
+                    if ($tokenizer->scopeOpeners[$currType]['strict'] === true) {
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type  = $tokens[$stackPtr]['type'];
+                            $lines = ($tokens[$i]['line'] - $startLine);
+                            echo str_repeat("\t", $depth);
+                            echo "=> Still looking for $stackPtr:$type scope opener after $lines lines".PHP_EOL;
+                        }
+                    } else {
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type = $tokens[$stackPtr]['type'];
+                            echo str_repeat("\t", $depth);
+                            echo "=> Couldn't find scope opener for $stackPtr:$type, bailing".PHP_EOL;
+                        }
+
+                        return $stackPtr;
+                    }
+                }
+            } else if ($opener !== null
+                && $tokenType !== T_BREAK
+                && isset($tokenizer->endScopeTokens[$tokenType]) === true
+            ) {
+                if (isset($tokens[$i]['scope_condition']) === false) {
+                    if ($ignore > 0) {
+                        // We found the end token for the opener we were ignoring.
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", $depth);
+                            echo '* finished ignoring curly brace *'.PHP_EOL;
+                        }
+
+                        $ignore--;
+                    } else {
+                        // We found a token that closes the scope but it doesn't
+                        // have a condition, so it belongs to another token and
+                        // our token doesn't have a closer, so pretend this is
+                        // the closer.
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type = $tokens[$stackPtr]['type'];
+                            echo str_repeat("\t", $depth);
+                            echo "=> Found (unexpected) scope closer for $stackPtr:$type".PHP_EOL;
+                        }
+
+                        foreach (array($stackPtr, $opener) as $token) {
+                            $tokens[$token]['scope_condition'] = $stackPtr;
+                            $tokens[$token]['scope_opener']    = $opener;
+                            $tokens[$token]['scope_closer']    = $i;
+                        }
+
+                        return ($i - 1);
+                    }//end if
+                }//end if
+            }//end if
+        }//end for
+
+        return $stackPtr;
+
+    }//end _recurseScopeMap()
+
+
+    /**
+     * Constructs the level map.
+     *
+     * The level map adds a 'level' index to each token which indicates the
+     * depth that a token within a set of scope blocks. It also adds a
+     * 'condition' index which is an array of the scope conditions that opened
+     * each of the scopes - position 0 being the first scope opener.
+     *
+     * @param array  $tokens    The array of tokens to process.
+     * @param object $tokenizer The tokenizer being used to process this file.
+     * @param string $eolChar   The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    private static function _createLevelMap(&$tokens, $tokenizer, $eolChar)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START LEVEL MAP ***".PHP_EOL;
+        }
+
+        $numTokens  = count($tokens);
+        $level      = 0;
+        $conditions = array();
+        $lastOpener = null;
+        $openers    = array();
+
+        for ($i = 0; $i < $numTokens; $i++) {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $type = $tokens[$i]['type'];
+                $line = $tokens[$i]['line'];
+                $len  = $tokens[$i]['length'];
+                $col  = $tokens[$i]['column'];
+
+                $content = PHP_CodeSniffer::prepareForOutput($tokens[$i]['content']);
+
+                echo str_repeat("\t", ($level + 1));
+                echo "Process token $i on line $line [col:$col;len:$len;lvl:$level;";
+                if (empty($conditions) !== true) {
+                    $condString = 'conds;';
+                    foreach ($conditions as $condition) {
+                        $condString .= token_name($condition).',';
+                    }
+
+                    echo rtrim($condString, ',').';';
+                }
+
+                echo "]: $type => $content".PHP_EOL;
+            }//end if
+
+            $tokens[$i]['level']      = $level;
+            $tokens[$i]['conditions'] = $conditions;
+
+            if (isset($tokens[$i]['scope_condition']) === true) {
+                // Check to see if this token opened the scope.
+                if ($tokens[$i]['scope_opener'] === $i) {
+                    $stackPtr = $tokens[$i]['scope_condition'];
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type = $tokens[$stackPtr]['type'];
+                        echo str_repeat("\t", ($level + 1));
+                        echo "=> Found scope opener for $stackPtr:$type".PHP_EOL;
+                    }
+
+                    $stackPtr = $tokens[$i]['scope_condition'];
+
+                    // If we find a scope opener that has a shared closer,
+                    // then we need to go back over the condition map that we
+                    // just created and fix ourselves as we just added some
+                    // conditions where there was none. This happens for T_CASE
+                    // statements that are using the same break statement.
+                    if ($lastOpener !== null && $tokens[$lastOpener]['scope_closer'] === $tokens[$i]['scope_closer']) {
+                        // This opener shares its closer with the previous opener,
+                        // but we still need to check if the two openers share their
+                        // closer with each other directly (like CASE and DEFAULT)
+                        // or if they are just sharing because one doesn't have a
+                        // closer (like CASE with no BREAK using a SWITCHes closer).
+                        $thisType = $tokens[$tokens[$i]['scope_condition']]['code'];
+                        $opener   = $tokens[$lastOpener]['scope_condition'];
+
+                        $isShared = isset($tokenizer->scopeOpeners[$thisType]['with'][$tokens[$opener]['code']]);
+
+                        reset($tokenizer->scopeOpeners[$thisType]['end']);
+                        reset($tokenizer->scopeOpeners[$tokens[$opener]['code']]['end']);
+                        $sameEnd = (current($tokenizer->scopeOpeners[$thisType]['end']) === current($tokenizer->scopeOpeners[$tokens[$opener]['code']]['end']));
+
+                        if ($isShared === true && $sameEnd === true) {
+                            $badToken = $opener;
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                $type = $tokens[$badToken]['type'];
+                                echo str_repeat("\t", ($level + 1));
+                                echo "* shared closer, cleaning up $badToken:$type *".PHP_EOL;
+                            }
+
+                            for ($x = $tokens[$i]['scope_condition']; $x <= $i; $x++) {
+                                $oldConditions = $tokens[$x]['conditions'];
+                                $oldLevel      = $tokens[$x]['level'];
+                                $tokens[$x]['level']--;
+                                unset($tokens[$x]['conditions'][$badToken]);
+                                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                    $type     = $tokens[$x]['type'];
+                                    $oldConds = '';
+                                    foreach ($oldConditions as $condition) {
+                                        $oldConds .= token_name($condition).',';
+                                    }
+
+                                    $oldConds = rtrim($oldConds, ',');
+
+                                    $newConds = '';
+                                    foreach ($tokens[$x]['conditions'] as $condition) {
+                                        $newConds .= token_name($condition).',';
+                                    }
+
+                                    $newConds = rtrim($newConds, ',');
+
+                                    $newLevel = $tokens[$x]['level'];
+                                    echo str_repeat("\t", ($level + 1));
+                                    echo "* cleaned $x:$type *".PHP_EOL;
+                                    echo str_repeat("\t", ($level + 2));
+                                    echo "=> level changed from $oldLevel to $newLevel".PHP_EOL;
+                                    echo str_repeat("\t", ($level + 2));
+                                    echo "=> conditions changed from $oldConds to $newConds".PHP_EOL;
+                                }//end if
+                            }//end for
+
+                            unset($conditions[$badToken]);
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                $type = $tokens[$badToken]['type'];
+                                echo str_repeat("\t", ($level + 1));
+                                echo "* token $badToken:$type removed from conditions array *".PHP_EOL;
+                            }
+
+                            unset($openers[$lastOpener]);
+
+                            $level--;
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                echo str_repeat("\t", ($level + 2));
+                                echo '* level decreased *'.PHP_EOL;
+                            }
+                        }//end if
+                    }//end if
+
+                    $level++;
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", ($level + 1));
+                        echo '* level increased *'.PHP_EOL;
+                    }
+
+                    $conditions[$stackPtr] = $tokens[$stackPtr]['code'];
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type = $tokens[$stackPtr]['type'];
+                        echo str_repeat("\t", ($level + 1));
+                        echo "* token $stackPtr:$type added to conditions array *".PHP_EOL;
+                    }
+
+                    $lastOpener = $tokens[$i]['scope_opener'];
+                    if ($lastOpener !== null) {
+                        $openers[$lastOpener] = $lastOpener;
+                    }
+                } else if ($lastOpener !== null && $tokens[$lastOpener]['scope_closer'] === $i) {
+                    foreach (array_reverse($openers) as $opener) {
+                        if ($tokens[$opener]['scope_closer'] === $i) {
+                            $oldOpener = array_pop($openers);
+                            if (empty($openers) === false) {
+                                $lastOpener           = array_pop($openers);
+                                $openers[$lastOpener] = $lastOpener;
+                            } else {
+                                $lastOpener = null;
+                            }
+
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                $type = $tokens[$oldOpener]['type'];
+                                echo str_repeat("\t", ($level + 1));
+                                echo "=> Found scope closer for $oldOpener:$type".PHP_EOL;
+                            }
+
+                            $oldCondition = array_pop($conditions);
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                echo str_repeat("\t", ($level + 1));
+                                echo '* token '.token_name($oldCondition).' removed from conditions array *'.PHP_EOL;
+                            }
+
+                            // Make sure this closer actually belongs to us.
+                            // Either the condition also has to think this is the
+                            // closer, or it has to allow sharing with us.
+                            $condition = $tokens[$tokens[$i]['scope_condition']]['code'];
+                            if ($condition !== $oldCondition) {
+                                if (isset($tokenizer->scopeOpeners[$oldCondition]['with'][$condition]) === false) {
+                                    $badToken = $tokens[$oldOpener]['scope_condition'];
+
+                                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                        $type = token_name($oldCondition);
+                                        echo str_repeat("\t", ($level + 1));
+                                        echo "* scope closer was bad, cleaning up $badToken:$type *".PHP_EOL;
+                                    }
+
+                                    for ($x = ($oldOpener + 1); $x <= $i; $x++) {
+                                        $oldConditions = $tokens[$x]['conditions'];
+                                        $oldLevel      = $tokens[$x]['level'];
+                                        $tokens[$x]['level']--;
+                                        unset($tokens[$x]['conditions'][$badToken]);
+                                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                            $type     = $tokens[$x]['type'];
+                                            $oldConds = '';
+                                            foreach ($oldConditions as $condition) {
+                                                $oldConds .= token_name($condition).',';
+                                            }
+
+                                            $oldConds = rtrim($oldConds, ',');
+
+                                            $newConds = '';
+                                            foreach ($tokens[$x]['conditions'] as $condition) {
+                                                $newConds .= token_name($condition).',';
+                                            }
+
+                                            $newConds = rtrim($newConds, ',');
+
+                                            $newLevel = $tokens[$x]['level'];
+                                            echo str_repeat("\t", ($level + 1));
+                                            echo "* cleaned $x:$type *".PHP_EOL;
+                                            echo str_repeat("\t", ($level + 2));
+                                            echo "=> level changed from $oldLevel to $newLevel".PHP_EOL;
+                                            echo str_repeat("\t", ($level + 2));
+                                            echo "=> conditions changed from $oldConds to $newConds".PHP_EOL;
+                                        }//end if
+                                    }//end for
+                                }//end if
+                            }//end if
+
+                            $level--;
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                echo str_repeat("\t", ($level + 2));
+                                echo '* level decreased *'.PHP_EOL;
+                            }
+
+                            $tokens[$i]['level']      = $level;
+                            $tokens[$i]['conditions'] = $conditions;
+                        }//end if
+                    }//end foreach
+                }//end if
+            }//end if
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END LEVEL MAP ***".PHP_EOL;
+        }
+
+    }//end _createLevelMap()
+
+
+    /**
+     * Returns the declaration names for T_CLASS, T_INTERFACE and T_FUNCTION tokens.
+     *
+     * @param int $stackPtr The position of the declaration token which
+     *                      declared the class, interface or function.
+     *
+     * @return string|null The name of the class, interface or function.
+     *                     or NULL if the function is a closure.
+     * @throws PHP_CodeSniffer_Exception If the specified token is not of type
+     *                                   T_FUNCTION, T_CLASS or T_INTERFACE.
+     */
+    public function getDeclarationName($stackPtr)
+    {
+        $tokenCode = $this->_tokens[$stackPtr]['code'];
+        if ($tokenCode !== T_FUNCTION
+            && $tokenCode !== T_CLASS
+            && $tokenCode !== T_INTERFACE
+            && $tokenCode !== T_TRAIT
+        ) {
+            throw new PHP_CodeSniffer_Exception('Token type "'.$this->_tokens[$stackPtr]['type'].'" is not T_FUNCTION, T_CLASS, T_INTERFACE or T_TRAIT');
+        }
+
+        if ($tokenCode === T_FUNCTION
+            && $this->isAnonymousFunction($stackPtr) === true
+        ) {
+            return null;
+        }
+
+        $content = null;
+        for ($i = $stackPtr; $i < $this->numTokens; $i++) {
+            if ($this->_tokens[$i]['code'] === T_STRING) {
+                $content = $this->_tokens[$i]['content'];
+                break;
+            }
+        }
+
+        return $content;
+
+    }//end getDeclarationName()
+
+
+    /**
+     * Check if the token at the specified position is a anonymous function.
+     *
+     * @param int $stackPtr The position of the declaration token which
+     *                      declared the class, interface or function.
+     *
+     * @return boolean
+     * @throws PHP_CodeSniffer_Exception If the specified token is not of type
+     *                                   T_FUNCTION
+     */
+    public function isAnonymousFunction($stackPtr)
+    {
+        $tokenCode = $this->_tokens[$stackPtr]['code'];
+        if ($tokenCode !== T_FUNCTION) {
+            throw new PHP_CodeSniffer_Exception('Token type is not T_FUNCTION');
+        }
+
+        if (isset($this->_tokens[$stackPtr]['parenthesis_opener']) === false) {
+            // Something is not right with this function.
+            return false;
+        }
+
+        $name = false;
+        for ($i = ($stackPtr + 1); $i < $this->numTokens; $i++) {
+            if ($this->_tokens[$i]['code'] === T_STRING) {
+                $name = $i;
+                break;
+            }
+        }
+
+        if ($name === false) {
+            // No name found.
+            return true;
+        }
+
+        $open = $this->_tokens[$stackPtr]['parenthesis_opener'];
+        if ($name > $open) {
+            return true;
+        }
+
+        return false;
+
+    }//end isAnonymousFunction()
+
+
+    /**
+     * Returns the method parameters for the specified T_FUNCTION token.
+     *
+     * Each parameter is in the following format:
+     *
+     * <code>
+     *   0 => array(
+     *         'name'              => '$var',  // The variable name.
+     *         'pass_by_reference' => false,   // Passed by reference.
+     *         'type_hint'         => string,  // Type hint for array or custom type
+     *        )
+     * </code>
+     *
+     * Parameters with default values have an additional array index of
+     * 'default' with the value of the default as a string.
+     *
+     * @param int $stackPtr The position in the stack of the T_FUNCTION token
+     *                      to acquire the parameters for.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If the specified $stackPtr is not of
+     *                                   type T_FUNCTION.
+     */
+    public function getMethodParameters($stackPtr)
+    {
+        if ($this->_tokens[$stackPtr]['code'] !== T_FUNCTION) {
+            throw new PHP_CodeSniffer_Exception('$stackPtr must be of type T_FUNCTION');
+        }
+
+        $opener = $this->_tokens[$stackPtr]['parenthesis_opener'];
+        $closer = $this->_tokens[$stackPtr]['parenthesis_closer'];
+
+        $vars            = array();
+        $currVar         = null;
+        $defaultStart    = null;
+        $paramCount      = 0;
+        $passByReference = false;
+        $variableLength  = false;
+        $typeHint        = '';
+
+        for ($i = ($opener + 1); $i <= $closer; $i++) {
+            // Check to see if this token has a parenthesis or bracket opener. If it does
+            // it's likely to be an array which might have arguments in it. This
+            // could cause problems in our parsing below, so lets just skip to the
+            // end of it.
+            if (isset($this->_tokens[$i]['parenthesis_opener']) === true) {
+                // Don't do this if it's the close parenthesis for the method.
+                if ($i !== $this->_tokens[$i]['parenthesis_closer']) {
+                    $i = ($this->_tokens[$i]['parenthesis_closer'] + 1);
+                }
+            }
+
+            if (isset($this->_tokens[$i]['bracket_opener']) === true) {
+                // Don't do this if it's the close parenthesis for the method.
+                if ($i !== $this->_tokens[$i]['bracket_closer']) {
+                    $i = ($this->_tokens[$i]['bracket_closer'] + 1);
+                }
+            }
+
+            switch ($this->_tokens[$i]['code']) {
+            case T_BITWISE_AND:
+                $passByReference = true;
+                break;
+            case T_VARIABLE:
+                $currVar = $i;
+                break;
+            case T_ELLIPSIS:
+                $variableLength = true;
+                break;
+            case T_ARRAY_HINT:
+            case T_CALLABLE:
+                $typeHint = $this->_tokens[$i]['content'];
+                break;
+            case T_STRING:
+                // This is a string, so it may be a type hint, but it could
+                // also be a constant used as a default value.
+                $prevComma = false;
+                for ($t = $i; $t >= $opener; $t--) {
+                    if ($this->_tokens[$t]['code'] === T_COMMA) {
+                        $prevComma = $t;
+                        break;
+                    }
+                }
+
+                if ($prevComma !== false) {
+                    $nextEquals = false;
+                    for ($t = $prevComma; $t < $i; $t++) {
+                        if ($this->_tokens[$t]['code'] === T_EQUAL) {
+                            $nextEquals = $t;
+                            break;
+                        }
+                    }
+
+                    if ($nextEquals !== false) {
+                        break;
+                    }
+                }
+
+                if ($defaultStart === null) {
+                    $typeHint .= $this->_tokens[$i]['content'];
+                }
+                break;
+            case T_NS_SEPARATOR:
+                // Part of a type hint or default value.
+                if ($defaultStart === null) {
+                    $typeHint .= $this->_tokens[$i]['content'];
+                }
+                break;
+            case T_CLOSE_PARENTHESIS:
+            case T_COMMA:
+                // If it's null, then there must be no parameters for this
+                // method.
+                if ($currVar === null) {
+                    continue;
+                }
+
+                $vars[$paramCount]         = array();
+                $vars[$paramCount]['name'] = $this->_tokens[$currVar]['content'];
+
+                if ($defaultStart !== null) {
+                    $vars[$paramCount]['default']
+                        = $this->getTokensAsString(
+                            $defaultStart,
+                            ($i - $defaultStart)
+                        );
+                }
+
+                $vars[$paramCount]['pass_by_reference'] = $passByReference;
+                $vars[$paramCount]['variable_length']   = $variableLength;
+                $vars[$paramCount]['type_hint']         = $typeHint;
+
+                // Reset the vars, as we are about to process the next parameter.
+                $defaultStart    = null;
+                $passByReference = false;
+                $variableLength  = false;
+                $typeHint        = '';
+
+                $paramCount++;
+                break;
+            case T_EQUAL:
+                $defaultStart = ($i + 1);
+                break;
+            }//end switch
+        }//end for
+
+        return $vars;
+
+    }//end getMethodParameters()
+
+
+    /**
+     * Returns the visibility and implementation properties of a method.
+     *
+     * The format of the array is:
+     * <code>
+     *   array(
+     *    'scope'           => 'public', // public private or protected
+     *    'scope_specified' => true,     // true is scope keyword was found.
+     *    'is_abstract'     => false,    // true if the abstract keyword was found.
+     *    'is_final'        => false,    // true if the final keyword was found.
+     *    'is_static'       => false,    // true if the static keyword was found.
+     *    'is_closure'      => false,    // true if no name is found.
+     *   );
+     * </code>
+     *
+     * @param int $stackPtr The position in the stack of the T_FUNCTION token to
+     *                      acquire the properties for.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If the specified position is not a
+     *                                   T_FUNCTION token.
+     */
+    public function getMethodProperties($stackPtr)
+    {
+        if ($this->_tokens[$stackPtr]['code'] !== T_FUNCTION) {
+            throw new PHP_CodeSniffer_Exception('$stackPtr must be of type T_FUNCTION');
+        }
+
+        $valid = array(
+                  T_PUBLIC      => T_PUBLIC,
+                  T_PRIVATE     => T_PRIVATE,
+                  T_PROTECTED   => T_PROTECTED,
+                  T_STATIC      => T_STATIC,
+                  T_FINAL       => T_FINAL,
+                  T_ABSTRACT    => T_ABSTRACT,
+                  T_WHITESPACE  => T_WHITESPACE,
+                  T_COMMENT     => T_COMMENT,
+                  T_DOC_COMMENT => T_DOC_COMMENT,
+                 );
+
+        $scope          = 'public';
+        $scopeSpecified = false;
+        $isAbstract     = false;
+        $isFinal        = false;
+        $isStatic       = false;
+        $isClosure      = $this->isAnonymousFunction($stackPtr);
+
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if (isset($valid[$this->_tokens[$i]['code']]) === false) {
+                break;
+            }
+
+            switch ($this->_tokens[$i]['code']) {
+            case T_PUBLIC:
+                $scope          = 'public';
+                $scopeSpecified = true;
+                break;
+            case T_PRIVATE:
+                $scope          = 'private';
+                $scopeSpecified = true;
+                break;
+            case T_PROTECTED:
+                $scope          = 'protected';
+                $scopeSpecified = true;
+                break;
+            case T_ABSTRACT:
+                $isAbstract = true;
+                break;
+            case T_FINAL:
+                $isFinal = true;
+                break;
+            case T_STATIC:
+                $isStatic = true;
+                break;
+            }//end switch
+        }//end for
+
+        return array(
+                'scope'           => $scope,
+                'scope_specified' => $scopeSpecified,
+                'is_abstract'     => $isAbstract,
+                'is_final'        => $isFinal,
+                'is_static'       => $isStatic,
+                'is_closure'      => $isClosure,
+               );
+
+    }//end getMethodProperties()
+
+
+    /**
+     * Returns the visibility and implementation properties of the class member
+     * variable found at the specified position in the stack.
+     *
+     * The format of the array is:
+     *
+     * <code>
+     *   array(
+     *    'scope'       => 'public', // public private or protected
+     *    'is_static'   => false,    // true if the static keyword was found.
+     *   );
+     * </code>
+     *
+     * @param int $stackPtr The position in the stack of the T_VARIABLE token to
+     *                      acquire the properties for.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If the specified position is not a
+     *                                   T_VARIABLE token, or if the position is not
+     *                                   a class member variable.
+     */
+    public function getMemberProperties($stackPtr)
+    {
+        if ($this->_tokens[$stackPtr]['code'] !== T_VARIABLE) {
+            throw new PHP_CodeSniffer_Exception('$stackPtr must be of type T_VARIABLE');
+        }
+
+        $conditions = array_keys($this->_tokens[$stackPtr]['conditions']);
+        $ptr        = array_pop($conditions);
+        if (isset($this->_tokens[$ptr]) === false
+            || ($this->_tokens[$ptr]['code'] !== T_CLASS
+            && $this->_tokens[$ptr]['code'] !== T_TRAIT)
+        ) {
+            if (isset($this->_tokens[$ptr]) === true
+                && $this->_tokens[$ptr]['code'] === T_INTERFACE
+            ) {
+                // T_VARIABLEs in interfaces can actually be method arguments
+                // but they wont be seen as being inside the method because there
+                // are no scope openers and closers for abstract methods. If it is in
+                // parentheses, we can be pretty sure it is a method argument.
+                if (isset($this->_tokens[$stackPtr]['nested_parenthesis']) === false
+                    || empty($this->_tokens[$stackPtr]['nested_parenthesis']) === true
+                ) {
+                    $error = 'Possible parse error: interfaces may not include member vars';
+                    $this->addWarning($error, $stackPtr, 'Internal.ParseError.InterfaceHasMemberVar');
+                    return array();
+                }
+            } else {
+                throw new PHP_CodeSniffer_Exception('$stackPtr is not a class member var');
+            }
+        }
+
+        $valid = array(
+                  T_PUBLIC      => T_PUBLIC,
+                  T_PRIVATE     => T_PRIVATE,
+                  T_PROTECTED   => T_PROTECTED,
+                  T_STATIC      => T_STATIC,
+                  T_WHITESPACE  => T_WHITESPACE,
+                  T_COMMENT     => T_COMMENT,
+                  T_DOC_COMMENT => T_DOC_COMMENT,
+                  T_VARIABLE    => T_VARIABLE,
+                  T_COMMA       => T_COMMA,
+                 );
+
+        $scope          = 'public';
+        $scopeSpecified = false;
+        $isStatic       = false;
+
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if (isset($valid[$this->_tokens[$i]['code']]) === false) {
+                break;
+            }
+
+            switch ($this->_tokens[$i]['code']) {
+            case T_PUBLIC:
+                $scope          = 'public';
+                $scopeSpecified = true;
+                break;
+            case T_PRIVATE:
+                $scope          = 'private';
+                $scopeSpecified = true;
+                break;
+            case T_PROTECTED:
+                $scope          = 'protected';
+                $scopeSpecified = true;
+                break;
+            case T_STATIC:
+                $isStatic = true;
+                break;
+            }
+        }//end for
+
+        return array(
+                'scope'           => $scope,
+                'scope_specified' => $scopeSpecified,
+                'is_static'       => $isStatic,
+               );
+
+    }//end getMemberProperties()
+
+
+    /**
+     * Returns the visibility and implementation properties of a class.
+     *
+     * The format of the array is:
+     * <code>
+     *   array(
+     *    'is_abstract' => false, // true if the abstract keyword was found.
+     *    'is_final'    => false, // true if the final keyword was found.
+     *   );
+     * </code>
+     *
+     * @param int $stackPtr The position in the stack of the T_CLASS token to
+     *                      acquire the properties for.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If the specified position is not a
+     *                                   T_CLASS token.
+     */
+    public function getClassProperties($stackPtr)
+    {
+        if ($this->_tokens[$stackPtr]['code'] !== T_CLASS) {
+            throw new PHP_CodeSniffer_Exception('$stackPtr must be of type T_CLASS');
+        }
+
+        $valid = array(
+                  T_FINAL       => T_FINAL,
+                  T_ABSTRACT    => T_ABSTRACT,
+                  T_WHITESPACE  => T_WHITESPACE,
+                  T_COMMENT     => T_COMMENT,
+                  T_DOC_COMMENT => T_DOC_COMMENT,
+                 );
+
+        $isAbstract = false;
+        $isFinal    = false;
+
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if (isset($valid[$this->_tokens[$i]['code']]) === false) {
+                break;
+            }
+
+            switch ($this->_tokens[$i]['code']) {
+            case T_ABSTRACT:
+                $isAbstract = true;
+                break;
+
+            case T_FINAL:
+                $isFinal = true;
+                break;
+            }
+        }//end for
+
+        return array(
+                'is_abstract' => $isAbstract,
+                'is_final'    => $isFinal,
+               );
+
+    }//end getClassProperties()
+
+
+    /**
+     * Determine if the passed token is a reference operator.
+     *
+     * Returns true if the specified token position represents a reference.
+     * Returns false if the token represents a bitwise operator.
+     *
+     * @param int $stackPtr The position of the T_BITWISE_AND token.
+     *
+     * @return boolean
+     */
+    public function isReference($stackPtr)
+    {
+        if ($this->_tokens[$stackPtr]['code'] !== T_BITWISE_AND) {
+            return false;
+        }
+
+        $tokenBefore = $this->findPrevious(
+            PHP_CodeSniffer_Tokens::$emptyTokens,
+            ($stackPtr - 1),
+            null,
+            true
+        );
+
+        if ($this->_tokens[$tokenBefore]['code'] === T_FUNCTION) {
+            // Function returns a reference.
+            return true;
+        }
+
+        if ($this->_tokens[$tokenBefore]['code'] === T_DOUBLE_ARROW) {
+            // Inside a foreach loop, this is a reference.
+            return true;
+        }
+
+        if ($this->_tokens[$tokenBefore]['code'] === T_AS) {
+            // Inside a foreach loop, this is a reference.
+            return true;
+        }
+
+        if ($this->_tokens[$tokenBefore]['code'] === T_OPEN_SHORT_ARRAY) {
+            // Inside an array declaration, this is a reference.
+            return true;
+        }
+
+        if (isset(PHP_CodeSniffer_Tokens::$assignmentTokens[$this->_tokens[$tokenBefore]['code']]) === true) {
+            // This is directly after an assignment. It's a reference. Even if
+            // it is part of an operation, the other tests will handle it.
+            return true;
+        }
+
+        if (isset($this->_tokens[$stackPtr]['nested_parenthesis']) === true) {
+            $brackets    = $this->_tokens[$stackPtr]['nested_parenthesis'];
+            $lastBracket = array_pop($brackets);
+            if (isset($this->_tokens[$lastBracket]['parenthesis_owner']) === true) {
+                $owner = $this->_tokens[$this->_tokens[$lastBracket]['parenthesis_owner']];
+                if ($owner['code'] === T_FUNCTION
+                    || $owner['code'] === T_CLOSURE
+                    || $owner['code'] === T_ARRAY
+                ) {
+                    // Inside a function or array declaration, this is a reference.
+                    return true;
+                }
+            } else {
+                $prev = false;
+                for ($t = ($this->_tokens[$lastBracket]['parenthesis_opener'] - 1); $t >= 0; $t--) {
+                    if ($this->_tokens[$t]['code'] !== T_WHITESPACE) {
+                        $prev = $t;
+                        break;
+                    }
+                }
+
+                if ($prev !== false && $this->_tokens[$prev]['code'] === T_USE) {
+                    return true;
+                }
+            }//end if
+        }//end if
+
+        $tokenAfter = $this->findNext(
+            PHP_CodeSniffer_Tokens::$emptyTokens,
+            ($stackPtr + 1),
+            null,
+            true
+        );
+
+        if ($this->_tokens[$tokenAfter]['code'] === T_VARIABLE
+            && ($this->_tokens[$tokenBefore]['code'] === T_OPEN_PARENTHESIS
+            || $this->_tokens[$tokenBefore]['code'] === T_COMMA)
+        ) {
+            return true;
+        }
+
+        return false;
+
+    }//end isReference()
+
+
+    /**
+     * Returns the content of the tokens from the specified start position in
+     * the token stack for the specified length.
+     *
+     * @param int $start  The position to start from in the token stack.
+     * @param int $length The length of tokens to traverse from the start pos.
+     *
+     * @return string The token contents.
+     */
+    public function getTokensAsString($start, $length)
+    {
+        $str = '';
+        $end = ($start + $length);
+        if ($end > $this->numTokens) {
+            $end = $this->numTokens;
+        }
+
+        for ($i = $start; $i < $end; $i++) {
+            $str .= $this->_tokens[$i]['content'];
+        }
+
+        return $str;
+
+    }//end getTokensAsString()
+
+
+    /**
+     * Returns the position of the next specified token(s).
+     *
+     * If a value is specified, the next token of the specified type(s)
+     * containing the specified value will be returned.
+     *
+     * Returns false if no token can be found.
+     *
+     * @param int|array $types   The type(s) of tokens to search for.
+     * @param int       $start   The position to start searching from in the
+     *                           token stack.
+     * @param int       $end     The end position to fail if no token is found.
+     *                           if not specified or null, end will default to
+     *                           the start of the token stack.
+     * @param bool      $exclude If true, find the next token that are NOT of
+     *                           the types specified in $types.
+     * @param string    $value   The value that the token(s) must be equal to.
+     *                           If value is omitted, tokens with any value will
+     *                           be returned.
+     * @param bool      $local   If true, tokens outside the current statement
+     *                           will not be checked. IE. checking will stop
+     *                           at the next semi-colon found.
+     *
+     * @return int|bool
+     * @see    findNext()
+     */
+    public function findPrevious(
+        $types,
+        $start,
+        $end=null,
+        $exclude=false,
+        $value=null,
+        $local=false
+    ) {
+        $types = (array) $types;
+
+        if ($end === null) {
+            $end = 0;
+        }
+
+        for ($i = $start; $i >= $end; $i--) {
+            $found = (bool) $exclude;
+            foreach ($types as $type) {
+                if ($this->_tokens[$i]['code'] === $type) {
+                    $found = !$exclude;
+                    break;
+                }
+            }
+
+            if ($found === true) {
+                if ($value === null) {
+                    return $i;
+                } else if ($this->_tokens[$i]['content'] === $value) {
+                    return $i;
+                }
+            }
+
+            if ($local === true) {
+                if (isset($this->_tokens[$i]['scope_opener']) === true
+                    && $i === $this->_tokens[$i]['scope_closer']
+                ) {
+                    $i = $this->_tokens[$i]['scope_opener'];
+                } else if (isset($this->_tokens[$i]['bracket_opener']) === true
+                    && $i === $this->_tokens[$i]['bracket_closer']
+                ) {
+                    $i = $this->_tokens[$i]['bracket_opener'];
+                } else if (isset($this->_tokens[$i]['parenthesis_opener']) === true
+                    && $i === $this->_tokens[$i]['parenthesis_closer']
+                ) {
+                    $i = $this->_tokens[$i]['parenthesis_opener'];
+                } else if ($this->_tokens[$i]['code'] === T_SEMICOLON) {
+                    break;
+                }
+            }
+        }//end for
+
+        return false;
+
+    }//end findPrevious()
+
+
+    /**
+     * Returns the position of the next specified token(s).
+     *
+     * If a value is specified, the next token of the specified type(s)
+     * containing the specified value will be returned.
+     *
+     * Returns false if no token can be found.
+     *
+     * @param int|array $types   The type(s) of tokens to search for.
+     * @param int       $start   The position to start searching from in the
+     *                           token stack.
+     * @param int       $end     The end position to fail if no token is found.
+     *                           if not specified or null, end will default to
+     *                           the end of the token stack.
+     * @param bool      $exclude If true, find the next token that is NOT of
+     *                           a type specified in $types.
+     * @param string    $value   The value that the token(s) must be equal to.
+     *                           If value is omitted, tokens with any value will
+     *                           be returned.
+     * @param bool      $local   If true, tokens outside the current statement
+     *                           will not be checked. i.e., checking will stop
+     *                           at the next semi-colon found.
+     *
+     * @return int|bool
+     * @see    findPrevious()
+     */
+    public function findNext(
+        $types,
+        $start,
+        $end=null,
+        $exclude=false,
+        $value=null,
+        $local=false
+    ) {
+        $types = (array) $types;
+
+        if ($end === null || $end > $this->numTokens) {
+            $end = $this->numTokens;
+        }
+
+        for ($i = $start; $i < $end; $i++) {
+            $found = (bool) $exclude;
+            foreach ($types as $type) {
+                if ($this->_tokens[$i]['code'] === $type) {
+                    $found = !$exclude;
+                    break;
+                }
+            }
+
+            if ($found === true) {
+                if ($value === null) {
+                    return $i;
+                } else if ($this->_tokens[$i]['content'] === $value) {
+                    return $i;
+                }
+            }
+
+            if ($local === true && $this->_tokens[$i]['code'] === T_SEMICOLON) {
+                break;
+            }
+        }//end for
+
+        return false;
+
+    }//end findNext()
+
+
+    /**
+     * Returns the position of the first non-whitespace token in a statement.
+     *
+     * @param int $start The position to start searching from in the token stack.
+     *
+     * @return int
+     */
+    public function findStartOfStatement($start)
+    {
+        $endTokens = PHP_CodeSniffer_Tokens::$blockOpeners;
+
+        $endTokens[T_COLON]            = true;
+        $endTokens[T_COMMA]            = true;
+        $endTokens[T_DOUBLE_ARROW]     = true;
+        $endTokens[T_SEMICOLON]        = true;
+        $endTokens[T_OPEN_TAG]         = true;
+        $endTokens[T_CLOSE_TAG]        = true;
+        $endTokens[T_OPEN_SHORT_ARRAY] = true;
+
+        $lastNotEmpty = $start;
+
+        for ($i = $start; $i >= 0; $i--) {
+            if (isset($endTokens[$this->_tokens[$i]['code']]) === true) {
+                // Found the end of the previous statement.
+                return $lastNotEmpty;
+            }
+
+            if (isset($this->_tokens[$i]['scope_opener']) === true
+                && $i === $this->_tokens[$i]['scope_closer']
+            ) {
+                // Found the end of the previous scope block.
+                return $lastNotEmpty;
+            }
+
+            // Skip nested statements.
+            if (isset($this->_tokens[$i]['bracket_opener']) === true
+                && $i === $this->_tokens[$i]['bracket_closer']
+            ) {
+                $i = $this->_tokens[$i]['bracket_opener'];
+            } else if (isset($this->_tokens[$i]['parenthesis_opener']) === true
+                && $i === $this->_tokens[$i]['parenthesis_closer']
+            ) {
+                $i = $this->_tokens[$i]['parenthesis_opener'];
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$this->_tokens[$i]['code']]) === false) {
+                $lastNotEmpty = $i;
+            }
+        }//end for
+
+        return 0;
+
+    }//end findStartOfStatement()
+
+
+    /**
+     * Returns the position of the last non-whitespace token in a statement.
+     *
+     * @param int $start The position to start searching from in the token stack.
+     *
+     * @return int
+     */
+    public function findEndOfStatement($start)
+    {
+        $endTokens = array(
+                      T_COLON                => true,
+                      T_COMMA                => true,
+                      T_DOUBLE_ARROW         => true,
+                      T_SEMICOLON            => true,
+                      T_CLOSE_PARENTHESIS    => true,
+                      T_CLOSE_SQUARE_BRACKET => true,
+                      T_CLOSE_CURLY_BRACKET  => true,
+                      T_CLOSE_SHORT_ARRAY    => true,
+                      T_OPEN_TAG             => true,
+                      T_CLOSE_TAG            => true,
+                     );
+
+        $lastNotEmpty = $start;
+
+        for ($i = $start; $i < $this->numTokens; $i++) {
+            if ($i !== $start && isset($endTokens[$this->_tokens[$i]['code']]) === true) {
+                // Found the end of the statement.
+                if ($this->_tokens[$i]['code'] === T_CLOSE_PARENTHESIS
+                    || $this->_tokens[$i]['code'] === T_CLOSE_SQUARE_BRACKET
+                    || $this->_tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET
+                    || $this->_tokens[$i]['code'] === T_OPEN_TAG
+                    || $this->_tokens[$i]['code'] === T_CLOSE_TAG
+                ) {
+                    return $lastNotEmpty;
+                }
+
+                return $i;
+            }
+
+            // Skip nested statements.
+            if (isset($this->_tokens[$i]['scope_closer']) === true
+                && ($i === $this->_tokens[$i]['scope_opener']
+                || $i === $this->_tokens[$i]['scope_condition'])
+            ) {
+                $i = $this->_tokens[$i]['scope_closer'];
+            } else if (isset($this->_tokens[$i]['bracket_closer']) === true
+                && $i === $this->_tokens[$i]['bracket_opener']
+            ) {
+                $i = $this->_tokens[$i]['bracket_closer'];
+            } else if (isset($this->_tokens[$i]['parenthesis_closer']) === true
+                && $i === $this->_tokens[$i]['parenthesis_opener']
+            ) {
+                $i = $this->_tokens[$i]['parenthesis_closer'];
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$this->_tokens[$i]['code']]) === false) {
+                $lastNotEmpty = $i;
+            }
+        }//end for
+
+        return ($this->numTokens - 1);
+
+    }//end findEndOfStatement()
+
+
+    /**
+     * Returns the position of the first token on a line, matching given type.
+     *
+     * Returns false if no token can be found.
+     *
+     * @param int|array $types   The type(s) of tokens to search for.
+     * @param int       $start   The position to start searching from in the
+     *                           token stack. The first token matching on
+     *                           this line before this token will be returned.
+     * @param bool      $exclude If true, find the token that is NOT of
+     *                           the types specified in $types.
+     * @param string    $value   The value that the token must be equal to.
+     *                           If value is omitted, tokens with any value will
+     *                           be returned.
+     *
+     * @return int | bool
+     */
+    public function findFirstOnLine($types, $start, $exclude=false, $value=null)
+    {
+        if (is_array($types) === false) {
+            $types = array($types);
+        }
+
+        $foundToken = false;
+
+        for ($i = $start; $i >= 0; $i--) {
+            if ($this->_tokens[$i]['line'] < $this->_tokens[$start]['line']) {
+                break;
+            }
+
+            $found = $exclude;
+            foreach ($types as $type) {
+                if ($exclude === false) {
+                    if ($this->_tokens[$i]['code'] === $type) {
+                        $found = true;
+                        break;
+                    }
+                } else {
+                    if ($this->_tokens[$i]['code'] === $type) {
+                        $found = false;
+                        break;
+                    }
+                }
+            }
+
+            if ($found === true) {
+                if ($value === null) {
+                    $foundToken = $i;
+                } else if ($this->_tokens[$i]['content'] === $value) {
+                    $foundToken = $i;
+                }
+            }
+        }//end for
+
+        return $foundToken;
+
+    }//end findFirstOnLine()
+
+
+    /**
+     * Determine if the passed token has a condition of one of the passed types.
+     *
+     * @param int       $stackPtr The position of the token we are checking.
+     * @param int|array $types    The type(s) of tokens to search for.
+     *
+     * @return boolean
+     */
+    public function hasCondition($stackPtr, $types)
+    {
+        // Check for the existence of the token.
+        if (isset($this->_tokens[$stackPtr]) === false) {
+            return false;
+        }
+
+        // Make sure the token has conditions.
+        if (isset($this->_tokens[$stackPtr]['conditions']) === false) {
+            return false;
+        }
+
+        $types      = (array) $types;
+        $conditions = $this->_tokens[$stackPtr]['conditions'];
+
+        foreach ($types as $type) {
+            if (in_array($type, $conditions) === true) {
+                // We found a token with the required type.
+                return true;
+            }
+        }
+
+        return false;
+
+    }//end hasCondition()
+
+
+    /**
+     * Return the position of the condition for the passed token.
+     *
+     * Returns FALSE if the token does not have the condition.
+     *
+     * @param int $stackPtr The position of the token we are checking.
+     * @param int $type     The type of token to search for.
+     *
+     * @return int
+     */
+    public function getCondition($stackPtr, $type)
+    {
+        // Check for the existence of the token.
+        if (isset($this->_tokens[$stackPtr]) === false) {
+            return false;
+        }
+
+        // Make sure the token has conditions.
+        if (isset($this->_tokens[$stackPtr]['conditions']) === false) {
+            return false;
+        }
+
+        $conditions = $this->_tokens[$stackPtr]['conditions'];
+        foreach ($conditions as $token => $condition) {
+            if ($condition === $type) {
+                return $token;
+            }
+        }
+
+        return false;
+
+    }//end getCondition()
+
+
+    /**
+     * Returns the name of the class that the specified class extends.
+     *
+     * Returns FALSE on error or if there is no extended class name.
+     *
+     * @param int $stackPtr The stack position of the class.
+     *
+     * @return string
+     */
+    public function findExtendedClassName($stackPtr)
+    {
+        // Check for the existence of the token.
+        if (isset($this->_tokens[$stackPtr]) === false) {
+            return false;
+        }
+
+        if ($this->_tokens[$stackPtr]['code'] !== T_CLASS) {
+            return false;
+        }
+
+        if (isset($this->_tokens[$stackPtr]['scope_closer']) === false) {
+            return false;
+        }
+
+        $classCloserIndex = $this->_tokens[$stackPtr]['scope_closer'];
+        $extendsIndex     = $this->findNext(T_EXTENDS, $stackPtr, $classCloserIndex);
+        if (false === $extendsIndex) {
+            return false;
+        }
+
+        $find = array(
+                 T_NS_SEPARATOR,
+                 T_STRING,
+                 T_WHITESPACE,
+                );
+
+        $end  = $this->findNext($find, ($extendsIndex + 1), $classCloserIndex, true);
+        $name = $this->getTokensAsString(($extendsIndex + 1), ($end - $extendsIndex - 1));
+        $name = trim($name);
+
+        if ($name === '') {
+            return false;
+        }
+
+        return $name;
+
+    }//end findExtendedClassName()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Fixer.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Fixer.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Fixer.php	(revision 5534)
@@ -0,0 +1,699 @@
+<?php
+/**
+ * A helper class for fixing errors.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * A helper class for fixing errors.
+ *
+ * Provides helper functions that act upon a token array and modify the file
+ * content.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Fixer
+{
+
+    /**
+     * Is the fixer enabled and fixing a file?
+     *
+     * Sniffs should check this value to ensure they are not
+     * doing extra processing to prepare for a fix when fixing is
+     * not required.
+     *
+     * @var boolean
+     */
+    public $enabled = false;
+
+    /**
+     * The number of times we have looped over a file.
+     *
+     * @var int
+     */
+    public $loops = 0;
+
+    /**
+     * The file being fixed.
+     *
+     * @var PHP_CodeSniffer_File
+     */
+    private $_currentFile = null;
+
+    /**
+     * The list of tokens that make up the file contents.
+     *
+     * This is a simplified list which just contains the token content and nothing
+     * else. This is the array that is updated as fixes are made, not the file's
+     * token array. Imploding this array will give you the file content back.
+     *
+     * @var array(int => string)
+     */
+    private $_tokens = array();
+
+    /**
+     * A list of tokens that have already been fixed.
+     *
+     * We don't allow the same token to be fixed more than once each time
+     * through a file as this can easily cause conflicts between sniffs.
+     *
+     * @var array(int)
+     */
+    private $_fixedTokens = array();
+
+    /**
+     * The last value of each fixed token.
+     *
+     * If a token is being "fixed" back to its last value, the fix is
+     * probably conflicting with another.
+     *
+     * @var array(int => string)
+     */
+    private $_oldTokenValues = array();
+
+    /**
+     * A list of tokens that have been fixed during a changeset.
+     *
+     * All changes in changeset must be able to be applied, or else
+     * the entire changeset is rejected.
+     *
+     * @var array()
+     */
+    private $_changeset = array();
+
+    /**
+     * Is there an open changeset.
+     *
+     * @var boolean
+     */
+    private $_inChangeset = false;
+
+    /**
+     * Is the current fixing loop in conflict?
+     *
+     * @var boolean
+     */
+    private $_inConflict = false;
+
+    /**
+     * The number of fixes that have been performed.
+     *
+     * @var int
+     */
+    private $_numFixes = 0;
+
+
+    /**
+     * Starts fixing a new file.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being fixed.
+     *
+     * @return void
+     */
+    public function startFile($phpcsFile)
+    {
+        $this->_currentFile = $phpcsFile;
+        $this->_numFixes    = 0;
+        $this->_fixedTokens = array();
+
+        $tokens        = $phpcsFile->getTokens();
+        $this->_tokens = array();
+        foreach ($tokens as $index => $token) {
+            if (isset($token['orig_content']) === true) {
+                $this->_tokens[$index] = $token['orig_content'];
+            } else {
+                $this->_tokens[$index] = $token['content'];
+            }
+        }
+
+    }//end startFile()
+
+
+    /**
+     * Attempt to fix the file by processing it until no fixes are made.
+     *
+     * @return boolean
+     */
+    public function fixFile()
+    {
+        $fixable = $this->_currentFile->getFixableCount();
+        if ($fixable === 0) {
+            // Nothing to fix.
+            return false;
+        }
+
+        $stdin     = false;
+        $cliValues = $this->_currentFile->phpcs->cli->getCommandLineValues();
+        if (empty($cliValues['files']) === true) {
+            $stdin = true;
+        }
+
+        $this->enabled = true;
+
+        $this->loops = 0;
+        while ($this->loops < 50) {
+            ob_start();
+
+            // Only needed once file content has changed.
+            $contents = $this->getContents();
+
+            if (PHP_CODESNIFFER_VERBOSITY > 2) {
+                @ob_end_clean();
+                echo '---START FILE CONTENT---'.PHP_EOL;
+                $lines = explode($this->_currentFile->eolChar, $contents);
+                $max   = strlen(count($lines));
+                foreach ($lines as $lineNum => $line) {
+                    $lineNum++;
+                    echo str_pad($lineNum, $max, ' ', STR_PAD_LEFT).'|'.$line.PHP_EOL;
+                }
+
+                echo '--- END FILE CONTENT ---'.PHP_EOL;
+                ob_start();
+            }
+
+            $this->_inConflict = false;
+            $this->_currentFile->refreshTokenListeners();
+            $this->_currentFile->start($contents);
+            ob_end_clean();
+
+            $this->loops++;
+
+            if (PHP_CODESNIFFER_CBF === true && $stdin === false) {
+                echo "\r".str_repeat(' ', 80)."\r";
+                echo "\t=> Fixing file: $this->_numFixes/$fixable violations remaining [made $this->loops pass";
+                if ($this->loops > 1) {
+                    echo 'es';
+                }
+
+                echo ']... ';
+            }
+
+            if ($this->_numFixes === 0 && $this->_inConflict === false) {
+                // Nothing left to do.
+                break;
+            } else if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo "\t* fixed $this->_numFixes violations, starting loop ".($this->loops + 1).' *'.PHP_EOL;
+            }
+        }//end while
+
+        $this->enabled = false;
+
+        if ($this->_numFixes > 0) {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                @ob_end_clean();
+                echo "\t*** Reached maximum number of loops with $this->_numFixes violations left unfixed ***".PHP_EOL;
+                ob_start();
+            }
+
+            return false;
+        }
+
+        return true;
+
+    }//end fixFile()
+
+
+    /**
+     * Generates a text diff of the original file and the new content.
+     *
+     * @param string  $filePath Optional file path to diff the file against.
+     *                          If not specified, the original version of the
+     *                          file will be used.
+     * @param boolean $colors   Print colored output or not.
+     *
+     * @return string
+     */
+    public function generateDiff($filePath=null, $colors=true)
+    {
+        if ($filePath === null) {
+            $filePath = $this->_currentFile->getFilename();
+        }
+
+        $cwd      = getcwd().DIRECTORY_SEPARATOR;
+        $filename = str_replace($cwd, '', $filePath);
+        $contents = $this->getContents();
+
+        if (function_exists('sys_get_temp_dir') === true) {
+            // This is needed for HHVM support, but only available from 5.2.1.
+            $tempName  = tempnam(sys_get_temp_dir(), 'phpcs-fixer');
+            $fixedFile = fopen($tempName, 'w');
+        } else {
+            $fixedFile = tmpfile();
+            $data      = stream_get_meta_data($fixedFile);
+            $tempName  = $data['uri'];
+        }
+
+        fwrite($fixedFile, $contents);
+
+        // We must use something like shell_exec() because whitespace at the end
+        // of lines is critical to diff files.
+        $cmd  = "diff -u -L\"$filename\" -LPHP_CodeSniffer \"$filename\" \"$tempName\"";
+        $diff = shell_exec($cmd);
+
+        fclose($fixedFile);
+        if (is_file($tempName) === true) {
+            unlink($tempName);
+        }
+
+        if ($colors === false) {
+            return $diff;
+        }
+
+        $diffLines = explode(PHP_EOL, $diff);
+        if (count($diffLines) === 1) {
+            // Seems to be required for cygwin.
+            $diffLines = explode("\n", $diff);
+        }
+
+        $diff = array();
+        foreach ($diffLines as $line) {
+            if (isset($line[0]) === true) {
+                switch ($line[0]) {
+                case '-':
+                    $diff[] = "\033[31m$line\033[0m";
+                    break;
+                case '+':
+                    $diff[] = "\033[32m$line\033[0m";
+                    break;
+                default:
+                    $diff[] = $line;
+                }
+            }
+        }
+
+        $diff = implode(PHP_EOL, $diff);
+
+        return $diff;
+
+    }//end generateDiff()
+
+
+    /**
+     * Get a count of fixes that have been performed on the file.
+     *
+     * This value is reset every time a new file is started, or an existing
+     * file is restarted.
+     *
+     * @return int
+     */
+    public function getFixCount()
+    {
+        return $this->_numFixes;
+
+    }//end getFixCount()
+
+
+    /**
+     * Get the current content of the file, as a string.
+     *
+     * @return string
+     */
+    public function getContents()
+    {
+        $contents = implode($this->_tokens);
+        return $contents;
+
+    }//end getContents()
+
+
+    /**
+     * Get the current fixed content of a token.
+     *
+     * This function takes changesets into account so should be used
+     * instead of directly accessing the token array.
+     *
+     * @param int $stackPtr The position of the token in the token stack.
+     *
+     * @return string
+     */
+    public function getTokenContent($stackPtr)
+    {
+        if ($this->_inChangeset === true
+            && isset($this->_changeset[$stackPtr]) === true
+        ) {
+            return $this->_changeset[$stackPtr];
+        } else {
+            return $this->_tokens[$stackPtr];
+        }
+
+    }//end getTokenContent()
+
+
+    /**
+     * Start recording actions for a changeset.
+     *
+     * @return void
+     */
+    public function beginChangeset()
+    {
+        if ($this->_inConflict === true) {
+            return false;
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $bt    = debug_backtrace();
+            $sniff = $bt[1]['class'];
+            $line  = $bt[0]['line'];
+
+            @ob_end_clean();
+            echo "\t=> Changeset started by $sniff (line $line)".PHP_EOL;
+            ob_start();
+        }
+
+        $this->_changeset   = array();
+        $this->_inChangeset = true;
+
+    }//end beginChangeset()
+
+
+    /**
+     * Stop recording actions for a changeset, and apply logged changes.
+     *
+     * @return boolean
+     */
+    public function endChangeset()
+    {
+        if ($this->_inConflict === true) {
+            return false;
+        }
+
+        $this->_inChangeset = false;
+
+        $success = true;
+        $applied = array();
+        foreach ($this->_changeset as $stackPtr => $content) {
+            $success = $this->replaceToken($stackPtr, $content);
+            if ($success === false) {
+                break;
+            } else {
+                $applied[] = $stackPtr;
+            }
+        }
+
+        if ($success === false) {
+            // Rolling back all changes.
+            foreach ($applied as $stackPtr) {
+                $this->revertToken($stackPtr);
+            }
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                @ob_end_clean();
+                echo "\t=> Changeset failed to apply".PHP_EOL;
+                ob_start();
+            }
+        } else if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $fixes = count($this->_changeset);
+            @ob_end_clean();
+            echo "\t=> Changeset ended: $fixes changes applied".PHP_EOL;
+            ob_start();
+        }
+
+        $this->_changeset = array();
+
+    }//end endChangeset()
+
+
+    /**
+     * Replace the entire contents of a token.
+     *
+     * @param int    $stackPtr The position of the token in the token stack.
+     * @param string $content  The new content of the token.
+     *
+     * @return bool If the change was accepted.
+     */
+    public function replaceToken($stackPtr, $content)
+    {
+        if ($this->_inConflict === true) {
+            return false;
+        }
+
+        if ($this->_inChangeset === false
+            && isset($this->_fixedTokens[$stackPtr]) === true
+        ) {
+            $indent = "\t";
+            if (empty($this->_changeset) === false) {
+                $indent .= "\t";
+            }
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                @ob_end_clean();
+                echo "$indent* token $stackPtr has already been modified, skipping *".PHP_EOL;
+                ob_start();
+            }
+
+            return false;
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $bt = debug_backtrace();
+            if ($bt[1]['class'] === 'PHP_CodeSniffer_Fixer') {
+                $sniff = $bt[2]['class'];
+                $line  = $bt[1]['line'];
+            } else {
+                $sniff = $bt[1]['class'];
+                $line  = $bt[0]['line'];
+            }
+
+            $tokens     = $this->_currentFile->getTokens();
+            $type       = $tokens[$stackPtr]['type'];
+            $oldContent = PHP_CodeSniffer::prepareForOutput($this->_tokens[$stackPtr]);
+            $newContent = PHP_CodeSniffer::prepareForOutput($content);
+            if (trim($this->_tokens[$stackPtr]) === '' && isset($this->_tokens[($stackPtr + 1)]) === true) {
+                // Add some context for whitespace only changes.
+                $append      = PHP_CodeSniffer::prepareForOutput($this->_tokens[($stackPtr + 1)]);
+                $oldContent .= $append;
+                $newContent .= $append;
+            }
+        }//end if
+
+        if ($this->_inChangeset === true) {
+            $this->_changeset[$stackPtr] = $content;
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                @ob_end_clean();
+                echo "\t\tQ: $sniff (line $line) replaced token $stackPtr ($type) \"$oldContent\" => \"$newContent\"".PHP_EOL;
+                ob_start();
+            }
+
+            return true;
+        }
+
+        if (isset($this->_oldTokenValues[$stackPtr]) === false) {
+            $this->_oldTokenValues[$stackPtr] = array(
+                                                 'curr' => $content,
+                                                 'prev' => $this->_tokens[$stackPtr],
+                                                 'loop' => $this->loops,
+                                                );
+        } else {
+            if ($this->_oldTokenValues[$stackPtr]['prev'] === $content
+                && $this->_oldTokenValues[$stackPtr]['loop'] === ($this->loops - 1)
+            ) {
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $indent = "\t";
+                    if (empty($this->_changeset) === false) {
+                        $indent .= "\t";
+                    }
+
+                    $loop = $this->_oldTokenValues[$stackPtr]['loop'];
+
+                    @ob_end_clean();
+                    echo "$indent**** $sniff (line $line) has possible conflict with another sniff on loop $loop; caused by the following change ****".PHP_EOL;
+                    echo "$indent**** replaced token $stackPtr ($type) \"$oldContent\" => \"$newContent\" ****".PHP_EOL;
+                }
+
+                if ($this->_oldTokenValues[$stackPtr]['loop'] >= ($this->loops - 1)) {
+                    $this->_inConflict = true;
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "$indent**** ignoring all changes until next loop ****".PHP_EOL;
+                    }
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    ob_start();
+                }
+
+                return false;
+            }//end if
+
+            $this->_oldTokenValues[$stackPtr]['prev'] = $this->_oldTokenValues[$stackPtr]['curr'];
+            $this->_oldTokenValues[$stackPtr]['curr'] = $content;
+            $this->_oldTokenValues[$stackPtr]['loop'] = $this->loops;
+        }//end if
+
+        $this->_fixedTokens[$stackPtr] = $this->_tokens[$stackPtr];
+        $this->_tokens[$stackPtr]      = $content;
+        $this->_numFixes++;
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $indent = "\t";
+            if (empty($this->_changeset) === false) {
+                $indent .= "\tA: ";
+            }
+
+            @ob_end_clean();
+            echo "$indent$sniff (line $line) replaced token $stackPtr ($type) \"$oldContent\" => \"$newContent\"".PHP_EOL;
+            ob_start();
+        }
+
+        return true;
+
+    }//end replaceToken()
+
+
+    /**
+     * Reverts the previous fix made to a token.
+     *
+     * @param int $stackPtr The position of the token in the token stack.
+     *
+     * @return bool If a change was reverted.
+     */
+    public function revertToken($stackPtr)
+    {
+        if (isset($this->_fixedTokens[$stackPtr]) === false) {
+            return false;
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $bt = debug_backtrace();
+            if ($bt[1]['class'] === 'PHP_CodeSniffer_Fixer') {
+                $sniff = $bt[2]['class'];
+                $line  = $bt[1]['line'];
+            } else {
+                $sniff = $bt[1]['class'];
+                $line  = $bt[0]['line'];
+            }
+
+            $tokens     = $this->_currentFile->getTokens();
+            $type       = $tokens[$stackPtr]['type'];
+            $oldContent = PHP_CodeSniffer::prepareForOutput($this->_tokens[$stackPtr]);
+            $newContent = PHP_CodeSniffer::prepareForOutput($this->_fixedTokens[$stackPtr]);
+            if (trim($this->_tokens[$stackPtr]) === '' && isset($tokens[($stackPtr + 1)]) === true) {
+                // Add some context for whitespace only changes.
+                $append      = PHP_CodeSniffer::prepareForOutput($this->_tokens[($stackPtr + 1)]);
+                $oldContent .= $append;
+                $newContent .= $append;
+            }
+        }//end if
+
+        $this->_tokens[$stackPtr] = $this->_fixedTokens[$stackPtr];
+        unset($this->_fixedTokens[$stackPtr]);
+        $this->_numFixes--;
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $indent = "\t";
+            if (empty($this->_changeset) === false) {
+                $indent .= "\tR: ";
+            }
+
+            @ob_end_clean();
+            echo "$indent$sniff (line $line) reverted token $stackPtr ($type) \"$oldContent\" => \"$newContent\"".PHP_EOL;
+            ob_start();
+        }
+
+        return true;
+
+    }//end revertToken()
+
+
+    /**
+     * Replace the content of a token with a part of its current content.
+     *
+     * @param int $stackPtr The position of the token in the token stack.
+     * @param int $start    The first character to keep.
+     * @param int $length   The number of chacters to keep. If NULL, the content of
+     *                      the token from $start to the end of the content is kept.
+     *
+     * @return bool If the change was accepted.
+     */
+    public function substrToken($stackPtr, $start, $length=null)
+    {
+        $current = $this->getTokenContent($stackPtr);
+
+        if ($length === null) {
+            $newContent = substr($current, $start);
+        } else {
+            $newContent = substr($current, $start, $length);
+        }
+
+        return $this->replaceToken($stackPtr, $newContent);
+
+    }//end substrToken()
+
+
+    /**
+     * Adds a newline to end of a token's content.
+     *
+     * @param int $stackPtr The position of the token in the token stack.
+     *
+     * @return bool If the change was accepted.
+     */
+    public function addNewline($stackPtr)
+    {
+        $current = $this->getTokenContent($stackPtr);
+        return $this->replaceToken($stackPtr, $current.$this->_currentFile->eolChar);
+
+    }//end addNewline()
+
+
+    /**
+     * Adds a newline to the start of a token's content.
+     *
+     * @param int $stackPtr The position of the token in the token stack.
+     *
+     * @return bool If the change was accepted.
+     */
+    public function addNewlineBefore($stackPtr)
+    {
+        $current = $this->getTokenContent($stackPtr);
+        return $this->replaceToken($stackPtr, $this->_currentFile->eolChar.$current);
+
+    }//end addNewlineBefore()
+
+
+    /**
+     * Adds content to the end of a token's current content.
+     *
+     * @param int    $stackPtr The position of the token in the token stack.
+     * @param string $content  The content to add.
+     *
+     * @return bool If the change was accepted.
+     */
+    public function addContent($stackPtr, $content)
+    {
+        $current = $this->getTokenContent($stackPtr);
+        return $this->replaceToken($stackPtr, $current.$content);
+
+    }//end addContent()
+
+
+    /**
+     * Adds content to the start of a token's current content.
+     *
+     * @param int    $stackPtr The position of the token in the token stack.
+     * @param string $content  The content to add.
+     *
+     * @return bool If the change was accepted.
+     */
+    public function addContentBefore($stackPtr, $content)
+    {
+        $current = $this->getTokenContent($stackPtr);
+        return $this->replaceToken($stackPtr, $content.$current);
+
+    }//end addContentBefore()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Report.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Report.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Report.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Represents a PHP_CodeSniffer report.
+ *
+ * PHP version 5.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Represents a PHP_CodeSniffer report.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+interface PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    );
+
+
+    /**
+     * Generate the actual report.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    );
+
+
+}//end interface
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reporting.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reporting.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reporting.php	(revision 5534)
@@ -0,0 +1,425 @@
+<?php
+/**
+ * A class to manage reporting.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * A class to manage reporting.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reporting
+{
+
+    /**
+     * Total number of files that contain errors or warnings.
+     *
+     * @var int
+     */
+    public $totalFiles = 0;
+
+    /**
+     * Total number of errors found during the run.
+     *
+     * @var int
+     */
+    public $totalErrors = 0;
+
+    /**
+     * Total number of warnings found during the run.
+     *
+     * @var int
+     */
+    public $totalWarnings = 0;
+
+    /**
+     * Total number of errors/warnings that can be fixed.
+     *
+     * @var int
+     */
+    public $totalFixable = 0;
+
+    /**
+     * When the PHPCS run started.
+     *
+     * @var float
+     */
+    public static $startTime = 0;
+
+    /**
+     * A list of reports that have written partial report output.
+     *
+     * @var array
+     */
+    private $_cachedReports = array();
+
+    /**
+     * A cache of report objects.
+     *
+     * @var array
+     */
+    private $_reports = array();
+
+    /**
+     * A cache of opened tmp files.
+     *
+     * @var array
+     */
+    private $_tmpFiles = array();
+
+
+    /**
+     * Produce the appropriate report object based on $type parameter.
+     *
+     * @param string $type The type of the report.
+     *
+     * @return PHP_CodeSniffer_Report
+     * @throws PHP_CodeSniffer_Exception If report is not available.
+     */
+    public function factory($type)
+    {
+        $type = ucfirst($type);
+        if (isset($this->_reports[$type]) === true) {
+            return $this->_reports[$type];
+        }
+
+        if (strpos($type, '.') !== false) {
+            // This is a path to a custom report class.
+            $filename = realpath($type);
+            if ($filename === false) {
+                echo 'ERROR: Custom report "'.$type.'" not found'.PHP_EOL;
+                exit(2);
+            }
+
+            $reportClassName = 'PHP_CodeSniffer_Reports_'.basename($filename);
+            $reportClassName = substr($reportClassName, 0, strpos($reportClassName, '.'));
+            include_once $filename;
+        } else {
+            $filename        = $type.'.php';
+            $reportClassName = 'PHP_CodeSniffer_Reports_'.$type;
+            if (class_exists($reportClassName, true) === false) {
+                echo 'ERROR: Report type "'.$type.'" not found'.PHP_EOL;
+                exit(2);
+            }
+        }//end if
+
+        $reportClass = new $reportClassName();
+        if (false === ($reportClass instanceof PHP_CodeSniffer_Report)) {
+            throw new PHP_CodeSniffer_Exception('Class "'.$reportClassName.'" must implement the "PHP_CodeSniffer_Report" interface.');
+        }
+
+        $this->_reports[$type] = $reportClass;
+        return $this->_reports[$type];
+
+    }//end factory()
+
+
+    /**
+     * Actually generates the report.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file that has been processed.
+     * @param array                $cliValues An array of command line arguments.
+     *
+     * @return void
+     */
+    public function cacheFileReport(PHP_CodeSniffer_File $phpcsFile, array $cliValues)
+    {
+        if (isset($cliValues['reports']) === false) {
+            // This happens during unit testing, or any time someone just wants
+            // the error data and not the printed report.
+            return;
+        }
+
+        $reportData  = $this->prepareFileReport($phpcsFile);
+        $errorsShown = false;
+
+        foreach ($cliValues['reports'] as $report => $output) {
+            $reportClass = $this->factory($report);
+            $report      = get_class($reportClass);
+
+            ob_start();
+            $result = $reportClass->generateFileReport($reportData, $phpcsFile, $cliValues['showSources'], $cliValues['reportWidth']);
+            if ($result === true) {
+                $errorsShown = true;
+            }
+
+            $generatedReport = ob_get_contents();
+            ob_end_clean();
+
+            if ($output === null && $cliValues['reportFile'] !== null) {
+                $output = $cliValues['reportFile'];
+            }
+
+            if ($output === null) {
+                // Using a temp file.
+                if (isset($this->_tmpFiles[$report]) === false) {
+                    if (function_exists('sys_get_temp_dir') === true) {
+                        // This is needed for HHVM support, but only available from 5.2.1.
+                        $this->_tmpFiles[$report] = fopen(tempnam(sys_get_temp_dir(), 'phpcs'), 'w');
+                    } else {
+                        $this->_tmpFiles[$report] = tmpfile();
+                    }
+                }
+
+                fwrite($this->_tmpFiles[$report], $generatedReport);
+            } else {
+                $flags = FILE_APPEND;
+                if (isset($this->_cachedReports[$report]) === false) {
+                    $this->_cachedReports[$report] = true;
+                    $flags = null;
+                }
+
+                file_put_contents($output, $generatedReport, $flags);
+            }//end if
+        }//end foreach
+
+        if ($errorsShown === true) {
+            $this->totalFiles++;
+            $this->totalErrors   += $reportData['errors'];
+            $this->totalWarnings += $reportData['warnings'];
+            $this->totalFixable  += $reportData['fixable'];
+        }
+
+    }//end cacheFileReport()
+
+
+    /**
+     * Generates and prints a final report.
+     *
+     * Returns an array with the number of errors and the number of
+     * warnings, in the form ['errors' => int, 'warnings' => int].
+     *
+     * @param string  $report      Report type.
+     * @param boolean $showSources Show sources?
+     * @param array   $cliValues   An array of command line arguments.
+     * @param string  $reportFile  Report file to generate.
+     * @param integer $reportWidth Report max width.
+     *
+     * @return int[]
+     */
+    public function printReport(
+        $report,
+        $showSources,
+        array $cliValues,
+        $reportFile='',
+        $reportWidth=80
+    ) {
+        $reportClass = $this->factory($report);
+        $report      = get_class($reportClass);
+
+        if ($reportFile !== null) {
+            $filename = $reportFile;
+            $toScreen = false;
+
+            if (file_exists($filename) === true
+                && isset($this->_cachedReports[$report]) === true
+            ) {
+                $reportCache = file_get_contents($filename);
+            } else {
+                $reportCache = '';
+            }
+        } else {
+            if (isset($this->_tmpFiles[$report]) === true) {
+                $data        = stream_get_meta_data($this->_tmpFiles[$report]);
+                $filename    = $data['uri'];
+                $reportCache = file_get_contents($filename);
+                fclose($this->_tmpFiles[$report]);
+            } else {
+                $reportCache = '';
+                $filename    = null;
+            }
+
+            $toScreen = true;
+        }//end if
+
+        ob_start();
+        $reportClass->generate(
+            $reportCache,
+            $this->totalFiles,
+            $this->totalErrors,
+            $this->totalWarnings,
+            $this->totalFixable,
+            $showSources,
+            $reportWidth,
+            $toScreen
+        );
+        $generatedReport = ob_get_contents();
+        ob_end_clean();
+
+        if ($cliValues['colors'] !== true || $reportFile !== null) {
+            $generatedReport = preg_replace('`\033\[[0-9]+m`', '', $generatedReport);
+        }
+
+        if ($reportFile !== null) {
+            if (PHP_CODESNIFFER_VERBOSITY > 0) {
+                echo $generatedReport;
+            }
+
+            file_put_contents($reportFile, $generatedReport.PHP_EOL);
+        } else {
+            echo $generatedReport;
+            if ($filename !== null && file_exists($filename) === true) {
+                unlink($filename);
+            }
+        }
+
+        return array(
+                'errors'   => $this->totalErrors,
+                'warnings' => $this->totalWarnings,
+               );
+
+    }//end printReport()
+
+
+    /**
+     * Pre-process and package violations for all files.
+     *
+     * Used by error reports to get a packaged list of all errors in each file.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file that has been processed.
+     *
+     * @return array
+     */
+    public function prepareFileReport(PHP_CodeSniffer_File $phpcsFile)
+    {
+        $report = array(
+                   'filename' => $phpcsFile->getFilename(),
+                   'errors'   => $phpcsFile->getErrorCount(),
+                   'warnings' => $phpcsFile->getWarningCount(),
+                   'fixable'  => $phpcsFile->getFixableCount(),
+                   'messages' => array(),
+                  );
+
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Prefect score!
+            return $report;
+        }
+
+        $errors = array();
+
+        // Merge errors and warnings.
+        foreach ($phpcsFile->getErrors() as $line => $lineErrors) {
+            if (is_array($lineErrors) === false) {
+                continue;
+            }
+
+            foreach ($lineErrors as $column => $colErrors) {
+                $newErrors = array();
+                foreach ($colErrors as $data) {
+                    $newErrors[] = array(
+                                    'message'  => $data['message'],
+                                    'source'   => $data['source'],
+                                    'severity' => $data['severity'],
+                                    'fixable'  => $data['fixable'],
+                                    'type'     => 'ERROR',
+                                   );
+                }//end foreach
+
+                $errors[$line][$column] = $newErrors;
+            }//end foreach
+
+            ksort($errors[$line]);
+        }//end foreach
+
+        foreach ($phpcsFile->getWarnings() as $line => $lineWarnings) {
+            if (is_array($lineWarnings) === false) {
+                continue;
+            }
+
+            foreach ($lineWarnings as $column => $colWarnings) {
+                $newWarnings = array();
+                foreach ($colWarnings as $data) {
+                    $newWarnings[] = array(
+                                      'message'  => $data['message'],
+                                      'source'   => $data['source'],
+                                      'severity' => $data['severity'],
+                                      'fixable'  => $data['fixable'],
+                                      'type'     => 'WARNING',
+                                     );
+                }//end foreach
+
+                if (isset($errors[$line]) === false) {
+                    $errors[$line] = array();
+                }
+
+                if (isset($errors[$line][$column]) === true) {
+                    $errors[$line][$column] = array_merge(
+                        $newWarnings,
+                        $errors[$line][$column]
+                    );
+                } else {
+                    $errors[$line][$column] = $newWarnings;
+                }
+            }//end foreach
+
+            ksort($errors[$line]);
+        }//end foreach
+
+        ksort($errors);
+        $report['messages'] = $errors;
+        return $report;
+
+    }//end prepareFileReport()
+
+
+    /**
+     * Start recording time for the run.
+     *
+     * @return void
+     */
+    public static function startTiming()
+    {
+
+        self::$startTime = microtime(true);
+
+    }//end startTiming()
+
+
+    /**
+     * Print information about the run.
+     *
+     * @return void
+     */
+    public static function printRunTime()
+    {
+        $time = ((microtime(true) - self::$startTime) * 1000);
+
+        if ($time > 60000) {
+            $mins = floor($time / 60000);
+            $secs = round((($time % 60000) / 1000), 2);
+            $time = $mins.' mins';
+            if ($secs !== 0) {
+                $time .= ", $secs secs";
+            }
+        } else if ($time > 1000) {
+            $time = round(($time / 1000), 2).' secs';
+        } else {
+            $time = round($time).'ms';
+        }
+
+        $mem = round((memory_get_peak_usage(true) / (1024 * 1024)), 2).'Mb';
+        echo "Time: $time; Memory: $mem".PHP_EOL.PHP_EOL;
+
+    }//end printRunTime()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Cbf.php	(revision 5534)
@@ -0,0 +1,151 @@
+<?php
+/**
+ * CBF report for PHP_CodeSniffer.
+ *
+ * This report implements the various auto-fixing features of the
+ * PHPCBF script and is not intended (or allowed) to be selected as a
+ * report from the command line.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * CBF report for PHP_CodeSniffer.
+ *
+ * This report implements the various auto-fixing features of the
+ * PHPCBF script and is not intended (or allowed) to be selected as a
+ * report from the command line.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Cbf implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $cliValues = $phpcsFile->phpcs->cli->getCommandLineValues();
+        $errors    = $phpcsFile->getFixableCount();
+        if ($errors !== 0) {
+            if (empty($cliValues['files']) === false) {
+                ob_end_clean();
+                $errors    = $phpcsFile->getFixableCount();
+                $startTime = microtime(true);
+                echo "\t=> Fixing file: $errors/$errors violations remaining";
+            }
+
+            $fixed = $phpcsFile->fixer->fixFile();
+        }
+
+        if (empty($cliValues['files']) === true) {
+            // Replacing STDIN, so output current file to STDOUT
+            // even if nothing was fixed. Exit here because we
+            // can't process any more than 1 file in this setup.
+            echo $phpcsFile->fixer->getContents();
+            ob_end_flush();
+            exit(1);
+        }
+
+        if ($errors === 0) {
+            return false;
+        }
+
+        if ($fixed === false) {
+            echo 'ERROR';
+        } else {
+            echo 'DONE';
+        }
+
+        $timeTaken = ((microtime(true) - $startTime) * 1000);
+        if ($timeTaken < 1000) {
+            $timeTaken = round($timeTaken);
+            echo " in {$timeTaken}ms".PHP_EOL;
+        } else {
+            $timeTaken = round(($timeTaken / 1000), 2);
+            echo " in $timeTaken secs".PHP_EOL;
+        }
+
+        if ($fixed === true) {
+            $newFilename = $report['filename'].$cliValues['phpcbf-suffix'];
+            $newContent  = $phpcsFile->fixer->getContents();
+            file_put_contents($newFilename, $newContent);
+
+            if ($newFilename === $report['filename']) {
+                echo "\t=> File was overwritten".PHP_EOL;
+            } else {
+                echo "\t=> Fixed file written to ".basename($newFilename).PHP_EOL;
+            }
+        }
+
+        ob_start();
+
+        return $fixed;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints all errors and warnings for each file processed.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo $cachedData;
+        echo "Fixed $totalFiles files".PHP_EOL;
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Checkstyle.php	(revision 5534)
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Checkstyle report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checkstyle report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Checkstyle implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $out = new XMLWriter;
+        $out->openMemory();
+        $out->setIndent(true);
+
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Nothing to print.
+            return false;
+        }
+
+        $out->startElement('file');
+        $out->writeAttribute('name', $report['filename']);
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $error['type'] = strtolower($error['type']);
+                    if (PHP_CODESNIFFER_ENCODING !== 'utf-8') {
+                        $error['message'] = iconv(PHP_CODESNIFFER_ENCODING, 'utf-8', $error['message']);
+                    }
+
+                    $out->startElement('error');
+                    $out->writeAttribute('line', $line);
+                    $out->writeAttribute('column', $column);
+                    $out->writeAttribute('severity', $error['type']);
+                    $out->writeAttribute('message', $error['message']);
+                    $out->writeAttribute('source', $error['source']);
+                    $out->endElement();
+                }
+            }
+        }//end foreach
+
+        $out->endElement();
+        echo $out->flush();
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints all violations for processed files, in a Checkstyle format.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
+        echo '<checkstyle version="'.PHP_CodeSniffer::VERSION.'">'.PHP_EOL;
+        echo $cachedData;
+        echo '</checkstyle>'.PHP_EOL;
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Csv.php	(revision 5534)
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Csv report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Csv report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Csv implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Nothing to print.
+            return false;
+        }
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $filename = str_replace('"', '\"', $report['filename']);
+                    $message  = str_replace('"', '\"', $error['message']);
+                    $type     = strtolower($error['type']);
+                    $source   = $error['source'];
+                    $severity = $error['severity'];
+                    $fixable  = (int) $error['fixable'];
+                    echo "\"$filename\",$line,$column,$type,\"$message\",$source,$severity,$fixable".PHP_EOL;
+                }
+            }
+        }
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Generates a csv report.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo 'File,Line,Column,Type,Message,Source,Severity,Fixable'.PHP_EOL;
+        echo $cachedData;
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Diff.php	(revision 5534)
@@ -0,0 +1,149 @@
+<?php
+/**
+ * Diff report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Diff report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Diff implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $errors = $phpcsFile->getFixableCount();
+        if ($errors === 0) {
+            return false;
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            ob_end_clean();
+            echo "\t*** START FILE FIXING ***".PHP_EOL;
+        }
+
+        if (PHP_CODESNIFFER_CBF === true) {
+            ob_end_clean();
+            $startTime = microtime(true);
+            echo "\t=> Fixing file: $errors/$errors violations remaining";
+        }
+
+        $fixed = $phpcsFile->fixer->fixFile();
+
+        if (PHP_CODESNIFFER_CBF === true) {
+            if ($fixed === false) {
+                echo "\033[31mERROR\033[0m";
+            } else {
+                echo "\033[32mDONE\033[0m";
+            }
+
+            $timeTaken = ((microtime(true) - $startTime) * 1000);
+            if ($timeTaken < 1000) {
+                $timeTaken = round($timeTaken);
+                echo " in {$timeTaken}ms".PHP_EOL;
+            } else {
+                $timeTaken = round(($timeTaken / 1000), 2);
+                echo " in $timeTaken secs".PHP_EOL;
+            }
+
+            ob_start();
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END FILE FIXING ***".PHP_EOL;
+            ob_start();
+        }
+
+        if ($fixed === false) {
+            return false;
+        }
+
+        if (PHP_CODESNIFFER_CBF === true) {
+            // Diff without colours.
+            $diff = $phpcsFile->fixer->generateDiff(null, false);
+        } else {
+            $diff = $phpcsFile->fixer->generateDiff();
+        }
+
+        if ($diff === '') {
+            // Nothing to print.
+            return false;
+        }
+
+        echo $diff.PHP_EOL;
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints all errors and warnings for each file processed.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo $cachedData;
+        if ($toScreen === true) {
+            echo PHP_EOL;
+        }
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Emacs.php	(revision 5534)
@@ -0,0 +1,110 @@
+<?php
+/**
+ * Emacs report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Emacs report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Emacs implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Nothing to print.
+            return false;
+        }
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $message = $error['message'];
+                    if ($showSources === true) {
+                        $message .= ' ('.$error['source'].')';
+                    }
+
+                    $type = strtolower($error['type']);
+                    echo $report['filename'].':'.$line.':'.$column.': '.$type.' - '.$message.PHP_EOL;
+                }
+            }
+        }
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Generates an emacs report.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo $cachedData;
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Full.php	(revision 5534)
@@ -0,0 +1,237 @@
+<?php
+/**
+ * Full report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Full report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Full implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Nothing to print.
+            return false;
+        }
+
+        // The length of the word ERROR or WARNING; used for padding.
+        if ($report['warnings'] > 0) {
+            $typeLength = 7;
+        } else {
+            $typeLength = 5;
+        }
+
+        // Work out the max line number length for formatting.
+        $maxLineNumLength = max(array_map('strlen', array_keys($report['messages'])));
+
+        // The padding that all lines will require that are
+        // printing an error message overflow.
+        $paddingLine2  = str_repeat(' ', ($maxLineNumLength + 1));
+        $paddingLine2 .= ' | ';
+        $paddingLine2 .= str_repeat(' ', $typeLength);
+        $paddingLine2 .= ' | ';
+        if ($report['fixable'] > 0) {
+            $paddingLine2 .= '    ';
+        }
+
+        $paddingLength = strlen($paddingLine2);
+
+        // Make sure the report width isn't too big.
+        $maxErrorLength = 0;
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $length = strlen($error['message']);
+                    if ($showSources === true) {
+                        $length += (strlen($error['source']) + 3);
+                    }
+
+                    $maxErrorLength = max($maxErrorLength, ($length + 1));
+                }
+            }
+        }
+
+        $file       = $report['filename'];
+        $fileLength = strlen($file);
+        $maxWidth   = max(($fileLength + 6), ($maxErrorLength + $paddingLength));
+        $width      = min($width, $maxWidth);
+        if ($width < 70) {
+            $width = 70;
+        }
+
+        echo PHP_EOL."\033[1mFILE: ";
+        if ($fileLength <= ($width - 6)) {
+            echo $file;
+        } else {
+            echo '...'.substr($file, ($fileLength - ($width - 6)));
+        }
+
+        echo "\033[0m".PHP_EOL;
+        echo str_repeat('-', $width).PHP_EOL;
+
+        echo "\033[1m".'FOUND '.$report['errors'].' ERROR';
+        if ($report['errors'] !== 1) {
+            echo 'S';
+        }
+
+        if ($report['warnings'] > 0) {
+            echo ' AND '.$report['warnings'].' WARNING';
+            if ($report['warnings'] !== 1) {
+                echo 'S';
+            }
+        }
+
+        echo ' AFFECTING '.count($report['messages']).' LINE';
+        if (count($report['messages']) !== 1) {
+            echo 'S';
+        }
+
+        echo "\033[0m".PHP_EOL;
+        echo str_repeat('-', $width).PHP_EOL;
+
+        // The maximum amount of space an error message can use.
+        $maxErrorSpace = ($width - $paddingLength - 1);
+        if ($showSources === true) {
+            // Account for the chars used to print colors.
+            $maxErrorSpace += 8;
+        }
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $message = $error['message'];
+                    $message = str_replace("\n", "\n".$paddingLine2, $message);
+                    if ($showSources === true) {
+                        $message = "\033[1m".$message."\033[0m".' ('.$error['source'].')';
+                    }
+
+                    // The padding that goes on the front of the line.
+                    $padding  = ($maxLineNumLength - strlen($line));
+                    $errorMsg = wordwrap(
+                        $message,
+                        $maxErrorSpace,
+                        PHP_EOL.$paddingLine2
+                    );
+
+                    echo ' '.str_repeat(' ', $padding).$line.' | ';
+                    if ($error['type'] === 'ERROR') {
+                        echo "\033[31mERROR\033[0m";
+                        if ($report['warnings'] > 0) {
+                            echo '  ';
+                        }
+                    } else {
+                        echo "\033[33mWARNING\033[0m";
+                    }
+
+                    echo ' | ';
+                    if ($report['fixable'] > 0) {
+                        echo '[';
+                        if ($error['fixable'] === true) {
+                            echo 'x';
+                        } else {
+                            echo ' ';
+                        }
+
+                        echo '] ';
+                    }
+
+                    echo $errorMsg.PHP_EOL;
+                }//end foreach
+            }//end foreach
+        }//end foreach
+
+        echo str_repeat('-', $width).PHP_EOL;
+        if ($report['fixable'] > 0) {
+            echo "\033[1m".'PHPCBF CAN FIX THE '.$report['fixable'].' MARKED SNIFF VIOLATIONS AUTOMATICALLY'."\033[0m".PHP_EOL;
+            echo str_repeat('-', $width).PHP_EOL;
+        }
+
+        echo PHP_EOL;
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints all errors and warnings for each file processed.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        if ($cachedData === '') {
+            return;
+        }
+
+        echo $cachedData;
+
+        if ($toScreen === true && PHP_CODESNIFFER_INTERACTIVE === false) {
+            PHP_CodeSniffer_Reporting::printRunTime();
+        }
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Gitblame.php	(revision 5534)
@@ -0,0 +1,131 @@
+<?php
+/**
+ * Gitblame report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Ben Selby <benmatselby@gmail.com>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Gitblame report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Ben Selby <benmatselby@gmail.com>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: 1.2.2
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Gitblame extends PHP_CodeSniffer_Reports_VersionControl
+{
+
+    /**
+     * The name of the report we want in the output
+     *
+     * @var string
+     */
+    protected $reportName = 'GIT';
+
+
+    /**
+     * Extract the author from a blame line.
+     *
+     * @param string $line Line to parse.
+     *
+     * @return mixed string or false if impossible to recover.
+     */
+    protected function getAuthor($line)
+    {
+        $blameParts = array();
+        $line       = preg_replace('|\s+|', ' ', $line);
+        preg_match(
+            '|\(.+[0-9]{4}-[0-9]{2}-[0-9]{2}\s+[0-9]+\)|',
+            $line,
+            $blameParts
+        );
+
+        if (isset($blameParts[0]) === false) {
+            return false;
+        }
+
+        $parts = explode(' ', $blameParts[0]);
+
+        if (count($parts) < 2) {
+            return false;
+        }
+
+        $parts  = array_slice($parts, 0, (count($parts) - 2));
+        $author = preg_replace('|\(|', '', implode($parts, ' '));
+        return $author;
+
+    }//end getAuthor()
+
+
+    /**
+     * Gets the blame output.
+     *
+     * @param string $filename File to blame.
+     *
+     * @return array
+     */
+    protected function getBlameContent($filename)
+    {
+        $cwd = getcwd();
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'Getting GIT blame info for '.basename($filename).'... ';
+        }
+
+        $fileParts = explode(DIRECTORY_SEPARATOR, $filename);
+        $found     = false;
+        $location  = '';
+        while (empty($fileParts) === false) {
+            array_pop($fileParts);
+            $location = implode($fileParts, DIRECTORY_SEPARATOR);
+            if (is_dir($location.DIRECTORY_SEPARATOR.'.git') === true) {
+                $found = true;
+                break;
+            }
+        }
+
+        if ($found === true) {
+            chdir($location);
+        } else {
+            echo 'ERROR: Could not locate .git directory '.PHP_EOL.PHP_EOL;
+            exit(2);
+        }
+
+        $command = 'git blame --date=short "'.$filename.'" 2>&1';
+        $handle  = popen($command, 'r');
+        if ($handle === false) {
+            echo 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL;
+            exit(2);
+        }
+
+        $rawContent = stream_get_contents($handle);
+        fclose($handle);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'DONE'.PHP_EOL;
+        }
+
+        $blames = explode("\n", $rawContent);
+        chdir($cwd);
+
+        return $blames;
+
+    }//end getBlameContent()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Hgblame.php	(revision 5534)
@@ -0,0 +1,132 @@
+<?php
+/**
+ * Mercurial report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Ben Selby <benmatselby@gmail.com>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Mercurial report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Ben Selby <benmatselby@gmail.com>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Hgblame extends PHP_CodeSniffer_Reports_VersionControl
+{
+
+    /**
+     * The name of the report we want in the output
+     *
+     * @var string
+     */
+    protected $reportName = 'MERCURIAL';
+
+
+    /**
+     * Extract the author from a blame line.
+     *
+     * @param string $line Line to parse.
+     *
+     * @return mixed string or false if impossible to recover.
+     */
+    protected function getAuthor($line)
+    {
+        $blameParts = array();
+        $line       = preg_replace('|\s+|', ' ', $line);
+
+        preg_match(
+            '|(.+[0-9]{2}:[0-9]{2}:[0-9]{2}\s[0-9]{4}\s.[0-9]{4}:)|',
+            $line,
+            $blameParts
+        );
+
+        if (isset($blameParts[0]) === false) {
+            return false;
+        }
+
+        $parts = explode(' ', $blameParts[0]);
+
+        if (count($parts) < 6) {
+            return false;
+        }
+
+        $parts = array_slice($parts, 0, (count($parts) - 6));
+
+        return trim(preg_replace('|<.+>|', '', implode($parts, ' ')));
+
+    }//end getAuthor()
+
+
+    /**
+     * Gets the blame output.
+     *
+     * @param string $filename File to blame.
+     *
+     * @return array
+     */
+    protected function getBlameContent($filename)
+    {
+        $cwd = getcwd();
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'Getting MERCURIAL blame info for '.basename($filename).'... ';
+        }
+
+        $fileParts = explode(DIRECTORY_SEPARATOR, $filename);
+        $found     = false;
+        $location  = '';
+        while (empty($fileParts) === false) {
+            array_pop($fileParts);
+            $location = implode($fileParts, DIRECTORY_SEPARATOR);
+            if (is_dir($location.DIRECTORY_SEPARATOR.'.hg') === true) {
+                $found = true;
+                break;
+            }
+        }
+
+        if ($found === true) {
+            chdir($location);
+        } else {
+            echo 'ERROR: Could not locate .hg directory '.PHP_EOL.PHP_EOL;
+            exit(2);
+        }
+
+        $command = 'hg blame -u -d -v "'.$filename.'" 2>&1';
+        $handle  = popen($command, 'r');
+        if ($handle === false) {
+            echo 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL;
+            exit(2);
+        }
+
+        $rawContent = stream_get_contents($handle);
+        fclose($handle);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'DONE'.PHP_EOL;
+        }
+
+        $blames = explode("\n", $rawContent);
+        chdir($cwd);
+
+        return $blames;
+
+    }//end getBlameContent()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Info.php	(revision 5534)
@@ -0,0 +1,162 @@
+<?php
+/**
+ * Info report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Info report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Info implements PHP_CodeSniffer_Report
+{
+
+    /**
+     * TRUE if this report needs error messages instead of just totals.
+     *
+     * @var boolean
+     */
+    public $recordErrors = false;
+
+    /**
+     * A cache of metrics collected during the run.
+     *
+     * @var array
+     */
+    private $_metricCache = array();
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $metrics = $phpcsFile->getMetrics();
+        foreach ($metrics as $metric => $data) {
+            if (isset($this->_metricCache[$metric]) === false) {
+                $this->_metricCache[$metric] = array();
+            }
+
+            foreach ($data['values'] as $value => $locations) {
+                $locations = array_unique($locations);
+                $count     = count($locations);
+
+                if (isset($this->_metricCache[$metric][$value]) === false) {
+                    $this->_metricCache[$metric][$value] = $count;
+                } else {
+                    $this->_metricCache[$metric][$value] += $count;
+                }
+            }
+        }//end foreach
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints the source of all errors and warnings.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        if (empty($this->_metricCache) === true) {
+            // Nothing to show.
+            return;
+        }
+
+        ksort($this->_metricCache);
+
+        echo PHP_EOL."\033[1m".'PHP CODE SNIFFER INFORMATION REPORT'."\033[0m".PHP_EOL;
+        echo str_repeat('-', 70).PHP_EOL;
+
+        foreach ($this->_metricCache as $metric => $values) {
+            $winner      = '';
+            $winnerCount = 0;
+            $totalCount  = 0;
+            foreach ($values as $value => $count) {
+                $totalCount += $count;
+                if ($count > $winnerCount) {
+                    $winner      = $value;
+                    $winnerCount = $count;
+                }
+            }
+
+            $winPercent = round(($winnerCount / $totalCount * 100), 2);
+            echo "$metric: \033[4m$winner\033[0m [$winnerCount/$totalCount, $winPercent%]".PHP_EOL;
+
+            asort($values);
+            $values = array_reverse($values, true);
+            foreach ($values as $value => $count) {
+                if ($value === $winner) {
+                    continue;
+                }
+
+                $percent = round(($count / $totalCount * 100), 2);
+                echo "\t$value => $count ($percent%)".PHP_EOL;
+            }
+
+            echo PHP_EOL;
+        }//end foreach
+
+        echo str_repeat('-', 70).PHP_EOL;
+
+        if ($toScreen === true && PHP_CODESNIFFER_INTERACTIVE === false) {
+            PHP_CodeSniffer_Reporting::printRunTime();
+        }
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Json.php	(revision 5534)
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Json report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Jeffrey Fisher <jeffslofish@gmail.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Json report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Jeffrey Fisher <jeffslofish@gmail.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Json implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $filename = str_replace('\\', '\\\\', $report['filename']);
+        $filename = str_replace('"', '\"', $filename);
+        $filename = str_replace('/', '\/', $filename);
+        echo '"'.$filename.'":{';
+        echo '"errors":'.$report['errors'].',"warnings":'.$report['warnings'].',"messages":[';
+
+        $messages = '';
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $error['message'] = str_replace('\\', '\\\\', $error['message']);
+                    $error['message'] = str_replace('"', '\"', $error['message']);
+                    $error['message'] = str_replace('/', '\/', $error['message']);
+                    $error['message'] = str_replace("\n", '\n', $error['message']);
+                    $error['message'] = str_replace("\r", '\r', $error['message']);
+                    $error['message'] = str_replace("\t", '\t', $error['message']);
+
+                    $fixable = 'false';
+                    if ($error['fixable'] === true) {
+                        $fixable = 'true';
+                    }
+
+                    $messages .= '{"message":"'.$error['message'].'",';
+                    $messages .= '"source":"'.$error['source'].'",';
+                    $messages .= '"severity":'.$error['severity'].',';
+                    $messages .= '"type":"'.$error['type'].'",';
+                    $messages .= '"line":'.$line.',';
+                    $messages .= '"column":'.$column.',';
+                    $messages .= '"fixable":'.$fixable;
+                    $messages .= '},';
+                }//end foreach
+            }//end foreach
+        }//end foreach
+
+        echo rtrim($messages, ',');
+        echo ']},';
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Generates a JSON report.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo '{"totals":{"errors":'.$totalErrors.',"warnings":'.$totalWarnings.',"fixable":'.$totalFixable.'},"files":{';
+        echo rtrim($cachedData, ',');
+        echo "}}";
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Junit.php	(revision 5534)
@@ -0,0 +1,149 @@
+<?php
+/**
+ * JUnit report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Oleg Lobach <oleg@lobach.info>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * JUnit report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Oleg Lobach <oleg@lobach.info>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Junit implements PHP_CodeSniffer_Report
+{
+
+    /**
+     * A count of tests that have been performed.
+     *
+     * @var int
+     */
+    private $_tests = 0;
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        if (count($report['messages']) === 0) {
+            $this->_tests++;
+        } else {
+            $this->_tests += ($report['errors'] + $report['warnings']);
+        }
+
+        $out = new XMLWriter;
+        $out->openMemory();
+        $out->setIndent(true);
+
+        $out->startElement('testsuite');
+        $out->writeAttribute('name', $report['filename']);
+
+        if (count($report['messages']) === 0) {
+            $out->writeAttribute('tests', 1);
+            $out->writeAttribute('failures', 0);
+
+            $out->startElement('testcase');
+            $out->writeAttribute('name', $report['filename']);
+            $out->endElement();
+        } else {
+            $failures = ($report['errors'] + $report['warnings']);
+            $out->writeAttribute('tests', $failures);
+            $out->writeAttribute('failures', $failures);
+
+            foreach ($report['messages'] as $line => $lineErrors) {
+                foreach ($lineErrors as $column => $colErrors) {
+                    foreach ($colErrors as $error) {
+                        $out->startElement('testcase');
+                        $out->writeAttribute('name', $error['source'].' at '.$report['filename']." ($line:$column)");
+
+                        $error['type'] = strtolower($error['type']);
+                        if (PHP_CODESNIFFER_ENCODING !== 'utf-8') {
+                            $error['message'] = iconv(PHP_CODESNIFFER_ENCODING, 'utf-8', $error['message']);
+                        }
+
+                        $out->startElement('failure');
+                        $out->writeAttribute('type', $error['type']);
+                        $out->writeAttribute('message', $error['message']);
+                        $out->endElement();
+
+                        $out->endElement();
+                    }
+                }
+            }
+        }//end if
+
+        $out->endElement();
+        echo $out->flush();
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints all violations for processed files, in a proprietary XML format.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        $failures = ($totalErrors + $totalWarnings);
+        echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
+        echo '<testsuites name="PHP_CodeSniffer '.PHP_CodeSniffer::VERSION.'" tests="'.$this->_tests.'" failures="'.$failures.'">'.PHP_EOL;
+        echo $cachedData;
+        echo '</testsuites>'.PHP_EOL;
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Notifysend.php	(revision 5534)
@@ -0,0 +1,262 @@
+<?php
+/**
+ * Notify-send report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Christian Weiske <christian.weiske@netresearch.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2012-2014 Christian Weiske
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Notify-send report for PHP_CodeSniffer.
+ *
+ * Supported configuration parameters:
+ * - notifysend_path    - Full path to notify-send cli command
+ * - notifysend_timeout - Timeout in milliseconds
+ * - notifysend_showok  - Show "ok, all fine" messages (0/1)
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Christian Weiske <christian.weiske@netresearch.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2012-2014 Christian Weiske
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Notifysend implements PHP_CodeSniffer_Report
+{
+
+    /**
+     * Notification timeout in milliseconds.
+     *
+     * @var integer
+     */
+    protected $timeout = 3000;
+
+    /**
+     * Path to notify-send command.
+     *
+     * @var string
+     */
+    protected $path = 'notify-send';
+
+    /**
+     * Show "ok, all fine" messages.
+     *
+     * @var boolean
+     */
+    protected $showOk = true;
+
+    /**
+     * Version of installed notify-send executable.
+     *
+     * @var string
+     */
+    protected $version = null;
+
+    /**
+     * A record of the last file checked.
+     *
+     * This is used in case we only checked one file and need to print
+     * the name/path of the file. We wont have access to the checked file list
+     * after the run has been completed.
+     *
+     * @var string
+     */
+    private $_lastCheckedFile = '';
+
+
+    /**
+     * Load configuration data.
+     */
+    public function __construct()
+    {
+        $path = PHP_CodeSniffer::getConfigData('notifysend_path');
+        if ($path !== null) {
+            $this->path = $path;
+        }
+
+        $timeout = PHP_CodeSniffer::getConfigData('notifysend_timeout');
+        if ($timeout !== null) {
+            $this->timeout = (int) $timeout;
+        }
+
+        $showOk = PHP_CodeSniffer::getConfigData('notifysend_showok');
+        if ($showOk !== null) {
+            $this->showOk = (boolean) $showOk;
+        }
+
+        $this->version = str_replace(
+            'notify-send ',
+            '',
+            exec($this->path.' --version')
+        );
+
+    }//end __construct()
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        // We don't need to print anything, but we want this file counted
+        // in the total number of checked files even if it has no errors.
+        $this->_lastCheckedFile = $report['filename'];
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Generates a summary of errors and warnings for each file processed.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        $msg = $this->generateMessage($totalFiles, $totalErrors, $totalWarnings);
+        if ($msg === null) {
+            if ($this->showOk === true) {
+                $this->notifyAllFine();
+            }
+        } else {
+            $this->notifyErrors($msg);
+        }
+
+    }//end generate()
+
+
+    /**
+     * Generate the error message to show to the user.
+     *
+     * @param int $totalFiles    Total number of files processed during the run.
+     * @param int $totalErrors   Total number of errors found during the run.
+     * @param int $totalWarnings Total number of warnings found during the run.
+     *
+     * @return string Error message or NULL if no error/warning found.
+     */
+    protected function generateMessage($totalFiles, $totalErrors, $totalWarnings)
+    {
+        if ($totalErrors === 0 && $totalWarnings === 0) {
+            // Nothing to print.
+            return null;
+        }
+
+        $msg = '';
+        if ($totalFiles > 1) {
+            $msg .= 'Checked '.$totalFiles.' files'.PHP_EOL;
+        } else {
+            $msg .= $this->_lastCheckedFile.PHP_EOL;
+        }
+
+        if ($totalWarnings > 0) {
+            $msg .= $totalWarnings.' warnings'.PHP_EOL;
+        }
+
+        if ($totalErrors > 0) {
+            $msg .= $totalErrors.' errors'.PHP_EOL;
+        }
+
+        return $msg;
+
+    }//end generateMessage()
+
+
+    /**
+     * Tell the user that all is fine and no error/warning has been found.
+     *
+     * @return void
+     */
+    protected function notifyAllFine()
+    {
+        $cmd  = $this->getBasicCommand();
+        $cmd .= ' -i info';
+        $cmd .= ' "PHP CodeSniffer: Ok"';
+        $cmd .= ' "All fine"';
+        exec($cmd);
+
+    }//end notifyAllFine()
+
+
+    /**
+     * Tell the user that errors/warnings have been found.
+     *
+     * @param string $msg Message to display.
+     *
+     * @return void
+     */
+    protected function notifyErrors($msg)
+    {
+        $cmd  = $this->getBasicCommand();
+        $cmd .= ' -i error';
+        $cmd .= ' "PHP CodeSniffer: Error"';
+        $cmd .= ' '.escapeshellarg(trim($msg));
+        exec($cmd);
+
+    }//end notifyErrors()
+
+
+    /**
+     * Generate and return the basic notify-send command string to execute.
+     *
+     * @return string Shell command with common parameters.
+     */
+    protected function getBasicCommand()
+    {
+        $cmd  = escapeshellcmd($this->path);
+        $cmd .= ' --category dev.validate';
+        $cmd .= ' -h int:transient:1';
+        $cmd .= ' -t '.(int) $this->timeout;
+        if (version_compare($this->version, '0.7.3', '>=') === true) {
+            $cmd .= ' -a phpcs';
+        }
+
+        return $cmd;
+
+    }//end getBasicCommand()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Source.php	(revision 5534)
@@ -0,0 +1,334 @@
+<?php
+/**
+ * Source report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Source report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Source implements PHP_CodeSniffer_Report
+{
+
+    /**
+     * A cache of source stats collected during the run.
+     *
+     * @var array
+     */
+    private $_sourceCache = array();
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Nothing to print.
+            return false;
+        }
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $source = $error['source'];
+                    if (isset($this->_sourceCache[$source]) === false) {
+                        if ($showSources === true) {
+                            $parts = null;
+                            $sniff = $source;
+                        } else {
+                            $parts = explode('.', $source);
+                            if ($parts[0] === 'Internal') {
+                                $parts[2] = $parts[1];
+                                $parts[1] = '';
+                            }
+
+                            $parts[1] = $this->makeFriendlyName($parts[1]);
+
+                            $sniff = $this->makeFriendlyName($parts[2]);
+                            if (isset($parts[3]) === true) {
+                                $name    = $this->makeFriendlyName($parts[3]);
+                                $name[0] = strtolower($name[0]);
+                                $sniff  .= ' '.$name;
+                                unset($parts[3]);
+                            }
+
+                            $parts[2] = $sniff;
+                        }//end if
+
+                        $this->_sourceCache[$source] = array(
+                                                        'count'   => 1,
+                                                        'fixable' => $error['fixable'],
+                                                        'parts'   => $parts,
+                                                        'strlen'  => strlen($sniff),
+                                                       );
+                    } else {
+                        $this->_sourceCache[$source]['count']++;
+                    }//end if
+                }//end foreach
+            }//end foreach
+        }//end foreach
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints the source of all errors and warnings.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        if (empty($this->_sourceCache) === true) {
+            // Nothing to show.
+            return;
+        }
+
+        // Make sure the report width isn't too big.
+        $maxLength = 0;
+        foreach ($this->_sourceCache as $source => $data) {
+            $maxLength = max($maxLength, $data['strlen']);
+        }
+
+        if ($showSources === true) {
+            $width = min($width, ($maxLength + 11));
+        } else {
+            $width = min($width, ($maxLength + 41));
+        }
+
+        $width = max($width, 70);
+
+        asort($this->_sourceCache);
+        $this->_sourceCache = array_reverse($this->_sourceCache);
+
+        echo PHP_EOL."\033[1mPHP CODE SNIFFER VIOLATION SOURCE SUMMARY\033[0m".PHP_EOL;
+        echo str_repeat('-', $width).PHP_EOL."\033[1m";
+        if ($showSources === true) {
+            if ($totalFixable > 0) {
+                echo '    SOURCE'.str_repeat(' ', ($width - 15)).'COUNT'.PHP_EOL;
+            } else {
+                echo 'SOURCE'.str_repeat(' ', ($width - 11)).'COUNT'.PHP_EOL;
+            }
+        } else {
+            if ($totalFixable > 0) {
+                echo '    STANDARD  CATEGORY            SNIFF'.str_repeat(' ', ($width - 44)).'COUNT'.PHP_EOL;
+            } else {
+                echo 'STANDARD  CATEGORY            SNIFF'.str_repeat(' ', ($width - 40)).'COUNT'.PHP_EOL;
+            }
+        }
+
+        echo "\033[0m".str_repeat('-', $width).PHP_EOL;
+
+        $fixableSources = 0;
+
+        if ($showSources === true) {
+            $maxSniffWidth = ($width - 7);
+        } else {
+            $maxSniffWidth = ($width - 37);
+        }
+
+        if ($totalFixable > 0) {
+            $maxSniffWidth -= 4;
+        }
+
+        foreach ($this->_sourceCache as $source => $sourceData) {
+            if ($totalFixable > 0) {
+                echo '[';
+                if ($sourceData['fixable'] === true) {
+                    echo 'x';
+                    $fixableSources++;
+                } else {
+                    echo ' ';
+                }
+
+                echo '] ';
+            }
+
+            if ($showSources === true) {
+                if ($sourceData['strlen'] > $maxSniffWidth) {
+                    $source = substr($source, 0, $maxSniffWidth);
+                }
+
+                echo $source;
+                if ($totalFixable > 0) {
+                    echo str_repeat(' ', ($width - 9 - strlen($source)));
+                } else {
+                    echo str_repeat(' ', ($width - 5 - strlen($source)));
+                }
+            } else {
+                $parts = $sourceData['parts'];
+
+                if (strlen($parts[0]) > 8) {
+                    $parts[0] = substr($parts[0], 0, ((strlen($parts[0]) - 8) * -1));
+                }
+
+                echo $parts[0].str_repeat(' ', (10 - strlen($parts[0])));
+
+                $category = $parts[1];
+                if (strlen($category) > 18) {
+                    $category = substr($category, 0, ((strlen($category) - 18) * -1));
+                }
+
+                echo $category.str_repeat(' ', (20 - strlen($category)));
+
+                $sniff = $parts[2];
+                if (strlen($sniff) > $maxSniffWidth) {
+                    $sniff = substr($sniff, 0, $maxSniffWidth);
+                }
+
+                if ($totalFixable > 0) {
+                    echo $sniff.str_repeat(' ', ($width - 39 - strlen($sniff)));
+                } else {
+                    echo $sniff.str_repeat(' ', ($width - 35 - strlen($sniff)));
+                }
+            }//end if
+
+            echo $sourceData['count'].PHP_EOL;
+        }//end foreach
+
+        echo str_repeat('-', $width).PHP_EOL;
+        echo "\033[1m".'A TOTAL OF '.($totalErrors + $totalWarnings).' SNIFF VIOLATION';
+        if (($totalErrors + $totalWarnings) > 1) {
+            echo 'S';
+        }
+
+        echo ' WERE FOUND IN '.count($this->_sourceCache).' SOURCE';
+        if (count($this->_sourceCache) !== 1) {
+            echo 'S';
+        }
+
+        echo "\033[0m";
+
+        if ($totalFixable > 0) {
+            echo PHP_EOL.str_repeat('-', $width).PHP_EOL;
+            echo "\033[1mPHPCBF CAN FIX THE $fixableSources MARKED SOURCES AUTOMATICALLY ($totalFixable VIOLATIONS IN TOTAL)\033[0m";
+        }
+
+        echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;
+
+        if ($toScreen === true && PHP_CODESNIFFER_INTERACTIVE === false) {
+            PHP_CodeSniffer_Reporting::printRunTime();
+        }
+
+    }//end generate()
+
+
+    /**
+     * Converts a camel caps name into a readable string.
+     *
+     * @param string $name The camel caps name to convert.
+     *
+     * @return string
+     */
+    public function makeFriendlyName($name)
+    {
+        if (trim($name) === '') {
+            return '';
+        }
+
+        $friendlyName = '';
+        $length       = strlen($name);
+
+        $lastWasUpper   = false;
+        $lastWasNumeric = false;
+        for ($i = 0; $i < $length; $i++) {
+            if (is_numeric($name[$i]) === true) {
+                if ($lastWasNumeric === false) {
+                    $friendlyName .= ' ';
+                }
+
+                $lastWasUpper   = false;
+                $lastWasNumeric = true;
+            } else {
+                $lastWasNumeric = false;
+
+                $char = strtolower($name[$i]);
+                if ($char === $name[$i]) {
+                    // Lowercase.
+                    $lastWasUpper = false;
+                } else {
+                    // Uppercase.
+                    if ($lastWasUpper === false) {
+                        $friendlyName .= ' ';
+                        if ($i < ($length - 1)) {
+                            $next = $name[($i + 1)];
+                            if (strtolower($next) === $next) {
+                                // Next char is lowercase so it is a word boundary.
+                                $name[$i] = strtolower($name[$i]);
+                            }
+                        }
+                    }
+
+                    $lastWasUpper = true;
+                }
+            }//end if
+
+            $friendlyName .= $name[$i];
+        }//end for
+
+        $friendlyName    = trim($friendlyName);
+        $friendlyName[0] = strtoupper($friendlyName[0]);
+
+        return $friendlyName;
+
+    }//end makeFriendlyName()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Summary.php	(revision 5534)
@@ -0,0 +1,189 @@
+<?php
+/**
+ * Summary report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Summary report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Summary implements PHP_CodeSniffer_Report
+{
+
+    /**
+     * TRUE if this report needs error messages instead of just totals.
+     *
+     * @var boolean
+     */
+    public $recordErrors = false;
+
+    /**
+     * An array of process files and their error data.
+     *
+     * @var boolean
+     */
+    private $_reportFiles = array();
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        if (PHP_CODESNIFFER_VERBOSITY === 0
+            && $report['errors'] === 0
+            && $report['warnings'] === 0
+        ) {
+            // Nothing to print.
+            return false;
+        }
+
+        $this->_reportFiles[$report['filename']] = array(
+                                                    'errors'   => $report['errors'],
+                                                    'warnings' => $report['warnings'],
+                                                    'strlen'   => strlen($report['filename']),
+                                                   );
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Generates a summary of errors and warnings for each file processed.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+
+        if (empty($this->_reportFiles) === true) {
+            return;
+        }
+
+        // Make sure the report width isn't too big.
+        $maxLength = 0;
+        foreach ($this->_reportFiles as $file => $data) {
+            $maxLength = max($maxLength, $data['strlen']);
+        }
+
+        $width = min($width, ($maxLength + 21));
+        $width = max($width, 70);
+
+        echo PHP_EOL."\033[1m".'PHP CODE SNIFFER REPORT SUMMARY'."\033[0m".PHP_EOL;
+        echo str_repeat('-', $width).PHP_EOL;
+        echo "\033[1m".'FILE'.str_repeat(' ', ($width - 20)).'ERRORS  WARNINGS'."\033[0m".PHP_EOL;
+        echo str_repeat('-', $width).PHP_EOL;
+
+        foreach ($this->_reportFiles as $file => $data) {
+            $padding = ($width - 18 - $data['strlen']);
+            if ($padding < 0) {
+                $file    = '...'.substr($file, (($padding * -1) + 3));
+                $padding = 0;
+            }
+
+            echo $file.str_repeat(' ', $padding).'  ';
+            if ($data['errors'] !== 0) {
+                echo "\033[31m".$data['errors']."\033[0m";
+                echo str_repeat(' ', (8 - strlen((string) $data['errors'])));
+            } else {
+                echo '0       ';
+            }
+
+            if ($data['warnings'] !== 0) {
+                echo "\033[33m".$data['warnings']."\033[0m";
+            } else {
+                echo '0';
+            }
+
+            echo PHP_EOL;
+        }//end foreach
+
+        echo str_repeat('-', $width).PHP_EOL;
+        echo "\033[1mA TOTAL OF $totalErrors ERROR";
+        if ($totalErrors !== 1) {
+            echo 'S';
+        }
+
+        echo ' AND '.$totalWarnings.' WARNING';
+        if ($totalWarnings !== 1) {
+            echo 'S';
+        }
+
+        echo ' WERE FOUND IN '.$totalFiles.' FILE';
+        if ($totalFiles !== 1) {
+            echo 'S';
+        }
+
+        echo "\033[0m";
+
+        if ($totalFixable > 0) {
+            echo PHP_EOL.str_repeat('-', $width).PHP_EOL;
+            echo "\033[1mPHPCBF CAN FIX $totalFixable OF THESE SNIFF VIOLATIONS AUTOMATICALLY\033[0m";
+        }
+
+        echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;
+
+        if ($toScreen === true && PHP_CODESNIFFER_INTERACTIVE === false) {
+            PHP_CodeSniffer_Reporting::printRunTime();
+        }
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Svnblame.php	(revision 5534)
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Svnblame report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Svnblame report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Svnblame extends PHP_CodeSniffer_Reports_VersionControl
+{
+
+    /**
+     * The name of the report we want in the output
+     *
+     * @var string
+     */
+    protected $reportName = 'SVN';
+
+
+    /**
+     * Extract the author from a blame line.
+     *
+     * @param string $line Line to parse.
+     *
+     * @return mixed string or false if impossible to recover.
+     */
+    protected function getAuthor($line)
+    {
+        $blameParts = array();
+        preg_match('|\s*([^\s]+)\s+([^\s]+)|', $line, $blameParts);
+
+        if (isset($blameParts[2]) === false) {
+            return false;
+        }
+
+        return $blameParts[2];
+
+    }//end getAuthor()
+
+
+    /**
+     * Gets the blame output.
+     *
+     * @param string $filename File to blame.
+     *
+     * @return array
+     */
+    protected function getBlameContent($filename)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'Getting SVN blame info for '.basename($filename).'... ';
+        }
+
+        $command = 'svn blame "'.$filename.'" 2>&1';
+        $handle  = popen($command, 'r');
+        if ($handle === false) {
+            echo 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL;
+            exit(2);
+        }
+
+        $rawContent = stream_get_contents($handle);
+        fclose($handle);
+
+        if (PHP_CODESNIFFER_VERBOSITY > 0) {
+            echo 'DONE'.PHP_EOL;
+        }
+
+        $blames = explode("\n", $rawContent);
+
+        return $blames;
+
+    }//end getBlameContent()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/VersionControl.php	(revision 5534)
@@ -0,0 +1,296 @@
+<?php
+/**
+ * Version control report base class for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Ben Selby <benmatselby@gmail.com>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Version control report base class for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Ben Selby <benmatselby@gmail.com>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: 1.2.2
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+abstract class PHP_CodeSniffer_Reports_VersionControl implements PHP_CodeSniffer_Report
+{
+
+    /**
+     * The name of the report we want in the output.
+     *
+     * @var string
+     */
+    protected $reportName = 'VERSION CONTROL';
+
+    /**
+     * A cache of author stats collected during the run.
+     *
+     * @var array
+     */
+    private $_authorCache = array();
+
+    /**
+     * A cache of blame stats collected during the run.
+     *
+     * @var array
+     */
+    private $_praiseCache = array();
+
+    /**
+     * A cache of source stats collected during the run.
+     *
+     * @var array
+     */
+    private $_sourceCache = array();
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $blames = $this->getBlameContent($report['filename']);
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            $author = 'Unknown';
+            if (isset($blames[($line - 1)]) === true) {
+                $blameAuthor = $this->getAuthor($blames[($line - 1)]);
+                if ($blameAuthor !== false) {
+                    $author = $blameAuthor;
+                }
+            }
+
+            if (isset($this->_authorCache[$author]) === false) {
+                $this->_authorCache[$author] = 0;
+                $this->_praiseCache[$author] = array(
+                                                'good' => 0,
+                                                'bad'  => 0,
+                                               );
+            }
+
+            $this->_praiseCache[$author]['bad']++;
+
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $this->_authorCache[$author]++;
+
+                    if ($showSources === true) {
+                        $source = $error['source'];
+                        if (isset($this->_sourceCache[$author][$source]) === false) {
+                            $this->_sourceCache[$author][$source] = 1;
+                        } else {
+                            $this->_sourceCache[$author][$source]++;
+                        }
+                    }
+                }
+            }
+
+            unset($blames[($line - 1)]);
+        }//end foreach
+
+        // No go through and give the authors some credit for
+        // all the lines that do not have errors.
+        foreach ($blames as $line) {
+            $author = $this->getAuthor($line);
+            if ($author === false) {
+                $author = 'Unknown';
+            }
+
+            if (isset($this->_authorCache[$author]) === false) {
+                // This author doesn't have any errors.
+                if (PHP_CODESNIFFER_VERBOSITY === 0) {
+                    continue;
+                }
+
+                $this->_authorCache[$author] = 0;
+                $this->_praiseCache[$author] = array(
+                                                'good' => 0,
+                                                'bad'  => 0,
+                                               );
+            }
+
+            $this->_praiseCache[$author]['good']++;
+        }//end foreach
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints the author of all errors and warnings, as given by "version control blame".
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        $errorsShown = ($totalErrors + $totalWarnings);
+        if ($errorsShown === 0) {
+            // Nothing to show.
+            return;
+        }
+
+        // Make sure the report width isn't too big.
+        $maxLength = 0;
+        foreach ($this->_authorCache as $author => $count) {
+            $maxLength = max($maxLength, strlen($author));
+            if ($showSources === true && isset($this->_sourceCache[$author]) === true) {
+                foreach ($this->_sourceCache[$author] as $source => $count) {
+                    if ($source === 'count') {
+                        continue;
+                    }
+
+                    $maxLength = max($maxLength, (strlen($source) + 9));
+                }
+            }
+        }
+
+        $width = min($width, ($maxLength + 30));
+        $width = max($width, 70);
+        arsort($this->_authorCache);
+
+        echo PHP_EOL."\033[1m".'PHP CODE SNIFFER '.$this->reportName.' BLAME SUMMARY'."\033[0m".PHP_EOL;
+        echo str_repeat('-', $width).PHP_EOL."\033[1m";
+        if ($showSources === true) {
+            echo 'AUTHOR   SOURCE'.str_repeat(' ', ($width - 43)).'(Author %) (Overall %) COUNT'.PHP_EOL;
+            echo str_repeat('-', $width).PHP_EOL;
+        } else {
+            echo 'AUTHOR'.str_repeat(' ', ($width - 34)).'(Author %) (Overall %) COUNT'.PHP_EOL;
+            echo str_repeat('-', $width).PHP_EOL;
+        }
+
+        echo "\033[0m";
+
+        foreach ($this->_authorCache as $author => $count) {
+            if ($this->_praiseCache[$author]['good'] === 0) {
+                $percent = 0;
+            } else {
+                $total   = ($this->_praiseCache[$author]['bad'] + $this->_praiseCache[$author]['good']);
+                $percent = round(($this->_praiseCache[$author]['bad'] / $total * 100), 2);
+            }
+
+            $overallPercent = '('.round((($count / $errorsShown) * 100), 2).')';
+            $authorPercent  = '('.$percent.')';
+            $line           = str_repeat(' ', (6 - strlen($count))).$count;
+            $line           = str_repeat(' ', (12 - strlen($overallPercent))).$overallPercent.$line;
+            $line           = str_repeat(' ', (11 - strlen($authorPercent))).$authorPercent.$line;
+            $line           = $author.str_repeat(' ', ($width - strlen($author) - strlen($line))).$line;
+
+            if ($showSources === true) {
+                $line = "\033[1m$line\033[0m";
+            }
+
+            echo $line.PHP_EOL;
+
+            if ($showSources === true && isset($this->_sourceCache[$author]) === true) {
+                $errors = $this->_sourceCache[$author];
+                asort($errors);
+                $errors = array_reverse($errors);
+
+                foreach ($errors as $source => $count) {
+                    if ($source === 'count') {
+                        continue;
+                    }
+
+                    $line = str_repeat(' ', (5 - strlen($count))).$count;
+                    echo '         '.$source.str_repeat(' ', ($width - 14 - strlen($source))).$line.PHP_EOL;
+                }
+            }
+        }//end foreach
+
+        echo str_repeat('-', $width).PHP_EOL;
+        echo "\033[1m".'A TOTAL OF '.$errorsShown.' SNIFF VIOLATION';
+        if ($errorsShown !== 1) {
+            echo 'S';
+        }
+
+        echo ' WERE COMMITTED BY '.count($this->_authorCache).' AUTHOR';
+        if (count($this->_authorCache) !== 1) {
+            echo 'S';
+        }
+
+        echo "\033[0m";
+
+        if ($totalFixable > 0) {
+            echo PHP_EOL.str_repeat('-', $width).PHP_EOL;
+            echo "\033[1mPHPCBF CAN FIX $totalFixable OF THESE SNIFF VIOLATIONS AUTOMATICALLY\033[0m";
+        }
+
+        echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;
+
+        if ($toScreen === true && PHP_CODESNIFFER_INTERACTIVE === false) {
+            PHP_CodeSniffer_Reporting::printRunTime();
+        }
+
+    }//end generate()
+
+
+    /**
+     * Extract the author from a blame line.
+     *
+     * @param string $line Line to parse.
+     *
+     * @return mixed string or false if impossible to recover.
+     */
+    abstract protected function getAuthor($line);
+
+
+    /**
+     * Gets the blame output.
+     *
+     * @param string $filename File to blame.
+     *
+     * @return array
+     */
+    abstract protected function getBlameContent($filename);
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/Xml.php	(revision 5534)
@@ -0,0 +1,132 @@
+<?php
+/**
+ * Xml report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Xml report for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Gabriele Santini <gsantini@sqli.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2009-2014 SQLI <www.sqli.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Reports_Xml implements PHP_CodeSniffer_Report
+{
+
+
+    /**
+     * Generate a partial report for a single processed file.
+     *
+     * Function should return TRUE if it printed or stored data about the file
+     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
+     * its data should be counted in the grand totals.
+     *
+     * @param array                $report      Prepared report data.
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being reported on.
+     * @param boolean              $showSources Show sources?
+     * @param int                  $width       Maximum allowed line width.
+     *
+     * @return boolean
+     */
+    public function generateFileReport(
+        $report,
+        PHP_CodeSniffer_File $phpcsFile,
+        $showSources=false,
+        $width=80
+    ) {
+        $out = new XMLWriter;
+        $out->openMemory();
+        $out->setIndent(true);
+
+        if ($report['errors'] === 0 && $report['warnings'] === 0) {
+            // Nothing to print.
+            return false;
+        }
+
+        $out->startElement('file');
+        $out->writeAttribute('name', $report['filename']);
+        $out->writeAttribute('errors', $report['errors']);
+        $out->writeAttribute('warnings', $report['warnings']);
+        $out->writeAttribute('fixable', $report['fixable']);
+
+        foreach ($report['messages'] as $line => $lineErrors) {
+            foreach ($lineErrors as $column => $colErrors) {
+                foreach ($colErrors as $error) {
+                    $error['type'] = strtolower($error['type']);
+                    if (PHP_CODESNIFFER_ENCODING !== 'utf-8') {
+                        $error['message'] = iconv(PHP_CODESNIFFER_ENCODING, 'utf-8', $error['message']);
+                    }
+
+                    $out->startElement($error['type']);
+                    $out->writeAttribute('line', $line);
+                    $out->writeAttribute('column', $column);
+                    $out->writeAttribute('source', $error['source']);
+                    $out->writeAttribute('severity', $error['severity']);
+                    $out->writeAttribute('fixable', (int) $error['fixable']);
+                    $out->text($error['message']);
+                    $out->endElement();
+                }
+            }
+        }//end foreach
+
+        $out->endElement();
+        echo $out->flush();
+
+        return true;
+
+    }//end generateFileReport()
+
+
+    /**
+     * Prints all violations for processed files, in a proprietary XML format.
+     *
+     * @param string  $cachedData    Any partial report data that was returned from
+     *                               generateFileReport during the run.
+     * @param int     $totalFiles    Total number of files processed during the run.
+     * @param int     $totalErrors   Total number of errors found during the run.
+     * @param int     $totalWarnings Total number of warnings found during the run.
+     * @param int     $totalFixable  Total number of problems that can be fixed.
+     * @param boolean $showSources   Show sources?
+     * @param int     $width         Maximum allowed line width.
+     * @param boolean $toScreen      Is the report being printed to screen?
+     *
+     * @return void
+     */
+    public function generate(
+        $cachedData,
+        $totalFiles,
+        $totalErrors,
+        $totalWarnings,
+        $totalFixable,
+        $showSources=false,
+        $width=80,
+        $toScreen=true
+    ) {
+        echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
+        echo '<phpcs version="'.PHP_CodeSniffer::VERSION.'">'.PHP_EOL;
+        echo $cachedData;
+        echo '</phpcs>'.PHP_EOL;
+
+    }//end generate()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Sniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Sniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Sniff.php	(revision 5534)
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Represents a PHP_CodeSniffer sniff for sniffing coding standards.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Represents a PHP_CodeSniffer sniff for sniffing coding standards.
+ *
+ * A sniff registers what token types it wishes to listen for, then, when
+ * PHP_CodeSniffer encounters that token, the sniff is invoked and passed
+ * information about where the token was found in the stack, and the
+ * PHP_CodeSniffer file in which the token was found.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+interface PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * An example return value for a sniff that wants to listen for whitespace
+     * and any comments would be:
+     *
+     * <code>
+     *    return array(
+     *            T_WHITESPACE,
+     *            T_DOC_COMMENT,
+     *            T_COMMENT,
+     *           );
+     * </code>
+     *
+     * @return int[]
+     * @see    Tokens.php
+     */
+    public function register();
+
+
+    /**
+     * Called when one of the token types that this sniff is listening for
+     * is found.
+     *
+     * The stackPtr variable indicates where in the stack the token was found.
+     * A sniff can acquire information this token, along with all the other
+     * tokens within the stack by first acquiring the token stack:
+     *
+     * <code>
+     *    $tokens = $phpcsFile->getTokens();
+     *    echo 'Encountered a '.$tokens[$stackPtr]['type'].' token';
+     *    echo 'token information: ';
+     *    print_r($tokens[$stackPtr]);
+     * </code>
+     *
+     * If the sniff discovers an anomaly in the code, they can raise an error
+     * by calling addError() on the PHP_CodeSniffer_File object, specifying an error
+     * message and the position of the offending token:
+     *
+     * <code>
+     *    $phpcsFile->addError('Encountered an error', $stackPtr);
+     * </code>
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where the
+     *                                        token was found.
+     * @param int                  $stackPtr  The position in the PHP_CodeSniffer
+     *                                        file's token stack where the token
+     *                                        was found.
+     *
+     * @return void|int Optionally returns a stack pointer. The sniff will not be
+     *                  called again on the current file until the returned stack
+     *                  pointer is reached. Return (count($tokens) + 1) to skip
+     *                  the rest of the file.
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr);
+
+
+}//end interface
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractPatternSniff.php	(revision 5534)
@@ -0,0 +1,962 @@
+<?php
+/**
+ * Processes pattern strings and checks that the code conforms to the pattern.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_IncorrectPatternException', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_IncorrectPatternException not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Processes pattern strings and checks that the code conforms to the pattern.
+ *
+ * This test essentially checks that code is correctly formatted with whitespace.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+abstract class PHP_CodeSniffer_Standards_AbstractPatternSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * If true, comments will be ignored if they are found in the code.
+     *
+     * @var boolean
+     */
+    public $ignoreComments = false;
+
+    /**
+     * The current file being checked.
+     *
+     * @var string
+     */
+    protected $currFile = '';
+
+    /**
+     * The parsed patterns array.
+     *
+     * @var array
+     */
+    private $_parsedPatterns = array();
+
+    /**
+     * Tokens that this sniff wishes to process outside of the patterns.
+     *
+     * @var array(int)
+     * @see registerSupplementary()
+     * @see processSupplementary()
+     */
+    private $_supplementaryTokens = array();
+
+    /**
+     * Positions in the stack where errors have occurred.
+     *
+     * @var array()
+     */
+    private $_errorPos = array();
+
+
+    /**
+     * Constructs a PHP_CodeSniffer_Standards_AbstractPatternSniff.
+     *
+     * @param boolean $ignoreComments If true, comments will be ignored.
+     */
+    public function __construct($ignoreComments=null)
+    {
+        // This is here for backwards compatibility.
+        if ($ignoreComments !== null) {
+            $this->ignoreComments = $ignoreComments;
+        }
+
+        $this->_supplementaryTokens = $this->registerSupplementary();
+
+    }//end __construct()
+
+
+    /**
+     * Registers the tokens to listen to.
+     *
+     * Classes extending <i>AbstractPatternTest</i> should implement the
+     * <i>getPatterns()</i> method to register the patterns they wish to test.
+     *
+     * @return int[]
+     * @see    process()
+     */
+    public final function register()
+    {
+        $listenTypes = array();
+        $patterns    = $this->getPatterns();
+
+        foreach ($patterns as $pattern) {
+            $parsedPattern = $this->_parse($pattern);
+
+            // Find a token position in the pattern that we can use
+            // for a listener token.
+            $pos           = $this->_getListenerTokenPos($parsedPattern);
+            $tokenType     = $parsedPattern[$pos]['token'];
+            $listenTypes[] = $tokenType;
+
+            $patternArray = array(
+                             'listen_pos'   => $pos,
+                             'pattern'      => $parsedPattern,
+                             'pattern_code' => $pattern,
+                            );
+
+            if (isset($this->_parsedPatterns[$tokenType]) === false) {
+                $this->_parsedPatterns[$tokenType] = array();
+            }
+
+            $this->_parsedPatterns[$tokenType][] = $patternArray;
+        }//end foreach
+
+        return array_unique(array_merge($listenTypes, $this->_supplementaryTokens));
+
+    }//end register()
+
+
+    /**
+     * Returns the token types that the specified pattern is checking for.
+     *
+     * Returned array is in the format:
+     * <code>
+     *   array(
+     *      T_WHITESPACE => 0, // 0 is the position where the T_WHITESPACE token
+     *                         // should occur in the pattern.
+     *   );
+     * </code>
+     *
+     * @param array $pattern The parsed pattern to find the acquire the token
+     *                       types from.
+     *
+     * @return array<int, int>
+     */
+    private function _getPatternTokenTypes($pattern)
+    {
+        $tokenTypes = array();
+        foreach ($pattern as $pos => $patternInfo) {
+            if ($patternInfo['type'] === 'token') {
+                if (isset($tokenTypes[$patternInfo['token']]) === false) {
+                    $tokenTypes[$patternInfo['token']] = $pos;
+                }
+            }
+        }
+
+        return $tokenTypes;
+
+    }//end _getPatternTokenTypes()
+
+
+    /**
+     * Returns the position in the pattern that this test should register as
+     * a listener for the pattern.
+     *
+     * @param array $pattern The pattern to acquire the listener for.
+     *
+     * @return int The position in the pattern that this test should register
+     *             as the listener.
+     * @throws PHP_CodeSniffer_Exception If we could not determine a token
+     *                                         to listen for.
+     */
+    private function _getListenerTokenPos($pattern)
+    {
+        $tokenTypes = $this->_getPatternTokenTypes($pattern);
+        $tokenCodes = array_keys($tokenTypes);
+        $token      = PHP_CodeSniffer_Tokens::getHighestWeightedToken($tokenCodes);
+
+        // If we could not get a token.
+        if ($token === false) {
+            $error = 'Could not determine a token to listen for';
+            throw new PHP_CodeSniffer_Exception($error);
+        }
+
+        return $tokenTypes[$token];
+
+    }//end _getListenerTokenPos()
+
+
+    /**
+     * Processes the test.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where the
+     *                                        token occurred.
+     * @param int                  $stackPtr  The position in the tokens stack
+     *                                        where the listening token type was
+     *                                        found.
+     *
+     * @return void
+     * @see    register()
+     */
+    public final function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $file = $phpcsFile->getFilename();
+        if ($this->currFile !== $file) {
+            // We have changed files, so clean up.
+            $this->_errorPos = array();
+            $this->currFile  = $file;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        if (in_array($tokens[$stackPtr]['code'], $this->_supplementaryTokens) === true) {
+            $this->processSupplementary($phpcsFile, $stackPtr);
+        }
+
+        $type = $tokens[$stackPtr]['code'];
+
+        // If the type is not set, then it must have been a token registered
+        // with registerSupplementary().
+        if (isset($this->_parsedPatterns[$type]) === false) {
+            return;
+        }
+
+        $allErrors = array();
+
+        // Loop over each pattern that is listening to the current token type
+        // that we are processing.
+        foreach ($this->_parsedPatterns[$type] as $patternInfo) {
+            // If processPattern returns false, then the pattern that we are
+            // checking the code with must not be designed to check that code.
+            $errors = $this->processPattern($patternInfo, $phpcsFile, $stackPtr);
+            if ($errors === false) {
+                // The pattern didn't match.
+                continue;
+            } else if (empty($errors) === true) {
+                // The pattern matched, but there were no errors.
+                break;
+            }
+
+            foreach ($errors as $stackPtr => $error) {
+                if (isset($this->_errorPos[$stackPtr]) === false) {
+                    $this->_errorPos[$stackPtr] = true;
+                    $allErrors[$stackPtr]       = $error;
+                }
+            }
+        }
+
+        foreach ($allErrors as $stackPtr => $error) {
+            $phpcsFile->addError($error, $stackPtr);
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes the pattern and verifies the code at $stackPtr.
+     *
+     * @param array                $patternInfo Information about the pattern used
+     *                                          for checking, which includes are
+     *                                          parsed token representation of the
+     *                                          pattern.
+     * @param PHP_CodeSniffer_File $phpcsFile   The PHP_CodeSniffer file where the
+     *                                          token occurred.
+     * @param int                  $stackPtr    The position in the tokens stack where
+     *                                          the listening token type was found.
+     *
+     * @return array
+     */
+    protected function processPattern(
+        $patternInfo,
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr
+    ) {
+        $tokens      = $phpcsFile->getTokens();
+        $pattern     = $patternInfo['pattern'];
+        $patternCode = $patternInfo['pattern_code'];
+        $errors      = array();
+        $found       = '';
+
+        $ignoreTokens = array(T_WHITESPACE);
+        if ($this->ignoreComments === true) {
+            $ignoreTokens
+                = array_merge($ignoreTokens, PHP_CodeSniffer_Tokens::$commentTokens);
+        }
+
+        $origStackPtr = $stackPtr;
+        $hasError     = false;
+
+        if ($patternInfo['listen_pos'] > 0) {
+            $stackPtr--;
+
+            for ($i = ($patternInfo['listen_pos'] - 1); $i >= 0; $i--) {
+                if ($pattern[$i]['type'] === 'token') {
+                    if ($pattern[$i]['token'] === T_WHITESPACE) {
+                        if ($tokens[$stackPtr]['code'] === T_WHITESPACE) {
+                            $found = $tokens[$stackPtr]['content'].$found;
+                        }
+
+                        // Only check the size of the whitespace if this is not
+                        // the first token. We don't care about the size of
+                        // leading whitespace, just that there is some.
+                        if ($i !== 0) {
+                            if ($tokens[$stackPtr]['content'] !== $pattern[$i]['value']) {
+                                $hasError = true;
+                            }
+                        }
+                    } else {
+                        // Check to see if this important token is the same as the
+                        // previous important token in the pattern. If it is not,
+                        // then the pattern cannot be for this piece of code.
+                        $prev = $phpcsFile->findPrevious(
+                            $ignoreTokens,
+                            $stackPtr,
+                            null,
+                            true
+                        );
+
+                        if ($prev === false
+                            || $tokens[$prev]['code'] !== $pattern[$i]['token']
+                        ) {
+                            return false;
+                        }
+
+                        // If we skipped past some whitespace tokens, then add them
+                        // to the found string.
+                        $tokenContent = $phpcsFile->getTokensAsString(
+                            ($prev + 1),
+                            ($stackPtr - $prev - 1)
+                        );
+
+                        $found = $tokens[$prev]['content'].$tokenContent.$found;
+
+                        if (isset($pattern[($i - 1)]) === true
+                            && $pattern[($i - 1)]['type'] === 'skip'
+                        ) {
+                            $stackPtr = $prev;
+                        } else {
+                            $stackPtr = ($prev - 1);
+                        }
+                    }//end if
+                } else if ($pattern[$i]['type'] === 'skip') {
+                    // Skip to next piece of relevant code.
+                    if ($pattern[$i]['to'] === 'parenthesis_closer') {
+                        $to = 'parenthesis_opener';
+                    } else {
+                        $to = 'scope_opener';
+                    }
+
+                    // Find the previous opener.
+                    $next = $phpcsFile->findPrevious(
+                        $ignoreTokens,
+                        $stackPtr,
+                        null,
+                        true
+                    );
+
+                    if ($next === false || isset($tokens[$next][$to]) === false) {
+                        // If there was not opener, then we must be
+                        // using the wrong pattern.
+                        return false;
+                    }
+
+                    if ($to === 'parenthesis_opener') {
+                        $found = '{'.$found;
+                    } else {
+                        $found = '('.$found;
+                    }
+
+                    $found = '...'.$found;
+
+                    // Skip to the opening token.
+                    $stackPtr = ($tokens[$next][$to] - 1);
+                } else if ($pattern[$i]['type'] === 'string') {
+                    $found = 'abc';
+                } else if ($pattern[$i]['type'] === 'newline') {
+                    if ($this->ignoreComments === true
+                        && isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true
+                    ) {
+                        $startComment = $phpcsFile->findPrevious(
+                            PHP_CodeSniffer_Tokens::$commentTokens,
+                            ($stackPtr - 1),
+                            null,
+                            true
+                        );
+
+                        if ($tokens[$startComment]['line'] !== $tokens[($startComment + 1)]['line']) {
+                            $startComment++;
+                        }
+
+                        $tokenContent = $phpcsFile->getTokensAsString(
+                            $startComment,
+                            ($stackPtr - $startComment + 1)
+                        );
+
+                        $found    = $tokenContent.$found;
+                        $stackPtr = ($startComment - 1);
+                    }
+
+                    if ($tokens[$stackPtr]['code'] === T_WHITESPACE) {
+                        if ($tokens[$stackPtr]['content'] !== $phpcsFile->eolChar) {
+                            $found = $tokens[$stackPtr]['content'].$found;
+
+                            // This may just be an indent that comes after a newline
+                            // so check the token before to make sure. If it is a newline, we
+                            // can ignore the error here.
+                            if (($tokens[($stackPtr - 1)]['content'] !== $phpcsFile->eolChar)
+                                && ($this->ignoreComments === true
+                                && isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[($stackPtr - 1)]['code']]) === false)
+                            ) {
+                                $hasError = true;
+                            } else {
+                                $stackPtr--;
+                            }
+                        } else {
+                            $found = 'EOL'.$found;
+                        }
+                    } else {
+                        $found    = $tokens[$stackPtr]['content'].$found;
+                        $hasError = true;
+                    }//end if
+
+                    if ($hasError === false && $pattern[($i - 1)]['type'] !== 'newline') {
+                        // Make sure they only have 1 newline.
+                        $prev = $phpcsFile->findPrevious($ignoreTokens, ($stackPtr - 1), null, true);
+                        if ($prev !== false && $tokens[$prev]['line'] !== $tokens[$stackPtr]['line']) {
+                            $hasError = true;
+                        }
+                    }
+                }//end if
+            }//end for
+        }//end if
+
+        $stackPtr          = $origStackPtr;
+        $lastAddedStackPtr = null;
+        $patternLen        = count($pattern);
+
+        for ($i = $patternInfo['listen_pos']; $i < $patternLen; $i++) {
+            if (isset($tokens[$stackPtr]) === false) {
+                break;
+            }
+
+            if ($pattern[$i]['type'] === 'token') {
+                if ($pattern[$i]['token'] === T_WHITESPACE) {
+                    if ($this->ignoreComments === true) {
+                        // If we are ignoring comments, check to see if this current
+                        // token is a comment. If so skip it.
+                        if (isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true) {
+                            continue;
+                        }
+
+                        // If the next token is a comment, the we need to skip the
+                        // current token as we should allow a space before a
+                        // comment for readability.
+                        if (isset($tokens[($stackPtr + 1)]) === true
+                            && isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[($stackPtr + 1)]['code']]) === true
+                        ) {
+                            continue;
+                        }
+                    }
+
+                    $tokenContent = '';
+                    if ($tokens[$stackPtr]['code'] === T_WHITESPACE) {
+                        if (isset($pattern[($i + 1)]) === false) {
+                            // This is the last token in the pattern, so just compare
+                            // the next token of content.
+                            $tokenContent = $tokens[$stackPtr]['content'];
+                        } else {
+                            // Get all the whitespace to the next token.
+                            $next = $phpcsFile->findNext(
+                                PHP_CodeSniffer_Tokens::$emptyTokens,
+                                $stackPtr,
+                                null,
+                                true
+                            );
+
+                            $tokenContent = $phpcsFile->getTokensAsString(
+                                $stackPtr,
+                                ($next - $stackPtr)
+                            );
+
+                            $lastAddedStackPtr = $stackPtr;
+                            $stackPtr          = $next;
+                        }//end if
+
+                        if ($stackPtr !== $lastAddedStackPtr) {
+                            $found .= $tokenContent;
+                        }
+                    } else {
+                        if ($stackPtr !== $lastAddedStackPtr) {
+                            $found            .= $tokens[$stackPtr]['content'];
+                            $lastAddedStackPtr = $stackPtr;
+                        }
+                    }//end if
+
+                    if (isset($pattern[($i + 1)]) === true
+                        && $pattern[($i + 1)]['type'] === 'skip'
+                    ) {
+                        // The next token is a skip token, so we just need to make
+                        // sure the whitespace we found has *at least* the
+                        // whitespace required.
+                        if (strpos($tokenContent, $pattern[$i]['value']) !== 0) {
+                            $hasError = true;
+                        }
+                    } else {
+                        if ($tokenContent !== $pattern[$i]['value']) {
+                            $hasError = true;
+                        }
+                    }
+                } else {
+                    // Check to see if this important token is the same as the
+                    // next important token in the pattern. If it is not, then
+                    // the pattern cannot be for this piece of code.
+                    $next = $phpcsFile->findNext(
+                        $ignoreTokens,
+                        $stackPtr,
+                        null,
+                        true
+                    );
+
+                    if ($next === false
+                        || $tokens[$next]['code'] !== $pattern[$i]['token']
+                    ) {
+                        // The next important token did not match the pattern.
+                        return false;
+                    }
+
+                    if ($lastAddedStackPtr !== null) {
+                        if (($tokens[$next]['code'] === T_OPEN_CURLY_BRACKET
+                            || $tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET)
+                            && isset($tokens[$next]['scope_condition']) === true
+                            && $tokens[$next]['scope_condition'] > $lastAddedStackPtr
+                        ) {
+                            // This is a brace, but the owner of it is after the current
+                            // token, which means it does not belong to any token in
+                            // our pattern. This means the pattern is not for us.
+                            return false;
+                        }
+
+                        if (($tokens[$next]['code'] === T_OPEN_PARENTHESIS
+                            || $tokens[$next]['code'] === T_CLOSE_PARENTHESIS)
+                            && isset($tokens[$next]['parenthesis_owner']) === true
+                            && $tokens[$next]['parenthesis_owner'] > $lastAddedStackPtr
+                        ) {
+                            // This is a bracket, but the owner of it is after the current
+                            // token, which means it does not belong to any token in
+                            // our pattern. This means the pattern is not for us.
+                            return false;
+                        }
+                    }//end if
+
+                    // If we skipped past some whitespace tokens, then add them
+                    // to the found string.
+                    if (($next - $stackPtr) > 0) {
+                        $hasComment = false;
+                        for ($j = $stackPtr; $j < $next; $j++) {
+                            $found .= $tokens[$j]['content'];
+                            if (isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$j]['code']]) === true) {
+                                $hasComment = true;
+                            }
+                        }
+
+                        // If we are not ignoring comments, this additional
+                        // whitespace or comment is not allowed. If we are
+                        // ignoring comments, there needs to be at least one
+                        // comment for this to be allowed.
+                        if ($this->ignoreComments === false
+                            || ($this->ignoreComments === true
+                            && $hasComment === false)
+                        ) {
+                            $hasError = true;
+                        }
+
+                        // Even when ignoring comments, we are not allowed to include
+                        // newlines without the pattern specifying them, so
+                        // everything should be on the same line.
+                        if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
+                            $hasError = true;
+                        }
+                    }//end if
+
+                    if ($next !== $lastAddedStackPtr) {
+                        $found            .= $tokens[$next]['content'];
+                        $lastAddedStackPtr = $next;
+                    }
+
+                    if (isset($pattern[($i + 1)]) === true
+                        && $pattern[($i + 1)]['type'] === 'skip'
+                    ) {
+                        $stackPtr = $next;
+                    } else {
+                        $stackPtr = ($next + 1);
+                    }
+                }//end if
+            } else if ($pattern[$i]['type'] === 'skip') {
+                if ($pattern[$i]['to'] === 'unknown') {
+                    $next = $phpcsFile->findNext(
+                        $pattern[($i + 1)]['token'],
+                        $stackPtr
+                    );
+
+                    if ($next === false) {
+                        // Couldn't find the next token, so we must
+                        // be using the wrong pattern.
+                        return false;
+                    }
+
+                    $found   .= '...';
+                    $stackPtr = $next;
+                } else {
+                    // Find the previous opener.
+                    $next = $phpcsFile->findPrevious(
+                        PHP_CodeSniffer_Tokens::$blockOpeners,
+                        $stackPtr
+                    );
+
+                    if ($next === false
+                        || isset($tokens[$next][$pattern[$i]['to']]) === false
+                    ) {
+                        // If there was not opener, then we must
+                        // be using the wrong pattern.
+                        return false;
+                    }
+
+                    $found .= '...';
+                    if ($pattern[$i]['to'] === 'parenthesis_closer') {
+                        $found .= ')';
+                    } else {
+                        $found .= '}';
+                    }
+
+                    // Skip to the closing token.
+                    $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1);
+                }//end if
+            } else if ($pattern[$i]['type'] === 'string') {
+                if ($tokens[$stackPtr]['code'] !== T_STRING) {
+                    $hasError = true;
+                }
+
+                if ($stackPtr !== $lastAddedStackPtr) {
+                    $found            .= 'abc';
+                    $lastAddedStackPtr = $stackPtr;
+                }
+
+                $stackPtr++;
+            } else if ($pattern[$i]['type'] === 'newline') {
+                // Find the next token that contains a newline character.
+                $newline = 0;
+                for ($j = $stackPtr; $j < $phpcsFile->numTokens; $j++) {
+                    if (strpos($tokens[$j]['content'], $phpcsFile->eolChar) !== false) {
+                        $newline = $j;
+                        break;
+                    }
+                }
+
+                if ($newline === 0) {
+                    // We didn't find a newline character in the rest of the file.
+                    $next     = ($phpcsFile->numTokens - 1);
+                    $hasError = true;
+                } else {
+                    if ($this->ignoreComments === false) {
+                        // The newline character cannot be part of a comment.
+                        if (isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$newline]['code']]) === true) {
+                            $hasError = true;
+                        }
+                    }
+
+                    if ($newline === $stackPtr) {
+                        $next = ($stackPtr + 1);
+                    } else {
+                        // Check that there were no significant tokens that we
+                        // skipped over to find our newline character.
+                        $next = $phpcsFile->findNext(
+                            $ignoreTokens,
+                            $stackPtr,
+                            null,
+                            true
+                        );
+
+                        if ($next < $newline) {
+                            // We skipped a non-ignored token.
+                            $hasError = true;
+                        } else {
+                            $next = ($newline + 1);
+                        }
+                    }
+                }//end if
+
+                if ($stackPtr !== $lastAddedStackPtr) {
+                    $found .= $phpcsFile->getTokensAsString(
+                        $stackPtr,
+                        ($next - $stackPtr)
+                    );
+
+                    $diff = ($next - $stackPtr);
+                    $lastAddedStackPtr = ($next - 1);
+                }
+
+                $stackPtr = $next;
+            }//end if
+        }//end for
+
+        if ($hasError === true) {
+            $error = $this->prepareError($found, $patternCode);
+            $errors[$origStackPtr] = $error;
+        }
+
+        return $errors;
+
+    }//end processPattern()
+
+
+    /**
+     * Prepares an error for the specified patternCode.
+     *
+     * @param string $found       The actual found string in the code.
+     * @param string $patternCode The expected pattern code.
+     *
+     * @return string The error message.
+     */
+    protected function prepareError($found, $patternCode)
+    {
+        $found    = str_replace("\r\n", '\n', $found);
+        $found    = str_replace("\n", '\n', $found);
+        $found    = str_replace("\r", '\n', $found);
+        $found    = str_replace("\t", '\t', $found);
+        $found    = str_replace('EOL', '\n', $found);
+        $expected = str_replace('EOL', '\n', $patternCode);
+
+        $error = "Expected \"$expected\"; found \"$found\"";
+
+        return $error;
+
+    }//end prepareError()
+
+
+    /**
+     * Returns the patterns that should be checked.
+     *
+     * @return string[]
+     */
+    protected abstract function getPatterns();
+
+
+    /**
+     * Registers any supplementary tokens that this test might wish to process.
+     *
+     * A sniff may wish to register supplementary tests when it wishes to group
+     * an arbitrary validation that cannot be performed using a pattern, with
+     * other pattern tests.
+     *
+     * @return int[]
+     * @see    processSupplementary()
+     */
+    protected function registerSupplementary()
+    {
+        return array();
+
+    }//end registerSupplementary()
+
+
+     /**
+      * Processes any tokens registered with registerSupplementary().
+      *
+      * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where to
+      *                                        process the skip.
+      * @param int                  $stackPtr  The position in the tokens stack to
+      *                                        process.
+      *
+      * @return void
+      * @see    registerSupplementary()
+      */
+    protected function processSupplementary(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr
+    ) {
+
+    }//end processSupplementary()
+
+
+    /**
+     * Parses a pattern string into an array of pattern steps.
+     *
+     * @param string $pattern The pattern to parse.
+     *
+     * @return array The parsed pattern array.
+     * @see    _createSkipPattern()
+     * @see    _createTokenPattern()
+     */
+    private function _parse($pattern)
+    {
+        $patterns   = array();
+        $length     = strlen($pattern);
+        $lastToken  = 0;
+        $firstToken = 0;
+
+        for ($i = 0; $i < $length; $i++) {
+            $specialPattern = false;
+            $isLastChar     = ($i === ($length - 1));
+            $oldFirstToken  = $firstToken;
+
+            if (substr($pattern, $i, 3) === '...') {
+                // It's a skip pattern. The skip pattern requires the
+                // content of the token in the "from" position and the token
+                // to skip to.
+                $specialPattern = $this->_createSkipPattern($pattern, ($i - 1));
+                $lastToken      = ($i - $firstToken);
+                $firstToken     = ($i + 3);
+                $i = ($i + 2);
+
+                if ($specialPattern['to'] !== 'unknown') {
+                    $firstToken++;
+                }
+            } else if (substr($pattern, $i, 3) === 'abc') {
+                $specialPattern = array('type' => 'string');
+                $lastToken      = ($i - $firstToken);
+                $firstToken     = ($i + 3);
+                $i = ($i + 2);
+            } else if (substr($pattern, $i, 3) === 'EOL') {
+                $specialPattern = array('type' => 'newline');
+                $lastToken      = ($i - $firstToken);
+                $firstToken     = ($i + 3);
+                $i = ($i + 2);
+            }//end if
+
+            if ($specialPattern !== false || $isLastChar === true) {
+                // If we are at the end of the string, don't worry about a limit.
+                if ($isLastChar === true) {
+                    // Get the string from the end of the last skip pattern, if any,
+                    // to the end of the pattern string.
+                    $str = substr($pattern, $oldFirstToken);
+                } else {
+                    // Get the string from the end of the last special pattern,
+                    // if any, to the start of this special pattern.
+                    if ($lastToken === 0) {
+                        // Note that if the last special token was zero characters ago,
+                        // there will be nothing to process so we can skip this bit.
+                        // This happens if you have something like: EOL... in your pattern.
+                        $str = '';
+                    } else {
+                        $str = substr($pattern, $oldFirstToken, $lastToken);
+                    }
+                }
+
+                if ($str !== '') {
+                    $tokenPatterns = $this->_createTokenPattern($str);
+                    foreach ($tokenPatterns as $tokenPattern) {
+                        $patterns[] = $tokenPattern;
+                    }
+                }
+
+                // Make sure we don't skip the last token.
+                if ($isLastChar === false && $i === ($length - 1)) {
+                    $i--;
+                }
+            }//end if
+
+            // Add the skip pattern *after* we have processed
+            // all the tokens from the end of the last skip pattern
+            // to the start of this skip pattern.
+            if ($specialPattern !== false) {
+                $patterns[] = $specialPattern;
+            }
+        }//end for
+
+        return $patterns;
+
+    }//end _parse()
+
+
+    /**
+     * Creates a skip pattern.
+     *
+     * @param string $pattern The pattern being parsed.
+     * @param string $from    The token content that the skip pattern starts from.
+     *
+     * @return array The pattern step.
+     * @see    _createTokenPattern()
+     * @see    _parse()
+     */
+    private function _createSkipPattern($pattern, $from)
+    {
+        $skip = array('type' => 'skip');
+
+        $nestedParenthesis = 0;
+        $nestedBraces      = 0;
+        for ($start = $from; $start >= 0; $start--) {
+            switch ($pattern[$start]) {
+            case '(':
+                if ($nestedParenthesis === 0) {
+                    $skip['to'] = 'parenthesis_closer';
+                }
+
+                $nestedParenthesis--;
+                break;
+            case '{':
+                if ($nestedBraces === 0) {
+                    $skip['to'] = 'scope_closer';
+                }
+
+                $nestedBraces--;
+                break;
+            case '}':
+                $nestedBraces++;
+                break;
+            case ')':
+                $nestedParenthesis++;
+                break;
+            }//end switch
+
+            if (isset($skip['to']) === true) {
+                break;
+            }
+        }//end for
+
+        if (isset($skip['to']) === false) {
+            $skip['to'] = 'unknown';
+        }
+
+        return $skip;
+
+    }//end _createSkipPattern()
+
+
+    /**
+     * Creates a token pattern.
+     *
+     * @param string $str The tokens string that the pattern should match.
+     *
+     * @return array The pattern step.
+     * @see    _createSkipPattern()
+     * @see    _parse()
+     */
+    private function _createTokenPattern($str)
+    {
+        // Don't add a space after the closing php tag as it will add a new
+        // whitespace token.
+        $tokenizer = new PHP_CodeSniffer_Tokenizers_PHP();
+        $tokens    = $tokenizer->tokenizeString('<?php '.$str.'?>');
+
+        // Remove the <?php tag from the front and the end php tag from the back.
+        $tokens = array_slice($tokens, 1, (count($tokens) - 2));
+
+        $patterns = array();
+        foreach ($tokens as $patternInfo) {
+            $patterns[] = array(
+                           'type'  => 'token',
+                           'token' => $patternInfo['code'],
+                           'value' => $patternInfo['content'],
+                          );
+        }
+
+        return $patterns;
+
+    }//end _createTokenPattern()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractScopeSniff.php	(revision 5534)
@@ -0,0 +1,199 @@
+<?php
+/**
+ * An AbstractScopeTest allows for tests that extend from this class to
+ * listen for tokens within a particular scope.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * An AbstractScopeTest allows for tests that extend from this class to
+ * listen for tokens within a particular scope.
+ *
+ * Below is a test that listens to methods that exist only within classes:
+ * <code>
+ * class ClassScopeTest extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+ * {
+ *     public function __construct()
+ *     {
+ *         parent::__construct(array(T_CLASS), array(T_FUNCTION));
+ *     }
+ *
+ *     protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $)
+ *     {
+ *         $className = $phpcsFile->getDeclarationName($currScope);
+ *         echo 'encountered a method within class '.$className;
+ *     }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+abstract class PHP_CodeSniffer_Standards_AbstractScopeSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The token types that this test wishes to listen to within the scope.
+     *
+     * @var array
+     */
+    private $_tokens = array();
+
+    /**
+     * The type of scope opener tokens that this test wishes to listen to.
+     *
+     * @var string
+     */
+    private $_scopeTokens = array();
+
+    /**
+     * True if this test should fire on tokens outside of the scope.
+     *
+     * @var boolean
+     */
+    private $_listenOutside = false;
+
+
+    /**
+     * Constructs a new AbstractScopeTest.
+     *
+     * @param array   $scopeTokens   The type of scope the test wishes to listen to.
+     * @param array   $tokens        The tokens that the test wishes to listen to
+     *                               within the scope.
+     * @param boolean $listenOutside If true this test will also alert the
+     *                               extending class when a token is found outside
+     *                               the scope, by calling the
+     *                               processTokenOutsideScope method.
+     *
+     * @see    PHP_CodeSniffer.getValidScopeTokeners()
+     * @throws PHP_CodeSniffer_Exception If the specified tokens array is empty.
+     */
+    public function __construct(
+        array $scopeTokens,
+        array $tokens,
+        $listenOutside=false
+    ) {
+        if (empty($scopeTokens) === true) {
+            $error = 'The scope tokens list cannot be empty';
+            throw new PHP_CodeSniffer_Exception($error);
+        }
+
+        if (empty($tokens) === true) {
+            $error = 'The tokens list cannot be empty';
+            throw new PHP_CodeSniffer_Exception($error);
+        }
+
+        $invalidScopeTokens = array_intersect($scopeTokens, $tokens);
+        if (empty($invalidScopeTokens) === false) {
+            $invalid = implode(', ', $invalidScopeTokens);
+            $error   = "Scope tokens [$invalid] cant be in the tokens array";
+            throw new PHP_CodeSniffer_Exception($error);
+        }
+
+        $this->_listenOutside = $listenOutside;
+        $this->_scopeTokens   = array_flip($scopeTokens);
+        $this->_tokens        = $tokens;
+
+    }//end __construct()
+
+
+    /**
+     * The method that is called to register the tokens this test wishes to
+     * listen to.
+     *
+     * DO NOT OVERRIDE THIS METHOD. Use the constructor of this class to register
+     * for the desired tokens and scope.
+     *
+     * @return int[]
+     * @see    __constructor()
+     */
+    public final function register()
+    {
+        return $this->_tokens;
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this test is listening for.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position in the stack where this
+     *                                        token was found.
+     *
+     * @return void
+     * @see    processTokenWithinScope()
+     */
+    public final function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $foundScope = false;
+        foreach ($tokens[$stackPtr]['conditions'] as $scope => $code) {
+            if (isset($this->_scopeTokens[$code]) === true) {
+                $this->processTokenWithinScope($phpcsFile, $stackPtr, $scope);
+                $foundScope = true;
+            }
+        }
+
+        if ($this->_listenOutside === true && $foundScope === false) {
+            $this->processTokenOutsideScope($phpcsFile, $stackPtr);
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes a token that is found within the scope that this test is
+     * listening to.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position in the stack where this
+     *                                        token was found.
+     * @param int                  $currScope The position in the tokens array that
+     *                                        opened the scope that this test is
+     *                                        listening for.
+     *
+     * @return void
+     */
+    protected abstract function processTokenWithinScope(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr,
+        $currScope
+    );
+
+
+    /**
+     * Processes a token that is found within the scope that this test is
+     * listening to.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position in the stack where this
+     *                                        token was found.
+     *
+     * @return void
+     */
+    protected function processTokenOutsideScope(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr
+    ) {
+
+    }//end processTokenOutsideScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/AbstractVariableSniff.php	(revision 5534)
@@ -0,0 +1,244 @@
+<?php
+/**
+ * A class to find T_VARIABLE tokens.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * A class to find T_VARIABLE tokens.
+ *
+ * This class can distinguish between normal T_VARIABLE tokens, and those tokens
+ * that represent class members. If a class member is encountered, then then
+ * processMemberVar method is called so the extending class can process it. If
+ * the token is found to be a normal T_VARIABLE token, then processVariable is
+ * called.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+abstract class PHP_CodeSniffer_Standards_AbstractVariableSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+    /**
+     * The end token of the current function that we are in.
+     *
+     * @var int
+     */
+    private $_endFunction = -1;
+
+    /**
+     * TRUE if a function is currently open.
+     *
+     * @var boolean
+     */
+    private $_functionOpen = false;
+
+    /**
+     * The current PHP_CodeSniffer file that we are processing.
+     *
+     * @var PHP_CodeSniffer_File
+     */
+    protected $currentFile = null;
+
+
+    /**
+     * Constructs an AbstractVariableTest.
+     */
+    public function __construct()
+    {
+        $scopes = array(
+                   T_CLASS,
+                   T_TRAIT,
+                   T_INTERFACE,
+                  );
+
+        $listen = array(
+                   T_FUNCTION,
+                   T_VARIABLE,
+                   T_DOUBLE_QUOTED_STRING,
+                   T_HEREDOC,
+                  );
+
+        parent::__construct($scopes, $listen, true);
+
+    }//end __construct()
+
+
+    /**
+     * Processes the token in the specified PHP_CodeSniffer_File.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
+     *                                        token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     * @param array                $currScope The current scope opener token.
+     *
+     * @return void
+     */
+    protected final function processTokenWithinScope(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr,
+        $currScope
+    ) {
+        if ($this->currentFile !== $phpcsFile) {
+            $this->currentFile   = $phpcsFile;
+            $this->_functionOpen = false;
+            $this->_endFunction  = -1;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        if ($stackPtr > $this->_endFunction) {
+            $this->_functionOpen = false;
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_FUNCTION
+            && $this->_functionOpen === false
+        ) {
+            $this->_functionOpen = true;
+
+            $methodProps = $phpcsFile->getMethodProperties($stackPtr);
+
+            // If the function is abstract, or is in an interface,
+            // then set the end of the function to it's closing semicolon.
+            if ($methodProps['is_abstract'] === true
+                || $tokens[$currScope]['code'] === T_INTERFACE
+            ) {
+                $this->_endFunction
+                    = $phpcsFile->findNext(array(T_SEMICOLON), $stackPtr);
+            } else {
+                if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+                    $error = 'Possible parse error: non-abstract method defined as abstract';
+                    $phpcsFile->addWarning($error, $stackPtr);
+                    return;
+                }
+
+                $this->_endFunction = $tokens[$stackPtr]['scope_closer'];
+            }
+        }//end if
+
+        if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
+            || $tokens[$stackPtr]['code'] === T_HEREDOC
+        ) {
+            // Check to see if this string has a variable in it.
+            $pattern = '|(?<!\\\\)(?:\\\\{2})*\${?[a-zA-Z0-9_]+}?|';
+            if (preg_match($pattern, $tokens[$stackPtr]['content']) !== 0) {
+                $this->processVariableInString($phpcsFile, $stackPtr);
+            }
+
+            return;
+        }
+
+        if ($this->_functionOpen === true) {
+            if ($tokens[$stackPtr]['code'] === T_VARIABLE) {
+                $this->processVariable($phpcsFile, $stackPtr);
+            }
+        } else {
+            // What if we assign a member variable to another?
+            // ie. private $_count = $this->_otherCount + 1;.
+            $this->processMemberVar($phpcsFile, $stackPtr);
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Processes the token outside the scope in the file.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
+     *                                        token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected final function processTokenOutsideScope(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr
+    ) {
+        $tokens = $phpcsFile->getTokens();
+        // These variables are not member vars.
+        if ($tokens[$stackPtr]['code'] === T_VARIABLE) {
+            $this->processVariable($phpcsFile, $stackPtr);
+        } else if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
+            || $tokens[$stackPtr]['code'] === T_HEREDOC
+        ) {
+            // Check to see if this string has a variable in it.
+            $pattern = '|(?<!\\\\)(?:\\\\{2})*\${?[a-zA-Z0-9_]+}?|';
+            if (preg_match($pattern, $tokens[$stackPtr]['content']) !== 0) {
+                $this->processVariableInString($phpcsFile, $stackPtr);
+            }
+        }
+
+    }//end processTokenOutsideScope()
+
+
+    /**
+     * Called to process class member vars.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
+     *                                        token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    abstract protected function processMemberVar(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr
+    );
+
+
+    /**
+     * Called to process normal member vars.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
+     *                                        token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    abstract protected function processVariable(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr
+    );
+
+
+    /**
+     * Called to process variables found in double quoted strings or heredocs.
+     *
+     * Note that there may be more than one variable in the string, which will
+     * result only in one call for the string or one call per line for heredocs.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
+     *                                        token was found.
+     * @param int                  $stackPtr  The position where the double quoted
+     *                                        string was found.
+     *
+     * @return void
+     */
+    abstract protected function processVariableInString(
+        PHP_CodeSniffer_File
+        $phpcsFile,
+        $stackPtr
+    );
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml	(revision 5534)
@@ -0,0 +1,27 @@
+<documentation title="Duplicate Class Names">
+    <standard>
+    <![CDATA[
+    Class and Interface names should be unique in a project.  They should never be duplicated.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A unique class name.">
+        <![CDATA[
+class <em>Foo</em>
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: A class duplicated (including across multiple files).">
+        <![CDATA[
+class <em>Foo</em>
+{
+}
+
+class <em>Foo</em>
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Empty Statements">
+    <standard>
+    <![CDATA[
+    Control Structures must have at least one statement inside of the body.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: There is a statement inside the control structure.">
+        <![CDATA[
+if ($test) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: The control structure has no statements.">
+        <![CDATA[
+if ($test) {
+    <em>// do nothing</em>
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Condition-Only For Loops">
+    <standard>
+    <![CDATA[
+    For loops that have only a second expression (the condition) should be converted to while loops.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A for loop is used with all three expressions.">
+        <![CDATA[
+for (<em>$i = 0</em>; $i < 10; <em>$i++</em>) {
+    echo "{$i}\n";
+}
+        ]]>
+        </code>
+        <code title="Invalid: A for loop is used without a first or third expression.">
+        <![CDATA[
+for (<em></em>;$test;<em></em>) {
+    $test = doSomething();
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml	(revision 5534)
@@ -0,0 +1,24 @@
+<documentation title="For Loops With Function Calls in the Test">
+    <standard>
+    <![CDATA[
+    For loops should not call functions inside the test for the loop when they can be computed beforehand.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A for loop that determines its end condition before the loop starts.">
+        <![CDATA[
+<em>$end = count($foo);</em>
+for ($i = 0; $i < $end; $i++) {
+    echo $foo[$i]."\n";
+}
+        ]]>
+        </code>
+        <code title="Invalid: A for loop that unnecessarily computes the same value on every iteration.">
+        <![CDATA[
+for ($i = 0; $i < <em>count($foo)</em>; $i++) {
+    echo $foo[$i]."\n";
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Jumbled Incrementers">
+    <standard>
+    <![CDATA[
+    Incrementers in nested loops should use different variable names.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Two different variables being used to increment.">
+        <![CDATA[
+for ($i = 0; $i < 10; <em>$i++</em>) {
+    for ($j = 0; $j < 10; <em>$j++</em>) {
+    }
+}
+        ]]>
+        </code>
+        <code title="Invalid: Inner incrementer is the same variable name as the outer one.">
+        <![CDATA[
+for ($i = 0; $i < 10; <em>$i++</em>) {
+    for ($j = 0; $j < 10; <em>$i++</em>) {
+    }
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml	(revision 5534)
@@ -0,0 +1,39 @@
+<documentation title="Unconditional If Statements">
+    <standard>
+    <![CDATA[
+    If statements that are always evaluated should not be used.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: An if statement that only executes conditionally.">
+        <![CDATA[
+if (<em>$test</em>) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: An if statement that is always performed.">
+        <![CDATA[
+if (<em>true</em>) {
+    $var = 1;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: An if statement that only executes conditionally.">
+        <![CDATA[
+if (<em>$test</em>) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: An if statement that is never performed.">
+        <![CDATA[
+if (<em>false</em>) {
+    $var = 1;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="Unnecessary Final Modifiers">
+    <standard>
+    <![CDATA[
+    Methods should not be declared final inside of classes that are declared final.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A method in a final class is not marked final.">
+        <![CDATA[
+final class Foo
+{
+    public function bar()
+    {
+    }
+}
+        ]]>
+        </code>
+        <code title="Invalid: A method in a final class is also marked final.">
+        <![CDATA[
+final class Foo
+{
+    public <em>final</em> function bar()
+    {
+    }
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Unused function parameters">
+    <standard>
+    <![CDATA[
+    All parameters in a functions signature should be used within the function.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: All the parameters are used.">
+        <![CDATA[
+function addThree($a, $b, $c)
+{
+    return <em>$a + $b + $c</em>;
+}
+        ]]>
+        </code>
+        <code title="Invalid: One of the parameters is not being used.">
+        <![CDATA[
+function addThree($a, $b, $c)
+{
+    return <em>$a + $b</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml	(revision 5534)
@@ -0,0 +1,32 @@
+<documentation title="Useless Overriding Methods">
+    <standard>
+    <![CDATA[
+    Methods should not be defined that only call the parent method.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A method that extends functionality on a parent method.">
+        <![CDATA[
+final class Foo
+{
+    public function bar()
+    {
+        parent::bar();
+        <em>$this->doSomethingElse();</em>
+    }
+}
+        ]]>
+        </code>
+        <code title="Invalid: An overriding method that only calls the parent.">
+        <![CDATA[
+final class Foo
+{
+    public function bar()
+    {
+        <em>parent::bar();</em>
+    }
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Commenting/FixmeStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Commenting/FixmeStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Commenting/FixmeStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Todo Comments">
+    <standard>
+    <![CDATA[
+    FIXME Statements should be taken care of.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A comment without a fixme.">
+        <![CDATA[
+// <em>Handle strange case</em>
+if ($test) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: A fixme comment.">
+        <![CDATA[
+// <em>FIXME</em>: This needs to be fixed!
+if ($test) {
+    $var = 1;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Commenting/TodoStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Commenting/TodoStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Commenting/TodoStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Todo Comments">
+    <standard>
+    <![CDATA[
+    TODO Statements should be taken care of.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A comment without a todo.">
+        <![CDATA[
+// <em>Handle strange case</em>
+if ($test) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: A todo comment.">
+        <![CDATA[
+// <em>TODO</em>: This needs to be fixed!
+if ($test) {
+    $var = 1;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml	(revision 5534)
@@ -0,0 +1,22 @@
+<documentation title="Inline Control Structures">
+    <standard>
+    <![CDATA[
+    Control Structures should use braces.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Braces are used around the control structure.">
+        <![CDATA[
+if ($test) <em>{</em>
+    $var = 1;
+<em>}</em>
+        ]]>
+        </code>
+        <code title="Invalid: No braces are used for the control structure..">
+        <![CDATA[
+if ($test)
+    $var = 1;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/CSSLintStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/CSSLintStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/CSSLintStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="CSSLint">
+    <standard>
+    <![CDATA[
+    All css files should pass the basic csslint tests.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Valid CSS Syntax is used.">
+        <![CDATA[
+.foo: { width: 100<em></em>%; }
+        ]]>
+        </code>
+        <code title="Invalid: The CSS has a typo in it.">
+        <![CDATA[
+.foo: { width: 100<em> </em>%; }
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Closure Linter">
+    <standard>
+    <![CDATA[
+    All javascript files should pass basic Closure Linter tests.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Valid JS Syntax is used.">
+        <![CDATA[
+var foo = [1, 2<em></em>];
+        ]]>
+        </code>
+        <code title="Invalid: Trailing comma in a javascript array.">
+        <![CDATA[
+var foo = [1, 2<em>,</em>];
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/JSHintStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/JSHintStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Debug/JSHintStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="JSHint">
+    <standard>
+    <![CDATA[
+    All javascript files should pass basic JSHint tests.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Valid JS Syntax is used.">
+        <![CDATA[
+<em>var</em> foo = 5;
+        ]]>
+        </code>
+        <code title="Invalid: The Javascript is using an undefined variable.">
+        <![CDATA[
+<em></em>foo = 5;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Byte Order Marks">
+    <standard>
+    <![CDATA[
+    Byte Order Marks that may corrupt your application should not be used.  These include 0xefbbbf (UTF-8), 0xfeff (UTF-16 BE) and 0xfffe (UTF-16 LE).
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="End of File Newline">
+    <standard>
+    <![CDATA[
+    Files should end with a newline character.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="No End of File Newline">
+    <standard>
+    <![CDATA[
+    Files should not end with a newline character.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/InlineHTMLStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/InlineHTMLStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/InlineHTMLStandard.xml	(revision 5534)
@@ -0,0 +1,24 @@
+<documentation title="Inline HTML">
+    <standard>
+    <![CDATA[
+    Files that contain php code should only have php code and should not have any "inline html".
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A php file with only php code in it.">
+        <![CDATA[
+<?php
+$foo = 'bar';
+echo $foo . 'baz';
+        ]]>
+        </code>
+        <code title="Invalid: A php file with html in it outside of the php tags.">
+        <![CDATA[
+<em>some string here</em>
+<?php
+$foo = 'bar';
+echo $foo . 'baz';
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LineEndingsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LineEndingsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LineEndingsStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Line Endings">
+    <standard>
+    <![CDATA[
+    Unix-style line endings are preferred ("\n" instead of "\r\n").
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LineLengthStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LineLengthStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LineLengthStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Line Length">
+    <standard>
+    <![CDATA[
+    It is recommended to keep lines at approximately 80 characters long for better code readability.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Lowercased Filenames">
+    <standard>
+    <![CDATA[
+    Lowercase filenames are required.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="One Class Per File">
+    <standard>
+    <![CDATA[
+    There should only be one class defined in a file.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Only one class in the file.">
+        <![CDATA[
+<?php
+<em>class Foo</em>
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: Multiple classes defined in one file.">
+        <![CDATA[
+<?php
+<em>class Foo</em>
+{
+}
+
+<em>class Bar</em>
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="One Interface Per File">
+    <standard>
+    <![CDATA[
+    There should only be one interface defined in a file.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Only one interface in the file.">
+        <![CDATA[
+<?php
+<em>interface Foo</em>
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: Multiple interfaces defined in one file.">
+        <![CDATA[
+<?php
+<em>interface Foo</em>
+{
+}
+
+<em>interface Bar</em>
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml	(revision 5534)
@@ -0,0 +1,20 @@
+<documentation title="Multiple Statements On a Single Line">
+    <standard>
+    <![CDATA[
+    Multiple statements are not allowed on a single line.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Two statements are spread out on two separate lines.">
+        <![CDATA[
+$foo = 1;
+$bar = 2;
+        ]]>
+        </code>
+        <code title="Invalid: Two statements are combined onto one line.">
+        <![CDATA[
+$foo = 1; $bar = 2;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml	(revision 5534)
@@ -0,0 +1,56 @@
+<documentation title="Aligning Blocks of Assignments">
+    <standard>
+    <![CDATA[
+      There should be one space on either side of an equals sign used to assign a value to a variable. In the case of a block of related assignments, more space may be inserted to promote readability.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Equals signs aligned">
+        <![CDATA[
+$shortVar        <em>=</em> (1 + 2);
+$veryLongVarName <em>=</em> 'string';
+$var             <em>=</em> foo($bar, $baz, $quux);
+        ]]>
+        </code>
+        <code title="Not aligned; harder to read">
+        <![CDATA[
+$shortVar <em>=</em> (1 + 2);
+$veryLongVarName <em>=</em> 'string';
+$var <em>=</em> foo($bar, $baz, $quux);
+        ]]>
+        </code>
+    </code_comparison>
+    <standard>
+    <![CDATA[
+      When using plus-equals, minus-equals etc. still ensure the equals signs are aligned to one space after the longest variable name.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Equals signs aligned; only one space after longest var name">
+        <![CDATA[
+$shortVar       <em>+= </em>1;
+$veryLongVarName<em> = </em>1;
+        ]]>
+        </code>
+        <code title="Two spaces after longest var name">
+        <![CDATA[
+$shortVar       <em> += </em>1;
+$veryLongVarName<em>  = </em>1;
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Equals signs aligned">
+        <![CDATA[
+$shortVar       <em>  = </em>1;
+$veryLongVarName<em> -= </em>1;
+        ]]>
+        </code>
+        <code title="Equals signs not aligned">
+        <![CDATA[
+$shortVar       <em> = </em>1;
+$veryLongVarName<em> -= </em>1;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Space After Casts">
+    <standard>
+    <![CDATA[
+    Spaces are not allowed after casting operators.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A cast operator is immediately before its value.">
+        <![CDATA[
+$foo = (string)1;
+        ]]>
+        </code>
+        <code title="Invalid: A cast operator is followed by whitespace.">
+        <![CDATA[
+$foo = (string)<em> </em>1;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Space After Casts">
+    <standard>
+    <![CDATA[
+    Exactly one space is allowed after a cast.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A cast operator is followed by one space.">
+        <![CDATA[
+$foo = (string)<em> </em>1;
+        ]]>
+        </code>
+        <code title="Invalid: A cast operator is not followed by whitespace.">
+        <![CDATA[
+$foo = (string)<em></em>1;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml	(revision 5534)
@@ -0,0 +1,31 @@
+<documentation title="Call-Time Pass-By-Reference">
+    <standard>
+    <![CDATA[
+    Call-time pass-by-reference is not allowed. It should be declared in the function definition.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Pass-by-reference is specified in the function definition.">
+        <![CDATA[
+function foo(<em>&</em>$bar)
+{
+    $bar++;
+}
+
+$baz = 1;
+foo($baz);
+        ]]>
+        </code>
+        <code title="Invalid: Pass-by-reference is done in the call to a function.">
+        <![CDATA[
+function foo($bar)
+{
+    $bar++;
+}
+
+$baz = 1;
+foo(<em>&</em>$baz);
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,39 @@
+<documentation title="Function Argument Spacing">
+    <standard>
+    <![CDATA[
+    Function arguments should have one space after a comma, and single spaces surrounding the equals sign for default values.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Single spaces after a comma.">
+        <![CDATA[
+function foo($bar,<em> </em>$baz)
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: No spaces after a comma.">
+        <![CDATA[
+function foo($bar,<em></em>$baz)
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Single spaces around an equals sign in function declaration.">
+        <![CDATA[
+function foo($bar, $baz<em> </em>=<em> </em>true)
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: No spaces around an equals sign in function declaration.">
+        <![CDATA[
+function foo($bar, $baz<em></em>=<em></em>true)
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml	(revision 5534)
@@ -0,0 +1,24 @@
+<documentation title="Opening Brace in Function Declarations">
+    <standard>
+    <![CDATA[
+    Function declarations follow the "BSD/Allman style". The function brace is on the line following the function declaration and is indented to the same column as the start of the function declaration.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: brace on next line">
+        <![CDATA[
+function fooFunction($arg1, $arg2 = '')
+<em>{</em>
+    ...
+}
+        ]]>
+        </code>
+        <code title="Invalid: brace on same line">
+        <![CDATA[
+function fooFunction($arg1, $arg2 = '') <em>{</em>
+    ...
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml	(revision 5534)
@@ -0,0 +1,24 @@
+<documentation title="Opening Brace in Function Declarations">
+    <standard>
+    <![CDATA[
+    Function declarations follow the "Kernighan/Ritchie style". The function brace is on the same line as the function declaration. One space is required between the closing parenthesis and the brace.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: brace on same line">
+        <![CDATA[
+function fooFunction($arg1, $arg2 = '')<em> {</em>
+    ...
+}
+        ]]>
+        </code>
+        <code title="Invalid: brace on next line">
+        <![CDATA[
+function fooFunction($arg1, $arg2 = '')
+<em>{</em>
+    ...
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Cyclomatic Complexity">
+    <standard>
+    <![CDATA[
+    Functions should not have a cyclomatic complexity greater than 20, and should try to stay below a complexity of 10.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Nesting Level">
+    <standard>
+    <![CDATA[
+    Functions should not have a nesting level greater than 10, and should try to stay below 5.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="camelCaps Function Names">
+    <standard>
+    <![CDATA[
+    Functions should use camelCaps format for their names. Only PHP's magic methods should use a double underscore prefix.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A function in camelCaps format.">
+        <![CDATA[
+function <em>doSomething</em>()
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: A function in snake_case format.">
+        <![CDATA[
+function <em>do_something</em>()
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="Constructor name">
+    <standard>
+    <![CDATA[
+    Constructors should be named __construct, not after the class.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: The constructor is named __construct.">
+        <![CDATA[
+class Foo
+{
+    function <em>__construct</em>()
+    {
+    }
+}
+        ]]>
+        </code>
+        <code title="Invalid: The old style class name constructor is used.">
+        <![CDATA[
+class Foo
+{
+    function <em>Foo</em>()
+    {
+    }
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="Constant Names">
+    <standard>
+    <![CDATA[
+     Constants should always be all-uppercase, with underscores to separate words.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: all uppercase">
+        <![CDATA[
+define('<em>FOO_CONSTANT</em>', 'foo');
+
+class FooClass
+{
+    const <em>FOO_CONSTANT</em> = 'foo';
+}
+        ]]>
+        </code>
+        <code title="Invalid: mixed case">
+        <![CDATA[
+define('<em>Foo_Constant</em>', 'foo');
+
+class FooClass
+{
+    const <em>foo_constant</em> = 'foo';
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml	(revision 5534)
@@ -0,0 +1,22 @@
+<documentation title="Opening Tag at Start of File">
+    <standard>
+    <![CDATA[
+    The opening php tag should be the first item in the file.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A file starting with an opening php tag.">
+        <![CDATA[
+<em></em><?php
+echo 'Foo';
+        ]]>
+        </code>
+        <code title="Invalid: A file with content before the opening php tag.">
+        <![CDATA[
+<em>Beginning content</em>
+<?php
+echo 'Foo';
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml	(revision 5534)
@@ -0,0 +1,22 @@
+<documentation title="Closing PHP Tags">
+    <standard>
+    <![CDATA[
+    All opening php tags should have a corresponding closing tag.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A closing tag paired with it's opening tag.">
+        <![CDATA[
+<em><?php</em>
+echo 'Foo';
+<em>?></em>
+        ]]>
+        </code>
+        <code title="Invalid: No closing tag paired with the opening tag.">
+        <![CDATA[
+<em><?php</em>
+echo 'Foo';
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Deprecated Functions">
+    <standard>
+    <![CDATA[
+    Deprecated functions should not be used.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A non-deprecated function is used.">
+        <![CDATA[
+$foo = <em>explode</em>('a', $bar);
+        ]]>
+        </code>
+        <code title="Invalid: A deprecated function is used.">
+        <![CDATA[
+$foo = <em>split</em>('a', $bar);
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="PHP Code Tags">
+    <standard>
+    <![CDATA[
+    Always use <?php ?> to delimit PHP code, not the <? ?> shorthand. This is the most portable way to include PHP code on differing operating systems and setups.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Forbidden Functions">
+    <standard>
+    <![CDATA[
+    The forbidden functions sizeof() and delete() should not be used.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: count() is used in place of sizeof().">
+        <![CDATA[
+$foo = <em>count</em>($bar);
+        ]]>
+        </code>
+        <code title="Invalid: sizeof() is used.">
+        <![CDATA[
+$foo = <em>sizeof</em>($bar);
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="PHP Constants">
+    <standard>
+    <![CDATA[
+    The <em>true</em>, <em>false</em> and <em>null</em> constants must always be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: lowercase constants">
+        <![CDATA[
+if ($var === <em>false</em> || $var === <em>null</em>) {
+    $var = <em>true</em>;
+}
+        ]]>
+        </code>
+        <code title="Invalid: uppercase constants">
+        <![CDATA[
+if ($var === <em>FALSE</em> || $var === <em>NULL</em>) {
+    $var = <em>TRUE</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Lowercase Keywords">
+    <standard>
+    <![CDATA[
+    All PHP keywords should be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Lowercase array keyword used.">
+        <![CDATA[
+$foo = <em>array</em>();
+        ]]>
+        </code>
+        <code title="Invalid: Non-lowercase array keyword used.">
+        <![CDATA[
+$foo = <em>Array</em>();
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Silenced Errors">
+    <standard>
+    <![CDATA[
+    Suppressing Errors is not allowed.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: isset() is used to verify that a variable exists before trying to use it.">
+        <![CDATA[
+if (<em>isset($foo)</em> && $foo) {
+    echo "Hello\n";
+}
+        ]]>
+        </code>
+        <code title="Invalid: Errors are suppressed.">
+        <![CDATA[
+if (<em>@</em>$foo) {
+    echo "Hello\n";
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="SAPI Usage">
+    <standard>
+    <![CDATA[
+    The PHP_SAPI constant should be used instead of php_sapi_name().
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: PHP_SAPI is used.">
+        <![CDATA[
+if (<em>PHP_SAPI</em> === 'cli') {
+    echo "Hello, CLI user.";
+}
+        ]]>
+        </code>
+        <code title="Invalid: php_sapi_name() is used.">
+        <![CDATA[
+if (<em>php_sapi_name()</em> === 'cli') {
+    echo "Hello, CLI user.";
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="PHP Constants">
+    <standard>
+    <![CDATA[
+    The <em>true</em>, <em>false</em> and <em>null</em> constants must always be uppercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: uppercase constants">
+        <![CDATA[
+if ($var === <em>FALSE</em> || $var === <em>NULL</em>) {
+    $var = <em>TRUE</em>;
+}
+        ]]>
+        </code>
+        <code title="Invalid: lowercase constants">
+        <![CDATA[
+if ($var === <em>false</em> || $var === <em>null</em>) {
+    $var = <em>true</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Unnecessary String Concatenation">
+    <standard>
+    <![CDATA[
+    Strings should not be concatenated together.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A string can be concatenated with an expression.">
+        <![CDATA[
+echo '5 + 2 = ' . (5 + 2);
+        ]]>
+        </code>
+        <code title="Invalid: Strings should not be concatenated together.">
+        <![CDATA[
+echo 'Hello' . ' ' . 'World';
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Subversion Properties">
+    <standard>
+    <![CDATA[
+    All php files in a subversion repository should have the svn:keywords property set to 'Author Id Revision' and the svn:eol-style property set to 'native'.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="No Space Indentation">
+    <standard>
+    <![CDATA[
+    Tabs should be used for indentation instead of spaces.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="No Tab Indentation">
+    <standard>
+    <![CDATA[
+    Spaces should be used for indentation instead of tabs.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Scope Indentation">
+    <standard>
+    <![CDATA[
+    Indentation for control structures, classes, and functions should be 4 spaces per level.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: 4 spaces are used to indent a control structure.">
+        <![CDATA[
+if ($test) {
+<em>    </em>$var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: 8 spaces are used to indent a control structure.">
+        <![CDATA[
+if ($test) {
+<em>        </em>$var = 1;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Bans the use of the PHP long array syntax.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Bans the use of the PHP long array syntax.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_ARRAY);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no');
+
+        $error = 'Short array syntax must be used to define arrays';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
+
+        if ($fix === true) {
+            $tokens = $phpcsFile->getTokens();
+            $opener = $tokens[$stackPtr]['parenthesis_opener'];
+            $closer = $tokens[$stackPtr]['parenthesis_closer'];
+
+            $phpcsFile->fixer->beginChangeset();
+
+            if ($opener === null) {
+                $phpcsFile->fixer->replaceToken($stackPtr, '[]');
+            } else {
+                $phpcsFile->fixer->replaceToken($stackPtr, '');
+                $phpcsFile->fixer->replaceToken($opener, '[');
+                $phpcsFile->fixer->replaceToken($closer, ']');
+            }
+
+            $phpcsFile->fixer->endChangeset();
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Bans the use of the PHP short array syntax.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Bans the use of the PHP short array syntax.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_SHORT_ARRAY);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'yes');
+
+        $error = 'Short array syntax is not allowed';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
+
+        if ($fix === true) {
+            $tokens = $phpcsFile->getTokens();
+            $opener = $tokens[$stackPtr]['bracket_opener'];
+            $closer = $tokens[$stackPtr]['bracket_closer'];
+
+            $phpcsFile->fixer->beginChangeset();
+            $phpcsFile->fixer->replaceToken($opener, 'array(');
+            $phpcsFile->fixer->replaceToken($closer, ')');
+            $phpcsFile->fixer->endChangeset();
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php	(revision 5534)
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Reports errors if the same class or interface name is used in multiple files.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Reports errors if the same class or interface name is used in multiple files.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Classes_DuplicateClassNameSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * List of classes that have been found during checking.
+     *
+     * @var array
+     */
+    public $foundClasses = array();
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $namespace  = '';
+        $findTokens = array(
+                       T_CLASS,
+                       T_INTERFACE,
+                       T_NAMESPACE,
+                       T_CLOSE_TAG,
+                      );
+
+        $stackPtr = $phpcsFile->findNext($findTokens, ($stackPtr + 1));
+        while ($stackPtr !== false) {
+            if ($tokens[$stackPtr]['code'] === T_CLOSE_TAG) {
+                // We can stop here. The sniff will continue from the next open
+                // tag when PHPCS reaches that token, if there is one.
+                return;
+            }
+
+            // Keep track of what namespace we are in.
+            if ($tokens[$stackPtr]['code'] === T_NAMESPACE) {
+                $nsEnd = $phpcsFile->findNext(
+                    array(
+                     T_NS_SEPARATOR,
+                     T_STRING,
+                     T_WHITESPACE,
+                    ),
+                    ($stackPtr + 1),
+                    null,
+                    true
+                );
+
+                $namespace = trim($phpcsFile->getTokensAsString(($stackPtr + 1), ($nsEnd - $stackPtr - 1)));
+                $stackPtr  = $nsEnd;
+            } else {
+                $nameToken = $phpcsFile->findNext(T_STRING, $stackPtr);
+                $name      = $tokens[$nameToken]['content'];
+                if ($namespace !== '') {
+                    $name = $namespace.'\\'.$name;
+                }
+
+                $compareName = strtolower($name);
+                if (isset($this->foundClasses[$compareName]) === true) {
+                    $type  = strtolower($tokens[$stackPtr]['content']);
+                    $file  = $this->foundClasses[$compareName]['file'];
+                    $line  = $this->foundClasses[$compareName]['line'];
+                    $error = 'Duplicate %s name "%s" found; first defined in %s on line %s';
+                    $data  = array(
+                              $type,
+                              $name,
+                              $file,
+                              $line,
+                             );
+                    $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
+                } else {
+                    $this->foundClasses[$compareName] = array(
+                                                         'file' => $phpcsFile->getFilename(),
+                                                         'line' => $tokens[$stackPtr]['line'],
+                                                        );
+                }
+            }//end if
+
+            $stackPtr = $phpcsFile->findNext($findTokens, ($stackPtr + 1));
+        }//end while
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php	(revision 5534)
@@ -0,0 +1,106 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * This sniff class detected empty statement.
+ *
+ * This sniff implements the common algorithm for empty statement body detection.
+ * A body is considered as empty if it is completely empty or it only contains
+ * whitespace characters and/or comments.
+ *
+ * <code>
+ * stmt {
+ *   // foo
+ * }
+ * stmt (conditions) {
+ *   // foo
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_EmptyStatementSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(
+                T_CATCH,
+                T_DO,
+                T_ELSE,
+                T_ELSEIF,
+                T_FOR,
+                T_FOREACH,
+                T_IF,
+                T_SWITCH,
+                T_TRY,
+                T_WHILE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip statements without a body.
+        if (isset($token['scope_opener']) === false) {
+            return;
+        }
+
+        $next = $phpcsFile->findNext(
+            PHP_CodeSniffer_Tokens::$emptyTokens,
+            ($token['scope_opener'] + 1),
+            ($token['scope_closer'] - 1),
+            true
+        );
+
+        if ($next !== false) {
+            return;
+        }
+
+        // Get token identifier.
+        $name  = strtoupper($token['content']);
+        $error = 'Empty %s statement detected';
+        $phpcsFile->addError($error, $stackPtr, 'Detected'.$name, array($name));
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php	(revision 5534)
@@ -0,0 +1,102 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Detects for-loops that can be simplified to a while-loop.
+ *
+ * This rule is based on the PMD rule catalog. Detects for-loops that can be
+ * simplified as a while-loop.
+ *
+ * <code>
+ * class Foo
+ * {
+ *     public function bar($x)
+ *     {
+ *         for (;true;) true; // No Init or Update part, may as well be: while (true)
+ *     }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_FOR);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip invalid statement.
+        if (isset($token['parenthesis_opener']) === false) {
+            return;
+        }
+
+        $next = ++$token['parenthesis_opener'];
+        $end  = --$token['parenthesis_closer'];
+
+        $parts = array(
+                  0,
+                  0,
+                  0,
+                 );
+        $index = 0;
+
+        for (; $next <= $end; ++$next) {
+            $code = $tokens[$next]['code'];
+            if ($code === T_SEMICOLON) {
+                ++$index;
+            } else if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === false) {
+                ++$parts[$index];
+            }
+        }
+
+        if ($parts[0] === 0 && $parts[2] === 0 && $parts[1] > 0) {
+            $error = 'This FOR loop can be simplified to a WHILE loop';
+            $phpcsFile->addWarning($error, $stackPtr, 'CanSimplify');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php	(revision 5534)
@@ -0,0 +1,111 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Detects for-loops that use a function call in the test expression.
+ *
+ * This rule is based on the PMD rule catalog. Detects for-loops that use a
+ * function call in the test expression.
+ *
+ * <code>
+ * class Foo
+ * {
+ *     public function bar($x)
+ *     {
+ *         $a = array(1, 2, 3, 4);
+ *         for ($i = 0; $i < count($a); $i++) {
+ *              $a[$i] *= $i;
+ *         }
+ *     }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_FOR);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip invalid statement.
+        if (isset($token['parenthesis_opener']) === false) {
+            return;
+        }
+
+        $next = ++$token['parenthesis_opener'];
+        $end  = --$token['parenthesis_closer'];
+
+        $position = 0;
+
+        for (; $next <= $end; ++$next) {
+            $code = $tokens[$next]['code'];
+            if ($code === T_SEMICOLON) {
+                ++$position;
+            }
+
+            if ($position < 1) {
+                continue;
+            } else if ($position > 1) {
+                break;
+            } else if ($code !== T_VARIABLE && $code !== T_STRING) {
+                continue;
+            }
+
+            // Find next non empty token, if it is a open curly brace we have a
+            // function call.
+            $index = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+
+            if ($tokens[$index]['code'] === T_OPEN_PARENTHESIS) {
+                $error = 'Avoid function calls in a FOR loop test part';
+                $phpcsFile->addWarning($error, $stackPtr, 'NotAllowed');
+                break;
+            }
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php	(revision 5534)
@@ -0,0 +1,146 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Detects incrementer jumbling in for loops.
+ *
+ * This rule is based on the PMD rule catalog. The jumbling incrementer sniff
+ * detects the usage of one and the same incrementer into an outer and an inner
+ * loop. Even it is intended this is confusing code.
+ *
+ * <code>
+ * class Foo
+ * {
+ *     public function bar($x)
+ *     {
+ *         for ($i = 0; $i < 10; $i++)
+ *         {
+ *             for ($k = 0; $k < 20; $i++)
+ *             {
+ *                 echo 'Hello';
+ *             }
+ *         }
+ *     }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_FOR);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip for-loop without body.
+        if (isset($token['scope_opener']) === false) {
+            return;
+        }
+
+        // Find incrementors for outer loop.
+        $outer = $this->findIncrementers($tokens, $token);
+
+        // Skip if empty.
+        if (count($outer) === 0) {
+            return;
+        }
+
+        // Find nested for loops.
+        $start = ++$token['scope_opener'];
+        $end   = --$token['scope_closer'];
+
+        for (; $start <= $end; ++$start) {
+            if ($tokens[$start]['code'] !== T_FOR) {
+                continue;
+            }
+
+            $inner = $this->findIncrementers($tokens, $tokens[$start]);
+            $diff  = array_intersect($outer, $inner);
+
+            if (count($diff) !== 0) {
+                $error = 'Loop incrementor (%s) jumbling with inner loop';
+                $data  = array(join(', ', $diff));
+                $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
+            }
+        }
+
+    }//end process()
+
+
+    /**
+     * Get all used variables in the incrementer part of a for statement.
+     *
+     * @param array(integer=>array) $tokens Array with all code sniffer tokens.
+     * @param array(string=>mixed)  $token  Current for loop token
+     *
+     * @return string[] List of all found incrementer variables.
+     */
+    protected function findIncrementers(array $tokens, array $token)
+    {
+        // Skip invalid statement.
+        if (isset($token['parenthesis_opener']) === false) {
+            return array();
+        }
+
+        $start = ++$token['parenthesis_opener'];
+        $end   = --$token['parenthesis_closer'];
+
+        $incrementers = array();
+        $semicolons   = 0;
+        for ($next = $start; $next <= $end; ++$next) {
+            $code = $tokens[$next]['code'];
+            if ($code === T_SEMICOLON) {
+                ++$semicolons;
+            } else if ($semicolons === 2 && $code === T_VARIABLE) {
+                $incrementers[] = $tokens[$next]['content'];
+            }
+        }
+
+        return $incrementers;
+
+    }//end findIncrementers()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php	(revision 5534)
@@ -0,0 +1,104 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Detects unconditional if- and elseif-statements.
+ *
+ * This rule is based on the PMD rule catalog. The Unconditional If Statement
+ * sniff detects statement conditions that are only set to one of the constant
+ * values <b>true</b> or <b>false</b>
+ *
+ * <code>
+ * class Foo
+ * {
+ *     public function close()
+ *     {
+ *         if (true)
+ *         {
+ *             // ...
+ *         }
+ *     }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_ELSEIF,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip for-loop without body.
+        if (isset($token['parenthesis_opener']) === false) {
+            return;
+        }
+
+        $next = ++$token['parenthesis_opener'];
+        $end  = --$token['parenthesis_closer'];
+
+        $goodCondition = false;
+        for (; $next <= $end; ++$next) {
+            $code = $tokens[$next]['code'];
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === true) {
+                continue;
+            } else if ($code !== T_TRUE && $code !== T_FALSE) {
+                $goodCondition = true;
+            }
+        }
+
+        if ($goodCondition === false) {
+            $error = 'Avoid IF statements that are always true or false';
+            $phpcsFile->addWarning($error, $stackPtr, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php	(revision 5534)
@@ -0,0 +1,96 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Detects unnecessary final modifiers inside of final classes.
+ *
+ * This rule is based on the PMD rule catalog. The Unnecessary Final Modifier
+ * sniff detects the use of the final modifier inside of a final class which
+ * is unnecessary.
+ *
+ * <code>
+ * final class Foo
+ * {
+ *     public final function bar()
+ *     {
+ *     }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_CLASS);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip for-statements without body.
+        if (isset($token['scope_opener']) === false) {
+            return;
+        }
+
+        // Fetch previous token.
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+
+        // Skip for non final class.
+        if ($prev === false || $tokens[$prev]['code'] !== T_FINAL) {
+            return;
+        }
+
+        $next = ++$token['scope_opener'];
+        $end  = --$token['scope_closer'];
+
+        for (; $next <= $end; ++$next) {
+            if ($tokens[$next]['code'] === T_FINAL) {
+                $error = 'Unnecessary FINAL modifier in FINAL class';
+                $phpcsFile->addWarning($error, $next, 'Found');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php	(revision 5534)
@@ -0,0 +1,184 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks the for unused function parameters.
+ *
+ * This sniff checks that all function parameters are used in the function body.
+ * One exception is made for empty function bodies or function bodies that only
+ * contain comments. This could be useful for the classes that implement an
+ * interface that defines multiple methods but the implementation only needs some
+ * of them.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip broken function declarations.
+        if (isset($token['scope_opener']) === false || isset($token['parenthesis_opener']) === false) {
+            return;
+        }
+
+        $params = array();
+        foreach ($phpcsFile->getMethodParameters($stackPtr) as $param) {
+            $params[$param['name']] = $stackPtr;
+        }
+
+        $next = ++$token['scope_opener'];
+        $end  = --$token['scope_closer'];
+
+        $foundContent = false;
+        $validTokens  = array(
+                         T_HEREDOC              => T_HEREDOC,
+                         T_NOWDOC               => T_NOWDOC,
+                         T_END_HEREDOC          => T_END_HEREDOC,
+                         T_END_NOWDOC           => T_END_NOWDOC,
+                         T_DOUBLE_QUOTED_STRING => T_DOUBLE_QUOTED_STRING,
+                        );
+        $validTokens += PHP_CodeSniffer_Tokens::$emptyTokens;
+
+        for (; $next <= $end; ++$next) {
+            $token = $tokens[$next];
+            $code  = $token['code'];
+
+            // Ignorable tokens.
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === true) {
+                continue;
+            }
+
+            if ($foundContent === false) {
+                // A throw statement as the first content indicates an interface method.
+                if ($code === T_THROW) {
+                    return;
+                }
+
+                // A return statement as the first content indicates an interface method.
+                if ($code === T_RETURN) {
+                    $tmp = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+                    if ($tmp === false) {
+                        return;
+                    }
+
+                    // There is a return.
+                    if ($tokens[$tmp]['code'] === T_SEMICOLON) {
+                        return;
+                    }
+
+                    $tmp = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($tmp + 1), null, true);
+                    if ($tmp !== false && $tokens[$tmp]['code'] === T_SEMICOLON) {
+                        // There is a return <token>.
+                        return;
+                    }
+                }//end if
+            }//end if
+
+            $foundContent = true;
+
+            if ($code === T_VARIABLE && isset($params[$token['content']]) === true) {
+                unset($params[$token['content']]);
+            } else if ($code === T_DOLLAR) {
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true);
+                if ($tokens[$nextToken]['code'] === T_OPEN_CURLY_BRACKET) {
+                    $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true);
+                    if ($tokens[$nextToken]['code'] === T_STRING) {
+                        $varContent = '$'.$tokens[$nextToken]['content'];
+                        if (isset($params[$varContent]) === true) {
+                            unset($params[$varContent]);
+                        }
+                    }
+                }
+            } else if ($code === T_DOUBLE_QUOTED_STRING
+                || $code === T_START_HEREDOC
+                || $code === T_START_NOWDOC
+            ) {
+                // Tokenize strings that can contain variables.
+                // Make sure the string is re-joined if it occurs over multiple lines.
+                $content = $token['content'];
+                for ($i = ($next + 1); $i <= $end; $i++) {
+                    if (isset($validTokens[$tokens[$i]['code']]) === true) {
+                        $content .= $tokens[$i]['content'];
+                        $next++;
+                    } else {
+                        break;
+                    }
+                }
+
+                $stringTokens = token_get_all(sprintf('<?php %s;?>', $content));
+                foreach ($stringTokens as $stringPtr => $stringToken) {
+                    if (is_array($stringToken) === false) {
+                        continue;
+                    }
+
+                    $varContent = '';
+                    if ($stringToken[0] === T_DOLLAR_OPEN_CURLY_BRACES) {
+                        $varContent = '$'.$stringTokens[($stringPtr + 1)][1];
+                    } else if ($stringToken[0] === T_VARIABLE) {
+                        $varContent = $stringToken[1];
+                    }
+
+                    if ($varContent !== '' && isset($params[$varContent]) === true) {
+                        unset($params[$varContent]);
+                    }
+                }
+            }//end if
+        }//end for
+
+        if ($foundContent === true && count($params) > 0) {
+            foreach ($params as $paramName => $position) {
+                $error = 'The method parameter %s is never used';
+                $data  = array($paramName);
+                $phpcsFile->addWarning($error, $position, 'Found', $data);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php	(revision 5534)
@@ -0,0 +1,178 @@
+<?php
+/**
+ * This file is part of the CodeAnalysis add-on for PHP_CodeSniffer.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Detects unnecessary overridden methods that simply call their parent.
+ *
+ * This rule is based on the PMD rule catalog. The Useless Overriding Method
+ * sniff detects the use of methods that only call their parent classes's method
+ * with the same name and arguments. These methods are not required.
+ *
+ * <code>
+ * class FooBar {
+ *   public function __construct($a, $b) {
+ *     parent::__construct($a, $b);
+ *   }
+ * }
+ * </code>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Manuel Pichler <mapi@manuel-pichler.de>
+ * @copyright 2007-2014 Manuel Pichler. All rights reserved.
+ * @license   http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $token  = $tokens[$stackPtr];
+
+        // Skip function without body.
+        if (isset($token['scope_opener']) === false) {
+            return;
+        }
+
+        // Get function name.
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+
+        // Get all parameters from method signature.
+        $signature = array();
+        foreach ($phpcsFile->getMethodParameters($stackPtr) as $param) {
+            $signature[] = $param['name'];
+        }
+
+        $next = ++$token['scope_opener'];
+        $end  = --$token['scope_closer'];
+
+        for (; $next <= $end; ++$next) {
+            $code = $tokens[$next]['code'];
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === true) {
+                continue;
+            } else if ($code === T_RETURN) {
+                continue;
+            }
+
+            break;
+        }
+
+        // Any token except 'parent' indicates correct code.
+        if ($tokens[$next]['code'] !== T_PARENT) {
+            return;
+        }
+
+        // Find next non empty token index, should be double colon.
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+
+        // Skip for invalid code.
+        if ($next === false || $tokens[$next]['code'] !== T_DOUBLE_COLON) {
+            return;
+        }
+
+        // Find next non empty token index, should be the function name.
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+
+        // Skip for invalid code or other method.
+        if ($next === false || $tokens[$next]['content'] !== $methodName) {
+            return;
+        }
+
+        // Find next non empty token index, should be the open parenthesis.
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+
+        // Skip for invalid code.
+        if ($next === false || $tokens[$next]['code'] !== T_OPEN_PARENTHESIS) {
+            return;
+        }
+
+        $validParameterTypes = array(
+                                T_VARIABLE,
+                                T_LNUMBER,
+                                T_CONSTANT_ENCAPSED_STRING,
+                               );
+
+        $parameters       = array('');
+        $parenthesisCount = 1;
+        $count            = count($tokens);
+        for (++$next; $next < $count; ++$next) {
+            $code = $tokens[$next]['code'];
+
+            if ($code === T_OPEN_PARENTHESIS) {
+                ++$parenthesisCount;
+            } else if ($code === T_CLOSE_PARENTHESIS) {
+                --$parenthesisCount;
+            } else if ($parenthesisCount === 1 && $code === T_COMMA) {
+                $parameters[] = '';
+            } else if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === false) {
+                $parameters[(count($parameters) - 1)] .= $tokens[$next]['content'];
+            }
+
+            if ($parenthesisCount === 0) {
+                break;
+            }
+        }//end for
+
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+        if ($next === false || $tokens[$next]['code'] !== T_SEMICOLON) {
+            return;
+        }
+
+        // Check rest of the scope.
+        for (++$next; $next <= $end; ++$next) {
+            $code = $tokens[$next]['code'];
+            // Skip for any other content.
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === false) {
+                return;
+            }
+        }
+
+        $parameters = array_map('trim', $parameters);
+        $parameters = array_filter($parameters);
+
+        if (count($parameters) === count($signature) && $parameters === $signature) {
+            $phpcsFile->addWarning('Possible useless method overriding detected', $stackPtr, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php	(revision 5534)
@@ -0,0 +1,350 @@
+<?php
+/**
+ * Ensures doc blocks follow basic formatting.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures doc blocks follow basic formatting.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Commenting_DocCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_DOC_COMMENT_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens       = $phpcsFile->getTokens();
+        $commentStart = $stackPtr;
+        $commentEnd   = $tokens[$stackPtr]['comment_closer'];
+
+        $empty = array(
+                  T_DOC_COMMENT_WHITESPACE,
+                  T_DOC_COMMENT_STAR,
+                 );
+
+        $short = $phpcsFile->findNext($empty, ($stackPtr + 1), $commentEnd, true);
+        if ($short === false) {
+            // No content at all.
+            $error = 'Doc comment is empty';
+            $phpcsFile->addError($error, $stackPtr, 'Empty');
+            return;
+        }
+
+        // The first line of the comment should just be the /** code.
+        if ($tokens[$short]['line'] === $tokens[$stackPtr]['line']) {
+            $error = 'The open comment tag must be the only content on the line';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'ContentAfterOpen');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addNewline($stackPtr);
+                $phpcsFile->fixer->addContentBefore($short, '* ');
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        // The last line of the comment should just be the */ code.
+        $prev = $phpcsFile->findPrevious($empty, ($commentEnd - 1), $stackPtr, true);
+        if ($tokens[$prev]['line'] === $tokens[$commentEnd]['line']) {
+            $error = 'The close comment tag must be the only content on the line';
+            $fix   = $phpcsFile->addFixableError($error, $commentEnd, 'ContentBeforeClose');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewlineBefore($commentEnd);
+            }
+        }
+
+        // Check for additional blank lines at the end of the comment.
+        if ($tokens[$prev]['line'] < ($tokens[$commentEnd]['line'] - 1)) {
+            $error = 'Additional blank lines found at end of doc comment';
+            $fix   = $phpcsFile->addFixableError($error, $commentEnd, 'SpacingAfter');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($prev + 1); $i < $commentEnd; $i++) {
+                    if ($tokens[($i + 1)]['line'] === $tokens[$commentEnd]['line']) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        // Check for a comment description.
+        if ($tokens[$short]['code'] !== T_DOC_COMMENT_STRING) {
+            $error = 'Missing short description in doc comment';
+            $phpcsFile->addError($error, $stackPtr, 'MissingShort');
+            return;
+        }
+
+        // No extra newline before short description.
+        if ($tokens[$short]['line'] !== ($tokens[$stackPtr]['line'] + 1)) {
+            $error = 'Doc comment short description must be on the first line';
+            $fix   = $phpcsFile->addFixableError($error, $short, 'SpacingBeforeShort');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = $stackPtr; $i < $short; $i++) {
+                    if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) {
+                        continue;
+                    } else if ($tokens[$i]['line'] === $tokens[$short]['line']) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        // Account for the fact that a short description might cover
+        // multiple lines.
+        $shortContent = $tokens[$short]['content'];
+        $shortEnd     = $short;
+        for ($i = ($short + 1); $i < $commentEnd; $i++) {
+            if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) {
+                if ($tokens[$i]['line'] === ($tokens[$shortEnd]['line'] + 1)) {
+                    $shortContent .= $tokens[$i]['content'];
+                    $shortEnd      = $i;
+                } else {
+                    break;
+                }
+            }
+        }
+
+        if (preg_match('/^\p{Ll}/u', $shortContent) === 1) {
+            $error = 'Doc comment short description must start with a capital letter';
+            $phpcsFile->addError($error, $short, 'ShortNotCapital');
+        }
+
+        $long = $phpcsFile->findNext($empty, ($shortEnd + 1), ($commentEnd - 1), true);
+        if ($long !== false && $tokens[$long]['code'] === T_DOC_COMMENT_STRING) {
+            if ($tokens[$long]['line'] !== ($tokens[$shortEnd]['line'] + 2)) {
+                $error = 'There must be exactly one blank line between descriptions in a doc comment';
+                $fix   = $phpcsFile->addFixableError($error, $long, 'SpacingBetween');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($shortEnd + 1); $i < $long; $i++) {
+                        if ($tokens[$i]['line'] === $tokens[$shortEnd]['line']) {
+                            continue;
+                        } else if ($tokens[$i]['line'] === ($tokens[$long]['line'] - 1)) {
+                            break;
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+
+            if (preg_match('/^\p{Ll}/u', $tokens[$long]['content']) === 1) {
+                $error = 'Doc comment long description must start with a capital letter';
+                $phpcsFile->addError($error, $long, 'LongNotCapital');
+            }
+        }//end if
+
+        if (empty($tokens[$commentStart]['comment_tags']) === true) {
+            // No tags in the comment.
+            return;
+        }
+
+        $firstTag = $tokens[$commentStart]['comment_tags'][0];
+        $prev     = $phpcsFile->findPrevious($empty, ($firstTag - 1), $stackPtr, true);
+        if ($tokens[$firstTag]['line'] !== ($tokens[$prev]['line'] + 2)) {
+            $error = 'There must be exactly one blank line before the tags in a doc comment';
+            $fix   = $phpcsFile->addFixableError($error, $firstTag, 'SpacingBeforeTags');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($prev + 1); $i < $firstTag; $i++) {
+                    if ($tokens[$i]['line'] === $tokens[$firstTag]['line']) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $indent = str_repeat(' ', $tokens[$stackPtr]['column']);
+                $phpcsFile->fixer->addContent($prev, $phpcsFile->eolChar.$indent.'*'.$phpcsFile->eolChar);
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        // Break out the tags into groups and check alignment within each.
+        // A tag group is one where there are no blank lines between tags.
+        // The param tag group is special as it requires all @param tags to be inside.
+        $tagGroups    = array();
+        $groupid      = 0;
+        $paramGroupid = null;
+        foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) {
+            if ($pos > 0) {
+                $prev = $phpcsFile->findPrevious(
+                    T_DOC_COMMENT_STRING,
+                    ($tag - 1),
+                    $tokens[$commentStart]['comment_tags'][($pos - 1)]
+                );
+
+                if ($prev === false) {
+                    $prev = $tokens[$commentStart]['comment_tags'][($pos - 1)];
+                }
+
+                if ($tokens[$prev]['line'] !== ($tokens[$tag]['line'] - 1)) {
+                    $groupid++;
+                }
+            }
+
+            if ($tokens[$tag]['content'] === '@param') {
+                if (($paramGroupid === null
+                    && empty($tagGroups[$groupid]) === false)
+                    || ($paramGroupid !== null
+                    && $paramGroupid !== $groupid)
+                ) {
+                    $error = 'Parameter tags must be grouped together in a doc comment';
+                    $phpcsFile->addError($error, $tag, 'ParamGroup');
+                }
+
+                if ($paramGroupid === null) {
+                    $paramGroupid = $groupid;
+                }
+            } else if ($groupid === $paramGroupid) {
+                $error = 'Tag cannot be grouped with parameter tags in a doc comment';
+                $phpcsFile->addError($error, $tag, 'NonParamGroup');
+            }//end if
+
+            $tagGroups[$groupid][] = $tag;
+        }//end foreach
+
+        foreach ($tagGroups as $group) {
+            $maxLength = 0;
+            $paddings  = array();
+            foreach ($group as $pos => $tag) {
+                $tagLength = strlen($tokens[$tag]['content']);
+                if ($tagLength > $maxLength) {
+                    $maxLength = $tagLength;
+                }
+
+                // Check for a value. No value means no padding needed.
+                $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd);
+                if ($string !== false && $tokens[$string]['line'] === $tokens[$tag]['line']) {
+                    $paddings[$tag] = strlen($tokens[($tag + 1)]['content']);
+                }
+            }
+
+            // Check that there was single blank line after the tag block
+            // but account for a multi-line tag comments.
+            $lastTag = $group[$pos];
+            $next    = $phpcsFile->findNext(T_DOC_COMMENT_TAG, ($lastTag + 3), $commentEnd);
+            if ($next !== false) {
+                $prev = $phpcsFile->findPrevious(array(T_DOC_COMMENT_TAG, T_DOC_COMMENT_STRING), ($next - 1), $commentStart);
+                if ($tokens[$next]['line'] !== ($tokens[$prev]['line'] + 2)) {
+                    $error = 'There must be a single blank line after a tag group';
+                    $fix   = $phpcsFile->addFixableError($error, $lastTag, 'SpacingAfterTagGroup');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prev + 1); $i < $next; $i++) {
+                            if ($tokens[$i]['line'] === $tokens[$next]['line']) {
+                                break;
+                            }
+
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $indent = str_repeat(' ', $tokens[$stackPtr]['column']);
+                        $phpcsFile->fixer->addContent($prev, $phpcsFile->eolChar.$indent.'*'.$phpcsFile->eolChar);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }
+            }//end if
+
+            // Now check paddings.
+            foreach ($paddings as $tag => $padding) {
+                $required = ($maxLength - strlen($tokens[$tag]['content']) + 1);
+
+                if ($padding !== $required) {
+                    $error = 'Tag value indented incorrectly; expected %s spaces but found %s';
+                    $data  = array(
+                              $required,
+                              $padding,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, ($tag + 1), 'TagValueIndent', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($tag + 1), str_repeat(' ', $required));
+                    }
+                }
+            }
+        }//end foreach
+
+        // If there is a param group, it needs to be first.
+        if ($paramGroupid !== null && $paramGroupid !== 0) {
+            $error = 'Parameter tags must be defined first in a doc comment';
+            $phpcsFile->addError($error, $tagGroups[$paramGroupid][0], 'ParamNotFirst');
+        }
+
+        $foundTags = array();
+        foreach ($tokens[$stackPtr]['comment_tags'] as $pos => $tag) {
+            $tagName = $tokens[$tag]['content'];
+            if (isset($foundTags[$tagName]) === true) {
+                $lastTag = $tokens[$stackPtr]['comment_tags'][($pos - 1)];
+                if ($tokens[$lastTag]['content'] !== $tagName) {
+                    $error = 'Tags must be grouped together in a doc comment';
+                    $phpcsFile->addError($error, $tag, 'TagsNotGrouped');
+                }
+
+                continue;
+            }
+
+            $foundTags[$tagName] = true;
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php	(revision 5534)
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Generic_Sniffs_Commenting_FixmeSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Sam Graham <php-codesniffer@illusori.co.uk>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Commenting_FixmeSniff.
+ *
+ * Warns about FIXME comments.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Sam Graham <php-codesniffer@illusori.co.uk>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Commenting_FixmeSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$commentTokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $content = $tokens[$stackPtr]['content'];
+        $matches = array();
+        preg_match('/(?:\A|[^\p{L}]+)fixme([^\p{L}]+(.*)|\Z)/ui', $content, $matches);
+        if (empty($matches) === false) {
+            // Clear whitespace and some common characters not required at
+            // the end of a fixme message to make the error more informative.
+            $type         = 'CommentFound';
+            $fixmeMessage = trim($matches[1]);
+            $fixmeMessage = trim($fixmeMessage, '-:[](). ');
+            $error        = 'Comment refers to a FIXME task';
+            $data         = array($fixmeMessage);
+            if ($fixmeMessage !== '') {
+                $type   = 'TaskFound';
+                $error .= ' "%s"';
+            }
+
+            $phpcsFile->addError($error, $stackPtr, $type, $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Generic_Sniffs_Commenting_TodoSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Commenting_TodoSniff.
+ *
+ * Warns about TODO comments.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Commenting_TodoSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$commentTokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $content = $tokens[$stackPtr]['content'];
+        $matches = array();
+        preg_match('/(?:\A|[^\p{L}]+)todo([^\p{L}]+(.*)|\Z)/ui', $content, $matches);
+        if (empty($matches) === false) {
+            // Clear whitespace and some common characters not required at
+            // the end of a to-do message to make the warning more informative.
+            $type        = 'CommentFound';
+            $todoMessage = trim($matches[1]);
+            $todoMessage = trim($todoMessage, '-:[](). ');
+            $error       = 'Comment refers to a TODO task';
+            $data        = array($todoMessage);
+            if ($todoMessage !== '') {
+                $type   = 'TaskFound';
+                $error .= ' "%s"';
+            }
+
+            $phpcsFile->addWarning($error, $stackPtr, $type, $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php	(revision 5534)
@@ -0,0 +1,241 @@
+<?php
+/**
+ * Generic_Sniffs_ControlStructures_InlineControlStructureSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_ControlStructures_InlineControlStructureSniff.
+ *
+ * Verifies that inline control statements are not present.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_ControlStructures_InlineControlStructureSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = true;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_ELSE,
+                T_ELSEIF,
+                T_FOREACH,
+                T_WHILE,
+                T_DO,
+                T_SWITCH,
+                T_FOR,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === true) {
+            $phpcsFile->recordMetric($stackPtr, 'Control structure defined inline', 'no');
+            return;
+        }
+
+        // Ignore the ELSE in ELSE IF. We'll process the IF part later.
+        if ($tokens[$stackPtr]['code'] === T_ELSE) {
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+            if ($tokens[$next]['code'] === T_IF) {
+                return;
+            }
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_WHILE) {
+            // This could be from a DO WHILE, which doesn't have an opening brace.
+            $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+            if ($tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) {
+                $brace = $tokens[$lastContent];
+                if (isset($brace['scope_condition']) === true) {
+                    $condition = $tokens[$brace['scope_condition']];
+                    if ($condition['code'] === T_DO) {
+                        return;
+                    }
+                }
+            }
+
+            // In Javascript DO WHILE loops without curly braces are legal. This
+            // is only valid if a single statement is present between the DO and
+            // the WHILE. We can detect this by checking only a single semicolon
+            // is present between them.
+            if ($phpcsFile->tokenizerType === 'JS') {
+                $lastDo        = $phpcsFile->findPrevious(T_DO, ($stackPtr - 1));
+                $lastSemicolon = $phpcsFile->findPrevious(T_SEMICOLON, ($stackPtr - 1));
+                if ($lastDo !== false && $lastSemicolon !== false && $lastDo < $lastSemicolon) {
+                    $precedingSemicolon = $phpcsFile->findPrevious(T_SEMICOLON, ($lastSemicolon - 1));
+                    if ($precedingSemicolon === false || $precedingSemicolon < $lastDo) {
+                        return;
+                    }
+                }
+            }
+        }//end if
+
+        // This is a control structure without an opening brace,
+        // so it is an inline statement.
+        if ($this->error === true) {
+            $fix = $phpcsFile->addFixableError('Inline control structures are not allowed', $stackPtr, 'NotAllowed');
+        } else {
+            $fix = $phpcsFile->addFixableWarning('Inline control structures are discouraged', $stackPtr, 'Discouraged');
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Control structure defined inline', 'yes');
+
+        if ($fix === true) {
+            $phpcsFile->fixer->beginChangeset();
+            if (isset($tokens[$stackPtr]['parenthesis_closer']) === true) {
+                $closer = $tokens[$stackPtr]['parenthesis_closer'];
+            } else {
+                $closer = $stackPtr;
+            }
+
+            if ($tokens[($closer + 1)]['code'] === T_WHITESPACE
+                || $tokens[($closer + 1)]['code'] === T_SEMICOLON
+            ) {
+                $phpcsFile->fixer->addContent($closer, ' {');
+            } else {
+                $phpcsFile->fixer->addContent($closer, ' { ');
+            }
+
+            $lastNonEmpty = $closer;
+            for ($end = ($closer + 1); $end < $phpcsFile->numTokens; $end++) {
+                if ($tokens[$end]['code'] === T_SEMICOLON) {
+                    break;
+                }
+
+                if ($tokens[$end]['code'] === T_CLOSE_TAG) {
+                    $end = $lastNonEmpty;
+                    break;
+                }
+
+                if (isset($tokens[$end]['scope_opener']) === true) {
+                    $type = $tokens[$end]['code'];
+                    $end  = $tokens[$end]['scope_closer'];
+                    if ($type === T_DO || $type === T_IF || $type === T_ELSEIF) {
+                        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($end + 1), null, true);
+                        if ($next === false) {
+                            break;
+                        }
+
+                        $nextType = $tokens[$next]['code'];
+
+                        // Let additional conditions loop and find their ending.
+                        if (($type === T_IF
+                            || $type === T_ELSEIF)
+                            && ($nextType === T_ELSEIF
+                            || $nextType === T_ELSE)
+                        ) {
+                            continue;
+                        }
+
+                        // Account for DO... WHILE conditions.
+                        if ($type === T_DO && $nextType === T_WHILE) {
+                            $end = $phpcsFile->findNext(T_SEMICOLON, ($next + 1));
+                        }
+                    }//end if
+
+                    break;
+                }//end if
+
+                if ($tokens[$end]['code'] !== T_WHITESPACE) {
+                    $lastNonEmpty = $end;
+                }
+            }//end for
+
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($closer + 1), ($end + 1), true);
+
+            // Account for a comment on the end of the line.
+            for ($endLine = $end; $endLine < $phpcsFile->numTokens; $endLine++) {
+                if (isset($tokens[($endLine + 1)]) === false
+                    || $tokens[$endLine]['line'] !== $tokens[($endLine + 1)]['line']
+                ) {
+                    break;
+                }
+            }
+
+            if ($tokens[$endLine]['code'] !== T_COMMENT) {
+                $endLine = $end;
+            }
+
+            if ($next !== $end) {
+                if ($endLine !== $end) {
+                    $phpcsFile->fixer->addContent($endLine, '}');
+                } else {
+                    if ($tokens[$end]['code'] !== T_SEMICOLON
+                        && $tokens[$end]['code'] !== T_CLOSE_CURLY_BRACKET
+                    ) {
+                        $phpcsFile->fixer->addContent($end, ';');
+                    }
+
+                    $phpcsFile->fixer->addContent($end, ' }');
+                }
+            } else {
+                if ($endLine !== $end) {
+                    $phpcsFile->fixer->replaceToken($end, '');
+                    $phpcsFile->fixer->addNewlineBefore($endLine);
+                    $phpcsFile->fixer->addContent($endLine, '}');
+                } else {
+                    $phpcsFile->fixer->replaceToken($end, '}');
+                }
+            }//end if
+
+            $phpcsFile->fixer->endChangeset();
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/CSSLintSniff.php	(revision 5534)
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Generic_Sniffs_Debug_CSSLintSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Roman Levishchenko <index.0h@gmail.com>
+ * @copyright 2013-2014 Roman Levishchenko
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Debug_CSSLintSniff.
+ *
+ * Runs csslint on the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Roman Levishchenko <index.0h@gmail.com>
+ * @copyright 2013-2014 Roman Levishchenko
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Debug_CSSLintSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName = $phpcsFile->getFilename();
+
+        $csslintPath = PHP_CodeSniffer::getConfigData('csslint_path');
+        if ($csslintPath === null) {
+            return;
+        }
+
+        $cmd = $csslintPath.' '.escapeshellarg($fileName);
+        exec($cmd, $output, $retval);
+
+        if (is_array($output) === false) {
+            return;
+        }
+
+        $count = count($output);
+
+        for ($i = 0; $i < $count; $i++) {
+            $matches    = array();
+            $numMatches = preg_match(
+                '/(error|warning) at line (\d+)/',
+                $output[$i],
+                $matches
+            );
+
+            if ($numMatches === 0) {
+                continue;
+            }
+
+            $line    = (int) $matches[2];
+            $message = 'csslint says: '.$output[($i + 1)];
+            // First line is message with error line and error code.
+            // Second is error message.
+            // Third is wrong line in file.
+            // Fourth is empty line.
+            $i += 4;
+
+            $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool');
+        }//end for
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php	(revision 5534)
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Generic_Sniffs_Debug_ClosureLinterSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Debug_ClosureLinterSniff.
+ *
+ * Runs gjslint on the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Debug_ClosureLinterSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of error codes that should show errors.
+     *
+     * All other error codes will show warnings.
+     *
+     * @var int
+     */
+    public $errorCodes = array();
+
+    /**
+     * A list of error codes to ignore.
+     *
+     * @var int
+     */
+    public $ignoreCodes = array();
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     * @throws PHP_CodeSniffer_Exception If jslint.js could not be run
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName = $phpcsFile->getFilename();
+
+        $lintPath = PHP_CodeSniffer::getConfigData('gjslint_path');
+        if ($lintPath === null) {
+            return;
+        }
+
+        $cmd = "$lintPath --nosummary --notime --unix_mode \"$fileName\"";
+        $msg = exec($cmd, $output, $retval);
+
+        if (is_array($output) === false) {
+            return;
+        }
+
+        foreach ($output as $finding) {
+            $matches    = array();
+            $numMatches = preg_match('/^(.*):([0-9]+):\(.*?([0-9]+)\)(.*)$/', $finding, $matches);
+            if ($numMatches === 0) {
+                continue;
+            }
+
+            // Skip error codes we are ignoring.
+            $code = $matches[3];
+            if (in_array($code, $this->ignoreCodes) === true) {
+                continue;
+            }
+
+            $line  = (int) $matches[2];
+            $error = trim($matches[4]);
+
+            $message = 'gjslint says: (%s) %s';
+            $data    = array(
+                        $code,
+                        $error,
+                       );
+            if (in_array($code, $this->errorCodes) === true) {
+                $phpcsFile->addErrorOnLine($message, $line, 'ExternalToolError', $data);
+            } else {
+                $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool', $data);
+            }
+        }//end foreach
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/JSHintSniff.php	(revision 5534)
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Generic_Sniffs_Debug_JSHintSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Alexander WeiÂ§ <aweisswa@gmx.de>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Debug_JSHintSniff.
+ *
+ * Runs jshint.js on the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Alexander WeiÂ§ <aweisswa@gmx.de>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Debug_JSHintSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     * @throws PHP_CodeSniffer_Exception If jshint.js could not be run
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName = $phpcsFile->getFilename();
+
+        $rhinoPath  = PHP_CodeSniffer::getConfigData('rhino_path');
+        $jshintPath = PHP_CodeSniffer::getConfigData('jshint_path');
+        if ($rhinoPath === null || $jshintPath === null) {
+            return;
+        }
+
+        $cmd = "$rhinoPath \"$jshintPath\" \"$fileName\"";
+        $msg = exec($cmd, $output, $retval);
+
+        if (is_array($output) === true) {
+            foreach ($output as $finding) {
+                $matches    = array();
+                $numMatches = preg_match('/^(.+)\(.+:([0-9]+).*:[0-9]+\)$/', $finding, $matches);
+                if ($numMatches === 0) {
+                    continue;
+                }
+
+                $line    = (int) $matches[2];
+                $message = 'jshint says: '.trim($matches[1]);
+                $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool');
+            }
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php	(revision 5534)
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Generic_Sniffs_Files_ByteOrderMarkSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_ByteOrderMarkSniff.
+ *
+ * A simple sniff for detecting BOMs that may corrupt application work.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Piotr Karas <office@mediaself.pl>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2010-2014 mediaSELF Sp. z o.o.
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ * @see       http://en.wikipedia.org/wiki/Byte_order_mark
+ */
+class Generic_Sniffs_Files_ByteOrderMarkSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * List of supported BOM definitions.
+     *
+     * Use encoding names as keys and hex BOM representations as values.
+     *
+     * @var array
+     */
+    public $bomDefinitions = array(
+                              'UTF-8'       => 'efbbbf',
+                              'UTF-16 (BE)' => 'feff',
+                              'UTF-16 (LE)' => 'fffe',
+                             );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_INLINE_HTML);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // The BOM will be the very first token in the file.
+        if ($stackPtr !== 0) {
+            return;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        foreach ($this->bomDefinitions as $bomName => $expectedBomHex) {
+            $bomByteLength = (strlen($expectedBomHex) / 2);
+            $htmlBomHex    = bin2hex(substr($tokens[$stackPtr]['content'], 0, $bomByteLength));
+            if ($htmlBomHex === $expectedBomHex) {
+                $errorData = array($bomName);
+                $error     = 'File contains %s byte order mark, which may corrupt your application';
+                $phpcsFile->addError($error, $stackPtr, 'Found', $errorData);
+                $phpcsFile->recordMetric($stackPtr, 'Using byte order mark', 'yes');
+                return;
+            }
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Using byte order mark', 'no');
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php	(revision 5534)
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Generic_Sniffs_Files_EndFileNewlineSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_EndFileNewlineSniff.
+ *
+ * Ensures the file ends with a newline character.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_EndFileNewlineSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                   'CSS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // Skip to the end of the file.
+        $tokens   = $phpcsFile->getTokens();
+        $stackPtr = ($phpcsFile->numTokens - 1);
+
+        if ($phpcsFile->tokenizerType !== 'PHP') {
+            $stackPtr--;
+        }
+
+        $eolCharLen = strlen($phpcsFile->eolChar);
+        $lastChars  = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1));
+        if ($lastChars !== $phpcsFile->eolChar) {
+            $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'no');
+
+            $error = 'File must end with a newline character';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NotFound');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($stackPtr);
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'yes');
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php	(revision 5534)
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Generic_Sniffs_Files_EndFileNoNewlineSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_EndFileNoNewlineSniff.
+ *
+ * Ensures the file does not end with a newline character.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_EndFileNoNewlineSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                   'CSS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // Skip to the end of the file.
+        $tokens   = $phpcsFile->getTokens();
+        $stackPtr = ($phpcsFile->numTokens - 1);
+
+        if ($phpcsFile->tokenizerType !== 'PHP') {
+            $stackPtr--;
+        }
+
+        $eolCharLen = strlen($phpcsFile->eolChar);
+        $lastChars  = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1));
+        if ($lastChars === $phpcsFile->eolChar) {
+            $error = 'File must not end with a newline character';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
+            if ($fix === true) {
+                $newContent = substr($tokens[$stackPtr]['content'], 0, ($eolCharLen * -1));
+                $phpcsFile->fixer->replaceToken($stackPtr, $newContent);
+            }
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php	(revision 5534)
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Generic_Sniffs_Files_InlineHTMLSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_InlineHTMLSniff.
+ *
+ * Ensures the whole file is PHP only, with no whitespace or inline HTML anywhere
+ * in the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_InlineHTMLSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_INLINE_HTML);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // Ignore shebang lines.
+        $tokens = $phpcsFile->getTokens();
+        if (substr($tokens[$stackPtr]['content'], 0, 2) === '#!') {
+            return;
+        }
+
+        $error = 'PHP files must only contain PHP code';
+        $phpcsFile->addError($error, $stackPtr, 'Found');
+
+        return $phpcsFile->numTokens;
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php	(revision 5534)
@@ -0,0 +1,145 @@
+<?php
+/**
+ * Generic_Sniffs_Files_LineEndingsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_LineEndingsSniff.
+ *
+ * Checks that end of line characters are correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_LineEndingsSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                   'CSS',
+                                  );
+
+    /**
+     * The valid EOL character.
+     *
+     * @var string
+     */
+    public $eolChar = '\n';
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $found = $phpcsFile->eolChar;
+        $found = str_replace("\n", '\n', $found);
+        $found = str_replace("\r", '\r', $found);
+
+        $phpcsFile->recordMetric($stackPtr, 'EOL char', $found);
+
+        if ($found === $this->eolChar) {
+            // Ignore the rest of the file.
+            return ($phpcsFile->numTokens + 1);
+        }
+
+        // Check for single line files without an EOL. This is a very special
+        // case and the EOL char is set to \n when this happens.
+        if ($found === '\n') {
+            $tokens    = $phpcsFile->getTokens();
+            $lastToken = ($phpcsFile->numTokens - 1);
+            if ($tokens[$lastToken]['line'] === 1
+                && $tokens[$lastToken]['content'] !== "\n"
+            ) {
+                return;
+            }
+        }
+
+        $error    = 'End of line character is invalid; expected "%s" but found "%s"';
+        $expected = $this->eolChar;
+        $expected = str_replace("\n", '\n', $expected);
+        $expected = str_replace("\r", '\r', $expected);
+        $data     = array(
+                     $expected,
+                     $found,
+                    );
+
+        // Errors are always reported on line 1, no matter where the first PHP tag is.
+        $fix = $phpcsFile->addFixableError($error, 0, 'InvalidEOLChar', $data);
+
+        if ($fix === true) {
+            $tokens = $phpcsFile->getTokens();
+            switch ($this->eolChar) {
+            case '\n':
+                $eolChar = "\n";
+                break;
+            case '\r':
+                $eolChar = "\r";
+                break;
+            case '\r\n':
+                $eolChar = "\r\n";
+                break;
+            default:
+                $eolChar = $this->eolChar;
+                break;
+            }
+
+            for ($i = 0; $i < $phpcsFile->numTokens; $i++) {
+                if (isset($tokens[($i + 1)]) === false
+                    || $tokens[($i + 1)]['line'] > $tokens[$i]['line']
+                ) {
+                    // Token is the last on a line.
+                    $newContent  = rtrim($tokens[$i]['content'], "\r\n");
+                    $newContent .= $eolChar;
+                    $phpcsFile->fixer->replaceToken($i, $newContent);
+                }
+            }
+        }//end if
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php	(revision 5534)
@@ -0,0 +1,153 @@
+<?php
+/**
+ * Generic_Sniffs_Files_LineLengthSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_LineLengthSniff.
+ *
+ * Checks all lines in the file, and throws warnings if they are over 80
+ * characters in length and errors if they are over 100. Both these
+ * figures can be changed by extending this sniff in your own standard.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_LineLengthSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The limit that the length of a line should not exceed.
+     *
+     * @var int
+     */
+    public $lineLimit = 80;
+
+    /**
+     * The limit that the length of a line must not exceed.
+     *
+     * Set to zero (0) to disable.
+     *
+     * @var int
+     */
+    public $absoluteLineLimit = 100;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        for ($i = 1; $i < $phpcsFile->numTokens; $i++) {
+            if ($tokens[$i]['column'] === 1) {
+                $this->checkLineLength($phpcsFile, $tokens, $i);
+            }
+        }
+
+        $this->checkLineLength($phpcsFile, $tokens, $i);
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+    /**
+     * Checks if a line is too long.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tokens    The token stack.
+     * @param int                  $stackPtr  The first token on the next line.
+     *
+     * @return null|false
+     */
+    protected function checkLineLength(PHP_CodeSniffer_File $phpcsFile, $tokens, $stackPtr)
+    {
+        // The passed token is the first on the line.
+        $stackPtr--;
+
+        if ($tokens[$stackPtr]['column'] === 1
+            && $tokens[$stackPtr]['length'] === 0
+        ) {
+            // Blank line.
+            return;
+        }
+
+        if ($tokens[$stackPtr]['column'] !== 1
+            && $tokens[$stackPtr]['content'] === $phpcsFile->eolChar
+        ) {
+            $stackPtr--;
+        }
+
+        $lineLength = ($tokens[$stackPtr]['column'] + $tokens[$stackPtr]['length'] - 1);
+
+        // Record metrics for common line length groupings.
+        if ($lineLength <= 80) {
+            $phpcsFile->recordMetric($stackPtr, 'Line length', '80 or less');
+        } else if ($lineLength <= 120) {
+            $phpcsFile->recordMetric($stackPtr, 'Line length', '81-120');
+        } else if ($lineLength <= 150) {
+            $phpcsFile->recordMetric($stackPtr, 'Line length', '121-150');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Line length', '151 or more');
+        }
+
+        if ($this->absoluteLineLimit > 0
+            && $lineLength > $this->absoluteLineLimit
+        ) {
+            $data = array(
+                     $this->absoluteLineLimit,
+                     $lineLength,
+                    );
+
+            $error = 'Line exceeds maximum limit of %s characters; contains %s characters';
+            $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
+        } else if ($lineLength > $this->lineLimit) {
+            $data = array(
+                     $this->lineLimit,
+                     $lineLength,
+                    );
+
+            $warning = 'Line exceeds %s characters; contains %s characters';
+            $phpcsFile->addWarning($warning, $stackPtr, 'TooLong', $data);
+        }
+
+    }//end checkLineLength()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php	(revision 5534)
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Generic_Sniffs_Files_LowercasedFilenameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks that all file names are lowercased.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_LowercasedFilenameSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $filename = $phpcsFile->getFilename();
+        if ($filename === 'STDIN') {
+            return;
+        }
+
+        $filename          = basename($filename);
+        $lowercaseFilename = strtolower($filename);
+        if ($filename !== $lowercaseFilename) {
+            $data  = array(
+                      $filename,
+                      $lowercaseFilename,
+                     );
+            $error = 'Filename "%s" doesn\'t match the expected filename "%s"';
+            $phpcsFile->addError($error, $stackPtr, 'NotFound', $data);
+            $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'no');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'yes');
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Generic_Sniffs_Files_OneClassPerFileSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks that only one class is declared per file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_OneClassPerFileSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_CLASS);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1));
+        if ($nextClass !== false) {
+            $error = 'Only one class is allowed in a file';
+            $phpcsFile->addError($error, $nextClass, 'MultipleFound');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Generic_Sniffs_Files_OneInterfacePerFileSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks that only one interface is declared per file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_OneInterfacePerFileSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_INTERFACE);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $nextInterface = $phpcsFile->findNext($this->register(), ($stackPtr + 1));
+        if ($nextInterface !== false) {
+            $error = 'Only one interface is allowed in a file';
+            $phpcsFile->addError($error, $nextInterface, 'MultipleFound');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Generic_Sniffs_Files_OneTraitPerFileSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Alexander Obuhovich <aik.bold@gmail.com>
+ * @copyright 2010-2014 Alexander Obuhovich
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks that only one trait is declared per file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Alexander Obuhovich <aik.bold@gmail.com>
+ * @copyright 2010-2014 Alexander Obuhovich
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Files_OneTraitPerFileSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_TRAIT);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1));
+        if ($nextClass !== false) {
+            $error = 'Only one trait is allowed in a file';
+            $phpcsFile->addError($error, $nextClass, 'MultipleFound');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php	(revision 5534)
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff.
+ *
+ * Ensures each statement is on a line by itself.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_SEMICOLON);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $prev = $phpcsFile->findPrevious(array(T_SEMICOLON, T_OPEN_TAG), ($stackPtr - 1));
+        if ($prev === false || $tokens[$prev]['code'] === T_OPEN_TAG) {
+            $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'no');
+            return;
+        }
+
+        // Ignore multiple statements in a FOR condition.
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            foreach ($tokens[$stackPtr]['nested_parenthesis'] as $bracket) {
+                if (isset($tokens[$bracket]['parenthesis_owner']) === false) {
+                    // Probably a closure sitting inside a function call.
+                    continue;
+                }
+
+                $owner = $tokens[$bracket]['parenthesis_owner'];
+                if ($tokens[$owner]['code'] === T_FOR) {
+                    return;
+                }
+            }
+        }
+
+        if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) {
+            $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'yes');
+
+            $error = 'Each PHP statement must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SameLine');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addNewline($prev);
+                if ($tokens[($prev + 1)]['code'] === T_WHITESPACE) {
+                    $phpcsFile->fixer->replaceToken(($prev + 1), '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'no');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php	(revision 5534)
@@ -0,0 +1,326 @@
+<?php
+/**
+ * Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff.
+ *
+ * Checks alignment of assignments. If there are multiple adjacent assignments,
+ * it will check that the equals signs of each assignment are aligned. It will
+ * display a warning to advise that the signs should be aligned.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = false;
+
+    /**
+     * The maximum amount of padding before the alignment is ignored.
+     *
+     * If the amount of padding required to align this assignment with the
+     * surrounding assignments exceeds this number, the assignment will be
+     * ignored and no errors or warnings will be thrown.
+     *
+     * @var int
+     */
+    public $maxPadding = 1000;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        $tokens = PHP_CodeSniffer_Tokens::$assignmentTokens;
+        unset($tokens[T_DOUBLE_ARROW]);
+        return $tokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore assignments used in a condition, like an IF or FOR.
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            foreach ($tokens[$stackPtr]['nested_parenthesis'] as $start => $end) {
+                if (isset($tokens[$start]['parenthesis_owner']) === true) {
+                    return;
+                }
+            }
+        }
+
+        $lastAssign = $this->checkAlignment($phpcsFile, $stackPtr);
+        return ($lastAssign + 1);
+
+    }//end process()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function checkAlignment(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $assignments = array();
+        $prevAssign  = null;
+        $lastLine    = $tokens[$stackPtr]['line'];
+        $maxPadding  = null;
+        $stopped     = null;
+        $lastCode    = $stackPtr;
+        $lastSemi    = null;
+
+        $find = PHP_CodeSniffer_Tokens::$assignmentTokens;
+        unset($find[T_DOUBLE_ARROW]);
+
+        for ($assign = $stackPtr; $assign < $phpcsFile->numTokens; $assign++) {
+            if (isset($find[$tokens[$assign]['code']]) === false) {
+                // A blank line indicates that the assignment block has ended.
+                if (isset(PHP_CodeSniffer_tokens::$emptyTokens[$tokens[$assign]['code']]) === false) {
+                    if (($tokens[$assign]['line'] - $tokens[$lastCode]['line']) > 1) {
+                        break;
+                    }
+
+                    $lastCode = $assign;
+
+                    if ($tokens[$assign]['code'] === T_SEMICOLON) {
+                        if ($tokens[$assign]['conditions'] === $tokens[$stackPtr]['conditions']) {
+                            if ($lastSemi !== null && $prevAssign !== null && $lastSemi > $prevAssign) {
+                                // This statement did not have an assignment operator in it.
+                                break;
+                            } else {
+                                $lastSemi = $assign;
+                            }
+                        } else {
+                            // Statement is in a different context, so the block is over.
+                            break;
+                        }
+                    }
+                }//end if
+
+                continue;
+            } else if ($assign !== $stackPtr && $tokens[$assign]['line'] === $lastLine) {
+                // Skip multiple assignments on the same line. We only need to
+                // try and align the first assignment.
+                continue;
+            }//end if
+
+            if ($assign !== $stackPtr) {
+                // Has to be nested inside the same conditions as the first assignment.
+                if ($tokens[$assign]['conditions'] !== $tokens[$stackPtr]['conditions']) {
+                    break;
+                }
+
+                // Make sure it is not assigned inside a condition (eg. IF, FOR).
+                if (isset($tokens[$assign]['nested_parenthesis']) === true) {
+                    foreach ($tokens[$assign]['nested_parenthesis'] as $start => $end) {
+                        if (isset($tokens[$start]['parenthesis_owner']) === true) {
+                            break(2);
+                        }
+                    }
+                }
+            }//end if
+
+            $var = $phpcsFile->findPrevious(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($assign - 1),
+                null,
+                true
+            );
+
+            // Make sure we wouldn't break our max padding length if we
+            // aligned with this statement, or they wouldn't break the max
+            // padding length if they aligned with us.
+            $varEnd    = $tokens[($var + 1)]['column'];
+            $assignLen = $tokens[$assign]['length'];
+            if ($assign !== $stackPtr) {
+                if (($varEnd + 1) > $assignments[$prevAssign]['assign_col']) {
+                    $padding      = 1;
+                    $assignColumn = ($varEnd + 1);
+                } else {
+                    $padding = ($assignments[$prevAssign]['assign_col'] - $varEnd + $assignments[$prevAssign]['assign_len'] - $assignLen);
+                    if ($padding === 0) {
+                        $padding = 1;
+                    }
+
+                    if ($padding > $this->maxPadding) {
+                        $stopped = $assign;
+                        break;
+                    }
+
+                    $assignColumn = ($varEnd + $padding);
+                }//end if
+
+                if (($assignColumn + $assignLen) > ($assignments[$maxPadding]['assign_col'] + $assignments[$maxPadding]['assign_len'])) {
+                    $newPadding = ($varEnd - $assignments[$maxPadding]['var_end'] + $assignLen - $assignments[$maxPadding]['assign_len'] + 1);
+                    if ($newPadding > $this->maxPadding) {
+                        $stopped = $assign;
+                        break;
+                    } else {
+                        // New alignment settings for previous assignments.
+                        foreach ($assignments as $i => $data) {
+                            if ($i === $assign) {
+                                break;
+                            }
+
+                            $newPadding = ($varEnd - $data['var_end'] + $assignLen - $data['assign_len'] + 1);
+                            $assignments[$i]['expected']   = $newPadding;
+                            $assignments[$i]['assign_col'] = ($data['var_end'] + $newPadding);
+                        }
+
+                        $padding      = 1;
+                        $assignColumn = ($varEnd + 1);
+                    }
+                } else if ($padding > $assignments[$maxPadding]['expected']) {
+                    $maxPadding = $assign;
+                }//end if
+            } else {
+                $padding      = 1;
+                $assignColumn = ($varEnd + 1);
+                $maxPadding   = $assign;
+            }//end if
+
+            $found = 0;
+            if ($tokens[($var + 1)]['code'] === T_WHITESPACE) {
+                $found = $tokens[($var + 1)]['length'];
+                if ($found === 0) {
+                    // This means a newline was found.
+                    $found = 1;
+                }
+            }
+
+            $assignments[$assign] = array(
+                                     'var_end'    => $varEnd,
+                                     'assign_len' => $assignLen,
+                                     'assign_col' => $assignColumn,
+                                     'expected'   => $padding,
+                                     'found'      => $found,
+                                    );
+
+            $lastLine   = $tokens[$assign]['line'];
+            $prevAssign = $assign;
+        }//end for
+
+        if (empty($assignments) === true) {
+            return $stackPtr;
+        }
+
+        $errorGenerated = false;
+        foreach ($assignments as $assignment => $data) {
+            if ($data['found'] === $data['expected']) {
+                continue;
+            }
+
+            $expectedText = $data['expected'].' space';
+            if ($data['expected'] !== 1) {
+                $expectedText .= 's';
+            }
+
+            if ($data['found'] === null) {
+                $foundText = 'a new line';
+            } else {
+                $foundText = $data['found'].' space';
+                if ($data['found'] !== 1) {
+                    $foundText .= 's';
+                }
+            }
+
+            if (count($assignments) === 1) {
+                $type  = 'Incorrect';
+                $error = 'Equals sign not aligned correctly; expected %s but found %s';
+            } else {
+                $type  = 'NotSame';
+                $error = 'Equals sign not aligned with surrounding assignments; expected %s but found %s';
+            }
+
+            $errorData = array(
+                          $expectedText,
+                          $foundText,
+                         );
+
+            if ($this->error === true) {
+                $fix = $phpcsFile->addFixableError($error, $assignment, $type, $errorData);
+            } else {
+                $fix = $phpcsFile->addFixableWarning($error, $assignment, $type.'Warning', $errorData);
+            }
+
+            $errorGenerated = true;
+
+            if ($fix === true && $data['found'] !== null) {
+                $newContent = str_repeat(' ', $data['expected']);
+                if ($data['found'] === 0) {
+                    $phpcsFile->fixer->addContentBefore($assignment, $newContent);
+                } else {
+                    $phpcsFile->fixer->replaceToken(($assignment - 1), $newContent);
+                }
+            }
+        }//end foreach
+
+        if ($errorGenerated === true) {
+            $phpcsFile->recordMetric($stackPtr, 'Adjacent assignments aligned', 'no');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Adjacent assignments aligned', 'yes');
+        }
+
+        if ($stopped !== null) {
+            return $this->checkAlignment($phpcsFile, $stopped);
+        } else {
+            return $assignment;
+        }
+
+    }//end checkAlignment()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Generic_Sniffs_Formatting_NoSpaceAfterCastSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Formatting_NoSpaceAfterCastSniff.
+ *
+ * Ensures there is no space after cast tokens.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Formatting_NoSpaceAfterCastSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$castTokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            return;
+        }
+
+        $error = 'A cast statement must not be followed by a space';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceFound');
+        if ($fix === true) {
+            $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Generic_Sniffs_Formatting_SpaceAfterCastSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Formatting_SpaceAfterCastSniff.
+ *
+ * Ensures there is a single space after cast tokens.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Formatting_SpaceAfterCastSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$castTokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $error = 'A cast statement must be followed by a single space';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpace');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($stackPtr, ' ');
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', 0);
+            return;
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', $tokens[($stackPtr + 1)]['length']);
+
+        if ($tokens[($stackPtr + 1)]['length'] !== 1) {
+            $error = 'A cast statement must be followed by a single space';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpace');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php	(revision 5534)
@@ -0,0 +1,152 @@
+<?php
+/**
+ * Generic_Sniffs_Functions_CallTimePassByReferenceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Florian Grandel <jerico.dev@gmail.com>
+ * @copyright 2009-2014 Florian Grandel
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Functions_CallTimePassByReferenceSniff.
+ *
+ * Ensures that variables are not passed by reference when calling a function.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Florian Grandel <jerico.dev@gmail.com>
+ * @copyright 2009-2014 Florian Grandel
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Functions_CallTimePassByReferenceSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_STRING,
+                T_VARIABLE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $findTokens = array_merge(
+            PHP_CodeSniffer_Tokens::$emptyTokens,
+            array(T_BITWISE_AND)
+        );
+
+        $prev = $phpcsFile->findPrevious($findTokens, ($stackPtr - 1), null, true);
+
+        // Skip tokens that are the names of functions or classes
+        // within their definitions. For example: function myFunction...
+        // "myFunction" is T_STRING but we should skip because it is not a
+        // function or method *call*.
+        // Also skip if the return value is being assigned to a variable.
+        $prevCode = $tokens[$prev]['code'];
+        if ($prevCode === T_FUNCTION
+            || $prevCode === T_CLASS
+            || isset(PHP_CodeSniffer_Tokens::$assignmentTokens[$prevCode]) === true
+        ) {
+            return;
+        }
+
+        // If the next non-whitespace token after the function or method call
+        // is not an opening parenthesis then it cant really be a *call*.
+        $functionName = $stackPtr;
+        $openBracket  = $phpcsFile->findNext(
+            PHP_CodeSniffer_Tokens::$emptyTokens,
+            ($functionName + 1),
+            null,
+            true
+        );
+
+        if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) {
+            return;
+        }
+
+        if (isset($tokens[$openBracket]['parenthesis_closer']) === false) {
+            return;
+        }
+
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+
+        $nextSeparator = $openBracket;
+        while (($nextSeparator = $phpcsFile->findNext(T_VARIABLE, ($nextSeparator + 1), $closeBracket)) !== false) {
+            if (isset($tokens[$nextSeparator]['nested_parenthesis']) === false) {
+                continue;
+            }
+
+            // Make sure the variable belongs directly to this function call
+            // and is not inside a nested function call or array.
+            $brackets    = $tokens[$nextSeparator]['nested_parenthesis'];
+            $lastBracket = array_pop($brackets);
+            if ($lastBracket !== $closeBracket) {
+                continue;
+            }
+
+            // Checking this: $value = my_function(...[*]$arg...).
+            $tokenBefore = $phpcsFile->findPrevious(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($nextSeparator - 1),
+                null,
+                true
+            );
+
+            if ($tokens[$tokenBefore]['code'] === T_BITWISE_AND) {
+                // Checking this: $value = my_function(...[*]&$arg...).
+                $tokenBefore = $phpcsFile->findPrevious(
+                    PHP_CodeSniffer_Tokens::$emptyTokens,
+                    ($tokenBefore - 1),
+                    null,
+                    true
+                );
+
+                // We have to exclude all uses of T_BITWISE_AND that are not
+                // references. We use a blacklist approach as we prefer false
+                // positives to not identifying a pass-by-reference call at all.
+                $tokenCode = $tokens[$tokenBefore]['code'];
+                if ($tokenCode === T_VARIABLE
+                    || $tokenCode === T_CLOSE_PARENTHESIS
+                    || $tokenCode === T_LNUMBER
+                    || isset(PHP_CodeSniffer_Tokens::$assignmentTokens[$tokenCode]) === true
+                ) {
+                    continue;
+                }
+
+                // T_BITWISE_AND represents a pass-by-reference.
+                $error = 'Call-time pass-by-reference calls are prohibited';
+                $phpcsFile->addError($error, $tokenBefore, 'NotAllowed');
+            }//end if
+        }//end while
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php	(revision 5534)
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff.
+ *
+ * Checks that calls to methods and functions are spaced correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Skip tokens that are the names of functions or classes
+        // within their definitions. For example:
+        // function myFunction...
+        // "myFunction" is T_STRING but we should skip because it is not a
+        // function or method *call*.
+        $functionName    = $stackPtr;
+        $ignoreTokens    = PHP_CodeSniffer_Tokens::$emptyTokens;
+        $ignoreTokens[]  = T_BITWISE_AND;
+        $functionKeyword = $phpcsFile->findPrevious($ignoreTokens, ($stackPtr - 1), null, true);
+        if ($tokens[$functionKeyword]['code'] === T_FUNCTION || $tokens[$functionKeyword]['code'] === T_CLASS) {
+            return;
+        }
+
+        // If the next non-whitespace token after the function or method call
+        // is not an opening parenthesis then it cant really be a *call*.
+        $openBracket = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($functionName + 1), null, true);
+        if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) {
+            return;
+        }
+
+        if (isset($tokens[$openBracket]['parenthesis_closer']) === false) {
+            return;
+        }
+
+        $closeBracket  = $tokens[$openBracket]['parenthesis_closer'];
+        $nextSeparator = $openBracket;
+
+        $find = array(
+                 T_COMMA,
+                 T_VARIABLE,
+                 T_CLOSURE,
+                 T_OPEN_SHORT_ARRAY,
+                );
+
+        while (($nextSeparator = $phpcsFile->findNext($find, ($nextSeparator + 1), $closeBracket)) !== false) {
+            if ($tokens[$nextSeparator]['code'] === T_CLOSURE) {
+                // Skip closures.
+                $nextSeparator = $tokens[$nextSeparator]['scope_closer'];
+                continue;
+            } else if ($tokens[$nextSeparator]['code'] === T_OPEN_SHORT_ARRAY) {
+                // Skips arrays using short notation.
+                $nextSeparator = $tokens[$nextSeparator]['bracket_closer'];
+                continue;
+            }
+
+            // Make sure the comma or variable belongs directly to this function call,
+            // and is not inside a nested function call or array.
+            $brackets    = $tokens[$nextSeparator]['nested_parenthesis'];
+            $lastBracket = array_pop($brackets);
+            if ($lastBracket !== $closeBracket) {
+                continue;
+            }
+
+            if ($tokens[$nextSeparator]['code'] === T_COMMA) {
+                if ($tokens[($nextSeparator - 1)]['code'] === T_WHITESPACE) {
+                    if (isset(PHP_CodeSniffer_Tokens::$heredocTokens[$tokens[($nextSeparator - 2)]['code']]) === false) {
+                        $error = 'Space found before comma in function call';
+                        $fix   = $phpcsFile->addFixableError($error, $nextSeparator, 'SpaceBeforeComma');
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($nextSeparator - 1), '');
+                        }
+                    }
+                }
+
+                if ($tokens[($nextSeparator + 1)]['code'] !== T_WHITESPACE) {
+                    $error = 'No space found after comma in function call';
+                    $fix   = $phpcsFile->addFixableError($error, $nextSeparator, 'NoSpaceAfterComma');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->addContent($nextSeparator, ' ');
+                    }
+                } else {
+                    // If there is a newline in the space, then they must be formatting
+                    // each argument on a newline, which is valid, so ignore it.
+                    $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($nextSeparator + 1), null, true);
+                    if ($tokens[$next]['line'] === $tokens[$nextSeparator]['line']) {
+                        $space = strlen($tokens[($nextSeparator + 1)]['content']);
+                        if ($space > 1) {
+                            $error = 'Expected 1 space after comma in function call; %s found';
+                            $data  = array($space);
+                            $fix   = $phpcsFile->addFixableError($error, $nextSeparator, 'TooMuchSpaceAfterComma', $data);
+                            if ($fix === true) {
+                                $phpcsFile->fixer->replaceToken(($nextSeparator + 1), ' ');
+                            }
+                        }
+                    }
+                }//end if
+            } else {
+                // Token is a variable.
+                $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($nextSeparator + 1), $closeBracket, true);
+                if ($nextToken !== false) {
+                    if ($tokens[$nextToken]['code'] === T_EQUAL) {
+                        if (($tokens[($nextToken - 1)]['code']) !== T_WHITESPACE) {
+                            $error = 'Expected 1 space before = sign of default value';
+                            $fix   = $phpcsFile->addFixableError($error, $nextToken, 'NoSpaceBeforeEquals');
+                            if ($fix === true) {
+                                $phpcsFile->fixer->addContentBefore($nextToken, ' ');
+                            }
+                        }
+
+                        if ($tokens[($nextToken + 1)]['code'] !== T_WHITESPACE) {
+                            $error = 'Expected 1 space after = sign of default value';
+                            $fix   = $phpcsFile->addFixableError($error, $nextToken, 'NoSpaceAfterEquals');
+                            if ($fix === true) {
+                                $phpcsFile->fixer->addContent($nextToken, ' ');
+                            }
+                        }
+                    }
+                }
+            }//end if
+        }//end while
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php	(revision 5534)
@@ -0,0 +1,191 @@
+<?php
+/**
+ * Generic_Sniffs_Methods_OpeningMethodBraceBsdAllmanSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff.
+ *
+ * Checks that the opening brace of a function is on the line after the
+ * function declaration.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * Should this sniff check function braces?
+     *
+     * @var bool
+     */
+    public $checkFunctions = true;
+
+    /**
+     * Should this sniff check closure braces?
+     *
+     * @var bool
+     */
+    public $checkClosures = false;
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        if (($tokens[$stackPtr]['code'] === T_FUNCTION
+            && (bool) $this->checkFunctions === false)
+            || ($tokens[$stackPtr]['code'] === T_CLOSURE
+            && (bool) $this->checkClosures === false)
+        ) {
+            return;
+        }
+
+        $openingBrace = $tokens[$stackPtr]['scope_opener'];
+        $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
+        if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+            $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']);
+            if ($use !== false) {
+                $openBracket  = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1));
+                $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+            }
+        }
+
+        $functionLine = $tokens[$closeBracket]['line'];
+        $braceLine    = $tokens[$openingBrace]['line'];
+
+        $lineDifference = ($braceLine - $functionLine);
+
+        if ($lineDifference === 0) {
+            $error = 'Opening brace should be on a new line';
+            $fix   = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnSameLine');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $indent = $phpcsFile->findFirstOnLine(array(), $openingBrace);
+                if ($tokens[$indent]['code'] === T_WHITESPACE) {
+                    $phpcsFile->fixer->addContentBefore($openingBrace, $tokens[$indent]['content']);
+                }
+
+                $phpcsFile->fixer->addNewlineBefore($openingBrace);
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Function opening brace placement', 'same line');
+        } else if ($lineDifference > 1) {
+            $error = 'Opening brace should be on the line after the declaration; found %s blank line(s)';
+            $data  = array(($lineDifference - 1));
+            $fix   = $phpcsFile->addFixableError($error, $openingBrace, 'BraceSpacing', $data);
+            if ($fix === true) {
+                for ($i = ($tokens[$stackPtr]['parenthesis_closer'] + 1); $i < $openingBrace; $i++) {
+                    if ($tokens[$i]['line'] === $braceLine) {
+                        $phpcsFile->fixer->addNewLineBefore($i);
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+            }
+        }//end if
+
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($openingBrace + 1), null, true);
+        if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) {
+            if ($next === $tokens[$stackPtr]['scope_closer']) {
+                // Ignore empty functions.
+                return;
+            }
+
+            $error = 'Opening brace must be the last content on the line';
+            $fix   = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($openingBrace);
+            }
+        }
+
+        // Only continue checking if the opening brace looks good.
+        if ($lineDifference !== 1) {
+            return;
+        }
+
+        // We need to actually find the first piece of content on this line,
+        // as if this is a method with tokens before it (public, static etc)
+        // or an if with an else before it, then we need to start the scope
+        // checking from there, rather than the current token.
+        $lineStart = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true);
+
+        // The opening brace is on the correct line, now it needs to be
+        // checked to be correctly indented.
+        $startColumn = $tokens[$lineStart]['column'];
+        $braceIndent = $tokens[$openingBrace]['column'];
+
+        if ($braceIndent !== $startColumn) {
+            $expected = ($startColumn - 1);
+            $found    = ($braceIndent - 1);
+
+            $error = 'Opening brace indented incorrectly; expected %s spaces, found %s';
+            $data  = array(
+                      $expected,
+                      $found,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceIndent', $data);
+            if ($fix === true) {
+                $indent = str_repeat(' ', $expected);
+                if ($found === 0) {
+                    $phpcsFile->fixer->addContentBefore($openingBrace, $indent);
+                } else {
+                    $phpcsFile->fixer->replaceToken(($openingBrace - 1), $indent);
+                }
+            }
+        }//end if
+
+        $phpcsFile->recordMetric($stackPtr, 'Function opening brace placement', 'new line');
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php	(revision 5534)
@@ -0,0 +1,162 @@
+<?php
+/**
+ * Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff.
+ *
+ * Checks that the opening brace of a function is on the same line
+ * as the function declaration.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Should this sniff check function braces?
+     *
+     * @var bool
+     */
+    public $checkFunctions = true;
+
+    /**
+     * Should this sniff check closure braces?
+     *
+     * @var bool
+     */
+    public $checkClosures = false;
+
+
+    /**
+     * Registers the tokens that this sniff wants to listen for.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        if (($tokens[$stackPtr]['code'] === T_FUNCTION
+            && (bool) $this->checkFunctions === false)
+            || ($tokens[$stackPtr]['code'] === T_CLOSURE
+            && (bool) $this->checkClosures === false)
+        ) {
+            return;
+        }
+
+        $openingBrace = $tokens[$stackPtr]['scope_opener'];
+        $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
+        if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+            $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']);
+            if ($use !== false) {
+                $openBracket  = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1));
+                $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+            }
+        }
+
+        $functionLine = $tokens[$closeBracket]['line'];
+        $braceLine    = $tokens[$openingBrace]['line'];
+
+        $lineDifference = ($braceLine - $functionLine);
+
+        if ($lineDifference > 0) {
+            $phpcsFile->recordMetric($stackPtr, 'Function opening brace placement', 'new line');
+            $error = 'Opening brace should be on the same line as the declaration';
+            $fix   = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnNewLine');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addContent($closeBracket, ' {');
+                $phpcsFile->fixer->replaceToken($openingBrace, '');
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Function opening brace placement', 'same line');
+
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($openingBrace + 1), null, true);
+        if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) {
+            if ($next === $tokens[$stackPtr]['scope_closer']) {
+                // Ignore empty functions.
+                return;
+            }
+
+            $error = 'Opening brace must be the last content on the line';
+            $fix   = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($openingBrace);
+            }
+        }
+
+        // Only continue checking if the opening brace looks good.
+        if ($lineDifference > 0) {
+            return;
+        }
+
+        if ($tokens[($closeBracket + 1)]['code'] !== T_WHITESPACE) {
+            $length = 0;
+        } else if ($tokens[($closeBracket + 1)]['content'] === "\t") {
+            $length = '\t';
+        } else {
+            $length = strlen($tokens[($closeBracket + 1)]['content']);
+        }
+
+        if ($length !== 1) {
+            $error = 'Expected 1 space after closing parenthesis; found %s';
+            $data  = array($length);
+            $fix   = $phpcsFile->addFixableError($error, $closeBracket, 'SpaceAfterBracket', $data);
+            if ($fix === true) {
+                if ($length === 0 || $length === '\t') {
+                    $phpcsFile->fixer->addContent($closeBracket, ' ');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($closeBracket + 1), ' ');
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php	(revision 5534)
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Checks the cyclomatic complexity (McCabe) for functions.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks the cyclomatic complexity (McCabe) for functions.
+ *
+ * The cyclomatic complexity (also called McCabe code metrics)
+ * indicates the complexity within a function by counting
+ * the different paths the function includes.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Johann-Peter Hartmann <hartmann@mayflower.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2007-2014 Mayflower GmbH
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Metrics_CyclomaticComplexitySniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A complexity higher than this value will throw a warning.
+     *
+     * @var int
+     */
+    public $complexity = 10;
+
+    /**
+     * A complexity higer than this value will throw an error.
+     *
+     * @var int
+     */
+    public $absoluteComplexity = 20;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->currentFile = $phpcsFile;
+
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore abstract methods.
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        // Detect start and end of this function definition.
+        $start = $tokens[$stackPtr]['scope_opener'];
+        $end   = $tokens[$stackPtr]['scope_closer'];
+
+        // Predicate nodes for PHP.
+        $find = array(
+                 T_CASE    => true,
+                 T_DEFAULT => true,
+                 T_CATCH   => true,
+                 T_IF      => true,
+                 T_FOR     => true,
+                 T_FOREACH => true,
+                 T_WHILE   => true,
+                 T_DO      => true,
+                 T_ELSEIF  => true,
+                );
+
+        $complexity = 1;
+
+        // Iterate from start to end and count predicate nodes.
+        for ($i = ($start + 1); $i < $end; $i++) {
+            if (isset($find[$tokens[$i]['code']]) === true) {
+                $complexity++;
+            }
+        }
+
+        if ($complexity > $this->absoluteComplexity) {
+            $error = 'Function\'s cyclomatic complexity (%s) exceeds allowed maximum of %s';
+            $data  = array(
+                      $complexity,
+                      $this->absoluteComplexity,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
+        } else if ($complexity > $this->complexity) {
+            $warning = 'Function\'s cyclomatic complexity (%s) exceeds %s; consider refactoring the function';
+            $data    = array(
+                        $complexity,
+                        $this->complexity,
+                       );
+            $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php	(revision 5534)
@@ -0,0 +1,112 @@
+<?php
+/**
+ * Checks the nesting level for methods.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks the nesting level for methods.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Johann-Peter Hartmann <hartmann@mayflower.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2007-2014 Mayflower GmbH
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Metrics_NestingLevelSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A nesting level than this value will throw a warning.
+     *
+     * @var int
+     */
+    public $nestingLevel = 5;
+
+    /**
+     * A nesting level than this value will throw an error.
+     *
+     * @var int
+     */
+    public $absoluteNestingLevel = 10;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore abstract methods.
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        // Detect start and end of this function definition.
+        $start = $tokens[$stackPtr]['scope_opener'];
+        $end   = $tokens[$stackPtr]['scope_closer'];
+
+        $nestingLevel = 0;
+
+        // Find the maximum nesting level of any token in the function.
+        for ($i = ($start + 1); $i < $end; $i++) {
+            $level = $tokens[$i]['level'];
+            if ($nestingLevel < $level) {
+                $nestingLevel = $level;
+            }
+        }
+
+        // We subtract the nesting level of the function itself.
+        $nestingLevel = ($nestingLevel - $tokens[$stackPtr]['level'] - 1);
+
+        if ($nestingLevel > $this->absoluteNestingLevel) {
+            $error = 'Function\'s nesting level (%s) exceeds allowed maximum of %s';
+            $data  = array(
+                      $nestingLevel,
+                      $this->absoluteNestingLevel,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
+        } else if ($nestingLevel > $this->nestingLevel) {
+            $warning = 'Function\'s nesting level (%s) exceeds %s; consider refactoring the function';
+            $data    = array(
+                        $nestingLevel,
+                        $this->nestingLevel,
+                       );
+            $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php	(revision 5534)
@@ -0,0 +1,221 @@
+<?php
+/**
+ * Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found');
+}
+
+/**
+ * Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff.
+ *
+ * Ensures method names are correct depending on whether they are public
+ * or private, and that functions are named correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+    /**
+     * A list of all PHP magic methods.
+     *
+     * @var array
+     */
+    protected $magicMethods = array(
+                               'construct'  => true,
+                               'destruct'   => true,
+                               'call'       => true,
+                               'callstatic' => true,
+                               'get'        => true,
+                               'set'        => true,
+                               'isset'      => true,
+                               'unset'      => true,
+                               'sleep'      => true,
+                               'wakeup'     => true,
+                               'tostring'   => true,
+                               'set_state'  => true,
+                               'clone'      => true,
+                               'invoke'     => true,
+                               'debuginfo'  => true,
+                              );
+
+    /**
+     * A list of all PHP non-magic methods starting with a double underscore.
+     *
+     * These come from PHP modules such as SOAPClient.
+     *
+     * @var array
+     */
+    protected $methodsDoubleUnderscore = array(
+                                          'soapcall'               => true,
+                                          'getlastrequest'         => true,
+                                          'getlastresponse'        => true,
+                                          'getlastrequestheaders'  => true,
+                                          'getlastresponseheaders' => true,
+                                          'getfunctions'           => true,
+                                          'gettypes'               => true,
+                                          'dorequest'              => true,
+                                          'setcookie'              => true,
+                                          'setlocation'            => true,
+                                          'setsoapheaders'         => true,
+                                         );
+
+    /**
+     * A list of all PHP magic functions.
+     *
+     * @var array
+     */
+    protected $magicFunctions = array('autoload' => true);
+
+    /**
+     * If TRUE, the string must not have two capital letters next to each other.
+     *
+     * @var bool
+     */
+    public $strict = true;
+
+
+    /**
+     * Constructs a Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS, T_INTERFACE, T_TRAIT), array(T_FUNCTION), true);
+
+    }//end __construct()
+
+
+    /**
+     * Processes the tokens within the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     * @param int                  $currScope The position of the current scope.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($methodName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        $className = $phpcsFile->getDeclarationName($currScope);
+        $errorData = array($className.'::'.$methodName);
+
+        // Is this a magic method. i.e., is prefixed with "__" ?
+        if (preg_match('|^__|', $methodName) !== 0) {
+            $magicPart = strtolower(substr($methodName, 2));
+            if (isset($this->magicMethods[$magicPart]) === false
+                && isset($this->methodsDoubleUnderscore[$magicPart]) === false
+            ) {
+                $error = 'Method name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
+                $phpcsFile->addError($error, $stackPtr, 'MethodDoubleUnderscore', $errorData);
+            }
+
+            return;
+        }
+
+        // PHP4 constructors are allowed to break our rules.
+        if ($methodName === $className) {
+            return;
+        }
+
+        // PHP4 destructors are allowed to break our rules.
+        if ($methodName === '_'.$className) {
+            return;
+        }
+
+        // Ignore first underscore in methods prefixed with "_".
+        $methodName = ltrim($methodName, '_');
+
+        $methodProps = $phpcsFile->getMethodProperties($stackPtr);
+        if (PHP_CodeSniffer::isCamelCaps($methodName, false, true, $this->strict) === false) {
+            if ($methodProps['scope_specified'] === true) {
+                $error = '%s method name "%s" is not in camel caps format';
+                $data  = array(
+                          ucfirst($methodProps['scope']),
+                          $errorData[0],
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data);
+            } else {
+                $error = 'Method name "%s" is not in camel caps format';
+                $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'no');
+            return;
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes');
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Processes the tokens outside the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     *
+     * @return void
+     */
+    protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $functionName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($functionName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        $errorData = array($functionName);
+
+        // Is this a magic function. i.e., it is prefixed with "__".
+        if (preg_match('|^__|', $functionName) !== 0) {
+            $magicPart = strtolower(substr($functionName, 2));
+            if (isset($this->magicFunctions[$magicPart]) === false) {
+                 $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
+                 $phpcsFile->addError($error, $stackPtr, 'FunctionDoubleUnderscore', $errorData);
+            }
+
+            return;
+        }
+
+        // Ignore first underscore in functions prefixed with "_".
+        $functionName = ltrim($functionName, '_');
+
+        if (PHP_CodeSniffer::isCamelCaps($functionName, false, true, $this->strict) === false) {
+            $error = 'Function name "%s" is not in camel caps format';
+            $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase function name', 'no');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes');
+        }
+
+    }//end processTokenOutsideScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php	(revision 5534)
@@ -0,0 +1,148 @@
+<?php
+/**
+ * Generic_Sniffs_NamingConventions_ConstructorNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Leif Wickland <lwickland@rightnow.com>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Generic_Sniffs_NamingConventions_ConstructorNameSniff.
+ *
+ * Favor PHP 5 constructor syntax, which uses "function __construct()".
+ * Avoid PHP 4 constructor syntax, which uses "function ClassName()".
+ *
+ * @category PHP
+ * @package  PHP_CodeSniffer
+ * @author   Leif Wickland <lwickland@rightnow.com>
+ * @license  https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version  Release: @package_version@
+ * @link     http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_NamingConventions_ConstructorNameSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+    /**
+     * The name of the class we are currently checking.
+     *
+     * @var string
+     */
+    private $_currentClass = '';
+
+    /**
+     * A list of functions in the current class.
+     *
+     * @var string[]
+     */
+    private $_functionList = array();
+
+
+    /**
+     * Constructs the test with the tokens it wishes to listen for.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS, T_INTERFACE), array(T_FUNCTION), true);
+
+    }//end __construct()
+
+
+    /**
+     * Processes this test when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     * @param int                  $currScope A pointer to the start of the scope.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr,
+        $currScope
+    ) {
+        $className = $phpcsFile->getDeclarationName($currScope);
+        if ($className !== $this->_currentClass) {
+            $this->loadFunctionNamesInScope($phpcsFile, $currScope);
+            $this->_currentClass = $className;
+        }
+
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+
+        if (strcasecmp($methodName, $className) === 0) {
+            if (in_array('__construct', $this->_functionList) === false) {
+                $error = 'PHP4 style constructors are not allowed; use "__construct()" instead';
+                $phpcsFile->addError($error, $stackPtr, 'OldStyle');
+            }
+        } else if (strcasecmp($methodName, '__construct') !== 0) {
+            // Not a constructor.
+            return;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        $parentClassName = $phpcsFile->findExtendedClassName($currScope);
+        if ($parentClassName === false) {
+            return;
+        }
+
+        // Stop if the constructor doesn't have a body, like when it is abstract.
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            return;
+        }
+
+        $endFunctionIndex = $tokens[$stackPtr]['scope_closer'];
+        $startIndex       = $stackPtr;
+        while (($doubleColonIndex = $phpcsFile->findNext(T_DOUBLE_COLON, $startIndex, $endFunctionIndex)) !== false) {
+            if ($tokens[($doubleColonIndex + 1)]['code'] === T_STRING
+                && $tokens[($doubleColonIndex + 1)]['content'] === $parentClassName
+            ) {
+                $error = 'PHP4 style calls to parent constructors are not allowed; use "parent::__construct()" instead';
+                $phpcsFile->addError($error, ($doubleColonIndex + 1), 'OldStyleCall');
+            }
+
+            $startIndex = ($doubleColonIndex + 1);
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Extracts all the function names found in the given scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned.
+     * @param int                  $currScope A pointer to the start of the scope.
+     *
+     * @return void
+     */
+    protected function loadFunctionNamesInScope(PHP_CodeSniffer_File $phpcsFile, $currScope)
+    {
+        $this->_functionList = array();
+        $tokens = $phpcsFile->getTokens();
+
+        for ($i = ($tokens[$currScope]['scope_opener'] + 1); $i < $tokens[$currScope]['scope_closer']; $i++) {
+            if ($tokens[$i]['code'] !== T_FUNCTION) {
+                continue;
+            }
+
+            $next = $phpcsFile->findNext(T_STRING, $i);
+            $this->_functionList[] = trim($tokens[$next]['content']);
+        }
+
+    }//end loadFunctionNamesInScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php	(revision 5534)
@@ -0,0 +1,180 @@
+<?php
+/**
+ * Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff.
+ *
+ * Ensures that constant names are all uppercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens    = $phpcsFile->getTokens();
+        $constName = $tokens[$stackPtr]['content'];
+
+        // If this token is in a heredoc, ignore it.
+        if ($phpcsFile->hasCondition($stackPtr, T_START_HEREDOC) === true) {
+            return;
+        }
+
+        // Special case for PHP 5.5 class name resolution.
+        if (strtolower($constName) === 'class'
+            && $tokens[($stackPtr - 1)]['code'] === T_DOUBLE_COLON
+        ) {
+            return;
+        }
+
+        // Special case for PHPUnit.
+        if ($constName === 'PHPUnit_MAIN_METHOD') {
+            return;
+        }
+
+        // If the next non-whitespace token after this token
+        // is not an opening parenthesis then it is not a function call.
+        for ($openBracket = ($stackPtr + 1); $openBracket < $phpcsFile->numTokens; $openBracket++) {
+            if ($tokens[$openBracket]['code'] !== T_WHITESPACE) {
+                break;
+            }
+        }
+
+        if ($openBracket === $phpcsFile->numTokens) {
+            return;
+        }
+
+        if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) {
+            $functionKeyword = $phpcsFile->findPrevious(
+                array(
+                 T_WHITESPACE,
+                 T_COMMA,
+                 T_COMMENT,
+                 T_STRING,
+                 T_NS_SEPARATOR,
+                ),
+                ($stackPtr - 1),
+                null,
+                true
+            );
+
+            if ($tokens[$functionKeyword]['code'] !== T_CONST) {
+                return;
+            }
+
+            // This is a class constant.
+            if (strtoupper($constName) !== $constName) {
+                if (strtolower($constName) === $constName) {
+                    $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'lower');
+                } else {
+                    $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'mixed');
+                }
+
+                $error = 'Class constants must be uppercase; expected %s but found %s';
+                $data  = array(
+                          strtoupper($constName),
+                          $constName,
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'ClassConstantNotUpperCase', $data);
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper');
+            }
+
+            return;
+        }//end if
+
+        if (strtolower($constName) !== 'define') {
+            return;
+        }
+
+        /*
+            This may be a "define" function call.
+        */
+
+        // Make sure this is not a method call.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] === T_OBJECT_OPERATOR
+            || $tokens[$prev]['code'] === T_DOUBLE_COLON
+        ) {
+            return;
+        }
+
+        // The next non-whitespace token must be the constant name.
+        $constPtr = $phpcsFile->findNext(T_WHITESPACE, ($openBracket + 1), null, true);
+        if ($tokens[$constPtr]['code'] !== T_CONSTANT_ENCAPSED_STRING) {
+            return;
+        }
+
+        $constName = $tokens[$constPtr]['content'];
+
+        // Check for constants like self::CONSTANT.
+        $prefix   = '';
+        $splitPos = strpos($constName, '::');
+        if ($splitPos !== false) {
+            $prefix    = substr($constName, 0, ($splitPos + 2));
+            $constName = substr($constName, ($splitPos + 2));
+        }
+
+        if (strtoupper($constName) !== $constName) {
+            if (strtolower($constName) === $constName) {
+                $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'lower');
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'mixed');
+            }
+
+            $error = 'Constants must be uppercase; expected %s but found %s';
+            $data  = array(
+                      $prefix.strtoupper($constName),
+                      $prefix.$constName,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'ConstantNotUpperCase', $data);
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php	(revision 5534)
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks that the opening PHP tag is the first content in a file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Andy Grunwald <andygrunwald@gmail.com>
+ * @copyright 2010-2014 Andy Grunwald
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $expected = 0;
+        if ($stackPtr > 0) {
+            // Allow a shebang line.
+            $tokens = $phpcsFile->getTokens();
+            if (substr($tokens[0]['content'], 0, 2) === '#!') {
+                $expected = 1;
+            }
+        }
+
+        if ($stackPtr !== $expected) {
+            $error = 'The opening PHP tag must be the first content in the file';
+            $phpcsFile->addError($error, $stackPtr, 'Found');
+        }
+
+        // Skip the rest of the file so we don't pick up additional
+        // open tags, typically embedded in HTML.
+        return $phpcsFile->numTokens;
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_ClosingPHPTagSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Stefano Kowalke <blueduck@gmx.net>
+ * @copyright 2010-2014 Stefano Kowalke
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Checks that open PHP tags are paired with closing tags.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Stefano Kowalke <blueduck@gmx.net>
+ * @copyright 2010-2014 Stefano Kowalke
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_ClosingPHPTagSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);
+        if ($closeTag === false) {
+            $error = 'The PHP open tag does not have a corresponding PHP close tag';
+            $phpcsFile->addError($error, $stackPtr, 'NotFound');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php	(revision 5534)
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_DeprecatedFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_DeprecatedFunctionsSniff.
+ *
+ * Discourages the use of deprecated functions that are kept in PHP for
+ * compatibility with older versions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Sebastian Bergmann <sb@sebastian-bergmann.de>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_DeprecatedFunctionsSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff
+{
+
+    /**
+     * A list of forbidden functions with their alternatives.
+     *
+     * The value is NULL if no alternative exists. IE, the
+     * function should just not be used.
+     *
+     * @var array(string => string|null)
+     */
+    public $forbiddenFunctions = array();
+
+
+    /**
+     * Constructor.
+     *
+     * Uses the Reflection API to get a list of deprecated functions.
+     */
+    public function __construct()
+    {
+        $functions = get_defined_functions();
+
+        foreach ($functions['internal'] as $functionName) {
+            $function = new ReflectionFunction($functionName);
+            if (method_exists($function, 'isDeprecated') === false) {
+                break;
+            }
+
+            if ($function->isDeprecated() === true) {
+                $this->forbiddenFunctions[$functionName] = null;
+            }
+        }
+
+    }//end __construct()
+
+
+    /**
+     * Generates the error or warning for this sniff.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the forbidden function
+     *                                        in the token array.
+     * @param string               $function  The name of the forbidden function.
+     * @param string               $pattern   The pattern used for the match.
+     *
+     * @return void
+     */
+    protected function addError($phpcsFile, $stackPtr, $function, $pattern=null)
+    {
+        $data  = array($function);
+        $error = 'Function %s() has been deprecated';
+        $type  = 'Deprecated';
+
+        if ($this->error === true) {
+            $phpcsFile->addError($error, $stackPtr, $type, $data);
+        } else {
+            $phpcsFile->addWarning($error, $stackPtr, $type, $data);
+        }
+
+    }//end addError()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php	(revision 5534)
@@ -0,0 +1,86 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_DisallowShortOpenTagSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_DisallowShortOpenTagSniff.
+ *
+ * Makes sure that shorthand PHP open tags are not used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_DisallowShortOpenTagSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_OPEN_TAG,
+                T_OPEN_TAG_WITH_ECHO,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens  = $phpcsFile->getTokens();
+        $openTag = $tokens[$stackPtr];
+
+        if ($openTag['content'] === '<?') {
+            $error = 'Short PHP opening tag used; expected "<?php" but found "%s"';
+            $data  = array($openTag['content']);
+            $phpcsFile->addError($error, $stackPtr, 'Found', $data);
+            $phpcsFile->recordMetric($stackPtr, 'PHP short open tag used', 'yes');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'PHP short open tag used', 'no');
+        }
+
+        if ($openTag['code'] === T_OPEN_TAG_WITH_ECHO) {
+            $nextVar = $tokens[$phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true)];
+            $error   = 'Short PHP opening tag used with echo; expected "<?php echo %s ..." but found "%s %s ..."';
+            $data    = array(
+                        $nextVar['content'],
+                        $openTag['content'],
+                        $nextVar['content'],
+                       );
+            $phpcsFile->addError($error, $stackPtr, 'EchoFound', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php	(revision 5534)
@@ -0,0 +1,240 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_ForbiddenFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_ForbiddenFunctionsSniff.
+ *
+ * Discourages the use of alias functions that are kept in PHP for compatibility
+ * with older versions. Can be used to forbid the use of any function.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_ForbiddenFunctionsSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of forbidden functions with their alternatives.
+     *
+     * The value is NULL if no alternative exists. IE, the
+     * function should just not be used.
+     *
+     * @var array(string => string|null)
+     */
+    public $forbiddenFunctions = array(
+                                  'sizeof' => 'count',
+                                  'delete' => 'unset',
+                                 );
+
+    /**
+     * A cache of forbidden function names, for faster lookups.
+     *
+     * @var array(string)
+     */
+    protected $forbiddenFunctionNames = array();
+
+    /**
+     * If true, forbidden functions will be considered regular expressions.
+     *
+     * @var bool
+     */
+    protected $patternMatch = false;
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = true;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        // Everyone has had a chance to figure out what forbidden functions
+        // they want to check for, so now we can cache out the list.
+        $this->forbiddenFunctionNames = array_keys($this->forbiddenFunctions);
+
+        if ($this->patternMatch === true) {
+            foreach ($this->forbiddenFunctionNames as $i => $name) {
+                $this->forbiddenFunctionNames[$i] = '/'.$name.'/i';
+            }
+
+            return array(T_STRING);
+        }
+
+        // If we are not pattern matching, we need to work out what
+        // tokens to listen for.
+        $string = '<?php ';
+        foreach ($this->forbiddenFunctionNames as $name) {
+            $string .= $name.'();';
+        }
+
+        $register = array();
+
+        $tokens = token_get_all($string);
+        array_shift($tokens);
+        foreach ($tokens as $token) {
+            if (is_array($token) === true) {
+                $register[] = $token[0];
+            }
+        }
+
+        return array_unique($register);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $ignore = array(
+                   T_DOUBLE_COLON    => true,
+                   T_OBJECT_OPERATOR => true,
+                   T_FUNCTION        => true,
+                   T_CONST           => true,
+                   T_PUBLIC          => true,
+                   T_PRIVATE         => true,
+                   T_PROTECTED       => true,
+                   T_AS              => true,
+                   T_NEW             => true,
+                   T_INSTEADOF       => true,
+                   T_NS_SEPARATOR    => true,
+                   T_IMPLEMENTS      => true,
+                  );
+
+        $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+
+        // If function call is directly preceded by a NS_SEPARATOR it points to the
+        // global namespace, so we should still catch it.
+        if ($tokens[$prevToken]['code'] === T_NS_SEPARATOR) {
+            $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($prevToken - 1), null, true);
+            if ($tokens[$prevToken]['code'] === T_STRING) {
+                // Not in the global namespace.
+                return;
+            }
+        }
+
+        if (isset($ignore[$tokens[$prevToken]['code']]) === true) {
+            // Not a call to a PHP function.
+            return;
+        }
+
+        $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if (isset($ignore[$tokens[$nextToken]['code']]) === true) {
+            // Not a call to a PHP function.
+            return;
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_STRING && $tokens[$nextToken]['code'] !== T_OPEN_PARENTHESIS) {
+            // Not a call to a PHP function.
+            return;
+        }
+
+        $function = strtolower($tokens[$stackPtr]['content']);
+        $pattern  = null;
+
+        if ($this->patternMatch === true) {
+            $count   = 0;
+            $pattern = preg_replace(
+                $this->forbiddenFunctionNames,
+                $this->forbiddenFunctionNames,
+                $function,
+                1,
+                $count
+            );
+
+            if ($count === 0) {
+                return;
+            }
+
+            // Remove the pattern delimiters and modifier.
+            $pattern = substr($pattern, 1, -2);
+        } else {
+            if (in_array($function, $this->forbiddenFunctionNames) === false) {
+                return;
+            }
+        }//end if
+
+        $this->addError($phpcsFile, $stackPtr, $function, $pattern);
+
+    }//end process()
+
+
+    /**
+     * Generates the error or warning for this sniff.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the forbidden function
+     *                                        in the token array.
+     * @param string               $function  The name of the forbidden function.
+     * @param string               $pattern   The pattern used for the match.
+     *
+     * @return void
+     */
+    protected function addError($phpcsFile, $stackPtr, $function, $pattern=null)
+    {
+        $data  = array($function);
+        $error = 'The use of function %s() is ';
+        if ($this->error === true) {
+            $type   = 'Found';
+            $error .= 'forbidden';
+        } else {
+            $type   = 'Discouraged';
+            $error .= 'discouraged';
+        }
+
+        if ($pattern === null) {
+            $pattern = $function;
+        }
+
+        if ($this->forbiddenFunctions[$pattern] !== null
+            && $this->forbiddenFunctions[$pattern] !== 'null'
+        ) {
+            $type  .= 'WithAlternative';
+            $data[] = $this->forbiddenFunctions[$pattern];
+            $error .= '; use %s() instead';
+        }
+
+        if ($this->error === true) {
+            $phpcsFile->addError($error, $stackPtr, $type, $data);
+        } else {
+            $phpcsFile->addWarning($error, $stackPtr, $type, $data);
+        }
+
+    }//end addError()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php	(revision 5534)
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_LowerCaseConstantSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_LowerCaseConstantSniff.
+ *
+ * Checks that all uses of true, false and null are lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_LowerCaseConstantSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_TRUE,
+                T_FALSE,
+                T_NULL,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens   = $phpcsFile->getTokens();
+        $keyword  = $tokens[$stackPtr]['content'];
+        $expected = strtolower($keyword);
+        if ($keyword !== $expected) {
+            if ($keyword === strtoupper($keyword)) {
+                $phpcsFile->recordMetric($stackPtr, 'PHP constant case', 'upper');
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'PHP constant case', 'mixed');
+            }
+
+            $error = 'TRUE, FALSE and NULL must be lowercase; expected "%s" but found "%s"';
+            $data  = array(
+                      $expected,
+                      $keyword,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $expected);
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'PHP constant case', 'lower');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php	(revision 5534)
@@ -0,0 +1,148 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_LowerCaseKeywordSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_LowerCaseKeywordSniff.
+ *
+ * Checks that all PHP keywords are lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_LowerCaseKeywordSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_HALT_COMPILER,
+                T_ABSTRACT,
+                T_ARRAY,
+                T_ARRAY_HINT,
+                T_AS,
+                T_BREAK,
+                T_CALLABLE,
+                T_CASE,
+                T_CATCH,
+                T_CLASS,
+                T_CLONE,
+                T_CONST,
+                T_CONTINUE,
+                T_DECLARE,
+                T_DEFAULT,
+                T_DO,
+                T_ECHO,
+                T_ELSE,
+                T_ELSEIF,
+                T_EMPTY,
+                T_ENDDECLARE,
+                T_ENDFOR,
+                T_ENDFOREACH,
+                T_ENDIF,
+                T_ENDSWITCH,
+                T_ENDWHILE,
+                T_EVAL,
+                T_EXIT,
+                T_EXTENDS,
+                T_FINAL,
+                T_FINALLY,
+                T_FOR,
+                T_FOREACH,
+                T_FUNCTION,
+                T_GLOBAL,
+                T_GOTO,
+                T_IF,
+                T_IMPLEMENTS,
+                T_INCLUDE,
+                T_INCLUDE_ONCE,
+                T_INSTANCEOF,
+                T_INSTEADOF,
+                T_INTERFACE,
+                T_ISSET,
+                T_LIST,
+                T_LOGICAL_AND,
+                T_LOGICAL_OR,
+                T_LOGICAL_XOR,
+                T_NAMESPACE,
+                T_NEW,
+                T_PRINT,
+                T_PRIVATE,
+                T_PROTECTED,
+                T_PUBLIC,
+                T_REQUIRE,
+                T_REQUIRE_ONCE,
+                T_RETURN,
+                T_STATIC,
+                T_SWITCH,
+                T_THROW,
+                T_TRAIT,
+                T_TRY,
+                T_UNSET,
+                T_USE,
+                T_VAR,
+                T_WHILE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens  = $phpcsFile->getTokens();
+        $keyword = $tokens[$stackPtr]['content'];
+        if (strtolower($keyword) !== $keyword) {
+            if ($keyword === strtoupper($keyword)) {
+                $phpcsFile->recordMetric($stackPtr, 'PHP keyword case', 'upper');
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'PHP keyword case', 'mixed');
+            }
+
+            $error = 'PHP keywords must be lowercase; expected "%s" but found "%s"';
+            $data  = array(
+                      strtolower($keyword),
+                      $keyword,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, strtolower($keyword));
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'PHP keyword case', 'lower');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_NoSilencedErrorsSniff
+ *
+ * PHP version 5
+ *
+ * @category PHP
+ * @package  PHP_CodeSniffer
+ * @author   Andy Brockhurst <abrock@yahoo-inc.com>
+ * @license  https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link     http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_NoSilencedErrorsSniff.
+ *
+ * Throws an error or warning when any code prefixed with an asperand is encountered.
+ *
+ * <code>
+ *  if (@in_array($array, $needle))
+ *  {
+ *      doSomething();
+ *  }
+ * </code>
+ *
+ * @category PHP
+ * @package  PHP_CodeSniffer
+ * @author   Andy Brockhurst <abrock@yahoo-inc.com>
+ * @license  https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version  Release: @package_version@
+ * @link     http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_NoSilencedErrorsSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = false;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_ASPERAND);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $error = 'Silencing errors is forbidden';
+        if ($this->error === true) {
+            $error = 'Silencing errors is forbidden';
+            $phpcsFile->addError($error, $stackPtr, 'Forbidden');
+        } else {
+            $error = 'Silencing errors is discouraged';
+            $phpcsFile->addWarning($error, $stackPtr, 'Discouraged');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_SAPIUsageSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_SAPIUsageSniff.
+ *
+ * Ensures the PHP_SAPI constant is used instead of php_sapi_name().
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_SAPIUsageSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $ignore = array(
+                   T_DOUBLE_COLON    => true,
+                   T_OBJECT_OPERATOR => true,
+                   T_FUNCTION        => true,
+                   T_CONST           => true,
+                  );
+
+        $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if (isset($ignore[$tokens[$prevToken]['code']]) === true) {
+            // Not a call to a PHP function.
+            return;
+        }
+
+        $function = strtolower($tokens[$stackPtr]['content']);
+        if ($function === 'php_sapi_name') {
+            $error = 'Use the PHP_SAPI constant instead of calling php_sapi_name()';
+            $phpcsFile->addError($error, $stackPtr, 'FunctionFound');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_SyntaxSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Blaine Schmeisser <blainesch@gmail.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_SyntaxSniff.
+ *
+ * Ensures PHP believes the syntax is clean.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Blaine Schmeisser <blainesch@gmail.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_SyntaxSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $phpPath = PHP_CodeSniffer::getConfigData('php_path');
+        if ($phpPath === null) {
+            return;
+        }
+
+        $fileName = $phpcsFile->getFilename();
+        $cmd      = "$phpPath -l \"$fileName\" 2>&1";
+        $output   = shell_exec($cmd);
+
+        $matches = array();
+        if (preg_match('/^.*error:(.*) in .* on line ([0-9]+)/', trim($output), $matches) === 1) {
+            $error = trim($matches[1]);
+            $line  = (int) $matches[2];
+            $phpcsFile->addErrorOnLine("PHP syntax error: $error", $line, 'PHPSyntax');
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php	(revision 5534)
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Generic_Sniffs_PHP_UpperCaseConstantSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_PHP_UpperCaseConstantSniff.
+ *
+ * Checks that all uses of TRUE, FALSE and NULL are uppercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_PHP_UpperCaseConstantSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_TRUE,
+                T_FALSE,
+                T_NULL,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens   = $phpcsFile->getTokens();
+        $keyword  = $tokens[$stackPtr]['content'];
+        $expected = strtoupper($keyword);
+        if ($keyword !== $expected) {
+            if ($keyword === strtolower($keyword)) {
+                $phpcsFile->recordMetric($stackPtr, 'PHP constant case', 'lower');
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'PHP constant case', 'mixed');
+            }
+
+            $error = 'TRUE, FALSE and NULL must be uppercase; expected "%s" but found "%s"';
+            $data  = array(
+                      $expected,
+                      $keyword,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $expected);
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'PHP constant case', 'upper');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php	(revision 5534)
@@ -0,0 +1,138 @@
+<?php
+/**
+ * Generic_Sniffs_Strings_UnnecessaryStringConcatSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Strings_UnnecessaryStringConcatSniff.
+ *
+ * Checks that two strings are not concatenated together; suggests
+ * using one string instead.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_Strings_UnnecessaryStringConcatSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = true;
+
+    /**
+     * If true, strings concatenated over multiple lines are allowed.
+     *
+     * Useful if you break strings over multiple lines to work
+     * within a max line length.
+     *
+     * @var bool
+     */
+    public $allowMultiline = false;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_STRING_CONCAT,
+                T_PLUS,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // Work out which type of file this is for.
+        $tokens = $phpcsFile->getTokens();
+        if ($tokens[$stackPtr]['code'] === T_STRING_CONCAT) {
+            if ($phpcsFile->tokenizerType === 'JS') {
+                return;
+            }
+        } else {
+            if ($phpcsFile->tokenizerType === 'PHP') {
+                return;
+            }
+        }
+
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($prev === false || $next === false) {
+            return;
+        }
+
+        if (isset(PHP_CodeSniffer_Tokens::$stringTokens[$tokens[$prev]['code']]) === true
+            && isset(PHP_CodeSniffer_Tokens::$stringTokens[$tokens[$next]['code']]) === true
+        ) {
+            if ($tokens[$prev]['content'][0] === $tokens[$next]['content'][0]) {
+                // Before we throw an error for PHP, allow strings to be
+                // combined if they would have < and ? next to each other because
+                // this trick is sometimes required in PHP strings.
+                if ($phpcsFile->tokenizerType === 'PHP') {
+                    $prevChar = substr($tokens[$prev]['content'], -2, 1);
+                    $nextChar = $tokens[$next]['content'][1];
+                    $combined = $prevChar.$nextChar;
+                    if ($combined === '?'.'>' || $combined === '<'.'?') {
+                        return;
+                    }
+                }
+
+                if ($this->allowMultiline === true
+                    && $tokens[$prev]['line'] !== $tokens[$next]['line']
+                ) {
+                    return;
+                }
+
+                $error = 'String concat is not required here; use a single string instead';
+                if ($this->error === true) {
+                    $phpcsFile->addError($error, $stackPtr, 'Found');
+                } else {
+                    $phpcsFile->addWarning($error, $stackPtr, 'Found');
+                }
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php	(revision 5534)
@@ -0,0 +1,204 @@
+<?php
+/**
+ * Generic_Sniffs_VersionControl_SubversionPropertiesSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Jack Bates <ms419@freezone.co.uk>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_VersionControl_SubversionPropertiesSniff.
+ *
+ * Tests that the correct Subversion properties are set.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Jack Bates <ms419@freezone.co.uk>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_VersionControl_SubversionPropertiesSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The Subversion properties that should be set.
+     *
+     * Key of array is the SVN property and the value is the
+     * exact value the property should have or NULL if the
+     * property should just be set but the value is not fixed.
+     *
+     * @var array
+     */
+    protected $properties = array(
+                             'svn:keywords'  => 'Author Id Revision',
+                             'svn:eol-style' => 'native',
+                            );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Make sure this is the first PHP open tag so we don't process the
+        // same file twice.
+        $prevOpenTag = $phpcsFile->findPrevious(T_OPEN_TAG, ($stackPtr - 1));
+        if ($prevOpenTag !== false) {
+            return;
+        }
+
+        $path       = $phpcsFile->getFileName();
+        $properties = $this->getProperties($path);
+        if ($properties === null) {
+            // Not under version control.
+            return;
+        }
+
+        $allProperties = ($properties + $this->properties);
+        foreach ($allProperties as $key => $value) {
+            if (isset($properties[$key]) === true
+                && isset($this->properties[$key]) === false
+            ) {
+                $error = 'Unexpected Subversion property "%s" = "%s"';
+                $data  = array(
+                          $key,
+                          $properties[$key],
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'Unexpected', $data);
+                continue;
+            }
+
+            if (isset($properties[$key]) === false
+                && isset($this->properties[$key]) === true
+            ) {
+                $error = 'Missing Subversion property "%s" = "%s"';
+                $data  = array(
+                          $key,
+                          $this->properties[$key],
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
+                continue;
+            }
+
+            if ($properties[$key] !== null
+                && $properties[$key] !== $this->properties[$key]
+            ) {
+                $error = 'Subversion property "%s" = "%s" does not match "%s"';
+                $data  = array(
+                          $key,
+                          $properties[$key],
+                          $this->properties[$key],
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data);
+            }
+        }//end foreach
+
+    }//end process()
+
+
+    /**
+     * Returns the Subversion properties which are actually set on a path.
+     *
+     * Returns NULL if the file is not under version control.
+     *
+     * @param string $path The path to return Subversion properties on.
+     *
+     * @return array
+     * @throws PHP_CodeSniffer_Exception If Subversion properties file could
+     *                                   not be opened.
+     */
+    protected function getProperties($path)
+    {
+        $properties = array();
+
+        $paths   = array();
+        $paths[] = dirname($path).'/.svn/props/'.basename($path).'.svn-work';
+        $paths[] = dirname($path).'/.svn/prop-base/'.basename($path).'.svn-base';
+
+        $foundPath = false;
+        foreach ($paths as $path) {
+            if (file_exists($path) === true) {
+                $foundPath = true;
+
+                $handle = fopen($path, 'r');
+                if ($handle === false) {
+                    $error = 'Error opening file; could not get Subversion properties';
+                    throw new PHP_CodeSniffer_Exception($error);
+                }
+
+                while (feof($handle) === false) {
+                    // Read a key length line. Might be END, though.
+                    $buffer = trim(fgets($handle));
+
+                    // Check for the end of the hash.
+                    if ($buffer === 'END') {
+                        break;
+                    }
+
+                    // Now read that much into a buffer.
+                    $key = fread($handle, substr($buffer, 2));
+
+                    // Suck up extra newline after key data.
+                    fgetc($handle);
+
+                    // Read a value length line.
+                    $buffer = trim(fgets($handle));
+
+                    // Now read that much into a buffer.
+                    $length = substr($buffer, 2);
+                    if ($length === '0') {
+                        // Length of value is ZERO characters, so
+                        // value is actually empty.
+                        $value = '';
+                    } else {
+                        $value = fread($handle, $length);
+                    }
+
+                    // Suck up extra newline after value data.
+                    fgetc($handle);
+
+                    $properties[$key] = $value;
+                }//end while
+
+                fclose($handle);
+            }//end if
+        }//end foreach
+
+        if ($foundPath === false) {
+            return null;
+        }
+
+        return $properties;
+
+    }//end getProperties()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php	(revision 5534)
@@ -0,0 +1,140 @@
+<?php
+/**
+ * Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff.
+ *
+ * Throws errors if spaces are used for indentation.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                   'CSS',
+                                  );
+
+    /**
+     * The --tab-width CLI value that is being used.
+     *
+     * @var int
+     */
+    private $_tabWidth = null;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        if ($this->_tabWidth === null) {
+            $cliValues = $phpcsFile->phpcs->cli->getCommandLineValues();
+            if (isset($cliValues['tabWidth']) === false || $cliValues['tabWidth'] === 0) {
+                // We have no idea how wide tabs are, so assume 4 spaces for fixing.
+                // It shouldn't really matter because indent checks elsewhere in the
+                // standard should fix things up.
+                $this->_tabWidth = 4;
+            } else {
+                $this->_tabWidth = $cliValues['tabWidth'];
+            }
+        }
+
+        $checkTokens = array(
+                        T_WHITESPACE             => true,
+                        T_DOC_COMMENT_WHITESPACE => true,
+                       );
+
+        $tokens = $phpcsFile->getTokens();
+        for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+            if ($tokens[$i]['column'] !== 1 || isset($checkTokens[$tokens[$i]['code']]) === false) {
+                continue;
+            }
+
+            // If tabs are being converted to spaces, the original content
+            // should be used instead of the converted content.
+            if (isset($tokens[$i]['orig_content']) === true) {
+                $content = $tokens[$i]['orig_content'];
+            } else {
+                $content = $tokens[$i]['content'];
+            }
+
+            if ($content[0] === ' ') {
+                if ($tokens[$i]['code'] === T_DOC_COMMENT_WHITESPACE && $content === ' ') {
+                    // Ignore file/class-level DocBlock.
+                    continue;
+                }
+
+                // Space are considered ok if they are proceeded by tabs and not followed
+                // by tabs, as is the case with standard docblock comments.
+                $phpcsFile->recordMetric($i, 'Line indent', 'spaces');
+                $error = 'Tabs must be used to indent lines; spaces are not allowed';
+                $fix   = $phpcsFile->addFixableError($error, $i, 'SpacesUsed');
+                if ($fix === true) {
+                    $trimmed   = ltrim($content, ' ');
+                    $numSpaces = (strlen($content) - strlen($trimmed));
+                    if ($numSpaces < $this->_tabWidth) {
+                        $numTabs = 1;
+                        $padding = "\t";
+                    } else {
+                        $numTabs   = floor($numSpaces / $this->_tabWidth);
+                        $remaining = ($numSpaces - ($numTabs * $this->_tabWidth));
+                        $padding   = str_repeat("\t", $numTabs).$padding = str_repeat(' ', $remaining);
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, $padding.$trimmed);
+                }
+            } else if ($content[0] === "\t") {
+                $phpcsFile->recordMetric($i, 'Line indent', 'tabs');
+            }//end if
+        }//end for
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php	(revision 5534)
@@ -0,0 +1,148 @@
+<?php
+/**
+ * Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff.
+ *
+ * Throws errors if tabs are used for indentation.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                   'CSS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens    = $phpcsFile->getTokens();
+        $error     = 'Spaces must be used to indent lines; tabs are not allowed';
+        $errorCode = 'TabsUsed';
+
+        $checkTokens = array(
+                        T_WHITESPACE             => true,
+                        T_DOC_COMMENT_WHITESPACE => true,
+                        T_DOC_COMMENT_STRING     => true,
+                       );
+
+        for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+            if (isset($checkTokens[$tokens[$i]['code']]) === false) {
+                continue;
+            }
+
+            // If tabs are being converted to spaces by PHPCS, the
+            // original content should be checked instead of the converted content.
+            if (isset($tokens[$i]['orig_content']) === true) {
+                $content = $tokens[$i]['orig_content'];
+            } else {
+                $content = $tokens[$i]['content'];
+            }
+
+            if ($content === '') {
+                continue;
+            }
+
+            if ($tokens[$i]['code'] === T_DOC_COMMENT_WHITESPACE && $content === ' ') {
+                // Ignore file/class-level DocBlock, especially for recording metrics.
+                continue;
+            }
+
+            $tabFound = false;
+            if ($tokens[$i]['column'] === 1) {
+                if ($content[0] === "\t") {
+                    $phpcsFile->recordMetric($i, 'Line indent', 'tabs');
+                    $tabFound = true;
+                } else if ($content[0] === ' ') {
+                    if (strpos($content, "\t") !== false) {
+                        $phpcsFile->recordMetric($i, 'Line indent', 'mixed');
+                        $tabFound = true;
+                    } else {
+                        $phpcsFile->recordMetric($i, 'Line indent', 'spaces');
+                    }
+                }
+            } else {
+                // Look for tabs so we can report and replace, but don't
+                // record any metrics about them because they aren't
+                // line indent tokens.
+                if (strpos($content, "\t") !== false) {
+                    $tabFound  = true;
+                    $error     = 'Spaces must be used for alignment; tabs are not allowed';
+                    $errorCode = 'NonIndentTabsUsed';
+                }
+            }//end if
+
+            if ($tabFound === false) {
+                continue;
+            }
+
+            $fix = $phpcsFile->addFixableError($error, $i, $errorCode);
+            if ($fix === true) {
+                if (isset($tokens[$i]['orig_content']) === true) {
+                    // Use the replacement that PHPCS has already done.
+                    $phpcsFile->fixer->replaceToken($i, $tokens[$i]['content']);
+                } else {
+                    // Replace tabs with spaces, using an indent of 4 spaces.
+                    // Other sniffs can then correct the indent if they need to.
+                    $newContent = str_replace("\t", '    ', $tokens[$i]['content']);
+                    $phpcsFile->fixer->replaceToken($i, $newContent);
+                }
+            }
+        }//end for
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php	(revision 5534)
@@ -0,0 +1,1133 @@
+<?php
+/**
+ * Generic_Sniffs_Whitespace_ScopeIndentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Whitespace_ScopeIndentSniff.
+ *
+ * Checks that control structures are structured correctly, and their content
+ * is indented correctly. This sniff will throw errors if tabs are used
+ * for indentation rather than spaces.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Generic_Sniffs_WhiteSpace_ScopeIndentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+    /**
+     * Does the indent need to be exactly right?
+     *
+     * If TRUE, indent needs to be exactly $indent spaces. If FALSE,
+     * indent needs to be at least $indent spaces (but can be more).
+     *
+     * @var bool
+     */
+    public $exact = false;
+
+    /**
+     * Should tabs be used for indenting?
+     *
+     * If TRUE, fixes will be made using tabs instead of spaces.
+     * The size of each tab is important, so it should be specified
+     * using the --tab-width CLI argument.
+     *
+     * @var bool
+     */
+    public $tabIndent = false;
+
+    /**
+     * The --tab-width CLI value that is being used.
+     *
+     * @var int
+     */
+    private $_tabWidth = null;
+
+    /**
+     * List of tokens not needing to be checked for indentation.
+     *
+     * Useful to allow Sniffs based on this to easily ignore/skip some
+     * tokens from verification. For example, inline HTML sections
+     * or PHP open/close tags can escape from here and have their own
+     * rules elsewhere.
+     *
+     * @var int[]
+     */
+    public $ignoreIndentationTokens = array();
+
+    /**
+     * List of tokens not needing to be checked for indentation.
+     *
+     * This is a cached copy of the public version of this var, which
+     * can be set in a ruleset file, and some core ignored tokens.
+     *
+     * @var int[]
+     */
+    private $_ignoreIndentationTokens = array();
+
+    /**
+     * Any scope openers that should not cause an indent.
+     *
+     * @var int[]
+     */
+    protected $nonIndentingScopes = array();
+
+    /**
+     * Show debug output for this sniff.
+     *
+     * @var bool
+     */
+    private $_debug = false;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        if (defined('PHP_CODESNIFFER_IN_TESTS') === true) {
+            $this->_debug = false;
+        }
+
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $debug = PHP_CodeSniffer::getConfigData('scope_indent_debug');
+        if ($debug !== null) {
+            $this->_debug = (bool) $debug;
+        }
+
+        if ($this->_tabWidth === null) {
+            $cliValues = $phpcsFile->phpcs->cli->getCommandLineValues();
+            if (isset($cliValues['tabWidth']) === false || $cliValues['tabWidth'] === 0) {
+                // We have no idea how wide tabs are, so assume 4 spaces for fixing.
+                // It shouldn't really matter because indent checks elsewhere in the
+                // standard should fix things up.
+                $this->_tabWidth = 4;
+            } else {
+                $this->_tabWidth = $cliValues['tabWidth'];
+            }
+        }
+
+        $currentIndent = 0;
+        $lastOpenTag   = $stackPtr;
+        $lastCloseTag  = null;
+        $openScopes    = array();
+        $adjustments   = array();
+
+        $tokens  = $phpcsFile->getTokens();
+        $first   = $phpcsFile->findFirstOnLine(T_INLINE_HTML, $stackPtr);
+        $trimmed = ltrim($tokens[$first]['content']);
+        if ($trimmed === '') {
+            $currentIndent = ($tokens[$stackPtr]['column'] - 1);
+        } else {
+            $currentIndent = (strlen($tokens[$first]['content']) - strlen($trimmed));
+        }
+
+        if ($this->_debug === true) {
+            $line = $tokens[$stackPtr]['line'];
+            echo "Start with token $stackPtr on line $line with indent $currentIndent".PHP_EOL;
+        }
+
+        if (empty($this->_ignoreIndentationTokens) === true) {
+            $this->_ignoreIndentationTokens = array(T_INLINE_HTML => true);
+            foreach ($this->ignoreIndentationTokens as $token) {
+                if (is_int($token) === false) {
+                    if (defined($token) === false) {
+                        continue;
+                    }
+
+                    $token = constant($token);
+                }
+
+                $this->_ignoreIndentationTokens[$token] = true;
+            }
+        }//end if
+
+        $this->exact     = (bool) $this->exact;
+        $this->tabIndent = (bool) $this->tabIndent;
+
+        for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+            if ($i === false) {
+                // Something has gone very wrong; maybe a parse error.
+                break;
+            }
+
+            $checkToken  = null;
+            $checkIndent = null;
+
+            $exact = (bool) $this->exact;
+            if ($exact === true && isset($tokens[$i]['nested_parenthesis']) === true) {
+                // Don't check indents exactly between parenthesis as they
+                // tend to have custom rules, such as with multi-line function calls
+                // and control structure conditions.
+                $exact = false;
+            }
+
+            // Detect line changes and figure out where the indent is.
+            if ($tokens[$i]['column'] === 1) {
+                $trimmed = ltrim($tokens[$i]['content']);
+                if ($trimmed === '') {
+                    if (isset($tokens[($i + 1)]) === true
+                        && $tokens[$i]['line'] === $tokens[($i + 1)]['line']
+                    ) {
+                        $checkToken  = ($i + 1);
+                        $tokenIndent = ($tokens[($i + 1)]['column'] - 1);
+                    }
+                } else {
+                    $checkToken  = $i;
+                    $tokenIndent = (strlen($tokens[$i]['content']) - strlen($trimmed));
+                }
+            }
+
+            // Closing parenthesis should just be indented to at least
+            // the same level as where they were opened (but can be more).
+            if (($checkToken !== null
+                && $tokens[$checkToken]['code'] === T_CLOSE_PARENTHESIS
+                && isset($tokens[$checkToken]['parenthesis_opener']) === true)
+                || ($tokens[$i]['code'] === T_CLOSE_PARENTHESIS
+                && isset($tokens[$i]['parenthesis_opener']) === true
+                && isset($tokens[$i]['parenthesis_owner']) === true
+                && $tokens[$tokens[$i]['parenthesis_owner']]['code'] === T_ARRAY)
+            ) {
+                if ($checkToken !== null) {
+                    $parenCloser = $checkToken;
+                } else {
+                    $parenCloser = $i;
+                }
+
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Closing parenthesis found on line $line".PHP_EOL;
+                }
+
+                $parenOpener = $tokens[$parenCloser]['parenthesis_opener'];
+                if ($tokens[$parenCloser]['line'] !== $tokens[$parenOpener]['line']) {
+                    $first       = $phpcsFile->findFirstOnLine(T_WHITESPACE, $parenOpener, true);
+                    $checkIndent = ($tokens[$first]['column'] - 1);
+                    if (isset($adjustments[$first]) === true) {
+                        $checkIndent += $adjustments[$first];
+                    }
+
+                    $exact = false;
+
+                    if ($this->_debug === true) {
+                        $line = $tokens[$first]['line'];
+                        $type = $tokens[$first]['type'];
+                        echo "\t* first token on line $line is $type *".PHP_EOL;
+                    }
+
+                    if ($first === $tokens[$parenCloser]['parenthesis_opener']) {
+                        // This is unlikely to be the start of the statement, so look
+                        // back further to find it.
+                        $first--;
+                    }
+
+                    $prev = $phpcsFile->findStartOfStatement($first);
+                    if ($prev !== $first) {
+                        // This is not the start of the statement.
+                        if ($this->_debug === true) {
+                            $line = $tokens[$prev]['line'];
+                            $type = $tokens[$prev]['type'];
+                            echo "\t* previous is $type on line $line *".PHP_EOL;
+                        }
+
+                        $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $prev, true);
+                        $prev  = $phpcsFile->findStartOfStatement($first);
+                        $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $prev, true);
+                        if ($this->_debug === true) {
+                            $line = $tokens[$first]['line'];
+                            $type = $tokens[$first]['type'];
+                            echo "\t* amended first token is $type on line $line *".PHP_EOL;
+                        }
+                    }
+
+                    if (isset($tokens[$first]['scope_closer']) === true
+                        && $tokens[$first]['scope_closer'] === $first
+                    ) {
+                        if ($this->_debug === true) {
+                            echo "\t* first token is a scope closer *".PHP_EOL;
+                        }
+
+                        if (isset($tokens[$first]['scope_condition']) === true) {
+                            $scopeCloser = $first;
+                            $first       = $phpcsFile->findFirstOnLine(T_WHITESPACE, $tokens[$scopeCloser]['scope_condition'], true);
+
+                            $currentIndent = ($tokens[$first]['column'] - 1);
+                            if (isset($adjustments[$first]) === true) {
+                                $currentIndent += $adjustments[$first];
+                            }
+
+                            // Make sure it is divisible by our expected indent.
+                            if ($tokens[$tokens[$scopeCloser]['scope_condition']]['code'] !== T_CLOSURE) {
+                                $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+                            }
+
+                            if ($this->_debug === true) {
+                                echo "\t=> indent set to $currentIndent".PHP_EOL;
+                            }
+                        }//end if
+                    } else {
+                        // Don't force current indent to divisible because there could be custom
+                        // rules in place between parenthesis, such as with arrays.
+                        $currentIndent = ($tokens[$first]['column'] - 1);
+                        if (isset($adjustments[$first]) === true) {
+                            $currentIndent += $adjustments[$first];
+                        }
+
+                        if ($this->_debug === true) {
+                            echo "\t=> checking indent of $checkIndent; main indent set to $currentIndent".PHP_EOL;
+                        }
+                    }//end if
+                } else if ($this->_debug === true) {
+                    echo "\t * ignoring single-line definition *".PHP_EOL;
+                }//end if
+            }//end if
+
+            // Closing short array bracket should just be indented to at least
+            // the same level as where it was opened (but can be more).
+            if ($tokens[$i]['code'] === T_CLOSE_SHORT_ARRAY
+                || ($checkToken !== null
+                && $tokens[$checkToken]['code'] === T_CLOSE_SHORT_ARRAY)
+            ) {
+                if ($checkToken !== null) {
+                    $arrayCloser = $checkToken;
+                } else {
+                    $arrayCloser = $i;
+                }
+
+                if ($this->_debug === true) {
+                    $line = $tokens[$arrayCloser]['line'];
+                    echo "Closing short array bracket found on line $line".PHP_EOL;
+                }
+
+                $arrayOpener = $tokens[$arrayCloser]['bracket_opener'];
+                if ($tokens[$arrayCloser]['line'] !== $tokens[$arrayOpener]['line']) {
+                    $first       = $phpcsFile->findFirstOnLine(T_WHITESPACE, $arrayOpener, true);
+                    $checkIndent = ($tokens[$first]['column'] - 1);
+                    if (isset($adjustments[$first]) === true) {
+                        $checkIndent += $adjustments[$first];
+                    }
+
+                    $exact = false;
+
+                    if ($this->_debug === true) {
+                        $line = $tokens[$first]['line'];
+                        $type = $tokens[$first]['type'];
+                        echo "\t* first token on line $line is $type *".PHP_EOL;
+                    }
+
+                    if ($first === $tokens[$arrayCloser]['bracket_opener']) {
+                        // This is unlikely to be the start of the statement, so look
+                        // back further to find it.
+                        $first--;
+                    }
+
+                    $prev = $phpcsFile->findStartOfStatement($first);
+                    if ($prev !== $first) {
+                        // This is not the start of the statement.
+                        if ($this->_debug === true) {
+                            $line = $tokens[$prev]['line'];
+                            $type = $tokens[$prev]['type'];
+                            echo "\t* previous is $type on line $line *".PHP_EOL;
+                        }
+
+                        $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $prev, true);
+                        $prev  = $phpcsFile->findStartOfStatement($first);
+                        $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $prev, true);
+                        if ($this->_debug === true) {
+                            $line = $tokens[$first]['line'];
+                            $type = $tokens[$first]['type'];
+                            echo "\t* amended first token is $type on line $line *".PHP_EOL;
+                        }
+                    }
+
+                    if (isset($tokens[$first]['scope_closer']) === true
+                        && $tokens[$first]['scope_closer'] === $first
+                    ) {
+                        // The first token is a scope closer and would have already
+                        // been processed and set the indent level correctly, so
+                        // don't adjust it again.
+                        if ($this->_debug === true) {
+                            echo "\t* first token is a scope closer; ignoring closing short array bracket *".PHP_EOL;
+                        }
+                    } else {
+                        // Don't force current indent to be divisible because there could be custom
+                        // rules in place for arrays.
+                        $currentIndent = ($tokens[$first]['column'] - 1);
+                        if (isset($adjustments[$first]) === true) {
+                            $currentIndent += $adjustments[$first];
+                        }
+
+                        if ($this->_debug === true) {
+                            echo "\t=> checking indent of $checkIndent; main indent set to $currentIndent".PHP_EOL;
+                        }
+                    }
+                } else if ($this->_debug === true) {
+                    echo "\t * ignoring single-line definition *".PHP_EOL;
+                }//end if
+            }//end if
+
+            // Adjust lines within scopes while auto-fixing.
+            if ($checkToken !== null
+                && $exact === false
+                && (empty($tokens[$checkToken]['conditions']) === false
+                || (isset($tokens[$checkToken]['scope_opener']) === true
+                && $tokens[$checkToken]['scope_opener'] === $checkToken))
+            ) {
+                if (empty($tokens[$checkToken]['conditions']) === false) {
+                    end($tokens[$checkToken]['conditions']);
+                    $condition = key($tokens[$checkToken]['conditions']);
+                } else {
+                    $condition = $tokens[$checkToken]['scope_condition'];
+                }
+
+                $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $condition, true);
+
+                if (isset($adjustments[$first]) === true
+                    && (($adjustments[$first] < 0 && $tokenIndent > $currentIndent)
+                    || ($adjustments[$first] > 0 && $tokenIndent < $currentIndent))
+                ) {
+                    $padding = ($tokenIndent + $adjustments[$first]);
+                    if ($padding > 0) {
+                        if ($this->tabIndent === true) {
+                            $numTabs   = floor($padding / $this->_tabWidth);
+                            $numSpaces = ($padding - ($numTabs * $this->_tabWidth));
+                            $padding   = str_repeat("\t", $numTabs).str_repeat(' ', $numSpaces);
+                        } else {
+                            $padding = str_repeat(' ', $padding);
+                        }
+                    } else {
+                        $padding = '';
+                    }
+
+                    if ($checkToken === $i) {
+                        $phpcsFile->fixer->replaceToken($checkToken, $padding.$trimmed);
+                    } else {
+                        // Easier to just replace the entire indent.
+                        $phpcsFile->fixer->replaceToken(($checkToken - 1), $padding);
+                    }
+
+                    if ($this->_debug === true) {
+                        $length = strlen($padding);
+                        $line   = $tokens[$checkToken]['line'];
+                        $type   = $tokens[$checkToken]['type'];
+                        echo "Indent adjusted to $length for $type on line $line".PHP_EOL;
+                    }
+
+                    $adjustments[$checkToken] = $adjustments[$first];
+
+                    if ($this->_debug === true) {
+                        $line = $tokens[$checkToken]['line'];
+                        $type = $tokens[$checkToken]['type'];
+                        echo "\t=> Add adjustment of ".$adjustments[$checkToken]." for token $checkToken ($type) on line $line".PHP_EOL;
+                    }
+                }//end if
+            }//end if
+
+            // Scope closers reset the required indent to the same level as the opening condition.
+            if (($checkToken !== null
+                && isset($openScopes[$checkToken]) === true
+                || (isset($tokens[$checkToken]['scope_condition']) === true
+                && isset($tokens[$checkToken]['scope_closer']) === true
+                && $tokens[$checkToken]['scope_closer'] === $checkToken
+                && $tokens[$checkToken]['line'] !== $tokens[$tokens[$checkToken]['scope_opener']]['line']))
+                || ($checkToken === null
+                && isset($openScopes[$i]) === true
+                || (isset($tokens[$i]['scope_condition']) === true
+                && isset($tokens[$i]['scope_closer']) === true
+                && $tokens[$i]['scope_closer'] === $i
+                && $tokens[$i]['line'] !== $tokens[$tokens[$i]['scope_opener']]['line']))
+            ) {
+                if ($this->_debug === true) {
+                    if ($checkToken === null) {
+                        $type = $tokens[$tokens[$i]['scope_condition']]['type'];
+                        $line = $tokens[$i]['line'];
+                    } else {
+                        $type = $tokens[$tokens[$checkToken]['scope_condition']]['type'];
+                        $line = $tokens[$checkToken]['line'];
+                    }
+
+                    echo "Close scope ($type) on line $line".PHP_EOL;
+                }
+
+                $scopeCloser = $checkToken;
+                if ($scopeCloser === null) {
+                    $scopeCloser = $i;
+                } else {
+                    array_pop($openScopes);
+                }
+
+                if (isset($tokens[$scopeCloser]['scope_condition']) === true) {
+                    $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $tokens[$scopeCloser]['scope_condition'], true);
+
+                    $currentIndent = ($tokens[$first]['column'] - 1);
+                    if (isset($adjustments[$first]) === true) {
+                        $currentIndent += $adjustments[$first];
+                    }
+
+                    // Make sure it is divisible by our expected indent.
+                    if ($tokens[$tokens[$scopeCloser]['scope_condition']]['code'] !== T_CLOSURE) {
+                        $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+                    }
+
+                    if ($this->_debug === true) {
+                        echo "\t=> indent set to $currentIndent".PHP_EOL;
+                    }
+
+                    // We only check the indent of scope closers if they are
+                    // curly braces because other constructs tend to have different rules.
+                    if ($tokens[$scopeCloser]['code'] === T_CLOSE_CURLY_BRACKET) {
+                        $exact = true;
+                    } else {
+                        $checkToken = null;
+                    }
+                }//end if
+            }//end if
+
+            // Handle scope for JS object notation.
+            if ($phpcsFile->tokenizerType === 'JS'
+                && (($checkToken !== null
+                && $tokens[$checkToken]['code'] === T_CLOSE_OBJECT
+                && $tokens[$checkToken]['line'] !== $tokens[$tokens[$checkToken]['bracket_opener']]['line'])
+                || ($checkToken === null
+                && $tokens[$i]['code'] === T_CLOSE_OBJECT
+                && $tokens[$i]['line'] !== $tokens[$tokens[$i]['bracket_opener']]['line']))
+            ) {
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Close JS object on line $line".PHP_EOL;
+                }
+
+                $scopeCloser = $checkToken;
+                if ($scopeCloser === null) {
+                    $scopeCloser = $i;
+                } else {
+                    array_pop($openScopes);
+                }
+
+                $parens = 0;
+                if (isset($tokens[$scopeCloser]['nested_parenthesis']) === true
+                    && empty($tokens[$scopeCloser]['nested_parenthesis']) === false
+                ) {
+                    end($tokens[$scopeCloser]['nested_parenthesis']);
+                    $parens = key($tokens[$scopeCloser]['nested_parenthesis']);
+                    if ($this->_debug === true) {
+                        $line = $tokens[$parens]['line'];
+                        echo "\t* token has nested parenthesis $parens on line $line *".PHP_EOL;
+                    }
+                }
+
+                $condition = 0;
+                if (isset($tokens[$scopeCloser]['conditions']) === true
+                    && empty($tokens[$scopeCloser]['conditions']) === false
+                ) {
+                    end($tokens[$scopeCloser]['conditions']);
+                    $condition = key($tokens[$scopeCloser]['conditions']);
+                    if ($this->_debug === true) {
+                        $line = $tokens[$condition]['line'];
+                        $type = $tokens[$condition]['type'];
+                        echo "\t* token is inside condition $condition ($type) on line $line *".PHP_EOL;
+                    }
+                }
+
+                if ($parens > $condition) {
+                    if ($this->_debug === true) {
+                        echo "\t* using parenthesis *".PHP_EOL;
+                    }
+
+                    $first     = $phpcsFile->findFirstOnLine(T_WHITESPACE, $parens, true);
+                    $condition = 0;
+                } else if ($condition > 0) {
+                    if ($this->_debug === true) {
+                        echo "\t* using condition *".PHP_EOL;
+                    }
+
+                    $first  = $phpcsFile->findFirstOnLine(T_WHITESPACE, $condition, true);
+                    $parens = 0;
+                } else {
+                    if ($this->_debug === true) {
+                        $line = $tokens[$tokens[$scopeCloser]['bracket_opener']]['line'];
+                        echo "\t* token is not in parenthesis or condition; using opener on line $line *".PHP_EOL;
+                    }
+
+                    $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $tokens[$scopeCloser]['bracket_opener'], true);
+                }//end if
+
+                $currentIndent = ($tokens[$first]['column'] - 1);
+                if (isset($adjustments[$first]) === true) {
+                    $currentIndent += $adjustments[$first];
+                }
+
+                if ($parens > 0 || $condition > 0) {
+                    $checkIndent = ($tokens[$first]['column'] - 1);
+                    if (isset($adjustments[$first]) === true) {
+                        $checkIndent += $adjustments[$first];
+                    }
+
+                    if ($condition > 0) {
+                        $checkIndent   += $this->indent;
+                        $currentIndent += $this->indent;
+                        $exact          = true;
+                    }
+                } else {
+                    $checkIndent = $currentIndent;
+                }
+
+                // Make sure it is divisible by our expected indent.
+                $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+                $checkIndent   = (int) (ceil($checkIndent / $this->indent) * $this->indent);
+
+                if ($this->_debug === true) {
+                    echo "\t=> checking indent of $checkIndent; main indent set to $currentIndent".PHP_EOL;
+                }
+            }//end if
+
+            if ($checkToken !== null
+                && isset(PHP_CodeSniffer_Tokens::$scopeOpeners[$tokens[$checkToken]['code']]) === true
+                && in_array($tokens[$checkToken]['code'], $this->nonIndentingScopes) === false
+                && isset($tokens[$checkToken]['scope_opener']) === true
+            ) {
+                $exact = true;
+
+                $lastOpener = null;
+                if (empty($openScopes) === false) {
+                    end($openScopes);
+                    $lastOpener = current($openScopes);
+                }
+
+                // A scope opener that shares a closer with another token (like multiple
+                // CASEs using the same BREAK) needs to reduce the indent level so its
+                // indent is checked correctly. It will then increase the indent again
+                // (as all openers do) after being checked.
+                if ($lastOpener !== null
+                    && isset($tokens[$lastOpener]['scope_closer']) === true
+                    && $tokens[$lastOpener]['level'] === $tokens[$checkToken]['level']
+                    && $tokens[$lastOpener]['scope_closer'] === $tokens[$checkToken]['scope_closer']
+                ) {
+                    $currentIndent -= $this->indent;
+                    if ($this->_debug === true) {
+                        $line = $tokens[$i]['line'];
+                        echo "Shared closer found on line $line".PHP_EOL;
+                        echo "\t=> indent set to $currentIndent".PHP_EOL;
+                    }
+                }
+
+                if ($tokens[$checkToken]['code'] === T_CLOSURE
+                    && $tokenIndent > $currentIndent
+                ) {
+                    // The opener is indented more than needed, which is fine.
+                    // But just check that it is divisible by our expected indent.
+                    $checkIndent = (int) (ceil($tokenIndent / $this->indent) * $this->indent);
+                    $exact       = false;
+
+                    if ($this->_debug === true) {
+                        $line = $tokens[$i]['line'];
+                        echo "Closure found on line $line".PHP_EOL;
+                        echo "\t=> checking indent of $checkIndent; main indent remains at $currentIndent".PHP_EOL;
+                    }
+                }
+            }//end if
+
+            // Method prefix indentation has to be exact or else if will break
+            // the rest of the function declaration, and potentially future ones.
+            if ($checkToken !== null
+                && isset(PHP_CodeSniffer_Tokens::$methodPrefixes[$tokens[$checkToken]['code']]) === true
+                && $tokens[($checkToken + 1)]['code'] !== T_DOUBLE_COLON
+            ) {
+                $exact = true;
+            }
+
+            // JS property indentation has to be exact or else if will break
+            // things like function and object indentation.
+            if ($checkToken !== null && $tokens[$checkToken]['code'] === T_PROPERTY) {
+                $exact = true;
+            }
+
+            // PHP tags needs to be indented to exact column positions
+            // so they don't cause problems with indent checks for the code
+            // within them, but they don't need to line up with the current indent.
+            if ($checkToken !== null
+                && ($tokens[$checkToken]['code'] === T_OPEN_TAG
+                || $tokens[$checkToken]['code'] === T_OPEN_TAG_WITH_ECHO
+                || $tokens[$checkToken]['code'] === T_CLOSE_TAG)
+            ) {
+                $exact       = true;
+                $checkIndent = ($tokens[$checkToken]['column'] - 1);
+                $checkIndent = (int) (ceil($checkIndent / $this->indent) * $this->indent);
+            }
+
+            // Check the line indent.
+            if ($checkIndent === null) {
+                $checkIndent = $currentIndent;
+            }
+
+            $adjusted = false;
+            if ($checkToken !== null
+                && isset($this->_ignoreIndentationTokens[$tokens[$checkToken]['code']]) === false
+                && (($tokenIndent !== $checkIndent && $exact === true)
+                || ($tokenIndent < $checkIndent && $exact === false))
+            ) {
+                $type  = 'IncorrectExact';
+                $error = 'Line indented incorrectly; expected ';
+                if ($exact === false) {
+                    $error .= 'at least ';
+                    $type   = 'Incorrect';
+                }
+
+                if ($this->tabIndent === true) {
+                    $error .= '%s tabs, found %s';
+                    $data   = array(
+                               floor($checkIndent / $this->_tabWidth),
+                               floor($tokenIndent / $this->_tabWidth),
+                              );
+                } else {
+                    $error .= '%s spaces, found %s';
+                    $data   = array(
+                               $checkIndent,
+                               $tokenIndent,
+                              );
+                }
+
+                if ($this->_debug === true) {
+                    $line    = $tokens[$checkToken]['line'];
+                    $message = vsprintf($error, $data);
+                    echo "[Line $line] $message".PHP_EOL;
+                }
+
+                $fix = $phpcsFile->addFixableError($error, $checkToken, $type, $data);
+                if ($fix === true || $this->_debug === true) {
+                    $padding = '';
+                    if ($this->tabIndent === true) {
+                        $numTabs = floor($checkIndent / $this->_tabWidth);
+                        if ($numTabs > 0) {
+                            $numSpaces = ($checkIndent - ($numTabs * $this->_tabWidth));
+                            $padding   = str_repeat("\t", $numTabs).str_repeat(' ', $numSpaces);
+                        }
+                    } else if ($checkIndent > 0) {
+                        $padding = str_repeat(' ', $checkIndent);
+                    }
+
+                    if ($checkToken === $i) {
+                        $accepted = $phpcsFile->fixer->replaceToken($checkToken, $padding.$trimmed);
+                    } else {
+                        // Easier to just replace the entire indent.
+                        $accepted = $phpcsFile->fixer->replaceToken(($checkToken - 1), $padding);
+                    }
+
+                    if ($accepted === true) {
+                        $adjustments[$checkToken] = ($checkIndent - $tokenIndent);
+                        if ($this->_debug === true) {
+                            $line = $tokens[$checkToken]['line'];
+                            $type = $tokens[$checkToken]['type'];
+                            echo "\t=> Add adjustment of ".$adjustments[$checkToken]." for token $checkToken ($type) on line $line".PHP_EOL;
+                        }
+                    }
+                }//end if
+            }//end if
+
+            if ($checkToken !== null) {
+                $i = $checkToken;
+            }
+
+            // Completely skip here/now docs as the indent is a part of the
+            // content itself.
+            if ($tokens[$i]['code'] === T_START_HEREDOC
+                || $tokens[$i]['code'] === T_START_NOWDOC
+            ) {
+                $i = $phpcsFile->findNext(array(T_END_HEREDOC, T_END_NOWDOC), ($i + 1));
+                continue;
+            }
+
+            // Completely skip multi-line strings as the indent is a part of the
+            // content itself.
+            if ($tokens[$i]['code'] === T_CONSTANT_ENCAPSED_STRING
+                || $tokens[$i]['code'] === T_DOUBLE_QUOTED_STRING
+            ) {
+                $i = $phpcsFile->findNext($tokens[$i]['code'], ($i + 1), null, true);
+                $i--;
+                continue;
+            }
+
+            // Completely skip doc comments as they tend to have complex
+            // indentation rules.
+            if ($tokens[$i]['code'] === T_DOC_COMMENT_OPEN_TAG) {
+                $i = $tokens[$i]['comment_closer'];
+                continue;
+            }
+
+            // Open tags reset the indent level.
+            if ($tokens[$i]['code'] === T_OPEN_TAG
+                || $tokens[$i]['code'] === T_OPEN_TAG_WITH_ECHO
+            ) {
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Open PHP tag found on line $line".PHP_EOL;
+                }
+
+                if ($checkToken === null) {
+                    $first         = $phpcsFile->findFirstOnLine(T_WHITESPACE, $i, true);
+                    $currentIndent = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content'])));
+                } else {
+                    $currentIndent = ($tokens[$i]['column'] - 1);
+                }
+
+                $lastOpenTag = $i;
+
+                if (isset($adjustments[$i]) === true) {
+                    $currentIndent += $adjustments[$i];
+                }
+
+                // Make sure it is divisible by our expected indent.
+                $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+
+                if ($this->_debug === true) {
+                    echo "\t=> indent set to $currentIndent".PHP_EOL;
+                }
+
+                continue;
+            }//end if
+
+            // Close tags reset the indent level, unless they are closing a tag
+            // opened on the same line.
+            if ($tokens[$i]['code'] === T_CLOSE_TAG) {
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Close PHP tag found on line $line".PHP_EOL;
+                }
+
+                if ($tokens[$lastOpenTag]['line'] !== $tokens[$i]['line']) {
+                    $currentIndent = ($tokens[$i]['column'] - 1);
+                    $lastCloseTag  = $i;
+                } else {
+                    if ($lastCloseTag === null) {
+                        $currentIndent = 0;
+                    } else {
+                        $currentIndent = ($tokens[$lastCloseTag]['column'] - 1);
+                    }
+                }
+
+                if (isset($adjustments[$i]) === true) {
+                    $currentIndent += $adjustments[$i];
+                }
+
+                // Make sure it is divisible by our expected indent.
+                $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+
+                if ($this->_debug === true) {
+                    echo "\t=> indent set to $currentIndent".PHP_EOL;
+                }
+
+                continue;
+            }//end if
+
+            // Closures set the indent based on their own indent level.
+            if ($tokens[$i]['code'] === T_CLOSURE) {
+                $closer = $tokens[$i]['scope_closer'];
+                if ($tokens[$i]['line'] === $tokens[$closer]['line']) {
+                    if ($this->_debug === true) {
+                        $line = $tokens[$i]['line'];
+                        echo "* ignoring single-line closure on line $line".PHP_EOL;
+                    }
+
+                    $i = $closer;
+                    continue;
+                }
+
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Open closure on line $line".PHP_EOL;
+                }
+
+                $first         = $phpcsFile->findFirstOnLine(T_WHITESPACE, $i, true);
+                $currentIndent = (($tokens[$first]['column'] - 1) + $this->indent);
+
+                if (isset($adjustments[$first]) === true) {
+                    $currentIndent += $adjustments[$first];
+                }
+
+                // Make sure it is divisible by our expected indent.
+                $currentIndent = (int) (floor($currentIndent / $this->indent) * $this->indent);
+                $i = $tokens[$i]['scope_opener'];
+
+                if ($this->_debug === true) {
+                    echo "\t=> indent set to $currentIndent".PHP_EOL;
+                }
+
+                continue;
+            }//end if
+
+            // Scope openers increase the indent level.
+            if (isset($tokens[$i]['scope_condition']) === true
+                && isset($tokens[$i]['scope_opener']) === true
+                && $tokens[$i]['scope_opener'] === $i
+            ) {
+                $closer = $tokens[$i]['scope_closer'];
+                if ($tokens[$i]['line'] === $tokens[$closer]['line']) {
+                    if ($this->_debug === true) {
+                        $line = $tokens[$i]['line'];
+                        $type = $tokens[$i]['type'];
+                        echo "* ignoring single-line $type on line $line".PHP_EOL;
+                    }
+
+                    $i = $closer;
+                    continue;
+                }
+
+                $condition = $tokens[$tokens[$i]['scope_condition']]['code'];
+                if (isset(PHP_CodeSniffer_Tokens::$scopeOpeners[$condition]) === true
+                    && in_array($condition, $this->nonIndentingScopes) === false
+                ) {
+                    if ($this->_debug === true) {
+                        $line = $tokens[$i]['line'];
+                        $type = $tokens[$tokens[$i]['scope_condition']]['type'];
+                        echo "Open scope ($type) on line $line".PHP_EOL;
+                    }
+
+                    $currentIndent += $this->indent;
+                    $openScopes[$tokens[$i]['scope_closer']] = $tokens[$i]['scope_condition'];
+
+                    if ($this->_debug === true) {
+                        echo "\t=> indent set to $currentIndent".PHP_EOL;
+                    }
+
+                    continue;
+                }
+            }//end if
+
+            // JS objects set the indent level.
+            if ($phpcsFile->tokenizerType === 'JS'
+                && $tokens[$i]['code'] === T_OBJECT
+            ) {
+                $closer = $tokens[$i]['bracket_closer'];
+                if ($tokens[$i]['line'] === $tokens[$closer]['line']) {
+                    if ($this->_debug === true) {
+                        $line = $tokens[$i]['line'];
+                        echo "* ignoring single-line JS object on line $line".PHP_EOL;
+                    }
+
+                    $i = $closer;
+                    continue;
+                }
+
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Open JS object on line $line".PHP_EOL;
+                }
+
+                $first         = $phpcsFile->findFirstOnLine(T_WHITESPACE, $i, true);
+                $currentIndent = (($tokens[$first]['column'] - 1) + $this->indent);
+                if (isset($adjustments[$first]) === true) {
+                    $currentIndent += $adjustments[$first];
+                }
+
+                // Make sure it is divisible by our expected indent.
+                $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+
+                if ($this->_debug === true) {
+                    echo "\t=> indent set to $currentIndent".PHP_EOL;
+                }
+
+                continue;
+            }//end if
+
+            // Closing a closure.
+            if (isset($tokens[$i]['scope_condition']) === true
+                && $tokens[$i]['scope_closer'] === $i
+                && $tokens[$tokens[$i]['scope_condition']]['code'] === T_CLOSURE
+            ) {
+                if ($this->_debug === true) {
+                    $line = $tokens[$i]['line'];
+                    echo "Close closure on line $line".PHP_EOL;
+                }
+
+                $prev = false;
+
+                $object = 0;
+                if ($phpcsFile->tokenizerType === 'JS') {
+                    $conditions = $tokens[$i]['conditions'];
+                    krsort($conditions, SORT_NUMERIC);
+                    foreach ($conditions as $token => $condition) {
+                        if ($condition === T_OBJECT) {
+                            $object = $token;
+                            break;
+                        }
+                    }
+
+                    if ($this->_debug === true && $object !== 0) {
+                        $line = $tokens[$object]['line'];
+                        echo "\t* token is inside JS object $object on line $line *".PHP_EOL;
+                    }
+                }
+
+                $parens = 0;
+                if (isset($tokens[$i]['nested_parenthesis']) === true
+                    && empty($tokens[$i]['nested_parenthesis']) === false
+                ) {
+                    end($tokens[$i]['nested_parenthesis']);
+                    $parens = key($tokens[$i]['nested_parenthesis']);
+                    if ($this->_debug === true) {
+                        $line = $tokens[$parens]['line'];
+                        echo "\t* token has nested parenthesis $parens on line $line *".PHP_EOL;
+                    }
+                }
+
+                $condition = 0;
+                if (isset($tokens[$i]['conditions']) === true
+                    && empty($tokens[$i]['conditions']) === false
+                ) {
+                    end($tokens[$i]['conditions']);
+                    $condition = key($tokens[$i]['conditions']);
+                    if ($this->_debug === true) {
+                        $line = $tokens[$condition]['line'];
+                        $type = $tokens[$condition]['type'];
+                        echo "\t* token is inside condition $condition ($type) on line $line *".PHP_EOL;
+                    }
+                }
+
+                if ($parens > $object && $parens > $condition) {
+                    if ($this->_debug === true) {
+                        echo "\t* using parenthesis *".PHP_EOL;
+                    }
+
+                    $prev      = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($parens - 1), null, true);
+                    $object    = 0;
+                    $condition = 0;
+                } else if ($object > 0 && $object >= $condition) {
+                    if ($this->_debug === true) {
+                        echo "\t* using object *".PHP_EOL;
+                    }
+
+                    $prev      = $object;
+                    $parens    = 0;
+                    $condition = 0;
+                } else if ($condition > 0) {
+                    if ($this->_debug === true) {
+                        echo "\t* using condition *".PHP_EOL;
+                    }
+
+                    $prev   = $condition;
+                    $object = 0;
+                    $parens = 0;
+                }//end if
+
+                if ($prev === false) {
+                    $prev = $phpcsFile->findPrevious(array(T_EQUAL, T_RETURN), ($tokens[$i]['scope_condition'] - 1), null, false, null, true);
+                    if ($prev === false) {
+                        $prev = $i;
+                        if ($this->_debug === true) {
+                            echo "\t* could not find a previous T_EQUAL or T_RETURN token; will use current token *".PHP_EOL;
+                        }
+                    }
+                }
+
+                if ($this->_debug === true) {
+                    $line = $tokens[$prev]['line'];
+                    $type = $tokens[$prev]['type'];
+                    echo "\t* previous token is $type on line $line *".PHP_EOL;
+                }
+
+                $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $prev, true);
+                if ($this->_debug === true) {
+                    $line = $tokens[$first]['line'];
+                    $type = $tokens[$first]['type'];
+                    echo "\t* first token on line $line is $type *".PHP_EOL;
+                }
+
+                $prev = $phpcsFile->findStartOfStatement($first);
+                if ($prev !== $first) {
+                    // This is not the start of the statement.
+                    if ($this->_debug === true) {
+                        $line = $tokens[$prev]['line'];
+                        $type = $tokens[$prev]['type'];
+                        echo "\t* amended previous is $type on line $line *".PHP_EOL;
+                    }
+
+                    $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $prev, true);
+                    if ($this->_debug === true) {
+                        $line = $tokens[$first]['line'];
+                        $type = $tokens[$first]['type'];
+                        echo "\t* amended first token is $type on line $line *".PHP_EOL;
+                    }
+                }
+
+                $currentIndent = ($tokens[$first]['column'] - 1);
+                if ($object > 0 || $condition > 0) {
+                    $currentIndent += $this->indent;
+                }
+
+                if (isset($tokens[$first]['scope_closer']) === true
+                    && $tokens[$first]['scope_closer'] === $first
+                ) {
+                    if ($this->_debug === true) {
+                        echo "\t* first token is a scope closer *".PHP_EOL;
+                    }
+
+                    $currentIndent -= $this->indent;
+                }
+
+                // Make sure it is divisible by our expected indent.
+                $currentIndent = (int) (ceil($currentIndent / $this->indent) * $this->indent);
+
+                if ($this->_debug === true) {
+                    echo "\t=> indent set to $currentIndent".PHP_EOL;
+                }
+            }//end if
+        }//end for
+
+        // Don't process the rest of the file.
+        return $phpcsFile->numTokens;
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/ruleset.xml	(revision 5534)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<ruleset name="Generic">
+ <description>A collection of generic sniffs. This standard is not designed to be used to check code.</description>
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/IncorrectPatternException.php	(revision 5534)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * An exception thrown if the pattern being processed is not supposed to be
+ * validating the code in question.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * An exception thrown if the pattern being processed is not supposed to be
+ * validating the code in question.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Standards_IncorrectPatternException extends Exception
+{
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php	(revision 5534)
@@ -0,0 +1,100 @@
+<?php
+/**
+ * MySource_Sniffs_CSS_BrowserSpecificStylesSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * MySource_Sniffs_CSS_BrowserSpecificStylesSniff.
+ *
+ * Ensure that browser-specific styles are not used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_CSS_BrowserSpecificStylesSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+    /**
+     * A list of specific stylesheet suffixes we allow.
+     *
+     * These stylesheets contain browser specific styles
+     * so this sniff ignore them files in the form:
+     * *_moz.css and *_ie7.css etc.
+     *
+     * @var array
+     */
+    protected $specificStylesheets = array(
+                                      'moz'    => true,
+                                      'ie'     => true,
+                                      'ie7'    => true,
+                                      'ie8'    => true,
+                                      'webkit' => true,
+                                     );
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // Ignore files with browser-specific suffixes.
+        $filename  = $phpcsFile->getFilename();
+        $breakChar = strrpos($filename, '_');
+        if ($breakChar !== false && substr($filename, -4) === '.css') {
+            $specific = substr($filename, ($breakChar + 1), -4);
+            if (isset($this->specificStylesheets[$specific]) === true) {
+                return;
+            }
+        }
+
+        $tokens  = $phpcsFile->getTokens();
+        $content = $tokens[$stackPtr]['content'];
+
+        if ($content{0} === '-') {
+            $error = 'Browser-specific styles are not allowed';
+            $phpcsFile->addError($error, $stackPtr, 'ForbiddenStyle');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php	(revision 5534)
@@ -0,0 +1,135 @@
+<?php
+/**
+ * Ensures that self and static are not used to call public methods in action classes.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that self and static are not used to call public methods in action classes.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Channels_DisallowSelfActionsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_CLASS);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // We are not interested in abstract classes.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($prev !== false && $tokens[$prev]['code'] === T_ABSTRACT) {
+            return;
+        }
+
+        // We are only interested in Action classes.
+        $classNameToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        $className      = $tokens[$classNameToken]['content'];
+        if (substr($className, -7) !== 'Actions') {
+            return;
+        }
+
+        $foundFunctions = array();
+        $foundCalls     = array();
+
+        // Find all static method calls in the form self::method() in the class.
+        $classEnd = $tokens[$stackPtr]['scope_closer'];
+        for ($i = ($classNameToken + 1); $i < $classEnd; $i++) {
+            if ($tokens[$i]['code'] !== T_DOUBLE_COLON) {
+                if ($tokens[$i]['code'] === T_FUNCTION) {
+                    // Cache the function information.
+                    $funcName  = $phpcsFile->findNext(T_STRING, ($i + 1));
+                    $funcScope = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$scopeModifiers, ($i - 1));
+
+                    $foundFunctions[$tokens[$funcName]['content']] = strtolower($tokens[$funcScope]['content']);
+                }
+
+                continue;
+            }
+
+            $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), null, true);
+            if ($tokens[$prevToken]['content'] !== 'self'
+                && $tokens[$prevToken]['content'] !== 'static'
+            ) {
+                continue;
+            }
+
+            $funcNameToken = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true);
+            if ($tokens[$funcNameToken]['code'] === T_VARIABLE) {
+                // We are only interested in function calls.
+                continue;
+            }
+
+            $funcName = $tokens[$funcNameToken]['content'];
+
+            // We've found the function, now we need to find it and see if it is
+            // public, private or protected. If it starts with an underscore we
+            // can assume it is private.
+            if ($funcName{0} === '_') {
+                continue;
+            }
+
+            $foundCalls[$i] = array(
+                               'name' => $funcName,
+                               'type' => strtolower($tokens[$prevToken]['content']),
+                              );
+        }//end for
+
+        $errorClassName = substr($className, 0, -7);
+
+        foreach ($foundCalls as $token => $funcData) {
+            if (isset($foundFunctions[$funcData['name']]) === false) {
+                // Function was not in this class, might have come from the parent.
+                // Either way, we can't really check this.
+                continue;
+            } else if ($foundFunctions[$funcData['name']] === 'public') {
+                $type  = $funcData['type'];
+                $error = "Static calls to public methods in Action classes must not use the $type keyword; use %s::%s() instead";
+                $data  = array(
+                          $errorClassName,
+                          $funcName,
+                         );
+                $phpcsFile->addError($error, $token, 'Found'.ucfirst($funcData['type']), $data);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php	(revision 5534)
@@ -0,0 +1,109 @@
+<?php
+/**
+ * Ensures that a system does not include itself.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that a system does not include itself.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Channels_IncludeOwnSystemSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_DOUBLE_COLON);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName = $phpcsFile->getFilename();
+        $matches  = array();
+        if (preg_match('|/systems/(.*)/([^/]+)?actions.inc$|i', $fileName, $matches) === 0) {
+            // Not an actions file.
+            return;
+        }
+
+        $ownClass = $matches[2];
+        $tokens   = $phpcsFile->getTokens();
+
+        $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 2), null, false, true);
+        $typeName = trim($tokens[$typeName]['content'], " '");
+        switch (strtolower($tokens[($stackPtr + 1)]['content'])) {
+        case 'includesystem' :
+            $included = strtolower($typeName);
+            break;
+        case 'includeasset' :
+            $included = strtolower($typeName).'assettype';
+            break;
+        case 'includewidget' :
+            $included = strtolower($typeName).'widgettype';
+            break;
+        default:
+            return;
+        }
+
+        if ($included === strtolower($ownClass)) {
+            $error = "You do not need to include \"%s\" from within the system's own actions file";
+            $data  = array($ownClass);
+            $phpcsFile->addError($error, $stackPtr, 'NotRequired', $data);
+        }
+
+    }//end process()
+
+
+    /**
+     * Determines the included class name from given token.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param array                $tokens    The array of file tokens.
+     * @param int                  $stackPtr  The position in the tokens array of the
+     *                                        potentially included class.
+     *
+     * @return string
+     */
+    protected function getIncludedClassFromToken(
+        PHP_CodeSniffer_File $phpcsFile,
+        array $tokens,
+        $stackPtr
+    ) {
+
+        return false;
+
+    }//end getIncludedClassFromToken()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php	(revision 5534)
@@ -0,0 +1,335 @@
+<?php
+/**
+ * Ensures that systems, asset types and libs are included before they are used.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Ensures that systems, asset types and libs are included before they are used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Channels_IncludeSystemSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+    /**
+     * A list of classes that don't need to be included.
+     *
+     * @var array(string)
+     */
+    private $_ignore = array(
+                        'self'                      => true,
+                        'static'                    => true,
+                        'parent'                    => true,
+                        'channels'                  => true,
+                        'basesystem'                => true,
+                        'dal'                       => true,
+                        'init'                      => true,
+                        'pdo'                       => true,
+                        'util'                      => true,
+                        'ziparchive'                => true,
+                        'phpunit_framework_assert'  => true,
+                        'abstractmysourceunittest'  => true,
+                        'abstractdatacleanunittest' => true,
+                        'exception'                 => true,
+                        'abstractwidgetwidgettype'  => true,
+                        'domdocument'               => true,
+                       );
+
+
+    /**
+     * Constructs a Squiz_Sniffs_Scope_MethodScopeSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_FUNCTION), array(T_DOUBLE_COLON, T_EXTENDS), true);
+
+    }//end __construct()
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param integer              $stackPtr  The position where the token was found.
+     * @param integer              $currScope The current scope opener token.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(
+        PHP_CodeSniffer_File $phpcsFile,
+        $stackPtr,
+        $currScope
+    ) {
+        $tokens = $phpcsFile->getTokens();
+
+        // Determine the name of the class that the static function
+        // is being called on.
+        $classNameToken = $phpcsFile->findPrevious(
+            T_WHITESPACE,
+            ($stackPtr - 1),
+            null,
+            true
+        );
+
+        // Don't process class names represented by variables as this can be
+        // an inexact science.
+        if ($tokens[$classNameToken]['code'] === T_VARIABLE) {
+            return;
+        }
+
+        $className = $tokens[$classNameToken]['content'];
+        if (isset($this->_ignore[strtolower($className)]) === true) {
+            return;
+        }
+
+        $includedClasses = array();
+
+        $fileName = strtolower($phpcsFile->getFilename());
+        $matches  = array();
+        if (preg_match('|/systems/(.*)/([^/]+)?actions.inc$|', $fileName, $matches) !== 0) {
+            // This is an actions file, which means we don't
+            // have to include the system in which it exists.
+            $includedClasses[$matches[2]] = true;
+
+            // Or a system it implements.
+            $class      = $phpcsFile->getCondition($stackPtr, T_CLASS);
+            $implements = $phpcsFile->findNext(T_IMPLEMENTS, $class, ($class + 10));
+            if ($implements !== false) {
+                $implementsClass     = $phpcsFile->findNext(T_STRING, $implements);
+                $implementsClassName = strtolower($tokens[$implementsClass]['content']);
+                if (substr($implementsClassName, -7) === 'actions') {
+                    $includedClasses[substr($implementsClassName, 0, -7)] = true;
+                }
+            }
+        }
+
+        // Go searching for includeSystem and includeAsset calls within this
+        // function, or the inclusion of .inc files, which
+        // would be library files.
+        for ($i = ($currScope + 1); $i < $stackPtr; $i++) {
+            $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i);
+            if ($name !== false) {
+                $includedClasses[$name] = true;
+                // Special case for Widgets cause they are, well, special.
+            } else if (strtolower($tokens[$i]['content']) === 'includewidget') {
+                $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($i + 1));
+                $typeName = trim($tokens[$typeName]['content'], " '");
+                $includedClasses[strtolower($typeName).'widgettype'] = true;
+            }
+        }
+
+        // Now go searching for includeSystem, includeAsset or require/include
+        // calls outside our scope. If we are in a class, look outside the
+        // class. If we are not, look outside the function.
+        $condPtr = $currScope;
+        if ($phpcsFile->hasCondition($stackPtr, T_CLASS) === true) {
+            foreach ($tokens[$stackPtr]['conditions'] as $condPtr => $condType) {
+                if ($condType === T_CLASS) {
+                    break;
+                }
+            }
+        }
+
+        for ($i = 0; $i < $condPtr; $i++) {
+            // Skip other scopes.
+            if (isset($tokens[$i]['scope_closer']) === true) {
+                $i = $tokens[$i]['scope_closer'];
+                continue;
+            }
+
+            $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i);
+            if ($name !== false) {
+                $includedClasses[$name] = true;
+            }
+        }
+
+        // If we are in a testing class, we might have also included
+        // some systems and classes in our setUp() method.
+        $setupFunction = null;
+        if ($phpcsFile->hasCondition($stackPtr, T_CLASS) === true) {
+            foreach ($tokens[$stackPtr]['conditions'] as $condPtr => $condType) {
+                if ($condType === T_CLASS) {
+                    // Is this is a testing class?
+                    $name = $phpcsFile->findNext(T_STRING, $condPtr);
+                    $name = $tokens[$name]['content'];
+                    if (substr($name, -8) === 'UnitTest') {
+                        // Look for a method called setUp().
+                        $end      = $tokens[$condPtr]['scope_closer'];
+                        $function = $phpcsFile->findNext(T_FUNCTION, ($condPtr + 1), $end);
+                        while ($function !== false) {
+                            $name = $phpcsFile->findNext(T_STRING, $function);
+                            if ($tokens[$name]['content'] === 'setUp') {
+                                $setupFunction = $function;
+                                break;
+                            }
+
+                            $function = $phpcsFile->findNext(T_FUNCTION, ($function + 1), $end);
+                        }
+                    }
+                }
+            }//end foreach
+        }//end if
+
+        if ($setupFunction !== null) {
+            $start = ($tokens[$setupFunction]['scope_opener'] + 1);
+            $end   = $tokens[$setupFunction]['scope_closer'];
+            for ($i = $start; $i < $end; $i++) {
+                $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i);
+                if ($name !== false) {
+                    $includedClasses[$name] = true;
+                }
+            }
+        }//end if
+
+        if (isset($includedClasses[strtolower($className)]) === false) {
+            $error = 'Static method called on non-included class or system "%s"; include system with Channels::includeSystem() or include class with require_once';
+            $data  = array($className);
+            $phpcsFile->addError($error, $stackPtr, 'NotIncludedCall', $data);
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Processes a token within the scope that this test is listening to.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        this token was found.
+     *
+     * @return void
+     */
+    protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['code'] === T_EXTENDS) {
+            // Find the class name.
+            $classNameToken = $phpcsFile->findNext(T_STRING, ($stackPtr + 1));
+            $className      = $tokens[$classNameToken]['content'];
+        } else {
+            // Determine the name of the class that the static function
+            // is being called on. But don't process class names represented by
+            // variables as this can be an inexact science.
+            $classNameToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+            if ($tokens[$classNameToken]['code'] === T_VARIABLE) {
+                return;
+            }
+
+            $className = $tokens[$classNameToken]['content'];
+        }
+
+        // Some systems are always available.
+        if (isset($this->_ignore[strtolower($className)]) === true) {
+            return;
+        }
+
+        $includedClasses = array();
+
+        $fileName = strtolower($phpcsFile->getFilename());
+        $matches  = array();
+        if (preg_match('|/systems/([^/]+)/([^/]+)?actions.inc$|', $fileName, $matches) !== 0) {
+            // This is an actions file, which means we don't
+            // have to include the system in which it exists
+            // We know the system from the path.
+            $includedClasses[$matches[1]] = true;
+        }
+
+        // Go searching for includeSystem, includeAsset or require/include
+        // calls outside our scope.
+        for ($i = 0; $i < $stackPtr; $i++) {
+            // Skip classes and functions as will we never get
+            // into their scopes when including this file, although
+            // we have a chance of getting into IF's, WHILE's etc.
+            if (($tokens[$i]['code'] === T_CLASS
+                || $tokens[$i]['code'] === T_INTERFACE
+                || $tokens[$i]['code'] === T_FUNCTION)
+                && isset($tokens[$i]['scope_closer']) === true
+            ) {
+                $i = $tokens[$i]['scope_closer'];
+                continue;
+            }
+
+            $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i);
+            if ($name !== false) {
+                $includedClasses[$name] = true;
+                // Special case for Widgets cause they are, well, special.
+            } else if (strtolower($tokens[$i]['content']) === 'includewidget') {
+                $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($i + 1));
+                $typeName = trim($tokens[$typeName]['content'], " '");
+                $includedClasses[strtolower($typeName).'widgettype'] = true;
+            }
+        }//end for
+
+        if (isset($includedClasses[strtolower($className)]) === false) {
+            if ($tokens[$stackPtr]['code'] === T_EXTENDS) {
+                $error = 'Class extends non-included class or system "%s"; include system with Channels::includeSystem() or include class with require_once';
+                $data  = array($className);
+                $phpcsFile->addError($error, $stackPtr, 'NotIncludedExtends', $data);
+            } else {
+                $error = 'Static method called on non-included class or system "%s"; include system with Channels::includeSystem() or include class with require_once';
+                $data  = array($className);
+                $phpcsFile->addError($error, $stackPtr, 'NotIncludedCall', $data);
+            }
+        }
+
+    }//end processTokenOutsideScope()
+
+
+    /**
+     * Determines the included class name from given token.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param array                $tokens    The array of file tokens.
+     * @param int                  $stackPtr  The position in the tokens array of the
+     *                                        potentially included class.
+     *
+     * @return string
+     */
+    protected function getIncludedClassFromToken(
+        PHP_CodeSniffer_File $phpcsFile,
+        array $tokens,
+        $stackPtr
+    ) {
+        if (strtolower($tokens[$stackPtr]['content']) === 'includesystem') {
+            $systemName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 1));
+            $systemName = trim($tokens[$systemName]['content'], " '");
+            return strtolower($systemName);
+        } else if (strtolower($tokens[$stackPtr]['content']) === 'includeasset') {
+            $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 1));
+            $typeName = trim($tokens[$typeName]['content'], " '");
+            return strtolower($typeName).'assettype';
+        } else if (isset(PHP_CodeSniffer_Tokens::$includeTokens[$tokens[$stackPtr]['code']]) === true) {
+            $filePath = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 1));
+            $filePath = $tokens[$filePath]['content'];
+            $filePath = trim($filePath, " '");
+            $filePath = basename($filePath, '.inc');
+            return strtolower($filePath);
+        }
+
+        return false;
+
+    }//end getIncludedClassFromToken()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php	(revision 5534)
@@ -0,0 +1,152 @@
+<?php
+/**
+ * Ensures that systems, asset types and libs are included before they are used.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that systems and asset types are used if they are included.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Channels_UnusedSystemSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_DOUBLE_COLON);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Check if this is a call to includeSystem, includeAsset or includeWidget.
+        $methodName = strtolower($tokens[($stackPtr + 1)]['content']);
+        if ($methodName === 'includesystem'
+            || $methodName === 'includeasset'
+            || $methodName === 'includewidget'
+        ) {
+            $systemName = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 3), null, true);
+            if ($systemName === false || $tokens[$systemName]['code'] !== T_CONSTANT_ENCAPSED_STRING) {
+                // Must be using a variable instead of a specific system name.
+                // We can't accurately check that.
+                return;
+            }
+
+            $systemName = trim($tokens[$systemName]['content'], " '");
+        } else {
+            return;
+        }
+
+        if ($methodName === 'includeasset') {
+            $systemName .= 'assettype';
+        } else if ($methodName === 'includewidget') {
+            $systemName .= 'widgettype';
+        }
+
+        $systemName = strtolower($systemName);
+
+        // Now check if this system is used anywhere in this scope.
+        $level = $tokens[$stackPtr]['level'];
+        for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+            if ($tokens[$i]['level'] < $level) {
+                // We have gone out of scope.
+                // If the original include was inside an IF statement that
+                // is checking if the system exists, check the outer scope
+                // as well.
+                if ($tokens[$stackPtr]['level'] === $level) {
+                    // We are still in the base level, so this is the first
+                    // time we have got here.
+                    $conditions = array_keys($tokens[$stackPtr]['conditions']);
+                    if (empty($conditions) === false) {
+                        $cond = array_pop($conditions);
+                        if ($tokens[$cond]['code'] === T_IF) {
+                            $i = $tokens[$cond]['scope_closer'];
+                            $level--;
+                            continue;
+                        }
+                    }
+                }
+
+                break;
+            }//end if
+
+            if ($tokens[$i]['code'] !== T_DOUBLE_COLON
+                && $tokens[$i]['code'] !== T_EXTENDS
+                && $tokens[$i]['code'] !== T_IMPLEMENTS
+            ) {
+                continue;
+            }
+
+            switch ($tokens[$i]['code']) {
+            case T_DOUBLE_COLON:
+                $usedName = strtolower($tokens[($i - 1)]['content']);
+                if ($usedName === $systemName) {
+                    // The included system was used, so it is fine.
+                    return;
+                }
+                break;
+            case T_EXTENDS:
+                $classNameToken = $phpcsFile->findNext(T_STRING, ($i + 1));
+                $className      = strtolower($tokens[$classNameToken]['content']);
+                if ($className === $systemName) {
+                    // The included system was used, so it is fine.
+                    return;
+                }
+                break;
+            case T_IMPLEMENTS:
+                $endImplements = $phpcsFile->findNext(array(T_EXTENDS, T_OPEN_CURLY_BRACKET), ($i + 1));
+                for ($x = ($i + 1); $x < $endImplements; $x++) {
+                    if ($tokens[$x]['code'] === T_STRING) {
+                        $className = strtolower($tokens[$x]['content']);
+                        if ($className === $systemName) {
+                            // The included system was used, so it is fine.
+                            return;
+                        }
+                    }
+                }
+                break;
+            }//end switch
+        }//end for
+
+        // If we get to here, the system was not use.
+        $error = 'Included system "%s" is never used';
+        $data  = array($systemName);
+        $phpcsFile->addError($error, $stackPtr, 'Found', $data);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php	(revision 5534)
@@ -0,0 +1,100 @@
+<?php
+/**
+ * Parses and verifies the doc comments for functions.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('Squiz_Sniffs_Commenting_FunctionCommentSniff', true) === false) {
+    $error = 'Class Squiz_Sniffs_Commenting_FunctionCommentSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Parses and verifies the doc comments for functions.
+ *
+ * Same as the Squiz standard, but adds support for API tags.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Commenting_FunctionCommentSniff extends Squiz_Sniffs_Commenting_FunctionCommentSniff
+{
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        parent::process($phpcsFile, $stackPtr);
+
+        $tokens = $phpcsFile->getTokens();
+        $find   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $find[] = T_WHITESPACE;
+
+        $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true);
+        if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG) {
+            return;
+        }
+
+        $commentStart = $tokens[$commentEnd]['comment_opener'];
+        $hasApiTag    = false;
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] === '@api') {
+                if ($hasApiTag === true) {
+                    // We've come across an API tag already, which means
+                    // we were not the first tag in the API list.
+                    $error = 'The @api tag must come first in the @api tag list in a function comment';
+                    $phpcsFile->addError($error, $tag, 'ApiNotFirst');
+                }
+
+                $hasApiTag = true;
+
+                // There needs to be a blank line before the @api tag.
+                $prev = $phpcsFile->findPrevious(array(T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG), ($tag - 1));
+                if ($tokens[$prev]['line'] !== ($tokens[$tag]['line'] - 2)) {
+                    $error = 'There must be one blank line before the @api tag in a function comment';
+                    $phpcsFile->addError($error, $tag, 'ApiSpacing');
+                }
+            } else if (substr($tokens[$tag]['content'], 0, 5) === '@api-') {
+                $hasApiTag = true;
+
+                $prev = $phpcsFile->findPrevious(array(T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG), ($tag - 1));
+                if ($tokens[$prev]['line'] !== ($tokens[$tag]['line'] - 1)) {
+                    $error = 'There must be no blank line before the @%s tag in a function comment';
+                    $data  = array($tokens[$tag]['content']);
+                    $phpcsFile->addError($error, $tag, 'ApiTagSpacing', $data);
+                }
+            }//end if
+        }//end foreach
+
+        if ($hasApiTag === true && substr($tokens[$tag]['content'], 0, 4) !== '@api') {
+            // API tags must be the last tags in a function comment.
+            $error = 'The @api tags must be the last tags in a function comment';
+            $phpcsFile->addError($error, $commentEnd, 'ApiNotLast');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Warns about the use of debug code.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Warns about the use of debug code.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Debug_DebugCodeSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_DOUBLE_COLON);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $className = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if (strtolower($tokens[$className]['content']) === 'debug') {
+            $method = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+            $error  = 'Call to debug function Debug::%s() must be removed';
+            $data   = array($tokens[$method]['content']);
+            $phpcsFile->addError($error, $stackPtr, 'Found', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php	(revision 5534)
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Ensures that console is not used for function or var names.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that console is not used for function or var names.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Debug_FirebugConsoleSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_STRING,
+                T_PROPERTY,
+                T_LABEL,
+                T_OBJECT,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (strtolower($tokens[$stackPtr]['content']) === 'console') {
+            $error = 'Variables, functions and labels must not be named "console"; name may conflict with Firebug internal variable';
+            $phpcsFile->addError($error, $stackPtr, 'ConflictFound');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/AssignThisSniff.php	(revision 5534)
@@ -0,0 +1,92 @@
+<?php
+/**
+ * Ensures this is not assigned to any other var but self.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures this is not assigned to any other var but self.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Objects_AssignThisSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_THIS);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore this.something and other uses of "this" that are not
+        // direct assignments.
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$next]['code'] !== T_SEMICOLON) {
+            if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) {
+                return;
+            }
+        }
+
+        // Something must be assigned to "this".
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] !== T_EQUAL) {
+            return;
+        }
+
+        // A variable needs to be assigned to "this".
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($prev - 1), null, true);
+        if ($tokens[$prev]['code'] !== T_STRING) {
+            return;
+        }
+
+        // We can only assign "this" to a var called "self".
+        if ($tokens[$prev]['content'] !== 'self' && $tokens[$prev]['content'] !== '_self') {
+            $error = 'Keyword "this" can only be assigned to a variable called "self" or "_self"';
+            $phpcsFile->addError($error, $prev, 'NotSelf');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php	(revision 5534)
@@ -0,0 +1,227 @@
+<?php
+/**
+ * Ensures the create() method of widget types properly uses callbacks.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures the create() method of widget types properly uses callbacks.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Objects_CreateWidgetTypeCallbackSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OBJECT);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $className = $phpcsFile->findPrevious(T_STRING, ($stackPtr - 1));
+        if (substr(strtolower($tokens[$className]['content']), -10) !== 'widgettype') {
+            return;
+        }
+
+        // Search for a create method.
+        $create = $phpcsFile->findNext(T_PROPERTY, $stackPtr, $tokens[$stackPtr]['bracket_closer'], null, 'create');
+        if ($create === false) {
+            return;
+        }
+
+        $function = $phpcsFile->findNext(array(T_WHITESPACE, T_COLON), ($create + 1), null, true);
+        if ($tokens[$function]['code'] !== T_FUNCTION
+            && $tokens[$function]['code'] !== T_CLOSURE
+        ) {
+            return;
+        }
+
+        $start = ($tokens[$function]['scope_opener'] + 1);
+        $end   = ($tokens[$function]['scope_closer'] - 1);
+
+        // Check that the first argument is called "callback".
+        $arg = $phpcsFile->findNext(T_WHITESPACE, ($tokens[$function]['parenthesis_opener'] + 1), null, true);
+        if ($tokens[$arg]['content'] !== 'callback') {
+            $error = 'The first argument of the create() method of a widget type must be called "callback"';
+            $phpcsFile->addError($error, $arg, 'FirstArgNotCallback');
+        }
+
+        /*
+            Look for return statements within the function. They cannot return
+            anything and must be preceded by the callback.call() line. The
+            callback itself must contain "self" or "this" as the first argument
+            and there needs to be a call to the callback function somewhere
+            in the create method. All calls to the callback function must be
+            followed by a return statement or the end of the method.
+        */
+
+        $foundCallback  = false;
+        $passedCallback = false;
+        $nestedFunction = null;
+        for ($i = $start; $i <= $end; $i++) {
+            // Keep track of nested functions.
+            if ($nestedFunction !== null) {
+                if ($i === $nestedFunction) {
+                    $nestedFunction = null;
+                    continue;
+                }
+            } else if (($tokens[$i]['code'] === T_FUNCTION
+                || $tokens[$i]['code'] === T_CLOSURE)
+                && isset($tokens[$i]['scope_closer']) === true
+            ) {
+                $nestedFunction = $tokens[$i]['scope_closer'];
+                continue;
+            }
+
+            if ($nestedFunction === null && $tokens[$i]['code'] === T_RETURN) {
+                // Make sure return statements are not returning anything.
+                if ($tokens[($i + 1)]['code'] !== T_SEMICOLON) {
+                    $error = 'The create() method of a widget type must not return a value';
+                    $phpcsFile->addError($error, $i, 'ReturnValue');
+                }
+
+                continue;
+            } else if ($tokens[$i]['code'] !== T_STRING
+                || $tokens[$i]['content'] !== 'callback'
+            ) {
+                continue;
+            }
+
+            // If this is the form "callback.call(" then it is a call
+            // to the callback function.
+            if ($tokens[($i + 1)]['code'] !== T_OBJECT_OPERATOR
+                || $tokens[($i + 2)]['content'] !== 'call'
+                || $tokens[($i + 3)]['code'] !== T_OPEN_PARENTHESIS
+            ) {
+                // One last chance; this might be the callback function
+                // being passed to another function, like this
+                // "this.init(something, callback, something)".
+                if (isset($tokens[$i]['nested_parenthesis']) === false) {
+                    continue;
+                }
+
+                // Just make sure those brackets dont belong to anyone,
+                // like an IF or FOR statement.
+                foreach ($tokens[$i]['nested_parenthesis'] as $bracket) {
+                    if (isset($tokens[$bracket]['parenthesis_owner']) === true) {
+                        continue(2);
+                    }
+                }
+
+                // Note that we use this endBracket down further when checking
+                // for a RETURN statement.
+                $endBracket = end($tokens[$i]['nested_parenthesis']);
+                $bracket    = key($tokens[$i]['nested_parenthesis']);
+
+                $prev = $phpcsFile->findPrevious(
+                    PHP_CodeSniffer_Tokens::$emptyTokens,
+                    ($bracket - 1),
+                    null,
+                    true
+                );
+
+                if ($tokens[$prev]['code'] !== T_STRING) {
+                    // This is not a function passing the callback.
+                    continue;
+                }
+
+                $passedCallback = true;
+            }//end if
+
+            $foundCallback = true;
+
+            if ($passedCallback === false) {
+                // The first argument must be "this" or "self".
+                $arg = $phpcsFile->findNext(T_WHITESPACE, ($i + 4), null, true);
+                if ($tokens[$arg]['content'] !== 'this'
+                    && $tokens[$arg]['content'] !== 'self'
+                ) {
+                    $error = 'The first argument passed to the callback function must be "this" or "self"';
+                    $phpcsFile->addError($error, $arg, 'FirstArgNotSelf');
+                }
+            }
+
+            // Now it must be followed by a return statement or the end of the function.
+            if ($passedCallback === false) {
+                $endBracket = $tokens[($i + 3)]['parenthesis_closer'];
+            }
+
+            for ($next = $endBracket; $next <= $end; $next++) {
+                // Skip whitespace so we find the next content after the call.
+                if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$next]['code']]) === true) {
+                    continue;
+                }
+
+                // Skip closing braces like END IF because it is not executable code.
+                if ($tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) {
+                    continue;
+                }
+
+                // We don't care about anything on the current line, like a
+                // semicolon. It doesn't matter if there are other statements on the
+                // line because another sniff will check for those.
+                if ($tokens[$next]['line'] === $tokens[$endBracket]['line']) {
+                    continue;
+                }
+
+                break;
+            }
+
+            if ($next !== $tokens[$function]['scope_closer']
+                && $tokens[$next]['code'] !== T_RETURN
+            ) {
+                $error = 'The call to the callback function must be followed by a return statement if it is not the last statement in the create() method';
+                $phpcsFile->addError($error, $i, 'NoReturn');
+            }
+        }//end for
+
+        if ($foundCallback === false) {
+            $error = 'The create() method of a widget type must call the callback function';
+            $phpcsFile->addError($error, $create, 'CallbackNotCalled');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php	(revision 5534)
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Ensures that widgets are not manually created.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that widgets are not manually created.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Objects_DisallowNewWidgetSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_NEW);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $className = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$className]['code'] !== T_STRING) {
+            return;
+        }
+
+        if (substr(strtolower($tokens[$className]['content']), -10) === 'widgettype') {
+            $widgetType = substr($tokens[$className]['content'], 0, -10);
+            $error      = 'Manual creation of widget objects is banned; use Widget::getWidget(\'%s\'); instead';
+            $data       = array($widgetType);
+            $phpcsFile->addError($error, $stackPtr, 'Found', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php	(revision 5534)
@@ -0,0 +1,109 @@
+<?php
+/**
+ * Ensures that values submitted via JS are not compared to NULL.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that values submitted via JS are not compared to NULL.
+ *
+ * With jQuery 1.8, the behaviour of ajax requests changed so that null values are
+ * submitted as null= instead of null=null.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_PHP_AjaxNullComparisonSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Make sure it is an API function. We know this by the doc comment.
+        $commentEnd   = $phpcsFile->findPrevious(T_DOC_COMMENT_CLOSE_TAG, $stackPtr);
+        $commentStart = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, ($commentEnd - 1));
+        $comment      = $phpcsFile->getTokensAsString($commentStart, ($commentEnd - $commentStart));
+        if (strpos($comment, '* @api') === false) {
+            return;
+        }
+
+        // Find all the vars passed in as we are only interested in comparisons
+        // to NULL for these specific variables.
+        $foundVars = array();
+        $open      = $tokens[$stackPtr]['parenthesis_opener'];
+        $close     = $tokens[$stackPtr]['parenthesis_closer'];
+        for ($i = ($open + 1); $i < $close; $i++) {
+            if ($tokens[$i]['code'] === T_VARIABLE) {
+                $foundVars[$tokens[$i]['content']] = true;
+            }
+        }
+
+        if (empty($foundVars) === true) {
+            return;
+        }
+
+        $start = $tokens[$stackPtr]['scope_opener'];
+        $end   = $tokens[$stackPtr]['scope_closer'];
+        for ($i = ($start + 1); $i < $end; $i++) {
+            if ($tokens[$i]['code'] !== T_VARIABLE
+                || isset($foundVars[$tokens[$i]['content']]) === false
+            ) {
+                continue;
+            }
+
+            $operator = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true);
+            if ($tokens[$operator]['code'] !== T_IS_IDENTICAL
+                && $tokens[$operator]['code'] !== T_IS_NOT_IDENTICAL
+            ) {
+                continue;
+            }
+
+            $nullValue = $phpcsFile->findNext(T_WHITESPACE, ($operator + 1), null, true);
+            if ($tokens[$nullValue]['code'] !== T_NULL) {
+                continue;
+            }
+
+            $error = 'Values submitted via Ajax requests should not be compared directly to NULL; use empty() instead';
+            $phpcsFile->addWarning($error, $nullValue, 'Found');
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php	(revision 5534)
@@ -0,0 +1,124 @@
+<?php
+/**
+ * Ensures that eval() is not used to create objects.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that eval() is not used to create objects.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_PHP_EvalObjectFactorySniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_EVAL);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        /*
+            We need to find all strings that will be in the eval
+            to determine if the "new" keyword is being used.
+        */
+
+        $openBracket  = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($stackPtr + 1));
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+
+        $strings = array();
+        $vars    = array();
+
+        for ($i = ($openBracket + 1); $i < $closeBracket; $i++) {
+            if (isset(PHP_CodeSniffer_Tokens::$stringTokens[$tokens[$i]['code']]) === true) {
+                $strings[$i] = $tokens[$i]['content'];
+            } else if ($tokens[$i]['code'] === T_VARIABLE) {
+                $vars[$i] = $tokens[$i]['content'];
+            }
+        }
+
+        /*
+            We now have some variables that we need to expand into
+            the strings that were assigned to them, if any.
+        */
+
+        foreach ($vars as $varPtr => $varName) {
+            while (($prev = $phpcsFile->findPrevious(T_VARIABLE, ($varPtr - 1))) !== false) {
+                // Make sure this is an assignment of the variable. That means
+                // it will be the first thing on the line.
+                $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($prev - 1), null, true);
+                if ($tokens[$prevContent]['line'] === $tokens[$prev]['line']) {
+                    $varPtr = $prevContent;
+                    continue;
+                }
+
+                if ($tokens[$prev]['content'] !== $varName) {
+                    // This variable has a different name.
+                    $varPtr = $prevContent;
+                    continue;
+                }
+
+                // We found one.
+                break;
+            }//end while
+
+            if ($prev !== false) {
+                // Find all strings on the line.
+                $lineEnd = $phpcsFile->findNext(T_SEMICOLON, ($prev + 1));
+                for ($i = ($prev + 1); $i < $lineEnd; $i++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$stringTokens[$tokens[$i]['code']]) === true) {
+                        $strings[$i] = $tokens[$i]['content'];
+                    }
+                }
+            }
+        }//end foreach
+
+        foreach ($strings as $string) {
+            // If the string has "new" in it, it is not allowed.
+            // We don't bother checking if the word "new" is echo'd
+            // because that is unlikely to happen. We assume the use
+            // of "new" is for object instantiation.
+            if (strstr($string, ' new ') !== false) {
+                $error = 'Do not use eval() to create objects dynamically; use reflection instead';
+                $phpcsFile->addWarning($error, $stackPtr, 'Found');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php	(revision 5534)
@@ -0,0 +1,117 @@
+<?php
+/**
+ * Ensures that getRequestData() is used to access super globals.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that getRequestData() is used to access super globals.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_PHP_GetRequestDataSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_VARIABLE);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $varName = $tokens[$stackPtr]['content'];
+        if ($varName !== '$_REQUEST'
+            && $varName !== '$_GET'
+            && $varName !== '$_POST'
+            && $varName !== '$_FILES'
+        ) {
+            return;
+        }
+
+        // The only place these super globals can be accessed directly is
+        // in the getRequestData() method of the Security class.
+        $inClass = false;
+        foreach ($tokens[$stackPtr]['conditions'] as $i => $type) {
+            if ($tokens[$i]['code'] === T_CLASS) {
+                $className = $phpcsFile->findNext(T_STRING, $i);
+                $className = $tokens[$className]['content'];
+                if (strtolower($className) === 'security') {
+                    $inClass = true;
+                } else {
+                    // We don't have nested classes.
+                    break;
+                }
+            } else if ($inClass === true && $tokens[$i]['code'] === T_FUNCTION) {
+                $funcName = $phpcsFile->findNext(T_STRING, $i);
+                $funcName = $tokens[$funcName]['content'];
+                if (strtolower($funcName) === 'getrequestdata') {
+                    // This is valid.
+                    return;
+                } else {
+                    // We don't have nested functions.
+                    break;
+                }
+            }//end if
+        }//end foreach
+
+        // If we get to here, the super global was used incorrectly.
+        // First find out how it is being used.
+        $globalName = strtolower(substr($varName, 2));
+        $usedVar    = '';
+
+        $openBracket = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$openBracket]['code'] === T_OPEN_SQUARE_BRACKET) {
+            $closeBracket = $tokens[$openBracket]['bracket_closer'];
+            $usedVar      = $phpcsFile->getTokensAsString(($openBracket + 1), ($closeBracket - $openBracket - 1));
+        }
+
+        $type  = 'SuperglobalAccessed';
+        $error = 'The %s super global must not be accessed directly; use Security::getRequestData(';
+        $data  = array($varName);
+        if ($usedVar !== '') {
+            $type  .= 'WithVar';
+            $error .= '%s, \'%s\'';
+            $data[] = $usedVar;
+            $data[] = $globalName;
+        }
+
+        $error .= ') instead';
+        $phpcsFile->addError($error, $stackPtr, $type, $data);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php	(revision 5534)
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Warns when function values are returned directly.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Warns when function values are returned directly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_PHP_ReturnFunctionValueSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_RETURN);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $functionName = $phpcsFile->findNext(T_STRING, ($stackPtr + 1), null, false, null, true);
+
+        while ($functionName !== false) {
+            // Check if this is really a function.
+            $bracket = $phpcsFile->findNext(T_WHITESPACE, ($functionName + 1), null, true);
+            if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) {
+                // Not a function call.
+                $functionName = $phpcsFile->findNext(T_STRING, ($functionName + 1), null, false, null, true);
+                continue;
+            }
+
+            $error = 'The result of a function call should be assigned to a variable before being returned';
+            $phpcsFile->addWarning($error, $stackPtr, 'NotAssigned');
+            break;
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php	(revision 5534)
@@ -0,0 +1,86 @@
+<?php
+/**
+ * Ensures that strings are not joined using array.join().
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that strings are not joined using array.join().
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class MySource_Sniffs_Strings_JoinStringsSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param integer              $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['content'] !== 'join') {
+            return;
+        }
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] !== T_OBJECT_OPERATOR) {
+            return;
+        }
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($prev - 1), null, true);
+        if ($tokens[$prev]['code'] === T_CLOSE_SQUARE_BRACKET) {
+            $opener = $tokens[$prev]['bracket_opener'];
+            if ($tokens[($opener - 1)]['code'] !== T_STRING) {
+                // This means the array is declared inline, like x = [a,b,c].join()
+                // and not elsewhere, like x = y[a].join()
+                // The first is not allowed while the second is.
+                $error = 'Joining strings using inline arrays is not allowed; use the + operator instead';
+                $phpcsFile->addError($error, $stackPtr, 'ArrayNotAllowed');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/ruleset.xml	(revision 5534)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<ruleset name="MySource">
+ <description>The MySource coding standard builds on the Squiz coding standard. Currently used for MySource Mini development.</description>
+
+ <exclude-pattern>*/Tests/*</exclude-pattern>
+ <exclude-pattern>*/Oven/*</exclude-pattern>
+ <exclude-pattern>*/data/*</exclude-pattern>
+ <exclude-pattern>*/jquery.js</exclude-pattern>
+ <exclude-pattern>*/jquery.*.js</exclude-pattern>
+ <exclude-pattern>*/viper/*</exclude-pattern>
+ <exclude-pattern>DALConf.inc</exclude-pattern>
+
+ <!-- Include the whole Squiz standard except FunctionComment, which we override -->
+ <rule ref="Squiz">
+  <exclude name="Squiz.Commenting.FunctionComment"/>
+ </rule>
+
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,22 @@
+<documentation title="Class Declarations">
+    <standard>
+    <![CDATA[
+    The opening brace of a class must be on the line after the definition by itself.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Opening brace on the correct line.">
+        <![CDATA[
+class Foo
+<em>{</em>
+}
+        ]]>
+        </code>
+        <code title="Invalid: Opening brace on same line as declaration.">
+        <![CDATA[
+class Foo <em>{</em>
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml	(revision 5534)
@@ -0,0 +1,177 @@
+<documentation title="Class Comments">
+    <standard>
+    <![CDATA[
+    Classes and interfaces must have a non-empty doc comment.  The short description must be on the second line of the comment.  Each description must have one blank comment line before and after.  There must be one blank line before the tags in the comments.  A @version tag must be in Release: package_version format.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A doc comment for the class.">
+        <![CDATA[
+<em>/**
+ * The Foo class.
+ */</em>
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: No doc comment for the class.">
+        <![CDATA[
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: A doc comment for the class.">
+        <![CDATA[
+<em>/**
+ * The Foo class.
+ */</em>
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: Invalid comment type for the class.">
+        <![CDATA[
+// The Foo class.
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: A doc comment for the class.">
+        <![CDATA[
+<em>/**
+ * The Foo class.
+ */</em>
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: The blank line after the comment makes it appear as a file comment, not a class comment.">
+        <![CDATA[
+<em>/**
+ * The Foo class.
+ */</em>
+
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Short description is the second line of the comment.">
+        <![CDATA[
+/**
+ * <em>The Foo class.</em>
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: An extra blank line before the short description.">
+        <![CDATA[
+/**
+ *
+ * <em>The Foo class.</em>
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Exactly one blank line around descriptions.">
+        <![CDATA[
+/**
+ * The Foo class.
+ * <em></em>
+ * A helper for the Bar class.
+ * <em></em>
+ * @see Bar
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: Extra blank lines around the descriptions.">
+        <![CDATA[
+/**
+ * The Foo class.
+ * <em></em>
+ * <em></em>
+ * A helper for the Bar class.
+ * <em></em>
+ * <em></em>
+ * @see Bar
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Exactly one blank line before the tags.">
+        <![CDATA[
+/**
+ * The Foo class.
+ * <em></em>
+ * @see Bar
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: Extra blank lines before the tags.">
+        <![CDATA[
+/**
+ * The Foo class.
+ * <em></em>
+ * <em></em>
+ * @see Bar
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Version tag is in the correct format.">
+        <![CDATA[
+/**
+ * The Foo class.
+ *
+ * @version <em>Release: 1.0</em>
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: No Release: text.">
+        <![CDATA[
+/**
+ * The Foo class.
+ *
+ * @version <em>1.0</em>
+ */
+class Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml	(revision 5534)
@@ -0,0 +1,286 @@
+<documentation title="File Comments">
+    <standard>
+    <![CDATA[
+    Files must have a non-empty doc comment.  The short description must be on the second line of the comment.  Each description must have one blank comment line before and after.  There must be one blank line before the tags in the comments.  There must be a category, package, author, license, and link tag.  There may only be one category, package, subpackage, license, version, since and deprecated tag.  The tags must be in the order category, package, subpackage, author, copyright, license, version, link, see, since, and deprecated.  The php version must be specified.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A file comment is used.">
+        <![CDATA[
+<?php
+<em>/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */</em>
+        ]]>
+        </code>
+        <code title="Invalid: No doc comment for the class.">
+        <![CDATA[
+<?php
+<em></em>
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Short description is the second line of the comment.">
+        <![CDATA[
+<?php
+/**
+ * <em>Short description here.</em>
+ *
+ * PHP version 5
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: An extra blank line before the short description.">
+        <![CDATA[
+<?php
+/**
+ * <em></em>
+ * <em>Short description here.</em>
+ *
+ * PHP version 5
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Exactly one blank line around descriptions.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ * <em></em>
+ * PHP version 5
+ * <em></em>
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: Extra blank lines around the descriptions.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ * <em></em>
+ * <em></em>
+ * PHP version 5
+ * <em></em>
+ * <em></em>
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Exactly one blank line before the tags.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ * <em></em>
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: Extra blank lines before the tags.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ * <em></em>
+ * <em></em>
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: All required tags are used.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * <em>@category</em> Foo
+ * <em>@package</em> Foo_Helpers
+ * <em>@author</em> Marty McFly <mmcfly@example.com>
+ * <em>@copyright</em> 2013-2014 Foo Inc.
+ * <em>@license</em> MIT License
+ * <em>@link</em> http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: Missing an author tag.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Tags that should only be used once are only used once.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * <em>@category</em> Foo
+ * <em>@package</em> Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * <em>@license</em> MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: Multiple category tags.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * <em>@category</em> Foo
+ * <em>@category</em> Bar
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: PHP version specified.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * <em>PHP version 5</em>
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: Category and package tags are swapped in order.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * <em>@package</em> Foo_Helpers
+ * <em>@category</em> Foo
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Tags are in the correct order.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * PHP version 5
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+        <code title="Invalid: No php version specified.">
+        <![CDATA[
+<?php
+/**
+ * Short description here.
+ *
+ * @category Foo
+ * @package Foo_Helpers
+ * @author Marty McFly <mmcfly@example.com>
+ * @copyright 2013-2014 Foo Inc.
+ * @license MIT License
+ * @link http://example.com
+ */
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml	(revision 5534)
@@ -0,0 +1,230 @@
+<documentation title="Function Comments">
+    <standard>
+    <![CDATA[
+    Functions must have a non-empty doc comment.  The short description must be on the second line of the comment.  Each description must have one blank comment line before and after.  There must be one blank line before the tags in the comments.  There must be a tag for each of the parameters in the right order with the right variable names with a comment.  There must be a return tag.  Any throw tag must have an exception class.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A function doc comment is used.">
+        <![CDATA[
+<em>/**
+ * Short description here.
+ *
+ * @return void
+ */</em>
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: No doc comment for the function.">
+        <![CDATA[
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Short description is the second line of the comment.">
+        <![CDATA[
+/**
+ * <em>Short description here.</em>
+ *
+ * @return void
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: An extra blank line before the short description.">
+        <![CDATA[
+/**
+ * <em></em>
+ * <em>Short description here.</em>
+ *
+ * @return void
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Exactly one blank line around descriptions.">
+        <![CDATA[
+/**
+ * Short description here.
+ * <em></em>
+ * Long description here.
+ * <em></em>
+ * @return void
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: Extra blank lines around the descriptions.">
+        <![CDATA[
+/**
+ * Short description here.
+ * <em></em>
+ * <em></em>
+ * Long description here.
+ * <em></em>
+ * <em></em>
+ * @return void
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Exactly one blank line before the tags.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * Long description here.
+ * <em></em>
+ * @return void
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: Extra blank lines before the tags.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * Long description here.
+ * <em></em>
+ * <em></em>
+ * @return void
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Throws tag has an exception class.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * @return void
+ * @throws <em>FooException</em>
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: No exception class given for throws tag.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * @return void
+ * <em>@throws</em>
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Return tag present.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * <em>@return void</em>
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: No return tag.">
+        <![CDATA[
+/**
+ * Short description here.
+ */
+ function foo()
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Param names are correct.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * @param string <em>$foo</em> Foo parameter
+ * @param string <em>$bar</em> Bar parameter
+ * @return void
+ */
+ function foo(<em>$foo</em>, <em>$bar</em>)
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: Wrong parameter name doesn't match function signature.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * @param string $foo Foo parameter
+ * @param string <em>$qux</em> Bar parameter
+ * @return void
+ */
+ function foo($foo, <em>$bar</em>)
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Param names are ordered correctly.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * @param string <em>$foo</em> Foo parameter
+ * @param string <em>$bar</em> Bar parameter
+ * @return void
+ */
+ function foo(<em>$foo</em>, <em>$bar</em>)
+ {
+ }
+        ]]>
+        </code>
+        <code title="Invalid: Wrong parameter order.">
+        <![CDATA[
+/**
+ * Short description here.
+ *
+ * @param string <em>$bar</em> Bar parameter
+ * @param string <em>$foo</em> Foo parameter
+ * @return void
+ */
+ function foo(<em>$foo</em>, <em>$bar</em>)
+ {
+ }
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Inline Comments">
+    <standard>
+    <![CDATA[
+    Perl-style # comments are not allowed.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A // style comment.">
+        <![CDATA[
+<em>//</em> A comment.
+        ]]>
+        </code>
+        <code title="Invalid: A # style comment.">
+        <![CDATA[
+<em>#</em> A comment.
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml	(revision 5534)
@@ -0,0 +1,36 @@
+<documentation title="Control Structure Signatures">
+    <standard>
+    <![CDATA[
+    Control structures should use one space around the parentheses in conditions.  The opening brace should be preceded by one space and should be at the end of the line.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct spacing around the condition.">
+        <![CDATA[
+if<em> </em>($foo)<em> </em>{
+}
+        ]]>
+        </code>
+        <code title="Invalid: Incorrect spacing around the condition.">
+        <![CDATA[
+if<em></em>($foo)<em></em>{
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Correct placement of the opening brace.">
+        <![CDATA[
+if ($foo) <em>{</em>
+}
+        ]]>
+        </code>
+        <code title="Invalid: Incorrect placement of the opening brace on a new line.">
+        <![CDATA[
+if ($foo)
+<em>{</em>
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml	(revision 5534)
@@ -0,0 +1,60 @@
+<documentation title="Multi-line If Conditions">
+    <standard>
+    <![CDATA[
+    Multi-line if conditions should be indented one level and each line should begin with a boolean operator.  The end parenthesis should be on a new line.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct indentation.">
+        <![CDATA[
+if ($foo
+<em>    </em>&& $bar
+) {
+}
+        ]]>
+        </code>
+        <code title="Invalid: No indentation used on the condition lines.">
+        <![CDATA[
+if ($foo
+<em></em>&& $bar
+) {
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Boolean operator at the start of the line.">
+        <![CDATA[
+if ($foo
+    <em>&&</em> $bar
+) {
+}
+        ]]>
+        </code>
+        <code title="Invalid: Boolean operator at the end of the line.">
+        <![CDATA[
+if ($foo <em>&&</em>
+    $bar
+) {
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: End parenthesis on a new line.">
+        <![CDATA[
+if ($foo
+    && $bar
+<em>)</em> {
+}
+        ]]>
+        </code>
+        <code title="Invalid: End parenthesis not moved to a new line.">
+        <![CDATA[
+if ($foo
+    && $bar<em>)</em> {
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Files/IncludingFileStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Files/IncludingFileStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Files/IncludingFileStandard.xml	(revision 5534)
@@ -0,0 +1,24 @@
+<documentation title="Including Code">
+    <standard>
+    <![CDATA[
+    Anywhere you are unconditionally including a class file, use <em>require_once</em>. Anywhere you are conditionally including a class file (for example, factory methods), use <em>include_once</em>. Either of these will ensure that class files are included only once. They share the same file list, so you don't need to worry about mixing them - a file included with <em>require_once</em> will not be included again by <em>include_once</em>.
+    ]]>
+    </standard>
+    <standard>
+    <![CDATA[
+    Note that <em>include_once</em> and <em>require_once</em> are statements, not functions. Parentheses should not surround the subject filename.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: used as statement">
+        <![CDATA[
+require_once 'PHP/CodeSniffer.php';
+        ]]>
+        </code>
+        <code title="Invalid: used as function">
+        <![CDATA[
+require_once<em>(</em>'PHP/CodeSniffer.php'<em>)</em>;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Files/LineLengthStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Files/LineLengthStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Files/LineLengthStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="Line Length">
+    <standard>
+    <![CDATA[
+    It is recommended to keep lines at approximately 85 characters long for better code readability.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml	(revision 5534)
@@ -0,0 +1,35 @@
+<documentation title="Multi-Line Assignment">
+    <standard>
+    <![CDATA[
+    Multi-line assignment should have the equals sign be the first item on the second line indented correctly.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Assignment operator at the start of the second line.">
+        <![CDATA[
+$foo
+    <em>=</em> $bar;
+        ]]>
+        </code>
+        <code title="Invalid: Assignment operator at end of first line.">
+        <![CDATA[
+$foo <em>=</em>
+    $bar;
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Assignment operator indented one level.">
+        <![CDATA[
+$foo
+<em>    </em>= $bar;
+        ]]>
+        </code>
+        <code title="Invalid: Assignment operator not indented.">
+        <![CDATA[
+$foo
+<em></em>= $bar;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Function Calls">
+    <standard>
+    <![CDATA[
+      Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; and no space between the last parameter, the closing parenthesis, and the semicolon.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: spaces between parameters">
+        <![CDATA[
+$var = foo($bar, $baz, $quux);
+        ]]>
+        </code>
+        <code title="Invalid: additional spaces used">
+        <![CDATA[
+$var = foo<em> </em>(<em> </em>$bar, $baz, $quux<em> </em>)<em> </em>;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,41 @@
+<documentation title="Function Declarations">
+    <standard>
+    <![CDATA[
+    There should be exactly 1 space after the function keyword and 1 space on each side of the use keyword.  Closures should use the Kernighan/Ritchie Brace style and other single-line functions should use the BSD/Allman style.  Multi-line function declarations should have the parameter lists indented one level with the closing parenthesis on a newline followed by a single space and the opening brace of the function.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct spacing around function and use keywords.">
+        <![CDATA[
+$foo = function<em> </em>()<em> </em>use<em> </em>($bar)<em> </em>{
+};
+        ]]>
+        </code>
+        <code title="Invalid: No spacing around function and use keywords.">
+        <![CDATA[
+$foo = function<em></em>()<em></em>use<em></em>($bar)<em></em>{
+};
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Multi-line function declaration formatted properly.">
+        <![CDATA[
+function foo(
+<em>    </em>$bar,
+<em>    </em>$baz
+<em>) {</em>
+};
+        ]]>
+        </code>
+        <code title="Invalid: Invalid indentation and formatting of closing parenthesis.">
+        <![CDATA[
+function foo(
+<em></em>$bar,
+<em></em>$baz<em>)</em>
+<em>{</em>
+};
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Default Values in Function Declarations">
+    <standard>
+    <![CDATA[
+    Arguments with default values go at the end of the argument list.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: argument with default value at end of declaration">
+        <![CDATA[
+function connect($dsn, <em>$persistent = false</em>)
+{
+    ...
+}
+        ]]>
+        </code>
+        <code title="Invalid: argument with default value at start of declaration">
+        <![CDATA[
+function connect(<em>$persistent = false</em>, $dsn)
+{
+    ...
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Class Names">
+    <standard>
+    <![CDATA[
+    Classes should be given descriptive names. Avoid using abbreviations where possible. Class names should always begin with an uppercase letter. The PEAR class hierarchy is also reflected in the class name, each level of the hierarchy separated with a single underscore.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Examples of valid class names">
+        <![CDATA[
+Log
+Net_Finger
+HTML_Upload_Error
+        ]]>
+        </code>
+        <code title="Examples of invalid class names">
+        <![CDATA[
+log
+NetFinger
+HTML-Upload-Error
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Function and Method Names">
+    <standard>
+    <![CDATA[
+    Functions and methods should be named using the "studly caps" style (also referred to as "bumpy case" or "camel caps"). Functions should in addition have the package name as a prefix, to avoid name collisions between packages. The initial letter of the name (after the prefix) is lowercase, and each letter that starts a new "word" is capitalized.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Examples of valid function names">
+        <![CDATA[
+connect()
+getData()
+buildSomeWidget()
+XML_RPC_serializeData()
+        ]]>
+        </code>
+        <code title="Examples of invalid function names">
+        <![CDATA[
+Connect()
+get_data()
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="Variable Names">
+    <standard>
+    <![CDATA[
+    Private member variable names should be prefixed with an underscore and public/protected variable names should not.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Proper member variable names.">
+        <![CDATA[
+class Foo
+{
+    public $<em>publicVar</em>;
+    protected $<em>protectedVar</em>;
+    private $<em>_privateVar</em>;
+}
+        ]]>
+        </code>
+        <code title="Invalid: underscores used on public/protected variables and not used on private variables.">
+        <![CDATA[
+class Foo
+{
+    public $<em>_publicVar</em>;
+    protected $<em>_protectedVar</em>;
+    private $<em>privateVar</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml	(revision 5534)
@@ -0,0 +1,39 @@
+<documentation title="Object Operator Indentation">
+    <standard>
+    <![CDATA[
+    Chained object operators when spread out over multiple lines should be the first thing on the line and be indented by 1 level.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Object operator at the start of a new line.">
+        <![CDATA[
+$foo
+    <em>-></em>bar()
+    <em>-></em>baz();
+        ]]>
+        </code>
+        <code title="Invalid: Object operator at the end of the line.">
+        <![CDATA[
+$foo<em>-></em>
+    bar()<em>-></em>
+    baz();
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Object operator indented correctly.">
+        <![CDATA[
+$foo
+<em>    </em>->bar()
+<em>    </em>->baz();
+        ]]>
+        </code>
+        <code title="Invalid: Object operator not indented correctly.">
+        <![CDATA[
+$foo
+<em></em>->bar()
+<em></em>->baz();
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Closing Brace Indentation">
+    <standard>
+    <![CDATA[
+    Closing braces should be indented at the same level as the beginning of the scope.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Consistent indentation level for scope.">
+        <![CDATA[
+if ($test) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: The ending brace is indented further than the if statement.">
+        <![CDATA[
+if ($test) {
+    $var = 1;
+<em>    </em>}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml	(revision 5534)
@@ -0,0 +1,29 @@
+<documentation title="Scope Indentation">
+    <standard>
+    <![CDATA[
+    Any scope openers except for switch statements should be indented 1 level.  This includes classes, functions, and control structures.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Consistent indentation level for scope.">
+        <![CDATA[
+function foo()
+{
+<em>    </em>if ($test) {
+<em>        </em>$var = 1;
+<em>    </em>}
+}
+        ]]>
+        </code>
+        <code title="Invalid: Indentation is not used for scope.">
+        <![CDATA[
+function foo()
+{
+<em></em>if ($test) {
+<em></em>$var = 1;
+<em></em>}
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,164 @@
+<?php
+/**
+ * Class Declaration Test.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Class Declaration Test.
+ *
+ * Checks the declaration of the class is correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Classes_ClassDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+                T_TRAIT,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param integer              $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens    = $phpcsFile->getTokens();
+        $errorData = array(strtolower($tokens[$stackPtr]['content']));
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            $error = 'Possible parse error: %s missing opening or closing brace';
+            $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $errorData);
+            return;
+        }
+
+        $curlyBrace  = $tokens[$stackPtr]['scope_opener'];
+        $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($curlyBrace - 1), $stackPtr, true);
+        $classLine   = $tokens[$lastContent]['line'];
+        $braceLine   = $tokens[$curlyBrace]['line'];
+        if ($braceLine === $classLine) {
+            $phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'same line');
+            $error = 'Opening brace of a %s must be on the line after the definition';
+            $fix   = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceNewLine', $errorData);
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                if ($tokens[($curlyBrace - 1)]['code'] === T_WHITESPACE) {
+                    $phpcsFile->fixer->replaceToken(($curlyBrace - 1), '');
+                }
+
+                $phpcsFile->fixer->addNewlineBefore($curlyBrace);
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            return;
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'new line');
+
+            if ($braceLine > ($classLine + 1)) {
+                $error = 'Opening brace of a %s must be on the line following the %s declaration; found %s line(s)';
+                $data  = array(
+                          $tokens[$stackPtr]['content'],
+                          $tokens[$stackPtr]['content'],
+                          ($braceLine - $classLine - 1),
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceWrongLine', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($curlyBrace - 1); $i > $lastContent; $i--) {
+                        if ($tokens[$i]['line'] === ($tokens[$curlyBrace]['line'] + 1)) {
+                            break;
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+
+                return;
+            }//end if
+        }//end if
+
+        if ($tokens[($curlyBrace + 1)]['content'] !== $phpcsFile->eolChar) {
+            $error = 'Opening %s brace must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceNotAlone', $errorData);
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($curlyBrace);
+            }
+        }
+
+        if ($tokens[($curlyBrace - 1)]['code'] === T_WHITESPACE) {
+            $prevContent = $tokens[($curlyBrace - 1)]['content'];
+            if ($prevContent === $phpcsFile->eolChar) {
+                $spaces = 0;
+            } else {
+                $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar));
+                $spaces     = strlen($blankSpace);
+            }
+
+            $expected = ($tokens[$stackPtr]['level'] * $this->indent);
+            if ($spaces !== $expected) {
+                $error = 'Expected %s spaces before opening brace; %s found';
+                $data  = array(
+                          $expected,
+                          $spaces,
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'SpaceBeforeBrace', $data);
+                if ($fix === true) {
+                    $indent = str_repeat(' ', $expected);
+                    if ($spaces === 0) {
+                        $phpcsFile->fixer->addContentBefore($curlyBrace, $indent);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($curlyBrace - 1), $indent);
+                    }
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php	(revision 5534)
@@ -0,0 +1,137 @@
+<?php
+/**
+ * Parses and verifies the doc comments for classes.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Parses and verifies the doc comments for classes.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Commenting_ClassCommentSniff extends PEAR_Sniffs_Commenting_FileCommentSniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->currentFile = $phpcsFile;
+
+        $tokens    = $phpcsFile->getTokens();
+        $type      = strtolower($tokens[$stackPtr]['content']);
+        $errorData = array($type);
+
+        $find   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $find[] = T_WHITESPACE;
+
+        $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true);
+        if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG
+            && $tokens[$commentEnd]['code'] !== T_COMMENT
+        ) {
+            $phpcsFile->addError('Missing class doc comment', $stackPtr, 'Missing');
+            $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'no');
+            return;
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'yes');
+        }
+
+        // Try and determine if this is a file comment instead of a class comment.
+        // We assume that if this is the first comment after the open PHP tag, then
+        // it is most likely a file comment instead of a class comment.
+        if ($tokens[$commentEnd]['code'] === T_DOC_COMMENT_CLOSE_TAG) {
+            $start = ($tokens[$commentEnd]['comment_opener'] - 1);
+        } else {
+            $start = $phpcsFile->findPrevious(T_COMMENT, ($commentEnd - 1), null, true);
+        }
+
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, $start, null, true);
+        if ($tokens[$prev]['code'] === T_OPEN_TAG) {
+            $prevOpen = $phpcsFile->findPrevious(T_OPEN_TAG, ($prev - 1));
+            if ($prevOpen === false) {
+                // This is a comment directly after the first open tag,
+                // so probably a file comment.
+                $phpcsFile->addError('Missing class doc comment', $stackPtr, 'Missing');
+                return;
+            }
+        }
+
+        if ($tokens[$commentEnd]['code'] === T_COMMENT) {
+            $phpcsFile->addError('You must use "/**" style comments for a class comment', $stackPtr, 'WrongStyle');
+            return;
+        }
+
+        // Check each tag.
+        $this->processTags($phpcsFile, $stackPtr, $tokens[$commentEnd]['comment_opener']);
+
+    }//end process()
+
+
+    /**
+     * Process the version tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processVersion(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            if ((strstr($content, 'Release:') === false)) {
+                $error = 'Invalid version "%s" in doc comment; consider "Release: <package_version>" instead';
+                $data  = array($content);
+                $phpcsFile->addWarning($error, $tag, 'InvalidVersion', $data);
+            }
+        }
+
+    }//end processVersion()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php	(revision 5534)
@@ -0,0 +1,552 @@
+<?php
+/**
+ * Parses and verifies the doc comments for files.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Parses and verifies the doc comments for files.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+class PEAR_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * Tags in correct order and related info.
+     *
+     * @var array
+     */
+    protected $tags = array(
+                       '@category'   => array(
+                                         'required'       => true,
+                                         'allow_multiple' => false,
+                                        ),
+                       '@package'    => array(
+                                         'required'       => true,
+                                         'allow_multiple' => false,
+                                        ),
+                       '@subpackage' => array(
+                                         'required'       => false,
+                                         'allow_multiple' => false,
+                                        ),
+                       '@author'     => array(
+                                         'required'       => true,
+                                         'allow_multiple' => true,
+                                        ),
+                       '@copyright'  => array(
+                                         'required'       => false,
+                                         'allow_multiple' => true,
+                                        ),
+                       '@license'    => array(
+                                         'required'       => true,
+                                         'allow_multiple' => false,
+                                        ),
+                       '@version'    => array(
+                                         'required'       => false,
+                                         'allow_multiple' => false,
+                                        ),
+                       '@link'       => array(
+                                         'required'       => true,
+                                         'allow_multiple' => true,
+                                        ),
+                       '@see'        => array(
+                                         'required'       => false,
+                                         'allow_multiple' => true,
+                                        ),
+                       '@since'      => array(
+                                         'required'       => false,
+                                         'allow_multiple' => false,
+                                        ),
+                       '@deprecated' => array(
+                                         'required'       => false,
+                                         'allow_multiple' => false,
+                                        ),
+                      );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Find the next non whitespace token.
+        $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+
+        // Allow declare() statements at the top of the file.
+        if ($tokens[$commentStart]['code'] === T_DECLARE) {
+            $semicolon    = $phpcsFile->findNext(T_SEMICOLON, ($commentStart + 1));
+            $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($semicolon + 1), null, true);
+        }
+
+        // Ignore vim header.
+        if ($tokens[$commentStart]['code'] === T_COMMENT) {
+            if (strstr($tokens[$commentStart]['content'], 'vim:') !== false) {
+                $commentStart = $phpcsFile->findNext(
+                    T_WHITESPACE,
+                    ($commentStart + 1),
+                    null,
+                    true
+                );
+            }
+        }
+
+        $errorToken = ($stackPtr + 1);
+        if (isset($tokens[$errorToken]) === false) {
+            $errorToken--;
+        }
+
+        if ($tokens[$commentStart]['code'] === T_CLOSE_TAG) {
+            // We are only interested if this is the first open tag.
+            return ($phpcsFile->numTokens + 1);
+        } else if ($tokens[$commentStart]['code'] === T_COMMENT) {
+            $error = 'You must use "/**" style comments for a file comment';
+            $phpcsFile->addError($error, $errorToken, 'WrongStyle');
+            $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes');
+            return ($phpcsFile->numTokens + 1);
+        } else if ($commentStart === false
+            || $tokens[$commentStart]['code'] !== T_DOC_COMMENT_OPEN_TAG
+        ) {
+            $phpcsFile->addError('Missing file doc comment', $errorToken, 'Missing');
+            $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no');
+            return ($phpcsFile->numTokens + 1);
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes');
+        }
+
+        // Check the PHP Version, which should be in some text before the first tag.
+        $commentEnd = $tokens[$commentStart]['comment_closer'];
+        $found      = false;
+        for ($i = ($commentStart + 1); $i < $commentEnd; $i++) {
+            if ($tokens[$i]['code'] === T_DOC_COMMENT_TAG) {
+                break;
+            } else if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING
+                && strstr(strtolower($tokens[$i]['content']), 'php version') !== false
+            ) {
+                $found = true;
+                break;
+            }
+        }
+
+        if ($found === false) {
+            $error = 'PHP version not specified';
+            $phpcsFile->addWarning($error, $commentEnd, 'MissingVersion');
+        }
+
+        // Check each tag.
+        $this->processTags($phpcsFile, $stackPtr, $commentStart);
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+    /**
+     * Processes each required or optional tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart Position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processTags(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (get_class($this) === 'PEAR_Sniffs_Commenting_FileCommentSniff') {
+            $docBlock = 'file';
+        } else {
+            $docBlock = 'class';
+        }
+
+        $commentEnd = $tokens[$commentStart]['comment_closer'];
+
+        $foundTags = array();
+        $tagTokens = array();
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            $name = $tokens[$tag]['content'];
+            if (isset($this->tags[$name]) === false) {
+                continue;
+            }
+
+            if ($this->tags[$name]['allow_multiple'] === false && isset($tagTokens[$name]) === true) {
+                $error = 'Only one %s tag is allowed in a %s comment';
+                $data  = array(
+                          $name,
+                          $docBlock,
+                         );
+                $phpcsFile->addError($error, $tag, 'Duplicate'.ucfirst(substr($name, 1)).'Tag', $data);
+            }
+
+            $foundTags[]        = $name;
+            $tagTokens[$name][] = $tag;
+
+            $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd);
+            if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) {
+                $error = 'Content missing for %s tag in %s comment';
+                $data  = array(
+                          $name,
+                          $docBlock,
+                         );
+                $phpcsFile->addError($error, $tag, 'Empty'.ucfirst(substr($name, 1)).'Tag', $data);
+                continue;
+            }
+        }//end foreach
+
+        // Check if the tags are in the correct position.
+        $pos = 0;
+        foreach ($this->tags as $tag => $tagData) {
+            if (isset($tagTokens[$tag]) === false) {
+                if ($tagData['required'] === true) {
+                    $error = 'Missing %s tag in %s comment';
+                    $data  = array(
+                              $tag,
+                              $docBlock,
+                             );
+                    $phpcsFile->addError($error, $commentEnd, 'Missing'.ucfirst(substr($tag, 1)).'Tag', $data);
+                }
+
+                continue;
+            } else {
+                $method = 'process'.substr($tag, 1);
+                if (method_exists($this, $method) === true) {
+                    // Process each tag if a method is defined.
+                    call_user_func(array($this, $method), $phpcsFile, $tagTokens[$tag]);
+                }
+            }
+
+            if (isset($foundTags[$pos]) === false) {
+                break;
+            }
+
+            if ($foundTags[$pos] !== $tag) {
+                $error = 'The tag in position %s should be the %s tag';
+                $data  = array(
+                          ($pos + 1),
+                          $tag,
+                         );
+                $phpcsFile->addError($error, $tokens[$commentStart]['comment_tags'][$pos], ucfirst(substr($tag, 1)).'TagOrder', $data);
+            }
+
+            // Account for multiple tags.
+            $pos++;
+            while (isset($foundTags[$pos]) === true && $foundTags[$pos] === $tag) {
+                $pos++;
+            }
+        }//end foreach
+
+    }//end processTags()
+
+
+    /**
+     * Process the category tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processCategory(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            if (PHP_CodeSniffer::isUnderscoreName($content) !== true) {
+                $newContent = str_replace(' ', '_', $content);
+                $nameBits   = explode('_', $newContent);
+                $firstBit   = array_shift($nameBits);
+                $newName    = ucfirst($firstBit).'_';
+                foreach ($nameBits as $bit) {
+                    if ($bit !== '') {
+                        $newName .= ucfirst($bit).'_';
+                    }
+                }
+
+                $error     = 'Category name "%s" is not valid; consider "%s" instead';
+                $validName = trim($newName, '_');
+                $data      = array(
+                              $content,
+                              $validName,
+                             );
+                $phpcsFile->addError($error, $tag, 'InvalidCategory', $data);
+            }
+        }//end foreach
+
+    }//end processCategory()
+
+
+    /**
+     * Process the package tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processPackage(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            if (PHP_CodeSniffer::isUnderscoreName($content) === true) {
+                continue;
+            }
+
+            $newContent = str_replace(' ', '_', $content);
+            $newContent = trim($newContent, '_');
+            $newContent = preg_replace('/[^A-Za-z_]/', '', $newContent);
+
+            if ($newContent === '') {
+                $error = 'Package name "%s" is not valid';
+                $data  = array($content);
+                $phpcsFile->addError($error, $tag, 'InvalidPackageValue', $data);
+            } else {
+                $nameBits = explode('_', $newContent);
+                $firstBit = array_shift($nameBits);
+                $newName  = strtoupper($firstBit{0}).substr($firstBit, 1).'_';
+                foreach ($nameBits as $bit) {
+                    if ($bit !== '') {
+                        $newName .= strtoupper($bit{0}).substr($bit, 1).'_';
+                    }
+                }
+
+                $error     = 'Package name "%s" is not valid; consider "%s" instead';
+                $validName = trim($newName, '_');
+                $data      = array(
+                              $content,
+                              $validName,
+                             );
+                $phpcsFile->addError($error, $tag, 'InvalidPackage', $data);
+            }//end if
+        }//end foreach
+
+    }//end processPackage()
+
+
+    /**
+     * Process the subpackage tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processSubpackage(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            if (PHP_CodeSniffer::isUnderscoreName($content) === true) {
+                continue;
+            }
+
+            $newContent = str_replace(' ', '_', $content);
+            $nameBits   = explode('_', $newContent);
+            $firstBit   = array_shift($nameBits);
+            $newName    = strtoupper($firstBit{0}).substr($firstBit, 1).'_';
+            foreach ($nameBits as $bit) {
+                if ($bit !== '') {
+                    $newName .= strtoupper($bit{0}).substr($bit, 1).'_';
+                }
+            }
+
+            $error     = 'Subpackage name "%s" is not valid; consider "%s" instead';
+            $validName = trim($newName, '_');
+            $data      = array(
+                          $content,
+                          $validName,
+                         );
+            $phpcsFile->addError($error, $tag, 'InvalidSubpackage', $data);
+        }//end foreach
+
+    }//end processSubpackage()
+
+
+    /**
+     * Process the author tag(s) that this header comment has.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processAuthor(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            $local   = '\da-zA-Z-_+';
+            // Dot character cannot be the first or last character in the local-part.
+            $localMiddle = $local.'.\w';
+            if (preg_match('/^([^<]*)\s+<(['.$local.'](['.$localMiddle.']*['.$local.'])*@[\da-zA-Z][-.\w]*[\da-zA-Z]\.[a-zA-Z]{2,7})>$/', $content) === 0) {
+                $error = 'Content of the @author tag must be in the form "Display Name <username@example.com>"';
+                $phpcsFile->addError($error, $tag, 'InvalidAuthors');
+            }
+        }
+
+    }//end processAuthor()
+
+
+    /**
+     * Process the copyright tags.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            $matches = array();
+            if (preg_match('/^([0-9]{4})((.{1})([0-9]{4}))? (.+)$/', $content, $matches) !== 0) {
+                // Check earliest-latest year order.
+                if ($matches[3] !== '') {
+                    if ($matches[3] !== '-') {
+                        $error = 'A hyphen must be used between the earliest and latest year';
+                        $phpcsFile->addError($error, $tag, 'CopyrightHyphen');
+                    }
+
+                    if ($matches[4] !== '' && $matches[4] < $matches[1]) {
+                        $error = "Invalid year span \"$matches[1]$matches[3]$matches[4]\" found; consider \"$matches[4]-$matches[1]\" instead";
+                        $phpcsFile->addWarning($error, $tag, 'InvalidCopyright');
+                    }
+                }
+            } else {
+                $error = '@copyright tag must contain a year and the name of the copyright holder';
+                $phpcsFile->addError($error, $tag, 'IncompleteCopyright');
+            }
+        }//end foreach
+
+    }//end processCopyright()
+
+
+    /**
+     * Process the license tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processLicense(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            $matches = array();
+            preg_match('/^([^\s]+)\s+(.*)/', $content, $matches);
+            if (count($matches) !== 3) {
+                $error = '@license tag must contain a URL and a license name';
+                $phpcsFile->addError($error, $tag, 'IncompleteLicense');
+            }
+        }
+
+    }//end processLicense()
+
+
+    /**
+     * Process the version tag.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param array                $tags      The tokens for these tags.
+     *
+     * @return void
+     */
+    protected function processVersion(PHP_CodeSniffer_File $phpcsFile, array $tags)
+    {
+        $tokens = $phpcsFile->getTokens();
+        foreach ($tags as $tag) {
+            if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                // No content.
+                continue;
+            }
+
+            $content = $tokens[($tag + 2)]['content'];
+            if (strstr($content, 'CVS:') === false
+                && strstr($content, 'SVN:') === false
+                && strstr($content, 'GIT:') === false
+                && strstr($content, 'HG:') === false
+            ) {
+                $error = 'Invalid version "%s" in file comment; consider "CVS: <cvs_id>" or "SVN: <svn_id>" or "GIT: <git_id>" or "HG: <hg_id>" instead';
+                $data  = array($content);
+                $phpcsFile->addWarning($error, $tag, 'InvalidVersion', $data);
+            }
+        }
+
+    }//end processVersion()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php	(revision 5534)
@@ -0,0 +1,389 @@
+<?php
+/**
+ * Parses and verifies the doc comments for functions.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Parses and verifies the doc comments for functions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $find   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $find[] = T_WHITESPACE;
+
+        $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true);
+        if ($tokens[$commentEnd]['code'] === T_COMMENT) {
+            // Inline comments might just be closing comments for
+            // control structures or functions instead of function comments
+            // using the wrong comment type. If there is other code on the line,
+            // assume they relate to that code.
+            $prev = $phpcsFile->findPrevious($find, ($commentEnd - 1), null, true);
+            if ($prev !== false && $tokens[$prev]['line'] === $tokens[$commentEnd]['line']) {
+                $commentEnd = $prev;
+            }
+        }
+
+        if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG
+            && $tokens[$commentEnd]['code'] !== T_COMMENT
+        ) {
+            $phpcsFile->addError('Missing function doc comment', $stackPtr, 'Missing');
+            $phpcsFile->recordMetric($stackPtr, 'Function has doc comment', 'no');
+            return;
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Function has doc comment', 'yes');
+        }
+
+        if ($tokens[$commentEnd]['code'] === T_COMMENT) {
+            $phpcsFile->addError('You must use "/**" style comments for a function comment', $stackPtr, 'WrongStyle');
+            return;
+        }
+
+        if ($tokens[$commentEnd]['line'] !== ($tokens[$stackPtr]['line'] - 1)) {
+            $error = 'There must be no blank lines after the function comment';
+            $phpcsFile->addError($error, $commentEnd, 'SpacingAfter');
+        }
+
+        $commentStart = $tokens[$commentEnd]['comment_opener'];
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] === '@see') {
+                // Make sure the tag isn't empty.
+                $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd);
+                if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) {
+                    $error = 'Content missing for @see tag in function comment';
+                    $phpcsFile->addError($error, $tag, 'EmptySees');
+                }
+            }
+        }
+
+        $this->processReturn($phpcsFile, $stackPtr, $commentStart);
+        $this->processThrows($phpcsFile, $stackPtr, $commentStart);
+        $this->processParams($phpcsFile, $stackPtr, $commentStart);
+
+    }//end process()
+
+
+    /**
+     * Process the return comment of this function comment.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart The position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processReturn(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Skip constructor and destructor.
+        $methodName      = $phpcsFile->getDeclarationName($stackPtr);
+        $isSpecialMethod = ($methodName === '__construct' || $methodName === '__destruct');
+
+        $return = null;
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] === '@return') {
+                if ($return !== null) {
+                    $error = 'Only 1 @return tag is allowed in a function comment';
+                    $phpcsFile->addError($error, $tag, 'DuplicateReturn');
+                    return;
+                }
+
+                $return = $tag;
+            }
+        }
+
+        if ($isSpecialMethod === true) {
+            return;
+        }
+
+        if ($return !== null) {
+            $content = $tokens[($return + 2)]['content'];
+            if (empty($content) === true || $tokens[($return + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                $error = 'Return type missing for @return tag in function comment';
+                $phpcsFile->addError($error, $return, 'MissingReturnType');
+            }
+        } else {
+            $error = 'Missing @return tag in function comment';
+            $phpcsFile->addError($error, $tokens[$commentStart]['comment_closer'], 'MissingReturn');
+        }//end if
+
+    }//end processReturn()
+
+
+    /**
+     * Process any throw tags that this function comment has.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart The position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processThrows(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $throws = array();
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] !== '@throws') {
+                continue;
+            }
+
+            $exception = null;
+            $comment   = null;
+            if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) {
+                $matches = array();
+                preg_match('/([^\s]+)(?:\s+(.*))?/', $tokens[($tag + 2)]['content'], $matches);
+                $exception = $matches[1];
+                if (isset($matches[2]) === true) {
+                    $comment = $matches[2];
+                }
+            }
+
+            if ($exception === null) {
+                $error = 'Exception type missing for @throws tag in function comment';
+                $phpcsFile->addError($error, $tag, 'InvalidThrows');
+            }
+        }//end foreach
+
+    }//end processThrows()
+
+
+    /**
+     * Process the function parameter comments.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart The position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processParams(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $params  = array();
+        $maxType = 0;
+        $maxVar  = 0;
+        foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) {
+            if ($tokens[$tag]['content'] !== '@param') {
+                continue;
+            }
+
+            $type      = '';
+            $typeSpace = 0;
+            $var       = '';
+            $varSpace  = 0;
+            $comment   = '';
+            if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) {
+                $matches = array();
+                preg_match('/([^$&.]+)(?:((?:\.\.\.)?(?:\$|&)[^\s]+)(?:(\s+)(.*))?)?/', $tokens[($tag + 2)]['content'], $matches);
+
+                $typeLen   = strlen($matches[1]);
+                $type      = trim($matches[1]);
+                $typeSpace = ($typeLen - strlen($type));
+                $typeLen   = strlen($type);
+                if ($typeLen > $maxType) {
+                    $maxType = $typeLen;
+                }
+
+                if (isset($matches[2]) === true) {
+                    $var    = $matches[2];
+                    $varLen = strlen($var);
+                    if ($varLen > $maxVar) {
+                        $maxVar = $varLen;
+                    }
+
+                    if (isset($matches[4]) === true) {
+                        $varSpace = strlen($matches[3]);
+                        $comment  = $matches[4];
+
+                        // Any strings until the next tag belong to this comment.
+                        if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) {
+                            $end = $tokens[$commentStart]['comment_tags'][($pos + 1)];
+                        } else {
+                            $end = $tokens[$commentStart]['comment_closer'];
+                        }
+
+                        for ($i = ($tag + 3); $i < $end; $i++) {
+                            if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) {
+                                $comment .= ' '.$tokens[$i]['content'];
+                            }
+                        }
+                    } else {
+                        $error = 'Missing parameter comment';
+                        $phpcsFile->addError($error, $tag, 'MissingParamComment');
+                    }
+                } else {
+                    $error = 'Missing parameter name';
+                    $phpcsFile->addError($error, $tag, 'MissingParamName');
+                }//end if
+            } else {
+                $error = 'Missing parameter type';
+                $phpcsFile->addError($error, $tag, 'MissingParamType');
+            }//end if
+
+            $params[] = array(
+                         'tag'        => $tag,
+                         'type'       => $type,
+                         'var'        => $var,
+                         'comment'    => $comment,
+                         'type_space' => $typeSpace,
+                         'var_space'  => $varSpace,
+                        );
+        }//end foreach
+
+        $realParams  = $phpcsFile->getMethodParameters($stackPtr);
+        $foundParams = array();
+
+        // We want to use ... for all variable length arguments, so added
+        // this prefix to the variable name so comparisons are easier.
+        foreach ($realParams as $pos => $param) {
+            if ($param['variable_length'] === true) {
+                $realParams[$pos]['name'] = '...'.$realParams[$pos]['name'];
+            }
+        }
+
+        foreach ($params as $pos => $param) {
+            if ($param['var'] === '') {
+                continue;
+            }
+
+            $foundParams[] = $param['var'];
+
+            // Check number of spaces after the type.
+            $spaces = ($maxType - strlen($param['type']) + 1);
+            if ($param['type_space'] !== $spaces) {
+                $error = 'Expected %s spaces after parameter type; %s found';
+                $data  = array(
+                          $spaces,
+                          $param['type_space'],
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamType', $data);
+                if ($fix === true) {
+                    $content  = $param['type'];
+                    $content .= str_repeat(' ', $spaces);
+                    $content .= $param['var'];
+                    $content .= str_repeat(' ', $param['var_space']);
+                    $content .= $param['comment'];
+                    $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
+                }
+            }
+
+            // Make sure the param name is correct.
+            if (isset($realParams[$pos]) === true) {
+                $realName = $realParams[$pos]['name'];
+                if ($realName !== $param['var']) {
+                    $code = 'ParamNameNoMatch';
+                    $data = array(
+                             $param['var'],
+                             $realName,
+                            );
+
+                    $error = 'Doc comment for parameter %s does not match ';
+                    if (strtolower($param['var']) === strtolower($realName)) {
+                        $error .= 'case of ';
+                        $code   = 'ParamNameNoCaseMatch';
+                    }
+
+                    $error .= 'actual variable name %s';
+
+                    $phpcsFile->addError($error, $param['tag'], $code, $data);
+                }
+            } else if (substr($param['var'], -4) !== ',...') {
+                // We must have an extra parameter comment.
+                $error = 'Superfluous parameter comment';
+                $phpcsFile->addError($error, $param['tag'], 'ExtraParamComment');
+            }//end if
+
+            if ($param['comment'] === '') {
+                continue;
+            }
+
+            // Check number of spaces after the var name.
+            $spaces = ($maxVar - strlen($param['var']) + 1);
+            if ($param['var_space'] !== $spaces) {
+                $error = 'Expected %s spaces after parameter name; %s found';
+                $data  = array(
+                          $spaces,
+                          $param['var_space'],
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamName', $data);
+                if ($fix === true) {
+                    $content  = $param['type'];
+                    $content .= str_repeat(' ', $param['type_space']);
+                    $content .= $param['var'];
+                    $content .= str_repeat(' ', $spaces);
+                    $content .= $param['comment'];
+                    $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
+                }
+            }
+        }//end foreach
+
+        $realNames = array();
+        foreach ($realParams as $realParam) {
+            $realNames[] = $realParam['name'];
+        }
+
+        // Report missing comments.
+        $diff = array_diff($realNames, $foundParams);
+        foreach ($diff as $neededParam) {
+            $error = 'Doc comment for parameter "%s" missing';
+            $data  = array($neededParam);
+            $phpcsFile->addError($error, $commentStart, 'MissingParamTag', $data);
+        }
+
+    }//end processParams()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * PHP_CodeSniffer_Sniffs_PEAR_Commenting_InlineCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PHP_CodeSniffer_Sniffs_PEAR_Commenting_InlineCommentSniff.
+ *
+ * Checks that no perl-style comments are used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Commenting_InlineCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_COMMENT);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['content']{0} === '#') {
+            $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '# ...');
+
+            $error  = 'Perl-style comments are not allowed. Use "// Comment."';
+            $error .= ' or "/* comment */" instead.';
+            $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle');
+            if ($fix === true) {
+                $newComment = ltrim($tokens[$stackPtr]['content'], '# ');
+                $newComment = '// '.$newComment;
+                $phpcsFile->fixer->replaceToken($stackPtr, $newComment);
+            }
+        } else if ($tokens[$stackPtr]['content']{0} === '/'
+            && $tokens[$stackPtr]['content']{1} === '/'
+        ) {
+            $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '// ...');
+        } else if ($tokens[$stackPtr]['content']{0} === '/'
+            && $tokens[$stackPtr]['content']{1} === '*'
+        ) {
+            $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '/* ... */');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php	(revision 5534)
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Verifies that control statements conform to their coding standards.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractPatternSniff not found');
+}
+
+/**
+ * Verifies that control statements conform to their coding standards.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff
+{
+
+    /**
+     * If true, comments will be ignored if they are found in the code.
+     *
+     * @var boolean
+     */
+    public $ignoreComments = true;
+
+
+    /**
+     * Returns the patterns that this test wishes to verify.
+     *
+     * @return string[]
+     */
+    protected function getPatterns()
+    {
+        return array(
+                'do {EOL...} while (...);EOL',
+                'while (...) {EOL',
+                'for (...) {EOL',
+                'if (...) {EOL',
+                'foreach (...) {EOL',
+                '} else if (...) {EOL',
+                '} elseif (...) {EOL',
+                '} else {EOL',
+                'do {EOL',
+               );
+
+    }//end getPatterns()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php	(revision 5534)
@@ -0,0 +1,274 @@
+<?php
+/**
+ * PEAR_Sniffs_ControlStructures_MultiLineConditionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_ControlStructures_MultiLineConditionSniff.
+ *
+ * Ensure multi-line IF conditions are defined correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_ControlStructures_MultiLineConditionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_ELSEIF,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) {
+            return;
+        }
+
+        $openBracket    = $tokens[$stackPtr]['parenthesis_opener'];
+        $closeBracket   = $tokens[$stackPtr]['parenthesis_closer'];
+        $spaceAfterOpen = 0;
+        if ($tokens[($openBracket + 1)]['code'] === T_WHITESPACE) {
+            if (strpos($tokens[($openBracket + 1)]['content'], $phpcsFile->eolChar) !== false) {
+                $spaceAfterOpen = 'newline';
+            } else {
+                $spaceAfterOpen = strlen($tokens[($openBracket + 1)]['content']);
+            }
+        }
+
+        if ($spaceAfterOpen !== 0) {
+            $error = 'First condition of a multi-line IF statement must directly follow the opening parenthesis';
+            $fix   = $phpcsFile->addFixableError($error, ($openBracket + 1), 'SpacingAfterOpenBrace');
+            if ($fix === true) {
+                if ($spaceAfterOpen === 'newline') {
+                    $phpcsFile->fixer->replaceToken(($openBracket + 1), '');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($openBracket + 1), '');
+                }
+            }
+        }
+
+        // We need to work out how far indented the if statement
+        // itself is, so we can work out how far to indent conditions.
+        $statementIndent = 0;
+        for ($i = ($stackPtr - 1); $i >= 0; $i--) {
+            if ($tokens[$i]['line'] !== $tokens[$stackPtr]['line']) {
+                $i++;
+                break;
+            }
+        }
+
+        if ($i >= 0 && $tokens[$i]['code'] === T_WHITESPACE) {
+            $statementIndent = strlen($tokens[$i]['content']);
+        }
+
+        // Each line between the parenthesis should be indented 4 spaces
+        // and start with an operator, unless the line is inside a
+        // function call, in which case it is ignored.
+        $lastLine = $tokens[$openBracket]['line'];
+        for ($i = ($openBracket + 1); $i < $closeBracket; $i++) {
+            if ($tokens[$i]['line'] !== $lastLine) {
+                if ($tokens[$i]['line'] === $tokens[$closeBracket]['line']) {
+                    $next = $phpcsFile->findNext(T_WHITESPACE, $i, null, true);
+                    if ($next !== $closeBracket) {
+                        // Closing bracket is on the same line as a condition.
+                        $error = 'Closing parenthesis of a multi-line IF statement must be on a new line';
+                        $fix   = $phpcsFile->addFixableError($error, $closeBracket, 'CloseBracketNewLine');
+                        if ($fix === true) {
+                            // Account for a comment at the end of the line.
+                            $next = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), null, true);
+                            if ($tokens[$next]['code'] !== T_COMMENT) {
+                                $phpcsFile->fixer->addNewlineBefore($closeBracket);
+                            } else {
+                                $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($next + 1), null, true);
+                                $phpcsFile->fixer->beginChangeset();
+                                $phpcsFile->fixer->replaceToken($closeBracket, '');
+                                $phpcsFile->fixer->addContentBefore($next, ')');
+                                $phpcsFile->fixer->endChangeset();
+                            }
+                        }
+
+                        $expectedIndent = ($statementIndent + $this->indent);
+                    } else {
+                        // Closing brace needs to be indented to the same level
+                        // as the statement.
+                        $expectedIndent = $statementIndent;
+                    }//end if
+                } else {
+                    $expectedIndent = ($statementIndent + $this->indent);
+                }//end if
+
+                if ($tokens[$i]['code'] === T_COMMENT) {
+                    $lastLine = $tokens[$i]['line'];
+                    continue;
+                }
+
+                // We changed lines, so this should be a whitespace indent token.
+                if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                    $foundIndent = 0;
+                } else {
+                    $foundIndent = strlen($tokens[$i]['content']);
+                }
+
+                if ($expectedIndent !== $foundIndent) {
+                    $error = 'Multi-line IF statement not indented correctly; expected %s spaces but found %s';
+                    $data  = array(
+                              $expectedIndent,
+                              $foundIndent,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $i, 'Alignment', $data);
+                    if ($fix === true) {
+                        $spaces = str_repeat(' ', $expectedIndent);
+                        if ($foundIndent === 0) {
+                            $phpcsFile->fixer->addContentBefore($i, $spaces);
+                        } else {
+                            $phpcsFile->fixer->replaceToken($i, $spaces);
+                        }
+                    }
+                }
+
+                if ($tokens[$i]['line'] !== $tokens[$closeBracket]['line']) {
+                    $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, $i, null, true);
+                    if (isset(PHP_CodeSniffer_Tokens::$booleanOperators[$tokens[$next]['code']]) === false) {
+                        $error = 'Each line in a multi-line IF statement must begin with a boolean operator';
+                        $fix   = $phpcsFile->addFixableError($error, $i, 'StartWithBoolean');
+                        if ($fix === true) {
+                            $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($i - 1), $openBracket, true);
+                            if (isset(PHP_CodeSniffer_Tokens::$booleanOperators[$tokens[$prev]['code']]) === true) {
+                                $phpcsFile->fixer->beginChangeset();
+                                $phpcsFile->fixer->replaceToken($prev, '');
+                                $phpcsFile->fixer->addContentBefore($next, $tokens[$prev]['content'].' ');
+                                $phpcsFile->fixer->endChangeset();
+                            } else {
+                                for ($x = ($prev + 1); $x < $next; $x++) {
+                                    $phpcsFile->fixer->replaceToken($x, '');
+                                }
+                            }
+                        }
+                    }
+                }//end if
+
+                $lastLine = $tokens[$i]['line'];
+            }//end if
+
+            if ($tokens[$i]['code'] === T_STRING) {
+                $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true);
+                if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) {
+                    // This is a function call, so skip to the end as they
+                    // have their own indentation rules.
+                    $i        = $tokens[$next]['parenthesis_closer'];
+                    $lastLine = $tokens[$i]['line'];
+                    continue;
+                }
+            }
+        }//end for
+
+        // From here on, we are checking the spacing of the opening and closing
+        // braces. If this IF statement does not use braces, we end here.
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        // The opening brace needs to be one space away from the closing parenthesis.
+        $openBrace = $tokens[$stackPtr]['scope_opener'];
+        $next      = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), $openBrace, true);
+        if ($next !== false) {
+            // Probably comments in between tokens, so don't check.
+            return;
+        }
+
+        if ($tokens[$openBrace]['line'] > $tokens[$closeBracket]['line']) {
+            $length = -1;
+        } else if ($openBrace === ($closeBracket + 1)) {
+            $length = 0;
+        } else if ($openBrace === ($closeBracket + 2)
+            && $tokens[($closeBracket + 1)]['code'] === T_WHITESPACE
+        ) {
+            $length = strlen($tokens[($closeBracket + 1)]['content']);
+        } else {
+            // Confused, so don't check.
+            $length = 1;
+        }
+
+        if ($length === 1) {
+            return;
+        }
+
+        $data = array($length);
+        $code = 'SpaceBeforeOpenBrace';
+
+        $error = 'There must be a single space between the closing parenthesis and the opening brace of a multi-line IF statement; found ';
+        if ($length === -1) {
+            $error .= 'newline';
+            $code   = 'NewlineBeforeOpenBrace';
+        } else {
+            $error .= '%s spaces';
+        }
+
+        $fix = $phpcsFile->addFixableError($error, ($closeBracket + 1), $code, $data);
+        if ($fix === true) {
+            if ($length === 0) {
+                $phpcsFile->fixer->addContent($closeBracket, ' ');
+            } else {
+                $phpcsFile->fixer->replaceToken(($closeBracket + 1), ' ');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php	(revision 5534)
@@ -0,0 +1,150 @@
+<?php
+/**
+ * PEAR_Sniffs_Files_IncludingFileSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_Files_IncludingFileSniff.
+ *
+ * Checks that the include_once is used in conditional situations, and
+ * require_once is used elsewhere. Also checks that brackets do not surround
+ * the file being included.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Files_IncludingFileSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_INCLUDE_ONCE,
+                T_REQUIRE_ONCE,
+                T_REQUIRE,
+                T_INCLUDE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
+        if ($tokens[$nextToken]['code'] === T_OPEN_PARENTHESIS) {
+            $error = '"%s" is a statement not a function; no parentheses are required';
+            $data  = array($tokens[$stackPtr]['content']);
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'BracketsNotRequired', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->replaceToken($tokens[$nextToken]['parenthesis_closer'], '');
+                if ($tokens[($nextToken - 1)]['code'] !== T_WHITESPACE) {
+                    $phpcsFile->fixer->replaceToken($nextToken, ' ');
+                } else {
+                    $phpcsFile->fixer->replaceToken($nextToken, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        if (count($tokens[$stackPtr]['conditions']) !== 0) {
+            $inCondition = true;
+        } else {
+            $inCondition = false;
+        }
+
+        // Check to see if this including statement is within the parenthesis
+        // of a condition. If that's the case then we need to process it as being
+        // within a condition, as they are checking the return value.
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            foreach ($tokens[$stackPtr]['nested_parenthesis'] as $left => $right) {
+                if (isset($tokens[$left]['parenthesis_owner']) === true) {
+                    $inCondition = true;
+                }
+            }
+        }
+
+        // Check to see if they are assigning the return value of this
+        // including call. If they are then they are probably checking it, so
+        // it's conditional.
+        $previous = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if (isset(PHP_CodeSniffer_Tokens::$assignmentTokens[$tokens[$previous]['code']]) === true) {
+            // The have assigned the return value to it, so its conditional.
+            $inCondition = true;
+        }
+
+        $tokenCode = $tokens[$stackPtr]['code'];
+        if ($inCondition === true) {
+            // We are inside a conditional statement. We need an include_once.
+            if ($tokenCode === T_REQUIRE_ONCE) {
+                $error  = 'File is being conditionally included; ';
+                $error .= 'use "include_once" instead';
+                $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'UseIncludeOnce');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($stackPtr, 'include_once');
+                }
+            } else if ($tokenCode === T_REQUIRE) {
+                $error  = 'File is being conditionally included; ';
+                $error .= 'use "include" instead';
+                $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'UseInclude');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($stackPtr, 'include');
+                }
+            }
+        } else {
+            // We are unconditionally including, we need a require_once.
+            if ($tokenCode === T_INCLUDE_ONCE) {
+                $error  = 'File is being unconditionally included; ';
+                $error .= 'use "require_once" instead';
+                $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'UseRequireOnce');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($stackPtr, 'require_once');
+                }
+            } else if ($tokenCode === T_INCLUDE) {
+                $error  = 'File is being unconditionally included; ';
+                $error .= 'use "require" instead';
+                $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'UseRequire');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($stackPtr, 'require');
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php	(revision 5534)
@@ -0,0 +1,119 @@
+<?php
+/**
+ * PEAR_Sniffs_Functions_FunctionDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_Formatting_MultiLineAssignmentSniff.
+ *
+ * If an assignment goes over two lines, ensure the equal sign is indented.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Formatting_MultiLineAssignmentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_EQUAL);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Equal sign can't be the last thing on the line.
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($next === false) {
+            // Bad assignment.
+            return;
+        }
+
+        if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
+            $error = 'Multi-line assignments must have the equal sign on the second line';
+            $phpcsFile->addError($error, $stackPtr, 'EqualSignLine');
+            return;
+        }
+
+        // Make sure it is the first thing on the line, otherwise we ignore it.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), false, true);
+        if ($prev === false) {
+            // Bad assignment.
+            return;
+        }
+
+        if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) {
+            return;
+        }
+
+        // Find the required indent based on the ident of the previous line.
+        $assignmentIndent = 0;
+        $prevLine         = $tokens[$prev]['line'];
+        for ($i = ($prev - 1); $i >= 0; $i--) {
+            if ($tokens[$i]['line'] !== $prevLine) {
+                $i++;
+                break;
+            }
+        }
+
+        if ($tokens[$i]['code'] === T_WHITESPACE) {
+            $assignmentIndent = strlen($tokens[$i]['content']);
+        }
+
+        // Find the actual indent.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1));
+
+        $expectedIndent = ($assignmentIndent + $this->indent);
+        $foundIndent    = strlen($tokens[$prev]['content']);
+        if ($foundIndent !== $expectedIndent) {
+            $error = 'Multi-line assignment not indented correctly; expected %s spaces but found %s';
+            $data  = array(
+                      $expectedIndent,
+                      $foundIndent,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'Indent', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php	(revision 5534)
@@ -0,0 +1,505 @@
+<?php
+/**
+ * PEAR_Sniffs_Functions_FunctionCallSignatureSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_Functions_FunctionCallSignatureSniff.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Functions_FunctionCallSignatureSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+    /**
+     * If TRUE, multiple arguments can be defined per line in a multi-line call.
+     *
+     * @var bool
+     */
+    public $allowMultipleArguments = true;
+
+    /**
+     * How many spaces should follow the opening bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesAfterOpen = 0;
+
+    /**
+     * How many spaces should precede the closing bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesBeforeClose = 0;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$functionNameTokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->requiredSpacesAfterOpen   = (int) $this->requiredSpacesAfterOpen;
+        $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose;
+        $tokens = $phpcsFile->getTokens();
+
+        // Find the next non-empty token.
+        $openBracket = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
+
+        if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) {
+            // Not a function call.
+            return;
+        }
+
+        if (isset($tokens[$openBracket]['parenthesis_closer']) === false) {
+            // Not a function call.
+            return;
+        }
+
+        // Find the previous non-empty token.
+        $search   = PHP_CodeSniffer_Tokens::$emptyTokens;
+        $search[] = T_BITWISE_AND;
+        $previous = $phpcsFile->findPrevious($search, ($stackPtr - 1), null, true);
+        if ($tokens[$previous]['code'] === T_FUNCTION) {
+            // It's a function definition, not a function call.
+            return;
+        }
+
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+
+        if (($stackPtr + 1) !== $openBracket) {
+            // Checking this: $value = my_function[*](...).
+            $error = 'Space before opening parenthesis of function call prohibited';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeOpenBracket');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($stackPtr + 1); $i < $openBracket; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                // Modify the bracket as well to ensure a conflict if the bracket
+                // has been changed in some way by another sniff.
+                $phpcsFile->fixer->replaceToken($openBracket, '(');
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), null, true);
+        if ($tokens[$next]['code'] === T_SEMICOLON) {
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[($closeBracket + 1)]['code']]) === true) {
+                $error = 'Space after closing parenthesis of function call prohibited';
+                $fix   = $phpcsFile->addFixableError($error, $closeBracket, 'SpaceAfterCloseBracket');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($closeBracket + 1); $i < $next; $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    // Modify the bracket as well to ensure a conflict if the bracket
+                    // has been changed in some way by another sniff.
+                    $phpcsFile->fixer->replaceToken($closeBracket, ')');
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+        }
+
+        // Check if this is a single line or multi-line function call.
+        if ($this->isMultiLineCall($phpcsFile, $stackPtr, $openBracket, $tokens) === true) {
+            $this->processMultiLineCall($phpcsFile, $stackPtr, $openBracket, $tokens);
+        } else {
+            $this->processSingleLineCall($phpcsFile, $stackPtr, $openBracket, $tokens);
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes single-line calls.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being scanned.
+     * @param int                  $stackPtr    The position of the current token
+     *                                          in the stack passed in $tokens.
+     * @param int                  $openBracket The position of the opening bracket
+     *                                          in the stack passed in $tokens.
+     * @param array                $tokens      The stack of tokens that make up
+     *                                          the file.
+     *
+     * @return void
+     */
+    public function isMultiLineCall(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBracket, $tokens)
+    {
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+        if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) {
+            return true;
+        }
+
+        return false;
+
+    }//end isMultiLineCall()
+
+
+    /**
+     * Processes single-line calls.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being scanned.
+     * @param int                  $stackPtr    The position of the current token
+     *                                          in the stack passed in $tokens.
+     * @param int                  $openBracket The position of the opening bracket
+     *                                          in the stack passed in $tokens.
+     * @param array                $tokens      The stack of tokens that make up
+     *                                          the file.
+     *
+     * @return void
+     */
+    public function processSingleLineCall(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBracket, $tokens)
+    {
+        $closer = $tokens[$openBracket]['parenthesis_closer'];
+        if ($openBracket === ($closer - 1)) {
+            return;
+        }
+
+        if ($this->requiredSpacesAfterOpen === 0 && $tokens[($openBracket + 1)]['code'] === T_WHITESPACE) {
+            // Checking this: $value = my_function([*]...).
+            $error = 'Space after opening parenthesis of function call prohibited';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($openBracket + 1), '');
+            }
+        } else if ($this->requiredSpacesAfterOpen > 0) {
+            $spaceAfterOpen = 0;
+            if ($tokens[($openBracket + 1)]['code'] === T_WHITESPACE) {
+                $spaceAfterOpen = strlen($tokens[($openBracket + 1)]['content']);
+            }
+
+            if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
+                $error = 'Expected %s spaces after opening bracket; %s found';
+                $data  = array(
+                          $this->requiredSpacesAfterOpen,
+                          $spaceAfterOpen,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
+                    if ($spaceAfterOpen === 0) {
+                        $phpcsFile->fixer->addContent($openBracket, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($openBracket + 1), $padding);
+                    }
+                }
+            }
+        }//end if
+
+        // Checking this: $value = my_function(...[*]).
+        $spaceBeforeClose = 0;
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($closer - 1), $openBracket, true);
+        if ($tokens[$prev]['code'] === T_END_HEREDOC || $tokens[$prev]['code'] === T_END_NOWDOC) {
+            // Need a newline after these tokens, so ignore this rule.
+            return;
+        }
+
+        if ($tokens[$prev]['line'] !== $tokens[$closer]['line']) {
+            $spaceBeforeClose = 'newline';
+        } else if ($tokens[($closer - 1)]['code'] === T_WHITESPACE) {
+            $spaceBeforeClose = strlen($tokens[($closer - 1)]['content']);
+        }
+
+        if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) {
+            $error = 'Expected %s spaces before closing bracket; %s found';
+            $data  = array(
+                      $this->requiredSpacesBeforeClose,
+                      $spaceBeforeClose,
+                     );
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeCloseBracket', $data);
+            if ($fix === true) {
+                $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
+                if ($spaceBeforeClose === 0) {
+                    $phpcsFile->fixer->addContentBefore($closer, $padding);
+                } else {
+                    $phpcsFile->fixer->replaceToken(($closer - 1), $padding);
+                }
+            }
+        }
+
+    }//end processSingleLineCall()
+
+
+    /**
+     * Processes multi-line calls.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being scanned.
+     * @param int                  $stackPtr    The position of the current token
+     *                                          in the stack passed in $tokens.
+     * @param int                  $openBracket The position of the opening bracket
+     *                                          in the stack passed in $tokens.
+     * @param array                $tokens      The stack of tokens that make up
+     *                                          the file.
+     *
+     * @return void
+     */
+    public function processMultiLineCall(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBracket, $tokens)
+    {
+        // We need to work out how far indented the function
+        // call itself is, so we can work out how far to
+        // indent the arguments.
+        $start = $phpcsFile->findStartOfStatement($stackPtr);
+        foreach (array('stackPtr', 'start') as $checkToken) {
+            $x = $$checkToken;
+            for ($i = ($x - 1); $i >= 0; $i--) {
+                if ($tokens[$i]['line'] !== $tokens[$x]['line']) {
+                    $i++;
+                    break;
+                }
+            }
+
+            if ($i <= 0) {
+                $functionIndent = 0;
+            } else if ($tokens[$i]['code'] === T_WHITESPACE) {
+                $functionIndent = strlen($tokens[$i]['content']);
+            } else if ($tokens[$i]['code'] === T_CONSTANT_ENCAPSED_STRING) {
+                $functionIndent = 0;
+            } else {
+                $trimmed = ltrim($tokens[$i]['content']);
+                if ($trimmed === '') {
+                    if ($tokens[$i]['code'] === T_INLINE_HTML) {
+                        $functionIndent = strlen($tokens[$i]['content']);
+                    } else {
+                        $functionIndent = ($tokens[$i]['column'] - 1);
+                    }
+                } else {
+                    $functionIndent = (strlen($tokens[$i]['content']) - strlen($trimmed));
+                }
+            }
+
+            $varName  = $checkToken.'Indent';
+            $$varName = $functionIndent;
+        }//end foreach
+
+        $functionIndent = max($startIndent, $stackPtrIndent);
+
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($openBracket + 1), null, true);
+        if ($tokens[$next]['line'] === $tokens[$openBracket]['line']) {
+            $error = 'Opening parenthesis of a multi-line function call must be the last content on the line';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'ContentAfterOpenBracket');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent(
+                    $openBracket,
+                    $phpcsFile->eolChar.str_repeat(' ', ($functionIndent + $this->indent))
+                );
+            }
+        }
+
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+        $prev         = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBracket - 1), null, true);
+        if ($tokens[$prev]['line'] === $tokens[$closeBracket]['line']) {
+            $error = 'Closing parenthesis of a multi-line function call must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $closeBracket, 'CloseBracketLine');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContentBefore(
+                    $closeBracket,
+                    $phpcsFile->eolChar.str_repeat(' ', ($functionIndent + $this->indent))
+                );
+            }
+        }
+
+        // Each line between the parenthesis should be indented n spaces.
+        $lastLine = $tokens[$openBracket]['line'];
+        $argStart = null;
+        $argEnd   = null;
+        $inArg    = false;
+        for ($i = ($openBracket + 1); $i < $closeBracket; $i++) {
+            if ($i > $argStart && $i < $argEnd) {
+                $inArg = true;
+            } else {
+                $inArg = false;
+            }
+
+            if ($tokens[$i]['line'] !== $lastLine) {
+                $lastLine = $tokens[$i]['line'];
+
+                // Ignore heredoc indentation.
+                if (isset(PHP_CodeSniffer_Tokens::$heredocTokens[$tokens[$i]['code']]) === true) {
+                    continue;
+                }
+
+                // Ignore multi-line string indentation.
+                if (isset(PHP_CodeSniffer_Tokens::$stringTokens[$tokens[$i]['code']]) === true
+                    && $tokens[$i]['code'] === $tokens[($i - 1)]['code']
+                ) {
+                    continue;
+                }
+
+                // Ignore inline HTML.
+                if ($tokens[$i]['code'] === T_INLINE_HTML) {
+                    continue;
+                }
+
+                // We changed lines, so this should be a whitespace indent token, but first make
+                // sure it isn't a blank line because we don't need to check indent unless there
+                // is actually some code to indent.
+                if ($tokens[$i]['code'] === T_WHITESPACE) {
+                    $nextCode = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), ($closeBracket + 1), true);
+                    if ($tokens[$nextCode]['line'] !== $lastLine) {
+                        if ($inArg === false) {
+                            $error = 'Empty lines are not allowed in multi-line function calls';
+                            $fix   = $phpcsFile->addFixableError($error, $i, 'EmptyLine');
+                            if ($fix === true) {
+                                $phpcsFile->fixer->replaceToken($i, '');
+                            }
+                        }
+
+                        continue;
+                    }
+                } else {
+                    $nextCode = $i;
+                }
+
+                if ($tokens[$nextCode]['line'] === $tokens[$closeBracket]['line']) {
+                    // Closing brace needs to be indented to the same level
+                    // as the function call.
+                    $inArg          = false;
+                    $expectedIndent = $functionIndent;
+                } else {
+                    $expectedIndent = ($functionIndent + $this->indent);
+                }
+
+                if ($tokens[$i]['code'] !== T_WHITESPACE
+                    && $tokens[$i]['code'] !== T_DOC_COMMENT_WHITESPACE
+                ) {
+                    // Just check if it is a multi-line block comment. If so, we can
+                    // calculate the indent from the whitespace before the content.
+                    if ($tokens[$i]['code'] === T_COMMENT
+                        && $tokens[($i - 1)]['code'] === T_COMMENT
+                    ) {
+                        $trimmed     = ltrim($tokens[$i]['content']);
+                        $foundIndent = (strlen($tokens[$i]['content']) - strlen($trimmed));
+                    } else {
+                        $foundIndent = 0;
+                    }
+                } else {
+                    $foundIndent = strlen($tokens[$i]['content']);
+                }
+
+                if ($foundIndent < $expectedIndent
+                    || ($inArg === false
+                    && $expectedIndent !== $foundIndent)
+                ) {
+                    $error = 'Multi-line function call not indented correctly; expected %s spaces but found %s';
+                    $data  = array(
+                              $expectedIndent,
+                              $foundIndent,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data);
+                    if ($fix === true) {
+                        $padding = str_repeat(' ', $expectedIndent);
+                        if ($foundIndent === 0) {
+                            $phpcsFile->fixer->addContentBefore($i, $padding);
+                        } else {
+                            if ($tokens[$i]['code'] === T_COMMENT) {
+                                $comment = $padding.ltrim($tokens[$i]['content']);
+                                $phpcsFile->fixer->replaceToken($i, $comment);
+                            } else {
+                                $phpcsFile->fixer->replaceToken($i, $padding);
+                            }
+                        }
+                    }
+                }//end if
+
+                if ($inArg === false) {
+                    $argStart = $nextCode;
+                    $argEnd   = $phpcsFile->findEndOfStatement($nextCode);
+                }
+            }//end if
+
+            // If we are within an argument we should be ignoring commas
+            // as these are not signaling the end of an argument.
+            if ($inArg === false && $tokens[$i]['code'] === T_COMMA) {
+                $next = $phpcsFile->findNext(array(T_WHITESPACE, T_COMMENT), ($i + 1), $closeBracket, true);
+                if ($next === false) {
+                    continue;
+                }
+
+                if ($this->allowMultipleArguments === false) {
+                    // Comma has to be the last token on the line.
+                    if ($tokens[$i]['line'] === $tokens[$next]['line']) {
+                        $error = 'Only one argument is allowed per line in a multi-line function call';
+                        $fix   = $phpcsFile->addFixableError($error, $next, 'MultipleArguments');
+                        if ($fix === true) {
+                            $phpcsFile->fixer->beginChangeset();
+                            for ($x = ($next - 1); $x > $i; $x--) {
+                                if ($tokens[$x]['code'] !== T_WHITESPACE) {
+                                    break;
+                                }
+
+                                $phpcsFile->fixer->replaceToken($x, '');
+                            }
+
+                            $phpcsFile->fixer->addContentBefore(
+                                $next,
+                                $phpcsFile->eolChar.str_repeat(' ', ($functionIndent + $this->indent))
+                            );
+                            $phpcsFile->fixer->endChangeset();
+                        }
+                    }
+                }//end if
+
+                $argStart = $next;
+                $argEnd   = $phpcsFile->findEndOfStatement($next);
+            }//end if
+        }//end for
+
+    }//end processMultiLineCall()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,409 @@
+<?php
+/**
+ * PEAR_Sniffs_Functions_FunctionDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_Functions_FunctionDeclarationSniff.
+ *
+ * Ensure single and multi-line function declarations are defined correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Functions_FunctionDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['parenthesis_opener']) === false
+            || isset($tokens[$stackPtr]['parenthesis_closer']) === false
+            || $tokens[$stackPtr]['parenthesis_opener'] === null
+            || $tokens[$stackPtr]['parenthesis_closer'] === null
+        ) {
+            return;
+        }
+
+        $openBracket  = $tokens[$stackPtr]['parenthesis_opener'];
+        $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
+
+        // Must be one space after the FUNCTION keyword.
+        if ($tokens[($stackPtr + 1)]['content'] === $phpcsFile->eolChar) {
+            $spaces = 'newline';
+        } else if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
+            $spaces = strlen($tokens[($stackPtr + 1)]['content']);
+        } else {
+            $spaces = 0;
+        }
+
+        if ($spaces !== 1) {
+            $error = 'Expected 1 space after FUNCTION keyword; %s found';
+            $data  = array($spaces);
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterFunction', $data);
+            if ($fix === true) {
+                if ($spaces === 0) {
+                    $phpcsFile->fixer->addContent($stackPtr, ' ');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                }
+            }
+        }
+
+        // Must be one space before the opening parenthesis. For closures, this is
+        // enforced by the first check because there is no content between the keywords
+        // and the opening parenthesis.
+        if ($tokens[$stackPtr]['code'] === T_FUNCTION) {
+            if ($tokens[($openBracket - 1)]['content'] === $phpcsFile->eolChar) {
+                $spaces = 'newline';
+            } else if ($tokens[($openBracket - 1)]['code'] === T_WHITESPACE) {
+                $spaces = strlen($tokens[($openBracket - 1)]['content']);
+            } else {
+                $spaces = 0;
+            }
+
+            if ($spaces !== 0) {
+                $error = 'Expected 0 spaces before opening parenthesis; %s found';
+                $data  = array($spaces);
+                $fix   = $phpcsFile->addFixableError($error, $openBracket, 'SpaceBeforeOpenParen', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($openBracket - 1), '');
+                }
+            }
+        }//end if
+
+        // Must be one space before and after USE keyword for closures.
+        if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+            $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']);
+            if ($use !== false) {
+                if ($tokens[($use + 1)]['code'] !== T_WHITESPACE) {
+                    $length = 0;
+                } else if ($tokens[($use + 1)]['content'] === "\t") {
+                    $length = '\t';
+                } else {
+                    $length = strlen($tokens[($use + 1)]['content']);
+                }
+
+                if ($length !== 1) {
+                    $error = 'Expected 1 space after USE keyword; found %s';
+                    $data  = array($length);
+                    $fix   = $phpcsFile->addFixableError($error, $use, 'SpaceAfterUse', $data);
+                    if ($fix === true) {
+                        if ($length === 0) {
+                            $phpcsFile->fixer->addContent($use, ' ');
+                        } else {
+                            $phpcsFile->fixer->replaceToken(($use + 1), ' ');
+                        }
+                    }
+                }
+
+                if ($tokens[($use - 1)]['code'] !== T_WHITESPACE) {
+                    $length = 0;
+                } else if ($tokens[($use - 1)]['content'] === "\t") {
+                    $length = '\t';
+                } else {
+                    $length = strlen($tokens[($use - 1)]['content']);
+                }
+
+                if ($length !== 1) {
+                    $error = 'Expected 1 space before USE keyword; found %s';
+                    $data  = array($length);
+                    $fix   = $phpcsFile->addFixableError($error, $use, 'SpaceBeforeUse', $data);
+                    if ($fix === true) {
+                        if ($length === 0) {
+                            $phpcsFile->fixer->addContentBefore($use, ' ');
+                        } else {
+                            $phpcsFile->fixer->replaceToken(($use - 1), ' ');
+                        }
+                    }
+                }
+            }//end if
+        }//end if
+
+        // Check if this is a single line or multi-line declaration.
+        $singleLine = true;
+        if ($tokens[$openBracket]['line'] === $tokens[$closeBracket]['line']) {
+            // Closures may use the USE keyword and so be multi-line in this way.
+            if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+                if ($use !== false) {
+                    // If the opening and closing parenthesis of the use statement
+                    // are also on the same line, this is a single line declaration.
+                    $open  = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1));
+                    $close = $tokens[$open]['parenthesis_closer'];
+                    if ($tokens[$open]['line'] !== $tokens[$close]['line']) {
+                        $singleLine = false;
+                    }
+                }
+            }
+        } else {
+            $singleLine = false;
+        }
+
+        if ($singleLine === true) {
+            $this->processSingleLineDeclaration($phpcsFile, $stackPtr, $tokens);
+        } else {
+            $this->processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens);
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes single-line declarations.
+     *
+     * Just uses the Generic BSD-Allman brace sniff.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     * @param array                $tokens    The stack of tokens that make up
+     *                                        the file.
+     *
+     * @return void
+     */
+    public function processSingleLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $tokens)
+    {
+        if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+            if (class_exists('Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff', true) === false) {
+                throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff not found');
+            }
+
+            $sniff = new Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff();
+        } else {
+            if (class_exists('Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff', true) === false) {
+                throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff not found');
+            }
+
+            $sniff = new Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff();
+        }
+
+        $sniff->checkClosures = true;
+        $sniff->process($phpcsFile, $stackPtr);
+
+    }//end processSingleLineDeclaration()
+
+
+    /**
+     * Processes multi-line declarations.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     * @param array                $tokens    The stack of tokens that make up
+     *                                        the file.
+     *
+     * @return void
+     */
+    public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $tokens)
+    {
+        // We need to work out how far indented the function
+        // declaration itself is, so we can work out how far to
+        // indent parameters.
+        $functionIndent = 0;
+        for ($i = ($stackPtr - 1); $i >= 0; $i--) {
+            if ($tokens[$i]['line'] !== $tokens[$stackPtr]['line']) {
+                $i++;
+                break;
+            }
+        }
+
+        if ($tokens[$i]['code'] === T_WHITESPACE) {
+            $functionIndent = strlen($tokens[$i]['content']);
+        }
+
+        // The closing parenthesis must be on a new line, even
+        // when checking abstract function definitions.
+        $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
+        $prev         = $phpcsFile->findPrevious(
+            T_WHITESPACE,
+            ($closeBracket - 1),
+            null,
+            true
+        );
+
+        if ($tokens[$closeBracket]['line'] !== $tokens[$tokens[$closeBracket]['parenthesis_opener']]['line']) {
+            if ($tokens[$prev]['line'] === $tokens[$closeBracket]['line']) {
+                $error = 'The closing parenthesis of a multi-line function declaration must be on a new line';
+                $fix   = $phpcsFile->addFixableError($error, $closeBracket, 'CloseBracketLine');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addNewlineBefore($closeBracket);
+                }
+            }
+        }
+
+        // If this is a closure and is using a USE statement, the closing
+        // parenthesis we need to look at from now on is the closing parenthesis
+        // of the USE statement.
+        if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+            $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']);
+            if ($use !== false) {
+                $open         = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1));
+                $closeBracket = $tokens[$open]['parenthesis_closer'];
+
+                $prev = $phpcsFile->findPrevious(
+                    T_WHITESPACE,
+                    ($closeBracket - 1),
+                    null,
+                    true
+                );
+
+                if ($tokens[$closeBracket]['line'] !== $tokens[$tokens[$closeBracket]['parenthesis_opener']]['line']) {
+                    if ($tokens[$prev]['line'] === $tokens[$closeBracket]['line']) {
+                        $error = 'The closing parenthesis of a multi-line use declaration must be on a new line';
+                        $fix   = $phpcsFile->addFixableError($error, $closeBracket, 'UseCloseBracketLine');
+                        if ($fix === true) {
+                            $phpcsFile->fixer->addNewlineBefore($closeBracket);
+                        }
+                    }
+                }
+            }//end if
+        }//end if
+
+        // Each line between the parenthesis should be indented 4 spaces.
+        $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
+        $lastLine    = $tokens[$openBracket]['line'];
+        for ($i = ($openBracket + 1); $i < $closeBracket; $i++) {
+            if ($tokens[$i]['line'] !== $lastLine) {
+                if ($i === $tokens[$stackPtr]['parenthesis_closer']
+                    || ($tokens[$i]['code'] === T_WHITESPACE
+                    && (($i + 1) === $closeBracket
+                    || ($i + 1) === $tokens[$stackPtr]['parenthesis_closer']))
+                ) {
+                    // Closing braces need to be indented to the same level
+                    // as the function.
+                    $expectedIndent = $functionIndent;
+                } else {
+                    $expectedIndent = ($functionIndent + $this->indent);
+                }
+
+                // We changed lines, so this should be a whitespace indent token.
+                if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                    $foundIndent = 0;
+                } else {
+                    $foundIndent = strlen($tokens[$i]['content']);
+                }
+
+                if ($expectedIndent !== $foundIndent) {
+                    $error = 'Multi-line function declaration not indented correctly; expected %s spaces but found %s';
+                    $data  = array(
+                              $expectedIndent,
+                              $foundIndent,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data);
+                    if ($fix === true) {
+                        $spaces = str_repeat(' ', $expectedIndent);
+                        if ($foundIndent === 0) {
+                            $phpcsFile->fixer->addContentBefore($i, $spaces);
+                        } else {
+                            $phpcsFile->fixer->replaceToken($i, $spaces);
+                        }
+                    }
+                }
+
+                $lastLine = $tokens[$i]['line'];
+            }//end if
+
+            if ($tokens[$i]['code'] === T_ARRAY || $tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) {
+                // Skip arrays as they have their own indentation rules.
+                if ($tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) {
+                    $i = $tokens[$i]['bracket_closer'];
+                } else {
+                    $i = $tokens[$i]['parenthesis_closer'];
+                }
+
+                $lastLine = $tokens[$i]['line'];
+                continue;
+            }
+        }//end for
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        // The opening brace needs to be one space away from the closing parenthesis.
+        $opener = $tokens[$stackPtr]['scope_opener'];
+        if ($tokens[$opener]['line'] !== $tokens[$closeBracket]['line']) {
+            $error = 'The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line';
+            $fix   = $phpcsFile->addFixableError($error, $opener, 'NewlineBeforeOpenBrace');
+            if ($fix === true) {
+                $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($opener - 1), $closeBracket, true);
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addContent($prev, ' {');
+                $phpcsFile->fixer->replaceToken($opener, '');
+                $phpcsFile->fixer->endChangeset();
+            }
+        } else {
+            $prev = $tokens[($opener - 1)];
+            if ($prev['code'] !== T_WHITESPACE) {
+                $length = 0;
+            } else {
+                $length = strlen($prev['content']);
+            }
+
+            if ($length !== 1) {
+                $error = 'There must be a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found %s spaces';
+                $fix   = $phpcsFile->addFixableError($error, ($opener - 1), 'SpaceBeforeOpenBrace', array($length));
+                if ($fix === true) {
+                    if ($length === 0) {
+                        $phpcsFile->fixer->addContentBefore($opener, ' ');
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($opener - 1), ' ');
+                    }
+                }
+
+                return;
+            }//end if
+        }//end if
+
+    }//end processMultiLineDeclaration()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php	(revision 5534)
@@ -0,0 +1,110 @@
+<?php
+/**
+ * PEAR_Sniffs_Functions_ValidDefaultValueSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_Functions_ValidDefaultValueSniff.
+ *
+ * A Sniff to ensure that parameters defined for a function that have a default
+ * value come at the end of the function signature.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_Functions_ValidDefaultValueSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $argStart = $tokens[$stackPtr]['parenthesis_opener'];
+        $argEnd   = $tokens[$stackPtr]['parenthesis_closer'];
+
+        // Flag for when we have found a default in our arg list.
+        // If there is a value without a default after this, it is an error.
+        $defaultFound = false;
+
+        $nextArg = $argStart;
+        while (($nextArg = $phpcsFile->findNext(T_VARIABLE, ($nextArg + 1), $argEnd)) !== false) {
+            if ($tokens[($nextArg - 1)]['code'] === T_ELLIPSIS) {
+                continue;
+            }
+
+            $argHasDefault = self::_argHasDefault($phpcsFile, $nextArg);
+            if ($argHasDefault === false && $defaultFound === true) {
+                $error = 'Arguments with default values must be at the end of the argument list';
+                $phpcsFile->addError($error, $nextArg, 'NotAtEnd');
+                return;
+            }
+
+            if ($argHasDefault === true) {
+                $defaultFound = true;
+            }
+        }
+
+    }//end process()
+
+
+    /**
+     * Returns true if the passed argument has a default value.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $argPtr    The position of the argument
+     *                                        in the stack.
+     *
+     * @return bool
+     */
+    private static function _argHasDefault(PHP_CodeSniffer_File $phpcsFile, $argPtr)
+    {
+        $tokens    = $phpcsFile->getTokens();
+        $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($argPtr + 1), null, true);
+        if ($tokens[$nextToken]['code'] !== T_EQUAL) {
+            return false;
+        }
+
+        return true;
+
+    }//end _argHasDefault()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php	(revision 5534)
@@ -0,0 +1,112 @@
+<?php
+/**
+ * PEAR_Sniffs_NamingConventions_ValidClassNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_NamingConventions_ValidClassNameSniff.
+ *
+ * Ensures class and interface names start with a capital letter
+ * and use _ separators.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_NamingConventions_ValidClassNameSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being processed.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $className = $phpcsFile->findNext(T_STRING, $stackPtr);
+        $name      = trim($tokens[$className]['content']);
+        $errorData = array(ucfirst($tokens[$stackPtr]['content']));
+
+        // Make sure the first letter is a capital.
+        if (preg_match('|^[A-Z]|', $name) === 0) {
+            $error = '%s name must begin with a capital letter';
+            $phpcsFile->addError($error, $stackPtr, 'StartWithCapital', $errorData);
+        }
+
+        // Check that each new word starts with a capital as well, but don't
+        // check the first word, as it is checked above.
+        $validName = true;
+        $nameBits  = explode('_', $name);
+        $firstBit  = array_shift($nameBits);
+        foreach ($nameBits as $bit) {
+            if ($bit === '' || $bit{0} !== strtoupper($bit{0})) {
+                $validName = false;
+                break;
+            }
+        }
+
+        if ($validName === false) {
+            // Strip underscores because they cause the suggested name
+            // to be incorrect.
+            $nameBits = explode('_', trim($name, '_'));
+            $firstBit = array_shift($nameBits);
+            if ($firstBit === '') {
+                $error = '%s name is not valid';
+                $phpcsFile->addError($error, $stackPtr, 'Invalid', $errorData);
+            } else {
+                $newName = strtoupper($firstBit{0}).substr($firstBit, 1).'_';
+                foreach ($nameBits as $bit) {
+                    if ($bit !== '') {
+                        $newName .= strtoupper($bit{0}).substr($bit, 1).'_';
+                    }
+                }
+
+                $newName = rtrim($newName, '_');
+                $error   = '%s name is not valid; consider %s instead';
+                $data    = $errorData;
+                $data[]  = $newName;
+                $phpcsFile->addError($error, $stackPtr, 'Invalid', $data);
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php	(revision 5534)
@@ -0,0 +1,298 @@
+<?php
+/**
+ * PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found');
+}
+
+/**
+ * PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff.
+ *
+ * Ensures method names are correct depending on whether they are public
+ * or private, and that functions are named correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+    /**
+     * A list of all PHP magic methods.
+     *
+     * @var array
+     */
+    protected $magicMethods = array(
+                               'construct'  => true,
+                               'destruct'   => true,
+                               'call'       => true,
+                               'callstatic' => true,
+                               'get'        => true,
+                               'set'        => true,
+                               'isset'      => true,
+                               'unset'      => true,
+                               'sleep'      => true,
+                               'wakeup'     => true,
+                               'tostring'   => true,
+                               'set_state'  => true,
+                               'clone'      => true,
+                               'invoke'     => true,
+                               'debuginfo'  => true,
+                              );
+
+    /**
+     * A list of all PHP magic functions.
+     *
+     * @var array
+     */
+    protected $magicFunctions = array('autoload' => true);
+
+
+    /**
+     * Constructs a PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS, T_INTERFACE, T_TRAIT), array(T_FUNCTION), true);
+
+    }//end __construct()
+
+
+    /**
+     * Processes the tokens within the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     * @param int                  $currScope The position of the current scope.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($methodName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        $className = $phpcsFile->getDeclarationName($currScope);
+        $errorData = array($className.'::'.$methodName);
+
+        // Is this a magic method. i.e., is prefixed with "__" ?
+        if (preg_match('|^__|', $methodName) !== 0) {
+            $magicPart = strtolower(substr($methodName, 2));
+            if (isset($this->magicMethods[$magicPart]) === false) {
+                 $error = 'Method name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
+                 $phpcsFile->addError($error, $stackPtr, 'MethodDoubleUnderscore', $errorData);
+            }
+
+            return;
+        }
+
+        // PHP4 constructors are allowed to break our rules.
+        if ($methodName === $className) {
+            return;
+        }
+
+        // PHP4 destructors are allowed to break our rules.
+        if ($methodName === '_'.$className) {
+            return;
+        }
+
+        $methodProps    = $phpcsFile->getMethodProperties($stackPtr);
+        $scope          = $methodProps['scope'];
+        $scopeSpecified = $methodProps['scope_specified'];
+
+        if ($methodProps['scope'] === 'private') {
+            $isPublic = false;
+        } else {
+            $isPublic = true;
+        }
+
+        // If it's a private method, it must have an underscore on the front.
+        if ($isPublic === false) {
+            if ($methodName{0} !== '_') {
+                $error = 'Private method name "%s" must be prefixed with an underscore';
+                $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $errorData);
+                $phpcsFile->recordMetric($stackPtr, 'Private method prefixed with underscore', 'no');
+                return;
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Private method prefixed with underscore', 'yes');
+            }
+        }
+
+        // If it's not a private method, it must not have an underscore on the front.
+        if ($isPublic === true && $scopeSpecified === true && $methodName{0} === '_') {
+            $error = '%s method name "%s" must not be prefixed with an underscore';
+            $data  = array(
+                      ucfirst($scope),
+                      $errorData[0],
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data);
+            return;
+        }
+
+        // If the scope was specified on the method, then the method must be
+        // camel caps and an underscore should be checked for. If it wasn't
+        // specified, treat it like a public method and remove the underscore
+        // prefix if there is one because we cant determine if it is private or
+        // public.
+        $testMethodName = $methodName;
+        if ($scopeSpecified === false && $methodName{0} === '_') {
+            $testMethodName = substr($methodName, 1);
+        }
+
+        if (PHP_CodeSniffer::isCamelCaps($testMethodName, false, $isPublic, false) === false) {
+            if ($scopeSpecified === true) {
+                $error = '%s method name "%s" is not in camel caps format';
+                $data  = array(
+                          ucfirst($scope),
+                          $errorData[0],
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data);
+            } else {
+                $error = 'Method name "%s" is not in camel caps format';
+                $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
+            }
+
+            return;
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Processes the tokens outside the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     *
+     * @return void
+     */
+    protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $functionName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($functionName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        if (ltrim($functionName, '_') === '') {
+            // Ignore special functions.
+            return;
+        }
+
+        $errorData = array($functionName);
+
+        // Is this a magic function. i.e., it is prefixed with "__".
+        if (preg_match('|^__|', $functionName) !== 0) {
+            $magicPart = strtolower(substr($functionName, 2));
+            if (isset($this->magicFunctions[$magicPart]) === false) {
+                 $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
+                 $phpcsFile->addError($error, $stackPtr, 'FunctionDoubleUnderscore', $errorData);
+            }
+
+            return;
+        }
+
+        // Function names can be in two parts; the package name and
+        // the function name.
+        $packagePart   = '';
+        $camelCapsPart = '';
+        $underscorePos = strrpos($functionName, '_');
+        if ($underscorePos === false) {
+            $camelCapsPart = $functionName;
+        } else {
+            $packagePart   = substr($functionName, 0, $underscorePos);
+            $camelCapsPart = substr($functionName, ($underscorePos + 1));
+
+            // We don't care about _'s on the front.
+            $packagePart = ltrim($packagePart, '_');
+        }
+
+        // If it has a package part, make sure the first letter is a capital.
+        if ($packagePart !== '') {
+            if ($functionName{0} === '_') {
+                $error = 'Function name "%s" is invalid; only private methods should be prefixed with an underscore';
+                $phpcsFile->addError($error, $stackPtr, 'FunctionUnderscore', $errorData);
+                return;
+            }
+
+            if ($functionName{0} !== strtoupper($functionName{0})) {
+                $error = 'Function name "%s" is prefixed with a package name but does not begin with a capital letter';
+                $phpcsFile->addError($error, $stackPtr, 'FunctionNoCapital', $errorData);
+                return;
+            }
+        }
+
+        // If it doesn't have a camel caps part, it's not valid.
+        if (trim($camelCapsPart) === '') {
+            $error = 'Function name "%s" is not valid; name appears incomplete';
+            $phpcsFile->addError($error, $stackPtr, 'FunctionInvalid', $errorData);
+            return;
+        }
+
+        $validName        = true;
+        $newPackagePart   = $packagePart;
+        $newCamelCapsPart = $camelCapsPart;
+
+        // Every function must have a camel caps part, so check that first.
+        if (PHP_CodeSniffer::isCamelCaps($camelCapsPart, false, true, false) === false) {
+            $validName        = false;
+            $newCamelCapsPart = strtolower($camelCapsPart{0}).substr($camelCapsPart, 1);
+        }
+
+        if ($packagePart !== '') {
+            // Check that each new word starts with a capital.
+            $nameBits = explode('_', $packagePart);
+            foreach ($nameBits as $bit) {
+                if ($bit{0} !== strtoupper($bit{0})) {
+                    $newPackagePart = '';
+                    foreach ($nameBits as $bit) {
+                        $newPackagePart .= strtoupper($bit{0}).substr($bit, 1).'_';
+                    }
+
+                    $validName = false;
+                    break;
+                }
+            }
+        }
+
+        if ($validName === false) {
+            $newName = rtrim($newPackagePart, '_').'_'.$newCamelCapsPart;
+            if ($newPackagePart === '') {
+                $newName = $newCamelCapsPart;
+            } else {
+                $newName = rtrim($newPackagePart, '_').'_'.$newCamelCapsPart;
+            }
+
+            $error  = 'Function name "%s" is invalid; consider "%s" instead';
+            $data   = $errorData;
+            $data[] = $newName;
+            $phpcsFile->addError($error, $stackPtr, 'FunctionNameInvalid', $data);
+        }
+
+    }//end processTokenOutsideScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php	(revision 5534)
@@ -0,0 +1,121 @@
+<?php
+/**
+ * PEAR_Sniffs_NamingConventions_ValidVariableNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * PEAR_Sniffs_NamingConventions_ValidVariableNameSniff.
+ *
+ * Checks the naming of member variables.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_NamingConventions_ValidVariableNameSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+
+    /**
+     * Processes class member variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $memberProps = $phpcsFile->getMemberProperties($stackPtr);
+        if (empty($memberProps) === true) {
+            return;
+        }
+
+        $memberName     = ltrim($tokens[$stackPtr]['content'], '$');
+        $scope          = $memberProps['scope'];
+        $scopeSpecified = $memberProps['scope_specified'];
+
+        if ($memberProps['scope'] === 'private') {
+            $isPublic = false;
+        } else {
+            $isPublic = true;
+        }
+
+        // If it's a private member, it must have an underscore on the front.
+        if ($isPublic === false && $memberName{0} !== '_') {
+            $error = 'Private member variable "%s" must be prefixed with an underscore';
+            $data  = array($memberName);
+            $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data);
+            return;
+        }
+
+        // If it's not a private member, it must not have an underscore on the front.
+        if ($isPublic === true && $scopeSpecified === true && $memberName{0} === '_') {
+            $error = '%s member variable "%s" must not be prefixed with an underscore';
+            $data  = array(
+                      ucfirst($scope),
+                      $memberName,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data);
+            return;
+        }
+
+    }//end processMemberVar()
+
+
+    /**
+     * Processes normal variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariable()
+
+
+    /**
+     * Processes variables in double quoted strings.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php	(revision 5534)
@@ -0,0 +1,193 @@
+<?php
+/**
+ * PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff.
+ *
+ * Checks that object operators are indented 4 spaces if they are the first
+ * thing on a line.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OBJECT_OPERATOR);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Make sure this is the first object operator in a chain of them.
+        $varToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($varToken === false || $tokens[$varToken]['code'] !== T_VARIABLE) {
+            return;
+        }
+
+        // Make sure this is a chained call.
+        $next = $phpcsFile->findNext(
+            T_OBJECT_OPERATOR,
+            ($stackPtr + 1),
+            null,
+            false,
+            null,
+            true
+        );
+
+        if ($next === false) {
+            // Not a chained call.
+            return;
+        }
+
+        // Determine correct indent.
+        for ($i = ($varToken - 1); $i >= 0; $i--) {
+            if ($tokens[$i]['line'] !== $tokens[$varToken]['line']) {
+                $i++;
+                break;
+            }
+        }
+
+        $requiredIndent = 0;
+        if ($i >= 0 && $tokens[$i]['code'] === T_WHITESPACE) {
+            $requiredIndent = strlen($tokens[$i]['content']);
+        }
+
+        $requiredIndent += $this->indent;
+
+        // Determine the scope of the original object operator.
+        $origBrackets = null;
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            $origBrackets = $tokens[$stackPtr]['nested_parenthesis'];
+        }
+
+        $origConditions = null;
+        if (isset($tokens[$stackPtr]['conditions']) === true) {
+            $origConditions = $tokens[$stackPtr]['conditions'];
+        }
+
+        // Check indentation of each object operator in the chain.
+        // If the first object operator is on a different line than
+        // the variable, make sure we check its indentation too.
+        if ($tokens[$stackPtr]['line'] > $tokens[$varToken]['line']) {
+            $next = $stackPtr;
+        }
+
+        while ($next !== false) {
+            // Make sure it is in the same scope, otherwise don't check indent.
+            $brackets = null;
+            if (isset($tokens[$next]['nested_parenthesis']) === true) {
+                $brackets = $tokens[$next]['nested_parenthesis'];
+            }
+
+            $conditions = null;
+            if (isset($tokens[$next]['conditions']) === true) {
+                $conditions = $tokens[$next]['conditions'];
+            }
+
+            if ($origBrackets === $brackets && $origConditions === $conditions) {
+                // Make sure it starts a line, otherwise dont check indent.
+                $prev   = $phpcsFile->findPrevious(T_WHITESPACE, ($next - 1), $stackPtr, true);
+                $indent = $tokens[($next - 1)];
+                if ($tokens[$prev]['line'] !== $tokens[$next]['line']
+                    && $indent['code'] === T_WHITESPACE
+                ) {
+                    if ($indent['line'] === $tokens[$next]['line']) {
+                        $foundIndent = strlen($indent['content']);
+                    } else {
+                        $foundIndent = 0;
+                    }
+
+                    if ($foundIndent !== $requiredIndent) {
+                        $error = 'Object operator not indented correctly; expected %s spaces but found %s';
+                        $data  = array(
+                                  $requiredIndent,
+                                  $foundIndent,
+                                 );
+
+                        $fix = $phpcsFile->addFixableError($error, $next, 'Incorrect', $data);
+                        if ($fix === true) {
+                            $spaces = str_repeat(' ', $requiredIndent);
+                            if ($foundIndent === 0) {
+                                $phpcsFile->fixer->addContentBefore($next, $spaces);
+                            } else {
+                                $phpcsFile->fixer->replaceToken(($next - 1), $spaces);
+                            }
+                        }
+                    }
+                }//end if
+
+                // It cant be the last thing on the line either.
+                $content = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true);
+                if ($tokens[$content]['line'] !== $tokens[$next]['line']) {
+                    $error = 'Object operator must be at the start of the line, not the end';
+                    $fix   = $phpcsFile->addFixableError($error, $next, 'StartOfLine');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($x = ($next + 1); $x < $content; $x++) {
+                            $phpcsFile->fixer->replaceToken($x, '');
+                        }
+
+                        $phpcsFile->fixer->addNewlineBefore($next);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }
+            }//end if
+
+            $next = $phpcsFile->findNext(
+                T_OBJECT_OPERATOR,
+                ($next + 1),
+                null,
+                false,
+                null,
+                true
+            );
+        }//end while
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php	(revision 5534)
@@ -0,0 +1,193 @@
+<?php
+/**
+ * PEAR_Sniffs_Whitespace_ScopeClosingBraceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PEAR_Sniffs_Whitespace_ScopeClosingBraceSniff.
+ *
+ * Checks that the closing braces of scopes are aligned correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$scopeOpeners;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // If this is an inline condition (ie. there is no scope opener), then
+        // return, as this is not a new scope.
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            return;
+        }
+
+        $scopeStart = $tokens[$stackPtr]['scope_opener'];
+        $scopeEnd   = $tokens[$stackPtr]['scope_closer'];
+
+        // If the scope closer doesn't think it belongs to this scope opener
+        // then the opener is sharing its closer with other tokens. We only
+        // want to process the closer once, so skip this one.
+        if (isset($tokens[$scopeEnd]['scope_condition']) === false
+            || $tokens[$scopeEnd]['scope_condition'] !== $stackPtr
+        ) {
+            return;
+        }
+
+        // We need to actually find the first piece of content on this line,
+        // because if this is a method with tokens before it (public, static etc)
+        // or an if with an else before it, then we need to start the scope
+        // checking from there, rather than the current token.
+        $lineStart = ($stackPtr - 1);
+        for ($lineStart; $lineStart > 0; $lineStart--) {
+            if (strpos($tokens[$lineStart]['content'], $phpcsFile->eolChar) !== false) {
+                break;
+            }
+        }
+
+        $lineStart++;
+
+        $startColumn = 1;
+        if ($tokens[$lineStart]['code'] === T_WHITESPACE) {
+            $startColumn = $tokens[($lineStart + 1)]['column'];
+        } else if ($tokens[$lineStart]['code'] === T_INLINE_HTML) {
+            $trimmed = ltrim($tokens[$lineStart]['content']);
+            if ($trimmed === '') {
+                $startColumn = $tokens[($lineStart + 1)]['column'];
+            } else {
+                $startColumn = (strlen($tokens[$lineStart]['content']) - strlen($trimmed));
+            }
+        }
+
+        // Check that the closing brace is on it's own line.
+        $lastContent = $phpcsFile->findPrevious(
+            array(
+             T_WHITESPACE,
+             T_INLINE_HTML,
+             T_OPEN_TAG,
+            ),
+            ($scopeEnd - 1),
+            $scopeStart,
+            true
+        );
+
+        if ($tokens[$lastContent]['line'] === $tokens[$scopeEnd]['line']) {
+            $error = 'Closing brace must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $scopeEnd, 'Line');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewlineBefore($scopeEnd);
+            }
+
+            return;
+        }
+
+        // Check now that the closing brace is lined up correctly.
+        $lineStart = ($scopeEnd - 1);
+        for ($lineStart; $lineStart > 0; $lineStart--) {
+            if (strpos($tokens[$lineStart]['content'], $phpcsFile->eolChar) !== false) {
+                break;
+            }
+        }
+
+        $lineStart++;
+
+        $braceIndent = 0;
+        if ($tokens[$lineStart]['code'] === T_WHITESPACE) {
+            $braceIndent = ($tokens[($lineStart + 1)]['column'] - 1);
+        } else if ($tokens[$lineStart]['code'] === T_INLINE_HTML) {
+            $trimmed = ltrim($tokens[$lineStart]['content']);
+            if ($trimmed === '') {
+                $braceIndent = ($tokens[($lineStart + 1)]['column'] - 1);
+            } else {
+                $braceIndent = (strlen($tokens[$lineStart]['content']) - strlen($trimmed) - 1);
+            }
+        }
+
+        $fix = false;
+        if ($tokens[$stackPtr]['code'] === T_CASE
+            || $tokens[$stackPtr]['code'] === T_DEFAULT
+        ) {
+            // BREAK statements should be indented n spaces from the
+            // CASE or DEFAULT statement.
+            $expectedIndent = ($startColumn + $this->indent - 1);
+            if ($braceIndent !== $expectedIndent) {
+                $error = 'Case breaking statement indented incorrectly; expected %s spaces, found %s';
+                $data  = array(
+                          $expectedIndent,
+                          $braceIndent,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $scopeEnd, 'BreakIndent', $data);
+            }
+        } else {
+            $expectedIndent = ($startColumn - 1);
+            if ($braceIndent !== $expectedIndent) {
+                $error = 'Closing brace indented incorrectly; expected %s spaces, found %s';
+                $data  = array(
+                          $expectedIndent,
+                          $braceIndent,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data);
+            }
+        }//end if
+
+        if ($fix === true && $phpcsFile->fixer->enabled === true) {
+            $spaces = str_repeat(' ', $expectedIndent);
+            if ($braceIndent === 0) {
+                $phpcsFile->fixer->addContentBefore($lineStart, $spaces);
+            } else {
+                $phpcsFile->fixer->replaceToken($lineStart, ltrim($tokens[$lineStart]['content']));
+                $phpcsFile->fixer->addContentBefore($lineStart, $spaces);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php	(revision 5534)
@@ -0,0 +1,46 @@
+<?php
+/**
+ * PEAR_Sniffs_Whitespace_ScopeIndentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('Generic_Sniffs_WhiteSpace_ScopeIndentSniff', true) === false) {
+    $error = 'Class Generic_Sniffs_WhiteSpace_ScopeIndentSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * PEAR_Sniffs_Whitespace_ScopeIndentSniff.
+ *
+ * Checks that control structures are structured correctly, and their content
+ * is indented correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PEAR_Sniffs_WhiteSpace_ScopeIndentSniff extends Generic_Sniffs_WhiteSpace_ScopeIndentSniff
+{
+
+    /**
+     * Any scope openers that should not cause an indent.
+     *
+     * @var array(int)
+     */
+    protected $nonIndentingScopes = array(T_SWITCH);
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/ruleset.xml	(revision 5534)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<ruleset name="PEAR">
+ <description>The PEAR coding standard.</description>
+
+ <!-- Include some additional sniffs from the Generic standard -->
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
+ <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
+ <rule ref="Generic.PHP.LowerCaseConstant"/>
+ <rule ref="Generic.PHP.DisallowShortOpenTag"/>
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
+ <rule ref="Generic.Commenting.DocComment"/>
+
+ <!-- Lines can be 85 chars long, but never show errors -->
+ <rule ref="Generic.Files.LineLength">
+  <properties>
+   <property name="lineLimit" value="85"/>
+   <property name="absoluteLineLimit" value="0"/>
+  </properties>
+ </rule>
+
+ <!-- Use Unix newlines -->
+ <rule ref="Generic.Files.LineEndings">
+  <properties>
+   <property name="eolChar" value="\n"/>
+  </properties>
+ </rule>
+
+ <!-- This message is not required as spaces are allowed for alignment -->
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">
+  <severity>0</severity>
+ </rule>
+
+ <!-- Use warnings for inline control structures -->
+ <rule ref="Generic.ControlStructures.InlineControlStructure">
+  <properties>
+   <property name="error" value="false"/>
+  </properties>
+ </rule>
+
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCS/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCS/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCS/ruleset.xml	(revision 5534)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<ruleset name="PHP_CodeSniffer">
+ <description>The coding standard for PHP_CodeSniffer itself.</description>
+ <exclude-pattern>*/Tests/*</exclude-pattern>
+
+ <!-- Include the whole PEAR standard -->
+ <rule ref="PEAR"/>
+
+ <!-- Include some sniffs from other standards that don't conflict with PEAR -->
+ <rule ref="Squiz.Arrays.ArrayBracketSpacing" />
+ <rule ref="Squiz.Arrays.ArrayDeclaration" />
+ <rule ref="Squiz.Commenting.ClosingDeclarationComment" />
+ <rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
+ <rule ref="Squiz.Commenting.BlockComment" />
+ <rule ref="Squiz.Commenting.DocCommentAlignment" />
+ <rule ref="Squiz.Commenting.EmptyCatchComment" />
+ <rule ref="Squiz.Commenting.InlineComment" />
+ <rule ref="Squiz.Commenting.LongConditionClosingComment" />
+ <rule ref="Squiz.Commenting.PostStatementComment" />
+ <rule ref="Squiz.Formatting.OperatorBracket" />
+ <rule ref="Squiz.Operators.ComparisonOperatorUsage" />
+ <rule ref="Squiz.PHP.DisallowInlineIf" />
+ <rule ref="Squiz.Strings.ConcatenationSpacing" />
+ <rule ref="Squiz.WhiteSpace.ControlStructureSpacing" />
+ <rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace" />
+ <rule ref="Squiz.WhiteSpace.FunctionSpacing" />
+ <rule ref="Squiz.WhiteSpace.OperatorSpacing" />
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
+ <rule ref="Generic.Commenting.Todo"/>
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
+ <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
+ <rule ref="Generic.Formatting.SpaceAfterCast"/>
+ <rule ref="Generic.NamingConventions.ConstructorName"/>
+ <rule ref="Generic.PHP.DeprecatedFunctions"/>
+ <rule ref="Generic.PHP.LowerCaseKeyword"/>
+ <rule ref="Generic.Strings.UnnecessaryStringConcat"/>
+ <rule ref="PSR2.Files.EndFileNewline"/>
+ <rule ref="Zend.Files.ClosingTag"/>
+
+ <!-- Only one argument per line in multi-line function calls -->
+ <rule ref="PEAR.Functions.FunctionCallSignature">
+  <properties>
+   <property name="allowMultipleArguments" value="false"/>
+  </properties>
+ </rule>
+
+ <!-- Have 12 chars padding maximum and always show as errors -->
+ <rule ref="Generic.Formatting.MultipleStatementAlignment">
+  <properties>
+   <property name="maxPadding" value="12"/>
+   <property name="error" value="true"/>
+  </properties>
+ </rule>
+
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,48 @@
+<documentation title="Class Declaration">
+    <standard>
+    <![CDATA[
+    Each class must be in a file by itself and must be under a namespace (a top-level vendor name).
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: One class in a file.">
+        <![CDATA[
+<?php
+namespace Foo;
+
+<em>class Bar</em> {
+}
+        ]]>
+        </code>
+        <code title="Invalid: Multiple classes in a single file.">
+        <![CDATA[
+<?php
+namespace Foo;
+
+<em>class Bar</em> {
+}
+
+<em>class Baz</em> {
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: A vendor-level namespace is used.">
+        <![CDATA[
+<?php
+<em>namespace Foo;</em>
+
+class Bar {
+}
+        ]]>
+        </code>
+        <code title="Invalid: No namespace used in file.">
+        <![CDATA[
+<?php
+class Bar {
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Docs/Files/SideEffectsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Docs/Files/SideEffectsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Docs/Files/SideEffectsStandard.xml	(revision 5534)
@@ -0,0 +1,27 @@
+<documentation title="Side Effects">
+    <standard>
+    <![CDATA[
+    A php file should either contain declarations with no side effects, or should just have logic (including side effects) with no declarations.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A class defined in a file by itself.">
+        <![CDATA[
+<?php
+class Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: A class defined in a file with other code.">
+        <![CDATA[
+<?php
+class Foo
+{
+}
+
+<em>echo "Class Foo loaded."</em>
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Class Declaration Test.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Class Declaration Test.
+ *
+ * Checks the declaration of the class is correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR1_Sniffs_Classes_ClassDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+                T_TRAIT,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param integer              $stackPtr  The position of the current token in
+     *                                        the token stack.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            return;
+        }
+
+        $errorData = array(strtolower($tokens[$stackPtr]['content']));
+
+        $nextClass = $phpcsFile->findNext(array(T_CLASS, T_INTERFACE, T_TRAIT), ($tokens[$stackPtr]['scope_closer'] + 1));
+        if ($nextClass !== false) {
+            $error = 'Each %s must be in a file by itself';
+            $phpcsFile->addError($error, $nextClass, 'MultipleClasses', $errorData);
+            $phpcsFile->recordMetric($stackPtr, 'One class per file', 'no');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'One class per file', 'yes');
+        }
+
+        if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
+            $namespace = $phpcsFile->findNext(array(T_NAMESPACE, T_CLASS, T_INTERFACE, T_TRAIT), 0);
+            if ($tokens[$namespace]['code'] !== T_NAMESPACE) {
+                $error = 'Each %s must be in a namespace of at least one level (a top-level vendor name)';
+                $phpcsFile->addError($error, $stackPtr, 'MissingNamespace', $errorData);
+                $phpcsFile->recordMetric($stackPtr, 'Class defined in namespace', 'no');
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Class defined in namespace', 'yes');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php	(revision 5534)
@@ -0,0 +1,227 @@
+<?php
+/**
+ * PSR1_Sniffs_Files_SideEffectsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR1_Sniffs_Files_SideEffectsSniff.
+ *
+ * Ensures a file declare new symbols and causes no other side effects, or executes
+ * logic with side effects, but not both.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR1_Sniffs_Files_SideEffectsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the token stack.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $result = $this->_searchForConflict($phpcsFile, 0, ($phpcsFile->numTokens - 1), $tokens);
+
+        if ($result['symbol'] !== null && $result['effect'] !== null) {
+            $error = 'A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line %s and the first side effect is on line %s.';
+            $data  = array(
+                      $tokens[$result['symbol']]['line'],
+                      $tokens[$result['effect']]['line'],
+                     );
+            $phpcsFile->addWarning($error, 0, 'FoundWithSymbols', $data);
+            $phpcsFile->recordMetric($stackPtr, 'Declarations and side effects mixed', 'yes');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Declarations and side effects mixed', 'no');
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+    /**
+     * Searches for symbol declarations and side effects.
+     *
+     * Returns the positions of both the first symbol declared and the first
+     * side effect in the file. A NULL value for either indicates nothing was
+     * found.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $start     The token to start searching from.
+     * @param int                  $end       The token to search to.
+     * @param array                $tokens    The stack of tokens that make up
+     *                                        the file.
+     *
+     * @return array
+     */
+    private function _searchForConflict(PHP_CodeSniffer_File $phpcsFile, $start, $end, $tokens)
+    {
+        $symbols = array(
+                    T_CLASS     => T_CLASS,
+                    T_INTERFACE => T_INTERFACE,
+                    T_TRAIT     => T_TRAIT,
+                    T_FUNCTION  => T_FUNCTION,
+                   );
+
+        $conditions = array(
+                       T_IF     => T_IF,
+                       T_ELSE   => T_ELSE,
+                       T_ELSEIF => T_ELSEIF,
+                      );
+
+        $firstSymbol = null;
+        $firstEffect = null;
+        for ($i = $start; $i <= $end; $i++) {
+            // Ignore whitespace and comments.
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === true) {
+                continue;
+            }
+
+            // Ignore PHP tags.
+            if ($tokens[$i]['code'] === T_OPEN_TAG
+                || $tokens[$i]['code'] === T_CLOSE_TAG
+            ) {
+                continue;
+            }
+
+            // Ignore entire namespace, declare, const and use statements.
+            if ($tokens[$i]['code'] === T_NAMESPACE
+                || $tokens[$i]['code'] === T_USE
+                || $tokens[$i]['code'] === T_DECLARE
+                || $tokens[$i]['code'] === T_CONST
+            ) {
+                if (isset($tokens[$i]['scope_opener']) === true) {
+                    $i = $tokens[$i]['scope_closer'];
+                } else {
+                    $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($i + 1));
+                    if ($semicolon !== false) {
+                        $i = $semicolon;
+                    }
+                }
+
+                continue;
+            }
+
+            // Ignore function/class prefixes.
+            if (isset(PHP_CodeSniffer_Tokens::$methodPrefixes[$tokens[$i]['code']]) === true) {
+                continue;
+            }
+
+            // Detect and skip over symbols.
+            if (isset($symbols[$tokens[$i]['code']]) === true
+                && isset($tokens[$i]['scope_closer']) === true
+            ) {
+                if ($firstSymbol === null) {
+                    $firstSymbol = $i;
+                }
+
+                $i = $tokens[$i]['scope_closer'];
+                continue;
+            } else if ($tokens[$i]['code'] === T_STRING
+                && strtolower($tokens[$i]['content']) === 'define'
+            ) {
+                $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), null, true);
+                if ($tokens[$prev]['code'] !== T_OBJECT_OPERATOR) {
+                    if ($firstSymbol === null) {
+                        $firstSymbol = $i;
+                    }
+
+                    $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($i + 1));
+                    if ($semicolon !== false) {
+                        $i = $semicolon;
+                    }
+
+                    continue;
+                }
+            }//end if
+
+            // Conditional statements are allowed in symbol files as long as the
+            // contents is only a symbol definition. So don't count these as effects
+            // in this case.
+            if (isset($conditions[$tokens[$i]['code']]) === true) {
+                if (isset($tokens[$i]['scope_opener']) === false) {
+                    // Probably an "else if", so just ignore.
+                    continue;
+                }
+
+                $result = $this->_searchForConflict(
+                    $phpcsFile,
+                    ($tokens[$i]['scope_opener'] + 1),
+                    ($tokens[$i]['scope_closer'] - 1),
+                    $tokens
+                );
+
+                if ($result['symbol'] !== null) {
+                    if ($firstSymbol === null) {
+                        $firstSymbol = $result['symbol'];
+                    }
+
+                    if ($result['effect'] !== null) {
+                        // Found a conflict.
+                        $firstEffect = $result['effect'];
+                        break;
+                    }
+                }
+
+                if ($firstEffect === null) {
+                    $firstEffect = $result['effect'];
+                }
+
+                $i = $tokens[$i]['scope_closer'];
+                continue;
+            }//end if
+
+            if ($firstEffect === null) {
+                $firstEffect = $i;
+            }
+
+            if ($firstSymbol !== null) {
+                // We have a conflict we have to report, so no point continuing.
+                break;
+            }
+        }//end for
+
+        return array(
+                'symbol' => $firstSymbol,
+                'effect' => $firstEffect,
+               );
+
+    }//end _searchForConflict()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php	(revision 5534)
@@ -0,0 +1,93 @@
+<?php
+/**
+ * PSR1_Sniffs_Methods_CamelCapsMethodNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff not found');
+}
+
+/**
+ * PSR1_Sniffs_Methods_CamelCapsMethodNameSniff.
+ *
+ * Ensures method names are defined using camel case.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR1_Sniffs_Methods_CamelCapsMethodNameSniff extends Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff
+{
+
+
+    /**
+     * Processes the tokens within the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     * @param int                  $currScope The position of the current scope.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($methodName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        // Ignore magic methods.
+        if (preg_match('|^__|', $methodName) !== 0) {
+            $magicPart = strtolower(substr($methodName, 2));
+            if (isset($this->magicMethods[$magicPart]) === true
+                || isset($this->methodsDoubleUnderscore[$magicPart]) === true
+            ) {
+                return;
+            }
+        }
+
+        $testName = ltrim($methodName, '_');
+        if ($testName !== '' && PHP_CodeSniffer::isCamelCaps($testName, false, true, false) === false) {
+            $error     = 'Method name "%s" is not in camel caps format';
+            $className = $phpcsFile->getDeclarationName($currScope);
+            $errorData = array($className.'::'.$methodName);
+            $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'no');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes');
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Processes the tokens outside the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     *
+     * @return void
+     */
+    protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+
+    }//end processTokenOutsideScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR1/ruleset.xml	(revision 5534)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<ruleset name="PSR1">
+ <description>The PSR1 coding standard.</description>
+
+ <!-- 2. Files -->
+
+ <!-- 2.1. PHP Tags -->
+
+ <!-- PHP code MUST use the long <?php ?> tags or the short-echo <?= ?> tags; it MUST NOT use the other tag variations. -->
+ <rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound">
+  <severity>0</severity>
+ </rule>
+
+ <!-- 2.2. Character Encoding -->
+
+ <!-- PHP code MUST use only UTF-8 without BOM. -->
+ <rule ref="Generic.Files.ByteOrderMark"/>
+
+ <!-- 2.3. Side Effects -->
+
+ <!-- A file SHOULD declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it SHOULD execute logic with side effects, but SHOULD NOT do both. -->
+ <!-- checked in Files/SideEffectsSniff -->
+
+ <!-- 3. Namespace and Class Names -->
+
+ <!-- Namespaces and classes MUST follow PSR-0.
+      This means each class is in a file by itself, and is in a namespace of at least one level: a top-level vendor name. -->
+ <!-- checked in Classes/ClassDeclarationSniff -->
+
+ <!-- Class names MUST be declared in StudlyCaps. -->
+ <rule ref="Squiz.Classes.ValidClassName"/>
+
+ <!-- 4. Class Constants, Properties, and Methods -->
+
+ <!-- 4.1. Constants -->
+
+ <!-- Class constants MUST be declared in all upper case with underscore separators. -->
+ <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
+
+ <!-- 4.3. Methods -->
+
+ <!-- Method names MUST be declared in camelCase(). -->
+ <!-- checked in Methods/CamelCapsMethodNameSniff -->
+
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Class Declarations">
+    <standard>
+    <![CDATA[
+    There should be exactly 1 space between the abstract or final keyword and the class keyword and between the class keyword and the class name.  The extends and implements keywords, if present, must be on the same line as the class name.  When interfaces implemented are spread over multiple lines, there should be exactly 1 interface mentioned per line indented by 1 level.  The closing brace of the class must go on the first line after the body of the class and must be on a line by itself.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct spacing around class keyword.">
+        <![CDATA[
+abstract<em> </em>class<em> </em>Foo
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: 2 spaces used around class keyword.">
+        <![CDATA[
+abstract<em>  </em>class<em>  </em>Foo
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,62 @@
+<documentation title="Property Declarations">
+    <standard>
+    <![CDATA[
+    Property names should not be prefixed with an underscore to indicate visibility.  Visibility should be used to declare properties rather than the var keyword.  Only one property should be declared within a statement.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct property naming.">
+        <![CDATA[
+class Foo
+{
+    private $<em>bar</em>;
+}
+        ]]>
+        </code>
+        <code title="Invalid: An underscore prefix used to indicate visibility.">
+        <![CDATA[
+class Foo
+{
+    private $<em>_bar</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Visibility of property declared.">
+        <![CDATA[
+class Foo
+{
+    <em>private</em> $bar;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Var keyword used to declare property.">
+        <![CDATA[
+class Foo
+{
+    <em>var</em> $bar;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: One property declared per statement.">
+        <![CDATA[
+class Foo
+{
+    private $bar;
+    private $baz;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Multiple properties declared in one statement.">
+        <![CDATA[
+class Foo
+{
+    private <em>$bar, $baz</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Control Structure Spacing">
+    <standard>
+    <![CDATA[
+    Control Structures should have 0 spaces after opening parentheses and 0 spaces before closing parentheses.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct spacing.">
+        <![CDATA[
+if (<em></em>$foo<em></em>) {
+    $var = 1;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Whitespace used inside the parentheses.">
+        <![CDATA[
+if (<em> </em>$foo<em> </em>) {
+    $var = 1;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,27 @@
+<documentation title="Elseif Declarations">
+    <standard>
+    <![CDATA[
+    PHP's elseif keyword should be used instead of else if.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Single word elseif keyword used.">
+        <![CDATA[
+if ($foo) {
+    $var = 1;
+} <em>elseif</em> ($bar) {
+    $var = 2;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Separate else and if keywords used.">
+        <![CDATA[
+if ($foo) {
+    $var = 1;
+} <em>else if</em> ($bar) {
+    $var = 2;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,104 @@
+<documentation title="Switch Declarations">
+    <standard>
+    <![CDATA[
+    Case statements should be indented 4 spaces from the switch keyword.  It should also be followed by a space.  Colons in switch declarations should not be preceded by whitespace.  Break statements should be indented 4 more spaces from the case statement.  There must be a comment when falling through from one case into the next.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Case statement indented correctly.">
+        <![CDATA[
+switch ($foo) {
+<em>    </em>case 'bar':
+        break;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Case statement not indented 4 spaces.">
+        <![CDATA[
+switch ($foo) {
+<em></em>case 'bar':
+    break;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Case statement followed by 1 space.">
+        <![CDATA[
+switch ($foo) {
+    case<em> </em>'bar':
+        break;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Case statement not followed by 1 space.">
+        <![CDATA[
+switch ($foo) {
+    case<em></em>'bar':
+        break;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Colons not prefixed by whitespace.">
+        <![CDATA[
+switch ($foo) {
+    case 'bar'<em></em>:
+        break;
+    default<em></em>:
+        break;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Colons prefixed by whitespace.">
+        <![CDATA[
+switch ($foo) {
+    case 'bar'<em> </em>:
+        break;
+    default<em> </em>:
+        break;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Break statement indented correctly.">
+        <![CDATA[
+switch ($foo) {
+    case 'bar':
+<em>        </em>break;
+}
+        ]]>
+        </code>
+        <code title="Invalid: Break statement not indented 4 spaces.">
+        <![CDATA[
+switch ($foo) {
+    case 'bar':
+<em>    </em>break;
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Comment marking intentional fall-through.">
+        <![CDATA[
+switch ($foo) {
+    case 'bar':
+    <em>// no break</em>
+    default<em></em>:
+        break;
+}
+        ]]>
+        </code>
+        <code title="Invalid: No comment marking intentional fall-through.">
+        <![CDATA[
+switch ($foo) {
+    case 'bar':
+    default<em></em>:
+        break;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml	(revision 5534)
@@ -0,0 +1,7 @@
+<documentation title="End File Newline">
+    <standard>
+    <![CDATA[
+    PHP Files should end with exactly one newline.
+    ]]>
+    </standard>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,51 @@
+<documentation title="Method Declarations">
+    <standard>
+    <![CDATA[
+    Method names should not be prefixed with an underscore to indicate visibility.  The static keyword, when present, should come after the visibility declaration, and the final and abstract keywords should come before.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct method naming.">
+        <![CDATA[
+class Foo
+{
+    private function <em>bar</em>()
+    {
+    }
+}
+        ]]>
+        </code>
+        <code title="Invalid: An underscore prefix used to indicate visibility.">
+        <![CDATA[
+class Foo
+{
+    private function <em>_bar</em>()
+    {
+    }
+}
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Correct ordering of method prefixes.">
+        <![CDATA[
+class Foo
+{
+    <em>final public static</em> function <em>bar</em>()
+    {
+    }
+}
+        ]]>
+        </code>
+        <code title="Invalid: static keyword used before visibility and final used after.">
+        <![CDATA[
+class Foo
+{
+    <em>static public final</em> function <em>bar</em>()
+    {
+    }
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,22 @@
+<documentation title="Namespace Declarations">
+    <standard>
+    <![CDATA[
+    There must be one blank line after the namespace declaration.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: One blank line after the namespace declaration.">
+        <![CDATA[
+namespace \Foo\Bar;
+<em></em>
+use \Baz;
+        ]]>
+        </code>
+        <code title="Invalid: No blank line after the namespace declaration.">
+        <![CDATA[
+namespace \Foo\Bar;
+use \Baz;
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,57 @@
+<documentation title="Namespace Declarations">
+    <standard>
+    <![CDATA[
+    Each use declaration must contain only one namespace and must come after the first namespace declaration.  There should be one blank line after the final use statement.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: One use declaration per namespace.">
+        <![CDATA[
+use \Foo;
+use \Bar;
+        ]]>
+        </code>
+        <code title="Invalid: Multiple namespaces in a use declaration.">
+        <![CDATA[
+use <em>\Foo, \Bar</em>;
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Use statements come after first namespace.">
+        <![CDATA[
+namespace \Foo;
+
+use \Bar;
+        ]]>
+        </code>
+        <code title="Invalid: Namespace declared after use.">
+        <![CDATA[
+use \Bar;
+
+namespace \Foo;
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: A single blank line after the final use statement.">
+        <![CDATA[
+use \Foo;
+use \Bar;
+<em></em>
+class Baz
+{
+}
+        ]]>
+        </code>
+        <code title="Invalid: No blank line after the final use statement.">
+        <![CDATA[
+use \Foo;
+use \Bar;
+class Baz
+{
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,453 @@
+<?php
+/**
+ * Class Declaration Test.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PEAR_Sniffs_Classes_ClassDeclarationSniff', true) === false) {
+    $error = 'Class PEAR_Sniffs_Classes_ClassDeclarationSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Class Declaration Test.
+ *
+ * Checks the declaration of the class and its inheritance is correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Classes_ClassDeclarationSniff extends PEAR_Sniffs_Classes_ClassDeclarationSniff
+{
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                         in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // We want all the errors from the PEAR standard, plus some of our own.
+        parent::process($phpcsFile, $stackPtr);
+
+        // Just in case.
+        $tokens = $phpcsFile->getTokens();
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            return;
+        }
+
+        $this->processOpen($phpcsFile, $stackPtr);
+        $this->processClose($phpcsFile, $stackPtr);
+
+    }//end process()
+
+
+    /**
+     * Processes the opening section of a class declaration.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function processOpen(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens       = $phpcsFile->getTokens();
+        $stackPtrType = strtolower($tokens[$stackPtr]['content']);
+
+        // Check alignment of the keyword and braces.
+        if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
+            $prevContent = $tokens[($stackPtr - 1)]['content'];
+            if ($prevContent !== $phpcsFile->eolChar) {
+                $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar));
+                $spaces     = strlen($blankSpace);
+
+                if (in_array($tokens[($stackPtr - 2)]['code'], array(T_ABSTRACT, T_FINAL)) === true
+                    && $spaces !== 1
+                ) {
+                    $prevContent = strtolower($tokens[($stackPtr - 2)]['content']);
+                    $error       = 'Expected 1 space between %s and %s keywords; %s found';
+                    $data        = array(
+                                    $prevContent,
+                                    $stackPtrType,
+                                    $spaces,
+                                   );
+
+                    $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
+                    }
+                }
+            } else if ($tokens[($stackPtr - 2)]['code'] === T_ABSTRACT
+                || $tokens[($stackPtr - 2)]['code'] === T_FINAL
+            ) {
+                $prevContent = strtolower($tokens[($stackPtr - 2)]['content']);
+                $error       = 'Expected 1 space between %s and %s keywords; newline found';
+                $data        = array(
+                                $prevContent,
+                                $stackPtrType,
+                               );
+
+                $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NewlineBeforeKeyword', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
+                }
+            }//end if
+        }//end if
+
+        // We'll need the indent of the class/interface declaration for later.
+        $classIndent = 0;
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) {
+                continue;
+            }
+
+            // We changed lines.
+            if ($tokens[($i + 1)]['code'] === T_WHITESPACE) {
+                $classIndent = strlen($tokens[($i + 1)]['content']);
+            }
+
+            break;
+        }
+
+        $className = $phpcsFile->findNext(T_STRING, $stackPtr);
+
+        // Spacing of the keyword.
+        $gap = $tokens[($stackPtr + 1)]['content'];
+        if (strlen($gap) !== 1) {
+            $found = strlen($gap);
+            $error = 'Expected 1 space between %s keyword and %s name; %s found';
+            $data  = array(
+                      $stackPtrType,
+                      $stackPtrType,
+                      $found,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+            }
+        }
+
+        // Check after the class/interface name.
+        if ($tokens[($className + 2)]['line'] === $tokens[$className]['line']) {
+            $gap = $tokens[($className + 1)]['content'];
+            if (strlen($gap) !== 1) {
+                $found = strlen($gap);
+                $error = 'Expected 1 space after %s name; %s found';
+                $data  = array(
+                          $stackPtrType,
+                          $found,
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $className, 'SpaceAfterName', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($className + 1), ' ');
+                }
+            }
+        }
+
+        $openingBrace = $tokens[$stackPtr]['scope_opener'];
+
+        // Check positions of the extends and implements keywords.
+        foreach (array('extends', 'implements') as $keywordType) {
+            $keyword = $phpcsFile->findNext(constant('T_'.strtoupper($keywordType)), ($stackPtr + 1), $openingBrace);
+            if ($keyword !== false) {
+                if ($tokens[$keyword]['line'] !== $tokens[$stackPtr]['line']) {
+                    $error = 'The '.$keywordType.' keyword must be on the same line as the %s name';
+                    $data  = array($stackPtrType);
+                    $fix   = $phpcsFile->addFixableError($error, $keyword, ucfirst($keywordType).'Line', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($stackPtr + 1); $i < $keyword; $i++) {
+                            if ($tokens[$i]['line'] !== $tokens[($i + 1)]['line']) {
+                                $phpcsFile->fixer->substrToken($i, 0, (strlen($phpcsFile->eolChar) * -1));
+                            }
+                        }
+
+                        $phpcsFile->fixer->addContentBefore($keyword, ' ');
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                } else {
+                    // Check the whitespace before. Whitespace after is checked
+                    // later by looking at the whitespace before the first class name
+                    // in the list.
+                    $gap = strlen($tokens[($keyword - 1)]['content']);
+                    if ($gap !== 1) {
+                        $error = 'Expected 1 space before '.$keywordType.' keyword; %s found';
+                        $data  = array($gap);
+                        $fix   = $phpcsFile->addFixableError($error, $keyword, 'SpaceBefore'.ucfirst($keywordType), $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($keyword - 1), ' ');
+                        }
+                    }
+                }//end if
+            }//end if
+        }//end foreach
+
+        // Check each of the extends/implements class names. If the extends/implements
+        // keyword is the last content on the line, it means we need to check for
+        // the multi-line format, so we do not include the class names
+        // from the extends/implements list in the following check.
+        // Note that classes can only extend one other class, so they can't use a
+        // multi-line extends format, whereas an interface can extend multiple
+        // other interfaces, and so uses a multi-line extends format.
+        if ($tokens[$stackPtr]['code'] === T_INTERFACE) {
+            $keywordTokenType = T_EXTENDS;
+        } else {
+            $keywordTokenType = T_IMPLEMENTS;
+        }
+
+        $implements          = $phpcsFile->findNext($keywordTokenType, ($stackPtr + 1), $openingBrace);
+        $multiLineImplements = false;
+        if ($implements !== false) {
+            $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($openingBrace - 1), $implements, true);
+            if ($tokens[$prev]['line'] !== $tokens[$implements]['line']) {
+                $multiLineImplements = true;
+            }
+        }
+
+        $find = array(
+                 T_STRING,
+                 $keywordTokenType,
+                );
+
+        $classNames = array();
+        $nextClass  = $phpcsFile->findNext($find, ($className + 2), ($openingBrace - 1));
+        while ($nextClass !== false) {
+            $classNames[] = $nextClass;
+            $nextClass    = $phpcsFile->findNext($find, ($nextClass + 1), ($openingBrace - 1));
+        }
+
+        $classCount         = count($classNames);
+        $checkingImplements = false;
+        $implementsToken    = null;
+        foreach ($classNames as $i => $className) {
+            if ($tokens[$className]['code'] === $keywordTokenType) {
+                $checkingImplements = true;
+                $implementsToken    = $className;
+                continue;
+            }
+
+            if ($checkingImplements === true
+                && $multiLineImplements === true
+                && ($tokens[($className - 1)]['code'] !== T_NS_SEPARATOR
+                || $tokens[($className - 2)]['code'] !== T_STRING)
+            ) {
+                $prev = $phpcsFile->findPrevious(
+                    array(
+                     T_NS_SEPARATOR,
+                     T_WHITESPACE,
+                    ),
+                    ($className - 1),
+                    $implements,
+                    true
+                );
+
+                if ($prev === $implementsToken && $tokens[$className]['line'] !== ($tokens[$prev]['line'] + 1)) {
+                    if ($keywordTokenType === T_EXTENDS) {
+                        $error = 'The first item in a multi-line extends list must be on the line following the extends keyword';
+                        $fix   = $phpcsFile->addFixableError($error, $className, 'FirstExtendsInterfaceSameLine');
+                    } else {
+                        $error = 'The first item in a multi-line implements list must be on the line following the implements keyword';
+                        $fix   = $phpcsFile->addFixableError($error, $className, 'FirstInterfaceSameLine');
+                    }
+
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prev + 1); $i < $className; $i++) {
+                            if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                                break;
+                            }
+
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->addNewline($prev);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                } else if ($tokens[$prev]['line'] !== ($tokens[$className]['line'] - 1)) {
+                    if ($keywordTokenType === T_EXTENDS) {
+                        $error = 'Only one interface may be specified per line in a multi-line extends declaration';
+                        $fix   = $phpcsFile->addFixableError($error, $className, 'ExtendsInterfaceSameLine');
+                    } else {
+                        $error = 'Only one interface may be specified per line in a multi-line implements declaration';
+                        $fix   = $phpcsFile->addFixableError($error, $className, 'InterfaceSameLine');
+                    }
+
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prev + 1); $i < $className; $i++) {
+                            if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                                break;
+                            }
+
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->addNewline($prev);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                } else {
+                    $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($className - 1), $implements);
+                    if ($tokens[$prev]['line'] !== $tokens[$className]['line']) {
+                        $found = 0;
+                    } else {
+                        $found = strlen($tokens[$prev]['content']);
+                    }
+
+                    $expected = ($classIndent + $this->indent);
+                    if ($found !== $expected) {
+                        $error = 'Expected %s spaces before interface name; %s found';
+                        $data  = array(
+                                  $expected,
+                                  $found,
+                                 );
+                        $fix   = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
+                        if ($fix === true) {
+                            $padding = str_repeat(' ', $expected);
+                            if ($found === 0) {
+                                $phpcsFile->fixer->addContent($prev, $padding);
+                            } else {
+                                $phpcsFile->fixer->replaceToken($prev, $padding);
+                            }
+                        }
+                    }
+                }//end if
+            } else if ($tokens[($className - 1)]['code'] !== T_NS_SEPARATOR
+                || $tokens[($className - 2)]['code'] !== T_STRING
+            ) {
+                if ($tokens[($className - 1)]['code'] === T_COMMA
+                    || ($tokens[($className - 1)]['code'] === T_NS_SEPARATOR
+                    && $tokens[($className - 2)]['code'] === T_COMMA)
+                ) {
+                    $error = 'Expected 1 space before "%s"; 0 found';
+                    $data  = array($tokens[$className]['content']);
+                    $fix   = $phpcsFile->addFixableError($error, ($nextComma + 1), 'NoSpaceBeforeName', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->addContentBefore(($nextComma + 1), ' ');
+                    }
+                } else {
+                    if ($tokens[($className - 1)]['code'] === T_NS_SEPARATOR) {
+                        $prev = ($className - 2);
+                    } else {
+                        $prev = ($className - 1);
+                    }
+
+                    $spaceBefore = strlen($tokens[$prev]['content']);
+                    if ($spaceBefore !== 1) {
+                        $error = 'Expected 1 space before "%s"; %s found';
+                        $data  = array(
+                                  $tokens[$className]['content'],
+                                  $spaceBefore,
+                                 );
+
+                        $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeName', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken($prev, ' ');
+                        }
+                    }
+                }//end if
+            }//end if
+
+            if ($tokens[($className + 1)]['code'] !== T_NS_SEPARATOR
+                && $tokens[($className + 1)]['code'] !== T_COMMA
+            ) {
+                if ($i !== ($classCount - 1)) {
+                    // This is not the last class name, and the comma
+                    // is not where we expect it to be.
+                    if ($tokens[($className + 2)]['code'] !== $keywordTokenType) {
+                        $error = 'Expected 0 spaces between "%s" and comma; %s found';
+                        $data  = array(
+                                  $tokens[$className]['content'],
+                                  strlen($tokens[($className + 1)]['content']),
+                                 );
+
+                        $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeComma', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($className + 1), '');
+                        }
+                    }
+                }
+
+                $nextComma = $phpcsFile->findNext(T_COMMA, $className);
+            } else {
+                $nextComma = ($className + 1);
+            }//end if
+        }//end foreach
+
+    }//end processOpen()
+
+
+    /**
+     * Processes the closing section of a class declaration.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function processClose(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Check that the closing brace comes right after the code body.
+        $closeBrace  = $tokens[$stackPtr]['scope_closer'];
+        $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), null, true);
+        if ($prevContent !== $tokens[$stackPtr]['scope_opener']
+            && $tokens[$prevContent]['line'] !== ($tokens[$closeBrace]['line'] - 1)
+        ) {
+            $error = 'The closing brace for the %s must go on the next line after the body';
+            $data  = array($tokens[$stackPtr]['content']);
+            $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'CloseBraceAfterBody', $data);
+
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($prevContent + 1); $i < $closeBrace; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                if (strpos($tokens[$prevContent]['content'], $phpcsFile->eolChar) === false) {
+                    $phpcsFile->fixer->replaceToken($closeBrace, $phpcsFile->eolChar.$tokens[$closeBrace]['content']);
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }//end if
+
+        // Check the closing brace is on it's own line, but allow
+        // for comments like "//end class".
+        $nextContent = $phpcsFile->findNext(array(T_WHITESPACE, T_COMMENT), ($closeBrace + 1), null, true);
+        if ($tokens[$nextContent]['content'] !== $phpcsFile->eolChar
+            && $tokens[$nextContent]['line'] === $tokens[$closeBrace]['line']
+        ) {
+            $type  = strtolower($tokens[$stackPtr]['content']);
+            $error = 'Closing %s brace must be on a line by itself';
+            $data  = array($type);
+            $phpcsFile->addError($error, $closeBrace, 'CloseBraceSameLine', $data);
+        }
+
+    }//end processClose()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,117 @@
+<?php
+/**
+ * Verifies that properties are declared correctly.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found');
+}
+
+/**
+ * Verifies that properties are declared correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Classes_PropertyDeclarationSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['content'][1] === '_') {
+            $error = 'Property name "%s" should not be prefixed with an underscore to indicate visibility';
+            $data  = array($tokens[$stackPtr]['content']);
+            $phpcsFile->addWarning($error, $stackPtr, 'Underscore', $data);
+        }
+
+        // Detect multiple properties defined at the same time. Throw an error
+        // for this, but also only process the first property in the list so we don't
+        // repeat errors.
+        $find = PHP_CodeSniffer_Tokens::$scopeModifiers;
+        $find = array_merge($find, array(T_VARIABLE, T_VAR, T_SEMICOLON));
+        $prev = $phpcsFile->findPrevious($find, ($stackPtr - 1));
+        if ($tokens[$prev]['code'] === T_VARIABLE) {
+            return;
+        }
+
+        if ($tokens[$prev]['code'] === T_VAR) {
+            $error = 'The var keyword must not be used to declare a property';
+            $phpcsFile->addError($error, $stackPtr, 'VarUsed');
+        }
+
+        $next = $phpcsFile->findNext(array(T_VARIABLE, T_SEMICOLON), ($stackPtr + 1));
+        if ($tokens[$next]['code'] === T_VARIABLE) {
+            $error = 'There must not be more than one property declared per statement';
+            $phpcsFile->addError($error, $stackPtr, 'Multiple');
+        }
+
+        $modifier = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$scopeModifiers, $stackPtr);
+        if (($modifier === false) || ($tokens[$modifier]['line'] !== $tokens[$stackPtr]['line'])) {
+            $error = 'Visibility must be declared on property "%s"';
+            $data  = array($tokens[$stackPtr]['content']);
+            $phpcsFile->addError($error, $stackPtr, 'ScopeMissing', $data);
+        }
+
+    }//end processMemberVar()
+
+
+    /**
+     * Processes normal variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariable()
+
+
+    /**
+     * Processes variables in double quoted strings.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php	(revision 5534)
@@ -0,0 +1,152 @@
+<?php
+/**
+ * PSR2_Sniffs_WhiteSpace_ControlStructureSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_WhiteSpace_ControlStructureSpacingSniff.
+ *
+ * Checks that control structures have the correct spacing around brackets.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_ControlStructures_ControlStructureSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * How many spaces should follow the opening bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesAfterOpen = 0;
+
+    /**
+     * How many spaces should precede the closing bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesBeforeClose = 0;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_WHILE,
+                T_FOREACH,
+                T_FOR,
+                T_SWITCH,
+                T_DO,
+                T_ELSE,
+                T_ELSEIF,
+                T_TRY,
+                T_CATCH,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->requiredSpacesAfterOpen   = (int) $this->requiredSpacesAfterOpen;
+        $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose;
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['parenthesis_opener']) === false
+            || isset($tokens[$stackPtr]['parenthesis_closer']) === false
+        ) {
+            return;
+        }
+
+        $parenOpener    = $tokens[$stackPtr]['parenthesis_opener'];
+        $parenCloser    = $tokens[$stackPtr]['parenthesis_closer'];
+        $spaceAfterOpen = 0;
+        if ($tokens[($parenOpener + 1)]['code'] === T_WHITESPACE) {
+            if (strpos($tokens[($parenOpener + 1)]['content'], $phpcsFile->eolChar) !== false) {
+                $spaceAfterOpen = 'newline';
+            } else {
+                $spaceAfterOpen = strlen($tokens[($parenOpener + 1)]['content']);
+            }
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', $spaceAfterOpen);
+
+        if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
+            $error = 'Expected %s spaces after opening bracket; %s found';
+            $data  = array(
+                      $this->requiredSpacesAfterOpen,
+                      $spaceAfterOpen,
+                     );
+            $fix   = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
+            if ($fix === true) {
+                $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
+                if ($spaceAfterOpen === 0) {
+                    $phpcsFile->fixer->addContent($parenOpener, $padding);
+                } else if ($spaceAfterOpen === 'newline') {
+                    $phpcsFile->fixer->replaceToken(($parenOpener + 1), '');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($parenOpener + 1), $padding);
+                }
+            }
+        }
+
+        if ($tokens[$parenOpener]['line'] === $tokens[$parenCloser]['line']) {
+            $spaceBeforeClose = 0;
+            if ($tokens[($parenCloser - 1)]['code'] === T_WHITESPACE) {
+                $spaceBeforeClose = strlen(ltrim($tokens[($parenCloser - 1)]['content'], $phpcsFile->eolChar));
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', $spaceBeforeClose);
+
+            if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) {
+                $error = 'Expected %s spaces before closing bracket; %s found';
+                $data  = array(
+                          $this->requiredSpacesBeforeClose,
+                          $spaceBeforeClose,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
+                    if ($spaceBeforeClose === 0) {
+                        $phpcsFile->fixer->addContentBefore($parenCloser, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($parenCloser - 1), $padding);
+                    }
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,85 @@
+<?php
+/**
+ * PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff.
+ *
+ * Verifies that there are no else if statements. Elseif should be used instead.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_ControlStructures_ElseIfDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_ELSE,
+                T_ELSEIF,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['code'] === T_ELSEIF) {
+            $phpcsFile->recordMetric($stackPtr, 'Use of ELSE IF or ELSEIF', 'elseif');
+            return;
+        }
+
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$next]['code'] === T_IF) {
+            $phpcsFile->recordMetric($stackPtr, 'Use of ELSE IF or ELSEIF', 'else if');
+            $error = 'Usage of ELSE IF is discouraged; use ELSEIF instead';
+            $fix   = $phpcsFile->addFixableWarning($error, $stackPtr, 'NotAllowed');
+
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->replaceToken($stackPtr, 'elseif');
+                for ($i = ($stackPtr + 1); $i <= $next; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,248 @@
+<?php
+/**
+ * PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff.
+ *
+ * Ensures all switch statements are defined correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_ControlStructures_SwitchDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_SWITCH);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // We can't process SWITCH statements unless we know where they start and end.
+        if (isset($tokens[$stackPtr]['scope_opener']) === false
+            || isset($tokens[$stackPtr]['scope_closer']) === false
+        ) {
+            return;
+        }
+
+        $switch        = $tokens[$stackPtr];
+        $nextCase      = $stackPtr;
+        $caseAlignment = ($switch['column'] + $this->indent);
+        $caseCount     = 0;
+        $foundDefault  = false;
+
+        while (($nextCase = $this->_findNextCase($phpcsFile, ($nextCase + 1), $switch['scope_closer'])) !== false) {
+            if ($tokens[$nextCase]['code'] === T_DEFAULT) {
+                $type         = 'default';
+                $foundDefault = true;
+            } else {
+                $type = 'case';
+                $caseCount++;
+            }
+
+            if ($tokens[$nextCase]['content'] !== strtolower($tokens[$nextCase]['content'])) {
+                $expected = strtolower($tokens[$nextCase]['content']);
+                $error    = strtoupper($type).' keyword must be lowercase; expected "%s" but found "%s"';
+                $data     = array(
+                             $expected,
+                             $tokens[$nextCase]['content'],
+                            );
+
+                $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'NotLower', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($nextCase, $expected);
+                }
+            }
+
+            if ($type === 'case'
+                && ($tokens[($nextCase + 1)]['code'] !== T_WHITESPACE
+                || $tokens[($nextCase + 1)]['content'] !== ' ')
+            ) {
+                $error = 'CASE keyword must be followed by a single space';
+                $fix   = $phpcsFile->addFixableError($error, $nextCase, 'SpacingAfterCase');
+                if ($fix === true) {
+                    if ($tokens[($nextCase + 1)]['code'] !== T_WHITESPACE) {
+                        $phpcsFile->fixer->addContent($nextCase, ' ');
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($nextCase + 1), ' ');
+                    }
+                }
+            }
+
+            $opener     = $tokens[$nextCase]['scope_opener'];
+            $nextCloser = $tokens[$nextCase]['scope_closer'];
+            if ($tokens[$opener]['code'] === T_COLON) {
+                if ($tokens[($opener - 1)]['code'] === T_WHITESPACE) {
+                    $error = 'There must be no space before the colon in a '.strtoupper($type).' statement';
+                    $fix   = $phpcsFile->addFixableError($error, $nextCase, 'SpaceBeforeColon'.strtoupper($type));
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($opener - 1), '');
+                    }
+                }
+
+                $next = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), null, true);
+                if ($tokens[$next]['line'] === $tokens[$opener]['line']
+                    && $tokens[$next]['code'] === T_COMMENT
+                ) {
+                    // Skip comments on the same line.
+                    $next = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true);
+                }
+
+                if ($tokens[$next]['line'] !== ($tokens[$opener]['line'] + 1)) {
+                    $error = 'The '.strtoupper($type).' body must start on the line following the statement';
+                    $fix   = $phpcsFile->addFixableError($error, $nextCase, 'BodyOnNextLine'.strtoupper($type));
+                    if ($fix === true) {
+                        if ($tokens[$next]['line'] === $tokens[$opener]['line']) {
+                            $padding = str_repeat(' ', ($caseAlignment + $this->indent - 1));
+                            $phpcsFile->fixer->addContentBefore($next, $phpcsFile->eolChar.$padding);
+                        } else {
+                            $phpcsFile->fixer->beginChangeset();
+                            for ($i = ($opener + 1); $i < $next; $i++) {
+                                if ($tokens[$i]['line'] === $tokens[$next]['line']) {
+                                    break;
+                                }
+
+                                $phpcsFile->fixer->replaceToken($i, '');
+                            }
+
+                            $phpcsFile->fixer->addNewLineBefore($i);
+                            $phpcsFile->fixer->endChangeset();
+                        }
+                    }
+                }//end if
+
+                if ($tokens[$nextCloser]['scope_condition'] === $nextCase) {
+                    // Only need to check some things once, even if the
+                    // closer is shared between multiple case statements, or even
+                    // the default case.
+                    $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($nextCloser - 1), $nextCase, true);
+                    if ($tokens[$prev]['line'] === $tokens[$nextCloser]['line']) {
+                        $error = 'Terminating statement must be on a line by itself';
+                        $fix   = $phpcsFile->addFixableError($error, $nextCloser, 'BreakNotNewLine');
+                        if ($fix === true) {
+                            $phpcsFile->fixer->addNewLine($prev);
+                            $phpcsFile->fixer->replaceToken($nextCloser, trim($tokens[$nextCloser]['content']));
+                        }
+                    } else {
+                        $diff = ($caseAlignment + $this->indent - $tokens[$nextCloser]['column']);
+                        if ($diff !== 0) {
+                            $error = 'Terminating statement must be indented to the same level as the CASE body';
+                            $fix   = $phpcsFile->addFixableError($error, $nextCloser, 'BreakIndent');
+                            if ($fix === true) {
+                                if ($diff > 0) {
+                                    $phpcsFile->fixer->addContentBefore($nextCloser, str_repeat(' ', $diff));
+                                } else {
+                                    $phpcsFile->fixer->substrToken(($nextCloser - 1), 0, $diff);
+                                }
+                            }
+                        }
+                    }//end if
+                }//end if
+            } else {
+                $error = strtoupper($type).' statements must be defined using a colon';
+                $phpcsFile->addError($error, $nextCase, 'WrongOpener'.$type);
+            }//end if
+
+            // We only want cases from here on in.
+            if ($type !== 'case') {
+                continue;
+            }
+
+            $nextCode = $phpcsFile->findNext(
+                T_WHITESPACE,
+                ($tokens[$nextCase]['scope_opener'] + 1),
+                $nextCloser,
+                true
+            );
+
+            if ($tokens[$nextCode]['code'] !== T_CASE && $tokens[$nextCode]['code'] !== T_DEFAULT) {
+                // This case statement has content. If the next case or default comes
+                // before the closer, it means we dont have a terminating statement
+                // and instead need a comment.
+                $nextCode = $this->_findNextCase($phpcsFile, ($tokens[$nextCase]['scope_opener'] + 1), $nextCloser);
+                if ($nextCode !== false) {
+                    $prevCode = $phpcsFile->findPrevious(T_WHITESPACE, ($nextCode - 1), $nextCase, true);
+                    if ($tokens[$prevCode]['code'] !== T_COMMENT) {
+                        $error = 'There must be a comment when fall-through is intentional in a non-empty case body';
+                        $phpcsFile->addError($error, $nextCase, 'TerminatingComment');
+                    }
+                }
+            }
+        }//end while
+
+    }//end process()
+
+
+    /**
+     * Find the next CASE or DEFAULT statement from a point in the file.
+     *
+     * Note that nested switches are ignored.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position to start looking at.
+     * @param int                  $end       The position to stop looking at.
+     *
+     * @return int | bool
+     */
+    private function _findNextCase(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $end)
+    {
+        $tokens = $phpcsFile->getTokens();
+        while (($stackPtr = $phpcsFile->findNext(array(T_CASE, T_DEFAULT, T_SWITCH), $stackPtr, $end)) !== false) {
+            // Skip nested SWITCH statements; they are handled on their own.
+            if ($tokens[$stackPtr]['code'] === T_SWITCH) {
+                $stackPtr = $tokens[$stackPtr]['scope_closer'];
+                continue;
+            }
+
+            break;
+        }
+
+        return $stackPtr;
+
+    }//end _findNextCase()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php	(revision 5534)
@@ -0,0 +1,100 @@
+<?php
+/**
+ * PSR2_Sniffs_Files_ClosingTagsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_Files_LineEndingsSniff.
+ *
+ * Checks that the file does not end with a closing tag.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Files_ClosingTagSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Make sure this file only contains PHP code.
+        for ($i = 0; $i < $phpcsFile->numTokens; $i++) {
+            if ($tokens[$i]['code'] === T_INLINE_HTML
+                && trim($tokens[$i]['content']) !== ''
+            ) {
+                return $phpcsFile->numTokens;
+            }
+        }
+
+        // Find the last non-empty token.
+        for ($last = ($phpcsFile->numTokens - 1); $last > 0; $last--) {
+            if (trim($tokens[$last]['content']) !== '') {
+                break;
+            }
+        }
+
+        if ($tokens[$last]['code'] === T_CLOSE_TAG) {
+            $error = 'A closing tag is not permitted at the end of a PHP file';
+            $fix   = $phpcsFile->addFixableError($error, $last, 'NotAllowed');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->replaceToken($last, $phpcsFile->eolChar);
+                $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($last - 1), null, true);
+                if ($tokens[$prev]['code'] !== T_SEMICOLON
+                    && $tokens[$prev]['code'] !== T_CLOSE_CURLY_BRACKET
+                ) {
+                    $phpcsFile->fixer->addContent($prev, ';');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at end of PHP-only file', 'yes');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at end of PHP-only file', 'no');
+        }
+
+        // Ignore the rest of the file.
+        return $phpcsFile->numTokens;
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php	(revision 5534)
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Generic_Sniffs_Files_EndFileNewlineSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Generic_Sniffs_Files_EndFileNewlineSniff.
+ *
+ * Ensures the file ends with a newline character.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Files_EndFileNewlineSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        if ($phpcsFile->findNext(T_INLINE_HTML, ($stackPtr + 1)) !== false) {
+            return ($phpcsFile->numTokens + 1);
+        }
+
+        // Skip to the end of the file.
+        $tokens    = $phpcsFile->getTokens();
+        $lastToken = ($phpcsFile->numTokens - 1);
+
+        // Hard-coding the expected \n in this sniff as it is PSR-2 specific and
+        // PSR-2 enforces the use of unix style newlines.
+        if (substr($tokens[$lastToken]['content'], -1) !== "\n") {
+            $error = 'Expected 1 newline at end of file; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $lastToken, 'NoneFound');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($lastToken);
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Number of newlines at EOF', '0');
+            return ($phpcsFile->numTokens + 1);
+        }
+
+        // Go looking for the last non-empty line.
+        $lastLine = $tokens[$lastToken]['line'];
+        if ($tokens[$lastToken]['code'] === T_WHITESPACE) {
+            $lastCode = $phpcsFile->findPrevious(T_WHITESPACE, ($lastToken - 1), null, true);
+        } else {
+            $lastCode = $lastToken;
+        }
+
+        $lastCodeLine = $tokens[$lastCode]['line'];
+        $blankLines   = ($lastLine - $lastCodeLine + 1);
+        $phpcsFile->recordMetric($stackPtr, 'Number of newlines at EOF', $blankLines);
+
+        if ($blankLines > 1) {
+            $error = 'Expected 1 blank line at end of file; %s found';
+            $data  = array($blankLines);
+            $fix   = $phpcsFile->addFixableError($error, $lastCode, 'TooMany', $data);
+
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->replaceToken($lastCode, rtrim($tokens[$lastCode]['content']));
+                for ($i = ($lastCode + 1); $i < $lastToken; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->replaceToken($lastToken, $phpcsFile->eolChar);
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        // Skip the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * PSR2_Sniffs_Methods_FunctionCallSignatureSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_Methods_FunctionCallSignatureSniff.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Methods_FunctionCallSignatureSniff extends PEAR_Sniffs_Functions_FunctionCallSignatureSniff
+{
+
+    /**
+     * If TRUE, multiple arguments can be defined per line in a multi-line call.
+     *
+     * @var bool
+     */
+    public $allowMultipleArguments = false;
+
+
+    /**
+     * Processes single-line calls.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being scanned.
+     * @param int                  $stackPtr    The position of the current token
+     *                                          in the stack passed in $tokens.
+     * @param int                  $openBracket The position of the opening bracket
+     *                                          in the stack passed in $tokens.
+     * @param array                $tokens      The stack of tokens that make up
+     *                                          the file.
+     *
+     * @return void
+     */
+    public function isMultiLineCall(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBracket, $tokens)
+    {
+        // If the first argument is on a new line, this is a multi-line
+        // function call, even if there is only one argument.
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($openBracket + 1), null, true);
+        if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
+            return true;
+        }
+
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+
+        $end = $phpcsFile->findEndOfStatement($openBracket + 1);
+        while ($tokens[$end]['code'] === T_COMMA) {
+            // If the next bit of code is not on the same line, this is a
+            // multi-line function call.
+            $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($end + 1), $closeBracket, true);
+            if ($next === false) {
+                return false;
+            }
+
+            if ($tokens[$next]['line'] !== $tokens[$end]['line']) {
+                return true;
+            }
+
+            $end = $phpcsFile->findEndOfStatement($next);
+        }
+
+        // We've reached the last argument, so see if the next content
+        // (should be the close bracket) is also on the same line.
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($end + 1), $closeBracket, true);
+        if ($next !== false && $tokens[$next]['line'] !== $tokens[$end]['line']) {
+            return true;
+        }
+
+        return false;
+
+    }//end isMultiLineCall()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,155 @@
+<?php
+/**
+ * PSR2_Sniffs_Methods_MethodDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found');
+}
+
+/**
+ * PSR2_Sniffs_Methods_MethodDeclarationSniff.
+ *
+ * Checks that the method declaration is correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Methods_MethodDeclarationSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+
+    /**
+     * Constructs a Squiz_Sniffs_Scope_MethodScopeSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS, T_INTERFACE), array(T_FUNCTION));
+
+    }//end __construct()
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     * @param int                  $currScope The current scope opener token.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($methodName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        if ($methodName[0] === '_' && isset($methodName[1]) === true && $methodName[1] !== '_') {
+            $error = 'Method name "%s" should not be prefixed with an underscore to indicate visibility';
+            $data  = array($methodName);
+            $phpcsFile->addWarning($error, $stackPtr, 'Underscore', $data);
+        }
+
+        $visibility = 0;
+        $static     = 0;
+        $abstract   = 0;
+        $final      = 0;
+
+        $find   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $find[] = T_WHITESPACE;
+        $prev   = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true);
+
+        $prefix = $stackPtr;
+        while (($prefix = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$methodPrefixes, ($prefix - 1), $prev)) !== false) {
+            switch ($tokens[$prefix]['code']) {
+            case T_STATIC:
+                $static = $prefix;
+                break;
+            case T_ABSTRACT:
+                $abstract = $prefix;
+                break;
+            case T_FINAL:
+                $final = $prefix;
+                break;
+            default:
+                $visibility = $prefix;
+                break;
+            }
+        }
+
+        $fixes = array();
+
+        if ($visibility !== 0 && $final > $visibility) {
+            $error = 'The final declaration must precede the visibility declaration';
+            $fix   = $phpcsFile->addFixableError($error, $final, 'FinalAfterVisibility');
+            if ($fix === true) {
+                $fixes[$final]       = '';
+                $fixes[($final + 1)] = '';
+                if (isset($fixes[$visibility]) === true) {
+                    $fixes[$visibility] = 'final '.$fixes[$visibility];
+                } else {
+                    $fixes[$visibility] = 'final '.$tokens[$visibility]['content'];
+                }
+            }
+        }
+
+        if ($visibility !== 0 && $abstract > $visibility) {
+            $error = 'The abstract declaration must precede the visibility declaration';
+            $fix   = $phpcsFile->addFixableError($error, $abstract, 'AbstractAfterVisibility');
+            if ($fix === true) {
+                $fixes[$abstract]       = '';
+                $fixes[($abstract + 1)] = '';
+                if (isset($fixes[$visibility]) === true) {
+                    $fixes[$visibility] = 'abstract '.$fixes[$visibility];
+                } else {
+                    $fixes[$visibility] = 'abstract '.$tokens[$visibility]['content'];
+                }
+            }
+        }
+
+        if ($static !== 0 && $static < $visibility) {
+            $error = 'The static declaration must come after the visibility declaration';
+            $fix   = $phpcsFile->addFixableError($error, $static, 'StaticBeforeVisibility');
+            if ($fix === true) {
+                $fixes[$static]       = '';
+                $fixes[($static + 1)] = '';
+                if (isset($fixes[$visibility]) === true) {
+                    $fixes[$visibility] = $fixes[$visibility].' static';
+                } else {
+                    $fixes[$visibility] = $tokens[$visibility]['content'].' static';
+                }
+            }
+        }
+
+        // Batch all the fixes together to reduce the possibility of conflicts.
+        if (empty($fixes) === false) {
+            $phpcsFile->fixer->beginChangeset();
+            foreach ($fixes as $stackPtr => $content) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $content);
+            }
+
+            $phpcsFile->fixer->endChangeset();
+        }
+
+    }//end processTokenWithinScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,105 @@
+<?php
+/**
+ * PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff.
+ *
+ * Ensures namespaces are declared correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Namespaces_NamespaceDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_NAMESPACE);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        for ($i = ($stackPtr + 1); $i < ($phpcsFile->numTokens - 1); $i++) {
+            if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) {
+                continue;
+            }
+
+            break;
+        }
+
+        // The $i var now points to the first token on the line after the
+        // namespace declaration, which must be a blank line.
+        $next = $phpcsFile->findNext(T_WHITESPACE, $i, $phpcsFile->numTokens, true);
+        if ($next === false) {
+            return;
+        }
+
+        $diff = ($tokens[$next]['line'] - $tokens[$i]['line']);
+        if ($diff === 1) {
+            return;
+        }
+
+        if ($diff < 0) {
+            $diff = 0;
+        }
+
+        $error = 'There must be one blank line after the namespace declaration';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'BlankLineAfter');
+
+        if ($fix === true) {
+            if ($diff === 0) {
+                $phpcsFile->fixer->addNewlineBefore($i);
+            } else {
+                $phpcsFile->fixer->beginChangeset();
+                for ($x = $i; $x < $next; $x++) {
+                    if ($tokens[$x]['line'] === $tokens[$next]['line']) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($x, '');
+                }
+
+                $phpcsFile->fixer->addNewline($i);
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,170 @@
+<?php
+/**
+ * PSR2_Sniffs_Namespaces_UseDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * PSR2_Sniffs_Namespaces_UseDeclarationSniff.
+ *
+ * Ensures USE blocks are declared correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PSR2_Sniffs_Namespaces_UseDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_USE);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        if ($this->_shouldIgnoreUse($phpcsFile, $stackPtr) === true) {
+            return;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        // One space after the use keyword.
+        if ($tokens[($stackPtr + 1)]['content'] !== ' ') {
+            $error = 'There must be a single space after the USE keyword';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterUse');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+            }
+        }
+
+        // Only one USE declaration allowed per statement.
+        $next = $phpcsFile->findNext(array(T_COMMA, T_SEMICOLON), ($stackPtr + 1));
+        if ($tokens[$next]['code'] === T_COMMA) {
+            $error = 'There must be one USE keyword per declaration';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'MultipleDeclarations');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar.'use ');
+            }
+        }
+
+        // Make sure this USE comes after the first namespace declaration.
+        $prev = $phpcsFile->findPrevious(T_NAMESPACE, ($stackPtr - 1));
+        if ($prev !== false) {
+            $first = $phpcsFile->findNext(T_NAMESPACE, 1);
+            if ($prev !== $first) {
+                $error = 'USE declarations must go after the first namespace declaration';
+                $phpcsFile->addError($error, $stackPtr, 'UseAfterNamespace');
+            }
+        }
+
+        // Only interested in the last USE statement from here onwards.
+        $nextUse = $phpcsFile->findNext(T_USE, ($stackPtr + 1));
+        while ($this->_shouldIgnoreUse($phpcsFile, $nextUse) === true) {
+            $nextUse = $phpcsFile->findNext(T_USE, ($nextUse + 1));
+            if ($nextUse === false) {
+                break;
+            }
+        }
+
+        if ($nextUse !== false) {
+            return;
+        }
+
+        $end  = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1));
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($end + 1), null, true);
+
+        if ($tokens[$next]['code'] === T_CLOSE_TAG) {
+            return;
+        }
+
+        $diff = ($tokens[$next]['line'] - $tokens[$end]['line'] - 1);
+        if ($diff !== 1) {
+            if ($diff < 0) {
+                $diff = 0;
+            }
+
+            $error = 'There must be one blank line after the last USE statement; %s found;';
+            $data  = array($diff);
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterLastUse', $data);
+            if ($fix === true) {
+                if ($diff === 0) {
+                    $phpcsFile->fixer->addNewline($end);
+                } else {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($end + 1); $i < $next; $i++) {
+                        if ($tokens[$i]['line'] === $tokens[$next]['line']) {
+                            break;
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->addNewline($end);
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+    /**
+     * Check if this use statement is part of the namespace block.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    private function _shouldIgnoreUse(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore USE keywords inside closures.
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) {
+            return true;
+        }
+
+        // Ignore USE keywords for traits.
+        if ($phpcsFile->hasCondition($stackPtr, array(T_CLASS, T_TRAIT)) === true) {
+            return true;
+        }
+
+        return false;
+
+    }//end _shouldIgnoreUse()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/ruleset.xml	(revision 5534)
@@ -0,0 +1,187 @@
+<?xml version="1.0"?>
+<ruleset name="PSR2">
+ <description>The PSR-2 coding standard.</description>
+ <arg name="tab-width" value="4"/>
+
+ <!-- 2. General -->
+
+ <!-- 2.1 Basic Coding Standard -->
+
+ <!-- Include the whole PSR-1 standard -->
+ <rule ref="PSR1"/>
+
+ <!-- 2.2 Files -->
+
+ <!-- All PHP files MUST use the Unix LF (linefeed) line ending. -->
+ <rule ref="Generic.Files.LineEndings">
+  <properties>
+   <property name="eolChar" value="\n"/>
+  </properties>
+ </rule>
+
+ <!-- All PHP files MUST end with a single blank line. -->
+ <!-- checked in Files/EndFileNewlineSniff -->
+
+ <!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
+ <!-- checked in Files/ClosingTagSniff -->
+
+ <!-- 2.3 Lines -->
+
+ <!-- The soft limit on line length MUST be 120 characters; automated style checkers MUST warn but MUST NOT error at the soft limit. -->
+ <rule ref="Generic.Files.LineLength">
+  <properties>
+   <property name="lineLimit" value="120"/>
+   <property name="absoluteLineLimit" value="0"/>
+  </properties>
+ </rule>
+
+ <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
+  <properties>
+   <property name="ignoreBlankLines" value="true"/>
+  </properties>
+ </rule>
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
+  <severity>0</severity>
+ </rule>
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
+  <severity>0</severity>
+ </rule>
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
+  <severity>0</severity>
+ </rule>
+
+ <!-- There MUST NOT be more than one statement per line. -->
+ <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
+
+ <!-- 2.4 Indenting -->
+
+ <!-- Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting. -->
+ <rule ref="Generic.WhiteSpace.ScopeIndent">
+  <properties>
+   <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT_OPEN_TAG"/>
+  </properties>
+ </rule>
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
+
+ <!-- 2.5 Keywords and True/False/Null -->
+
+ <!-- PHP keywords MUST be in lower case. -->
+ <rule ref="Generic.PHP.LowerCaseKeyword"/>
+
+ <!-- The PHP constants true, false, and null MUST be in lower case. -->
+ <rule ref="Generic.PHP.LowerCaseConstant"/>
+
+ <!-- 3. Namespace and Use Declarations -->
+
+ <!-- When present, there MUST be one blank line after the namespace declaration. -->
+ <!-- checked in Namespaces/NamespaceDeclarationSniff -->
+
+ <!-- When present, all use declarations MUST go after the namespace declaration.
+      There MUST be one use keyword per declaration.
+      There MUST be one blank line after the use block. -->
+ <!-- checked in Namespaces/UseDeclarationSniff -->
+
+ <!-- 4. Classes, Properties, and Methods -->
+
+ <!-- 4.1. Extends and Implements -->
+
+ <!-- The extends and implements keywords MUST be declared on the same line as the class name.
+      The opening brace for the class go MUST go on its own line; the closing brace for the class MUST go on the next line after the body.
+      Lists of implements MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one interface per line. -->
+ <!-- checked in Classes/ClassDeclarationSniff -->
+
+ <!-- 4.2. Properties -->
+
+ <!-- Visibility MUST be declared on all properties.
+      The var keyword MUST NOT be used to declare a property.
+      There MUST NOT be more than one property declared per statement.
+      Property names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility. -->
+ <!-- checked in Classes/PropertyDeclarationSniff -->
+
+ <!-- 4.3 Methods -->
+
+ <!-- Visibility MUST be declared on all methods. -->
+ <rule ref="Squiz.Scope.MethodScope"/>
+ <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
+
+ <!-- Method names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility. -->
+ <!-- checked in Methods/MethodDeclarationSniff -->
+
+ <!-- Method names MUST NOT be declared with a space after the method name. The opening brace MUST go on its own line, and the closing brace MUST go on the next line following the body. There MUST NOT be a space after the opening parenthesis, and there MUST NOT be a space before the closing parenthesis. -->
+ <rule ref="Squiz.Functions.FunctionDeclaration"/>
+ <rule ref="Squiz.Functions.LowercaseFunctionKeywords"/>
+
+ <!-- 4.4 Method Arguments -->
+
+ <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. -->
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
+  <properties>
+   <property name="equalsSpacing" value="1"/>
+  </properties>
+ </rule>
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
+  <severity>0</severity>
+ </rule>
+
+ <!-- Method arguments with default values MUST go at the end of the argument list. -->
+ <rule ref="PEAR.Functions.ValidDefaultValue"/>
+
+ <!-- Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. When the argument list is split across multiple lines, the closing parenthesis and opening brace MUST be placed together on their own line with one space between them. -->
+ <rule ref="Squiz.Functions.MultiLineFunctionDeclaration"/>
+
+ <!-- 4.5 abstract, final, and static -->
+
+ <!-- When present, the abstract and final declarations MUST precede the visibility declaration.
+      When present, the static declaration MUST come after the visibility declaration. -->
+ <!-- checked in Methods/MethodDeclarationSniff -->
+
+ <!-- 4.6 Method and Function Calls -->
+
+ <!-- When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis, there MUST NOT be a space after the opening parenthesis, and there MUST NOT be a space before the closing parenthesis. In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma.
+ Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. -->
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
+ <rule ref="PSR2.Methods.FunctionCallSignature.SpaceAfterCloseBracket">
+  <severity>0</severity>
+ </rule>
+
+ <!-- 5. Control Structures -->
+
+ <!-- The general style rules for control structures are as follows:
+ There MUST be one space after the control structure keyword
+ There MUST NOT be a space after the opening parenthesis
+ There MUST NOT be a space before the closing parenthesis
+ There MUST be one space between the closing parenthesis and the opening brace
+ The structure body MUST be indented once
+ The closing brace MUST be on the next line after the body -->
+ <rule ref="Squiz.ControlStructures.ControlSignature"/>
+ <rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
+ <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/>
+ <rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
+ <rule ref="Squiz.ControlStructures.LowercaseDeclaration"/>
+ <!-- checked in ControlStructures/ControlStructureSpacingSniff -->
+
+ <!-- The body of each structure MUST be enclosed by braces. This standardizes how the structures look, and reduces the likelihood of introducing errors as new lines get added to the body. -->
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
+
+ <!-- 5.1. if, elseif, else -->
+
+ <!-- The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words. -->
+ <!-- checked in ControlStructures/ElseIfDeclarationSniff -->
+
+ <!-- 5.2. switch, case -->
+
+ <!-- The case statement MUST be indented once from switch, and the break keyword (or other terminating keyword) MUST be indented at the same level as the case body. There MUST be a comment such as // no break when fall-through is intentional in a non-empty case body. -->
+ <!-- checked in ControlStructures/SwitchDeclarationSniff -->
+
+ <!-- 6. Closures -->
+
+ <!-- Closures MUST be declared with a space after the function keyword, and a space before and after the use keyword.
+ The opening brace MUST go on the same line, and the closing brace MUST go on the next line following the body.
+ There MUST NOT be a space after the opening parenthesis of the argument list or variable list, and there MUST NOT be a space before the closing parenthesis of the argument list or variable list.
+ In the argument list and variable list, there MUST NOT be a space before each comma, and there MUST be one space after each comma.
+ Closure arguments with default values MUST go at the end of the argument list.
+ Argument lists and variable lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument or variable per line.
+ When the ending list (whether or arguments or variables) is split across multiple lines, the closing parenthesis and opening brace MUST be placed together on their own line with one space between them. -->
+ <!-- checked in Squiz.Functions.MultiLineFunctionDeclaration -->
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Array Bracket Spacing">
+    <standard>
+    <![CDATA[
+    When referencing arrays you should not put whitespace around the opening bracket or before the closing bracket.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: No spaces around the brackets.">
+        <![CDATA[
+$foo<em></em>[<em></em>'bar'<em></em>];
+]]>
+        </code>
+        <code title="Invalid: Spaces around the brackets.">
+        <![CDATA[
+$foo<em> </em>[<em> </em>'bar'<em> </em>];
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,117 @@
+<documentation title="Array Declarations">
+    <standard>
+    <![CDATA[
+    This standard covers all array declarations, regardless of the number and type of values contained within the array.
+    ]]>
+    </standard>
+    <standard>
+    <![CDATA[
+    The <em>array</em> keyword must be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: array keyword lowercase">
+        <![CDATA[
+$array = <em>a</em>rray('val1', 'val2');
+        ]]>
+        </code>
+        <code title="Invalid: first letter capitalised">
+        <![CDATA[
+$array = <em>A</em>rray('val1', 'val2');
+        ]]>
+        </code>
+    </code_comparison>
+    <standard>
+    <![CDATA[
+    The first array key must begin on the line after the <em>array</em> keyword.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: first key on second line">
+        <![CDATA[
+$array = array(
+          <em>'key1'</em> => 'value1',
+          'key2' => 'value2',
+         );
+        ]]>
+        </code>
+        <code title="Invalid: first key on same line">
+        <![CDATA[
+$array = array(<em>'key1'</em> => 'value1',
+          'key2' => 'value2',
+         );
+        ]]>
+        </code>
+    </code_comparison>
+    <standard>
+    <![CDATA[
+    All array keys must be indented to one space after the start of the <em>array</em> keyword. The closing parenthesis must be aligned with the start of the <em>array</em> keyword.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: aligned correctly">
+        <![CDATA[
+$array = array(
+         <em> </em>'key1' => 'value1',
+         <em> </em>'key2' => 'value2',
+         );
+        ]]>
+        </code>
+        <code title="Invalid: keys and parenthesis aligned incorrectly">
+        <![CDATA[
+$array = array(
+         <em>'</em>key1' => 'value1',
+         <em>'</em>key2' => 'value2',
+);
+        ]]>
+        </code>
+    </code_comparison>
+    <standard>
+    <![CDATA[
+    All double arrow symbols must be aligned to one space after the longest array key. Alignment must be achieved using spaces.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: keys and values aligned">
+        <![CDATA[
+$array = array(
+          'keyTen'<em>    </em>=> 'ValueTen',
+          'keyTwenty'<em> </em>=> 'ValueTwenty',
+         );
+        ]]>
+        </code>
+        <code title="Invalid: alignment incorrect">
+        <![CDATA[
+$array = array(
+          'keyTen'<em> </em>=> 'ValueTen',
+          'keyTwenty'<em> </em>=> 'ValueTwenty',
+         );
+        ]]>
+        </code>
+    </code_comparison>
+    <standard>
+    <![CDATA[
+    All array values must be followed by a comma, including the final value.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: comma after each value">
+        <![CDATA[
+$array = array(
+          'key1' => 'value1',
+          'key2' => 'value2',
+          'key3' => 'value3'<em>,</em>
+         );
+        ]]>
+        </code>
+        <code title="Invalid: no comma after last value">
+        <![CDATA[
+$array = array(
+          'key1' => 'value1',
+          'key2' => 'value2',
+          'key3' => 'value3'<em> </em>
+         );
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Lowercase Class Keywords">
+    <standard>
+    <![CDATA[
+    The php keywords class, interface, trait, extends, implements, abstract, final, var, and const should be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Lowercase class keywords.">
+        <![CDATA[
+<em>final</em> <em>class</em> Foo <em>extends</em> Bar
+{
+}
+]]>
+        </code>
+        <code title="Invalid: Initial capitalization of class keywords.">
+        <![CDATA[
+<em>Final</em> <em>Class</em> Foo <em>Extends</em> Bar
+{
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml	(revision 5534)
@@ -0,0 +1,63 @@
+<documentation title="Self Member Reference">
+    <standard>
+    <![CDATA[
+    The self keyword should be used instead of the current class name, should be lowercase, and should not have spaces before or after it.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Lowercase self used.">
+        <![CDATA[
+<em>self</em>::foo();
+]]>
+        </code>
+        <code title="Invalid: Uppercase self used.">
+        <![CDATA[
+<em>SELF</em>::foo();
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Correct spacing used.">
+        <![CDATA[
+self<em></em>::<em></em>foo();
+]]>
+        </code>
+        <code title="Invalid: Incorrect spacing used.">
+        <![CDATA[
+self<em> </em>::<em> </em>foo();
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Self used as reference.">
+        <![CDATA[
+class Foo
+{
+    public static function bar()
+    {
+    }
+
+    public static function baz()
+    {
+        <em>self</em>::bar();
+    }
+}
+]]>
+        </code>
+        <code title="Invalid: Local class name used as reference.">
+        <![CDATA[
+class <em>Foo</em>
+{
+    public static function bar()
+    {
+    }
+
+    public static function baz()
+    {
+        <em>Foo</em>::bar();
+    }
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml	(revision 5534)
@@ -0,0 +1,39 @@
+<documentation title="Doc Comment Alignment">
+    <standard>
+    <![CDATA[
+    The asterisks in a doc comment should align, and there should be one space between the asterisk and tags.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Asterisks are aligned.">
+        <![CDATA[
+/**
+<em> </em>* @see foo()
+<em> </em>*/
+]]>
+        </code>
+        <code title="Invalid: Asterisks are not aligned.">
+        <![CDATA[
+/**
+<em>  </em>* @see foo()
+<em></em>*/
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: One space between asterisk and tag.">
+        <![CDATA[
+/**
+ *<em> </em>@see foo()
+ */
+]]>
+        </code>
+        <code title="Invalid: Incorrect spacing used.">
+        <![CDATA[
+/**
+ *<em>  </em>@see foo()
+ */
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml	(revision 5534)
@@ -0,0 +1,32 @@
+<documentation title="Doc Comment Throws Tag">
+    <standard>
+    <![CDATA[
+    If a function throws any exceptions, they should be documented in a @throws tag.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: @throws tag used.">
+        <![CDATA[
+/**
+ * <em>@throws Exception all the time</em>
+ * @return void
+ */
+function foo()
+{
+    throw new Exception('Danger!');
+}
+]]>
+        </code>
+        <code title="Invalid: No @throws tag used for throwing function.">
+        <![CDATA[
+/**
+ * @return void
+ */
+function foo()
+{
+    throw new Exception('Danger!');
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,39 @@
+<documentation title="Foreach Loop Declarations">
+    <standard>
+    <![CDATA[
+    There should be a space between each element of a foreach loop and the as keyword should be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct spacing used.">
+        <![CDATA[
+foreach (<em></em>$foo<em> </em>as<em> </em>$bar<em> </em>=><em> </em>$baz<em></em>) {
+    echo $baz;
+}
+]]>
+        </code>
+        <code title="Invalid: Invalid spacing used.">
+        <![CDATA[
+foreach (<em> </em>$foo<em>  </em>as<em>  </em>$bar<em></em>=><em></em>$baz<em> </em>) {
+    echo $baz;
+}
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Lowercase as keyword.">
+        <![CDATA[
+foreach ($foo <em>as</em> $bar => $baz) {
+    echo $baz;
+}
+]]>
+        </code>
+        <code title="Invalid: Uppercase as keyword.">
+        <![CDATA[
+foreach ($foo <em>AS</em> $bar => $baz) {
+    echo $baz;
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,55 @@
+<documentation title="For Loop Declarations">
+    <standard>
+    <![CDATA[
+    In a for loop declaration, there should be no space inside the brackets and there should be 0 spaces before and 1 space after semicolons.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Correct spacing used.">
+        <![CDATA[
+for (<em></em>$i = 0; $i < 10; $i++<em></em>) {
+    echo $i;
+}
+]]>
+        </code>
+        <code title="Invalid: Invalid spacing used inside brackets.">
+        <![CDATA[
+for (<em> </em>$i = 0; $i < 10; $i++<em> </em>) {
+    echo $i;
+}
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Correct spacing used.">
+        <![CDATA[
+for ($i = 0<em></em>; $i < 10<em></em>; $i++) {
+    echo $i;
+}
+]]>
+        </code>
+        <code title="Invalid: Invalid spacing used before semicolons.">
+        <![CDATA[
+for ($i = 0<em> </em>; $i < 10<em> </em>; $i++) {
+    echo $i;
+}
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: Correct spacing used.">
+        <![CDATA[
+for ($i = 0;<em> </em>$i < 10;<em> </em>$i++) {
+    echo $i;
+}
+]]>
+        </code>
+        <code title="Invalid: Invalid spacing used after semicolons.">
+        <![CDATA[
+for ($i = 0;<em></em>$i < 10;<em></em>$i++) {
+    echo $i;
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Lowercase Control Structure Keywords">
+    <standard>
+    <![CDATA[
+    The php keywords if, else, elseif, foreach, for, do, switch, while, try, and catch should be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Lowercase if keyword.">
+        <![CDATA[
+<em>if</em> ($foo) {
+    $bar = true;
+}
+]]>
+        </code>
+        <code title="Invalid: Uppercase if keyword.">
+        <![CDATA[
+<em>IF</em> ($foo) {
+    $bar = true;
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Lowercase Built-In functions">
+    <standard>
+    <![CDATA[
+    All PHP built-in functions should be lowercased when called.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Lowercase function call.">
+        <![CDATA[
+if (<em>isset</em>($foo)) {
+    echo $foo;
+}
+]]>
+        </code>
+        <code title="Invalid: isset not called as lowercase.">
+        <![CDATA[
+if (<em>isSet</em>($foo)) {
+    echo $foo;
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Lowercase Function Keywords">
+    <standard>
+    <![CDATA[
+    The php keywords function, public, private, protected, and static should be lowercase.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Lowercase function keyword.">
+        <![CDATA[
+<em>function</em> foo()
+{
+    return true;
+}
+]]>
+        </code>
+        <code title="Invalid: Uppercase function keyword.">
+        <![CDATA[
+<em>FUNCTION</em> foo()
+{
+    return true;
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml	(revision 5534)
@@ -0,0 +1,31 @@
+<documentation title="Static This Usage">
+    <standard>
+    <![CDATA[
+    Static methods should not use $this.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Using self:: to access static variables.">
+        <![CDATA[
+class Foo
+{
+    <em>static</em> function bar()
+    {
+        return <em>self</em>::$staticMember;
+    }
+}
+]]>
+        </code>
+        <code title="Invalid: Using $this-> to access static variables.">
+        <![CDATA[
+class Foo
+{
+    <em>static</em> function bar()
+    {
+    return <em>$this</em>->$staticMember;
+    }
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Echoed Strings">
+    <standard>
+    <![CDATA[
+    Simple strings should not be enclosed in parentheses when being echoed.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Using echo without parentheses.">
+        <![CDATA[
+echo<em> </em>"Hello";
+]]>
+        </code>
+        <code title="Invalid: Using echo with parentheses.">
+        <![CDATA[
+echo<em>(</em>"Hello"<em>)</em>;
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Cast Whitespace">
+    <standard>
+    <![CDATA[
+    Casts should not have whitespace inside the parentheses.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: No spaces.">
+        <![CDATA[
+$foo = (<em></em>int<em></em>)'42';
+]]>
+        </code>
+        <code title="Invalid: Whitespace used inside parentheses.">
+        <![CDATA[
+$foo = (<em> </em>int<em> </em>)'42';
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml	(revision 5534)
@@ -0,0 +1,41 @@
+<documentation title="Function Opening Brace Whitespace">
+    <standard>
+    <![CDATA[
+    The opening brace for functions should be on a new line with no blank lines surrounding it.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Opening brace is on a new line.">
+        <![CDATA[
+function foo()
+<em>{</em>
+}
+]]>
+        </code>
+        <code title="Invalid: Opening brace is on the same line as the function declaration.">
+        <![CDATA[
+function foo() <em>{</em>
+}
+]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: No blank lines after the opening brace.">
+        <![CDATA[
+function foo()
+{
+<em>    return 42;</em>
+}
+]]>
+        </code>
+        <code title="Invalid: A blank line after the opening brace.">
+        <![CDATA[
+function foo()
+{
+<em></em>
+    return 42;
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Language Construct Whitespace">
+    <standard>
+    <![CDATA[
+    The php constructs echo, print, return, include, include_once, require, require_once, and new should have one space after them.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: echo statement with a single space after it.">
+        <![CDATA[
+echo<em> </em>"hi";
+]]>
+        </code>
+        <code title="Invalid: echo statement with no space after it.">
+        <![CDATA[
+echo<em></em>"hi";
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Object Operator Spacing">
+    <standard>
+    <![CDATA[
+    The object operator (->) should not have any space around it.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: No spaces around the object operator.">
+        <![CDATA[
+$foo<em></em>-><em></em>bar();
+]]>
+        </code>
+        <code title="Invalid: Whitespace surrounding the object operator.">
+        <![CDATA[
+$foo<em> </em>-><em> </em>bar();
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,23 @@
+<documentation title="Scope Keyword Spacing">
+    <standard>
+    <![CDATA[
+    The php keywords static, public, private, and protected should have one space after them.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A single space following the keywords.">
+        <![CDATA[
+public<em> </em>static<em> </em>function foo()
+{
+}
+]]>
+        </code>
+        <code title="Invalid: Multiple spaces following the keywords.">
+        <![CDATA[
+public<em>  </em>static<em>  </em>function foo()
+{
+}
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml	(revision 5534)
@@ -0,0 +1,19 @@
+<documentation title="Semicolon Spacing">
+    <standard>
+    <![CDATA[
+    Semicolons should not have spaces before them.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: No space before the semicolon.">
+        <![CDATA[
+echo "hi"<em></em>;
+]]>
+        </code>
+        <code title="Invalid: Space before the semicolon.">
+        <![CDATA[
+echo "hi"<em> </em>;
+]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php	(revision 5534)
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff.
+ *
+ * Ensure that there are no spaces around square brackets.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_OPEN_SQUARE_BRACKET,
+                T_CLOSE_SQUARE_BRACKET,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being checked.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // PHP 5.4 introduced a shorthand array declaration syntax, so we need
+        // to ignore the these type of array declarations because this sniff is
+        // only dealing with array usage.
+        if ($tokens[$stackPtr]['code'] === T_OPEN_SQUARE_BRACKET) {
+            $openBracket = $stackPtr;
+        } else {
+            $openBracket = $tokens[$stackPtr]['bracket_opener'];
+        }
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($openBracket - 1), null, true);
+        if ($tokens[$prev]['code'] === T_EQUAL) {
+            return;
+        }
+
+        // Square brackets can not have a space before them.
+        $prevType = $tokens[($stackPtr - 1)]['code'];
+        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$prevType]) === true) {
+            $nonSpace = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 2), null, true);
+            $expected = $tokens[$nonSpace]['content'].$tokens[$stackPtr]['content'];
+            $found    = $phpcsFile->getTokensAsString($nonSpace, ($stackPtr - $nonSpace)).$tokens[$stackPtr]['content'];
+            $error    = 'Space found before square bracket; expected "%s" but found "%s"';
+            $data     = array(
+                         $expected,
+                         $found,
+                        );
+            $fix      = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeBracket', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
+            }
+        }
+
+        // Open square brackets can't ever have spaces after them.
+        if ($tokens[$stackPtr]['code'] === T_OPEN_SQUARE_BRACKET) {
+            $nextType = $tokens[($stackPtr + 1)]['code'];
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$nextType]) === true) {
+                $nonSpace = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 2), null, true);
+                $expected = $tokens[$stackPtr]['content'].$tokens[$nonSpace]['content'];
+                $found    = $phpcsFile->getTokensAsString($stackPtr, ($nonSpace - $stackPtr + 1));
+                $error    = 'Space found after square bracket; expected "%s" but found "%s"';
+                $data     = array(
+                             $expected,
+                             $found,
+                            );
+                $fix      = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterBracket', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,888 @@
+<?php
+/**
+ * A test to ensure that arrays conform to the array coding standard.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * A test to ensure that arrays conform to the array coding standard.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Arrays_ArrayDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_ARRAY,
+                T_OPEN_SHORT_ARRAY,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being checked.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['code'] === T_ARRAY) {
+            $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no');
+
+            // Array keyword should be lower case.
+            if ($tokens[$stackPtr]['content'] !== strtolower($tokens[$stackPtr]['content'])) {
+                if ($tokens[$stackPtr]['content'] === strtoupper($tokens[$stackPtr]['content'])) {
+                    $phpcsFile->recordMetric($stackPtr, 'Array keyword case', 'upper');
+                } else {
+                    $phpcsFile->recordMetric($stackPtr, 'Array keyword case', 'mixed');
+                }
+
+                $error = 'Array keyword should be lower case; expected "array" but found "%s"';
+                $data  = array($tokens[$stackPtr]['content']);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NotLowerCase', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($stackPtr, 'array');
+                }
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Array keyword case', 'lower');
+            }
+
+            $arrayStart = $tokens[$stackPtr]['parenthesis_opener'];
+            if (isset($tokens[$arrayStart]['parenthesis_closer']) === false) {
+                return;
+            }
+
+            $arrayEnd = $tokens[$arrayStart]['parenthesis_closer'];
+
+            if ($arrayStart !== ($stackPtr + 1)) {
+                $error = 'There must be no space between the "array" keyword and the opening parenthesis';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword');
+
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($stackPtr + 1); $i < $arrayStart; $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'yes');
+            $arrayStart = $stackPtr;
+            $arrayEnd   = $tokens[$stackPtr]['bracket_closer'];
+        }//end if
+
+        // Check for empty arrays.
+        $content = $phpcsFile->findNext(T_WHITESPACE, ($arrayStart + 1), ($arrayEnd + 1), true);
+        if ($content === $arrayEnd) {
+            // Empty array, but if the brackets aren't together, there's a problem.
+            if (($arrayEnd - $arrayStart) !== 1) {
+                $error = 'Empty array declaration must have no space between the parentheses';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceInEmptyArray');
+
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+
+                // We can return here because there is nothing else to check. All code
+                // below can assume that the array is not empty.
+                return;
+            }
+        }
+
+        if ($tokens[$arrayStart]['line'] === $tokens[$arrayEnd]['line']) {
+            $this->processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd);
+        } else {
+            $this->processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd);
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes a single-line array definition.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile  The current file being checked.
+     * @param int                  $stackPtr   The position of the current token
+     *                                         in the stack passed in $tokens.
+     * @param int                  $arrayStart The token that starts the array definition.
+     * @param int                  $arrayEnd   The token that ends the array definition.
+     *
+     * @return void
+     */
+    public function processSingleLineArray(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $arrayStart, $arrayEnd)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Check if there are multiple values. If so, then it has to be multiple lines
+        // unless it is contained inside a function call or condition.
+        $valueCount = 0;
+        $commas     = array();
+        for ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) {
+            // Skip bracketed statements, like function calls.
+            if ($tokens[$i]['code'] === T_OPEN_PARENTHESIS) {
+                $i = $tokens[$i]['parenthesis_closer'];
+                continue;
+            }
+
+            if ($tokens[$i]['code'] === T_COMMA) {
+                // Before counting this comma, make sure we are not
+                // at the end of the array.
+                $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), $arrayEnd, true);
+                if ($next !== false) {
+                    $valueCount++;
+                    $commas[] = $i;
+                } else {
+                    // There is a comma at the end of a single line array.
+                    $error = 'Comma not allowed after last value in single-line array declaration';
+                    $fix   = $phpcsFile->addFixableError($error, $i, 'CommaAfterLast');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+                }
+            }
+        }//end for
+
+        // Now check each of the double arrows (if any).
+        $nextArrow = $arrayStart;
+        while (($nextArrow = $phpcsFile->findNext(T_DOUBLE_ARROW, ($nextArrow + 1), $arrayEnd)) !== false) {
+            if ($tokens[($nextArrow - 1)]['code'] !== T_WHITESPACE) {
+                $content = $tokens[($nextArrow - 1)]['content'];
+                $error   = 'Expected 1 space between "%s" and double arrow; 0 found';
+                $data    = array($content);
+                $fix     = $phpcsFile->addFixableError($error, $nextArrow, 'NoSpaceBeforeDoubleArrow', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContentBefore($nextArrow, ' ');
+                }
+            } else {
+                $spaceLength = $tokens[($nextArrow - 1)]['length'];
+                if ($spaceLength !== 1) {
+                    $content = $tokens[($nextArrow - 2)]['content'];
+                    $error   = 'Expected 1 space between "%s" and double arrow; %s found';
+                    $data    = array(
+                                $content,
+                                $spaceLength,
+                               );
+
+                    $fix = $phpcsFile->addFixableError($error, $nextArrow, 'SpaceBeforeDoubleArrow', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($nextArrow - 1), ' ');
+                    }
+                }
+            }//end if
+
+            if ($tokens[($nextArrow + 1)]['code'] !== T_WHITESPACE) {
+                $content = $tokens[($nextArrow + 1)]['content'];
+                $error   = 'Expected 1 space between double arrow and "%s"; 0 found';
+                $data    = array($content);
+                $fix     = $phpcsFile->addFixableError($error, $nextArrow, 'NoSpaceAfterDoubleArrow', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContent($nextArrow, ' ');
+                }
+            } else {
+                $spaceLength = $tokens[($nextArrow + 1)]['length'];
+                if ($spaceLength !== 1) {
+                    $content = $tokens[($nextArrow + 2)]['content'];
+                    $error   = 'Expected 1 space between double arrow and "%s"; %s found';
+                    $data    = array(
+                                $content,
+                                $spaceLength,
+                               );
+
+                    $fix = $phpcsFile->addFixableError($error, $nextArrow, 'SpaceAfterDoubleArrow', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($nextArrow + 1), ' ');
+                    }
+                }
+            }//end if
+        }//end while
+
+        if ($valueCount > 0) {
+            $conditionCheck = $phpcsFile->findPrevious(array(T_OPEN_PARENTHESIS, T_SEMICOLON), ($stackPtr - 1), null, false);
+
+            if ($conditionCheck === false
+                || $tokens[$conditionCheck]['line'] !== $tokens[$stackPtr]['line']
+            ) {
+                $error = 'Array with multiple values cannot be declared on a single line';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SingleLineNotAllowed');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    $phpcsFile->fixer->addNewline($arrayStart);
+                    $phpcsFile->fixer->addNewlineBefore($arrayEnd);
+                    $phpcsFile->fixer->endChangeset();
+                }
+
+                return;
+            }
+
+            // We have a multiple value array that is inside a condition or
+            // function. Check its spacing is correct.
+            foreach ($commas as $comma) {
+                if ($tokens[($comma + 1)]['code'] !== T_WHITESPACE) {
+                    $content = $tokens[($comma + 1)]['content'];
+                    $error   = 'Expected 1 space between comma and "%s"; 0 found';
+                    $data    = array($content);
+                    $fix     = $phpcsFile->addFixableError($error, $comma, 'NoSpaceAfterComma', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->addContent($comma, ' ');
+                    }
+                } else {
+                    $spaceLength = $tokens[($comma + 1)]['length'];
+                    if ($spaceLength !== 1) {
+                        $content = $tokens[($comma + 2)]['content'];
+                        $error   = 'Expected 1 space between comma and "%s"; %s found';
+                        $data    = array(
+                                    $content,
+                                    $spaceLength,
+                                   );
+
+                        $fix = $phpcsFile->addFixableError($error, $comma, 'SpaceAfterComma', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($comma + 1), ' ');
+                        }
+                    }
+                }//end if
+
+                if ($tokens[($comma - 1)]['code'] === T_WHITESPACE) {
+                    $content     = $tokens[($comma - 2)]['content'];
+                    $spaceLength = $tokens[($comma - 1)]['length'];
+                    $error       = 'Expected 0 spaces between "%s" and comma; %s found';
+                    $data        = array(
+                                    $content,
+                                    $spaceLength,
+                                   );
+
+                    $fix = $phpcsFile->addFixableError($error, $comma, 'SpaceBeforeComma', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($comma - 1), '');
+                    }
+                }
+            }//end foreach
+        }//end if
+
+    }//end processSingleLineArray()
+
+
+    /**
+     * Processes a multi-line array definition.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile  The current file being checked.
+     * @param int                  $stackPtr   The position of the current token
+     *                                         in the stack passed in $tokens.
+     * @param int                  $arrayStart The token that starts the array definition.
+     * @param int                  $arrayEnd   The token that ends the array definition.
+     *
+     * @return void
+     */
+    public function processMultiLineArray(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $arrayStart, $arrayEnd)
+    {
+        $tokens       = $phpcsFile->getTokens();
+        $keywordStart = $tokens[$stackPtr]['column'];
+
+        // Check the closing bracket is on a new line.
+        $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($arrayEnd - 1), $arrayStart, true);
+        if ($tokens[$lastContent]['line'] === $tokens[$arrayEnd]['line']) {
+            $error = 'Closing parenthesis of array declaration must be on a new line';
+            $fix   = $phpcsFile->addFixableError($error, $arrayEnd, 'CloseBraceNewLine');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewlineBefore($arrayEnd);
+            }
+        } else if ($tokens[$arrayEnd]['column'] !== $keywordStart) {
+            // Check the closing bracket is lined up under the "a" in array.
+            $expected = ($keywordStart - 1);
+            $found    = ($tokens[$arrayEnd]['column'] - 1);
+            $error    = 'Closing parenthesis not aligned correctly; expected %s space(s) but found %s';
+            $data     = array(
+                         $expected,
+                         $found,
+                        );
+
+            $fix = $phpcsFile->addFixableError($error, $arrayEnd, 'CloseBraceNotAligned', $data);
+            if ($fix === true) {
+                if ($found === 0) {
+                    $phpcsFile->fixer->addContent(($arrayEnd - 1), str_repeat(' ', $expected));
+                } else {
+                    $phpcsFile->fixer->replaceToken(($arrayEnd - 1), str_repeat(' ', $expected));
+                }
+            }
+        }//end if
+
+        $nextToken  = $stackPtr;
+        $keyUsed    = false;
+        $singleUsed = false;
+        $indices    = array();
+        $maxLength  = 0;
+
+        if ($tokens[$stackPtr]['code'] === T_ARRAY) {
+            $lastToken = $tokens[$stackPtr]['parenthesis_opener'];
+        } else {
+            $lastToken = $stackPtr;
+        }
+
+        // Find all the double arrows that reside in this scope.
+        for ($nextToken = ($stackPtr + 1); $nextToken < $arrayEnd; $nextToken++) {
+            // Skip bracketed statements, like function calls.
+            if ($tokens[$nextToken]['code'] === T_OPEN_PARENTHESIS
+                && (isset($tokens[$nextToken]['parenthesis_owner']) === false
+                || $tokens[$nextToken]['parenthesis_owner'] !== $stackPtr)
+            ) {
+                $nextToken = $tokens[$nextToken]['parenthesis_closer'];
+                continue;
+            }
+
+            if ($tokens[$nextToken]['code'] === T_ARRAY) {
+                // Let subsequent calls of this test handle nested arrays.
+                if ($tokens[$lastToken]['code'] !== T_DOUBLE_ARROW) {
+                    $indices[] = array('value' => $nextToken);
+                    $lastToken = $nextToken;
+                }
+
+                $nextToken = $tokens[$tokens[$nextToken]['parenthesis_opener']]['parenthesis_closer'];
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true);
+                if ($tokens[$nextToken]['code'] !== T_COMMA) {
+                    $nextToken--;
+                } else {
+                    $lastToken = $nextToken;
+                }
+
+                continue;
+            }
+
+            if ($tokens[$nextToken]['code'] === T_OPEN_SHORT_ARRAY) {
+                // Let subsequent calls of this test handle nested arrays.
+                if ($tokens[$lastToken]['code'] !== T_DOUBLE_ARROW) {
+                    $indices[] = array('value' => $nextToken);
+                    $lastToken = $nextToken;
+                }
+
+                $nextToken = $tokens[$nextToken]['bracket_closer'];
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true);
+                if ($tokens[$nextToken]['code'] !== T_COMMA) {
+                    $nextToken--;
+                } else {
+                    $lastToken = $nextToken;
+                }
+
+                continue;
+            }
+
+            if ($tokens[$nextToken]['code'] === T_CLOSURE) {
+                if ($tokens[$lastToken]['code'] !== T_DOUBLE_ARROW) {
+                    $indices[] = array('value' => $nextToken);
+                    $lastToken = $nextToken;
+                }
+
+                $nextToken = $tokens[$nextToken]['scope_closer'];
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true);
+                if ($tokens[$nextToken]['code'] !== T_COMMA) {
+                    $nextToken--;
+                } else {
+                    $lastToken = $nextToken;
+                }
+
+                continue;
+            }
+
+            if ($tokens[$nextToken]['code'] !== T_DOUBLE_ARROW
+                && $tokens[$nextToken]['code'] !== T_COMMA
+            ) {
+                continue;
+            }
+
+            $currentEntry = array();
+
+            if ($tokens[$nextToken]['code'] === T_COMMA) {
+                $stackPtrCount = 0;
+                if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+                    $stackPtrCount = count($tokens[$stackPtr]['nested_parenthesis']);
+                }
+
+                $commaCount = 0;
+                if (isset($tokens[$nextToken]['nested_parenthesis']) === true) {
+                    $commaCount = count($tokens[$nextToken]['nested_parenthesis']);
+                    if ($tokens[$stackPtr]['code'] === T_ARRAY) {
+                        // Remove parenthesis that are used to define the array.
+                        $commaCount--;
+                    }
+                }
+
+                if ($commaCount > $stackPtrCount) {
+                    // This comma is inside more parenthesis than the ARRAY keyword,
+                    // then there it is actually a comma used to separate arguments
+                    // in a function call.
+                    continue;
+                }
+
+                if ($keyUsed === true && $tokens[$lastToken]['code'] === T_COMMA) {
+                    $error = 'No key specified for array entry; first entry specifies key';
+                    $phpcsFile->addError($error, $nextToken, 'NoKeySpecified');
+                    return;
+                }
+
+                if ($keyUsed === false) {
+                    if ($tokens[($nextToken - 1)]['code'] === T_WHITESPACE) {
+                        $content = $tokens[($nextToken - 2)]['content'];
+                        if ($tokens[($nextToken - 1)]['content'] === $phpcsFile->eolChar) {
+                            $spaceLength = 'newline';
+                        } else {
+                            $spaceLength = $tokens[($nextToken - 1)]['length'];
+                        }
+
+                        $error = 'Expected 0 spaces between "%s" and comma; %s found';
+                        $data  = array(
+                                  $content,
+                                  $spaceLength,
+                                 );
+
+                        $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceBeforeComma', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($nextToken - 1), '');
+                        }
+                    }
+
+                    $valueContent = $phpcsFile->findNext(
+                        PHP_CodeSniffer_Tokens::$emptyTokens,
+                        ($lastToken + 1),
+                        $nextToken,
+                        true
+                    );
+
+                    $indices[]  = array('value' => $valueContent);
+                    $singleUsed = true;
+                }//end if
+
+                $lastToken = $nextToken;
+                continue;
+            }//end if
+
+            if ($tokens[$nextToken]['code'] === T_DOUBLE_ARROW) {
+                if ($singleUsed === true) {
+                    $error = 'Key specified for array entry; first entry has no key';
+                    $phpcsFile->addError($error, $nextToken, 'KeySpecified');
+                    return;
+                }
+
+                $currentEntry['arrow'] = $nextToken;
+                $keyUsed = true;
+
+                // Find the start of index that uses this double arrow.
+                $indexEnd   = $phpcsFile->findPrevious(T_WHITESPACE, ($nextToken - 1), $arrayStart, true);
+                $indexStart = $phpcsFile->findStartOfStatement($indexEnd);
+
+                if ($indexStart === $indexEnd) {
+                    $currentEntry['index']         = $indexEnd;
+                    $currentEntry['index_content'] = $tokens[$indexEnd]['content'];
+                } else {
+                    $currentEntry['index']         = $indexStart;
+                    $currentEntry['index_content'] = $phpcsFile->getTokensAsString($indexStart, ($indexEnd - $indexStart + 1));
+                }
+
+                $indexLength = strlen($currentEntry['index_content']);
+                if ($maxLength < $indexLength) {
+                    $maxLength = $indexLength;
+                }
+
+                // Find the value of this index.
+                $nextContent = $phpcsFile->findNext(
+                    PHP_CodeSniffer_Tokens::$emptyTokens,
+                    ($nextToken + 1),
+                    $arrayEnd,
+                    true
+                );
+
+                $currentEntry['value'] = $nextContent;
+                $indices[] = $currentEntry;
+                $lastToken = $nextToken;
+            }//end if
+        }//end for
+
+        // Check for mutli-line arrays that should be single-line.
+        $singleValue = false;
+
+        if (empty($indices) === true) {
+            $singleValue = true;
+        } else if (count($indices) === 1 && $tokens[$lastToken]['code'] === T_COMMA) {
+            // There may be another array value without a comma.
+            $exclude     = PHP_CodeSniffer_Tokens::$emptyTokens;
+            $exclude[]   = T_COMMA;
+            $nextContent = $phpcsFile->findNext($exclude, ($indices[0]['value'] + 1), $arrayEnd, true);
+            if ($nextContent === false) {
+                $singleValue = true;
+            }
+        }
+
+        if ($singleValue === true) {
+            // Array cannot be empty, so this is a multi-line array with
+            // a single value. It should be defined on single line.
+            $error = 'Multi-line array contains a single value; use single-line array instead';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'MultiLineNotAllowed');
+
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) {
+                    if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                for ($i = ($arrayEnd - 1); $i > $arrayStart; $i--) {
+                    if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            return;
+        }//end if
+
+        /*
+            This section checks for arrays that don't specify keys.
+
+            Arrays such as:
+               array(
+                'aaa',
+                'bbb',
+                'd',
+               );
+        */
+
+        if ($keyUsed === false && empty($indices) === false) {
+            $count     = count($indices);
+            $lastIndex = $indices[($count - 1)]['value'];
+
+            $trailingContent = $phpcsFile->findPrevious(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($arrayEnd - 1),
+                $lastIndex,
+                true
+            );
+
+            if ($tokens[$trailingContent]['code'] !== T_COMMA) {
+                $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'no');
+                $error = 'Comma required after last value in array declaration';
+                $fix   = $phpcsFile->addFixableError($error, $trailingContent, 'NoCommaAfterLast');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContent($trailingContent, ',');
+                }
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'yes');
+            }
+
+            $lastValueLine = false;
+            foreach ($indices as $value) {
+                if (empty($value['value']) === true) {
+                    // Array was malformed and we couldn't figure out
+                    // the array value correctly, so we have to ignore it.
+                    // Other parts of this sniff will correct the error.
+                    continue;
+                }
+
+                if ($lastValueLine !== false && $tokens[$value['value']]['line'] === $lastValueLine) {
+                    $error = 'Each value in a multi-line array must be on a new line';
+                    $fix   = $phpcsFile->addFixableError($error, $value['value'], 'ValueNoNewline');
+                    if ($fix === true) {
+                        if ($tokens[($value['value'] - 1)]['code'] === T_WHITESPACE) {
+                            $phpcsFile->fixer->replaceToken(($value['value'] - 1), '');
+                        }
+
+                        $phpcsFile->fixer->addNewlineBefore($value['value']);
+                    }
+                } else if ($tokens[($value['value'] - 1)]['code'] === T_WHITESPACE) {
+                    $expected = $keywordStart;
+
+                    $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $value['value'], true);
+                    $found = ($tokens[$first]['column'] - 1);
+                    if ($found !== $expected) {
+                        $error = 'Array value not aligned correctly; expected %s spaces but found %s';
+                        $data  = array(
+                                  $expected,
+                                  $found,
+                                 );
+
+                        $fix = $phpcsFile->addFixableError($error, $value['value'], 'ValueNotAligned', $data);
+                        if ($fix === true) {
+                            if ($found === 0) {
+                                $phpcsFile->fixer->addContent(($value['value'] - 1), str_repeat(' ', $expected));
+                            } else {
+                                $phpcsFile->fixer->replaceToken(($value['value'] - 1), str_repeat(' ', $expected));
+                            }
+                        }
+                    }
+                }//end if
+
+                $lastValueLine = $tokens[$value['value']]['line'];
+            }//end foreach
+        }//end if
+
+        /*
+            Below the actual indentation of the array is checked.
+            Errors will be thrown when a key is not aligned, when
+            a double arrow is not aligned, and when a value is not
+            aligned correctly.
+            If an error is found in one of the above areas, then errors
+            are not reported for the rest of the line to avoid reporting
+            spaces and columns incorrectly. Often fixing the first
+            problem will fix the other 2 anyway.
+
+            For example:
+
+            $a = array(
+                  'index'  => '2',
+                 );
+
+            or
+
+            $a = [
+                  'index'  => '2',
+                 ];
+
+            In this array, the double arrow is indented too far, but this
+            will also cause an error in the value's alignment. If the arrow were
+            to be moved back one space however, then both errors would be fixed.
+        */
+
+        $numValues = count($indices);
+
+        $indicesStart  = ($keywordStart + 1);
+        $arrowStart    = ($indicesStart + $maxLength + 1);
+        $valueStart    = ($arrowStart + 3);
+        $indexLine     = $tokens[$stackPtr]['line'];
+        $lastIndexLine = null;
+        foreach ($indices as $index) {
+            if (isset($index['index']) === false) {
+                // Array value only.
+                if ($tokens[$index['value']]['line'] === $tokens[$stackPtr]['line'] && $numValues > 1) {
+                    $error = 'The first value in a multi-value array must be on a new line';
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'FirstValueNoNewline');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->addNewlineBefore($index['value']);
+                    }
+                }
+
+                continue;
+            }
+
+            $lastIndexLine = $indexLine;
+            $indexLine     = $tokens[$index['index']]['line'];
+
+            if ($indexLine === $tokens[$stackPtr]['line']) {
+                $error = 'The first index in a multi-value array must be on a new line';
+                $fix   = $phpcsFile->addFixableError($error, $index['index'], 'FirstIndexNoNewline');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addNewlineBefore($index['index']);
+                }
+
+                continue;
+            }
+
+            if ($indexLine === $lastIndexLine) {
+                $error = 'Each index in a multi-line array must be on a new line';
+                $fix   = $phpcsFile->addFixableError($error, $index['index'], 'IndexNoNewline');
+                if ($fix === true) {
+                    if ($tokens[($index['index'] - 1)]['code'] === T_WHITESPACE) {
+                        $phpcsFile->fixer->replaceToken(($index['index'] - 1), '');
+                    }
+
+                    $phpcsFile->fixer->addNewlineBefore($index['index']);
+                }
+
+                continue;
+            }
+
+            if ($tokens[$index['index']]['column'] !== $indicesStart) {
+                $expected = ($indicesStart - 1);
+                $found    = ($tokens[$index['index']]['column'] - 1);
+                $error    = 'Array key not aligned correctly; expected %s spaces but found %s';
+                $data     = array(
+                             $expected,
+                             $found,
+                            );
+
+                $fix = $phpcsFile->addFixableError($error, $index['index'], 'KeyNotAligned', $data);
+                if ($fix === true) {
+                    if ($found === 0) {
+                        $phpcsFile->fixer->addContent(($index['index'] - 1), str_repeat(' ', $expected));
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($index['index'] - 1), str_repeat(' ', $expected));
+                    }
+                }
+
+                continue;
+            }
+
+            if ($tokens[$index['arrow']]['column'] !== $arrowStart) {
+                $expected = ($arrowStart - (strlen($index['index_content']) + $tokens[$index['index']]['column']));
+                $found    = ($tokens[$index['arrow']]['column'] - (strlen($index['index_content']) + $tokens[$index['index']]['column']));
+                $error    = 'Array double arrow not aligned correctly; expected %s space(s) but found %s';
+                $data     = array(
+                             $expected,
+                             $found,
+                            );
+
+                $fix = $phpcsFile->addFixableError($error, $index['arrow'], 'DoubleArrowNotAligned', $data);
+                if ($fix === true) {
+                    if ($found === 0) {
+                        $phpcsFile->fixer->addContent(($index['arrow'] - 1), str_repeat(' ', $expected));
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($index['arrow'] - 1), str_repeat(' ', $expected));
+                    }
+                }
+
+                continue;
+            }
+
+            if ($tokens[$index['value']]['column'] !== $valueStart) {
+                $expected = ($valueStart - ($tokens[$index['arrow']]['length'] + $tokens[$index['arrow']]['column']));
+                $found    = ($tokens[$index['value']]['column'] - ($tokens[$index['arrow']]['length'] + $tokens[$index['arrow']]['column']));
+                if ($found < 0) {
+                    $found = 'newline';
+                }
+
+                $error = 'Array value not aligned correctly; expected %s space(s) but found %s';
+                $data  = array(
+                          $expected,
+                          $found,
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $index['arrow'], 'ValueNotAligned', $data);
+                if ($fix === true) {
+                    if ($found === 'newline') {
+                        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($index['value'] - 1), null, true);
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prev + 1); $i < $index['value']; $i++) {
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->replaceToken(($index['value'] - 1), str_repeat(' ', $expected));
+                        $phpcsFile->fixer->endChangeset();
+                    } else if ($found === 0) {
+                        $phpcsFile->fixer->addContent(($index['value'] - 1), str_repeat(' ', $expected));
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($index['value'] - 1), str_repeat(' ', $expected));
+                    }
+                }
+            }//end if
+
+            // Check each line ends in a comma.
+            $valueLine = $tokens[$index['value']]['line'];
+            $nextComma = false;
+            for ($i = $index['value']; $i < $arrayEnd; $i++) {
+                // Skip bracketed statements, like function calls.
+                if ($tokens[$i]['code'] === T_OPEN_PARENTHESIS) {
+                    $i         = $tokens[$i]['parenthesis_closer'];
+                    $valueLine = $tokens[$i]['line'];
+                    continue;
+                }
+
+                if ($tokens[$i]['code'] === T_ARRAY) {
+                    $i         = $tokens[$tokens[$i]['parenthesis_opener']]['parenthesis_closer'];
+                    $valueLine = $tokens[$i]['line'];
+                    continue;
+                }
+
+                // Skip to the end of multi-line strings.
+                if (isset(PHP_CodeSniffer_Tokens::$stringTokens[$tokens[$i]['code']]) === true) {
+                    $i = $phpcsFile->findNext($tokens[$i]['code'], ($i + 1), null, true);
+                    $i--;
+                    $valueLine = $tokens[$i]['line'];
+                    continue;
+                }
+
+                if ($tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) {
+                    $i         = $tokens[$i]['bracket_closer'];
+                    $valueLine = $tokens[$i]['line'];
+                    continue;
+                }
+
+                if ($tokens[$i]['code'] === T_CLOSURE) {
+                    $i         = $tokens[$i]['scope_closer'];
+                    $valueLine = $tokens[$i]['line'];
+                    continue;
+                }
+
+                if ($tokens[$i]['code'] === T_COMMA) {
+                    $nextComma = $i;
+                    break;
+                }
+            }//end for
+
+            if ($nextComma === false || ($tokens[$nextComma]['line'] !== $valueLine)) {
+                $error = 'Each line in an array declaration must end in a comma';
+                $fix   = $phpcsFile->addFixableError($error, $index['value'], 'NoComma');
+
+                if ($fix === true) {
+                    // Find the end of the line and put a comma there.
+                    for ($i = ($index['value'] + 1); $i < $phpcsFile->numTokens; $i++) {
+                        if ($tokens[$i]['line'] > $valueLine) {
+                            break;
+                        }
+                    }
+
+                    $phpcsFile->fixer->addContentBefore(($i - 1), ',');
+                }
+            }
+
+            // Check that there is no space before the comma.
+            if ($nextComma !== false && $tokens[($nextComma - 1)]['code'] === T_WHITESPACE) {
+                $content     = $tokens[($nextComma - 2)]['content'];
+                $spaceLength = $tokens[($nextComma - 1)]['length'];
+                $error       = 'Expected 0 spaces between "%s" and comma; %s found';
+                $data        = array(
+                                $content,
+                                $spaceLength,
+                               );
+
+                $fix = $phpcsFile->addFixableError($error, $nextComma, 'SpaceBeforeComma', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($nextComma - 1), '');
+                }
+            }
+        }//end foreach
+
+    }//end processMultiLineArray()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php	(revision 5534)
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff.
+ *
+ * Ensure there is a single blank line after the closing brace of a class definition.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ClassDefinitionClosingBraceSpaceSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_CLOSE_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($next === false) {
+            return;
+        }
+
+        if ($tokens[$next]['code'] !== T_CLOSE_TAG) {
+            $found = (($tokens[$next]['line'] - $tokens[$stackPtr]['line']) - 1);
+            if ($found !== 1) {
+                $error = 'Expected one blank line after closing brace of class definition; %s found';
+                $data  = array($found);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterClose', $data);
+
+                if ($fix === true) {
+                    if ($found === 0) {
+                        $phpcsFile->fixer->addNewline($stackPtr);
+                    } else {
+                        $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($stackPtr + 1); $i < ($nextContent - 1); $i++) {
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->addNewline($i);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }
+            }//end if
+        }//end if
+
+        // Ignore nested style definitions from here on. The spacing before the closing brace
+        // (a single blank line) will be enforced by the above check, which ensures there is a
+        // blank line after the last nested class.
+        $found = $phpcsFile->findPrevious(
+            T_CLOSE_CURLY_BRACKET,
+            ($stackPtr - 1),
+            $tokens[$stackPtr]['bracket_opener']
+        );
+
+        if ($found !== false) {
+            return;
+        }
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if ($prev === false) {
+            return;
+        }
+
+        if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) {
+            $error = 'Closing brace of class definition must be on new line';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBeforeClose');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewlineBefore($stackPtr);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php	(revision 5534)
@@ -0,0 +1,116 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff.
+ *
+ * Ensure there are no blank lines between the names of classes/IDs.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ClassDefinitionNameSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Do not check nested style definitions as, for example, in @media style rules.
+        $nested = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1), $tokens[$stackPtr]['bracket_closer']);
+        if ($nested !== false) {
+            return;
+        }
+
+        // Find the first blank line before this opening brace, unless we get
+        // to another style definition, comment or the start of the file.
+        $endTokens  = array(
+                       T_OPEN_CURLY_BRACKET  => T_OPEN_CURLY_BRACKET,
+                       T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                       T_OPEN_TAG            => T_OPEN_TAG,
+                      );
+        $endTokens += PHP_CodeSniffer_Tokens::$commentTokens;
+
+        $foundContent = false;
+        $currentLine  = $tokens[$stackPtr]['line'];
+        for ($i = ($stackPtr - 1); $i >= 0; $i--) {
+            if (isset($endTokens[$tokens[$i]['code']]) === true) {
+                break;
+            }
+
+            if ($tokens[$i]['line'] === $currentLine) {
+                if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                    $foundContent = true;
+                }
+
+                continue;
+            }
+
+            // We changed lines.
+            if ($foundContent === false) {
+                // Before we throw an error, make sure we are not looking
+                // at a gap before the style definition.
+                $prev = $phpcsFile->findPrevious(T_WHITESPACE, $i, null, true);
+                if ($prev !== false
+                    && isset($endTokens[$tokens[$prev]['code']]) === false
+                ) {
+                    $error = 'Blank lines are not allowed between class names';
+                    $phpcsFile->addError($error, ($i + 1), 'BlankLinesFound');
+                }
+
+                break;
+            }
+
+            $foundContent = false;
+            $currentLine  = $tokens[$i]['line'];
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php	(revision 5534)
@@ -0,0 +1,140 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff.
+ *
+ * Ensure there is a single space before the opening brace in a class definition
+ * and the content starts on the next line.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ClassDefinitionOpeningBraceSpaceSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
+            $error = 'Expected 1 space before opening brace of class definition; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoneBefore');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
+            }
+        } else {
+            $content = $tokens[($stackPtr - 1)]['content'];
+            if ($content !== ' ') {
+                $length = strlen($content);
+                if ($length === 1) {
+                    $length = 'tab';
+                }
+
+                $error = 'Expected 1 space before opening brace of class definition; %s found';
+                $data  = array($length);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Before', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
+                }
+            }
+        }//end if
+
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
+        if ($next === false) {
+            return;
+        }
+
+        // Check for nested class definitions.
+        $nested = false;
+        $found  = $phpcsFile->findNext(
+            T_OPEN_CURLY_BRACKET,
+            ($stackPtr + 1),
+            $tokens[$stackPtr]['bracket_closer']
+        );
+
+        if ($found !== false) {
+            $nested = true;
+        }
+
+        if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) {
+            $error = 'Opening brace should be the last content on the line';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBefore');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($stackPtr);
+            }
+        } else {
+            $foundLines = ($tokens[$next]['line'] - $tokens[$stackPtr]['line'] - 1);
+            if ($nested === true) {
+                if ($foundLines !== 1) {
+                    $error = 'Expected 1 blank line after opening brace of nesting class definition; %s found';
+                    $data  = array($foundLines);
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'AfterNesting', $data);
+
+                    if ($fix === true) {
+                        if ($foundLines === 0) {
+                            $phpcsFile->fixer->addNewline($stackPtr);
+                        } else {
+                            $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                            $phpcsFile->fixer->beginChangeset();
+                            for ($i = ($stackPtr + 1); $i < ($next + 1); $i++) {
+                                $phpcsFile->fixer->replaceToken($i, '');
+                            }
+
+                            $phpcsFile->fixer->addNewline($stackPtr);
+                            $phpcsFile->fixer->endChangeset();
+                        }
+                    }
+                }//end if
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php	(revision 5534)
@@ -0,0 +1,118 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ColonSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ColonSpacingSniff.
+ *
+ * Ensure there is no space before a colon and one space after it.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ColonSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_COLON);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] !== T_STYLE) {
+            // The colon is not part of a style definition.
+            return;
+        }
+
+        if ($tokens[$prev]['content'] === 'progid') {
+            // Special case for IE filters.
+            return;
+        }
+
+        if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
+            $error = 'There must be no space before a colon in a style definition';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Before');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
+            }
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] === T_SEMICOLON) {
+            // Empty style definition, ignore it.
+            return;
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $error = 'Expected 1 space after colon in style definition; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoneAfter');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($stackPtr, ' ');
+            }
+        } else {
+            $content = $tokens[($stackPtr + 1)]['content'];
+            if (strpos($content, $phpcsFile->eolChar) === false) {
+                $length = strlen($content);
+                if ($length !== 1) {
+                    $error = 'Expected 1 space after colon in style definition; %s found';
+                    $data  = array($length);
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'After', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                    }
+                }
+            } else {
+                $error = 'Expected 1 space after colon in style definition; newline found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'AfterNewline');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php	(revision 5534)
@@ -0,0 +1,101 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ColourDefinitionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ColourDefinitionSniff.
+ *
+ * Ensure colours are defined in upper-case and use shortcuts where possible.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ColourDefinitionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_COLOUR);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $colour = $tokens[$stackPtr]['content'];
+
+        $expected = strtoupper($colour);
+        if ($colour !== $expected) {
+            $error = 'CSS colours must be defined in uppercase; expected %s but found %s';
+            $data  = array(
+                      $expected,
+                      $colour,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUpper', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $expected);
+            }
+        }
+
+        // Now check if shorthand can be used.
+        if (strlen($colour) !== 7) {
+            return;
+        }
+
+        if ($colour{1} === $colour{2} && $colour{3} === $colour{4} && $colour{5} === $colour{6}) {
+            $expected = '#'.$colour{1}.$colour{3}.$colour{5};
+            $error    = 'CSS colours must use shorthand if available; expected %s but found %s';
+            $data     = array(
+                         $expected,
+                         $colour,
+                        );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Shorthand', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $expected);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff.
+ *
+ * Ensure that each style definition is on a line by itself.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_DisallowMultipleStyleDefinitionsSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $next   = $phpcsFile->findNext(T_STYLE, ($stackPtr + 1));
+        if ($next === false) {
+            return;
+        }
+
+        if ($tokens[$next]['content'] === 'progid') {
+            // Special case for IE filters.
+            return;
+        }
+
+        if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) {
+            $error = 'Each style definition must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $next, 'Found');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewlineBefore($next);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php	(revision 5534)
@@ -0,0 +1,112 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff.
+ *
+ * Check for duplicate class definitions that can be merged into one.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_DuplicateClassDefinitionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Find the content of each class definition name.
+        $classNames = array();
+        $next       = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1));
+        if ($next === false) {
+            // No class definitions in the file.
+            return;
+        }
+
+        $find = array(
+                 T_CLOSE_CURLY_BRACKET,
+                 T_COMMENT,
+                 T_OPEN_TAG,
+                );
+
+        while ($next !== false) {
+            $prev = $phpcsFile->findPrevious($find, ($next - 1));
+
+            // Create a sorted name for the class so we can compare classes
+            // even when the individual names are all over the place.
+            $name = '';
+            for ($i = ($prev + 1); $i < $next; $i++) {
+                $name .= $tokens[$i]['content'];
+            }
+
+            $name = trim($name);
+            $name = str_replace("\n", ' ', $name);
+            $name = preg_replace('|[\s]+|', ' ', $name);
+            $name = str_replace(', ', ',', $name);
+
+            $names = explode(',', $name);
+            sort($names);
+            $name = implode(',', $names);
+
+            if (isset($classNames[$name]) === true) {
+                $first = $classNames[$name];
+                $error = 'Duplicate class definition found; first defined on line %s';
+                $data  = array($tokens[$first]['line']);
+                $phpcsFile->addError($error, $next, 'Found', $data);
+            } else {
+                $classNames[$name] = $next;
+            }
+
+            $next = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($next + 1));
+        }//end while
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php	(revision 5534)
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff.
+ *
+ * Check for duplicate style definitions in the same class.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_DuplicateStyleDefinitionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Find the content of each style definition name.
+        $styleNames = array();
+
+        $next = $stackPtr;
+        $end  = $tokens[$stackPtr]['bracket_closer'];
+
+        do {
+            $next = $phpcsFile->findNext(array(T_STYLE, T_OPEN_CURLY_BRACKET), ($next + 1), $end);
+            if ($next === false) {
+                // Class definition is empty.
+                break;
+            }
+
+            if ($tokens[$next]['code'] === T_OPEN_CURLY_BRACKET) {
+                $next = $tokens[$next]['bracket_closer'];
+                continue;
+            }
+
+            $name = $tokens[$next]['content'];
+            if (isset($styleNames[$name]) === true) {
+                $first = $styleNames[$name];
+                $error = 'Duplicate style definition found; first defined on line %s';
+                $data  = array($tokens[$first]['line']);
+                $phpcsFile->addError($error, $next, 'Found', $data);
+            } else {
+                $styleNames[$name] = $next;
+            }
+        } while ($next !== false);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php	(revision 5534)
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_EmptyClassDefinitionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_EmptyClassDefinitionSniff.
+ *
+ * Ensure that class definitions are not empty.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_EmptyClassDefinitionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $next   = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
+
+        if ($next === false || $tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) {
+            $error = 'Class definition is empty';
+            $phpcsFile->addError($error, $stackPtr, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php	(revision 5534)
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff.
+ *
+ * Ensure that style definitions are not empty.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $next   = $phpcsFile->findNext(array(T_WHITESPACE, T_COLON), ($stackPtr + 1), null, true);
+
+        if ($next === false || $tokens[$next]['code'] === T_SEMICOLON || $tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
+            $error = 'Style definition is empty';
+            $phpcsFile->addError($error, $stackPtr, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php	(revision 5534)
@@ -0,0 +1,190 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ForbiddenStylesSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ForbiddenStylesSniff.
+ *
+ * Bans the use of some styles, such as deprecated or browser-specific styles.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ForbiddenStylesSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+    /**
+     * A list of forbidden styles with their alternatives.
+     *
+     * The value is NULL if no alternative exists. i.e., the
+     * function should just not be used.
+     *
+     * @var array(string => string|null)
+     */
+    protected $forbiddenStyles = array(
+                                  '-moz-border-radius'             => 'border-radius',
+                                  '-webkit-border-radius'          => 'border-radius',
+                                  '-moz-border-radius-topleft'     => 'border-top-left-radius',
+                                  '-moz-border-radius-topright'    => 'border-top-right-radius',
+                                  '-moz-border-radius-bottomright' => 'border-bottom-right-radius',
+                                  '-moz-border-radius-bottomleft'  => 'border-bottom-left-radius',
+                                  '-moz-box-shadow'                => 'box-shadow',
+                                  '-webkit-box-shadow'             => 'box-shadow',
+                                 );
+
+    /**
+     * A cache of forbidden style names, for faster lookups.
+     *
+     * @var array(string)
+     */
+    protected $forbiddenStyleNames = array();
+
+    /**
+     * If true, forbidden styles will be considered regular expressions.
+     *
+     * @var bool
+     */
+    protected $patternMatch = false;
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = true;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        $this->forbiddenStyleNames = array_keys($this->forbiddenStyles);
+
+        if ($this->patternMatch === true) {
+            foreach ($this->forbiddenStyleNames as $i => $name) {
+                $this->forbiddenStyleNames[$i] = '/'.$name.'/i';
+            }
+        }
+
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens  = $phpcsFile->getTokens();
+        $style   = strtolower($tokens[$stackPtr]['content']);
+        $pattern = null;
+
+        if ($this->patternMatch === true) {
+            $count   = 0;
+            $pattern = preg_replace(
+                $this->forbiddenStyleNames,
+                $this->forbiddenStyleNames,
+                $style,
+                1,
+                $count
+            );
+
+            if ($count === 0) {
+                return;
+            }
+
+            // Remove the pattern delimiters and modifier.
+            $pattern = substr($pattern, 1, -2);
+        } else {
+            if (in_array($style, $this->forbiddenStyleNames) === false) {
+                return;
+            }
+        }//end if
+
+        $this->addError($phpcsFile, $stackPtr, $style, $pattern);
+
+    }//end process()
+
+
+    /**
+     * Generates the error or warning for this sniff.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the forbidden style
+     *                                        in the token array.
+     * @param string               $style     The name of the forbidden style.
+     * @param string               $pattern   The pattern used for the match.
+     *
+     * @return void
+     */
+    protected function addError($phpcsFile, $stackPtr, $style, $pattern=null)
+    {
+        $data  = array($style);
+        $error = 'The use of style %s is ';
+        if ($this->error === true) {
+            $type   = 'Found';
+            $error .= 'forbidden';
+        } else {
+            $type   = 'Discouraged';
+            $error .= 'discouraged';
+        }
+
+        if ($pattern === null) {
+            $pattern = $style;
+        }
+
+        if ($this->forbiddenStyles[$pattern] !== null) {
+            $data[] = $this->forbiddenStyles[$pattern];
+            if ($this->error === true) {
+                $fix = $phpcsFile->addFixableError($error.'; use %s instead', $stackPtr, $type.'WithAlternative', $data);
+            } else {
+                $fix = $phpcsFile->addFixableWarning($error.'; use %s instead', $stackPtr, $type.'WithAlternative', $data);
+            }
+
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $this->forbiddenStyles[$pattern]);
+            }
+        } else {
+            if ($this->error === true) {
+                $phpcsFile->addError($error, $stackPtr, $type, $data);
+            } else {
+                $phpcsFile->addWarning($error, $stackPtr, $type, $data);
+            }
+        }
+
+    }//end addError()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/IndentationSniff.php	(revision 5534)
@@ -0,0 +1,151 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_IndentationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_IndentationSniff.
+ *
+ * Ensures styles are indented 4 spaces.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_IndentationSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $numTokens    = (count($tokens) - 2);
+        $indentLevel  = 0;
+        $nestingLevel = 0;
+        for ($i = 1; $i < $numTokens; $i++) {
+            if ($tokens[$i]['code'] === T_COMMENT) {
+                // Don't check the indent of comments.
+                continue;
+            }
+
+            if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET) {
+                $indentLevel++;
+
+                // Check for nested class definitions.
+                $found = $phpcsFile->findNext(
+                    T_OPEN_CURLY_BRACKET,
+                    ($i + 1),
+                    $tokens[$i]['bracket_closer']
+                );
+
+                if ($found !== false) {
+                    $nestingLevel = $indentLevel;
+                }
+            }
+
+            if (($tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET
+                && $tokens[$i]['line'] !== $tokens[($i - 1)]['line'])
+                || ($tokens[($i + 1)]['code'] === T_CLOSE_CURLY_BRACKET
+                && $tokens[$i]['line'] === $tokens[($i + 1)]['line'])
+            ) {
+                $indentLevel--;
+                if ($indentLevel === 0) {
+                    $nestingLevel = 0;
+                }
+            }
+
+            if ($tokens[$i]['column'] !== 1) {
+                continue;
+            }
+
+            // We started a new line, so check indent.
+            if ($tokens[$i]['code'] === T_WHITESPACE) {
+                $content     = str_replace($phpcsFile->eolChar, '', $tokens[$i]['content']);
+                $foundIndent = strlen($content);
+            } else {
+                $foundIndent = 0;
+            }
+
+            $expectedIndent = ($indentLevel * $this->indent);
+            if ($expectedIndent > 0
+                && strpos($tokens[$i]['content'], $phpcsFile->eolChar) !== false
+            ) {
+                if ($nestingLevel !== $indentLevel) {
+                    $error = 'Blank lines are not allowed in class definitions';
+                    $fix   = $phpcsFile->addFixableError($error, $i, 'BlankLine');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+                }
+            } else if ($foundIndent !== $expectedIndent) {
+                $error = 'Line indented incorrectly; expected %s spaces, found %s';
+                $data  = array(
+                          $expectedIndent,
+                          $foundIndent,
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $i, 'Incorrect', $data);
+                if ($fix === true) {
+                    $indent = str_repeat(' ', $expectedIndent);
+                    if ($foundIndent === 0) {
+                        $phpcsFile->fixer->addContentBefore($i, $indent);
+                    } else {
+                        $phpcsFile->fixer->replaceToken($i, $indent);
+                    }
+                }
+            }//end if
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php	(revision 5534)
@@ -0,0 +1,110 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff.
+ *
+ * Ensure that all style definitions are in lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_LowercaseStyleDefinitionSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens  = $phpcsFile->getTokens();
+        $start   = ($stackPtr + 1);
+        $end     = ($tokens[$stackPtr]['bracket_closer'] - 1);
+        $inStyle = null;
+
+        for ($i = $start; $i <= $end; $i++) {
+            // Skip nested definitions as they are checked individually.
+            if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET) {
+                $i = $tokens[$i]['bracket_closer'];
+                continue;
+            }
+
+            if ($tokens[$i]['code'] === T_STYLE) {
+                $inStyle = $tokens[$i]['content'];
+            }
+
+            if ($tokens[$i]['code'] === T_SEMICOLON) {
+                $inStyle = null;
+            }
+
+            if ($inStyle === 'progid') {
+                // Special case for IE filters.
+                continue;
+            }
+
+            if ($tokens[$i]['code'] === T_STYLE
+                || ($inStyle !== null
+                && $tokens[$i]['code'] === T_STRING)
+            ) {
+                $expected = strtolower($tokens[$i]['content']);
+                if ($expected !== $tokens[$i]['content']) {
+                    $error = 'Style definitions must be lowercase; expected %s but found %s';
+                    $data  = array(
+                              $expected,
+                              $tokens[$i]['content'],
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $i, 'FoundUpper', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken($i, $expected);
+                    }
+                }
+            }
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php	(revision 5534)
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_MissingColonSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_MissingColonSniff.
+ *
+ * Ensure that all style definitions have a colon.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_MissingColonSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens   = $phpcsFile->getTokens();
+        $lastLine = $tokens[$stackPtr]['line'];
+        $end      = $tokens[$stackPtr]['bracket_closer'];
+        $endLine  = $tokens[$end]['line'];
+
+        // Do not check nested style definitions as, for example, in @media style rules.
+        $nested = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1), $end);
+        if ($nested !== false) {
+            return;
+        }
+
+        $foundColon  = false;
+        $foundString = false;
+        for ($i = ($stackPtr + 1); $i <= $end; $i++) {
+            if ($tokens[$i]['line'] !== $lastLine) {
+                // We changed lines.
+                if ($foundColon === false && $foundString !== false) {
+                    // We didn't find a colon on the previous line.
+                    $error = 'No style definition found on line; check for missing colon';
+                    $phpcsFile->addError($error, $foundString, 'Found');
+                }
+
+                $foundColon  = false;
+                $foundString = false;
+                $lastLine    = $tokens[$i]['line'];
+            }
+
+            if ($tokens[$i]['code'] === T_STRING) {
+                $foundString = $i;
+            } else if ($tokens[$i]['code'] === T_COLON) {
+                $foundColon = $i;
+            }
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php	(revision 5534)
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_NamedColoursSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_NamedColoursSniff.
+ *
+ * Ensure colour names are not used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_NamedColoursSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * A list of named colours.
+     *
+     * This is the list of standard colours defined in the CSS spec.
+     *
+     * @var array
+     */
+    public $colourNames = array(
+                           'aqua'    => 'aqua',
+                           'black'   => 'black',
+                           'blue'    => 'blue',
+                           'fuchsia' => 'fuchsia',
+                           'gray'    => 'gray',
+                           'green'   => 'green',
+                           'lime'    => 'lime',
+                           'maroon'  => 'maroon',
+                           'navy'    => 'navy',
+                           'olive'   => 'olive',
+                           'orange'  => 'orange',
+                           'purple'  => 'purple',
+                           'red'     => 'red',
+                           'silver'  => 'silver',
+                           'teal'    => 'teal',
+                           'white'   => 'white',
+                           'yellow'  => 'yellow',
+                          );
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[($stackPtr - 1)]['code'] === T_HASH
+            || $tokens[($stackPtr - 1)]['code'] === T_STRING_CONCAT
+        ) {
+            // Class name.
+            return;
+        }
+
+        if (isset($this->colourNames[strtolower($tokens[$stackPtr]['content'])]) === true) {
+            $error = 'Named colours are forbidden; use hex, rgb, or rgba values instead';
+            $phpcsFile->addError($error, $stackPtr, 'Forbidden');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/OpacitySniff.php	(revision 5534)
@@ -0,0 +1,110 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_OpacitySniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_OpacitySniff.
+ *
+ * Ensure that opacity values start with a 0 if it is not a whole number.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_OpacitySniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['content'] !== 'opacity') {
+            return;
+        }
+
+        $next = $phpcsFile->findNext(array(T_COLON, T_WHITESPACE), ($stackPtr + 1), null, true);
+
+        if ($next === false
+            || ($tokens[$next]['code'] !== T_DNUMBER
+            && $tokens[$next]['code'] !== T_LNUMBER)
+        ) {
+            return;
+        }
+
+        $value = $tokens[$next]['content'];
+        if ($tokens[$next]['code'] === T_LNUMBER) {
+            if ($value !== '0' && $value !== '1') {
+                $error = 'Opacity values must be between 0 and 1';
+                $phpcsFile->addError($error, $next, 'Invalid');
+            }
+        } else {
+            if (strlen($value) > 3) {
+                $error = 'Opacity values must have a single value after the decimal point';
+                $phpcsFile->addError($error, $next, 'SpacingAfterPoint');
+            } else if ($value === '0.0' || $value === '1.0') {
+                $error = 'Opacity value does not require decimal point; use %s instead';
+                $data  = array($value{0});
+                $fix   = $phpcsFile->addFixableError($error, $next, 'PointNotRequired', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($next, $value{0});
+                }
+            } else if ($value{0} === '.') {
+                $error = 'Opacity values must not start with a decimal point; use 0%s instead';
+                $data  = array($value);
+                $fix   = $phpcsFile->addFixableError($error, $next, 'StartWithPoint', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($next, '0'.$value);
+                }
+            } else if ($value{0} !== '0') {
+                $error = 'Opacity values must be between 0 and 1';
+                $phpcsFile->addError($error, $next, 'Invalid');
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_SemicolonSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_SemicolonSpacingSniff.
+ *
+ * Ensure each style definition has a semi-colon and it is spaced correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_SemicolonSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1));
+        if ($semicolon === false || $tokens[$semicolon]['line'] !== $tokens[$stackPtr]['line']) {
+            $error = 'Style definitions must end with a semicolon';
+            $phpcsFile->addError($error, $stackPtr, 'NotAtEnd');
+            return;
+        }
+
+        if ($tokens[($semicolon - 1)]['code'] === T_WHITESPACE) {
+            $length = strlen($tokens[($semicolon - 1)]['content']);
+            $error  = 'Expected 0 spaces before semicolon in style definition; %s found';
+            $data   = array($length);
+            $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceFound', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($semicolon - 1), '');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php	(revision 5534)
@@ -0,0 +1,191 @@
+<?php
+/**
+ * Squiz_Sniffs_CSS_ShorthandSizeSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_CSS_ShorthandSizeSniff.
+ *
+ * Ensure sizes are defined using shorthand notation where possible, except in the
+ * case where shorthand becomes 3 values.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_CSS_ShorthandSizeSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('CSS');
+
+    /**
+     * A list of styles that we shouldn't check.
+     *
+     * These have values that looks like sizes, but are not.
+     *
+     * @var array
+     */
+    public $excludeStyles = array(
+                             'background-position'      => 'background-position',
+                             'box-shadow'               => 'box-shadow',
+                             'transform-origin'         => 'transform-origin',
+                             '-webkit-transform-origin' => '-webkit-transform-origin',
+                             '-ms-transform-origin'     => '-ms-transform-origin',
+                            );
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_STYLE);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Some styles look like shorthand but are not actually a set of 4 sizes.
+        $style = strtolower($tokens[$stackPtr]['content']);
+        if (isset($this->excludeStyles[$style]) === true) {
+            return;
+        }
+
+        // Get the whole style content.
+        $end         = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1));
+        $origContent = $phpcsFile->getTokensAsString(($stackPtr + 1), ($end - $stackPtr - 1));
+        $origContent = trim($origContent, ': ');
+
+        // Account for a !important annotation.
+        $content = $origContent;
+        if (substr($content, -10) === '!important') {
+            $content = substr($content, 0, -10);
+            $content = trim($content);
+        }
+
+        // Check if this style value is a set of numbers with optional prefixes.
+        $content = preg_replace('/\s+/', ' ', $content);
+        $values  = array();
+        $num     = preg_match_all(
+            '/([0-9]+)([a-zA-Z]{2}\s+|%\s+|\s+)/',
+            $content.' ',
+            $values,
+            PREG_SET_ORDER
+        );
+
+        // Only interested in styles that have multiple sizes defined.
+        if ($num < 2) {
+            return;
+        }
+
+        // Rebuild the content we matched to ensure we got everything.
+        $matched = '';
+        foreach ($values as $value) {
+            $matched .= $value[0];
+        }
+
+        if ($content !== trim($matched)) {
+            return;
+        }
+
+        if ($num === 3) {
+            $expected = trim($content.' '.$values[1][1].$values[1][2]);
+            $error    = 'Shorthand syntax not allowed here; use %s instead';
+            $data     = array($expected);
+            $fix      = $phpcsFile->addFixableError($error, $stackPtr, 'NotAllowed', $data);
+
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                if (substr($origContent, -10) === '!important') {
+                    $expected .= ' !important';
+                }
+
+                $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 2), null, true);
+                $phpcsFile->fixer->replaceToken($next, $expected);
+                for ($next++; $next < $end; $next++) {
+                    $phpcsFile->fixer->replaceToken($next, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            return;
+        }//end if
+
+        if ($num === 2) {
+            if ($values[0][0] !== $values[1][0]) {
+                // Both values are different, so it is already shorthand.
+                return;
+            }
+        } else if ($values[0][0] !== $values[2][0] || $values[1][0] !== $values[3][0]) {
+            // Can't shorthand this.
+            return;
+        }
+
+        if ($values[0][0] === $values[1][0]) {
+            // All values are the same.
+            $expected = $values[0][0];
+        } else {
+            $expected = $values[0][0].' '.$values[1][0];
+        }
+
+        $expected = preg_replace('/\s+/', ' ', trim($expected));
+
+        $error = 'Size definitions must use shorthand if available; expected "%s" but found "%s"';
+        $data  = array(
+                  $expected,
+                  $content,
+                 );
+
+        $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUsed', $data);
+        if ($fix === true) {
+            $phpcsFile->fixer->beginChangeset();
+            if (substr($origContent, -10) === '!important') {
+                $expected .= ' !important';
+            }
+
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 2), null, true);
+            $phpcsFile->fixer->replaceToken($next, $expected);
+            for ($next++; $next < $end; $next++) {
+                $phpcsFile->fixer->replaceToken($next, '');
+            }
+
+            $phpcsFile->fixer->endChangeset();
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,219 @@
+<?php
+/**
+ * Class Declaration Test.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PSR2_Sniffs_Classes_ClassDeclarationSniff', true) === false) {
+    $error = 'Class PSR2_Sniffs_Classes_ClassDeclarationSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Class Declaration Test.
+ *
+ * Checks the declaration of the class and its inheritance is correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Classes_ClassDeclarationSniff extends PSR2_Sniffs_Classes_ClassDeclarationSniff
+{
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                         in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // We want all the errors from the PSR2 standard, plus some of our own.
+        parent::process($phpcsFile, $stackPtr);
+
+        $tokens = $phpcsFile->getTokens();
+
+        // Check that this is the only class or interface in the file.
+        $nextClass = $phpcsFile->findNext(array(T_CLASS, T_INTERFACE), ($stackPtr + 1));
+        if ($nextClass !== false) {
+            // We have another, so an error is thrown.
+            $error = 'Only one interface or class is allowed in a file';
+            $phpcsFile->addError($error, $nextClass, 'MultipleClasses');
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes the opening section of a class declaration.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function processOpen(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        parent::processOpen($phpcsFile, $stackPtr);
+
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
+            $prevContent = $tokens[($stackPtr - 1)]['content'];
+            if ($prevContent !== $phpcsFile->eolChar) {
+                $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar));
+                $spaces     = strlen($blankSpace);
+
+                if ($tokens[($stackPtr - 2)]['code'] !== T_ABSTRACT
+                    && $tokens[($stackPtr - 2)]['code'] !== T_FINAL
+                ) {
+                    if ($spaces !== 0) {
+                        $type  = strtolower($tokens[$stackPtr]['content']);
+                        $error = 'Expected 0 spaces before %s keyword; %s found';
+                        $data  = array(
+                                  $type,
+                                  $spaces,
+                                 );
+
+                        $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
+                        }
+                    }
+                }
+            }//end if
+        }//end if
+
+    }//end processOpen()
+
+
+    /**
+     * Processes the closing section of a class declaration.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function processClose(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            return;
+        }
+
+        $closeBrace = $tokens[$stackPtr]['scope_closer'];
+
+        // Check that the closing brace has one blank line after it.
+        for ($nextContent = ($closeBrace + 1); $nextContent < $phpcsFile->numTokens; $nextContent++) {
+            // Ignore comments on the same lines as the brace.
+            if ($tokens[$nextContent]['line'] === $tokens[$closeBrace]['line']
+                && ($tokens[$nextContent]['code'] === T_WHITESPACE
+                || $tokens[$nextContent]['code'] === T_COMMENT)
+            ) {
+                continue;
+            }
+
+            if ($tokens[$nextContent]['code'] !== T_WHITESPACE) {
+                break;
+            }
+        }
+
+        if ($nextContent === $phpcsFile->numTokens) {
+            // Ignore the line check as this is the very end of the file.
+            $difference = 1;
+        } else {
+            $difference = ($tokens[$nextContent]['line'] - $tokens[$closeBrace]['line'] - 1);
+        }
+
+        $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), $stackPtr, true);
+
+        if ($difference === -1
+            || $tokens[$lastContent]['line'] === $tokens[$closeBrace]['line']
+        ) {
+            $error = 'Closing %s brace must be on a line by itself';
+            $data  = array($tokens[$stackPtr]['content']);
+            $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'CloseBraceSameLine', $data);
+            if ($fix === true) {
+                if ($difference === -1) {
+                    $phpcsFile->fixer->addNewlineBefore($nextContent);
+                }
+
+                if ($tokens[$lastContent]['line'] === $tokens[$closeBrace]['line']) {
+                    $phpcsFile->fixer->addNewlineBefore($closeBrace);
+                }
+            }
+        } else if ($tokens[($closeBrace - 1)]['code'] === T_WHITESPACE) {
+            $prevContent = $tokens[($closeBrace - 1)]['content'];
+            if ($prevContent !== $phpcsFile->eolChar) {
+                $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar));
+                $spaces     = strlen($blankSpace);
+                if ($spaces !== 0) {
+                    if ($tokens[($closeBrace - 1)]['line'] !== $tokens[$closeBrace]['line']) {
+                        $error = 'Expected 0 spaces before closing brace; newline found';
+                        $phpcsFile->addError($error, $closeBrace, 'NewLineBeforeCloseBrace');
+                    } else {
+                        $error = 'Expected 0 spaces before closing brace; %s found';
+                        $data  = array($spaces);
+                        $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'SpaceBeforeCloseBrace', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($closeBrace - 1), '');
+                        }
+                    }
+                }
+            }
+        }//end if
+
+        if ($difference !== -1 && $difference !== 1) {
+            $error = 'Closing brace of a %s must be followed by a single blank line; found %s';
+            $data  = array(
+                      $tokens[$stackPtr]['content'],
+                      $difference,
+                     );
+            $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'NewlinesAfterCloseBrace', $data);
+            if ($fix === true) {
+                if ($difference === 0) {
+                    $first = $phpcsFile->findFirstOnLine(array(), $nextContent, true);
+                    $phpcsFile->fixer->addNewlineBefore($first);
+                } else {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($closeBrace + 1); $i < $nextContent; $i++) {
+                        if ($tokens[$i]['line'] <= ($tokens[$closeBrace]['line'] + 1)) {
+                            continue;
+                        } else if ($tokens[$i]['line'] === $tokens[$nextContent]['line']) {
+                            break;
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+        }//end if
+
+    }//end processClose()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Squiz_Sniffs_Classes_ClassFileNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Classes_ClassFileNameSniff.
+ *
+ * Tests that the file name and the name of the class contained within the file
+ * match.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Classes_ClassFileNameSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fullPath = basename($phpcsFile->getFilename());
+        $fileName = substr($fullPath, 0, strrpos($fullPath, '.'));
+        if ($fileName === '') {
+            // No filename probably means STDIN, so we can't do this check.
+            return;
+        }
+
+        $tokens  = $phpcsFile->getTokens();
+        $decName = $phpcsFile->findNext(T_STRING, $stackPtr);
+
+        if ($tokens[$decName]['content'] !== $fileName) {
+            $error = '%s name doesn\'t match filename; expected "%s %s"';
+            $data  = array(
+                      ucfirst($tokens[$stackPtr]['content']),
+                      $tokens[$stackPtr]['content'],
+                      $fileName,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php	(revision 5534)
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Squiz_Sniffs_Classes_DuplicatePropertySniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Classes_DuplicatePropertySniff.
+ *
+ * Ensures JS classes don't contain duplicate property names.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Classes_DuplicatePropertySniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OBJECT);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being processed.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $properties   = array();
+        $wantedTokens = array(
+                         T_PROPERTY,
+                         T_OBJECT,
+                        );
+
+        $next = $phpcsFile->findNext($wantedTokens, ($stackPtr + 1), $tokens[$stackPtr]['bracket_closer']);
+        while ($next !== false && $next < $tokens[$stackPtr]['bracket_closer']) {
+            if ($tokens[$next]['code'] === T_OBJECT) {
+                // Skip nested objects.
+                $next = $tokens[$next]['bracket_closer'];
+            } else {
+                $propName = $tokens[$next]['content'];
+                if (isset($properties[$propName]) === true) {
+                    $error = 'Duplicate property definition found for "%s"; previously defined on line %s';
+                    $data  = array(
+                              $propName,
+                              $tokens[$properties[$propName]]['line'],
+                             );
+                    $phpcsFile->addError($error, $next, 'Found', $data);
+                }
+
+                $properties[$propName] = $next;
+            }//end if
+
+            $next = $phpcsFile->findNext($wantedTokens, ($next + 1), $tokens[$stackPtr]['bracket_closer']);
+        }//end while
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php	(revision 5534)
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff.
+ *
+ * Ensures all class keywords are lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+                T_TRAIT,
+                T_EXTENDS,
+                T_IMPLEMENTS,
+                T_ABSTRACT,
+                T_FINAL,
+                T_VAR,
+                T_CONST,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $content = $tokens[$stackPtr]['content'];
+        if ($content !== strtolower($content)) {
+            $error = '%s keyword must be lowercase; expected "%s" but found "%s"';
+            $data  = array(
+                      strtoupper($content),
+                      strtolower($content),
+                      $content,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php	(revision 5534)
@@ -0,0 +1,188 @@
+<?php
+/**
+ * Squiz_Sniffs_Classes_ClassFileNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Tests self member references.
+ *
+ * Verifies that :
+ * <ul>
+ *  <li>self:: is used instead of Self::</li>
+ *  <li>self:: is used for local static member reference</li>
+ *  <li>self:: is used instead of self ::</li>
+ * </ul>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Classes_SelfMemberReferenceSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+
+    /**
+     * Constructs a Squiz_Sniffs_Classes_SelfMemberReferenceSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS), array(T_DOUBLE_COLON));
+
+    }//end __construct()
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     * @param int                  $currScope The current scope opener token.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $calledClassName = ($stackPtr - 1);
+        if ($tokens[$calledClassName]['code'] === T_SELF) {
+            if (strtolower($tokens[$calledClassName]['content']) !== $tokens[$calledClassName]['content']) {
+                $error = 'Must use "self::" for local static member reference; found "%s::"';
+                $data  = array($tokens[$calledClassName]['content']);
+                $phpcsFile->addError($error, $calledClassName, 'IncorrectCase', $data);
+                return;
+            }
+        } else if ($tokens[$calledClassName]['code'] === T_STRING) {
+            // If the class is called with a namespace prefix, build fully qualified
+            // namespace calls for both current scope class and requested class.
+            if ($tokens[($calledClassName - 1)]['code'] === T_NS_SEPARATOR) {
+                $declarationName         = $this->getDeclarationNameWithNamespace($tokens, $calledClassName);
+                $declarationName         = substr($declarationName, 1);
+                $fullQualifiedClassName  = $this->getNamespaceOfScope($phpcsFile, $currScope);
+                $fullQualifiedClassName .= '\\'.$phpcsFile->getDeclarationName($currScope);
+            } else {
+                $declarationName        = $phpcsFile->getDeclarationName($currScope);
+                $fullQualifiedClassName = $tokens[$calledClassName]['content'];
+            }
+
+            if ($declarationName === $fullQualifiedClassName) {
+                // Class name is the same as the current class, which is not allowed
+                // except if being used inside a closure.
+                if ($phpcsFile->hasCondition($stackPtr, T_CLOSURE) === false) {
+                    $error = 'Must use "self::" for local static member reference';
+                    $fix   = $phpcsFile->addFixableError($error, $calledClassName, 'NotUsed');
+
+                    if ($fix === true) {
+                        $prev = $phpcsFile->findPrevious(array(T_NS_SEPARATOR, T_STRING), ($stackPtr - 1), null, true);
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prev + 1); $i < $stackPtr; $i++) {
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->replaceToken($stackPtr, 'self::');
+                        $phpcsFile->fixer->endChangeset();
+                    }
+
+                    return;
+                }
+            }//end if
+        }//end if
+
+        if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
+            $found = strlen($tokens[($stackPtr - 1)]['content']);
+            $error = 'Expected 0 spaces before double colon; %s found';
+            $data  = array($found);
+            $fix   = $phpcsFile->addFixableError($error, $calledClassName, 'SpaceBefore', $data);
+
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
+            }
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
+            $found = strlen($tokens[($stackPtr + 1)]['content']);
+            $error = 'Expected 0 spaces after double colon; %s found';
+            $data  = array($found);
+            $fix   = $phpcsFile->addFixableError($error, $calledClassName, 'SpaceAfter', $data);
+
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
+            }
+        }
+
+    }//end processTokenWithinScope()
+
+
+    /**
+     * Returns the declaration names for classes/interfaces/functions with a namespace.
+     *
+     * @param array $tokens   Token stack for this file
+     * @param int   $stackPtr The position where the namespace building will start.
+     *
+     * @return string
+     */
+    protected function getDeclarationNameWithNamespace(array $tokens, $stackPtr)
+    {
+        $nameParts      = array();
+        $currentPointer = $stackPtr;
+        while ($tokens[$currentPointer]['code'] === T_NS_SEPARATOR
+            || $tokens[$currentPointer]['code'] === T_STRING
+        ) {
+            $nameParts[] = $tokens[$currentPointer]['content'];
+            $currentPointer--;
+        }
+
+        $nameParts = array_reverse($nameParts);
+        return implode('', $nameParts);
+
+    }//end getDeclarationNameWithNamespace()
+
+
+    /**
+     * Returns the namespace declaration of a file.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the search for the
+     *                                        namespace declaration will start.
+     *
+     * @return string
+     */
+    protected function getNamespaceOfScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $namespace            = '\\';
+        $namespaceDeclaration = $phpcsFile->findPrevious(T_NAMESPACE, $stackPtr);
+
+        if ($namespaceDeclaration !== false) {
+            $endOfNamespaceDeclaration = $phpcsFile->findNext(T_SEMICOLON, $namespaceDeclaration);
+            $namespace = $this->getDeclarationNameWithNamespace(
+                $phpcsFile->getTokens(),
+                ($endOfNamespaceDeclaration - 1)
+            );
+        }
+
+        return $namespace;
+
+    }//end getNamespaceOfScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php	(revision 5534)
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Squiz_Sniffs_Classes_ValidClassNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Classes_ValidClassNameSniff.
+ *
+ * Ensures classes are in camel caps, and the first letter is capitalised
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Classes_ValidClassNameSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CLASS,
+                T_INTERFACE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being processed.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            $error = 'Possible parse error: %s missing opening or closing brace';
+            $data  = array($tokens[$stackPtr]['content']);
+            $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $data);
+            return;
+        }
+
+        // Determine the name of the class or interface. Note that we cannot
+        // simply look for the first T_STRING because a class name
+        // starting with the number will be multiple tokens.
+        $opener    = $tokens[$stackPtr]['scope_opener'];
+        $nameStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), $opener, true);
+        $nameEnd   = $phpcsFile->findNext(T_WHITESPACE, $nameStart, $opener);
+        if ($nameEnd === false) {
+            $name = $tokens[$nameStart]['content'];
+        } else {
+            $name = trim($phpcsFile->getTokensAsString($nameStart, ($nameEnd - $nameStart)));
+        }
+
+        // Check for camel caps format.
+        $valid = PHP_CodeSniffer::isCamelCaps($name, true, true, false);
+        if ($valid === false) {
+            $type  = ucfirst($tokens[$stackPtr]['content']);
+            $error = '%s name "%s" is not in camel caps format';
+            $data  = array(
+                      $type,
+                      $name,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data);
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase class name', 'no');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'CamelCase class name', 'yes');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php	(revision 5534)
@@ -0,0 +1,315 @@
+<?php
+/**
+ * Squiz_Sniffs_Commenting_BlockCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Commenting_BlockCommentSniff.
+ *
+ * Verifies that block comments are used appropriately.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_BlockCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_COMMENT,
+                T_DOC_COMMENT_OPEN_TAG,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // If it's an inline comment, return.
+        if (substr($tokens[$stackPtr]['content'], 0, 2) !== '/*') {
+            return;
+        }
+
+        // If this is a function/class/interface doc block comment, skip it.
+        // We are only interested in inline doc block comments.
+        if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
+            $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
+            $ignore    = array(
+                          T_CLASS     => true,
+                          T_INTERFACE => true,
+                          T_TRAIT     => true,
+                          T_FUNCTION  => true,
+                          T_PUBLIC    => true,
+                          T_PRIVATE   => true,
+                          T_FINAL     => true,
+                          T_PROTECTED => true,
+                          T_STATIC    => true,
+                          T_ABSTRACT  => true,
+                          T_CONST     => true,
+                          T_VAR       => true,
+                         );
+            if (isset($ignore[$tokens[$nextToken]['code']]) === true) {
+                return;
+            }
+
+            $prevToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+            if ($tokens[$prevToken]['code'] === T_OPEN_TAG) {
+                return;
+            }
+
+            $error = 'Block comments must be started with /*';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStart');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, '/*');
+            }
+
+            $end = $tokens[$stackPtr]['comment_closer'];
+            if ($tokens[$end]['content'] !== '*/') {
+                $error = 'Block comments must be ended with */';
+                $fix   = $phpcsFile->addFixableError($error, $end, 'WrongEnd');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($end, '*/');
+                }
+            }
+
+            return;
+        }//end if
+
+        $commentLines  = array($stackPtr);
+        $nextComment   = $stackPtr;
+        $lastLine      = $tokens[$stackPtr]['line'];
+        $commentString = $tokens[$stackPtr]['content'];
+
+        // Construct the comment into an array.
+        while (($nextComment = $phpcsFile->findNext(T_WHITESPACE, ($nextComment + 1), null, true)) !== false) {
+            if ($tokens[$nextComment]['code'] !== $tokens[$stackPtr]['code']) {
+                // Found the next bit of code.
+                break;
+            }
+
+            if (($tokens[$nextComment]['line'] - 1) !== $lastLine) {
+                // Not part of the block.
+                break;
+            }
+
+            $lastLine       = $tokens[$nextComment]['line'];
+            $commentLines[] = $nextComment;
+            $commentString .= $tokens[$nextComment]['content'];
+            if ($tokens[$nextComment]['code'] === T_DOC_COMMENT_CLOSE_TAG) {
+                break;
+            }
+        }
+
+        $commentText = str_replace($phpcsFile->eolChar, '', $commentString);
+        $commentText = trim($commentText, '/* ');
+        if ($commentText === '') {
+            $error = 'Empty block comment not allowed';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Empty');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->replaceToken($stackPtr, '');
+                $lastToken = array_pop($commentLines);
+                for ($i = ($stackPtr + 1); $i <= $lastToken; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            return;
+        }
+
+        if (count($commentLines) === 1) {
+            $error = 'Single line block comment not allowed; use inline ("// text") comment instead';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SingleLine');
+            if ($fix === true) {
+                $comment = '// '.$commentText.$phpcsFile->eolChar;
+                $phpcsFile->fixer->replaceToken($stackPtr, $comment);
+            }
+
+            return;
+        }
+
+        $content = trim($tokens[$stackPtr]['content']);
+        if ($content !== '/*' && $content !== '/**') {
+            $error = 'Block comment text must start on a new line';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoNewLine');
+            if ($fix === true) {
+                $comment = preg_replace(
+                    '/^(\s*\/\*\*?)/',
+                    '$1'.$phpcsFile->eolChar.' ',
+                    $tokens[$stackPtr]['content'],
+                    1
+                );
+                $phpcsFile->fixer->replaceToken($stackPtr, $comment);
+            }
+
+            return;
+        }
+
+        $starColumn = ($tokens[$stackPtr]['column'] + 3);
+
+        // Make sure first line isn't blank.
+        if (trim($tokens[$commentLines[1]]['content']) === '') {
+            $error = 'Empty line not allowed at start of comment';
+            $fix   = $phpcsFile->addFixableError($error, $commentLines[1], 'HasEmptyLine');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($commentLines[1], '');
+            }
+        } else {
+            // Check indentation of first line.
+            $content      = $tokens[$commentLines[1]]['content'];
+            $commentText  = ltrim($content);
+            $leadingSpace = (strlen($content) - strlen($commentText));
+            if ($leadingSpace !== $starColumn) {
+                $expected = $starColumn.' space';
+                if ($starColumn !== 1) {
+                    $expected .= 's';
+                }
+
+                $data = array(
+                         $expected,
+                         $leadingSpace,
+                        );
+
+                $error = 'First line of comment not aligned correctly; expected %s but found %s';
+                $fix   = $phpcsFile->addFixableError($error, $commentLines[1], 'FirstLineIndent', $data);
+                if ($fix === true) {
+                    $newContent = str_repeat(' ', $starColumn).ltrim($content);
+                    $phpcsFile->fixer->replaceToken($commentLines[1], $newContent);
+                }
+            }
+
+            if (preg_match('/^\p{Ll}/u', $commentText) === 1) {
+                $error = 'Block comments must start with a capital letter';
+                $phpcsFile->addError($error, $commentLines[1], 'NoCapital');
+            }
+        }//end if
+
+        // Check that each line of the comment is indented past the star.
+        foreach ($commentLines as $line) {
+            $leadingSpace = (strlen($tokens[$line]['content']) - strlen(ltrim($tokens[$line]['content'])));
+            // First and last lines (comment opener and closer) are handled separately.
+            if ($line === $commentLines[(count($commentLines) - 1)] || $line === $commentLines[0]) {
+                continue;
+            }
+
+            // First comment line was handled above.
+            if ($line === $commentLines[1]) {
+                continue;
+            }
+
+            // If it's empty, continue.
+            if (trim($tokens[$line]['content']) === '') {
+                continue;
+            }
+
+            if ($leadingSpace < $starColumn) {
+                $expected = $starColumn.' space';
+                if ($starColumn !== 1) {
+                    $expected .= 's';
+                }
+
+                $data = array(
+                         $expected,
+                         $leadingSpace,
+                        );
+
+                $error = 'Comment line indented incorrectly; expected at least %s but found %s';
+                $fix   = $phpcsFile->addFixableError($error, $line, 'LineIndent', $data);
+                if ($fix === true) {
+                    $newContent = str_repeat(' ', $starColumn).ltrim($tokens[$line]['content']);
+                    $phpcsFile->fixer->replaceToken($line, $newContent);
+                }
+            }
+        }//end foreach
+
+        // Finally, test the last line is correct.
+        $lastIndex = (count($commentLines) - 1);
+        $content   = trim($tokens[$commentLines[$lastIndex]]['content']);
+        if ($content !== '*/' && $content !== '**/') {
+            $error = 'Comment closer must be on a new line';
+            $phpcsFile->addError($error, $commentLines[$lastIndex]);
+        } else {
+            $content      = $tokens[$commentLines[$lastIndex]]['content'];
+            $commentText  = ltrim($content);
+            $leadingSpace = (strlen($content) - strlen($commentText));
+            if ($leadingSpace !== ($tokens[$stackPtr]['column'] - 1)) {
+                $expected = ($tokens[$stackPtr]['column'] - 1);
+                if ($expected === 1) {
+                    $expected .= ' space';
+                } else {
+                    $expected .= ' spaces';
+                }
+
+                $data = array(
+                         $expected,
+                         $leadingSpace,
+                        );
+
+                $error = 'Last line of comment aligned incorrectly; expected %s but found %s';
+                $phpcsFile->addError($error, $commentLines[$lastIndex], 'LastLineIndent', $data);
+            }
+        }//end if
+
+        // Check that the lines before and after this comment are blank.
+        $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if (isset($tokens[$contentBefore]['scope_closer']) === true
+            && $tokens[$contentBefore]['scope_opener'] === $contentBefore
+        ) {
+            if (($tokens[$stackPtr]['line'] - $tokens[$contentBefore]['line']) !== 1) {
+                $error = 'Empty line not required before block comment';
+                $phpcsFile->addError($error, $stackPtr, 'HasEmptyLineBefore');
+            }
+        } else {
+            if (($tokens[$stackPtr]['line'] - $tokens[$contentBefore]['line']) < 2) {
+                $error = 'Empty line required before block comment';
+                $phpcsFile->addError($error, $stackPtr, 'NoEmptyLineBefore');
+            }
+        }
+
+        $commentCloser = $commentLines[$lastIndex];
+        $contentAfter  = $phpcsFile->findNext(T_WHITESPACE, ($commentCloser + 1), null, true);
+        if ($contentAfter !== false && ($tokens[$contentAfter]['line'] - $tokens[$commentCloser]['line']) < 2) {
+            $error = 'Empty line required after block comment';
+            $phpcsFile->addError($error, $commentCloser, 'NoEmptyLineAfter');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php	(revision 5534)
@@ -0,0 +1,119 @@
+<?php
+/**
+ * Parses and verifies the class doc comment.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Parses and verifies the class doc comment.
+ *
+ * Verifies that :
+ * <ul>
+ *  <li>A class doc comment exists.</li>
+ *  <li>There is exactly one blank line before the class comment.</li>
+ *  <li>There are no blank lines after the class comment.</li>
+ *  <li>Short and long descriptions end with a full stop and start with capital letter.</li>
+ *  <li>There is a blank line between descriptions.</li>
+ * </ul>
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_ClassCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_CLASS);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        $find   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $find[] = T_WHITESPACE;
+
+        $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true);
+        if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG
+            && $tokens[$commentEnd]['code'] !== T_COMMENT
+        ) {
+            $phpcsFile->addError('Missing class doc comment', $stackPtr, 'Missing');
+            return;
+        }
+
+        // Try and determine if this is a file comment instead of a class comment.
+        // We assume that if this is the first comment after the open PHP tag, then
+        // it is most likely a file comment instead of a class comment.
+        if ($tokens[$commentEnd]['code'] === T_DOC_COMMENT_CLOSE_TAG) {
+            $start = ($tokens[$commentEnd]['comment_opener'] - 1);
+        } else {
+            $start = $phpcsFile->findPrevious(T_COMMENT, ($commentEnd - 1), null, true);
+        }
+
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, $start, null, true);
+        if ($tokens[$prev]['code'] === T_OPEN_TAG) {
+            $prevOpen = $phpcsFile->findPrevious(T_OPEN_TAG, ($prev - 1));
+            if ($prevOpen === false) {
+                // This is a comment directly after the first open tag,
+                // so probably a file comment.
+                $phpcsFile->addError('Missing class doc comment', $stackPtr, 'Missing');
+                return;
+            }
+        }
+
+        if ($tokens[$commentEnd]['code'] === T_COMMENT) {
+            $phpcsFile->addError('You must use "/**" style comments for a class comment', $stackPtr, 'WrongStyle');
+            return;
+        }
+
+        if ($tokens[$commentEnd]['line'] !== ($tokens[$stackPtr]['line'] - 1)) {
+            $error = 'There must be no blank lines after the class comment';
+            $phpcsFile->addError($error, $commentEnd, 'SpacingAfter');
+        }
+
+        $commentStart = $tokens[$commentEnd]['comment_opener'];
+        if ($tokens[$prev]['line'] !== ($tokens[$commentStart]['line'] - 2)) {
+            $error = 'There must be exactly one blank line before the class comment';
+            $phpcsFile->addError($error, $commentStart, 'SpacingBefore');
+        }
+
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            $error = '%s tag is not allowed in class comment';
+            $data  = array($tokens[$tag]['content']);
+            $phpcsFile->addWarning($error, $tag, 'TagNotAllowed', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php	(revision 5534)
@@ -0,0 +1,149 @@
+<?php
+/**
+ * Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff.
+ *
+ * Checks the //end ... comments on classes, interfaces and functions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLASS,
+                T_INTERFACE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens..
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['code'] === T_FUNCTION) {
+            $methodProps = $phpcsFile->getMethodProperties($stackPtr);
+
+            // Abstract methods do not require a closing comment.
+            if ($methodProps['is_abstract'] === true) {
+                return;
+            }
+
+            // Closures do not require a closing comment.
+            if ($methodProps['is_closure'] === true) {
+                return;
+            }
+
+            // If this function is in an interface then we don't require
+            // a closing comment.
+            if ($phpcsFile->hasCondition($stackPtr, T_INTERFACE) === true) {
+                return;
+            }
+
+            if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+                $error = 'Possible parse error: non-abstract method defined as abstract';
+                $phpcsFile->addWarning($error, $stackPtr, 'Abstract');
+                return;
+            }
+
+            $decName = $phpcsFile->getDeclarationName($stackPtr);
+            $comment = '//end '.$decName.'()';
+        } else if ($tokens[$stackPtr]['code'] === T_CLASS) {
+            $comment = '//end class';
+        } else {
+            $comment = '//end interface';
+        }//end if
+
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            $error = 'Possible parse error: %s missing opening or closing brace';
+            $data  = array($tokens[$stackPtr]['content']);
+            $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $data);
+            return;
+        }
+
+        $closingBracket = $tokens[$stackPtr]['scope_closer'];
+
+        if ($closingBracket === null) {
+            // Possible inline structure. Other tests will handle it.
+            return;
+        }
+
+        $error = 'Expected '.$comment;
+        if (isset($tokens[($closingBracket + 1)]) === false || $tokens[($closingBracket + 1)]['code'] !== T_COMMENT) {
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($closingBracket + 1), null, true);
+            if (rtrim($tokens[$next]['content']) === $comment) {
+                // The comment isn't really missing; it is just in the wrong place.
+                $fix = $phpcsFile->addFixableError($error.' directly after closing brace', $closingBracket, 'Misplaced');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($closingBracket + 1); $i < $next; $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    // Just in case, because indentation fixes can add indents onto
+                    // these comments and cause us to be unable to fix them.
+                    $phpcsFile->fixer->replaceToken($next, $comment.$phpcsFile->eolChar);
+                    $phpcsFile->fixer->endChangeset();
+                }
+            } else {
+                $fix = $phpcsFile->addFixableError($error, $closingBracket, 'Missing');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($closingBracket, '}'.$comment.$phpcsFile->eolChar);
+                }
+            }
+
+            return;
+        }//end if
+
+        if (rtrim($tokens[($closingBracket + 1)]['content']) !== $comment) {
+            $fix = $phpcsFile->addFixableError($error, $closingBracket, 'Incorrect');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($closingBracket + 1), $comment.$phpcsFile->eolChar);
+            }
+
+            return;
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php	(revision 5534)
@@ -0,0 +1,166 @@
+<?php
+/**
+ * Squiz_Sniffs_Commenting_EmptyCatchCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Commenting_DocCommentAlignmentSniff.
+ *
+ * Tests that the stars in a doc comment align correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_DocCommentAlignmentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_DOC_COMMENT_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                         in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // We are only interested in function/class/interface doc block comments.
+        $ignore = PHP_CodeSniffer_Tokens::$emptyTokens;
+        if ($phpcsFile->tokenizerType === 'JS') {
+            $ignore[] = T_EQUAL;
+            $ignore[] = T_STRING;
+            $ignore[] = T_OBJECT_OPERATOR;
+        }
+
+        $nextToken = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true);
+        $ignore    = array(
+                      T_CLASS     => true,
+                      T_INTERFACE => true,
+                      T_FUNCTION  => true,
+                      T_PUBLIC    => true,
+                      T_PRIVATE   => true,
+                      T_PROTECTED => true,
+                      T_STATIC    => true,
+                      T_ABSTRACT  => true,
+                      T_PROPERTY  => true,
+                      T_OBJECT    => true,
+                      T_PROTOTYPE => true,
+                     );
+
+        if (isset($ignore[$tokens[$nextToken]['code']]) === false) {
+            // Could be a file comment.
+            $prevToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+            if ($tokens[$prevToken]['code'] !== T_OPEN_TAG) {
+                return;
+            }
+        }
+
+        // There must be one space after each star (unless it is an empty comment line)
+        // and all the stars must be aligned correctly.
+        $requiredColumn = ($tokens[$stackPtr]['column'] + 1);
+        $endComment     = $tokens[$stackPtr]['comment_closer'];
+        for ($i = ($stackPtr + 1); $i <= $endComment; $i++) {
+            if ($tokens[$i]['code'] !== T_DOC_COMMENT_STAR
+                && $tokens[$i]['code'] !== T_DOC_COMMENT_CLOSE_TAG
+            ) {
+                continue;
+            }
+
+            if ($tokens[$i]['code'] === T_DOC_COMMENT_CLOSE_TAG) {
+                // Can't process the close tag if it is not the first thing on the line.
+                $prev = $phpcsFile->findPrevious(T_DOC_COMMENT_WHITESPACE, ($i - 1), $stackPtr, true);
+                if ($tokens[$prev]['line'] === $tokens[$i]['line']) {
+                    continue;
+                }
+            }
+
+            if ($tokens[$i]['column'] !== $requiredColumn) {
+                $error = 'Expected %s space(s) before asterisk; %s found';
+                $data  = array(
+                          ($requiredColumn - 1),
+                          ($tokens[$i]['column'] - 1),
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeStar', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', ($requiredColumn - 1));
+                    if ($tokens[$i]['column'] === 1) {
+                        $phpcsFile->fixer->addContentBefore($i, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($i - 1), $padding);
+                    }
+                }
+            }
+
+            if ($tokens[$i]['code'] !== T_DOC_COMMENT_STAR) {
+                continue;
+            }
+
+            if ($tokens[($i + 2)]['line'] !== $tokens[$i]['line']) {
+                // Line is empty.
+                continue;
+            }
+
+            if ($tokens[($i + 1)]['code'] !== T_DOC_COMMENT_WHITESPACE) {
+                $error = 'Expected 1 space after asterisk; 0 found';
+                $fix   = $phpcsFile->addFixableError($error, $i, 'NoSpaceAfterStar');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContent($i, ' ');
+                }
+            } else if ($tokens[($i + 2)]['code'] === T_DOC_COMMENT_TAG
+                && $tokens[($i + 1)]['content'] !== ' '
+            ) {
+                $error = 'Expected 1 space after asterisk; %s found';
+                $data  = array(strlen($tokens[($i + 1)]['content']));
+                $fix   = $phpcsFile->addFixableError($error, $i, 'SpaceAfterStar', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($i + 1), ' ');
+                }
+            }
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php	(revision 5534)
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Squiz_Sniffs_Commenting_EmptyCatchCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Commenting_EmptyCatchCommentSniff.
+ *
+ * Checks for empty Catch clause. Catch clause must at least have comment
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_EmptyCatchCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_CATCH);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $scopeStart   = $tokens[$stackPtr]['scope_opener'];
+        $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($scopeStart + 1), $tokens[$stackPtr]['scope_closer'], true);
+
+        if ($firstContent === false) {
+            $error = 'Empty CATCH statement must have a comment to explain why the exception is not handled';
+            $phpcsFile->addError($error, $scopeStart, 'Missing');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php	(revision 5534)
@@ -0,0 +1,185 @@
+<?php
+/**
+ * Parses and verifies the file doc comment.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Parses and verifies the file doc comment.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+class Squiz_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->currentFile = $phpcsFile;
+
+        $tokens       = $phpcsFile->getTokens();
+        $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+
+        if ($tokens[$commentStart]['code'] === T_COMMENT) {
+            $phpcsFile->addError('You must use "/**" style comments for a file comment', $commentStart, 'WrongStyle');
+            return ($phpcsFile->numTokens + 1);
+        } else if ($commentStart === false || $tokens[$commentStart]['code'] !== T_DOC_COMMENT_OPEN_TAG) {
+            $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing');
+            return ($phpcsFile->numTokens + 1);
+        }
+
+        $commentEnd = $tokens[$commentStart]['comment_closer'];
+
+        // No blank line between the open tag and the file comment.
+        if ($tokens[$commentStart]['line'] > ($tokens[$stackPtr]['line'] + 1)) {
+            $error = 'There must be no blank lines before the file comment';
+            $phpcsFile->addError($error, $stackPtr, 'SpacingAfterOpen');
+        }
+
+        // Exactly one blank line after the file comment.
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($commentEnd + 1), null, true);
+        if ($tokens[$next]['line'] !== ($tokens[$commentEnd]['line'] + 2)) {
+            $error = 'There must be exactly one blank line after the file comment';
+            $phpcsFile->addError($error, $commentEnd, 'SpacingAfterComment');
+        }
+
+        // Required tags in correct order.
+        $required = array(
+                     '@package'    => true,
+                     '@subpackage' => true,
+                     '@author'     => true,
+                     '@copyright'  => true,
+                    );
+
+        $foundTags = array();
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            $name       = $tokens[$tag]['content'];
+            $isRequired = isset($required[$name]);
+
+            if ($isRequired === true && in_array($name, $foundTags) === true) {
+                $error = 'Only one %s tag is allowed in a file comment';
+                $data  = array($name);
+                $phpcsFile->addError($error, $tag, 'Duplicate'.ucfirst(substr($name, 1)).'Tag', $data);
+            }
+
+            $foundTags[] = $name;
+
+            if ($isRequired === false) {
+                continue;
+            }
+
+            $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd);
+            if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) {
+                $error = 'Content missing for %s tag in file comment';
+                $data  = array($name);
+                $phpcsFile->addError($error, $tag, 'Empty'.ucfirst(substr($name, 1)).'Tag', $data);
+                continue;
+            }
+
+            if ($name === '@author') {
+                if ($tokens[$string]['content'] !== 'Squiz Pty Ltd <products@squiz.net>') {
+                    $error = 'Expected "Squiz Pty Ltd <products@squiz.net>" for author tag';
+                    $fix   = $phpcsFile->addFixableError($error, $tag, 'IncorrectAuthor');
+                    if ($fix === true) {
+                        $expected = 'Squiz Pty Ltd <products@squiz.net>';
+                        $phpcsFile->fixer->replaceToken($string, $expected);
+                    }
+                }
+            } else if ($name === '@copyright') {
+                if (preg_match('/^([0-9]{4})(-[0-9]{4})? (Squiz Pty Ltd \(ABN 77 084 670 600\))$/', $tokens[$string]['content']) === 0) {
+                    $error = 'Expected "xxxx-xxxx Squiz Pty Ltd (ABN 77 084 670 600)" for copyright declaration';
+                    $fix   = $phpcsFile->addFixableError($error, $tag, 'IncorrectCopyright');
+                    if ($fix === true) {
+                        $matches = array();
+                        preg_match('/^(([0-9]{4})(-[0-9]{4})?)?.*$/', $tokens[$string]['content'], $matches);
+                        if (isset($matches[1]) === false) {
+                            $matches[1] = date('Y');
+                        }
+
+                        $expected = $matches[1].' Squiz Pty Ltd (ABN 77 084 670 600)';
+                        $phpcsFile->fixer->replaceToken($string, $expected);
+                    }
+                }
+            }//end if
+        }//end foreach
+
+        // Check if the tags are in the correct position.
+        $pos = 0;
+        foreach ($required as $tag => $true) {
+            if (in_array($tag, $foundTags) === false) {
+                $error = 'Missing %s tag in file comment';
+                $data  = array($tag);
+                $phpcsFile->addError($error, $commentEnd, 'Missing'.ucfirst(substr($tag, 1)).'Tag', $data);
+            }
+
+            if (isset($foundTags[$pos]) === false) {
+                break;
+            }
+
+            if ($foundTags[$pos] !== $tag) {
+                $error = 'The tag in position %s should be the %s tag';
+                $data  = array(
+                          ($pos + 1),
+                          $tag,
+                         );
+                $phpcsFile->addError($error, $tokens[$commentStart]['comment_tags'][$pos], ucfirst(substr($tag, 1)).'TagOrder', $data);
+            }
+
+            $pos++;
+        }//end foreach
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php	(revision 5534)
@@ -0,0 +1,575 @@
+<?php
+/**
+ * Parses and verifies the doc comments for functions.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PEAR_Sniffs_Commenting_FunctionCommentSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PEAR_Sniffs_Commenting_FunctionCommentSniff not found');
+}
+
+/**
+ * Parses and verifies the doc comments for functions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_FunctionCommentSniff extends PEAR_Sniffs_Commenting_FunctionCommentSniff
+{
+
+
+    /**
+     * Process the return comment of this function comment.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart The position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processReturn(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Skip constructor and destructor.
+        $methodName      = $phpcsFile->getDeclarationName($stackPtr);
+        $isSpecialMethod = ($methodName === '__construct' || $methodName === '__destruct');
+
+        $return = null;
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] === '@return') {
+                if ($return !== null) {
+                    $error = 'Only 1 @return tag is allowed in a function comment';
+                    $phpcsFile->addError($error, $tag, 'DuplicateReturn');
+                    return;
+                }
+
+                $return = $tag;
+            }
+        }
+
+        if ($isSpecialMethod === true) {
+            return;
+        }
+
+        if ($return !== null) {
+            $content = $tokens[($return + 2)]['content'];
+            if (empty($content) === true || $tokens[($return + 2)]['code'] !== T_DOC_COMMENT_STRING) {
+                $error = 'Return type missing for @return tag in function comment';
+                $phpcsFile->addError($error, $return, 'MissingReturnType');
+            } else {
+                // Check return type (can be multiple, separated by '|').
+                $typeNames      = explode('|', $content);
+                $suggestedNames = array();
+                foreach ($typeNames as $i => $typeName) {
+                    $suggestedName = PHP_CodeSniffer::suggestType($typeName);
+                    if (in_array($suggestedName, $suggestedNames) === false) {
+                        $suggestedNames[] = $suggestedName;
+                    }
+                }
+
+                $suggestedType = implode('|', $suggestedNames);
+                if ($content !== $suggestedType) {
+                    $error = 'Expected "%s" but found "%s" for function return type';
+                    $data  = array(
+                              $suggestedType,
+                              $content,
+                             );
+                    $fix   = $phpcsFile->addFixableError($error, $return, 'InvalidReturn', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($return + 2), $suggestedType);
+                    }
+                }
+
+                // If the return type is void, make sure there is
+                // no return statement in the function.
+                if ($content === 'void') {
+                    if (isset($tokens[$stackPtr]['scope_closer']) === true) {
+                        $endToken = $tokens[$stackPtr]['scope_closer'];
+                        for ($returnToken = $stackPtr; $returnToken < $endToken; $returnToken++) {
+                            if ($tokens[$returnToken]['code'] === T_CLOSURE) {
+                                $returnToken = $tokens[$returnToken]['scope_closer'];
+                                continue;
+                            }
+
+                            if ($tokens[$returnToken]['code'] === T_RETURN
+                                || $tokens[$returnToken]['code'] === T_YIELD
+                            ) {
+                                break;
+                            }
+                        }
+
+                        if ($returnToken !== $endToken) {
+                            // If the function is not returning anything, just
+                            // exiting, then there is no problem.
+                            $semicolon = $phpcsFile->findNext(T_WHITESPACE, ($returnToken + 1), null, true);
+                            if ($tokens[$semicolon]['code'] !== T_SEMICOLON) {
+                                $error = 'Function return type is void, but function contains return statement';
+                                $phpcsFile->addError($error, $return, 'InvalidReturnVoid');
+                            }
+                        }
+                    }//end if
+                } else if ($content !== 'mixed') {
+                    // If return type is not void, there needs to be a return statement
+                    // somewhere in the function that returns something.
+                    if (isset($tokens[$stackPtr]['scope_closer']) === true) {
+                        $endToken    = $tokens[$stackPtr]['scope_closer'];
+                        $returnToken = $phpcsFile->findNext(array(T_RETURN, T_YIELD), $stackPtr, $endToken);
+                        if ($returnToken === false) {
+                            $error = 'Function return type is not void, but function has no return statement';
+                            $phpcsFile->addError($error, $return, 'InvalidNoReturn');
+                        } else {
+                            $semicolon = $phpcsFile->findNext(T_WHITESPACE, ($returnToken + 1), null, true);
+                            if ($tokens[$semicolon]['code'] === T_SEMICOLON) {
+                                $error = 'Function return type is not void, but function is returning void here';
+                                $phpcsFile->addError($error, $returnToken, 'InvalidReturnNotVoid');
+                            }
+                        }
+                    }
+                }//end if
+            }//end if
+        } else {
+            $error = 'Missing @return tag in function comment';
+            $phpcsFile->addError($error, $tokens[$commentStart]['comment_closer'], 'MissingReturn');
+        }//end if
+
+    }//end processReturn()
+
+
+    /**
+     * Process any throw tags that this function comment has.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart The position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processThrows(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $throws = array();
+        foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) {
+            if ($tokens[$tag]['content'] !== '@throws') {
+                continue;
+            }
+
+            $exception = null;
+            $comment   = null;
+            if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) {
+                $matches = array();
+                preg_match('/([^\s]+)(?:\s+(.*))?/', $tokens[($tag + 2)]['content'], $matches);
+                $exception = $matches[1];
+                if (isset($matches[2]) === true && trim($matches[2]) !== '') {
+                    $comment = $matches[2];
+                }
+            }
+
+            if ($exception === null) {
+                $error = 'Exception type and comment missing for @throws tag in function comment';
+                $phpcsFile->addError($error, $tag, 'InvalidThrows');
+            } else if ($comment === null) {
+                $error = 'Comment missing for @throws tag in function comment';
+                $phpcsFile->addError($error, $tag, 'EmptyThrows');
+            } else {
+                // Any strings until the next tag belong to this comment.
+                if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) {
+                    $end = $tokens[$commentStart]['comment_tags'][($pos + 1)];
+                } else {
+                    $end = $tokens[$commentStart]['comment_closer'];
+                }
+
+                for ($i = ($tag + 3); $i < $end; $i++) {
+                    if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) {
+                        $comment .= ' '.$tokens[$i]['content'];
+                    }
+                }
+
+                // Starts with a capital letter and ends with a fullstop.
+                $firstChar = $comment{0};
+                if (strtoupper($firstChar) !== $firstChar) {
+                    $error = '@throws tag comment must start with a capital letter';
+                    $phpcsFile->addError($error, ($tag + 2), 'ThrowsNotCapital');
+                }
+
+                $lastChar = substr($comment, -1);
+                if ($lastChar !== '.') {
+                    $error = '@throws tag comment must end with a full stop';
+                    $phpcsFile->addError($error, ($tag + 2), 'ThrowsNoFullStop');
+                }
+            }//end if
+        }//end foreach
+
+    }//end processThrows()
+
+
+    /**
+     * Process the function parameter comments.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
+     * @param int                  $stackPtr     The position of the current token
+     *                                           in the stack passed in $tokens.
+     * @param int                  $commentStart The position in the stack where the comment started.
+     *
+     * @return void
+     */
+    protected function processParams(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $params  = array();
+        $maxType = 0;
+        $maxVar  = 0;
+        foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) {
+            if ($tokens[$tag]['content'] !== '@param') {
+                continue;
+            }
+
+            $type         = '';
+            $typeSpace    = 0;
+            $var          = '';
+            $varSpace     = 0;
+            $comment      = '';
+            $commentLines = array();
+            if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) {
+                $matches = array();
+                preg_match('/([^$&.]+)(?:((?:\.\.\.)?(?:\$|&)[^\s]+)(?:(\s+)(.*))?)?/', $tokens[($tag + 2)]['content'], $matches);
+
+                $typeLen   = strlen($matches[1]);
+                $type      = trim($matches[1]);
+                $typeSpace = ($typeLen - strlen($type));
+                $typeLen   = strlen($type);
+                if ($typeLen > $maxType) {
+                    $maxType = $typeLen;
+                }
+
+                if (isset($matches[2]) === true) {
+                    $var    = $matches[2];
+                    $varLen = strlen($var);
+                    if ($varLen > $maxVar) {
+                        $maxVar = $varLen;
+                    }
+
+                    if (isset($matches[4]) === true) {
+                        $varSpace       = strlen($matches[3]);
+                        $comment        = $matches[4];
+                        $commentLines[] = array(
+                                           'comment' => $comment,
+                                           'token'   => ($tag + 2),
+                                           'indent'  => $varSpace,
+                                          );
+
+                        // Any strings until the next tag belong to this comment.
+                        if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) {
+                            $end = $tokens[$commentStart]['comment_tags'][($pos + 1)];
+                        } else {
+                            $end = $tokens[$commentStart]['comment_closer'];
+                        }
+
+                        for ($i = ($tag + 3); $i < $end; $i++) {
+                            if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) {
+                                $indent = 0;
+                                if ($tokens[($i - 1)]['code'] === T_DOC_COMMENT_WHITESPACE) {
+                                    $indent = strlen($tokens[($i - 1)]['content']);
+                                }
+
+                                $comment       .= ' '.$tokens[$i]['content'];
+                                $commentLines[] = array(
+                                                   'comment' => $tokens[$i]['content'],
+                                                   'token'   => $i,
+                                                   'indent'  => $indent,
+                                                  );
+                            }
+                        }
+                    } else {
+                        $error = 'Missing parameter comment';
+                        $phpcsFile->addError($error, $tag, 'MissingParamComment');
+                        $commentLines[] = array('comment' => '');
+                    }//end if
+                } else {
+                    $error = 'Missing parameter name';
+                    $phpcsFile->addError($error, $tag, 'MissingParamName');
+                }//end if
+            } else {
+                $error = 'Missing parameter type';
+                $phpcsFile->addError($error, $tag, 'MissingParamType');
+            }//end if
+
+            $params[] = array(
+                         'tag'          => $tag,
+                         'type'         => $type,
+                         'var'          => $var,
+                         'comment'      => $comment,
+                         'commentLines' => $commentLines,
+                         'type_space'   => $typeSpace,
+                         'var_space'    => $varSpace,
+                        );
+        }//end foreach
+
+        $realParams  = $phpcsFile->getMethodParameters($stackPtr);
+        $foundParams = array();
+
+        // We want to use ... for all variable length arguments, so added
+        // this prefix to the variable name so comparisons are easier.
+        foreach ($realParams as $pos => $param) {
+            if ($param['variable_length'] === true) {
+                $realParams[$pos]['name'] = '...'.$realParams[$pos]['name'];
+            }
+        }
+
+        foreach ($params as $pos => $param) {
+            // If the type is empty, the whole line is empty.
+            if ($param['type'] === '') {
+                continue;
+            }
+
+            // Check the param type value.
+            $typeNames = explode('|', $param['type']);
+            foreach ($typeNames as $typeName) {
+                $suggestedName = PHP_CodeSniffer::suggestType($typeName);
+                if ($typeName !== $suggestedName) {
+                    $error = 'Expected "%s" but found "%s" for parameter type';
+                    $data  = array(
+                              $suggestedName,
+                              $typeName,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $param['tag'], 'IncorrectParamVarName', $data);
+                    if ($fix === true) {
+                        $content  = $suggestedName;
+                        $content .= str_repeat(' ', $param['type_space']);
+                        $content .= $param['var'];
+                        $content .= str_repeat(' ', $param['var_space']);
+                        if (isset($param['commentLines'][0]) === true) {
+                            $content .= $param['commentLines'][0]['comment'];
+                        }
+
+                        $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
+                    }
+                } else if (count($typeNames) === 1) {
+                    // Check type hint for array and custom type.
+                    $suggestedTypeHint = '';
+                    if (strpos($suggestedName, 'array') !== false || substr($suggestedName, -2) === '[]') {
+                        $suggestedTypeHint = 'array';
+                    } else if (strpos($suggestedName, 'callable') !== false) {
+                        $suggestedTypeHint = 'callable';
+                    } else if (strpos($suggestedName, 'callback') !== false) {
+                        $suggestedTypeHint = 'callable';
+                    } else if (in_array($typeName, PHP_CodeSniffer::$allowedTypes) === false) {
+                        $suggestedTypeHint = $suggestedName;
+                    } else if (version_compare(PHP_VERSION, '7.0.0') >= 0) {
+                        if ($typeName === 'string') {
+                            $suggestedTypeHint = 'string';
+                        } else if ($typeName === 'int' || $typeName === 'integer') {
+                            $suggestedTypeHint = 'int';
+                        } else if ($typeName === 'float') {
+                            $suggestedTypeHint = 'float';
+                        } else if ($typeName === 'bool' || $typeName === 'boolean') {
+                            $suggestedTypeHint = 'bool';
+                        }
+                    }
+
+                    if ($suggestedTypeHint !== '' && isset($realParams[$pos]) === true) {
+                        $typeHint = $realParams[$pos]['type_hint'];
+                        if ($typeHint === '') {
+                            $error = 'Type hint "%s" missing for %s';
+                            $data  = array(
+                                      $suggestedTypeHint,
+                                      $param['var'],
+                                     );
+
+                            $errorCode = 'TypeHintMissing';
+                            if ($suggestedTypeHint === 'string'
+                                || $suggestedTypeHint === 'int'
+                                || $suggestedTypeHint === 'float'
+                                || $suggestedTypeHint === 'bool'
+                            ) {
+                                $errorCode = 'Scalar'.$errorCode;
+                            }
+
+                            $phpcsFile->addError($error, $stackPtr, $errorCode, $data);
+                        } else if ($typeHint !== substr($suggestedTypeHint, (strlen($typeHint) * -1))) {
+                            $error = 'Expected type hint "%s"; found "%s" for %s';
+                            $data  = array(
+                                      $suggestedTypeHint,
+                                      $typeHint,
+                                      $param['var'],
+                                     );
+                            $phpcsFile->addError($error, $stackPtr, 'IncorrectTypeHint', $data);
+                        }//end if
+                    } else if ($suggestedTypeHint === '' && isset($realParams[$pos]) === true) {
+                        $typeHint = $realParams[$pos]['type_hint'];
+                        if ($typeHint !== '') {
+                            $error = 'Unknown type hint "%s" found for %s';
+                            $data  = array(
+                                      $typeHint,
+                                      $param['var'],
+                                     );
+                            $phpcsFile->addError($error, $stackPtr, 'InvalidTypeHint', $data);
+                        }
+                    }//end if
+                }//end if
+            }//end foreach
+
+            if ($param['var'] === '') {
+                continue;
+            }
+
+            $foundParams[] = $param['var'];
+
+            // Check number of spaces after the type.
+            $spaces = ($maxType - strlen($param['type']) + 1);
+            if ($param['type_space'] !== $spaces) {
+                $error = 'Expected %s spaces after parameter type; %s found';
+                $data  = array(
+                          $spaces,
+                          $param['type_space'],
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamType', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+
+                    $content  = $param['type'];
+                    $content .= str_repeat(' ', $spaces);
+                    $content .= $param['var'];
+                    $content .= str_repeat(' ', $param['var_space']);
+                    $content .= $param['commentLines'][0]['comment'];
+                    $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
+
+                    // Fix up the indent of additional comment lines.
+                    foreach ($param['commentLines'] as $lineNum => $line) {
+                        if ($lineNum === 0
+                            || $param['commentLines'][$lineNum]['indent'] === 0
+                        ) {
+                            continue;
+                        }
+
+                        $newIndent = ($param['commentLines'][$lineNum]['indent'] + $spaces - $param['type_space']);
+                        $phpcsFile->fixer->replaceToken(
+                            ($param['commentLines'][$lineNum]['token'] - 1),
+                            str_repeat(' ', $newIndent)
+                        );
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }//end if
+            }//end if
+
+            // Make sure the param name is correct.
+            if (isset($realParams[$pos]) === true) {
+                $realName = $realParams[$pos]['name'];
+                if ($realName !== $param['var']) {
+                    $code = 'ParamNameNoMatch';
+                    $data = array(
+                             $param['var'],
+                             $realName,
+                            );
+
+                    $error = 'Doc comment for parameter %s does not match ';
+                    if (strtolower($param['var']) === strtolower($realName)) {
+                        $error .= 'case of ';
+                        $code   = 'ParamNameNoCaseMatch';
+                    }
+
+                    $error .= 'actual variable name %s';
+
+                    $phpcsFile->addError($error, $param['tag'], $code, $data);
+                }
+            } else if (substr($param['var'], -4) !== ',...') {
+                // We must have an extra parameter comment.
+                $error = 'Superfluous parameter comment';
+                $phpcsFile->addError($error, $param['tag'], 'ExtraParamComment');
+            }//end if
+
+            if ($param['comment'] === '') {
+                continue;
+            }
+
+            // Check number of spaces after the var name.
+            $spaces = ($maxVar - strlen($param['var']) + 1);
+            if ($param['var_space'] !== $spaces) {
+                $error = 'Expected %s spaces after parameter name; %s found';
+                $data  = array(
+                          $spaces,
+                          $param['var_space'],
+                         );
+
+                $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamName', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+
+                    $content  = $param['type'];
+                    $content .= str_repeat(' ', $param['type_space']);
+                    $content .= $param['var'];
+                    $content .= str_repeat(' ', $spaces);
+                    $content .= $param['commentLines'][0]['comment'];
+                    $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content);
+
+                    // Fix up the indent of additional comment lines.
+                    foreach ($param['commentLines'] as $lineNum => $line) {
+                        if ($lineNum === 0
+                            || $param['commentLines'][$lineNum]['indent'] === 0
+                        ) {
+                            continue;
+                        }
+
+                        $newIndent = ($param['commentLines'][$lineNum]['indent'] + $spaces - $param['var_space']);
+                        $phpcsFile->fixer->replaceToken(
+                            ($param['commentLines'][$lineNum]['token'] - 1),
+                            str_repeat(' ', $newIndent)
+                        );
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }//end if
+            }//end if
+
+            // Param comments must start with a capital letter and end with the full stop.
+            if (preg_match('/^(\p{Ll}|\P{L})/u', $param['comment']) === 1) {
+                $error = 'Parameter comment must start with a capital letter';
+                $phpcsFile->addError($error, $param['tag'], 'ParamCommentNotCapital');
+            }
+
+            $lastChar = substr($param['comment'], -1);
+            if ($lastChar !== '.') {
+                $error = 'Parameter comment must end with a full stop';
+                $phpcsFile->addError($error, $param['tag'], 'ParamCommentFullStop');
+            }
+        }//end foreach
+
+        $realNames = array();
+        foreach ($realParams as $realParam) {
+            $realNames[] = $realParam['name'];
+        }
+
+        // Report missing comments.
+        $diff = array_diff($realNames, $foundParams);
+        foreach ($diff as $neededParam) {
+            $error = 'Doc comment for parameter "%s" missing';
+            $data  = array($neededParam);
+            $phpcsFile->addError($error, $commentStart, 'MissingParamTag', $data);
+        }
+
+    }//end processParams()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php	(revision 5534)
@@ -0,0 +1,206 @@
+<?php
+/**
+ * Verifies that a @throws tag exists for a function that throws exceptions.
+ * Verifies the number of @throws tags and the number of throw tokens matches.
+ * Verifies the exception type.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    $error = 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Verifies that a @throws tag exists for a function that throws exceptions.
+ * Verifies the number of @throws tags and the number of throw tokens matches.
+ * Verifies the exception type.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+
+    /**
+     * Constructs a Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_FUNCTION), array(T_THROW));
+
+    }//end __construct()
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     * @param int                  $currScope The current scope opener token.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        // Is this the first throw token within the current function scope?
+        // If so, we have to validate other throw tokens within the same scope.
+        $previousThrow = $phpcsFile->findPrevious(T_THROW, ($stackPtr - 1), $currScope);
+        if ($previousThrow !== false) {
+            return;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        $find   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $find[] = T_WHITESPACE;
+
+        $commentEnd = $phpcsFile->findPrevious($find, ($currScope - 1), null, true);
+        if ($tokens[$commentEnd]['code'] === T_COMMENT) {
+            // Inline comments might just be closing comments for
+            // control structures or functions instead of function comments
+            // using the wrong comment type. If there is other code on the line,
+            // assume they relate to that code.
+            $prev = $phpcsFile->findPrevious($find, ($commentEnd - 1), null, true);
+            if ($prev !== false && $tokens[$prev]['line'] === $tokens[$commentEnd]['line']) {
+                $commentEnd = $prev;
+            }
+        }
+
+        if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG
+            && $tokens[$commentEnd]['code'] !== T_COMMENT
+        ) {
+            // Function doesn't have a doc comment.
+            return;
+        }
+
+        // Find the position where the current function scope ends.
+        $currScopeEnd = 0;
+        if (isset($tokens[$currScope]['scope_closer']) === true) {
+            $currScopeEnd = $tokens[$currScope]['scope_closer'];
+        }
+
+        // Find all the exception type token within the current scope.
+        $throwTokens = array();
+        $currPos     = $stackPtr;
+        if ($currScopeEnd !== 0) {
+            while ($currPos < $currScopeEnd && $currPos !== false) {
+                /*
+                    If we can't find a NEW, we are probably throwing
+                    a variable, so we ignore it, but they still need to
+                    provide at least one @throws tag, even through we
+                    don't know the exception class.
+                */
+
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($currPos + 1), null, true);
+                if ($tokens[$nextToken]['code'] === T_NEW) {
+                    $currException = $phpcsFile->findNext(
+                        array(
+                         T_NS_SEPARATOR,
+                         T_STRING,
+                        ),
+                        $currPos,
+                        $currScopeEnd,
+                        false,
+                        null,
+                        true
+                    );
+
+                    if ($currException !== false) {
+                        $endException = $phpcsFile->findNext(
+                            array(
+                             T_NS_SEPARATOR,
+                             T_STRING,
+                            ),
+                            ($currException + 1),
+                            $currScopeEnd,
+                            true,
+                            null,
+                            true
+                        );
+
+                        if ($endException === false) {
+                            $throwTokens[] = $tokens[$currException]['content'];
+                        } else {
+                            $throwTokens[] = $phpcsFile->getTokensAsString($currException, ($endException - $currException));
+                        }
+                    }//end if
+                }//end if
+
+                $currPos = $phpcsFile->findNext(T_THROW, ($currPos + 1), $currScopeEnd);
+            }//end while
+        }//end if
+
+        // Only need one @throws tag for each type of exception thrown.
+        $throwTokens = array_unique($throwTokens);
+
+        $throwTags    = array();
+        $commentStart = $tokens[$commentEnd]['comment_opener'];
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] !== '@throws') {
+                continue;
+            }
+
+            if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) {
+                $exception = $tokens[($tag + 2)]['content'];
+                $space     = strpos($exception, ' ');
+                if ($space !== false) {
+                    $exception = substr($exception, 0, $space);
+                }
+
+                $throwTags[$exception] = true;
+            }
+        }
+
+        if (empty($throwTags) === true) {
+            $error = 'Missing @throws tag in function comment';
+            $phpcsFile->addError($error, $commentEnd, 'Missing');
+            return;
+        } else if (empty($throwTokens) === true) {
+            // If token count is zero, it means that only variables are being
+            // thrown, so we need at least one @throws tag (checked above).
+            // Nothing more to do.
+            return;
+        }
+
+        // Make sure @throws tag count matches throw token count.
+        $tokenCount = count($throwTokens);
+        $tagCount   = count($throwTags);
+        if ($tokenCount !== $tagCount) {
+            $error = 'Expected %s @throws tag(s) in function comment; %s found';
+            $data  = array(
+                      $tokenCount,
+                      $tagCount,
+                     );
+            $phpcsFile->addError($error, $commentEnd, 'WrongNumber', $data);
+            return;
+        }
+
+        foreach ($throwTokens as $throw) {
+            if (isset($throwTags[$throw]) === false) {
+                $error = 'Missing @throws tag for "%s" exception';
+                $data  = array($throw);
+                $phpcsFile->addError($error, $commentEnd, 'Missing', $data);
+            }
+        }
+
+    }//end processTokenWithinScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php	(revision 5534)
@@ -0,0 +1,322 @@
+<?php
+/**
+ * Squiz_Sniffs_Commenting_InlineCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Commenting_InlineCommentSniff.
+ *
+ * Checks that there is adequate spacing between comments.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_InlineCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_COMMENT,
+                T_DOC_COMMENT_OPEN_TAG,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // If this is a function/class/interface doc block comment, skip it.
+        // We are only interested in inline doc block comments, which are
+        // not allowed.
+        if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
+            $nextToken = $phpcsFile->findNext(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($stackPtr + 1),
+                null,
+                true
+            );
+
+            $ignore = array(
+                       T_CLASS,
+                       T_INTERFACE,
+                       T_TRAIT,
+                       T_FUNCTION,
+                       T_CLOSURE,
+                       T_PUBLIC,
+                       T_PRIVATE,
+                       T_PROTECTED,
+                       T_FINAL,
+                       T_STATIC,
+                       T_ABSTRACT,
+                       T_CONST,
+                       T_PROPERTY,
+                      );
+
+            if (in_array($tokens[$nextToken]['code'], $ignore) === true) {
+                return;
+            }
+
+            if ($phpcsFile->tokenizerType === 'JS') {
+                // We allow block comments if a function or object
+                // is being assigned to a variable.
+                $ignore    = PHP_CodeSniffer_Tokens::$emptyTokens;
+                $ignore[]  = T_EQUAL;
+                $ignore[]  = T_STRING;
+                $ignore[]  = T_OBJECT_OPERATOR;
+                $nextToken = $phpcsFile->findNext($ignore, ($nextToken + 1), null, true);
+                if ($tokens[$nextToken]['code'] === T_FUNCTION
+                    || $tokens[$nextToken]['code'] === T_CLOSURE
+                    || $tokens[$nextToken]['code'] === T_OBJECT
+                    || $tokens[$nextToken]['code'] === T_PROTOTYPE
+                ) {
+                    return;
+                }
+            }
+
+            $prevToken = $phpcsFile->findPrevious(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($stackPtr - 1),
+                null,
+                true
+            );
+
+            if ($tokens[$prevToken]['code'] === T_OPEN_TAG) {
+                return;
+            }
+
+            if ($tokens[$stackPtr]['content'] === '/**') {
+                $error = 'Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead';
+                $phpcsFile->addError($error, $stackPtr, 'DocBlock');
+            }
+        }//end if
+
+        if ($tokens[$stackPtr]['content']{0} === '#') {
+            $error = 'Perl-style comments are not allowed; use "// Comment" instead';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle');
+            if ($fix === true) {
+                $comment = ltrim($tokens[$stackPtr]['content'], "# \t");
+                $phpcsFile->fixer->replaceToken($stackPtr, "// $comment");
+            }
+        }
+
+        // We don't want end of block comments. If the last comment is a closing
+        // curly brace.
+        $previousContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($tokens[$previousContent]['line'] === $tokens[$stackPtr]['line']) {
+            if ($tokens[$previousContent]['code'] === T_CLOSE_CURLY_BRACKET) {
+                return;
+            }
+
+            // Special case for JS files.
+            if ($tokens[$previousContent]['code'] === T_COMMA
+                || $tokens[$previousContent]['code'] === T_SEMICOLON
+            ) {
+                $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($previousContent - 1), null, true);
+                if ($tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) {
+                    return;
+                }
+            }
+        }
+
+        $comment = rtrim($tokens[$stackPtr]['content']);
+
+        // Only want inline comments.
+        if (substr($comment, 0, 2) !== '//') {
+            return;
+        }
+
+        if (trim(substr($comment, 2)) !== '') {
+            $spaceCount = 0;
+            $tabFound   = false;
+
+            $commentLength = strlen($comment);
+            for ($i = 2; $i < $commentLength; $i++) {
+                if ($comment[$i] === "\t") {
+                    $tabFound = true;
+                    break;
+                }
+
+                if ($comment[$i] !== ' ') {
+                    break;
+                }
+
+                $spaceCount++;
+            }
+
+            $fix = false;
+            if ($tabFound === true) {
+                $error = 'Tab found before comment text; expected "// %s" but found "%s"';
+                $data  = array(
+                          ltrim(substr($comment, 2)),
+                          $comment,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'TabBefore', $data);
+            } else if ($spaceCount === 0) {
+                $error = 'No space found before comment text; expected "// %s" but found "%s"';
+                $data  = array(
+                          substr($comment, 2),
+                          $comment,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore', $data);
+            } else if ($spaceCount > 1) {
+                $error = 'Expected 1 space before comment text but found %s; use block comment if you need indentation';
+                $data  = array(
+                          $spaceCount,
+                          substr($comment, (2 + $spaceCount)),
+                          $comment,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data);
+            }//end if
+
+            if ($fix === true) {
+                $newComment = '// '.ltrim($tokens[$stackPtr]['content'], "/\t ");
+                $phpcsFile->fixer->replaceToken($stackPtr, $newComment);
+            }
+        }//end if
+
+        // The below section determines if a comment block is correctly capitalised,
+        // and ends in a full-stop. It will find the last comment in a block, and
+        // work its way up.
+        $nextComment = $phpcsFile->findNext(array(T_COMMENT), ($stackPtr + 1), null, false);
+        if (($nextComment !== false)
+            && (($tokens[$nextComment]['line']) === ($tokens[$stackPtr]['line'] + 1))
+        ) {
+            return;
+        }
+
+        $topComment  = $stackPtr;
+        $lastComment = $stackPtr;
+        while (($topComment = $phpcsFile->findPrevious(array(T_COMMENT), ($lastComment - 1), null, false)) !== false) {
+            if ($tokens[$topComment]['line'] !== ($tokens[$lastComment]['line'] - 1)) {
+                break;
+            }
+
+            $lastComment = $topComment;
+        }
+
+        $topComment  = $lastComment;
+        $commentText = '';
+
+        for ($i = $topComment; $i <= $stackPtr; $i++) {
+            if ($tokens[$i]['code'] === T_COMMENT) {
+                $commentText .= trim(substr($tokens[$i]['content'], 2));
+            }
+        }
+
+        if ($commentText === '') {
+            $error = 'Blank comments are not allowed';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Empty');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, '');
+            }
+
+            return;
+        }
+
+        if (preg_match('/^\p{Ll}/u', $commentText) === 1) {
+            $error = 'Inline comments must start with a capital letter';
+            $phpcsFile->addError($error, $topComment, 'NotCapital');
+        }
+
+        // Only check the end of comment character if the start of the comment
+        // is a letter, indicating that the comment is just standard text.
+        if (preg_match('/^\p{L}/u', $commentText) === 1) {
+            $commentCloser   = $commentText[(strlen($commentText) - 1)];
+            $acceptedClosers = array(
+                                'full-stops'        => '.',
+                                'exclamation marks' => '!',
+                                'or question marks' => '?',
+                               );
+
+            if (in_array($commentCloser, $acceptedClosers) === false) {
+                $error = 'Inline comments must end in %s';
+                $ender = '';
+                foreach ($acceptedClosers as $closerName => $symbol) {
+                    $ender .= ' '.$closerName.',';
+                }
+
+                $ender = trim($ender, ' ,');
+                $data  = array($ender);
+                $phpcsFile->addError($error, $stackPtr, 'InvalidEndChar', $data);
+            }
+        }
+
+        // Finally, the line below the last comment cannot be empty if this inline
+        // comment is on a line by itself.
+        if ($tokens[$previousContent]['line'] < $tokens[$stackPtr]['line']) {
+            $start = false;
+            for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+                if ($tokens[$i]['line'] === ($tokens[$stackPtr]['line'] + 1)) {
+                    if ($tokens[$i]['code'] !== T_WHITESPACE) {
+                        return;
+                    }
+                } else if ($tokens[$i]['line'] > ($tokens[$stackPtr]['line'] + 1)) {
+                    break;
+                }
+            }
+
+            $error = 'There must be no blank line following an inline comment';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfter');
+            if ($fix === true) {
+                $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($stackPtr + 1); $i < $next; $i++) {
+                    if ($tokens[$i]['line'] === $tokens[$next]['line']) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php	(revision 5534)
@@ -0,0 +1,208 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_LongConditionClosingCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_LongConditionClosingCommentSniff.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * The openers that we are interested in.
+     *
+     * @var array(int)
+     */
+    private static $_openers = array(
+                                T_SWITCH,
+                                T_IF,
+                                T_FOR,
+                                T_FOREACH,
+                                T_WHILE,
+                                T_TRY,
+                                T_CASE,
+                               );
+
+    /**
+     * The length that a code block must be before
+     * requiring a closing comment.
+     *
+     * @var int
+     */
+    protected $lineLimit = 20;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_CLOSE_CURLY_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_condition']) === false) {
+            // No scope condition. It is a function closer.
+            return;
+        }
+
+        $startCondition = $tokens[$tokens[$stackPtr]['scope_condition']];
+        $startBrace     = $tokens[$tokens[$stackPtr]['scope_opener']];
+        $endBrace       = $tokens[$stackPtr];
+
+        // We are only interested in some code blocks.
+        if (in_array($startCondition['code'], self::$_openers) === false) {
+            return;
+        }
+
+        if ($startCondition['code'] === T_IF) {
+            // If this is actually and ELSE IF, skip it as the brace
+            // will be checked by the original IF.
+            $else = $phpcsFile->findPrevious(T_WHITESPACE, ($tokens[$stackPtr]['scope_condition'] - 1), null, true);
+            if ($tokens[$else]['code'] === T_ELSE) {
+                return;
+            }
+
+            // IF statements that have an ELSE block need to use
+            // "end if" rather than "end else" or "end elseif".
+            do {
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                if ($tokens[$nextToken]['code'] === T_ELSE || $tokens[$nextToken]['code'] === T_ELSEIF) {
+                    // Check for ELSE IF (2 tokens) as opposed to ELSEIF (1 token).
+                    if ($tokens[$nextToken]['code'] === T_ELSE
+                        && isset($tokens[$nextToken]['scope_closer']) === false
+                    ) {
+                        $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true);
+                        if ($tokens[$nextToken]['code'] !== T_IF
+                            || isset($tokens[$nextToken]['scope_closer']) === false
+                        ) {
+                            // Not an ELSE IF or is an inline ELSE IF.
+                            break;
+                        }
+                    }
+
+                    if (isset($tokens[$nextToken]['scope_closer']) === false) {
+                        // There isn't going to be anywhere to print the "end if" comment
+                        // because there is no closer.
+                        return;
+                    }
+
+                    // The end brace becomes the ELSE's end brace.
+                    $stackPtr = $tokens[$nextToken]['scope_closer'];
+                    $endBrace = $tokens[$stackPtr];
+                } else {
+                    break;
+                }//end if
+            } while (isset($tokens[$nextToken]['scope_closer']) === true);
+        }//end if
+
+        if ($startCondition['code'] === T_TRY) {
+            // TRY statements need to check until the end of all CATCH statements.
+            do {
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                if ($tokens[$nextToken]['code'] === T_CATCH) {
+                    // The end brace becomes the CATCH's end brace.
+                    $stackPtr = $tokens[$nextToken]['scope_closer'];
+                    $endBrace = $tokens[$stackPtr];
+                } else {
+                    break;
+                }
+            } while (isset($tokens[$nextToken]['scope_closer']) === true);
+        }
+
+        $lineDifference = ($endBrace['line'] - $startBrace['line']);
+
+        $expected = '//end '.$startCondition['content'];
+        $comment  = $phpcsFile->findNext(array(T_COMMENT), $stackPtr, null, false);
+
+        if (($comment === false) || ($tokens[$comment]['line'] !== $endBrace['line'])) {
+            if ($lineDifference >= $this->lineLimit) {
+                $error = 'End comment for long condition not found; expected "%s"';
+                $data  = array($expected);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Missing', $data);
+
+                if ($fix === true) {
+                    $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                    if ($next !== false && $tokens[$next]['line'] === $tokens[$stackPtr]['line']) {
+                        $expected .= $phpcsFile->eolChar;
+                    }
+
+                    $phpcsFile->fixer->addContent($stackPtr, $expected);
+                }
+            }
+
+            return;
+        }
+
+        if (($comment - $stackPtr) !== 1) {
+            $error = 'Space found before closing comment; expected "%s"';
+            $data  = array($expected);
+            $phpcsFile->addError($error, $stackPtr, 'SpacingBefore', $data);
+        }
+
+        if (trim($tokens[$comment]['content']) !== $expected) {
+            $found = trim($tokens[$comment]['content']);
+            $error = 'Incorrect closing comment; expected "%s" but found "%s"';
+            $data  = array(
+                      $expected,
+                      $found,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Invalid', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($comment, $expected.$phpcsFile->eolChar);
+            }
+
+            return;
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php	(revision 5534)
@@ -0,0 +1,103 @@
+<?php
+/**
+ * Squiz_Sniffs_Commenting_PostStatementCommentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Commenting_PostStatementCommentSniff.
+ *
+ * Checks to ensure that there are no comments after statements.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Commenting_PostStatementCommentSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_COMMENT);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (substr($tokens[$stackPtr]['content'], 0, 2) !== '//') {
+            return;
+        }
+
+        $commentLine = $tokens[$stackPtr]['line'];
+        $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+
+        if ($tokens[$lastContent]['line'] !== $commentLine) {
+            return;
+        }
+
+        if ($tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) {
+            return;
+        }
+
+        // Special case for JS files.
+        if ($tokens[$lastContent]['code'] === T_COMMA
+            || $tokens[$lastContent]['code'] === T_SEMICOLON
+        ) {
+            $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($lastContent - 1), null, true);
+            if ($tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) {
+                return;
+            }
+        }
+
+        $error = 'Comments may not appear after statements';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
+        if ($fix === true) {
+            $phpcsFile->fixer->addNewlineBefore($stackPtr);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php	(revision 5534)
@@ -0,0 +1,169 @@
+<?php
+/**
+ * Parses and verifies the variable doc comment.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found');
+}
+
+/**
+ * Parses and verifies the variable doc comment.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+class Squiz_Sniffs_Commenting_VariableCommentSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+
+    /**
+     * Called to process class member vars.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens       = $phpcsFile->getTokens();
+        $commentToken = array(
+                         T_COMMENT,
+                         T_DOC_COMMENT_CLOSE_TAG,
+                        );
+
+        $commentEnd = $phpcsFile->findPrevious($commentToken, $stackPtr);
+        if ($commentEnd === false) {
+            $phpcsFile->addError('Missing member variable doc comment', $stackPtr, 'Missing');
+            return;
+        }
+
+        if ($tokens[$commentEnd]['code'] === T_COMMENT) {
+            $phpcsFile->addError('You must use "/**" style comments for a member variable comment', $stackPtr, 'WrongStyle');
+            return;
+        } else if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG) {
+            $phpcsFile->addError('Missing member variable doc comment', $stackPtr, 'Missing');
+            return;
+        } else {
+            // Make sure the comment we have found belongs to us.
+            $commentFor = $phpcsFile->findNext(array(T_VARIABLE, T_CLASS, T_INTERFACE), ($commentEnd + 1));
+            if ($commentFor !== $stackPtr) {
+                $phpcsFile->addError('Missing member variable doc comment', $stackPtr, 'Missing');
+                return;
+            }
+        }
+
+        $commentStart = $tokens[$commentEnd]['comment_opener'];
+
+        $foundVar = null;
+        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
+            if ($tokens[$tag]['content'] === '@var') {
+                if ($foundVar !== null) {
+                    $error = 'Only one @var tag is allowed in a member variable comment';
+                    $phpcsFile->addError($error, $tag, 'DuplicateVar');
+                } else {
+                    $foundVar = $tag;
+                }
+            } else if ($tokens[$tag]['content'] === '@see') {
+                // Make sure the tag isn't empty.
+                $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd);
+                if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) {
+                    $error = 'Content missing for @see tag in member variable comment';
+                    $phpcsFile->addError($error, $tag, 'EmptySees');
+                }
+            } else {
+                $error = '%s tag is not allowed in member variable comment';
+                $data  = array($tokens[$tag]['content']);
+                $phpcsFile->addWarning($error, $tag, 'TagNotAllowed', $data);
+            }//end if
+        }//end foreach
+
+        // The @var tag is the only one we require.
+        if ($foundVar === null) {
+            $error = 'Missing @var tag in member variable comment';
+            $phpcsFile->addError($error, $commentEnd, 'MissingVar');
+            return;
+        }
+
+        $firstTag = $tokens[$commentStart]['comment_tags'][0];
+        if ($foundVar !== null && $tokens[$firstTag]['content'] !== '@var') {
+            $error = 'The @var tag must be the first tag in a member variable comment';
+            $phpcsFile->addError($error, $foundVar, 'VarOrder');
+        }
+
+        // Make sure the tag isn't empty and has the correct padding.
+        $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $foundVar, $commentEnd);
+        if ($string === false || $tokens[$string]['line'] !== $tokens[$foundVar]['line']) {
+            $error = 'Content missing for @var tag in member variable comment';
+            $phpcsFile->addError($error, $foundVar, 'EmptyVar');
+            return;
+        }
+
+        $varType       = $tokens[($foundVar + 2)]['content'];
+        $suggestedType = PHP_CodeSniffer::suggestType($varType);
+        if ($varType !== $suggestedType) {
+            $error = 'Expected "%s" but found "%s" for @var tag in member variable comment';
+            $data  = array(
+                      $suggestedType,
+                      $varType,
+                     );
+            $phpcsFile->addError($error, ($foundVar + 2), 'IncorrectVarType', $data);
+        }
+
+    }//end processMemberVar()
+
+
+    /**
+     * Called to process a normal variable.
+     *
+     * Not required for this sniff.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this token was found.
+     * @param int                  $stackPtr  The position where the double quoted
+     *                                        string was found.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+
+    }//end processVariable()
+
+
+    /**
+     * Called to process variables found in double quoted strings.
+     *
+     * Not required for this sniff.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this token was found.
+     * @param int                  $stackPtr  The position where the double quoted
+     *                                        string was found.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php	(revision 5534)
@@ -0,0 +1,262 @@
+<?php
+/**
+ * Verifies that control statements conform to their coding standards.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Verifies that control statements conform to their coding standards.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_ControlSignatureSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(
+                T_TRY,
+                T_CATCH,
+                T_DO,
+                T_WHILE,
+                T_FOR,
+                T_IF,
+                T_FOREACH,
+                T_ELSE,
+                T_ELSEIF,
+                T_SWITCH,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[($stackPtr + 1)]) === false) {
+            return;
+        }
+
+        // Single space after the keyword.
+        $found = 1;
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $found = 0;
+        } else if ($tokens[($stackPtr + 1)]['content'] !== ' ') {
+            if (strpos($tokens[($stackPtr + 1)]['content'], $phpcsFile->eolChar) !== false) {
+                $found = 'newline';
+            } else {
+                $found = strlen($tokens[($stackPtr + 1)]['content']);
+            }
+        }
+
+        if ($found !== 1) {
+            $error = 'Expected 1 space after %s keyword; %s found';
+            $data  = array(
+                      strtoupper($tokens[$stackPtr]['content']),
+                      $found,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data);
+            if ($fix === true) {
+                if ($found === 0) {
+                    $phpcsFile->fixer->addContent($stackPtr, ' ');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                }
+            }
+        }
+
+        // Single space after closing parenthesis.
+        if (isset($tokens[$stackPtr]['parenthesis_closer']) === true
+            && isset($tokens[$stackPtr]['scope_opener']) === true
+        ) {
+            $closer  = $tokens[$stackPtr]['parenthesis_closer'];
+            $opener  = $tokens[$stackPtr]['scope_opener'];
+            $content = $phpcsFile->getTokensAsString(($closer + 1), ($opener - $closer - 1));
+
+            if ($content !== ' ') {
+                $error = 'Expected 1 space after closing parenthesis; found %s';
+                if (trim($content) === '') {
+                    $found = strlen($content);
+                } else {
+                    $found = '"'.str_replace($phpcsFile->eolChar, '\n', $content).'"';
+                }
+
+                $fix = $phpcsFile->addFixableError($error, $closer, 'SpaceAfterCloseParenthesis', array($found));
+                if ($fix === true) {
+                    if ($closer === ($opener - 1)) {
+                        $phpcsFile->fixer->addContent($closer, ' ');
+                    } else {
+                        $phpcsFile->fixer->beginChangeset();
+                        $phpcsFile->fixer->addContent($closer, ' '.$tokens[$opener]['content']);
+                        $phpcsFile->fixer->replaceToken($opener, '');
+
+                        if ($tokens[$opener]['line'] !== $tokens[$closer]['line']) {
+                            $next = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), null, true);
+                            if ($tokens[$next]['line'] !== $tokens[$opener]['line']) {
+                                for ($i = ($opener + 1); $i < $next; $i++) {
+                                    $phpcsFile->fixer->replaceToken($i, '');
+                                }
+                            }
+                        }
+
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }
+            }//end if
+        }//end if
+
+        // Single newline after opening brace.
+        if (isset($tokens[$stackPtr]['scope_opener']) === true) {
+            $opener = $tokens[$stackPtr]['scope_opener'];
+            for ($next = ($opener + 1); $next < $phpcsFile->numTokens; $next++) {
+                $code = $tokens[$next]['code'];
+
+                if ($code === T_WHITESPACE
+                    || ($code === T_INLINE_HTML
+                    && trim($tokens[$next]['content']) === '')
+                ) {
+                    continue;
+                }
+
+                // Skip all empty tokens on the same line as the opener.
+                if ($tokens[$next]['line'] === $tokens[$opener]['line']
+                    && (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$code]) === true
+                    || $code === T_CLOSE_TAG)
+                ) {
+                    continue;
+                }
+
+                // We found the first bit of a code, or a comment on the
+                // following line.
+                break;
+            }//end for
+
+            if ($tokens[$next]['line'] === $tokens[$opener]['line']) {
+                $error = 'Newline required after opening brace';
+                $fix   = $phpcsFile->addFixableError($error, $opener, 'NewlineAfterOpenBrace');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($opener + 1); $i < $next; $i++) {
+                        if (trim($tokens[$i]['content']) !== '') {
+                            break;
+                        }
+
+                        // Remove whitespace.
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->addContent($opener, $phpcsFile->eolChar);
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }//end if
+        } else if ($tokens[$stackPtr]['code'] === T_WHILE) {
+            // Zero spaces after parenthesis closer.
+            $closer = $tokens[$stackPtr]['parenthesis_closer'];
+            $found  = 0;
+            if ($tokens[($closer + 1)]['code'] === T_WHITESPACE) {
+                if (strpos($tokens[($closer + 1)]['content'], $phpcsFile->eolChar) !== false) {
+                    $found = 'newline';
+                } else {
+                    $found = strlen($tokens[($closer + 1)]['content']);
+                }
+            }
+
+            if ($found !== 0) {
+                $error = 'Expected 0 spaces before semicolon; %s found';
+                $data  = array($found);
+                $fix   = $phpcsFile->addFixableError($error, $closer, 'SpaceBeforeSemicolon', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($closer + 1), '');
+                }
+            }
+        }//end if
+
+        // Only want to check multi-keyword structures from here on.
+        if ($tokens[$stackPtr]['code'] === T_DO) {
+            if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+                return;
+            }
+
+            $closer = $tokens[$stackPtr]['scope_closer'];
+        } else if ($tokens[$stackPtr]['code'] === T_ELSE
+            || $tokens[$stackPtr]['code'] === T_ELSEIF
+            || $tokens[$stackPtr]['code'] === T_CATCH
+        ) {
+            $closer = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+            if ($closer === false || $tokens[$closer]['code'] !== T_CLOSE_CURLY_BRACKET) {
+                return;
+            }
+        } else {
+            return;
+        }
+
+        // Single space after closing brace.
+        $found = 1;
+        if ($tokens[($closer + 1)]['code'] !== T_WHITESPACE) {
+            $found = 0;
+        } else if ($tokens[($closer + 1)]['content'] !== ' ') {
+            if (strpos($tokens[($closer + 1)]['content'], $phpcsFile->eolChar) !== false) {
+                $found = 'newline';
+            } else {
+                $found = strlen($tokens[($closer + 1)]['content']);
+            }
+        }
+
+        if ($found !== 1) {
+            $error = 'Expected 1 space after closing brace; %s found';
+            $data  = array($found);
+            $fix   = $phpcsFile->addFixableError($error, $closer, 'SpaceAfterCloseBrace', $data);
+            if ($fix === true) {
+                if ($found === 0) {
+                    $phpcsFile->fixer->addContent($closer, ' ');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($closer + 1), ' ');
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff.
+ *
+ * Verifies that there are not elseif statements. The else and the if should
+ * be separated by a space.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_ELSEIF);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $error = 'Usage of ELSEIF not allowed; use ELSE IF instead';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NotAllowed');
+        if ($fix === true) {
+            $phpcsFile->fixer->replaceToken($stackPtr, 'else if');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,252 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff.
+ *
+ * Verifies that there is a space between each condition of foreach loops.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * How many spaces should follow the opening bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesAfterOpen = 0;
+
+    /**
+     * How many spaces should precede the closing bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesBeforeClose = 0;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FOREACH);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->requiredSpacesAfterOpen   = (int) $this->requiredSpacesAfterOpen;
+        $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose;
+        $tokens = $phpcsFile->getTokens();
+
+        $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr);
+        if ($openingBracket === false) {
+            $error = 'Possible parse error: FOREACH has no opening parenthesis';
+            $phpcsFile->addWarning($error, $stackPtr, 'MissingOpenParenthesis');
+            return;
+        }
+
+        if (isset($tokens[$openingBracket]['parenthesis_closer']) === false) {
+            $error = 'Possible parse error: FOREACH has no closing parenthesis';
+            $phpcsFile->addWarning($error, $stackPtr, 'MissingCloseParenthesis');
+            return;
+        }
+
+        $closingBracket = $tokens[$openingBracket]['parenthesis_closer'];
+
+        if ($this->requiredSpacesAfterOpen === 0 && $tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) {
+            $error = 'Space found after opening bracket of FOREACH loop';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpen');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($openingBracket + 1), '');
+            }
+        } else if ($this->requiredSpacesAfterOpen > 0) {
+            $spaceAfterOpen = 0;
+            if ($tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) {
+                $spaceAfterOpen = strlen($tokens[($openingBracket + 1)]['content']);
+            }
+
+            if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
+                $error = 'Expected %s spaces after opening bracket; %s found';
+                $data  = array(
+                          $this->requiredSpacesAfterOpen,
+                          $spaceAfterOpen,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
+                    if ($spaceAfterOpen === 0) {
+                        $phpcsFile->fixer->addContent($openingBracket, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($openingBracket + 1), $padding);
+                    }
+                }
+            }
+        }//end if
+
+        if ($this->requiredSpacesBeforeClose === 0 && $tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) {
+            $error = 'Space found before closing bracket of FOREACH loop';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($closingBracket - 1), '');
+            }
+        } else if ($this->requiredSpacesBeforeClose > 0) {
+            $spaceBeforeClose = 0;
+            if ($tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) {
+                $spaceBeforeClose = strlen($tokens[($closingBracket - 1)]['content']);
+            }
+
+            if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) {
+                $error = 'Expected %s spaces before closing bracket; %s found';
+                $data  = array(
+                          $this->requiredSpacesBeforeClose,
+                          $spaceBeforeClose,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
+                    if ($spaceBeforeClose === 0) {
+                        $phpcsFile->fixer->addContentBefore($closingBracket, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($closingBracket - 1), $padding);
+                    }
+                }
+            }
+        }//end if
+
+        $asToken = $phpcsFile->findNext(T_AS, $openingBracket);
+        if ($asToken === false) {
+            $error = 'Possible parse error: FOREACH has no AS statement';
+            $phpcsFile->addWarning($error, $stackPtr, 'MissingAs');
+            return;
+        }
+
+        $content = $tokens[$asToken]['content'];
+        if ($content !== strtolower($content)) {
+            $expected = strtolower($content);
+            $error    = 'AS keyword must be lowercase; expected "%s" but found "%s"';
+            $data     = array(
+                         $expected,
+                         $content,
+                        );
+
+            $fix = $phpcsFile->addFixableError($error, $asToken, 'AsNotLower', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($asToken, $expected);
+            }
+        }
+
+        $doubleArrow = $phpcsFile->findNext(T_DOUBLE_ARROW, $asToken, $closingBracket);
+
+        if ($doubleArrow !== false) {
+            if ($tokens[($doubleArrow - 1)]['code'] !== T_WHITESPACE) {
+                $error = 'Expected 1 space before "=>"; 0 found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeArrow');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContentBefore($doubleArrow, ' ');
+                }
+            } else {
+                if (strlen($tokens[($doubleArrow - 1)]['content']) !== 1) {
+                    $spaces = strlen($tokens[($doubleArrow - 1)]['content']);
+                    $error  = 'Expected 1 space before "=>"; %s found';
+                    $data   = array($spaces);
+                    $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeArrow', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($doubleArrow - 1), ' ');
+                    }
+                }
+            }
+
+            if ($tokens[($doubleArrow + 1)]['code'] !== T_WHITESPACE) {
+                $error = 'Expected 1 space after "=>"; 0 found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterArrow');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContent($doubleArrow, ' ');
+                }
+            } else {
+                if (strlen($tokens[($doubleArrow + 1)]['content']) !== 1) {
+                    $spaces = strlen($tokens[($doubleArrow + 1)]['content']);
+                    $error  = 'Expected 1 space after "=>"; %s found';
+                    $data   = array($spaces);
+                    $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterArrow', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($doubleArrow + 1), ' ');
+                    }
+                }
+            }
+        }//end if
+
+        if ($tokens[($asToken - 1)]['code'] !== T_WHITESPACE) {
+            $error = 'Expected 1 space before "as"; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeAs');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContentBefore($asToken, ' ');
+            }
+        } else {
+            if (strlen($tokens[($asToken - 1)]['content']) !== 1) {
+                $spaces = strlen($tokens[($asToken - 1)]['content']);
+                $error  = 'Expected 1 space before "as"; %s found';
+                $data   = array($spaces);
+                $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeAs', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($asToken - 1), ' ');
+                }
+            }
+        }
+
+        if ($tokens[($asToken + 1)]['code'] !== T_WHITESPACE) {
+            $error = 'Expected 1 space after "as"; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterAs');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($asToken, ' ');
+            }
+        } else {
+            if (strlen($tokens[($asToken + 1)]['content']) !== 1) {
+                $spaces = strlen($tokens[($asToken + 1)]['content']);
+                $error  = 'Expected 1 space after "as"; %s found';
+                $data   = array($spaces);
+                $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterAs', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($asToken + 1), ' ');
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,232 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff.
+ *
+ * Verifies that there is a space between each condition of for loops.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * How many spaces should follow the opening bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesAfterOpen = 0;
+
+    /**
+     * How many spaces should precede the closing bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesBeforeClose = 0;
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FOR);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->requiredSpacesAfterOpen   = (int) $this->requiredSpacesAfterOpen;
+        $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose;
+        $tokens = $phpcsFile->getTokens();
+
+        $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr);
+        if ($openingBracket === false) {
+            $error = 'Possible parse error: no opening parenthesis for FOR keyword';
+            $phpcsFile->addWarning($error, $stackPtr, 'NoOpenBracket');
+            return;
+        }
+
+        $closingBracket = $tokens[$openingBracket]['parenthesis_closer'];
+
+        if ($this->requiredSpacesAfterOpen === 0 && $tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) {
+            $error = 'Space found after opening bracket of FOR loop';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($openingBracket + 1), '');
+            }
+        } else if ($this->requiredSpacesAfterOpen > 0) {
+            $spaceAfterOpen = 0;
+            if ($tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) {
+                $spaceAfterOpen = strlen($tokens[($openingBracket + 1)]['content']);
+            }
+
+            if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
+                $error = 'Expected %s spaces after opening bracket; %s found';
+                $data  = array(
+                          $this->requiredSpacesAfterOpen,
+                          $spaceAfterOpen,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
+                    if ($spaceAfterOpen === 0) {
+                        $phpcsFile->fixer->addContent($openingBracket, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($openingBracket + 1), $padding);
+                    }
+                }
+            }
+        }//end if
+
+        if ($this->requiredSpacesBeforeClose === 0 && $tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) {
+            $error = 'Space found before closing bracket of FOR loop';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($closingBracket - 1), '');
+            }
+        } else if ($this->requiredSpacesBeforeClose > 0) {
+            $spaceBeforeClose = 0;
+            if ($tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) {
+                $spaceBeforeClose = strlen($tokens[($closingBracket - 1)]['content']);
+            }
+
+            if ($this->requiredSpacesBeforeClose !== $spaceBeforeClose) {
+                $error = 'Expected %s spaces before closing bracket; %s found';
+                $data  = array(
+                          $this->requiredSpacesBeforeClose,
+                          $spaceBeforeClose,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data);
+                if ($fix === true) {
+                    $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
+                    if ($spaceBeforeClose === 0) {
+                        $phpcsFile->fixer->addContentBefore($closingBracket, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($closingBracket - 1), $padding);
+                    }
+                }
+            }
+        }//end if
+
+        $firstSemicolon = $phpcsFile->findNext(T_SEMICOLON, $openingBracket, $closingBracket);
+
+        // Check whitespace around each of the tokens.
+        if ($firstSemicolon !== false) {
+            if ($tokens[($firstSemicolon - 1)]['code'] === T_WHITESPACE) {
+                $error = 'Space found before first semicolon of FOR loop';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeFirst');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($firstSemicolon - 1), '');
+                }
+            }
+
+            if ($tokens[($firstSemicolon + 1)]['code'] !== T_WHITESPACE
+                && $tokens[($firstSemicolon + 1)]['code'] !== T_SEMICOLON
+            ) {
+                $error = 'Expected 1 space after first semicolon of FOR loop; 0 found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterFirst');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContent($firstSemicolon, ' ');
+                }
+            } else {
+                if (strlen($tokens[($firstSemicolon + 1)]['content']) !== 1) {
+                    $spaces = strlen($tokens[($firstSemicolon + 1)]['content']);
+                    $error  = 'Expected 1 space after first semicolon of FOR loop; %s found';
+                    $data   = array($spaces);
+                    $fix    = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterFirst', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($firstSemicolon + 1), ' ');
+                    }
+                }
+            }
+
+            $secondSemicolon = $phpcsFile->findNext(T_SEMICOLON, ($firstSemicolon + 1));
+
+            if ($secondSemicolon !== false) {
+                if ($tokens[($secondSemicolon - 1)]['code'] === T_WHITESPACE
+                    && $tokens[($firstSemicolon + 1)]['code'] !== T_SEMICOLON
+                ) {
+                    $error = 'Space found before second semicolon of FOR loop';
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeSecond');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($secondSemicolon - 1), '');
+                    }
+                }
+
+                if (($secondSemicolon + 1) !== $closingBracket
+                    && $tokens[($secondSemicolon + 1)]['code'] !== T_WHITESPACE
+                ) {
+                    $error = 'Expected 1 space after second semicolon of FOR loop; 0 found';
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterSecond');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->addContent($secondSemicolon, ' ');
+                    }
+                } else {
+                    if (strlen($tokens[($secondSemicolon + 1)]['content']) !== 1) {
+                        $spaces = strlen($tokens[($secondSemicolon + 1)]['content']);
+                        $data   = array($spaces);
+                        if (($secondSemicolon + 2) === $closingBracket) {
+                            $error = 'Expected no space after second semicolon of FOR loop; %s found';
+                            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterSecondNoThird', $data);
+                            if ($fix === true) {
+                                $phpcsFile->fixer->replaceToken(($secondSemicolon + 1), '');
+                            }
+                        } else {
+                            $error = 'Expected 1 space after second semicolon of FOR loop; %s found';
+                            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterSecond', $data);
+                            if ($fix === true) {
+                                $phpcsFile->fixer->replaceToken(($secondSemicolon + 1), ' ');
+                            }
+                        }
+                    }
+                }//end if
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_InlineControlStructureSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff.
+ *
+ * Tests the spacing of shorthand IF statements.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_INLINE_THEN);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $openBracket  = null;
+        $closeBracket = null;
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            $parens       = $tokens[$stackPtr]['nested_parenthesis'];
+            $openBracket  = array_pop($parens);
+            $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+        }
+
+        // Find the beginning of the statement. If we don't find a
+        // semicolon (end of statement) or comma (end of array value)
+        // then assume the content before the closing parenthesis is the end.
+        $else         = $phpcsFile->findNext(T_INLINE_ELSE, ($stackPtr + 1));
+        $statementEnd = $phpcsFile->findNext(array(T_SEMICOLON, T_COMMA), ($else + 1), $closeBracket);
+        if ($statementEnd === false) {
+            $statementEnd = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBracket - 1), null, true);
+        }
+
+        // Make sure it's all on the same line.
+        if ($tokens[$statementEnd]['line'] !== $tokens[$stackPtr]['line']) {
+            $error = 'Inline shorthand IF statement must be declared on a single line';
+            $phpcsFile->addError($error, $stackPtr, 'NotSingleLine');
+            return;
+        }
+
+        // Make sure there are spaces around the question mark.
+        $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        $contentAfter  = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$contentBefore]['code'] !== T_CLOSE_PARENTHESIS) {
+            $error = 'Inline shorthand IF statement requires brackets around comparison';
+            $phpcsFile->addError($error, $stackPtr, 'NoBrackets');
+            return;
+        }
+
+        $spaceBefore = ($tokens[$stackPtr]['column'] - ($tokens[$contentBefore]['column'] + strlen($tokens[$contentBefore]['content'])));
+        if ($spaceBefore !== 1) {
+            $error = 'Inline shorthand IF statement requires 1 space before THEN; %s found';
+            $data  = array($spaceBefore);
+            $phpcsFile->addError($error, $stackPtr, 'SpacingBeforeThen', $data);
+        }
+
+        $spaceAfter = (($tokens[$contentAfter]['column']) - ($tokens[$stackPtr]['column'] + 1));
+        if ($spaceAfter !== 1) {
+            $error = 'Inline shorthand IF statement requires 1 space after THEN; %s found';
+            $data  = array($spaceAfter);
+            $phpcsFile->addError($error, $stackPtr, 'SpacingAfterThen', $data);
+        }
+
+        // Make sure the ELSE has the correct spacing.
+        $inlineElse    = $phpcsFile->findNext(T_INLINE_ELSE, ($stackPtr + 1), $statementEnd, false);
+        $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($inlineElse - 1), null, true);
+        $contentAfter  = $phpcsFile->findNext(T_WHITESPACE, ($inlineElse + 1), null, true);
+
+        $spaceBefore = ($tokens[$inlineElse]['column'] - ($tokens[$contentBefore]['column'] + strlen($tokens[$contentBefore]['content'])));
+        if ($spaceBefore !== 1) {
+            $error = 'Inline shorthand IF statement requires 1 space before ELSE; %s found';
+            $data  = array($spaceBefore);
+            $phpcsFile->addError($error, $inlineElse, 'SpacingBeforeElse', $data);
+        }
+
+        $spaceAfter = (($tokens[$contentAfter]['column']) - ($tokens[$inlineElse]['column'] + 1));
+        if ($spaceAfter !== 1) {
+            $error = 'Inline shorthand IF statement requires 1 space after ELSE; %s found';
+            $data  = array($spaceAfter);
+            $phpcsFile->addError($error, $inlineElse, 'SpacingAfterElse', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff.
+ *
+ * Ensures all control structure keywords are lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_ELSE,
+                T_ELSEIF,
+                T_FOREACH,
+                T_FOR,
+                T_DO,
+                T_SWITCH,
+                T_WHILE,
+                T_TRY,
+                T_CATCH,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $content = $tokens[$stackPtr]['content'];
+        if ($content !== strtolower($content)) {
+            $error = '%s keyword must be lowercase; expected "%s" but found "%s"';
+            $data  = array(
+                      strtoupper($content),
+                      strtolower($content),
+                      $content,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,319 @@
+<?php
+/**
+ * Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff.
+ *
+ * Ensures all the breaks and cases are aligned correctly according to their
+ * parent switch's alignment and enforces other switch formatting.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * The number of spaces code should be indented.
+     *
+     * @var int
+     */
+    public $indent = 4;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_SWITCH);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // We can't process SWITCH statements unless we know where they start and end.
+        if (isset($tokens[$stackPtr]['scope_opener']) === false
+            || isset($tokens[$stackPtr]['scope_closer']) === false
+        ) {
+            return;
+        }
+
+        $switch        = $tokens[$stackPtr];
+        $nextCase      = $stackPtr;
+        $caseAlignment = ($switch['column'] + $this->indent);
+        $caseCount     = 0;
+        $foundDefault  = false;
+
+        while (($nextCase = $phpcsFile->findNext(array(T_CASE, T_DEFAULT, T_SWITCH), ($nextCase + 1), $switch['scope_closer'])) !== false) {
+            // Skip nested SWITCH statements; they are handled on their own.
+            if ($tokens[$nextCase]['code'] === T_SWITCH) {
+                $nextCase = $tokens[$nextCase]['scope_closer'];
+                continue;
+            }
+
+            if ($tokens[$nextCase]['code'] === T_DEFAULT) {
+                $type         = 'Default';
+                $foundDefault = true;
+            } else {
+                $type = 'Case';
+                $caseCount++;
+            }
+
+            if ($tokens[$nextCase]['content'] !== strtolower($tokens[$nextCase]['content'])) {
+                $expected = strtolower($tokens[$nextCase]['content']);
+                $error    = strtoupper($type).' keyword must be lowercase; expected "%s" but found "%s"';
+                $data     = array(
+                             $expected,
+                             $tokens[$nextCase]['content'],
+                            );
+
+                $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'NotLower', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken($nextCase, $expected);
+                }
+            }
+
+            if ($tokens[$nextCase]['column'] !== $caseAlignment) {
+                $error = strtoupper($type).' keyword must be indented '.$this->indent.' spaces from SWITCH keyword';
+                $fix   = $phpcsFile->addFixableError($error, $nextCase, $type.'Indent');
+
+                if ($fix === true) {
+                    $padding = str_repeat(' ', ($caseAlignment - 1));
+                    if ($tokens[$nextCase]['column'] === 1
+                        || $tokens[($nextCase - 1)]['code'] !== T_WHITESPACE
+                    ) {
+                        $phpcsFile->fixer->addContentBefore($nextCase, $padding);
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($nextCase - 1), $padding);
+                    }
+                }
+            }
+
+            if ($type === 'Case'
+                && ($tokens[($nextCase + 1)]['type'] !== 'T_WHITESPACE'
+                || $tokens[($nextCase + 1)]['content'] !== ' ')
+            ) {
+                $error = 'CASE keyword must be followed by a single space';
+                $fix   = $phpcsFile->addFixableError($error, $nextCase, 'SpacingAfterCase');
+                if ($fix === true) {
+                    if ($tokens[($nextCase + 1)]['type'] !== 'T_WHITESPACE') {
+                        $phpcsFile->fixer->addContent($nextCase, ' ');
+                    } else {
+                        $phpcsFile->fixer->replaceToken(($nextCase + 1), ' ');
+                    }
+                }
+            }
+
+            if (isset($tokens[$nextCase]['scope_opener']) === false) {
+                $error = 'Possible parse error: CASE missing opening colon';
+                $phpcsFile->addWarning($error, $nextCase, 'MissingColon');
+                continue;
+            }
+
+            $opener = $tokens[$nextCase]['scope_opener'];
+            if ($tokens[($opener - 1)]['type'] === 'T_WHITESPACE') {
+                $error = 'There must be no space before the colon in a '.strtoupper($type).' statement';
+                $fix   = $phpcsFile->addFixableError($error, $nextCase, 'SpaceBeforeColon'.$type);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($opener - 1), '');
+                }
+            }
+
+            $nextBreak = $tokens[$nextCase]['scope_closer'];
+            if ($tokens[$nextBreak]['code'] === T_BREAK
+                || $tokens[$nextBreak]['code'] === T_RETURN
+                || $tokens[$nextBreak]['code'] === T_CONTINUE
+                || $tokens[$nextBreak]['code'] === T_THROW
+                || $tokens[$nextBreak]['code'] === T_EXIT
+            ) {
+                if ($tokens[$nextBreak]['scope_condition'] === $nextCase) {
+                    // Only need to check a couple of things once, even if the
+                    // break is shared between multiple case statements, or even
+                    // the default case.
+                    if ($tokens[$nextBreak]['column'] !== $caseAlignment) {
+                        $error = 'Case breaking statement must be indented '.$this->indent.' spaces from SWITCH keyword';
+                        $fix   = $phpcsFile->addFixableError($error, $nextBreak, 'BreakIndent');
+
+                        if ($fix === true) {
+                            $padding = str_repeat(' ', ($caseAlignment - 1));
+                            if ($tokens[$nextBreak]['column'] === 1
+                                || $tokens[($nextBreak - 1)]['code'] !== T_WHITESPACE
+                            ) {
+                                $phpcsFile->fixer->addContentBefore($nextBreak, $padding);
+                            } else {
+                                $phpcsFile->fixer->replaceToken(($nextBreak - 1), $padding);
+                            }
+                        }
+                    }
+
+                    $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($nextBreak - 1), $stackPtr, true);
+                    if ($tokens[$prev]['line'] !== ($tokens[$nextBreak]['line'] - 1)) {
+                        $error = 'Blank lines are not allowed before case breaking statements';
+                        $phpcsFile->addError($error, $nextBreak, 'SpacingBeforeBreak');
+                    }
+
+                    $nextLine  = $tokens[$tokens[$stackPtr]['scope_closer']]['line'];
+                    $semicolon = $phpcsFile->findEndOfStatement($nextBreak);
+                    for ($i = ($semicolon + 1); $i < $tokens[$stackPtr]['scope_closer']; $i++) {
+                        if ($tokens[$i]['type'] !== 'T_WHITESPACE') {
+                            $nextLine = $tokens[$i]['line'];
+                            break;
+                        }
+                    }
+
+                    if ($type === 'Case') {
+                        // Ensure the BREAK statement is followed by
+                        // a single blank line, or the end switch brace.
+                        if ($nextLine !== ($tokens[$semicolon]['line'] + 2) && $i !== $tokens[$stackPtr]['scope_closer']) {
+                            $error = 'Case breaking statements must be followed by a single blank line';
+                            $fix   = $phpcsFile->addFixableError($error, $nextBreak, 'SpacingAfterBreak');
+                            if ($fix === true) {
+                                $phpcsFile->fixer->beginChangeset();
+                                for ($i = ($semicolon + 1); $i <= $tokens[$stackPtr]['scope_closer']; $i++) {
+                                    if ($tokens[$i]['line'] === $nextLine) {
+                                        $phpcsFile->fixer->addNewlineBefore($i);
+                                        break;
+                                    }
+
+                                    if ($tokens[$i]['line'] === $tokens[$semicolon]['line']) {
+                                        continue;
+                                    }
+
+                                    $phpcsFile->fixer->replaceToken($i, '');
+                                }
+
+                                $phpcsFile->fixer->endChangeset();
+                            }
+                        }//end if
+                    } else {
+                        // Ensure the BREAK statement is not followed by a blank line.
+                        if ($nextLine !== ($tokens[$semicolon]['line'] + 1)) {
+                            $error = 'Blank lines are not allowed after the DEFAULT case\'s breaking statement';
+                            $phpcsFile->addError($error, $nextBreak, 'SpacingAfterDefaultBreak');
+                        }
+                    }//end if
+
+                    $caseLine = $tokens[$nextCase]['line'];
+                    $nextLine = $tokens[$nextBreak]['line'];
+                    for ($i = ($opener + 1); $i < $nextBreak; $i++) {
+                        if ($tokens[$i]['type'] !== 'T_WHITESPACE') {
+                            $nextLine = $tokens[$i]['line'];
+                            break;
+                        }
+                    }
+
+                    if ($nextLine !== ($caseLine + 1)) {
+                        $error = 'Blank lines are not allowed after '.strtoupper($type).' statements';
+                        $phpcsFile->addError($error, $nextCase, 'SpacingAfter'.$type);
+                    }
+                }//end if
+
+                if ($tokens[$nextBreak]['code'] === T_BREAK) {
+                    if ($type === 'Case') {
+                        // Ensure empty CASE statements are not allowed.
+                        // They must have some code content in them. A comment is not enough.
+                        // But count RETURN statements as valid content if they also
+                        // happen to close the CASE statement.
+                        $foundContent = false;
+                        for ($i = ($tokens[$nextCase]['scope_opener'] + 1); $i < $nextBreak; $i++) {
+                            if ($tokens[$i]['code'] === T_CASE) {
+                                $i = $tokens[$i]['scope_opener'];
+                                continue;
+                            }
+
+                            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === false) {
+                                $foundContent = true;
+                                break;
+                            }
+                        }
+
+                        if ($foundContent === false) {
+                            $error = 'Empty CASE statements are not allowed';
+                            $phpcsFile->addError($error, $nextCase, 'EmptyCase');
+                        }
+                    } else {
+                        // Ensure empty DEFAULT statements are not allowed.
+                        // They must (at least) have a comment describing why
+                        // the default case is being ignored.
+                        $foundContent = false;
+                        for ($i = ($tokens[$nextCase]['scope_opener'] + 1); $i < $nextBreak; $i++) {
+                            if ($tokens[$i]['type'] !== 'T_WHITESPACE') {
+                                $foundContent = true;
+                                break;
+                            }
+                        }
+
+                        if ($foundContent === false) {
+                            $error = 'Comment required for empty DEFAULT case';
+                            $phpcsFile->addError($error, $nextCase, 'EmptyDefault');
+                        }
+                    }//end if
+                }//end if
+            } else if ($type === 'Default') {
+                $error = 'DEFAULT case must have a breaking statement';
+                $phpcsFile->addError($error, $nextCase, 'DefaultNoBreak');
+            }//end if
+        }//end while
+
+        if ($foundDefault === false) {
+            $error = 'All SWITCH statements must contain a DEFAULT case';
+            $phpcsFile->addError($error, $stackPtr, 'MissingDefault');
+        }
+
+        if ($tokens[$switch['scope_closer']]['column'] !== $switch['column']) {
+            $error = 'Closing brace of SWITCH statement must be aligned with SWITCH keyword';
+            $phpcsFile->addError($error, $switch['scope_closer'], 'CloseBraceAlign');
+        }
+
+        if ($caseCount === 0) {
+            $error = 'SWITCH statements must contain at least one CASE statement';
+            $phpcsFile->addError($error, $stackPtr, 'MissingCase');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JSLintSniff.php	(revision 5534)
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Squiz_Sniffs_Debug_JSLintSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Debug_JSLintSniff.
+ *
+ * Runs jslint.js on the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Debug_JSLintSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     * @throws PHP_CodeSniffer_Exception If jslint.js could not be run
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName = $phpcsFile->getFilename();
+
+        $rhinoPath  = PHP_CodeSniffer::getConfigData('rhino_path');
+        $jslintPath = PHP_CodeSniffer::getConfigData('jslint_path');
+        if ($rhinoPath === null || $jslintPath === null) {
+            return;
+        }
+
+        $cmd = "$rhinoPath \"$jslintPath\" \"$fileName\"";
+        $msg = exec($cmd, $output, $retval);
+
+        if (is_array($output) === true) {
+            foreach ($output as $finding) {
+                $matches    = array();
+                $numMatches = preg_match('/Lint at line ([0-9]+).*:(.*)$/', $finding, $matches);
+                if ($numMatches === 0) {
+                    continue;
+                }
+
+                $line    = (int) $matches[1];
+                $message = 'jslint says: '.trim($matches[2]);
+                $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool');
+            }
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php	(revision 5534)
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Squiz_Sniffs_Debug_JavaScriptLintSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Debug_JavaScriptLintSniff.
+ *
+ * Runs JavaScript Lint on the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Debug_JavaScriptLintSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName = $phpcsFile->getFilename();
+
+        $jslPath = PHP_CodeSniffer::getConfigData('jsl_path');
+        if (is_null($jslPath) === true) {
+            return;
+        }
+
+        $cmd = '"'.$jslPath.'" -nologo -nofilelisting -nocontext -nosummary -output-format __LINE__:__ERROR__ -process "'.$fileName.'"';
+        $msg = exec($cmd, $output, $retval);
+
+        // Variable $exitCode is the last line of $output if no error occurs, on
+        // error it is numeric. Try to handle various error conditions and
+        // provide useful error reporting.
+        if ($retval === 2 || $retval === 4) {
+            if (is_array($output) === true) {
+                $msg = join('\n', $output);
+            }
+
+            throw new PHP_CodeSniffer_Exception("Failed invoking JavaScript Lint, retval was [$retval], output was [$msg]");
+        }
+
+        if (is_array($output) === true) {
+            foreach ($output as $finding) {
+                $split   = strpos($finding, ':');
+                $line    = substr($finding, 0, $split);
+                $message = substr($finding, ($split + 1));
+                $phpcsFile->addWarningOnLine(trim($message), $line, 'ExternalTool');
+            }
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Squiz_Sniffs_Files_FileExtensionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Files_FileExtensionSniff.
+ *
+ * Tests that classes and interfaces are not declared in .php files
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Files_FileExtensionSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens    = $phpcsFile->getTokens();
+        $fileName  = $phpcsFile->getFileName();
+        $extension = substr($fileName, strrpos($fileName, '.'));
+        $nextClass = $phpcsFile->findNext(array(T_CLASS, T_INTERFACE, T_TRAIT), $stackPtr);
+
+        if ($nextClass !== false) {
+            $phpcsFile->recordMetric($stackPtr, 'File extension for class files', $extension);
+            if ($extension === '.php') {
+                $error = '%s found in ".php" file; use ".inc" extension instead';
+                $data  = array(ucfirst($tokens[$nextClass]['content']));
+                $phpcsFile->addError($error, $stackPtr, 'ClassFound', $data);
+            }
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'File extension for non-class files', $extension);
+            if ($extension === '.inc') {
+                $error = 'No interface or class found in ".inc" file; use ".php" extension instead';
+                $phpcsFile->addError($error, $stackPtr, 'NoClass');
+            }
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php	(revision 5534)
@@ -0,0 +1,358 @@
+<?php
+/**
+ * Squiz_Sniffs_Formatting_OperationBracketSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Formatting_OperationBracketSniff.
+ *
+ * Tests that all arithmetic operations are bracketed.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Formatting_OperatorBracketSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$operators;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($phpcsFile->tokenizerType === 'JS' && $tokens[$stackPtr]['code'] === T_PLUS) {
+            // JavaScript uses the plus operator for string concatenation as well
+            // so we cannot accurately determine if it is a string concat or addition.
+            // So just ignore it.
+            return;
+        }
+
+        // If the & is a reference, then we don't want to check for brackets.
+        if ($tokens[$stackPtr]['code'] === T_BITWISE_AND && $phpcsFile->isReference($stackPtr) === true) {
+            return;
+        }
+
+        // There is one instance where brackets aren't needed, which involves
+        // the minus sign being used to assign a negative number to a variable.
+        if ($tokens[$stackPtr]['code'] === T_MINUS) {
+            // Check to see if we are trying to return -n.
+            $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+            if ($tokens[$prev]['code'] === T_RETURN) {
+                return;
+            }
+
+            $number = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+            if ($tokens[$number]['code'] === T_LNUMBER || $tokens[$number]['code'] === T_DNUMBER) {
+                $previous = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+                if ($previous !== false) {
+                    $isAssignment = in_array($tokens[$previous]['code'], PHP_CodeSniffer_Tokens::$assignmentTokens);
+                    $isEquality   = in_array($tokens[$previous]['code'], PHP_CodeSniffer_Tokens::$equalityTokens);
+                    $isComparison = in_array($tokens[$previous]['code'], PHP_CodeSniffer_Tokens::$comparisonTokens);
+                    if ($isAssignment === true || $isEquality === true || $isComparison === true) {
+                        // This is a negative assignment or comparison.
+                        // We need to check that the minus and the number are
+                        // adjacent.
+                        if (($number - $stackPtr) !== 1) {
+                            $error = 'No space allowed between minus sign and number';
+                            $phpcsFile->addError($error, $stackPtr, 'SpacingAfterMinus');
+                        }
+
+                        return;
+                    }
+                }
+            }
+        }//end if
+
+        $lastBracket = false;
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            $parenthesis = array_reverse($tokens[$stackPtr]['nested_parenthesis'], true);
+            foreach ($parenthesis as $bracket => $endBracket) {
+                $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($bracket - 1), null, true);
+                $prevCode  = $tokens[$prevToken]['code'];
+
+                if ($prevCode === T_ISSET) {
+                    // This operation is inside an isset() call, but has
+                    // no bracket of it's own.
+                    break;
+                }
+
+                if ($prevCode === T_STRING || $prevCode === T_SWITCH) {
+                    // We allow very simple operations to not be bracketed.
+                    // For example, ceil($one / $two).
+                    $allowed = array(
+                                T_VARIABLE,
+                                T_LNUMBER,
+                                T_DNUMBER,
+                                T_STRING,
+                                T_WHITESPACE,
+                                T_THIS,
+                                T_SELF,
+                                T_OBJECT_OPERATOR,
+                                T_DOUBLE_COLON,
+                                T_OPEN_SQUARE_BRACKET,
+                                T_CLOSE_SQUARE_BRACKET,
+                                T_MODULUS,
+                               );
+
+                    for ($prev = ($stackPtr - 1); $prev > $bracket; $prev--) {
+                        if (in_array($tokens[$prev]['code'], $allowed) === true) {
+                            continue;
+                        }
+
+                        if ($tokens[$prev]['code'] === T_CLOSE_PARENTHESIS) {
+                            $prev = $tokens[$prev]['parenthesis_opener'];
+                        } else {
+                            break;
+                        }
+                    }
+
+                    if ($prev !== $bracket) {
+                        break;
+                    }
+
+                    for ($next = ($stackPtr + 1); $next < $endBracket; $next++) {
+                        if (in_array($tokens[$next]['code'], $allowed) === true) {
+                            continue;
+                        }
+
+                        if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) {
+                            $next = $tokens[$next]['parenthesis_closer'];
+                        } else {
+                            break;
+                        }
+                    }
+
+                    if ($next !== $endBracket) {
+                        break;
+                    }
+                }//end if
+
+                if (in_array($prevCode, PHP_CodeSniffer_Tokens::$scopeOpeners) === true) {
+                    // This operation is inside a control structure like FOREACH
+                    // or IF, but has no bracket of it's own.
+                    // The only control structure allowed to do this is SWITCH.
+                    if ($prevCode !== T_SWITCH) {
+                        break;
+                    }
+                }
+
+                if ($prevCode === T_OPEN_PARENTHESIS) {
+                    // These are two open parenthesis in a row. If the current
+                    // one doesn't enclose the operator, go to the previous one.
+                    if ($endBracket < $stackPtr) {
+                        continue;
+                    }
+                }
+
+                $lastBracket = $bracket;
+                break;
+            }//end foreach
+        }//end if
+
+        if ($lastBracket === false) {
+            // It is not in a bracketed statement at all.
+            $previousToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true, null, true);
+            if ($previousToken !== false) {
+                // A list of tokens that indicate that the token is not
+                // part of an arithmetic operation.
+                $invalidTokens = array(
+                                  T_COMMA,
+                                  T_COLON,
+                                  T_OPEN_PARENTHESIS,
+                                  T_OPEN_SQUARE_BRACKET,
+                                  T_OPEN_SHORT_ARRAY,
+                                  T_CASE,
+                                 );
+
+                if (in_array($tokens[$previousToken]['code'], $invalidTokens) === false) {
+                    $this->addMissingBracketsError($phpcsFile, $stackPtr);
+                }
+
+                return;
+            }
+        } else if ($tokens[$lastBracket]['parenthesis_closer'] < $stackPtr) {
+            // There are a set of brackets in front of it that don't include it.
+            $this->addMissingBracketsError($phpcsFile, $stackPtr);
+            return;
+        } else {
+            // We are enclosed in a set of bracket, so the last thing to
+            // check is that we are not also enclosed in square brackets
+            // like this: ($array[$index + 1]), which is invalid.
+            $brackets = array(
+                         T_OPEN_SQUARE_BRACKET,
+                         T_CLOSE_SQUARE_BRACKET,
+                        );
+
+            $squareBracket = $phpcsFile->findPrevious($brackets, ($stackPtr - 1), $lastBracket);
+            if ($squareBracket !== false && $tokens[$squareBracket]['code'] === T_OPEN_SQUARE_BRACKET) {
+                $closeSquareBracket = $phpcsFile->findNext($brackets, ($stackPtr + 1));
+                if ($closeSquareBracket !== false && $tokens[$closeSquareBracket]['code'] === T_CLOSE_SQUARE_BRACKET) {
+                    $this->addMissingBracketsError($phpcsFile, $stackPtr);
+                }
+            }
+
+            return;
+        }//end if
+
+        $lastAssignment = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$assignmentTokens, $stackPtr, null, false, null, true);
+        if ($lastAssignment !== false && $lastAssignment > $lastBracket) {
+            $this->addMissingBracketsError($phpcsFile, $stackPtr);
+        }
+
+    }//end process()
+
+
+    /**
+     * Add and fix the missing brackets error.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function addMissingBracketsError(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $error = 'Arithmetic operation must be bracketed';
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'MissingBrackets');
+
+        if ($fix === false || $phpcsFile->fixer->enabled === false) {
+            return;
+        }
+
+        $tokens = $phpcsFile->getTokens();
+
+        $allowed = array(
+                    T_VARIABLE        => true,
+                    T_LNUMBER         => true,
+                    T_DNUMBER         => true,
+                    T_STRING          => true,
+                    T_WHITESPACE      => true,
+                    T_THIS            => true,
+                    T_SELF            => true,
+                    T_OBJECT_OPERATOR => true,
+                    T_DOUBLE_COLON    => true,
+                    T_MODULUS         => true,
+                    T_ISSET           => true,
+                    T_ARRAY           => true,
+                   );
+
+        // Find the first token in the expression.
+        for ($before = ($stackPtr - 1); $before > 0; $before--) {
+            // Special case for plus operators because we can't tell if they are used
+            // for addition or string contact. So assume string concat to be safe.
+            if ($phpcsFile->tokenizerType === 'JS' && $tokens[$before]['code'] === T_PLUS) {
+                break;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$before]['code']]) === true
+                || isset(PHP_CodeSniffer_Tokens::$operators[$tokens[$before]['code']]) === true
+                || isset(PHP_CodeSniffer_Tokens::$castTokens[$tokens[$before]['code']]) === true
+                || isset($allowed[$tokens[$before]['code']]) === true
+            ) {
+                continue;
+            }
+
+            if ($tokens[$before]['code'] === T_CLOSE_PARENTHESIS) {
+                $before = $tokens[$before]['parenthesis_opener'];
+                continue;
+            }
+
+            if ($tokens[$before]['code'] === T_CLOSE_SQUARE_BRACKET) {
+                $before = $tokens[$before]['bracket_opener'];
+                continue;
+            }
+
+            break;
+        }//end for
+
+        $before = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($before + 1), null, true);
+
+        // Find the last token in the expression.
+        for ($after = ($stackPtr + 1); $after < $phpcsFile->numTokens; $after++) {
+            // Special case for plus operators because we can't tell if they are used
+            // for addition or string contact. So assume string concat to be safe.
+            if ($phpcsFile->tokenizerType === 'JS' && $tokens[$after]['code'] === T_PLUS) {
+                break;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$after]['code']]) === true
+                || isset(PHP_CodeSniffer_Tokens::$operators[$tokens[$after]['code']]) === true
+                || isset(PHP_CodeSniffer_Tokens::$castTokens[$tokens[$after]['code']]) === true
+                || isset($allowed[$tokens[$after]['code']]) === true
+            ) {
+                continue;
+            }
+
+            if ($tokens[$after]['code'] === T_OPEN_PARENTHESIS) {
+                $after = $tokens[$after]['parenthesis_closer'];
+                continue;
+            }
+
+            if ($tokens[$after]['code'] === T_OPEN_SQUARE_BRACKET) {
+                $after = $tokens[$after]['bracket_closer'];
+                continue;
+            }
+
+            break;
+        }//end for
+
+        $after = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($after - 1), null, true);
+
+        // Can only fix this error if both tokens are available for fixing.
+        // Adding one bracket without the other will create parse errors.
+        $phpcsFile->fixer->beginChangeset();
+        $phpcsFile->fixer->replaceToken($before, '('.$tokens[$before]['content']);
+        $phpcsFile->fixer->replaceToken($after, $tokens[$after]['content'].')');
+        $phpcsFile->fixer->endChangeset();
+
+    }//end addMissingBracketsError()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php	(revision 5534)
@@ -0,0 +1,404 @@
+<?php
+/**
+ * Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff.
+ *
+ * Checks that arguments in function declarations are spaced correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * How many spaces should surround the equals signs.
+     *
+     * @var int
+     */
+    public $equalsSpacing = 0;
+
+    /**
+     * How many spaces should follow the opening bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesAfterOpen = 0;
+
+    /**
+     * How many spaces should precede the closing bracket.
+     *
+     * @var int
+     */
+    public $requiredSpacesBeforeClose = 0;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['parenthesis_opener']) === false
+            || isset($tokens[$stackPtr]['parenthesis_closer']) === false
+            || $tokens[$stackPtr]['parenthesis_opener'] === null
+            || $tokens[$stackPtr]['parenthesis_closer'] === null
+        ) {
+            return;
+        }
+
+        $this->equalsSpacing           = (int) $this->equalsSpacing;
+        $this->requiredSpacesAfterOpen = (int) $this->requiredSpacesAfterOpen;
+        $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose;
+
+        $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
+        $this->processBracket($phpcsFile, $openBracket);
+
+        if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
+            $use = $phpcsFile->findNext(T_USE, ($tokens[$openBracket]['parenthesis_closer'] + 1), $tokens[$stackPtr]['scope_opener']);
+            if ($use !== false) {
+                $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1), null);
+                $this->processBracket($phpcsFile, $openBracket);
+            }
+        }
+
+    }//end process()
+
+
+    /**
+     * Processes the contents of a single set of brackets.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being scanned.
+     * @param int                  $openBracket The position of the open bracket
+     *                                          in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function processBracket(PHP_CodeSniffer_File $phpcsFile, $openBracket)
+    {
+        $tokens       = $phpcsFile->getTokens();
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+        $multiLine    = ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']);
+
+        $nextParam = $openBracket;
+        $params    = array();
+        while (($nextParam = $phpcsFile->findNext(T_VARIABLE, ($nextParam + 1), $closeBracket)) !== false) {
+            $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextParam + 1), ($closeBracket + 1), true);
+            if ($nextToken === false) {
+                break;
+            }
+
+            $nextCode = $tokens[$nextToken]['code'];
+
+            if ($nextCode === T_EQUAL) {
+                // Check parameter default spacing.
+                $spacesBefore = 0;
+                if (($nextToken - $nextParam) > 1) {
+                    $spacesBefore = strlen($tokens[($nextParam + 1)]['content']);
+                }
+
+                if ($spacesBefore !== $this->equalsSpacing) {
+                    $error = 'Incorrect spacing between argument "%s" and equals sign; expected '.$this->equalsSpacing.' but found %s';
+                    $data  = array(
+                              $tokens[$nextParam]['content'],
+                              $spacesBefore,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceBeforeEquals', $data);
+                    if ($fix === true) {
+                        $padding = str_repeat(' ', $this->equalsSpacing);
+                        if ($spacesBefore === 0) {
+                            $phpcsFile->fixer->addContentBefore($nextToken, $padding);
+                        } else {
+                            $phpcsFile->fixer->replaceToken(($nextToken - 1), $padding);
+                        }
+                    }
+                }//end if
+
+                $spacesAfter = 0;
+                if ($tokens[($nextToken + 1)]['code'] === T_WHITESPACE) {
+                    $spacesAfter = strlen($tokens[($nextToken + 1)]['content']);
+                }
+
+                if ($spacesAfter !== $this->equalsSpacing) {
+                    $error = 'Incorrect spacing between default value and equals sign for argument "%s"; expected '.$this->equalsSpacing.' but found %s';
+                    $data  = array(
+                              $tokens[$nextParam]['content'],
+                              $spacesAfter,
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceAfterDefault', $data);
+                    if ($fix === true) {
+                        $padding = str_repeat(' ', $this->equalsSpacing);
+                        if ($spacesAfter === 0) {
+                            $phpcsFile->fixer->addContent($nextToken, $padding);
+                        } else {
+                            $phpcsFile->fixer->replaceToken(($nextToken + 1), $padding);
+                        }
+                    }
+                }//end if
+            }//end if
+
+            // Find and check the comma (if there is one).
+            $nextComma = $phpcsFile->findNext(T_COMMA, ($nextParam + 1), $closeBracket);
+            if ($nextComma !== false) {
+                // Comma found.
+                if ($tokens[($nextComma - 1)]['code'] === T_WHITESPACE) {
+                    $error = 'Expected 0 spaces between argument "%s" and comma; %s found';
+                    $data  = array(
+                              $tokens[$nextParam]['content'],
+                              strlen($tokens[($nextComma - 1)]['content']),
+                             );
+
+                    $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceBeforeComma', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($nextComma - 1), '');
+                    }
+                }
+            }
+
+            // Take references into account when expecting the
+            // location of whitespace.
+            $checkToken = ($nextParam - 1);
+            if ($tokens[$checkToken]['code'] === T_ELLIPSIS) {
+                $checkToken--;
+            }
+
+            if ($phpcsFile->isReference($checkToken) === true) {
+                $whitespace = ($checkToken - 1);
+            } else {
+                $whitespace = $checkToken;
+            }
+
+            if (empty($params) === false) {
+                // This is not the first argument in the function declaration.
+                $arg = $tokens[$nextParam]['content'];
+
+                if ($tokens[$whitespace]['code'] === T_WHITESPACE) {
+                    $gap = strlen($tokens[$whitespace]['content']);
+
+                    // Before we throw an error, make sure there is no type hint.
+                    $comma     = $phpcsFile->findPrevious(T_COMMA, ($nextParam - 1));
+                    $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($comma + 1), null, true);
+                    if ($phpcsFile->isReference($nextToken) === true) {
+                        $nextToken++;
+                    }
+
+                    if ($nextToken !== $nextParam) {
+                        // There was a type hint, so check the spacing between
+                        // the hint and the variable as well.
+                        $hint = $tokens[$nextToken]['content'];
+
+                        if ($gap !== 1) {
+                            $error = 'Expected 1 space between type hint and argument "%s"; %s found';
+                            $data  = array(
+                                      $arg,
+                                      $gap,
+                                     );
+                            $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
+                            if ($fix === true) {
+                                $phpcsFile->fixer->replaceToken($whitespace, ' ');
+                            }
+                        }
+
+                        if ($multiLine === false) {
+                            if ($tokens[($comma + 1)]['code'] !== T_WHITESPACE) {
+                                $error = 'Expected 1 space between comma and type hint "%s"; 0 found';
+                                $data  = array($hint);
+                                $fix   = $phpcsFile->addFixableError($error, $nextToken, 'NoSpaceBeforeHint', $data);
+                                if ($fix === true) {
+                                    $phpcsFile->fixer->addContent($comma, ' ');
+                                }
+                            } else {
+                                $gap = strlen($tokens[($comma + 1)]['content']);
+                                if ($gap !== 1) {
+                                    $error = 'Expected 1 space between comma and type hint "%s"; %s found';
+                                    $data  = array(
+                                              $hint,
+                                              $gap,
+                                             );
+                                    $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingBeforeHint', $data);
+                                    if ($fix === true) {
+                                        $phpcsFile->fixer->replaceToken(($comma + 1), ' ');
+                                    }
+                                }
+                            }//end if
+                        }//end if
+                    } else if ($gap !== 1) {
+                        // Just make sure this is not actually an indent.
+                        if ($tokens[$whitespace]['line'] === $tokens[($whitespace - 1)]['line']) {
+                            $error = 'Expected 1 space between comma and argument "%s"; %s found';
+                            $data  = array(
+                                      $arg,
+                                      $gap,
+                                     );
+
+                            $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingBeforeArg', $data);
+                            if ($fix === true) {
+                                $phpcsFile->fixer->replaceToken($whitespace, ' ');
+                            }
+                        }
+                    }//end if
+                } else {
+                    $error = 'Expected 1 space between comma and argument "%s"; 0 found';
+                    $data  = array($arg);
+                    $fix   = $phpcsFile->addFixableError($error, $nextToken, 'NoSpaceBeforeArg', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->addContent($whitespace, ' ');
+                    }
+                }//end if
+            } else {
+                $gap = 0;
+                if ($tokens[$whitespace]['code'] === T_WHITESPACE) {
+                    $gap = strlen($tokens[$whitespace]['content']);
+                }
+
+                $arg = $tokens[$nextParam]['content'];
+
+                // Before we throw an error, make sure there is no type hint.
+                $bracket   = $phpcsFile->findPrevious(T_OPEN_PARENTHESIS, ($nextParam - 1));
+                $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($bracket + 1), null, true);
+                if ($phpcsFile->isReference($nextToken) === true) {
+                    $nextToken++;
+                }
+
+                if ($nextToken !== $nextParam) {
+                    // There was a type hint, so check the spacing between
+                    // the hint and the variable as well.
+                    $hint = $tokens[$nextToken]['content'];
+
+                    if ($gap !== 1) {
+                        $error = 'Expected 1 space between type hint and argument "%s"; %s found';
+                        $data  = array(
+                                  $arg,
+                                  $gap,
+                                 );
+                        $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
+                        if ($fix === true) {
+                            $phpcsFile->fixer->replaceToken(($nextToken + 1), ' ');
+                        }
+                    }
+
+                    $spaceAfterOpen = 0;
+                    if ($tokens[($bracket + 1)]['code'] === T_WHITESPACE) {
+                        $spaceAfterOpen = strlen($tokens[($bracket + 1)]['content']);
+                    }
+
+                    if ($multiLine === false && $spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
+                        $error = 'Expected %s spaces between opening bracket and type hint "%s"; %s found';
+                        $data  = array(
+                                  $this->requiredSpacesAfterOpen,
+                                  $hint,
+                                  $spaceAfterOpen,
+                                 );
+                        $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpenHint', $data);
+                        if ($fix === true) {
+                            $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
+                            if ($gap === 0) {
+                                $phpcsFile->fixer->addContent($openBracket, $padding);
+                            } else {
+                                $phpcsFile->fixer->replaceToken(($openBracket + 1), $padding);
+                            }
+                        }
+                    }
+                } else if ($multiLine === false && $gap !== $this->requiredSpacesAfterOpen) {
+                    $error = 'Expected %s spaces between opening bracket and argument "%s"; %s found';
+                    $data  = array(
+                              $this->requiredSpacesAfterOpen,
+                              $arg,
+                              $gap,
+                             );
+                    $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpen', $data);
+                    if ($fix === true) {
+                        $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
+                        if ($gap === 0) {
+                            $phpcsFile->fixer->addContent($openBracket, $padding);
+                        } else {
+                            $phpcsFile->fixer->replaceToken(($openBracket + 1), $padding);
+                        }
+                    }
+                }//end if
+            }//end if
+
+            $params[] = $nextParam;
+        }//end while
+
+        $gap = 0;
+        if ($tokens[($closeBracket - 1)]['code'] === T_WHITESPACE) {
+            $gap = strlen($tokens[($closeBracket - 1)]['content']);
+        }
+
+        if (empty($params) === true) {
+            // There are no parameters for this function.
+            if (($closeBracket - $openBracket) !== 1) {
+                $error = 'Expected 0 spaces between brackets of function declaration; %s found';
+                $data  = array($gap);
+                $fix   = $phpcsFile->addFixableError($error, $openBracket, 'SpacingBetween', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($openBracket + 1), '');
+                }
+            }
+        } else if ($multiLine === false && $gap !== $this->requiredSpacesBeforeClose) {
+            $lastParam = array_pop($params);
+            $error     = 'Expected %s spaces between argument "%s" and closing bracket; %s found';
+            $data      = array(
+                          $this->requiredSpacesBeforeClose,
+                          $tokens[$lastParam]['content'],
+                          $gap,
+                         );
+            $fix       = $phpcsFile->addFixableError($error, $closeBracket, 'SpacingBeforeClose', $data);
+            if ($fix === true) {
+                $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
+                if ($gap === 0) {
+                    $phpcsFile->fixer->addContentBefore($closeBracket, $padding);
+                } else {
+                    $phpcsFile->fixer->replaceToken(($closeBracket - 1), $padding);
+                }
+            }
+        }//end if
+
+    }//end processBracket()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Squiz_Sniffs_Functions_FunctionDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractPatternSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_Functions_FunctionDeclarationSniff.
+ *
+ * Checks the function declaration is correct.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Functions_FunctionDeclarationSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff
+{
+
+
+    /**
+     * Returns an array of patterns to check are correct.
+     *
+     * @return array
+     */
+    protected function getPatterns()
+    {
+        return array(
+                'function abc(...);',
+                'function abc(...)',
+                'abstract function abc(...);',
+               );
+
+    }//end getPatterns()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Squiz_Sniffs_Functions_FunctionDuplicateArgumentSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Functions_FunctionDuplicateArgumentSpacingSniff.
+ *
+ * Checks that duplicate arguments are not used in function declarations.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $openBracket  = $tokens[$stackPtr]['parenthesis_opener'];
+        $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
+
+        $foundVariables = array();
+        for ($i = ($openBracket + 1); $i < $closeBracket; $i++) {
+            if ($tokens[$i]['code'] === T_VARIABLE) {
+                $variable = $tokens[$i]['content'];
+                if (in_array($variable, $foundVariables) === true) {
+                    $error = 'Variable "%s" appears more than once in function declaration';
+                    $data  = array($variable);
+                    $phpcsFile->addError($error, $i, 'Found', $data);
+                } else {
+                    $foundVariables[] = $variable;
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php	(revision 5534)
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Squiz_Sniffs_Functions_GlobalFunctionSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Functions_GlobalFunctionSniff.
+ *
+ * Tests for functions outside of classes.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Functions_GlobalFunctionSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (empty($tokens[$stackPtr]['conditions']) === true) {
+            $functionName = $phpcsFile->getDeclarationName($stackPtr);
+            if ($functionName === null) {
+                return;
+            }
+
+            // Special exception for __autoload as it needs to be global.
+            if ($functionName !== '__autoload') {
+                $error = 'Consider putting global function "%s" in a static class';
+                $data  = array($functionName);
+                $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff.
+ *
+ * Ensures all class keywords are lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_PUBLIC,
+                T_PRIVATE,
+                T_PROTECTED,
+                T_STATIC,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $content = $tokens[$stackPtr]['content'];
+        if ($content !== strtolower($content)) {
+            $error = '%s keyword must be lowercase; expected "%s" but found "%s"';
+            $data  = array(
+                      strtoupper($content),
+                      strtolower($content),
+                      $content,
+                     );
+            $phpcsFile->addError($error, $stackPtr, 'FoundUppercase', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php	(revision 5534)
@@ -0,0 +1,153 @@
+<?php
+/**
+ * Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PEAR_Sniffs_Functions_FunctionDeclarationSniff', true) === false) {
+    $error = 'Class PEAR_Sniffs_Functions_FunctionDeclarationSniff not found';
+    throw new PHP_CodeSniffer_Exception($error);
+}
+
+/**
+ * Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff.
+ *
+ * Ensure single and multi-line function declarations are defined correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff extends PEAR_Sniffs_Functions_FunctionDeclarationSniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Processes multi-line declarations.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     * @param array                $tokens    The stack of tokens that make up
+     *                                        the file.
+     *
+     * @return void
+     */
+    public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $tokens)
+    {
+        // We do everything the parent sniff does, and a bit more.
+        parent::processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens);
+
+        $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
+        $this->processBracket($phpcsFile, $openBracket, $tokens, 'function');
+
+        if ($tokens[$stackPtr]['code'] !== T_CLOSURE) {
+            return;
+        }
+
+        $use = $phpcsFile->findNext(T_USE, ($tokens[$stackPtr]['parenthesis_closer'] + 1), $tokens[$stackPtr]['scope_opener']);
+        if ($use === false) {
+            return;
+        }
+
+        $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1), null);
+        $this->processBracket($phpcsFile, $openBracket, $tokens, 'use');
+
+        // Also check spacing.
+        if ($tokens[($use - 1)]['code'] === T_WHITESPACE) {
+            $gap = strlen($tokens[($use - 1)]['content']);
+        } else {
+            $gap = 0;
+        }
+
+    }//end processMultiLineDeclaration()
+
+
+    /**
+     * Processes the contents of a single set of brackets.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile   The file being scanned.
+     * @param int                  $openBracket The position of the open bracket
+     *                                          in the stack passed in $tokens.
+     * @param array                $tokens      The stack of tokens that make up
+     *                                          the file.
+     * @param string               $type        The type of the token the brackets
+     *                                          belong to (function or use).
+     *
+     * @return void
+     */
+    public function processBracket(PHP_CodeSniffer_File $phpcsFile, $openBracket, $tokens, $type='function')
+    {
+        $errorPrefix = '';
+        if ($type === 'use') {
+            $errorPrefix = 'Use';
+        }
+
+        $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
+
+        // The open bracket should be the last thing on the line.
+        if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) {
+            $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($openBracket + 1), null, true);
+            if ($tokens[$next]['line'] !== ($tokens[$openBracket]['line'] + 1)) {
+                $error = 'The first parameter of a multi-line '.$type.' declaration must be on the line after the opening bracket';
+                $fix   = $phpcsFile->addFixableError($error, $next, $errorPrefix.'FirstParamSpacing');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addNewline($openBracket);
+                }
+            }
+        }
+
+        // Each line between the brackets should contain a single parameter.
+        $lastComma = null;
+        for ($i = ($openBracket + 1); $i < $closeBracket; $i++) {
+            // Skip brackets, like arrays, as they can contain commas.
+            if (isset($tokens[$i]['bracket_opener']) === true) {
+                $i = $tokens[$i]['bracket_closer'];
+                continue;
+            }
+
+            if (isset($tokens[$i]['parenthesis_opener']) === true) {
+                $i = $tokens[$i]['parenthesis_closer'];
+                continue;
+            }
+
+            if ($tokens[$i]['code'] !== T_COMMA) {
+                continue;
+            }
+
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true);
+            if ($tokens[$next]['line'] !== ($tokens[$i]['line'] + 1)) {
+                $error = 'Multi-line '.$type.' declarations must define one parameter per line';
+                $fix   = $phpcsFile->addFixableError($error, $next, $errorPrefix.'OneParamPerLine');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addNewline($i);
+                }
+            }
+        }//end for
+
+    }//end processBracket()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff.
+ *
+ * Ensures method names are correct depending on whether they are public
+ * or private, and that functions are named correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff extends PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff
+{
+
+
+    /**
+     * Processes the tokens outside the scope.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
+     * @param int                  $stackPtr  The position where this token was
+     *                                        found.
+     *
+     * @return void
+     */
+    protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $functionName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($functionName === null) {
+            return;
+        }
+
+        $errorData = array($functionName);
+
+        // Does this function claim to be magical?
+        if (preg_match('|^__|', $functionName) !== 0) {
+            $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
+            $phpcsFile->addError($error, $stackPtr, 'DoubleUnderscore', $errorData);
+            return;
+        }
+
+        if (PHP_CodeSniffer::isCamelCaps($functionName, false, true, false) === false) {
+            $error = 'Function name "%s" is not in camel caps format';
+            $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
+        }
+
+    }//end processTokenOutsideScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php	(revision 5534)
@@ -0,0 +1,234 @@
+<?php
+/**
+ * Squiz_Sniffs_NamingConventions_ValidVariableNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_NamingConventions_ValidVariableNameSniff.
+ *
+ * Checks the naming of variables and member variables.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_NamingConventions_ValidVariableNameSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+    /**
+     * Tokens to ignore so that we can find a DOUBLE_COLON.
+     *
+     * @var array
+     */
+    private $_ignore = array(
+                        T_WHITESPACE,
+                        T_COMMENT,
+                       );
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens  = $phpcsFile->getTokens();
+        $varName = ltrim($tokens[$stackPtr]['content'], '$');
+
+        $phpReservedVars = array(
+                            '_SERVER',
+                            '_GET',
+                            '_POST',
+                            '_REQUEST',
+                            '_SESSION',
+                            '_ENV',
+                            '_COOKIE',
+                            '_FILES',
+                            'GLOBALS',
+                            'http_response_header',
+                            'HTTP_RAW_POST_DATA',
+                            'php_errormsg',
+                           );
+
+        // If it's a php reserved var, then its ok.
+        if (in_array($varName, $phpReservedVars) === true) {
+            return;
+        }
+
+        $objOperator = $phpcsFile->findNext(array(T_WHITESPACE), ($stackPtr + 1), null, true);
+        if ($tokens[$objOperator]['code'] === T_OBJECT_OPERATOR) {
+            // Check to see if we are using a variable from an object.
+            $var = $phpcsFile->findNext(array(T_WHITESPACE), ($objOperator + 1), null, true);
+            if ($tokens[$var]['code'] === T_STRING) {
+                $bracket = $phpcsFile->findNext(array(T_WHITESPACE), ($var + 1), null, true);
+                if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) {
+                    $objVarName = $tokens[$var]['content'];
+
+                    // There is no way for us to know if the var is public or
+                    // private, so we have to ignore a leading underscore if there is
+                    // one and just check the main part of the variable name.
+                    $originalVarName = $objVarName;
+                    if (substr($objVarName, 0, 1) === '_') {
+                        $objVarName = substr($objVarName, 1);
+                    }
+
+                    if (PHP_CodeSniffer::isCamelCaps($objVarName, false, true, false) === false) {
+                        $error = 'Variable "%s" is not in valid camel caps format';
+                        $data  = array($originalVarName);
+                        $phpcsFile->addError($error, $var, 'NotCamelCaps', $data);
+                    }
+                }//end if
+            }//end if
+        }//end if
+
+        // There is no way for us to know if the var is public or private,
+        // so we have to ignore a leading underscore if there is one and just
+        // check the main part of the variable name.
+        $originalVarName = $varName;
+        if (substr($varName, 0, 1) === '_') {
+            $objOperator = $phpcsFile->findPrevious(array(T_WHITESPACE), ($stackPtr - 1), null, true);
+            if ($tokens[$objOperator]['code'] === T_DOUBLE_COLON) {
+                // The variable lives within a class, and is referenced like
+                // this: MyClass::$_variable, so we don't know its scope.
+                $inClass = true;
+            } else {
+                $inClass = $phpcsFile->hasCondition($stackPtr, array(T_CLASS, T_INTERFACE, T_TRAIT));
+            }
+
+            if ($inClass === true) {
+                $varName = substr($varName, 1);
+            }
+        }
+
+        if (PHP_CodeSniffer::isCamelCaps($varName, false, true, false) === false) {
+            $error = 'Variable "%s" is not in valid camel caps format';
+            $data  = array($originalVarName);
+            $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data);
+        }
+
+    }//end processVariable()
+
+
+    /**
+     * Processes class member variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $varName     = ltrim($tokens[$stackPtr]['content'], '$');
+        $memberProps = $phpcsFile->getMemberProperties($stackPtr);
+        if (empty($memberProps) === true) {
+            // Couldn't get any info about this variable, which
+            // generally means it is invalid or possibly has a parse
+            // error. Any errors will be reported by the core, so
+            // we can ignore it.
+            return;
+        }
+
+        $public    = ($memberProps['scope'] !== 'private');
+        $errorData = array($varName);
+
+        if ($public === true) {
+            if (substr($varName, 0, 1) === '_') {
+                $error = '%s member variable "%s" must not contain a leading underscore';
+                $data  = array(
+                          ucfirst($memberProps['scope']),
+                          $errorData[0],
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data);
+                return;
+            }
+        } else {
+            if (substr($varName, 0, 1) !== '_') {
+                $error = 'Private member variable "%s" must contain a leading underscore';
+                $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $errorData);
+                return;
+            }
+        }
+
+        if (PHP_CodeSniffer::isCamelCaps($varName, false, $public, false) === false) {
+            $error = 'Member variable "%s" is not in valid camel caps format';
+            $phpcsFile->addError($error, $stackPtr, 'MemberNotCamelCaps', $errorData);
+        }
+
+    }//end processMemberVar()
+
+
+    /**
+     * Processes the variable found within a double quoted string.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the double quoted
+     *                                        string.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $phpReservedVars = array(
+                            '_SERVER',
+                            '_GET',
+                            '_POST',
+                            '_REQUEST',
+                            '_SESSION',
+                            '_ENV',
+                            '_COOKIE',
+                            '_FILES',
+                            'GLOBALS',
+                            'http_response_header',
+                            'HTTP_RAW_POST_DATA',
+                            'php_errormsg',
+                           );
+
+        if (preg_match_all('|[^\\\]\${?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) {
+            foreach ($matches[1] as $varName) {
+                // If it's a php reserved var, then its ok.
+                if (in_array($varName, $phpReservedVars) === true) {
+                    continue;
+                }
+
+                if (PHP_CodeSniffer::isCamelCaps($varName, false, true, false) === false) {
+                    $error = 'Variable "%s" is not in valid camel caps format';
+                    $data  = array($varName);
+                    $phpcsFile->addError($error, $stackPtr, 'StringNotCamelCaps', $data);
+                }
+            }
+        }
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php	(revision 5534)
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Ensures that object indexes are written in dot notation.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer_MySource
+ * @author    Sertan Danis <sdanis@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Ensures that object indexes are written in dot notation.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Sertan Danis <sdanis@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Objects_DisallowObjectStringIndexSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_SQUARE_BRACKET);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Check if the next non whitespace token is a string.
+        $index = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($tokens[$index]['code'] !== T_CONSTANT_ENCAPSED_STRING) {
+            return;
+        }
+
+        // Make sure it is the only thing in the square brackets.
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($index + 1), null, true);
+        if ($tokens[$next]['code'] !== T_CLOSE_SQUARE_BRACKET) {
+            return;
+        }
+
+        // Allow indexes that have dots in them because we can't write
+        // them in dot notation.
+        $content = trim($tokens[$index]['content'], '"\' ');
+        if (strpos($content, '.') !== false) {
+            return;
+        }
+
+        // Also ignore reserved words.
+        if ($content === 'super') {
+            return;
+        }
+
+        // Token before the opening square bracket cannot be a var name.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] === T_STRING) {
+            $error = 'Object indexes must be written in dot notation';
+            $phpcsFile->addError($error, $prev, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php	(revision 5534)
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Squiz_Sniffs_Objects_ObjectInstantiationSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Objects_ObjectInstantiationSniff.
+ *
+ * Ensures objects are assigned to a variable when instantiated.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Objects_ObjectInstantiationSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Registers the token types that this sniff wishes to listen to.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_NEW);
+
+    }//end register()
+
+
+    /**
+     * Process the tokens that this sniff is listening for.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $allowedTokens   = PHP_CodeSniffer_Tokens::$emptyTokens;
+        $allowedTokens[] = T_BITWISE_AND;
+
+        $prev = $phpcsFile->findPrevious($allowedTokens, ($stackPtr - 1), null, true);
+
+        $allowedTokens = array(
+                          T_EQUAL        => true,
+                          T_DOUBLE_ARROW => true,
+                          T_THROW        => true,
+                          T_RETURN       => true,
+                          T_INLINE_THEN  => true,
+                          T_INLINE_ELSE  => true,
+                         );
+
+        if (isset($allowedTokens[$tokens[$prev]['code']]) === false) {
+            $error = 'New objects must be assigned to a variable';
+            $phpcsFile->addError($error, $stackPtr, 'NotAssigned');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php	(revision 5534)
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Squiz_Sniffs_Objects_ObjectMemberCommaSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Objects_ObjectMemberCommaSniff.
+ *
+ * Ensures the last member of an object is not followed by a comma.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Objects_ObjectMemberCommaSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Registers the token types that this sniff wishes to listen to.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_CLOSE_OBJECT);
+
+    }//end register()
+
+
+    /**
+     * Process the tokens that this sniff is listening for.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] === T_COMMA) {
+            $error = 'Last member of object must not be followed by a comma';
+            $fix   = $phpcsFile->addFixableError($error, $prev, 'Missing');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($prev, '');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php	(revision 5534)
@@ -0,0 +1,237 @@
+<?php
+/**
+ * A Sniff to enforce the use of IDENTICAL type operators rather than EQUAL operators.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * A Sniff to enforce the use of IDENTICAL type operators rather than EQUAL operators.
+ *
+ * The use of === true is enforced over implicit true statements,
+ * for example:
+ *
+ * <code>
+ * if ($a)
+ * {
+ *     ...
+ * }
+ * </code>
+ *
+ * should be:
+ *
+ * <code>
+ * if ($a === true)
+ * {
+ *     ...
+ * }
+ * </code>
+ *
+ * It also enforces the use of === false over ! operators.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * A list of valid comparison operators.
+     *
+     * @var array
+     */
+    private static $_validOps = array(
+                                 T_IS_IDENTICAL,
+                                 T_IS_NOT_IDENTICAL,
+                                 T_LESS_THAN,
+                                 T_GREATER_THAN,
+                                 T_IS_GREATER_OR_EQUAL,
+                                 T_IS_SMALLER_OR_EQUAL,
+                                 T_INSTANCEOF,
+                                );
+
+    /**
+     * A list of invalid operators with their alternatives.
+     *
+     * @var array(int => string)
+     */
+    private static $_invalidOps = array(
+                                   'PHP' => array(
+                                             T_IS_EQUAL     => '===',
+                                             T_IS_NOT_EQUAL => '!==',
+                                             T_BOOLEAN_NOT  => '=== FALSE',
+                                            ),
+                                   'JS'  => array(
+                                             T_IS_EQUAL     => '===',
+                                             T_IS_NOT_EQUAL => '!==',
+                                            ),
+                                  );
+
+
+    /**
+     * Registers the token types that this sniff wishes to listen to.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_ELSEIF,
+                T_INLINE_THEN,
+                T_WHILE,
+                T_FOR,
+               );
+
+    }//end register()
+
+
+    /**
+     * Process the tokens that this sniff is listening for.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where the token
+     *                                        was found.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens    = $phpcsFile->getTokens();
+        $tokenizer = $phpcsFile->tokenizerType;
+
+        if ($tokens[$stackPtr]['code'] === T_INLINE_THEN) {
+            $end = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+            if ($tokens[$end]['code'] !== T_CLOSE_PARENTHESIS) {
+                // This inline IF statement does not have its condition
+                // bracketed, so we need to guess where it starts.
+                for ($i = ($end - 1); $i >= 0; $i--) {
+                    if ($tokens[$i]['code'] === T_SEMICOLON) {
+                        // Stop here as we assume it is the end
+                        // of the previous statement.
+                        break;
+                    } else if ($tokens[$i]['code'] === T_OPEN_TAG) {
+                        // Stop here as this is the start of the file.
+                        break;
+                    } else if ($tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET) {
+                        // Stop if this is the closing brace of
+                        // a code block.
+                        if (isset($tokens[$i]['scope_opener']) === true) {
+                            break;
+                        }
+                    } else if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET) {
+                        // Stop if this is the opening brace of
+                        // a code block.
+                        if (isset($tokens[$i]['scope_closer']) === true) {
+                            break;
+                        }
+                    }
+                }//end for
+
+                $start = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($i + 1), null, true);
+            } else {
+                if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) {
+                    return;
+                }
+
+                $start = $tokens[$end]['parenthesis_opener'];
+            }//end if
+        } else if ($tokens[$stackPtr]['code'] === T_FOR) {
+            if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) {
+                return;
+            }
+
+            $openingBracket = $tokens[$stackPtr]['parenthesis_opener'];
+            $closingBracket = $tokens[$stackPtr]['parenthesis_closer'];
+
+            $start = $phpcsFile->findNext(T_SEMICOLON, $openingBracket, $closingBracket);
+            $end   = $phpcsFile->findNext(T_SEMICOLON, ($start + 1), $closingBracket);
+            if ($start === false || $end === false) {
+                return;
+            }
+        } else {
+            if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) {
+                return;
+            }
+
+            $start = $tokens[$stackPtr]['parenthesis_opener'];
+            $end   = $tokens[$stackPtr]['parenthesis_closer'];
+        }//end if
+
+        $requiredOps = 0;
+        $foundOps    = 0;
+
+        for ($i = $start; $i <= $end; $i++) {
+            $type = $tokens[$i]['code'];
+            if (in_array($type, array_keys(self::$_invalidOps[$tokenizer])) === true) {
+                $error = 'Operator %s prohibited; use %s instead';
+                $data  = array(
+                          $tokens[$i]['content'],
+                          self::$_invalidOps[$tokenizer][$type],
+                         );
+                $phpcsFile->addError($error, $i, 'NotAllowed', $data);
+                $foundOps++;
+            } else if (in_array($type, self::$_validOps) === true) {
+                $foundOps++;
+            }
+
+            if ($phpcsFile->tokenizerType !== 'JS') {
+                if ($tokens[$i]['code'] === T_BOOLEAN_AND || $tokens[$i]['code'] === T_BOOLEAN_OR) {
+                    $requiredOps++;
+
+                    // When the instanceof operator is used with another operator
+                    // like ===, you can get more ops than are required.
+                    if ($foundOps > $requiredOps) {
+                        $foundOps = $requiredOps;
+                    }
+
+                    // If we get to here and we have not found the right number of
+                    // comparison operators, then we must have had an implicit
+                    // true operation ie. if ($a) instead of the required
+                    // if ($a === true), so let's add an error.
+                    if ($requiredOps !== $foundOps) {
+                        $error = 'Implicit true comparisons prohibited; use === TRUE instead';
+                        $phpcsFile->addError($error, $stackPtr, 'ImplicitTrue');
+                        $foundOps++;
+                    }
+                }
+            }//end if
+        }//end for
+
+        $requiredOps++;
+
+        if ($phpcsFile->tokenizerType !== 'JS') {
+            if ($foundOps < $requiredOps) {
+                $error = 'Implicit true comparisons prohibited; use === TRUE instead';
+                $phpcsFile->addError($error, $stackPtr, 'ImplicitTrue');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php	(revision 5534)
@@ -0,0 +1,236 @@
+<?php
+/**
+ * Squiz_Sniffs_Operators_IncrementDecrementUsageSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Operators_IncrementDecrementUsageSniff.
+ *
+ * Tests that the ++ operators are used when possible and not
+ * used when it makes the code confusing.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Operators_IncrementDecrementUsageSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_EQUAL,
+                T_PLUS_EQUAL,
+                T_MINUS_EQUAL,
+                T_INC,
+                T_DEC,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['code'] === T_INC || $tokens[$stackPtr]['code'] === T_DEC) {
+            $this->processIncDec($phpcsFile, $stackPtr);
+        } else {
+            $this->processAssignment($phpcsFile, $stackPtr);
+        }
+
+    }//end process()
+
+
+    /**
+     * Checks to ensure increment and decrement operators are not confusing.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processIncDec(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Work out where the variable is so we know where to
+        // start looking for other operators.
+        if ($tokens[($stackPtr - 1)]['code'] === T_VARIABLE) {
+            $start = ($stackPtr + 1);
+        } else {
+            $start = ($stackPtr + 2);
+        }
+
+        $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, $start, null, true);
+        if ($next === false) {
+            return;
+        }
+
+        if (isset(PHP_CodeSniffer_Tokens::$arithmeticTokens[$tokens[$next]['code']]) === true) {
+            $error = 'Increment and decrement operators cannot be used in an arithmetic operation';
+            $phpcsFile->addError($error, $stackPtr, 'NotAllowed');
+            return;
+        }
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($start - 3), null, true);
+        if ($prev === false) {
+            return;
+        }
+
+        // Check if this is in a string concat.
+        if ($tokens[$next]['code'] === T_STRING_CONCAT || $tokens[$prev]['code'] === T_STRING_CONCAT) {
+            $error = 'Increment and decrement operators must be bracketed when used in string concatenation';
+            $phpcsFile->addError($error, $stackPtr, 'NoBrackets');
+        }
+
+    }//end processIncDec()
+
+
+    /**
+     * Checks to ensure increment and decrement operators are used.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processAssignment(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $assignedVar = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        // Not an assignment, return.
+        if ($tokens[$assignedVar]['code'] !== T_VARIABLE) {
+            return;
+        }
+
+        $statementEnd = $phpcsFile->findNext(array(T_SEMICOLON, T_CLOSE_PARENTHESIS, T_CLOSE_SQUARE_BRACKET, T_CLOSE_CURLY_BRACKET), $stackPtr);
+
+        // If there is anything other than variables, numbers, spaces or operators we need to return.
+        $noiseTokens = $phpcsFile->findNext(array(T_LNUMBER, T_VARIABLE, T_WHITESPACE, T_PLUS, T_MINUS, T_OPEN_PARENTHESIS), ($stackPtr + 1), $statementEnd, true);
+
+        if ($noiseTokens !== false) {
+            return;
+        }
+
+        // If we are already using += or -=, we need to ignore
+        // the statement if a variable is being used.
+        if ($tokens[$stackPtr]['code'] !== T_EQUAL) {
+            $nextVar = $phpcsFile->findNext(T_VARIABLE, ($stackPtr + 1), $statementEnd);
+            if ($nextVar !== false) {
+                return;
+            }
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_EQUAL) {
+            $nextVar          = ($stackPtr + 1);
+            $previousVariable = ($stackPtr + 1);
+            $variableCount    = 0;
+            while (($nextVar = $phpcsFile->findNext(T_VARIABLE, ($nextVar + 1), $statementEnd)) !== false) {
+                $previousVariable = $nextVar;
+                $variableCount++;
+            }
+
+            if ($variableCount !== 1) {
+                return;
+            }
+
+            $nextVar = $previousVariable;
+            if ($tokens[$nextVar]['content'] !== $tokens[$assignedVar]['content']) {
+                return;
+            }
+        }
+
+        // We have only one variable, and it's the same as what is being assigned,
+        // so we need to check what is being added or subtracted.
+        $nextNumber     = ($stackPtr + 1);
+        $previousNumber = ($stackPtr + 1);
+        $numberCount    = 0;
+        while (($nextNumber = $phpcsFile->findNext(array(T_LNUMBER), ($nextNumber + 1), $statementEnd, false)) !== false) {
+            $previousNumber = $nextNumber;
+            $numberCount++;
+        }
+
+        if ($numberCount !== 1) {
+            return;
+        }
+
+        $nextNumber = $previousNumber;
+        if ($tokens[$nextNumber]['content'] === '1') {
+            if ($tokens[$stackPtr]['code'] === T_EQUAL) {
+                $opToken = $phpcsFile->findNext(array(T_PLUS, T_MINUS), ($nextVar + 1), $statementEnd);
+                if ($opToken === false) {
+                    // Operator was before the variable, like:
+                    // $var = 1 + $var;
+                    // So we ignore it.
+                    return;
+                }
+
+                $operator = $tokens[$opToken]['content'];
+            } else {
+                $operator = substr($tokens[$stackPtr]['content'], 0, 1);
+            }
+
+            // If we are adding or subtracting negative value, the operator
+            // needs to be reversed.
+            if ($tokens[$stackPtr]['code'] !== T_EQUAL) {
+                $negative = $phpcsFile->findPrevious(T_MINUS, ($nextNumber - 1), $stackPtr);
+                if ($negative !== false) {
+                    if ($operator === '+') {
+                        $operator = '-';
+                    } else {
+                        $operator = '+';
+                    }
+                }
+            }
+
+            $expected = $tokens[$assignedVar]['content'].$operator.$operator;
+            $found    = $phpcsFile->getTokensAsString($assignedVar, ($statementEnd - $assignedVar + 1));
+
+            if ($operator === '+') {
+                $error = 'Increment';
+            } else {
+                $error = 'Decrement';
+            }
+
+            $error .= " operators should be used where possible; found \"$found\" but expected \"$expected\"";
+            $phpcsFile->addError($error, $stackPtr);
+        }//end if
+
+    }//end processAssignment()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff.
+ *
+ * Checks to ensure that the logical operators 'and' and 'or' are not used.
+ * Use the && and || operators instead.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_LOGICAL_AND,
+                T_LOGICAL_OR,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $replacements = array(
+                         'and' => '&&',
+                         'or'  => '||',
+                        );
+
+        $operator = strtolower($tokens[$stackPtr]['content']);
+        if (isset($replacements[$operator]) === false) {
+            return;
+        }
+
+        $error = 'Logical operator "%s" is prohibited; use "%s" instead';
+        $data  = array(
+                  $operator,
+                  $replacements[$operator],
+                 );
+        $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php	(revision 5534)
@@ -0,0 +1,237 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_CommentedOutCodeSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_CommentedOutCodeSniff.
+ *
+ * Warn about commented out code.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_CommentedOutCodeSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'CSS',
+                                  );
+
+    /**
+     * If a comment is more than $maxPercentage% code, a warning will be shown.
+     *
+     * @var int
+     */
+    public $maxPercentage = 35;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_COMMENT);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Process whole comment blocks at once, so skip all but the first token.
+        if ($stackPtr > 0 && $tokens[$stackPtr]['code'] === $tokens[($stackPtr - 1)]['code']) {
+            return;
+        }
+
+        // Ignore comments at the end of code blocks.
+        if (substr($tokens[$stackPtr]['content'], 0, 6) === '//end ') {
+            return;
+        }
+
+        $content = '';
+        if ($phpcsFile->tokenizerType === 'PHP') {
+            $content = '<?php ';
+        }
+
+        for ($i = $stackPtr; $i < $phpcsFile->numTokens; $i++) {
+            if ($tokens[$stackPtr]['code'] !== $tokens[$i]['code']) {
+                break;
+            }
+
+            /*
+                Trim as much off the comment as possible so we don't
+                have additional whitespace tokens or comment tokens
+            */
+
+            $tokenContent = trim($tokens[$i]['content']);
+
+            if (substr($tokenContent, 0, 2) === '//') {
+                $tokenContent = substr($tokenContent, 2);
+            }
+
+            if (substr($tokenContent, 0, 1) === '#') {
+                $tokenContent = substr($tokenContent, 1);
+            }
+
+            if (substr($tokenContent, 0, 3) === '/**') {
+                $tokenContent = substr($tokenContent, 3);
+            }
+
+            if (substr($tokenContent, 0, 2) === '/*') {
+                $tokenContent = substr($tokenContent, 2);
+            }
+
+            if (substr($tokenContent, -2) === '*/') {
+                $tokenContent = substr($tokenContent, 0, -2);
+            }
+
+            if (substr($tokenContent, 0, 1) === '*') {
+                $tokenContent = substr($tokenContent, 1);
+            }
+
+            $content .= $tokenContent.$phpcsFile->eolChar;
+        }//end for
+
+        $content = trim($content);
+
+        if ($phpcsFile->tokenizerType === 'PHP') {
+            $content .= ' ?>';
+        }
+
+        // Quite a few comments use multiple dashes, equals signs etc
+        // to frame comments and licence headers.
+        $content = preg_replace('/[-=*]+/', '-', $content);
+
+        // Because we are not really parsing code, the tokenizer can throw all sorts
+        // of errors that don't mean anything, so ignore them.
+        $oldErrors = ini_get('error_reporting');
+        ini_set('error_reporting', 0);
+        try {
+            $stringTokens = PHP_CodeSniffer_File::tokenizeString($content, $phpcsFile->tokenizer, $phpcsFile->eolChar);
+        } catch (PHP_CodeSniffer_Exception $e) {
+            // We couldn't check the comment, so ignore it.
+            ini_set('error_reporting', $oldErrors);
+            return;
+        }
+
+        ini_set('error_reporting', $oldErrors);
+
+        $emptyTokens = array(
+                        T_WHITESPACE              => true,
+                        T_STRING                  => true,
+                        T_STRING_CONCAT           => true,
+                        T_ENCAPSED_AND_WHITESPACE => true,
+                        T_NONE                    => true,
+                        T_COMMENT                 => true,
+                       );
+
+        $numTokens = count($stringTokens);
+
+        /*
+            We know what the first two and last two tokens should be
+            (because we put them there) so ignore this comment if those
+            tokens were not parsed correctly. It obviously means this is not
+            valid code.
+        */
+
+        // First token is always the opening PHP tag.
+        if ($stringTokens[0]['code'] !== T_OPEN_TAG) {
+            return;
+        }
+
+        // Last token is always the closing PHP tag, unless something went wrong.
+        if (isset($stringTokens[($numTokens - 1)]) === false
+            || $stringTokens[($numTokens - 1)]['code'] !== T_CLOSE_TAG
+        ) {
+            return;
+        }
+
+        // Second last token is always whitespace or a comment, depending
+        // on the code inside the comment.
+        if ($phpcsFile->tokenizerType === 'PHP'
+            && isset(PHP_CodeSniffer_Tokens::$emptyTokens[$stringTokens[($numTokens - 2)]['code']]) === false
+        ) {
+            return;
+        }
+
+        $numComment  = 0;
+        $numPossible = 0;
+        $numCode     = 0;
+
+        for ($i = 0; $i < $numTokens; $i++) {
+            if (isset($emptyTokens[$stringTokens[$i]['code']]) === true) {
+                // Looks like comment.
+                $numComment++;
+            } else if (in_array($stringTokens[$i]['code'], PHP_CodeSniffer_Tokens::$comparisonTokens) === true
+                || in_array($stringTokens[$i]['code'], PHP_CodeSniffer_Tokens::$arithmeticTokens) === true
+                || $stringTokens[$i]['code'] === T_GOTO_LABEL
+            ) {
+                // Commented out HTML/XML and other docs contain a lot of these
+                // characters, so it is best to not use them directly.
+                $numPossible++;
+            } else {
+                // Looks like code.
+                $numCode++;
+            }
+        }
+
+        // We subtract 3 from the token number so we ignore the start/end tokens
+        // and their surrounding whitespace. We take 2 off the number of code
+        // tokens so we ignore the start/end tokens.
+        if ($numTokens > 3) {
+            $numTokens -= 3;
+        }
+
+        if ($numCode >= 2) {
+            $numCode -= 2;
+        }
+
+        $percentCode = ceil((($numCode / $numTokens) * 100));
+        if ($percentCode > $this->maxPercentage) {
+            // Just in case.
+            $percentCode = min(100, $percentCode);
+
+            $error = 'This comment is %s%% valid code; is this commented out code?';
+            $data  = array($percentCode);
+            $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_DisallowBooleanStatementSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_DisallowBooleanStatementSniff.
+ *
+ * Ensures that boolean operators are only used inside control structure conditions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DisallowBooleanStatementSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$booleanOperators;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+            $foundOwner = false;
+            foreach ($tokens[$stackPtr]['nested_parenthesis'] as $open => $close) {
+                if (isset($tokens[$open]['parenthesis_owner']) === true) {
+                    // Any owner means we are not just a simple statement.
+                    return;
+                }
+            }
+        }
+
+        $error = 'Boolean operators are not allowed outside of control structure conditions';
+        $phpcsFile->addError($error, $stackPtr, 'Found');
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php	(revision 5534)
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff.
+ *
+ * Ensures that the value of a comparison is not assigned to a variable.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DisallowComparisonAssignmentSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_EQUAL);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore default value assignments in function definitions.
+        $function = $phpcsFile->findPrevious(T_FUNCTION, ($stackPtr - 1), null, false, null, true);
+        if ($function !== false) {
+            $opener = $tokens[$function]['parenthesis_opener'];
+            $closer = $tokens[$function]['parenthesis_closer'];
+            if ($opener < $stackPtr && $closer > $stackPtr) {
+                return;
+            }
+        }
+
+        // Ignore values in array definitions.
+        $array = $phpcsFile->findNext(
+            T_ARRAY,
+            ($stackPtr + 1),
+            null,
+            false,
+            null,
+            true
+        );
+
+        if ($array !== false) {
+            return;
+        }
+
+        // Ignore function calls.
+        $ignore = array(
+                   T_STRING,
+                   T_WHITESPACE,
+                   T_OBJECT_OPERATOR,
+                  );
+
+        $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true);
+        if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS
+            && $tokens[($next - 1)]['code'] === T_STRING
+        ) {
+            // Code will look like: $var = myFunction(
+            // and will be ignored.
+            return;
+        }
+
+        $endStatement = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1));
+        if ($tokens[$stackPtr]['conditions'] !== $tokens[$endStatement]['conditions']) {
+            // This statement doesn't end with a semicolon, which is the case for
+            // the last expression in a for loop.
+            return;
+        }
+
+        for ($i = ($stackPtr + 1); $i < $endStatement; $i++) {
+            if (isset(PHP_CodeSniffer_Tokens::$comparisonTokens[$tokens[$i]['code']]) === true
+                || $tokens[$i]['code'] === T_INLINE_THEN
+            ) {
+                $error = 'The value of a comparison must not be assigned to a variable';
+                $phpcsFile->addError($error, $stackPtr, 'AssignedComparison');
+                break;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$booleanOperators[$tokens[$i]['code']]) === true
+                || $tokens[$i]['code'] === T_BOOLEAN_NOT
+            ) {
+                $error = 'The value of a boolean operation must not be assigned to a variable';
+                $phpcsFile->addError($error, $stackPtr, 'AssignedBool');
+                break;
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Squiz_Sniffs_Formatting_DisallowInlineIfSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Formatting_DisallowInlineIfSniff.
+ *
+ * Stops inline IF statements from being used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DisallowInlineIfSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_INLINE_THEN);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $phpcsFile->addError('Inline IF statements are not allowed', $stackPtr, 'Found');
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php	(revision 5534)
@@ -0,0 +1,178 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff.
+ *
+ * Ensures that there is only one value assignment on a line, and that it is
+ * the first thing on the line.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DisallowMultipleAssignmentsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_EQUAL);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Ignore default value assignments in function definitions.
+        $function = $phpcsFile->findPrevious(array(T_FUNCTION, T_CLOSURE), ($stackPtr - 1), null, false, null, true);
+        if ($function !== false) {
+            $opener = $tokens[$function]['parenthesis_opener'];
+            $closer = $tokens[$function]['parenthesis_closer'];
+            if ($opener < $stackPtr && $closer > $stackPtr) {
+                return;
+            }
+        }
+
+        /*
+            The general rule is:
+            Find an equal sign and go backwards along the line. If you hit an
+            end bracket, skip to the opening bracket. When you find a variable,
+            stop. That variable must be the first non-empty token on the line
+            or in the statement. If not, throw an error.
+        */
+
+        for ($varToken = ($stackPtr - 1); $varToken >= 0; $varToken--) {
+            // Skip brackets.
+            if (isset($tokens[$varToken]['parenthesis_opener']) === true && $tokens[$varToken]['parenthesis_opener'] < $varToken) {
+                $varToken = $tokens[$varToken]['parenthesis_opener'];
+                continue;
+            }
+
+            if (isset($tokens[$varToken]['bracket_opener']) === true) {
+                $varToken = $tokens[$varToken]['bracket_opener'];
+                continue;
+            }
+
+            if ($tokens[$varToken]['code'] === T_SEMICOLON) {
+                // We've reached the next statement, so we
+                // didn't find a variable.
+                return;
+            }
+
+            if ($tokens[$varToken]['code'] === T_VARIABLE) {
+                // We found our variable.
+                break;
+            }
+        }//end for
+
+        if ($varToken <= 0) {
+            // Didn't find a variable.
+            return;
+        }
+
+        // Deal with this type of variable: self::$var by setting the var
+        // token to be "self" rather than "$var".
+        if ($tokens[($varToken - 1)]['code'] === T_DOUBLE_COLON) {
+            $varToken = ($varToken - 2);
+        }
+
+        // Deal with this type of variable: $obj->$var by setting the var
+        // token to be "$obj" rather than "$var".
+        if ($tokens[($varToken - 1)]['code'] === T_OBJECT_OPERATOR) {
+            $varToken = ($varToken - 2);
+        }
+
+        // Deal with this type of variable: $$var by setting the var
+        // token to be "$" rather than "$var".
+        if ($tokens[($varToken - 1)]['content'] === '$') {
+            $varToken--;
+        }
+
+        // Ignore member var definitions.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($varToken - 1), null, true);
+        if (isset(PHP_CodeSniffer_Tokens::$scopeModifiers[$tokens[$prev]['code']]) === true) {
+            return;
+        }
+
+        if ($tokens[$prev]['code'] === T_STATIC) {
+            return;
+        }
+
+        // Make sure this variable is the first thing in the statement.
+        $varLine  = $tokens[$varToken]['line'];
+        $prevLine = 0;
+        for ($i = ($varToken - 1); $i >= 0; $i--) {
+            if ($tokens[$i]['code'] === T_SEMICOLON) {
+                // We reached the end of the statement.
+                return;
+            }
+
+            if ($tokens[$i]['code'] === T_INLINE_THEN) {
+                // We reached the end of the inline THEN statement.
+                return;
+            }
+
+            if ($tokens[$i]['code'] === T_INLINE_ELSE) {
+                // We reached the end of the inline ELSE statement.
+                return;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === false) {
+                $prevLine = $tokens[$i]['line'];
+                break;
+            }
+        }//end for
+
+        // Ignore the first part of FOR loops as we are allowed to
+        // assign variables there even though the variable is not the
+        // first thing on the line. Also ignore WHILE loops.
+        if ($tokens[$i]['code'] === T_OPEN_PARENTHESIS && isset($tokens[$i]['parenthesis_owner']) === true) {
+            $owner = $tokens[$i]['parenthesis_owner'];
+            if ($tokens[$owner]['code'] === T_FOR || $tokens[$owner]['code'] === T_WHILE) {
+                return;
+            }
+        }
+
+        if ($prevLine === $varLine) {
+            $error = 'Assignments must be the first block of code on a line';
+            $phpcsFile->addError($error, $stackPtr, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Squiz_Sniffs_Formatting_DisallowObEndFlushSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Formatting_DisallowObEndFlushSniff.
+ *
+ * Checks the indenting used when an ob_start() call occurs.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DisallowObEndFlushSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['content'] === 'ob_end_flush') {
+            $phpcsFile->addError('Use of ob_end_flush() is not allowed; use ob_get_contents() and ob_end_clean() instead', $stackPtr, 'Found');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php	(revision 5534)
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff.
+ *
+ * Bans the use of size-based functions in loop conditions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * An array of functions we don't want in the condition of loops.
+     *
+     * @return array
+     */
+    protected $forbiddenFunctions = array(
+                                     'PHP' => array(
+                                               'sizeof' => true,
+                                               'strlen' => true,
+                                               'count'  => true,
+                                              ),
+                                     'JS'  => array('length' => true),
+                                    );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_WHILE,
+                T_FOR,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens       = $phpcsFile->getTokens();
+        $tokenizer    = $phpcsFile->tokenizerType;
+        $openBracket  = $tokens[$stackPtr]['parenthesis_opener'];
+        $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
+
+        if ($tokens[$stackPtr]['code'] === T_FOR) {
+            // We only want to check the condition in FOR loops.
+            $start = $phpcsFile->findNext(T_SEMICOLON, ($openBracket + 1));
+            $end   = $phpcsFile->findPrevious(T_SEMICOLON, ($closeBracket - 1));
+        } else {
+            $start = $openBracket;
+            $end   = $closeBracket;
+        }
+
+        for ($i = ($start + 1); $i < $end; $i++) {
+            if ($tokens[$i]['code'] === T_STRING
+                && isset($this->forbiddenFunctions[$tokenizer][$tokens[$i]['content']]) === true
+            ) {
+                $functionName = $tokens[$i]['content'];
+                if ($tokenizer === 'JS') {
+                    // Needs to be in the form object.function to be valid.
+                    $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), null, true);
+                    if ($prev === false || $tokens[$prev]['code'] !== T_OBJECT_OPERATOR) {
+                        continue;
+                    }
+
+                    $functionName = 'object.'.$functionName;
+                } else {
+                    // Make sure it isn't a member var.
+                    if ($tokens[($i - 1)]['code'] === T_OBJECT_OPERATOR) {
+                        continue;
+                    }
+
+                    $functionName .= '()';
+                }
+
+                $error = 'The use of %s inside a loop condition is not allowed; assign the return value to a variable and use the variable in the loop condition instead';
+                $data  = array($functionName);
+                $phpcsFile->addError($error, $i, 'Found', $data);
+            }//end if
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php	(revision 5534)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_DiscouragedFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('Generic_Sniffs_PHP_ForbiddenFunctionsSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_PHP_ForbiddenFunctionsSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_PHP_DiscouragedFunctionsSniff.
+ *
+ * Discourages the use of debug functions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_DiscouragedFunctionsSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff
+{
+
+    /**
+     * A list of forbidden functions with their alternatives.
+     *
+     * The value is NULL if no alternative exists. IE, the
+     * function should just not be used.
+     *
+     * @var array(string => string|null)
+     */
+    public $forbiddenFunctions = array(
+                                  'error_log' => null,
+                                  'print_r'   => null,
+                                  'var_dump'  => null,
+                                 );
+
+    /**
+     * If true, an error will be thrown; otherwise a warning.
+     *
+     * @var bool
+     */
+    public $error = false;
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php	(revision 5534)
@@ -0,0 +1,400 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_EmbeddedPhpSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_EmbeddedPhpSniff.
+ *
+ * Checks the indentation of embedded PHP code segments.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_EmbeddedPhpSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // If the close php tag is on the same line as the opening
+        // then we have an inline embedded PHP block.
+        $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);
+        if ($closeTag === false || $tokens[$stackPtr]['line'] !== $tokens[$closeTag]['line']) {
+            $this->_validateMultilineEmbeddedPhp($phpcsFile, $stackPtr);
+        } else {
+            $this->_validateInlineEmbeddedPhp($phpcsFile, $stackPtr);
+        }
+
+    }//end process()
+
+
+    /**
+     * Validates embedded PHP that exists on multiple lines.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    private function _validateMultilineEmbeddedPhp(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $prevTag = $phpcsFile->findPrevious(T_OPEN_TAG, ($stackPtr - 1));
+        if ($prevTag === false) {
+            // This is the first open tag.
+            return;
+        }
+
+        $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        $closingTag   = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);
+        if ($closingTag !== false) {
+            $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($closingTag + 1), $phpcsFile->numTokens, true);
+            if ($nextContent === false) {
+                // Final closing tag. It will be handled elsewhere.
+                return;
+            }
+
+            // We have an opening and a closing tag, that lie within other content.
+            if ($firstContent === $closingTag) {
+                $error = 'Empty embedded PHP tag found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Empty');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = $stackPtr; $i <= $closingTag; $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+
+                return;
+            }
+        }//end if
+
+        if ($tokens[$firstContent]['line'] === $tokens[$stackPtr]['line']) {
+            $error = 'Opening PHP tag must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'ContentAfterOpen');
+            if ($fix === true) {
+                $first   = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true);
+                $padding = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content'])));
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addNewline($stackPtr);
+                $phpcsFile->fixer->addContent($stackPtr, str_repeat(' ', $padding));
+                $phpcsFile->fixer->endChangeset();
+            }
+        } else {
+            // Check the indent of the first line, except if it is a scope closer.
+            if (isset($tokens[$firstContent]['scope_closer']) === false
+                || $tokens[$firstContent]['scope_closer'] !== $firstContent
+            ) {
+                // Check for a blank line at the top.
+                if ($tokens[$firstContent]['line'] > ($tokens[$stackPtr]['line'] + 1)) {
+                    // Find a token on the blank line to throw the error on.
+                    $i = $stackPtr;
+                    do {
+                        $i++;
+                    } while ($tokens[$i]['line'] !== ($tokens[$stackPtr]['line'] + 1));
+
+                    $error = 'Blank line found at start of embedded PHP content';
+                    $fix   = $phpcsFile->addFixableError($error, $i, 'SpacingBefore');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($stackPtr + 1); $i < $firstContent; $i++) {
+                            if ($tokens[$i]['line'] === $tokens[$firstContent]['line']
+                                || $tokens[$i]['line'] === $tokens[$stackPtr]['line']
+                            ) {
+                                continue;
+                            }
+
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }//end if
+
+                $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr);
+                if ($first === false) {
+                    $first  = $phpcsFile->findFirstOnLine(T_INLINE_HTML, $stackPtr);
+                    $indent = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content'])));
+                } else {
+                    $indent = ($tokens[($first + 1)]['column'] - 1);
+                }
+
+                $contentColumn = ($tokens[$firstContent]['column'] - 1);
+                if ($contentColumn !== $indent) {
+                    $error = 'First line of embedded PHP code must be indented %s spaces; %s found';
+                    $data  = array(
+                              $indent,
+                              $contentColumn,
+                             );
+                    $fix   = $phpcsFile->addFixableError($error, $firstContent, 'Indent', $data);
+                    if ($fix === true) {
+                        $padding = str_repeat(' ', $indent);
+                        if ($contentColumn === 0) {
+                            $phpcsFile->fixer->addContentBefore($firstContent, $padding);
+                        } else {
+                            $phpcsFile->fixer->replaceToken(($firstContent - 1), $padding);
+                        }
+                    }
+                }
+            }//end if
+        }//end if
+
+        $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($tokens[$lastContent]['line'] === $tokens[$stackPtr]['line']
+            && trim($tokens[$lastContent]['content']) !== ''
+        ) {
+            $error = 'Opening PHP tag must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBeforeOpen');
+            if ($fix === true) {
+                $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr);
+                if ($first === false) {
+                    $first   = $phpcsFile->findFirstOnLine(T_INLINE_HTML, $stackPtr);
+                    $padding = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content'])));
+                } else {
+                    $padding = ($tokens[($first + 1)]['column'] - 1);
+                }
+
+                $phpcsFile->fixer->addContentBefore($stackPtr, $phpcsFile->eolChar.str_repeat(' ', $padding));
+            }
+        } else {
+            // Find the first token on the first non-empty line we find.
+            for ($first = ($stackPtr - 1); $first > 0; $first--) {
+                if ($tokens[$first]['line'] === $tokens[$stackPtr]['line']) {
+                    continue;
+                } else if (trim($tokens[$first]['content']) !== '') {
+                    $first = $phpcsFile->findFirstOnLine(array(), $first, true);
+                    break;
+                }
+            }
+
+            $expected = 0;
+            if ($tokens[$first]['code'] === T_INLINE_HTML
+                && trim($tokens[$first]['content']) !== ''
+            ) {
+                $expected = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content'])));
+            } else if ($tokens[$first]['code'] === T_WHITESPACE) {
+                $expected = ($tokens[($first + 1)]['column'] - 1);
+            }
+
+            $expected += 4;
+            $found     = ($tokens[$stackPtr]['column'] - 1);
+            if ($found > $expected) {
+                $error = 'Opening PHP tag indent incorrect; expected no more than %s spaces but found %s';
+                $data  = array(
+                          $expected,
+                          $found,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'OpenTagIndent', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), str_repeat(' ', $expected));
+                }
+            }
+        }//end if
+
+        if ($closingTag === false) {
+            return;
+        }
+
+        $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closingTag - 1), ($stackPtr + 1), true);
+        $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($closingTag + 1), null, true);
+
+        if ($tokens[$lastContent]['line'] === $tokens[$closingTag]['line']) {
+            $error = 'Closing PHP tag must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $closingTag, 'ContentBeforeEnd');
+            if ($fix === true) {
+                $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $closingTag, true);
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addContentBefore($closingTag, str_repeat(' ', ($tokens[$first]['column'] - 1)));
+                $phpcsFile->fixer->addNewlineBefore($closingTag);
+                $phpcsFile->fixer->endChangeset();
+            }
+        } else if ($tokens[$nextContent]['line'] === $tokens[$closingTag]['line']) {
+            $error = 'Closing PHP tag must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $closingTag, 'ContentAfterEnd');
+            if ($fix === true) {
+                $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $closingTag, true);
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->addNewline($closingTag);
+                $phpcsFile->fixer->addContent($closingTag, str_repeat(' ', ($tokens[$first]['column'] - 1)));
+                $phpcsFile->fixer->endChangeset();
+            }
+        }//end if
+
+        $next = $phpcsFile->findNext(T_OPEN_TAG, ($closingTag + 1));
+        if ($next === false) {
+            return;
+        }
+
+        // Check for a blank line at the bottom.
+        if ((isset($tokens[$lastContent]['scope_closer']) === false
+            || $tokens[$lastContent]['scope_closer'] !== $lastContent)
+            && $tokens[$lastContent]['line'] < ($tokens[$closingTag]['line'] - 1)
+        ) {
+            // Find a token on the blank line to throw the error on.
+            $i = $closingTag;
+            do {
+                $i--;
+            } while ($tokens[$i]['line'] !== ($tokens[$closingTag]['line'] - 1));
+
+            $error = 'Blank line found at end of embedded PHP content';
+            $fix   = $phpcsFile->addFixableError($error, $i, 'SpacingAfter');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($lastContent + 1); $i < $closingTag; $i++) {
+                    if ($tokens[$i]['line'] === $tokens[$lastContent]['line']
+                        || $tokens[$i]['line'] === $tokens[$closingTag]['line']
+                    ) {
+                        continue;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        }//end if
+
+    }//end _validateMultilineEmbeddedPhp()
+
+
+    /**
+     * Validates embedded PHP that exists on one line.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    private function _validateInlineEmbeddedPhp(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // We only want one line PHP sections, so return if the closing tag is
+        // on the next line.
+        $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr, null, false);
+        if ($tokens[$stackPtr]['line'] !== $tokens[$closeTag]['line']) {
+            return;
+        }
+
+        // Check that there is one, and only one space at the start of the statement.
+        $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), ($closeTag - 1), true);
+
+        if ($firstContent === false) {
+            $error = 'Empty embedded PHP tag found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Empty');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = $stackPtr; $i <= $closeTag; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+
+            return;
+        }
+
+        // The open tag token always contains a single space after it.
+        $leadingSpace = 1;
+        if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
+            $leadingSpace = (strlen($tokens[($stackPtr + 1)]['content']) + 1);
+        }
+
+        if ($leadingSpace !== 1) {
+            $error = 'Expected 1 space after opening PHP tag; %s found';
+            $data  = array($leadingSpace);
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
+            }
+        }
+
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($closeTag - 1), $stackPtr, true);
+        if ($tokens[$prev]['code'] !== T_SEMICOLON) {
+            $error = 'Inline PHP statement must end with a semicolon';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSemicolon');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($prev, ';');
+            }
+        } else {
+            $statementCount = 1;
+            for ($i = ($stackPtr + 1); $i < $prev; $i++) {
+                if ($tokens[$i]['code'] === T_SEMICOLON) {
+                    $statementCount++;
+                }
+            }
+
+            if ($statementCount > 1) {
+                $error = 'Inline PHP statement must contain a single statement; %s found';
+                $data  = array($statementCount);
+                $phpcsFile->addError($error, $stackPtr, 'MultipleStatements', $data);
+            }
+        }
+
+        $trailingSpace = 0;
+        if ($tokens[($closeTag - 1)]['code'] === T_WHITESPACE) {
+            $trailingSpace = strlen($tokens[($closeTag - 1)]['content']);
+        }
+
+        if ($trailingSpace !== 1) {
+            $error = 'Expected 1 space before closing PHP tag; %s found';
+            $data  = array($trailingSpace);
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data);
+            if ($fix === true) {
+                if ($trailingSpace === 0) {
+                    $phpcsFile->fixer->addContentBefore($closeTag, ' ');
+                } else {
+                    $phpcsFile->fixer->replaceToken(($closeTag - 1), ' ');
+                }
+            }
+        }
+
+    }//end _validateInlineEmbeddedPhp()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php	(revision 5534)
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_EvalSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_EvalSniff.
+ *
+ * The use of eval() is discouraged.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_EvalSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_EVAL);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $error = 'Use of eval() is discouraged';
+        $phpcsFile->addWarning($error, $stackPtr, 'Discouraged');
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php	(revision 5534)
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_ForbiddenFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('Generic_Sniffs_PHP_ForbiddenFunctionsSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_PHP_ForbiddenFunctionsSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_PHP_ForbiddenFunctionsSniff.
+ *
+ * Discourages the use of alias functions that are kept in PHP for compatibility
+ * with older versions. Can be used to forbid the use of any function.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_ForbiddenFunctionsSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff
+{
+
+    /**
+     * A list of forbidden functions with their alternatives.
+     *
+     * The value is NULL if no alternative exists. IE, the
+     * function should just not be used.
+     *
+     * @var array(string => string|null)
+     */
+    public $forbiddenFunctions = array(
+                                  'sizeof'          => 'count',
+                                  'delete'          => 'unset',
+                                  'print'           => 'echo',
+                                  'is_null'         => null,
+                                  'create_function' => null,
+                                 );
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php	(revision 5534)
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_GlobalKeywordSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_GlobalKeywordSniff.
+ *
+ * Stops the usage of the "global" keyword.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_GlobalKeywordSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_GLOBAL);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $nextVar = $tokens[$phpcsFile->findNext(array(T_VARIABLE), $stackPtr)];
+        $varName = str_replace('$', '', $nextVar['content']);
+        $error   = 'Use of the "global" keyword is forbidden; use "$GLOBALS[\'%s\']" instead';
+        $data    = array($varName);
+        $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/HeredocSniff.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_HeredocSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_HeredocSniff.
+ *
+ * Heredocs are prohibited. This test enforces that.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_HeredocSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_START_HEREDOC,
+                T_START_NOWDOC,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $error = 'Use of heredoc and nowdoc syntax ("<<<") is not allowed; use standard strings or inline HTML instead';
+        $phpcsFile->addError($error, $stackPtr, 'NotAllowed');
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php	(revision 5534)
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_InnerFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_InnerFunctionsSniff.
+ *
+ * Ensures that functions within functions are never used.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_InnerFunctionsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true) {
+            $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+            if ($tokens[$prev]['code'] === T_EQUAL) {
+                // Ignore closures.
+                return;
+            }
+
+            $error = 'The use of inner functions is forbidden';
+            $phpcsFile->addError($error, $stackPtr, 'NotAllowed');
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php	(revision 5534)
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff.
+ *
+ * Ensures all calls to inbuilt PHP functions are lowercase.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Make sure this is a function call.
+        $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        if ($next === false) {
+            // Not a function call.
+            return;
+        }
+
+        if ($tokens[$next]['code'] !== T_OPEN_PARENTHESIS) {
+            // Not a function call.
+            return;
+        }
+
+        $prev = $phpcsFile->findPrevious(array(T_WHITESPACE, T_BITWISE_AND), ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] === T_FUNCTION) {
+            // Function declaration, not a function call.
+            return;
+        }
+
+        if ($tokens[$prev]['code'] === T_NS_SEPARATOR) {
+            // Namespaced class/function, not an inbuilt function.
+            return;
+        }
+
+        if ($tokens[$prev]['code'] === T_NEW) {
+            // Object creation, not an inbuilt function.
+            return;
+        }
+
+        if ($tokens[$prev]['code'] === T_OBJECT_OPERATOR) {
+            // Not an inbuilt function.
+            return;
+        }
+
+        if ($tokens[$prev]['code'] === T_DOUBLE_COLON) {
+            // Not an inbuilt function.
+            return;
+        }
+
+        // Make sure it is an inbuilt PHP function.
+        // PHP_CodeSniffer doesn't include/require any files, so no
+        // user defined global functions can exist, except for
+        // PHP_CodeSniffer ones.
+        $content = $tokens[$stackPtr]['content'];
+        if (function_exists($content) === false) {
+            return;
+        }
+
+        if ($content !== strtolower($content)) {
+            $error = 'Calls to inbuilt PHP functions must be lowercase; expected "%s" but found "%s"';
+            $data  = array(
+                      strtolower($content),
+                      $content,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'CallUppercase', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php	(revision 5534)
@@ -0,0 +1,270 @@
+<?php
+/**
+ * Squiz_Sniffs_PHP_InnerFunctionsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_PHP_NonExecutableCodeSniff.
+ *
+ * Warns about code that can never been executed. This happens when a function
+ * returns before the code, or a break ends execution of a statement etc.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_PHP_NonExecutableCodeSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_BREAK,
+                T_CONTINUE,
+                T_RETURN,
+                T_THROW,
+                T_EXIT,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // If this token is preceded with an "or", it only relates to one line
+        // and should be ignored. For example: fopen() or die().
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if ($tokens[$prev]['code'] === T_LOGICAL_OR) {
+            return;
+        }
+
+        // Check if this token is actually part of a one-line IF or ELSE statement.
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if ($tokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
+                $i = $tokens[$i]['parenthesis_opener'];
+                continue;
+            } else if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === true) {
+                continue;
+            }
+
+            break;
+        }
+
+        if ($tokens[$i]['code'] === T_IF
+            || $tokens[$i]['code'] === T_ELSE
+            || $tokens[$i]['code'] === T_ELSEIF
+        ) {
+            return;
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_RETURN) {
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+            if ($tokens[$next]['code'] === T_SEMICOLON) {
+                $next = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true);
+                if ($tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) {
+                    // If this is the closing brace of a function
+                    // then this return statement doesn't return anything
+                    // and is not required anyway.
+                    $owner = $tokens[$next]['scope_condition'];
+                    if ($tokens[$owner]['code'] === T_FUNCTION) {
+                        $warning = 'Empty return statement not required here';
+                        $phpcsFile->addWarning($warning, $stackPtr, 'ReturnNotRequired');
+                        return;
+                    }
+                }
+            }
+        }
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === true) {
+            $owner = $tokens[$stackPtr]['scope_condition'];
+            if ($tokens[$owner]['code'] === T_CASE || $tokens[$owner]['code'] === T_DEFAULT) {
+                // This token closes the scope of a CASE or DEFAULT statement
+                // so any code between this token and the next CASE, DEFAULT or
+                // end of SWITCH token will not be executable.
+                $next = $phpcsFile->findNext(
+                    array(
+                     T_CASE,
+                     T_DEFAULT,
+                     T_CLOSE_CURLY_BRACKET,
+                    ),
+                    ($stackPtr + 1)
+                );
+
+                if ($next !== false) {
+                    $end      = $phpcsFile->findNext(array(T_SEMICOLON), ($stackPtr + 1));
+                    $lastLine = $tokens[$end]['line'];
+                    for ($i = ($stackPtr + 1); $i < $next; $i++) {
+                        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === true) {
+                            continue;
+                        }
+
+                        $line = $tokens[$i]['line'];
+                        if ($line > $lastLine) {
+                            $type    = substr($tokens[$stackPtr]['type'], 2);
+                            $warning = 'Code after %s statement cannot be executed';
+                            $data    = array($type);
+                            $phpcsFile->addWarning($warning, $i, 'Unreachable', $data);
+                            $lastLine = $line;
+                        }
+                    }
+                }//end if
+
+                // That's all we have to check for these types of statements.
+                return;
+            }//end if
+        }//end if
+
+        // This token may be part of an inline condition.
+        // If we find a closing parenthesis that belongs to a condition
+        // we should ignore this token.
+        $prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true);
+        if (isset($tokens[$prev]['parenthesis_owner']) === true) {
+            $owner  = $tokens[$prev]['parenthesis_owner'];
+            $ignore = array(
+                       T_IF     => true,
+                       T_ELSE   => true,
+                       T_ELSEIF => true,
+                      );
+            if (isset($ignore[$tokens[$owner]['code']]) === true) {
+                return;
+            }
+        }
+
+        $ourConditions = array_keys($tokens[$stackPtr]['conditions']);
+
+        if (empty($ourConditions) === false) {
+            $condition = array_pop($ourConditions);
+
+            if (isset($tokens[$condition]['scope_closer']) === false) {
+                return;
+            }
+
+            // Special case for BREAK statements sitting directly inside SWITCH
+            // statements. If we get to this point, we know the BREAK is not being
+            // used to close a CASE statement, so it is most likely non-executable
+            // code itself (as is the case when you put return; break; at the end of
+            // a case). So we need to ignore this token.
+            if ($tokens[$condition]['code'] === T_SWITCH
+                && $tokens[$stackPtr]['code'] === T_BREAK
+            ) {
+                return;
+            }
+
+            $closer = $tokens[$condition]['scope_closer'];
+
+            // If the closer for our condition is shared with other openers,
+            // we will need to throw errors from this token to the next
+            // shared opener (if there is one), not to the scope closer.
+            $nextOpener = null;
+            for ($i = ($stackPtr + 1); $i < $closer; $i++) {
+                if (isset($tokens[$i]['scope_closer']) === true) {
+                    if ($tokens[$i]['scope_closer'] === $closer) {
+                        // We found an opener that shares the same
+                        // closing token as us.
+                        $nextOpener = $i;
+                        break;
+                    }
+                }
+            }//end for
+
+            if ($nextOpener === null) {
+                $end = $closer;
+            } else {
+                $end = ($nextOpener - 1);
+            }
+        } else {
+            // This token is in the global scope.
+            if ($tokens[$stackPtr]['code'] === T_BREAK) {
+                return;
+            }
+
+            // Throw an error for all lines until the end of the file.
+            $end = ($phpcsFile->numTokens - 1);
+        }//end if
+
+        // Find the semicolon that ends this statement, skipping
+        // nested statements like FOR loops and closures.
+        for ($start = ($stackPtr + 1); $start < $phpcsFile->numTokens; $start++) {
+            if ($start === $end) {
+                break;
+            }
+
+            if ($tokens[$start]['code'] === T_OPEN_PARENTHESIS) {
+                $start = $tokens[$start]['parenthesis_closer'];
+                continue;
+            }
+
+            if ($tokens[$start]['code'] === T_OPEN_CURLY_BRACKET) {
+                $start = $tokens[$start]['bracket_closer'];
+                continue;
+            }
+
+            if ($tokens[$start]['code'] === T_SEMICOLON) {
+                break;
+            }
+        }//end for
+
+        $lastLine = $tokens[$start]['line'];
+        for ($i = ($start + 1); $i < $end; $i++) {
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === true
+                || isset(PHP_CodeSniffer_Tokens::$bracketTokens[$tokens[$i]['code']]) === true
+            ) {
+                continue;
+            }
+
+            // Skip whole functions and classes/interfaces because they are not
+            // technically executed code, but rather declarations that may be used.
+            if ($tokens[$i]['code'] === T_FUNCTION
+                || $tokens[$i]['code'] === T_CLASS
+                || $tokens[$i]['code'] === T_INTERFACE
+            ) {
+                $i = $tokens[$i]['scope_closer'];
+                continue;
+            }
+
+            $line = $tokens[$i]['line'];
+            if ($line > $lastLine) {
+                $type    = substr($tokens[$stackPtr]['type'], 2);
+                $warning = 'Code after %s statement cannot be executed';
+                $data    = array($type);
+                $phpcsFile->addWarning($warning, $i, 'Unreachable', $data);
+                $lastLine = $line;
+            }
+        }//end for
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php	(revision 5534)
@@ -0,0 +1,101 @@
+<?php
+/**
+ * Verifies that class members have scope modifiers.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found');
+}
+
+/**
+ * Verifies that class members have scope modifiers.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Scope_MemberVarScopeSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $modifier = null;
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if ($tokens[$i]['line'] < $tokens[$stackPtr]['line']) {
+                break;
+            } else if (isset(PHP_CodeSniffer_Tokens::$scopeModifiers[$tokens[$i]['code']]) === true) {
+                $modifier = $i;
+                break;
+            }
+        }
+
+        if ($modifier === null) {
+            $error = 'Scope modifier not specified for member variable "%s"';
+            $data  = array($tokens[$stackPtr]['content']);
+            $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
+        }
+
+    }//end processMemberVar()
+
+
+    /**
+     * Processes normal variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariable()
+
+
+    /**
+     * Processes variables in double quoted strings.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Verifies that class methods have scope modifiers.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found');
+}
+
+/**
+ * Verifies that class methods have scope modifiers.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Scope_MethodScopeSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+
+    /**
+     * Constructs a Squiz_Sniffs_Scope_MethodScopeSniff.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS, T_INTERFACE), array(T_FUNCTION));
+
+    }//end __construct()
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     * @param int                  $currScope The current scope opener token.
+     *
+     * @return void
+     */
+    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $methodName = $phpcsFile->getDeclarationName($stackPtr);
+        if ($methodName === null) {
+            // Ignore closures.
+            return;
+        }
+
+        if ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true) {
+            // Ignore nested functions.
+            return;
+        }
+
+        $modifier = null;
+        for ($i = ($stackPtr - 1); $i > 0; $i--) {
+            if ($tokens[$i]['line'] < $tokens[$stackPtr]['line']) {
+                break;
+            } else if (isset(PHP_CodeSniffer_Tokens::$scopeModifiers[$tokens[$i]['code']]) === true) {
+                $modifier = $i;
+                break;
+            }
+        }
+
+        if ($modifier === null) {
+            $error = 'Visibility must be declared on method "%s"';
+            $data  = array($methodName);
+            $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
+        }
+
+    }//end processTokenWithinScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php	(revision 5534)
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Squiz_Sniffs_Scope_StaticThisUsageSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_Scope_StaticThisUsageSniff.
+ *
+ * Checks for usage of "$this" in static methods, which will cause
+ * runtime errors.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Scope_StaticThisUsageSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
+{
+
+
+    /**
+     * Constructs the test with the tokens it wishes to listen for.
+     */
+    public function __construct()
+    {
+        parent::__construct(array(T_CLASS), array(T_FUNCTION));
+
+    }//end __construct()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     * @param int                  $currScope A pointer to the start of the scope.
+     *
+     * @return void
+     */
+    public function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
+    {
+        $tokens   = $phpcsFile->getTokens();
+        $function = $tokens[($stackPtr + 2)];
+
+        if ($function['code'] !== T_STRING) {
+            return;
+        }
+
+        $functionName = $function['content'];
+        $classOpener  = $tokens[$currScope]['scope_condition'];
+        $className    = $tokens[($classOpener + 2)]['content'];
+
+        $methodProps = $phpcsFile->getMethodProperties($stackPtr);
+
+        if ($methodProps['is_static'] === true) {
+            if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+                // There is no scope opener or closer, so the function
+                // must be abstract.
+                return;
+            }
+
+            $thisUsage = $stackPtr;
+            while (($thisUsage = $phpcsFile->findNext(array(T_VARIABLE), ($thisUsage + 1), $tokens[$stackPtr]['scope_closer'], false, '$this')) !== false) {
+                if ($thisUsage === false) {
+                    return;
+                }
+
+                $error = 'Usage of "$this" in static methods will cause runtime errors';
+                $phpcsFile->addError($error, $thisUsage, 'Found');
+            }
+        }//end if
+
+    }//end processTokenWithinScope()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php	(revision 5534)
@@ -0,0 +1,141 @@
+<?php
+/**
+ * Squiz_Sniffs_Strings_ConcatenationSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Strings_ConcatenationSpacingSniff.
+ *
+ * Makes sure there are no spaces between the concatenation operator (.) and
+ * the strings being concatenated.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Strings_ConcatenationSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of spaces before and after a string concat.
+     *
+     * @var int
+     */
+    public $spacing = 0;
+
+    /**
+     * Allow newlines instead of spaces.
+     *
+     * @var boolean
+     */
+    public $ignoreNewlines = false;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_STRING_CONCAT);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $this->spacing = (int) $this->spacing;
+
+        $tokens = $phpcsFile->getTokens();
+        if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
+            $before = 0;
+        } else {
+            if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                $before = 'newline';
+            } else {
+                $before = $tokens[($stackPtr - 1)]['length'];
+            }
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $after = 0;
+        } else {
+            if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                $after = 'newline';
+            } else {
+                $after = $tokens[($stackPtr + 1)]['length'];
+            }
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Spacing before string concat', $before);
+        $phpcsFile->recordMetric($stackPtr, 'Spacing after string concat', $after);
+
+        if (($before === $this->spacing || ($before === 'newline' && $this->ignoreNewlines === true))
+            && ($after === $this->spacing || ($after === 'newline' && $this->ignoreNewlines === true))
+        ) {
+            return;
+        }
+
+        if ($this->spacing === 0) {
+            $message = 'Concat operator must not be surrounded by spaces';
+            $data    = array();
+        } else {
+            if ($this->spacing > 1) {
+                $message = 'Concat operator must be surrounded by %s spaces';
+            } else {
+                $message = 'Concat operator must be surrounded by a single space';
+            }
+
+            $data = array($this->spacing);
+        }
+
+        $fix = $phpcsFile->addFixableError($message, $stackPtr, 'PaddingFound', $data);
+
+        if ($fix === true) {
+            $padding = str_repeat(' ', $this->spacing);
+            if ($before !== 'newline' || $this->ignoreNewlines === false) {
+                if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), $padding);
+                } else if ($this->spacing > 0) {
+                    $phpcsFile->fixer->addContent(($stackPtr - 1), $padding);
+                }
+            }
+
+            if ($after !== 'newline' || $this->ignoreNewlines === false) {
+                if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), $padding);
+                } else if ($this->spacing > 0) {
+                    $phpcsFile->fixer->addContent($stackPtr, $padding);
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php	(revision 5534)
@@ -0,0 +1,151 @@
+<?php
+/**
+ * Squiz_Sniffs_Strings_DoubleQuoteUsageSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Strings_DoubleQuoteUsageSniff.
+ *
+ * Makes sure that any use of Double Quotes ("") are warranted.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Strings_DoubleQuoteUsageSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_CONSTANT_ENCAPSED_STRING,
+                T_DOUBLE_QUOTED_STRING,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // We are only interested in the first token in a multi-line string.
+        if ($tokens[$stackPtr]['code'] === $tokens[($stackPtr - 1)]['code']) {
+            return;
+        }
+
+        $workingString   = $tokens[$stackPtr]['content'];
+        $lastStringToken = $stackPtr;
+
+        $i = ($stackPtr + 1);
+        if (isset($tokens[$i]) === true) {
+            while ($tokens[$i]['code'] === $tokens[$stackPtr]['code']) {
+                $workingString  .= $tokens[$i]['content'];
+                $lastStringToken = $i;
+                $i++;
+            }
+        }
+
+        // Check if it's a double quoted string.
+        if (strpos($workingString, '"') === false) {
+            return;
+        }
+
+        // Make sure it's not a part of a string started in a previous line.
+        // If it is, then we have already checked it.
+        if ($workingString[0] !== '"') {
+            return;
+        }
+
+        // The use of variables in double quoted strings is not allowed.
+        if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING) {
+            $stringTokens = token_get_all('<?php '.$workingString);
+            foreach ($stringTokens as $token) {
+                if (is_array($token) === true && $token[0] === T_VARIABLE) {
+                    $error = 'Variable "%s" not allowed in double quoted string; use concatenation instead';
+                    $data  = array($token[1]);
+                    $phpcsFile->addError($error, $stackPtr, 'ContainsVar', $data);
+                }
+            }
+
+            return;
+        }//end if
+
+        $allowedChars = array(
+                         '\0',
+                         '\1',
+                         '\2',
+                         '\3',
+                         '\4',
+                         '\5',
+                         '\6',
+                         '\7',
+                         '\n',
+                         '\r',
+                         '\f',
+                         '\t',
+                         '\v',
+                         '\x',
+                         '\b',
+                         '\e',
+                         '\u',
+                         '\'',
+                        );
+
+        foreach ($allowedChars as $testChar) {
+            if (strpos($workingString, $testChar) !== false) {
+                return;
+            }
+        }
+
+        $error = 'String %s does not require double quotes; use single quotes instead';
+        $data  = array(str_replace("\n", '\n', $workingString));
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NotRequired', $data);
+
+        if ($fix === true) {
+            $phpcsFile->fixer->beginChangeset();
+            $innerContent = substr($workingString, 1, -1);
+            $innerContent = str_replace('\"', '"', $innerContent);
+            $phpcsFile->fixer->replaceToken($stackPtr, "'$innerContent'");
+            while ($lastStringToken !== $stackPtr) {
+                $phpcsFile->fixer->replaceToken($lastStringToken, '');
+                $lastStringToken--;
+            }
+
+            $phpcsFile->fixer->endChangeset();
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php	(revision 5534)
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Squiz_Sniffs_Strings_EchoedStringsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Strings_EchoedStringsSniff.
+ *
+ * Makes sure that any strings that are "echoed" are not enclosed in brackets
+ * like a function call.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_Strings_EchoedStringsSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_ECHO);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        // If the first non-whitespace token is not an opening parenthesis, then we are not concerned.
+        if ($tokens[$firstContent]['code'] !== T_OPEN_PARENTHESIS) {
+            $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no');
+            return;
+        }
+
+        $end = $phpcsFile->findNext(array(T_SEMICOLON, T_CLOSE_TAG), $stackPtr, null, false);
+
+        // If the token before the semi-colon is not a closing parenthesis, then we are not concerned.
+        $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($end - 1), null, true);
+        if ($tokens[$prev]['code'] !== T_CLOSE_PARENTHESIS) {
+            $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no');
+            return;
+        }
+
+        // If the parenthesis don't match, then we are not concerned.
+        if ($tokens[$firstContent]['parenthesis_closer'] !== $prev) {
+            $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no');
+            return;
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'yes');
+
+        if (($phpcsFile->findNext(PHP_CodeSniffer_Tokens::$operators, $stackPtr, $end, false)) === false) {
+            // There are no arithmetic operators in this.
+            $error = 'Echoed strings should not be bracketed';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'HasBracket');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $phpcsFile->fixer->replaceToken($firstContent, '');
+                $phpcsFile->fixer->replaceToken(($end - 1), '');
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_CastSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_CastSpacingSniff.
+ *
+ * Ensure cast statements don't contain whitespace.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_CastSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$castTokens;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $content  = $tokens[$stackPtr]['content'];
+        $expected = str_replace(' ', '', $content);
+        $expected = str_replace("\t", '', $expected);
+
+        if ($content !== $expected) {
+            $error = 'Cast statements must not contain whitespace; expected "%s" but found "%s"';
+            $data  = array(
+                      $expected,
+                      $content,
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContainsWhiteSpace', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($stackPtr, $expected);
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php	(revision 5534)
@@ -0,0 +1,316 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff.
+ *
+ * Checks that control structures have the correct spacing around brackets.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_IF,
+                T_WHILE,
+                T_FOREACH,
+                T_FOR,
+                T_SWITCH,
+                T_DO,
+                T_ELSE,
+                T_ELSEIF,
+                T_TRY,
+                T_CATCH,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['parenthesis_opener']) === true
+            && isset($tokens[$stackPtr]['parenthesis_closer']) === true
+        ) {
+            $parenOpener = $tokens[$stackPtr]['parenthesis_opener'];
+            $parenCloser = $tokens[$stackPtr]['parenthesis_closer'];
+            if ($tokens[($parenOpener + 1)]['code'] === T_WHITESPACE) {
+                $gap = $tokens[($parenOpener + 1)]['length'];
+
+                if ($gap === 0) {
+                    $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', 'newline');
+                    $gap = 'newline';
+                } else {
+                    $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', $gap);
+                }
+
+                $error = 'Expected 0 spaces after opening bracket; %s found';
+                $data  = array($gap);
+                $fix   = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($parenOpener + 1), '');
+                }
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', 0);
+            }
+
+            if ($tokens[$parenOpener]['line'] === $tokens[$parenCloser]['line']
+                && $tokens[($parenCloser - 1)]['code'] === T_WHITESPACE
+            ) {
+                $gap   = $tokens[($parenCloser - 1)]['length'];
+                $error = 'Expected 0 spaces before closing bracket; %s found';
+                $data  = array($gap);
+                $fix   = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($parenCloser - 1), '');
+                }
+
+                if ($gap === 0) {
+                    $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', 'newline');
+                } else {
+                    $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', $gap);
+                }
+            } else {
+                $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', 0);
+            }
+        }//end if
+
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            return;
+        }
+
+        $scopeOpener = $tokens[$stackPtr]['scope_opener'];
+        $scopeCloser = $tokens[$stackPtr]['scope_closer'];
+
+        for ($firstContent = ($scopeOpener + 1); $firstContent < $phpcsFile->numTokens; $firstContent++) {
+            if ($tokens[$firstContent]['code'] !== T_WHITESPACE) {
+                break;
+            }
+        }
+
+        // We ignore spacing for some structures that tend to have their own rules.
+        $ignore = array(
+                   T_FUNCTION             => true,
+                   T_CLASS                => true,
+                   T_INTERFACE            => true,
+                   T_TRAIT                => true,
+                   T_DOC_COMMENT_OPEN_TAG => true,
+                  );
+
+        if (isset($ignore[$tokens[$firstContent]['code']]) === false
+            && $tokens[$firstContent]['line'] >= ($tokens[$scopeOpener]['line'] + 2)
+        ) {
+            $error = 'Blank line found at start of control structure';
+            $fix   = $phpcsFile->addFixableError($error, $scopeOpener, 'SpacingAfterOpen');
+
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                $i = ($scopeOpener + 1);
+                while ($tokens[$i]['line'] !== $tokens[$firstContent]['line']) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                    $i++;
+                }
+
+                $phpcsFile->fixer->addNewline($scopeOpener);
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+        if ($firstContent !== $scopeCloser) {
+            $lastContent = $phpcsFile->findPrevious(
+                T_WHITESPACE,
+                ($scopeCloser - 1),
+                null,
+                true
+            );
+
+            $lastNonEmptyContent = $phpcsFile->findPrevious(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($scopeCloser - 1),
+                null,
+                true
+            );
+
+            $checkToken = $lastContent;
+            if (isset($tokens[$lastNonEmptyContent]['scope_condition']) === true) {
+                $checkToken = $tokens[$lastNonEmptyContent]['scope_condition'];
+            }
+
+            if (isset($ignore[$tokens[$checkToken]['code']]) === false
+                && $tokens[$lastContent]['line'] <= ($tokens[$scopeCloser]['line'] - 2)
+            ) {
+                $errorToken = $scopeCloser;
+                for ($i = ($scopeCloser - 1); $i > $lastContent; $i--) {
+                    if ($tokens[$i]['line'] < $tokens[$scopeCloser]['line']) {
+                        $errorToken = $i;
+                        break;
+                    }
+                }
+
+                $error = 'Blank line found at end of control structure';
+                $fix   = $phpcsFile->addFixableError($error, $errorToken, 'SpacingBeforeClose');
+
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    $i = ($scopeCloser - 1);
+                    for ($i = ($scopeCloser - 1); $i > $lastContent; $i--) {
+                        if ($tokens[$i]['line'] === $tokens[$scopeCloser]['line']) {
+                            continue;
+                        }
+
+                        if ($tokens[$i]['line'] === $tokens[$lastContent]['line']) {
+                            break;
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }//end if
+        }//end if
+
+        $trailingContent = $phpcsFile->findNext(
+            T_WHITESPACE,
+            ($scopeCloser + 1),
+            null,
+            true
+        );
+
+        if ($tokens[$trailingContent]['code'] === T_COMMENT) {
+            // Special exception for code where the comment about
+            // an ELSE or ELSEIF is written between the control structures.
+            $nextCode = $phpcsFile->findNext(
+                PHP_CodeSniffer_Tokens::$emptyTokens,
+                ($scopeCloser + 1),
+                null,
+                true
+            );
+
+            if ($tokens[$nextCode]['code'] === T_ELSE
+                || $tokens[$nextCode]['code'] === T_ELSEIF
+            ) {
+                $trailingContent = $nextCode;
+            }
+        }//end if
+
+        if ($tokens[$trailingContent]['code'] === T_ELSE) {
+            if ($tokens[$stackPtr]['code'] === T_IF) {
+                // IF with ELSE.
+                return;
+            }
+        }
+
+        if ($tokens[$trailingContent]['code'] === T_WHILE
+            && $tokens[$stackPtr]['code'] === T_DO
+        ) {
+            // DO with WHILE.
+            return;
+        }
+
+        if ($tokens[$trailingContent]['code'] === T_CLOSE_TAG) {
+            // At the end of the script or embedded code.
+            return;
+        }
+
+        if (isset($tokens[$trailingContent]['scope_condition']) === true
+            && $tokens[$trailingContent]['scope_condition'] !== $trailingContent
+            && isset($tokens[$trailingContent]['scope_opener']) === true
+            && $tokens[$trailingContent]['scope_opener'] !== $trailingContent
+        ) {
+            // Another control structure's closing brace.
+            $owner = $tokens[$trailingContent]['scope_condition'];
+            if ($tokens[$owner]['code'] === T_FUNCTION) {
+                // The next content is the closing brace of a function
+                // so normal function rules apply and we can ignore it.
+                return;
+            }
+
+            if ($tokens[$owner]['code'] === T_CLOSURE
+                && ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true
+                || $phpcsFile->hasCondition($stackPtr, T_CLOSURE) === true
+                || isset($tokens[$stackPtr]['nested_parenthesis']) === true)
+            ) {
+                return;
+            }
+
+            if ($tokens[$trailingContent]['line'] !== ($tokens[$scopeCloser]['line'] + 1)) {
+                $error = 'Blank line found after control structure';
+                $fix   = $phpcsFile->addFixableError($error, $scopeCloser, 'LineAfterClose');
+
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    $i = ($scopeCloser + 1);
+                    while ($tokens[$i]['line'] !== $tokens[$trailingContent]['line']) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                        $i++;
+                    }
+
+                    $phpcsFile->fixer->addNewline($scopeCloser);
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+        } else if ($tokens[$trailingContent]['code'] !== T_ELSE
+            && $tokens[$trailingContent]['code'] !== T_ELSEIF
+            && $tokens[$trailingContent]['code'] !== T_CATCH
+            && $tokens[$trailingContent]['line'] === ($tokens[$scopeCloser]['line'] + 1)
+        ) {
+            $error = 'No blank line found after control structure';
+            $fix   = $phpcsFile->addFixableError($error, $scopeCloser, 'NoLineAfterClose');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewline($scopeCloser);
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php	(revision 5534)
@@ -0,0 +1,182 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff.
+ *
+ * Checks that there is one empty line before the closing brace of a function.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            // Probably an interface method.
+            return;
+        }
+
+        $closeBrace  = $tokens[$stackPtr]['scope_closer'];
+        $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), null, true);
+
+        // Special case for empty JS functions.
+        if ($phpcsFile->tokenizerType === 'JS' && $prevContent === $tokens[$stackPtr]['scope_opener']) {
+            // In this case, the opening and closing brace must be
+            // right next to each other.
+            if ($tokens[$stackPtr]['scope_closer'] !== ($tokens[$stackPtr]['scope_opener'] + 1)) {
+                $error = 'The opening and closing braces of empty functions must be directly next to each other; e.g., function () {}';
+                $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBetween');
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = ($tokens[$stackPtr]['scope_opener'] + 1); $i < $closeBrace; $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }
+
+            return;
+        }
+
+        $nestedFunction = false;
+        if ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true
+            || $phpcsFile->hasCondition($stackPtr, T_CLOSURE) === true
+            || isset($tokens[$stackPtr]['nested_parenthesis']) === true
+        ) {
+            $nestedFunction = true;
+        }
+
+        $braceLine = $tokens[$closeBrace]['line'];
+        $prevLine  = $tokens[$prevContent]['line'];
+        $found     = ($braceLine - $prevLine - 1);
+
+        $afterKeyword  = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+        $beforeKeyword = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        if ($nestedFunction === true) {
+            if ($found < 0) {
+                $error = 'Closing brace of nested function must be on a new line';
+                $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'ContentBeforeClose');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addNewlineBefore($closeBrace);
+                }
+            } else if ($found > 0) {
+                $error = 'Expected 0 blank lines before closing brace of nested function; %s found';
+                $data  = array($found);
+                $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBeforeNestedClose', $data);
+
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    $changeMade = false;
+                    for ($i = ($prevContent + 1); $i < $closeBrace; $i++) {
+                        // Try and maintain indentation.
+                        if ($tokens[$i]['line'] === ($braceLine - 1)) {
+                            break;
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, '');
+                        $changeMade = true;
+                    }
+
+                    // Special case for when the last content contains the newline
+                    // token as well, like with a comment.
+                    if ($changeMade === false) {
+                        $phpcsFile->fixer->replaceToken(($prevContent + 1), '');
+                    }
+
+                    $phpcsFile->fixer->endChangeset();
+                }//end if
+            }//end if
+        } else {
+            if ($found !== 1) {
+                if ($found < 0) {
+                    $found = 0;
+                }
+
+                $error = 'Expected 1 blank line before closing function brace; %s found';
+                $data  = array($found);
+                $fix   = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBeforeClose', $data);
+
+                if ($fix === true) {
+                    if ($found > 1) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prevContent + 1); $i < ($closeBrace - 1); $i++) {
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->replaceToken($i, $phpcsFile->eolChar);
+                        $phpcsFile->fixer->endChangeset();
+                    } else {
+                        // Try and maintain indentation.
+                        if ($tokens[($closeBrace - 1)]['code'] === T_WHITESPACE) {
+                            $phpcsFile->fixer->addNewlineBefore($closeBrace - 1);
+                        } else {
+                            $phpcsFile->fixer->addNewlineBefore($closeBrace);
+                        }
+                    }
+                }
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php	(revision 5534)
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff.
+ *
+ * Checks that there is no empty line after the opening brace of a function.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_FUNCTION,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if (isset($tokens[$stackPtr]['scope_opener']) === false) {
+            // Probably an interface method.
+            return;
+        }
+
+        $openBrace   = $tokens[$stackPtr]['scope_opener'];
+        $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($openBrace + 1), null, true);
+
+        if ($nextContent === $tokens[$stackPtr]['scope_closer']) {
+             // The next bit of content is the closing brace, so this
+             // is an empty function and should have a blank line
+             // between the opening and closing braces.
+            return;
+        }
+
+        $braceLine = $tokens[$openBrace]['line'];
+        $nextLine  = $tokens[$nextContent]['line'];
+
+        $found = ($nextLine - $braceLine - 1);
+        if ($found > 0) {
+            $error = 'Expected 0 blank lines after opening function brace; %s found';
+            $data  = array($found);
+            $fix   = $phpcsFile->addFixableError($error, $openBrace, 'SpacingAfter', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($openBrace + 1); $i < $nextContent; $i++) {
+                    if ($tokens[$i]['line'] === $nextLine) {
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->addNewline($openBrace);
+                $phpcsFile->fixer->endChangeset();
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php	(revision 5534)
@@ -0,0 +1,239 @@
+<?php
+/**
+ * Squiz_Sniffs_Formatting_FunctionSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff.
+ *
+ * Checks the separation between methods in a class or interface.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * The number of blank lines between functions.
+     *
+     * @var int
+     */
+    public $spacing = 2;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_FUNCTION);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens        = $phpcsFile->getTokens();
+        $this->spacing = (int) $this->spacing;
+
+        /*
+            Check the number of blank lines
+            after the function.
+        */
+
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            // Must be an interface method, so the closer is the semicolon.
+            $closer = $phpcsFile->findNext(T_SEMICOLON, $stackPtr);
+        } else {
+            $closer = $tokens[$stackPtr]['scope_closer'];
+        }
+
+        // Allow for comments on the same line as the closer.
+        for ($nextLineToken = ($closer + 1); $nextLineToken < $phpcsFile->numTokens; $nextLineToken++) {
+            if ($tokens[$nextLineToken]['line'] !== $tokens[$closer]['line']) {
+                break;
+            }
+        }
+
+        $foundLines = 0;
+        if ($nextLineToken === ($phpcsFile->numTokens - 1)) {
+            // We are at the end of the file.
+            // Don't check spacing after the function because this
+            // should be done by an EOF sniff.
+            $foundLines = $this->spacing;
+        } else {
+            $nextContent = $phpcsFile->findNext(T_WHITESPACE, $nextLineToken, null, true);
+            if ($nextContent === false) {
+                // We are at the end of the file.
+                // Don't check spacing after the function because this
+                // should be done by an EOF sniff.
+                $foundLines = $this->spacing;
+            } else {
+                $foundLines += ($tokens[$nextContent]['line'] - $tokens[$nextLineToken]['line']);
+            }
+        }
+
+        if ($foundLines !== $this->spacing) {
+            $error = 'Expected %s blank line';
+            if ($this->spacing !== 1) {
+                $error .= 's';
+            }
+
+            $error .= ' after function; %s found';
+            $data   = array(
+                       $this->spacing,
+                       $foundLines,
+                      );
+
+            $fix = $phpcsFile->addFixableError($error, $closer, 'After', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = $nextLineToken; $i <= $nextContent; $i++) {
+                    if ($tokens[$i]['line'] === $tokens[$nextContent]['line']) {
+                        $phpcsFile->fixer->addContentBefore($i, str_repeat($phpcsFile->eolChar, $this->spacing));
+                        break;
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }//end if
+        }//end if
+
+        /*
+            Check the number of blank lines
+            before the function.
+        */
+
+        $prevLineToken = null;
+        for ($i = $stackPtr; $i > 0; $i--) {
+            if (strpos($tokens[$i]['content'], $phpcsFile->eolChar) === false) {
+                continue;
+            } else {
+                $prevLineToken = $i;
+                break;
+            }
+        }
+
+        if (is_null($prevLineToken) === true) {
+            // Never found the previous line, which means
+            // there are 0 blank lines before the function.
+            $foundLines  = 0;
+            $prevContent = 0;
+        } else {
+            $currentLine = $tokens[$stackPtr]['line'];
+
+            $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, $prevLineToken, null, true);
+            if ($tokens[$prevContent]['code'] === T_DOC_COMMENT_CLOSE_TAG
+                && $tokens[$prevContent]['line'] === ($currentLine - 1)
+            ) {
+                // Account for function comments.
+                $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($tokens[$prevContent]['comment_opener'] - 1), null, true);
+            }
+
+            // Before we throw an error, check that we are not throwing an error
+            // for another function. We don't want to error for no blank lines after
+            // the previous function and no blank lines before this one as well.
+            $prevLine   = ($tokens[$prevContent]['line'] - 1);
+            $i          = ($stackPtr - 1);
+            $foundLines = 0;
+            while ($currentLine !== $prevLine && $currentLine > 1 && $i > 0) {
+                if (isset($tokens[$i]['scope_condition']) === true) {
+                    $scopeCondition = $tokens[$i]['scope_condition'];
+                    if ($tokens[$scopeCondition]['code'] === T_FUNCTION) {
+                        // Found a previous function.
+                        return;
+                    }
+                } else if ($tokens[$i]['code'] === T_FUNCTION) {
+                    // Found another interface function.
+                    return;
+                }
+
+                $currentLine = $tokens[$i]['line'];
+                if ($currentLine === $prevLine) {
+                    break;
+                }
+
+                if ($tokens[($i - 1)]['line'] < $currentLine && $tokens[($i + 1)]['line'] > $currentLine) {
+                    // This token is on a line by itself. If it is whitespace, the line is empty.
+                    if ($tokens[$i]['code'] === T_WHITESPACE) {
+                        $foundLines++;
+                    }
+                }
+
+                $i--;
+            }//end while
+        }//end if
+
+        if ($foundLines !== $this->spacing) {
+            $error = 'Expected %s blank line';
+            if ($this->spacing !== 1) {
+                $error .= 's';
+            }
+
+            $error .= ' before function; %s found';
+            $data   = array(
+                       $this->spacing,
+                       $foundLines,
+                      );
+
+            $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before', $data);
+            if ($fix === true) {
+                if ($prevContent === 0) {
+                    $nextSpace = 0;
+                } else {
+                    $nextSpace = $phpcsFile->findNext(T_WHITESPACE, ($prevContent + 1), $stackPtr);
+                    if ($nextSpace === false) {
+                        $nextSpace = ($stackPtr - 1);
+                    }
+                }
+
+                if ($foundLines < $this->spacing) {
+                    $padding = str_repeat($phpcsFile->eolChar, ($this->spacing - $foundLines));
+                    $phpcsFile->fixer->addContent($nextSpace, $padding);
+                } else {
+                    $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($nextSpace + 1), null, true);
+                    $phpcsFile->fixer->beginChangeset();
+                    for ($i = $nextSpace; $i < ($nextContent - 1); $i++) {
+                        $phpcsFile->fixer->replaceToken($i, '');
+                    }
+
+                    $phpcsFile->fixer->replaceToken($i, str_repeat($phpcsFile->eolChar, $this->spacing));
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php	(revision 5534)
@@ -0,0 +1,100 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff.
+ *
+ * Ensures all language constructs (without brackets) contain a
+ * single space between themselves and their content.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_ECHO,
+                T_PRINT,
+                T_RETURN,
+                T_INCLUDE,
+                T_INCLUDE_ONCE,
+                T_REQUIRE,
+                T_REQUIRE_ONCE,
+                T_NEW,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[($stackPtr + 1)]['code'] === T_SEMICOLON) {
+            // No content for this language construct.
+            return;
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
+            $content       = $tokens[($stackPtr + 1)]['content'];
+            $contentLength = strlen($content);
+            if ($contentLength !== 1) {
+                $error = 'Language constructs must be followed by a single space; expected 1 space but found %s';
+                $data  = array($contentLength);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'IncorrectSingle', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                }
+            }
+        } else {
+            $error = 'Language constructs must be followed by a single space; expected "%s" but found "%s"';
+            $data  = array(
+                      $tokens[$stackPtr]['content'].' '.$tokens[($stackPtr + 1)]['content'],
+                      $tokens[$stackPtr]['content'].$tokens[($stackPtr + 1)]['content'],
+                     );
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($stackPtr, ' ');
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php	(revision 5534)
@@ -0,0 +1,116 @@
+<?php
+/**
+ * Sniffs_Squiz_WhiteSpace_OperatorSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Sniffs_Squiz_WhiteSpace_OperatorSpacingSniff.
+ *
+ * Verifies that operators have valid spacing surrounding them.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_LogicalOperatorSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$booleanOperators;
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being checked.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Check there is one space before the operator.
+        if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
+            $error = 'Expected 1 space before logical operator; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
+            }
+        } else {
+            $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+            if ($tokens[$stackPtr]['line'] === $tokens[$prev]['line']
+                && strlen($tokens[($stackPtr - 1)]['content']) !== 1
+            ) {
+                $found = strlen($tokens[($stackPtr - 1)]['content']);
+                $error = 'Expected 1 space before logical operator; %s found';
+                $data  = array($found);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpaceBefore', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
+                }
+            }
+        }
+
+        // Check there is one space after the operator.
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $error = 'Expected 1 space after logical operator; 0 found';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfter');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($stackPtr, ' ');
+            }
+        } else {
+            $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+            if ($tokens[$stackPtr]['line'] === $tokens[$next]['line']
+                && strlen($tokens[($stackPtr + 1)]['content']) !== 1
+            ) {
+                $found = strlen($tokens[($stackPtr + 1)]['content']);
+                $error = 'Expected 1 space after logical operator; %s found';
+                $data  = array($found);
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpaceAfter', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php	(revision 5534)
@@ -0,0 +1,161 @@
+<?php
+/**
+ * Verifies that class members are spaced correctly.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found');
+}
+
+/**
+ * Verifies that class members are spaced correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+
+    /**
+     * Processes the function tokens within the class.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $ignore   = PHP_CodeSniffer_Tokens::$methodPrefixes;
+        $ignore[] = T_VAR;
+        $ignore[] = T_WHITESPACE;
+
+        $start = $stackPtr;
+        $prev  = $phpcsFile->findPrevious($ignore, ($stackPtr - 1), null, true);
+        if (isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$prev]['code']]) === true) {
+            // Assume the comment belongs to the member var if it is on a line by itself.
+            $prevContent = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($prev - 1), null, true);
+            if ($tokens[$prevContent]['line'] !== $tokens[$prev]['line']) {
+                // Check the spacing, but then skip it.
+                $foundLines = ($tokens[$stackPtr]['line'] - $tokens[$prev]['line'] - 1);
+                if ($foundLines > 0) {
+                    $error = 'Expected 0 blank lines after member var comment; %s found';
+                    $data  = array($foundLines);
+                    $fix   = $phpcsFile->addFixableError($error, $prev, 'AfterComment', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        for ($i = ($prev + 1); $i <= $stackPtr; $i++) {
+                            if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) {
+                                break;
+                            }
+
+                            $phpcsFile->fixer->replaceToken($i, '');
+                        }
+
+                        $phpcsFile->fixer->addNewline($prev);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }//end if
+
+                $start = $prev;
+            }//end if
+        }//end if
+
+        // There needs to be 1 blank line before the var, not counting comments.
+        if ($start === $stackPtr) {
+            // No comment found.
+            $first = $phpcsFile->findFirstOnLine(PHP_CodeSniffer_Tokens::$emptyTokens, $start, true);
+            if ($first === false) {
+                $first = $start;
+            }
+        } else if ($tokens[$start]['code'] === T_DOC_COMMENT_CLOSE_TAG) {
+            $first = $tokens[$start]['comment_opener'];
+        } else {
+            $first = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($start - 1), null, true);
+            $first = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$commentTokens, ($first + 1));
+        }
+
+        $prev       = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($first - 1), null, true);
+        $foundLines = ($tokens[$first]['line'] - $tokens[$prev]['line'] - 1);
+        if ($foundLines === 1) {
+            return;
+        }
+
+        $error = 'Expected 1 blank line before member var; %s found';
+        $data  = array($foundLines);
+        $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data);
+        if ($fix === true) {
+            $phpcsFile->fixer->beginChangeset();
+            for ($i = ($prev + 1); $i < $first; $i++) {
+                if ($tokens[$i]['line'] === $tokens[$prev]['line']) {
+                    continue;
+                }
+
+                if ($tokens[$i]['line'] === $tokens[$first]['line']) {
+                    $phpcsFile->fixer->addNewline(($i - 1));
+                    break;
+                }
+
+                $phpcsFile->fixer->replaceToken($i, '');
+            }
+
+            $phpcsFile->fixer->endChangeset();
+        }//end if
+
+    }//end processMemberVar()
+
+
+    /**
+     * Processes normal variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariable()
+
+
+    /**
+     * Processes variables in double quoted strings.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
+     * @param int                  $stackPtr  The position where the token was found.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        /*
+            We don't care about normal variables.
+        */
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php	(revision 5534)
@@ -0,0 +1,100 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff.
+ *
+ * Ensure there is no whitespace before/after an object operator.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OBJECT_OPERATOR);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+        if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
+            $before = 0;
+        } else {
+            if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                $before = 'newline';
+            } else {
+                $before = $tokens[($stackPtr - 1)]['length'];
+            }
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $after = 0;
+        } else {
+            if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                $after = 'newline';
+            } else {
+                $after = $tokens[($stackPtr + 1)]['length'];
+            }
+        }
+
+        $phpcsFile->recordMetric($stackPtr, 'Spacing before object operator', $before);
+        $phpcsFile->recordMetric($stackPtr, 'Spacing after object operator', $after);
+
+        if ($before !== 0) {
+            $error = 'Space found before object operator';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Before');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
+            }
+        }
+
+        if ($after !== 0) {
+            $error = 'Space found after object operator';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'After');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php	(revision 5534)
@@ -0,0 +1,324 @@
+<?php
+/**
+ * Sniffs_Squiz_WhiteSpace_OperatorSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Sniffs_Squiz_WhiteSpace_OperatorSpacingSniff.
+ *
+ * Verifies that operators have valid spacing surrounding them.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+    /**
+     * Allow newlines instead of spaces.
+     *
+     * @var boolean
+     */
+    public $ignoreNewlines = false;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        $comparison = PHP_CodeSniffer_Tokens::$comparisonTokens;
+        $operators  = PHP_CodeSniffer_Tokens::$operators;
+        $assignment = PHP_CodeSniffer_Tokens::$assignmentTokens;
+        $inlineIf   = array(
+                       T_INLINE_THEN,
+                       T_INLINE_ELSE,
+                      );
+
+        return array_unique(
+            array_merge($comparison, $operators, $assignment, $inlineIf)
+        );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The current file being checked.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // Skip default values in function declarations.
+        if ($tokens[$stackPtr]['code'] === T_EQUAL
+            || $tokens[$stackPtr]['code'] === T_MINUS
+        ) {
+            if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
+                $parenthesis = array_keys($tokens[$stackPtr]['nested_parenthesis']);
+                $bracket     = array_pop($parenthesis);
+                if (isset($tokens[$bracket]['parenthesis_owner']) === true) {
+                    $function = $tokens[$bracket]['parenthesis_owner'];
+                    if ($tokens[$function]['code'] === T_FUNCTION
+                        || $tokens[$function]['code'] === T_CLOSURE
+                    ) {
+                        return;
+                    }
+                }
+            }
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_EQUAL) {
+            // Skip for '=&' case.
+            if (isset($tokens[($stackPtr + 1)]) === true
+                && $tokens[($stackPtr + 1)]['code'] === T_BITWISE_AND
+            ) {
+                return;
+            }
+        }
+
+        // Skip short ternary such as: "$foo = $bar ?: true;".
+        if (($tokens[$stackPtr]['code'] === T_INLINE_THEN
+            && $tokens[($stackPtr + 1)]['code'] === T_INLINE_ELSE)
+            || ($tokens[($stackPtr - 1)]['code'] === T_INLINE_THEN
+            && $tokens[$stackPtr]['code'] === T_INLINE_ELSE)
+        ) {
+                return;
+        }
+
+        if ($tokens[$stackPtr]['code'] === T_BITWISE_AND) {
+            // If it's not a reference, then we expect one space either side of the
+            // bitwise operator.
+            if ($phpcsFile->isReference($stackPtr) === true) {
+                return;
+            }
+
+            // Check there is one space before the & operator.
+            if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
+                $error = 'Expected 1 space before "&" operator; 0 found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeAmp');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
+                }
+
+                $phpcsFile->recordMetric($stackPtr, 'Space before operator', 0);
+            } else {
+                if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                    $found = 'newline';
+                } else {
+                    $found = $tokens[($stackPtr - 1)]['length'];
+                }
+
+                $phpcsFile->recordMetric($stackPtr, 'Space before operator', $found);
+                if ($found !== 1
+                    && ($found !== 'newline' || $this->ignoreNewlines === false)
+                ) {
+                    $error = 'Expected 1 space before "&" operator; %s found';
+                    $data  = array($found);
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeAmp', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
+                    }
+                }
+            }//end if
+
+            // Check there is one space after the & operator.
+            if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+                $error = 'Expected 1 space after "&" operator; 0 found';
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterAmp');
+                if ($fix === true) {
+                    $phpcsFile->fixer->addContent($stackPtr, ' ');
+                }
+
+                $phpcsFile->recordMetric($stackPtr, 'Space after operator', 0);
+            } else {
+                if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                    $found = 'newline';
+                } else {
+                    $found = $tokens[($stackPtr + 1)]['length'];
+                }
+
+                $phpcsFile->recordMetric($stackPtr, 'Space after operator', $found);
+                if ($found !== 1
+                    && ($found !== 'newline' || $this->ignoreNewlines === false)
+                ) {
+                    $error = 'Expected 1 space after "&" operator; %s found';
+                    $data  = array($found);
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterAmp', $data);
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                    }
+                }
+            }//end if
+
+            return;
+        }//end if
+
+        if ($tokens[$stackPtr]['code'] === T_MINUS) {
+            // Check minus spacing, but make sure we aren't just assigning
+            // a minus value or returning one.
+            $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+            if ($tokens[$prev]['code'] === T_RETURN) {
+                // Just returning a negative value; eg. (return -1).
+                return;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$operators[$tokens[$prev]['code']]) === true) {
+                // Just trying to operate on a negative value; eg. ($var * -1).
+                return;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$comparisonTokens[$tokens[$prev]['code']]) === true) {
+                // Just trying to compare a negative value; eg. ($var === -1).
+                return;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$booleanOperators[$tokens[$prev]['code']]) === true) {
+                // Just trying to compare a negative value; eg. ($var || -1 === $b).
+                return;
+            }
+
+            if (isset(PHP_CodeSniffer_Tokens::$assignmentTokens[$tokens[$prev]['code']]) === true) {
+                // Just trying to assign a negative value; eg. ($var = -1).
+                return;
+            }
+
+            // A list of tokens that indicate that the token is not
+            // part of an arithmetic operation.
+            $invalidTokens = array(
+                              T_COMMA               => true,
+                              T_OPEN_PARENTHESIS    => true,
+                              T_OPEN_SQUARE_BRACKET => true,
+                              T_OPEN_SHORT_ARRAY    => true,
+                              T_DOUBLE_ARROW        => true,
+                              T_COLON               => true,
+                              T_INLINE_THEN         => true,
+                              T_INLINE_ELSE         => true,
+                              T_CASE                => true,
+                             );
+
+            if (isset($invalidTokens[$tokens[$prev]['code']]) === true) {
+                // Just trying to use a negative value; eg. myFunction($var, -2).
+                return;
+            }
+        }//end if
+
+        $operator = $tokens[$stackPtr]['content'];
+
+        if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
+            $error = "Expected 1 space before \"$operator\"; 0 found";
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Space before operator', 0);
+        } else if (isset(PHP_CodeSniffer_Tokens::$assignmentTokens[$tokens[$stackPtr]['code']]) === false) {
+            // Don't throw an error for assignments, because other standards allow
+            // multiple spaces there to align multiple assignments.
+            if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
+                $found = 'newline';
+            } else {
+                $found = $tokens[($stackPtr - 1)]['length'];
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Space before operator', $found);
+            if ($found !== 1
+                && ($found !== 'newline' || $this->ignoreNewlines === false)
+            ) {
+                $error = 'Expected 1 space before "%s"; %s found';
+                $data  = array(
+                          $operator,
+                          $found,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->beginChangeset();
+                    if ($found === 'newline') {
+                        $i = ($stackPtr - 2);
+                        while ($tokens[$i]['code'] === T_WHITESPACE) {
+                            $phpcsFile->fixer->replaceToken($i, '');
+                            $i--;
+                        }
+                    }
+
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
+                    $phpcsFile->fixer->endChangeset();
+                }
+            }//end if
+        }//end if
+
+        if (isset($tokens[($stackPtr + 1)]) === false) {
+            return;
+        }
+
+        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+            $error = "Expected 1 space after \"$operator\"; 0 found";
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfter');
+            if ($fix === true) {
+                $phpcsFile->fixer->addContent($stackPtr, ' ');
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Space after operator', 0);
+        } else {
+            if (isset($tokens[($stackPtr + 2)]) === true
+                && $tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']
+            ) {
+                $found = 'newline';
+            } else {
+                $found = $tokens[($stackPtr + 1)]['length'];
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'Space after operator', $found);
+            if ($found !== 1
+                && ($found !== 'newline' || $this->ignoreNewlines === false)
+            ) {
+                $error = 'Expected 1 space after "%s"; %s found';
+                $data  = array(
+                          $operator,
+                          $found,
+                         );
+                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfter', $data);
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php	(revision 5534)
@@ -0,0 +1,93 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff.
+ *
+ * Ensures that the colon in a property or label definition has a single
+ * space after it and no space before it.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array('JS');
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_PROPERTY,
+                T_LABEL,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $colon = $phpcsFile->findNext(T_COLON, ($stackPtr + 1));
+
+        if ($colon !== ($stackPtr + 1)) {
+            $error = 'There must be no space before the colon in a property/label declaration';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Before');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
+            }
+        }
+
+        if ($tokens[($colon + 1)]['code'] !== T_WHITESPACE || $tokens[($colon + 1)]['content'] !== ' ') {
+            $error = 'There must be a single space after the colon in a property/label declaration';
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'After');
+            if ($fix === true) {
+                if ($tokens[($colon + 1)]['code'] === T_WHITESPACE) {
+                    $phpcsFile->fixer->replaceToken(($colon + 1), ' ');
+                } else {
+                    $phpcsFile->fixer->addContent($colon, ' ');
+                }
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php	(revision 5534)
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Squiz_Sniffs_Whitespace_ScopeClosingBraceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_Whitespace_ScopeClosingBraceSniff.
+ *
+ * Checks that the closing braces of scopes are aligned correctly.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return PHP_CodeSniffer_Tokens::$scopeOpeners;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        // If this is an inline condition (ie. there is no scope opener), then
+        // return, as this is not a new scope.
+        if (isset($tokens[$stackPtr]['scope_closer']) === false) {
+            return;
+        }
+
+        // We need to actually find the first piece of content on this line,
+        // as if this is a method with tokens before it (public, static etc)
+        // or an if with an else before it, then we need to start the scope
+        // checking from there, rather than the current token.
+        $lineStart = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true);
+
+        $startColumn = $tokens[$lineStart]['column'];
+        $scopeStart  = $tokens[$stackPtr]['scope_opener'];
+        $scopeEnd    = $tokens[$stackPtr]['scope_closer'];
+
+        // Check that the closing brace is on it's own line.
+        $lastContent = $phpcsFile->findPrevious(array(T_INLINE_HTML, T_WHITESPACE, T_OPEN_TAG), ($scopeEnd - 1), $scopeStart, true);
+        if ($tokens[$lastContent]['line'] === $tokens[$scopeEnd]['line']) {
+            $error = 'Closing brace must be on a line by itself';
+            $fix   = $phpcsFile->addFixableError($error, $scopeEnd, 'ContentBefore');
+            if ($fix === true) {
+                $phpcsFile->fixer->addNewlineBefore($scopeEnd);
+            }
+
+            return;
+        }
+
+        // Check now that the closing brace is lined up correctly.
+        $lineStart   = $phpcsFile->findFirstOnLine(T_WHITESPACE, $scopeEnd, true);
+        $braceIndent = $tokens[$lineStart]['column'];
+        if ($tokens[$stackPtr]['code'] !== T_DEFAULT
+            && $tokens[$stackPtr]['code'] !== T_CASE
+            && $braceIndent !== $startColumn
+        ) {
+            $error = 'Closing brace indented incorrectly; expected %s spaces, found %s';
+            $data  = array(
+                      ($startColumn - 1),
+                      ($braceIndent - 1),
+                     );
+
+            $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data);
+            if ($fix === true) {
+                $diff = ($startColumn - $braceIndent);
+                if ($diff > 0) {
+                    $phpcsFile->fixer->addContentBefore($scopeEnd, str_repeat(' ', $diff));
+                } else {
+                    $phpcsFile->fixer->substrToken(($scopeEnd - 1), 0, $diff);
+                }
+            }
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php	(revision 5534)
@@ -0,0 +1,92 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff.
+ *
+ * Ensure there is a single space after scope keywords.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        $register   = PHP_CodeSniffer_Tokens::$scopeModifiers;
+        $register[] = T_STATIC;
+        return $register;
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+        $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+
+        if ($tokens[$stackPtr]['code'] === T_STATIC
+            && ($tokens[$nextToken]['code'] === T_DOUBLE_COLON
+            || $tokens[$prevToken]['code'] === T_NEW)
+        ) {
+            // Late static binding, e.g., static:: OR new static() usage.
+            return;
+        }
+
+        if ($tokens[$prevToken]['code'] === T_AS) {
+            // Trait visibilty change, e.g., "use HelloWorld { sayHello as private; }".
+            return;
+        }
+
+        $nextToken = $tokens[($stackPtr + 1)];
+        if (strlen($nextToken['content']) !== 1
+            || $nextToken['content'] === $phpcsFile->eolChar
+        ) {
+            $error = 'Scope keyword "%s" must be followed by a single space';
+            $data  = array($tokens[$stackPtr]['content']);
+            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data);
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
+            }
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php	(revision 5534)
@@ -0,0 +1,101 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff.
+ *
+ * Ensure there is no whitespace before a semicolon.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                  );
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_SEMICOLON);
+
+    }//end register()
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token
+     *                                        in the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $prevType = $tokens[($stackPtr - 1)]['code'];
+        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$prevType]) === false) {
+            return;
+        }
+
+        $nonSpace = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 2), null, true);
+        if ($tokens[$nonSpace]['code'] === T_SEMICOLON) {
+            // Empty statement.
+            return;
+        }
+
+        $expected = $tokens[$nonSpace]['content'].';';
+        $found    = $phpcsFile->getTokensAsString($nonSpace, ($stackPtr - $nonSpace)).';';
+        $error    = 'Space found before semicolon; expected "%s" but found "%s"';
+        $data     = array(
+                     $expected,
+                     $found,
+                    );
+
+        $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data);
+        if ($fix === true) {
+            $phpcsFile->fixer->beginChangeset();
+            for ($i = ($stackPtr - 1); $i > $nonSpace; $i--) {
+                $phpcsFile->fixer->replaceToken($i, '');
+            }
+
+            $phpcsFile->fixer->endChangeset();
+        }
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php	(revision 5534)
@@ -0,0 +1,265 @@
+<?php
+/**
+ * Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff.
+ *
+ * Checks that no whitespace proceeds the first content of the file, exists
+ * after the last content of the file, resides after content on any line, or
+ * are two empty lines in functions.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff implements PHP_CodeSniffer_Sniff
+{
+
+    /**
+     * A list of tokenizers this sniff supports.
+     *
+     * @var array
+     */
+    public $supportedTokenizers = array(
+                                   'PHP',
+                                   'JS',
+                                   'CSS',
+                                  );
+
+    /**
+     * If TRUE, whitespace rules are not checked for blank lines.
+     *
+     * Blank lines are those that contain only whitespace.
+     *
+     * @var boolean
+     */
+    public $ignoreBlankLines = false;
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(
+                T_OPEN_TAG,
+                T_CLOSE_TAG,
+                T_WHITESPACE,
+                T_COMMENT,
+                T_DOC_COMMENT_WHITESPACE,
+                T_CLOSURE,
+               );
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        if ($tokens[$stackPtr]['code'] === T_OPEN_TAG) {
+            /*
+                Check for start of file whitespace.
+            */
+
+            if ($phpcsFile->tokenizerType !== 'PHP') {
+                // The first token is always the open tag inserted when tokenizsed
+                // and the second token is always the first piece of content in
+                // the file. If the second token is whitespace, there was
+                // whitespace at the start of the file.
+                if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
+                    return;
+                }
+
+                if ($phpcsFile->fixer->enabled === true) {
+                    $stackPtr = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
+                }
+            } else {
+                // If it's the first token, then there is no space.
+                if ($stackPtr === 0) {
+                    return;
+                }
+
+                for ($i = ($stackPtr - 1); $i >= 0; $i--) {
+                    // If we find something that isn't inline html then there is something previous in the file.
+                    if ($tokens[$i]['type'] !== 'T_INLINE_HTML') {
+                        return;
+                    }
+
+                    // If we have ended up with inline html make sure it isn't just whitespace.
+                    $tokenContent = trim($tokens[$i]['content']);
+                    if ($tokenContent !== '') {
+                        return;
+                    }
+                }
+            }//end if
+
+            $fix = $phpcsFile->addFixableError('Additional whitespace found at start of file', $stackPtr, 'StartFile');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = 0; $i < $stackPtr; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        } else if ($tokens[$stackPtr]['code'] === T_CLOSE_TAG) {
+            /*
+                Check for end of file whitespace.
+            */
+
+            if ($phpcsFile->tokenizerType === 'PHP') {
+                if (isset($tokens[($stackPtr + 1)]) === false) {
+                    // The close PHP token is the last in the file.
+                    return;
+                }
+
+                for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+                    // If we find something that isn't inline HTML then there
+                    // is more to the file.
+                    if ($tokens[$i]['type'] !== 'T_INLINE_HTML') {
+                        return;
+                    }
+
+                    // If we have ended up with inline html make sure it
+                    // isn't just whitespace.
+                    $tokenContent = trim($tokens[$i]['content']);
+                    if (empty($tokenContent) === false) {
+                        return;
+                    }
+                }
+            } else {
+                // The last token is always the close tag inserted when tokenized
+                // and the second last token is always the last piece of content in
+                // the file. If the second last token is whitespace, there was
+                // whitespace at the end of the file.
+                $stackPtr--;
+
+                // The pointer is now looking at the last content in the file and
+                // not the fake PHP end tag the tokenizer inserted.
+                if ($tokens[$stackPtr]['code'] !== T_WHITESPACE) {
+                    return;
+                }
+
+                // Allow a single newline at the end of the last line in the file.
+                if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE
+                    && $tokens[$stackPtr]['content'] === $phpcsFile->eolChar
+                ) {
+                    return;
+                }
+
+                if ($phpcsFile->fixer->enabled === true) {
+                    $prev     = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
+                    $stackPtr = ($prev + 1);
+                }
+            }//end if
+
+            $fix = $phpcsFile->addFixableError('Additional whitespace found at end of file', $stackPtr, 'EndFile');
+            if ($fix === true) {
+                $phpcsFile->fixer->beginChangeset();
+                for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
+                    $phpcsFile->fixer->replaceToken($i, '');
+                }
+
+                $phpcsFile->fixer->endChangeset();
+            }
+        } else {
+            /*
+                Check for end of line whitespace.
+            */
+
+            // Ignore whitespace that is not at the end of a line.
+            if (isset($tokens[($stackPtr + 1)]['line']) === true
+                && $tokens[($stackPtr + 1)]['line'] === $tokens[$stackPtr]['line']
+            ) {
+                return;
+            }
+
+            // Ignore blank lines if required.
+            if ($this->ignoreBlankLines === true
+                && $tokens[($stackPtr - 1)]['line'] !== $tokens[$stackPtr]['line']
+            ) {
+                return;
+            }
+
+            $tokenContent = rtrim($tokens[$stackPtr]['content'], $phpcsFile->eolChar);
+            if (empty($tokenContent) === false) {
+                if ($tokenContent !== rtrim($tokenContent)) {
+                    $fix = $phpcsFile->addFixableError('Whitespace found at end of line', $stackPtr, 'EndLine');
+                    if ($fix === true) {
+                        $phpcsFile->fixer->replaceToken($stackPtr, rtrim($tokenContent).$phpcsFile->eolChar);
+                    }
+                }
+            } else if ($tokens[($stackPtr - 1)]['content'] !== rtrim($tokens[($stackPtr - 1)]['content'])
+                && $tokens[($stackPtr - 1)]['line'] === $tokens[$stackPtr]['line']
+            ) {
+                $fix = $phpcsFile->addFixableError('Whitespace found at end of line', ($stackPtr - 1), 'EndLine');
+                if ($fix === true) {
+                    $phpcsFile->fixer->replaceToken(($stackPtr - 1), rtrim($tokens[($stackPtr - 1)]['content']));
+                }
+            }
+
+            /*
+                Check for multiple blank lines in a function.
+            */
+
+            if (($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true
+                || $phpcsFile->hasCondition($stackPtr, T_CLOSURE) === true)
+                && $tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line']
+                && $tokens[($stackPtr - 2)]['line'] === $tokens[($stackPtr - 1)]['line']
+            ) {
+                // This is an empty line and the line before this one is not
+                // empty, so this could be the start of a multiple empty
+                // line block.
+                $next  = $phpcsFile->findNext(T_WHITESPACE, $stackPtr, null, true);
+                $lines = ($tokens[$next]['line'] - $tokens[$stackPtr]['line']);
+                if ($lines > 1) {
+                    $error = 'Functions must not contain multiple empty lines in a row; found %s empty lines';
+                    $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'EmptyLines', array($lines));
+                    if ($fix === true) {
+                        $phpcsFile->fixer->beginChangeset();
+                        $i = $stackPtr;
+                        while ($tokens[$i]['line'] !== $tokens[$next]['line']) {
+                            $phpcsFile->fixer->replaceToken($i, '');
+                            $i++;
+                        }
+
+                        $phpcsFile->fixer->addNewlineBefore($i);
+                        $phpcsFile->fixer->endChangeset();
+                    }
+                }
+            }//end if
+        }//end if
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/ruleset.xml	(revision 5534)
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<ruleset name="Squiz">
+ <description>The Squiz coding standard.</description>
+
+ <!-- Include some specific sniffs -->
+ <rule ref="Generic.CodeAnalysis.EmptyStatement"/>
+ <rule ref="Generic.Commenting.Todo"/>
+ <rule ref="Generic.Commenting.DocComment"/>
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
+ <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
+ <rule ref="Generic.Formatting.SpaceAfterCast"/>
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
+ <rule ref="Generic.NamingConventions.ConstructorName"/>
+ <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
+ <rule ref="Generic.PHP.DeprecatedFunctions"/>
+ <rule ref="Generic.PHP.DisallowShortOpenTag"/>
+ <rule ref="Generic.PHP.LowerCaseKeyword"/>
+ <rule ref="Generic.PHP.LowerCaseConstant"/>
+ <rule ref="Generic.Strings.UnnecessaryStringConcat"/>
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
+ <rule ref="Generic.WhiteSpace.ScopeIndent"/>
+ <rule ref="PEAR.ControlStructures.MultiLineCondition"/>
+ <rule ref="PEAR.Files.IncludingFile"/>
+ <rule ref="PEAR.Formatting.MultiLineAssignment"/>
+ <rule ref="PEAR.Functions.ValidDefaultValue"/>
+ <rule ref="PSR2.Files.EndFileNewline"/>
+ <rule ref="Zend.Files.ClosingTag"/>
+ <rule ref="Zend.Debug.CodeAnalyzer"/>
+
+ <!-- Lines can be 120 chars long, but never show errors -->
+ <rule ref="Generic.Files.LineLength">
+  <properties>
+   <property name="lineLimit" value="120"/>
+   <property name="absoluteLineLimit" value="0"/>
+  </properties>
+ </rule>
+
+ <!-- Use Unix newlines -->
+ <rule ref="Generic.Files.LineEndings">
+  <properties>
+   <property name="eolChar" value="\n"/>
+  </properties>
+ </rule>
+
+ <!-- Have 20 chars padding maximum and always show as errors -->
+ <rule ref="Generic.Formatting.MultipleStatementAlignment">
+  <properties>
+   <property name="maxPadding" value="20"/>
+   <property name="error" value="true"/>
+  </properties>
+ </rule>
+
+ <!-- We allow empty catch statements -->
+ <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
+   <severity>0</severity>
+ </rule>
+
+ <!-- We don't want gsjlint throwing errors for things we already check -->
+ <rule ref="Generic.Debug.ClosureLinter">
+  <properties>
+   <property name="errorCodes" type="array" value="0210"/>
+   <property name="ignoreCodes" type="array" value="0001,0110,0240"/>
+  </properties>
+ </rule>
+ <rule ref="Generic.Debug.ClosureLinter.ExternalToolError">
+  <message>%2$s</message>
+ </rule>
+
+ <!-- Only one argument per line in multi-line function calls -->
+ <rule ref="PEAR.Functions.FunctionCallSignature">
+  <properties>
+   <property name="allowMultipleArguments" value="false"/>
+  </properties>
+ </rule>
+
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml	(revision 5534)
@@ -0,0 +1,25 @@
+<documentation title="Zend Code Analyzer">
+    <standard>
+    <![CDATA[
+    PHP Code should pass the zend code analyzer.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: Valid PHP Code.">
+        <![CDATA[
+function foo($bar, $baz)
+{
+    return <em>$bar + $baz</em>;
+}
+        ]]>
+        </code>
+        <code title="Invalid: There is an unused function parameter.">
+        <![CDATA[
+function foo($bar, $baz)
+{
+    return <em>$bar + 2</em>;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/Files/ClosingTagStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/Files/ClosingTagStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/Files/ClosingTagStandard.xml	(revision 5534)
@@ -0,0 +1,22 @@
+<documentation title="Closing PHP Tags">
+    <standard>
+    <![CDATA[
+    Files should not have closing php tags.
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: No closing tag at the end of the file.">
+        <![CDATA[
+<?php
+$var = 1;
+        ]]>
+        </code>
+        <code title="Invalid: A closing php tag is included at the end of the file.">
+        <![CDATA[
+<?php
+$var = 1;
+<em>?></em>
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml	(revision 5534)
@@ -0,0 +1,37 @@
+<documentation title="Variable Names">
+    <standard>
+    <![CDATA[
+    Variable names should be camelCased with the first letter lowercase.  Private and protected member variables should begin with an underscore
+    ]]>
+    </standard>
+    <code_comparison>
+        <code title="Valid: A multi-word variable uses camel casing.">
+        <![CDATA[
+<em>$testNumber</em> = 1;
+        ]]>
+        </code>
+        <code title="Invalid: A multi-word variable uses underscores and initial capitalization.">
+        <![CDATA[
+<em>$Test_Number</em> = 1;
+        ]]>
+        </code>
+    </code_comparison>
+    <code_comparison>
+        <code title="Valid: A private member variable begins with an underscore.">
+        <![CDATA[
+class Foo
+{
+    private $<em>_</em>bar;
+}
+        ]]>
+        </code>
+        <code title="Invalid: A private member variable does not begin with an underscore.">
+        <![CDATA[
+class Foo
+{
+    private $bar;
+}
+        ]]>
+        </code>
+    </code_comparison>
+</documentation>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php	(revision 5534)
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Zend_Sniffs_Debug_CodeAnalyzerSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Holger Kral <holger.kral@zend.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Zend_Sniffs_Debug_CodeAnalyzerSniff.
+ *
+ * Runs the Zend Code Analyzer (from Zend Studio) on the file.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Holger Kral <holger.kral@zend.com>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Zend_Sniffs_Debug_CodeAnalyzerSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns the token types that this sniff is interested in.
+     *
+     * @return int[]
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes the tokens that this sniff is interested in.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
+     * @param int                  $stackPtr  The position in the stack where
+     *                                        the token was found.
+     *
+     * @return int
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $fileName     = $phpcsFile->getFilename();
+        $analyzerPath = PHP_CodeSniffer::getConfigData('zend_ca_path');
+        if (is_null($analyzerPath) === true) {
+            return;
+        }
+
+        // In the command, 2>&1 is important because the code analyzer sends its
+        // findings to stderr. $output normally contains only stdout, so using 2>&1
+        // will pipe even stderr to stdout.
+        $cmd = $analyzerPath.' '.$fileName.' 2>&1';
+
+        // There is the possibility to pass "--ide" as an option to the analyzer.
+        // This would result in an output format which would be easier to parse.
+        // The problem here is that no cleartext error messages are returnwd; only
+        // error-code-labels. So for a start we go for cleartext output.
+        $exitCode = exec($cmd, $output, $retval);
+
+        // Variable $exitCode is the last line of $output if no error occures, on
+        // error it is numeric. Try to handle various error conditions and
+        // provide useful error reporting.
+        if (is_numeric($exitCode) === true && $exitCode > 0) {
+            if (is_array($output) === true) {
+                $msg = join('\n', $output);
+            }
+
+            throw new PHP_CodeSniffer_Exception("Failed invoking ZendCodeAnalyzer, exitcode was [$exitCode], retval was [$retval], output was [$msg]");
+        }
+
+        if (is_array($output) === true) {
+            foreach ($output as $finding) {
+                // The first two lines of analyzer output contain
+                // something like this:
+                // > Zend Code Analyzer 1.2.2
+                // > Analyzing <filename>...
+                // So skip these...
+                $res = preg_match("/^.+\(line ([0-9]+)\):(.+)$/", $finding, $regs);
+                if (empty($regs) === true || $res === false) {
+                    continue;
+                }
+
+                $phpcsFile->addWarningOnLine(trim($regs[2]), $regs[1], 'ExternalTool');
+            }
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/Files/ClosingTagSniff.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Zend_Sniffs_Files_ClosingTagsSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Zend_Sniffs_Files_LineEndingsSniff.
+ *
+ * Checks that the file does not end with a closing tag.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Zend_Sniffs_Files_ClosingTagSniff implements PHP_CodeSniffer_Sniff
+{
+
+
+    /**
+     * Returns an array of tokens this test wants to listen for.
+     *
+     * @return array
+     */
+    public function register()
+    {
+        return array(T_OPEN_TAG);
+
+    }//end register()
+
+
+    /**
+     * Processes this sniff, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in
+     *                                        the stack passed in $tokens.
+     *
+     * @return void
+     */
+    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        // Find the last non-empty token.
+        $tokens = $phpcsFile->getTokens();
+        for ($last = ($phpcsFile->numTokens - 1); $last > 0; $last--) {
+            if (trim($tokens[$last]['content']) !== '') {
+                break;
+            }
+        }
+
+        if ($tokens[$last]['code'] === T_CLOSE_TAG) {
+            $error = 'A closing tag is not permitted at the end of a PHP file';
+            $fix   = $phpcsFile->addFixableError($error, $last, 'NotAllowed');
+            if ($fix === true) {
+                $phpcsFile->fixer->replaceToken($last, '');
+            }
+
+            $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at EOF', 'yes');
+        } else {
+            $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at EOF', 'no');
+        }
+
+        // Ignore the rest of the file.
+        return ($phpcsFile->numTokens + 1);
+
+    }//end process()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php	(revision 5534)
@@ -0,0 +1,245 @@
+<?php
+/**
+ * Squiz_Sniffs_NamingConventions_ValidVariableNameSniff.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Standards_AbstractVariableSniff', true) === false) {
+    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractVariableSniff not found');
+}
+
+/**
+ * Squiz_Sniffs_NamingConventions_ValidVariableNameSniff.
+ *
+ * Checks the naming of variables and member variables.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class Zend_Sniffs_NamingConventions_ValidVariableNameSniff extends PHP_CodeSniffer_Standards_AbstractVariableSniff
+{
+
+    /**
+     * Tokens to ignore so that we can find a DOUBLE_COLON.
+     *
+     * @var array
+     */
+    private $_ignore = array(
+                        T_WHITESPACE,
+                        T_COMMENT,
+                       );
+
+
+    /**
+     * Processes this test, when one of its tokens is encountered.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens  = $phpcsFile->getTokens();
+        $varName = ltrim($tokens[$stackPtr]['content'], '$');
+
+        $phpReservedVars = array(
+                            '_SERVER',
+                            '_GET',
+                            '_POST',
+                            '_REQUEST',
+                            '_SESSION',
+                            '_ENV',
+                            '_COOKIE',
+                            '_FILES',
+                            'GLOBALS',
+                            'http_response_header',
+                            'HTTP_RAW_POST_DATA',
+                            'php_errormsg',
+                           );
+
+        // If it's a php reserved var, then its ok.
+        if (in_array($varName, $phpReservedVars) === true) {
+            return;
+        }
+
+        $objOperator = $phpcsFile->findNext(array(T_WHITESPACE), ($stackPtr + 1), null, true);
+        if ($tokens[$objOperator]['code'] === T_OBJECT_OPERATOR) {
+            // Check to see if we are using a variable from an object.
+            $var = $phpcsFile->findNext(array(T_WHITESPACE), ($objOperator + 1), null, true);
+            if ($tokens[$var]['code'] === T_STRING) {
+                // Either a var name or a function call, so check for bracket.
+                $bracket = $phpcsFile->findNext(array(T_WHITESPACE), ($var + 1), null, true);
+
+                if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) {
+                    $objVarName = $tokens[$var]['content'];
+
+                    // There is no way for us to know if the var is public or private,
+                    // so we have to ignore a leading underscore if there is one and just
+                    // check the main part of the variable name.
+                    $originalVarName = $objVarName;
+                    if (substr($objVarName, 0, 1) === '_') {
+                        $objVarName = substr($objVarName, 1);
+                    }
+
+                    if (PHP_CodeSniffer::isCamelCaps($objVarName, false, true, false) === false) {
+                        $error = 'Variable "%s" is not in valid camel caps format';
+                        $data  = array($originalVarName);
+                        $phpcsFile->addError($error, $var, 'NotCamelCaps', $data);
+                    } else if (preg_match('|\d|', $objVarName) === 1) {
+                        $warning = 'Variable "%s" contains numbers but this is discouraged';
+                        $data    = array($originalVarName);
+                        $phpcsFile->addWarning($warning, $stackPtr, 'ContainsNumbers', $data);
+                    }
+                }//end if
+            }//end if
+        }//end if
+
+        // There is no way for us to know if the var is public or private,
+        // so we have to ignore a leading underscore if there is one and just
+        // check the main part of the variable name.
+        $originalVarName = $varName;
+        if (substr($varName, 0, 1) === '_') {
+            $objOperator = $phpcsFile->findPrevious(array(T_WHITESPACE), ($stackPtr - 1), null, true);
+            if ($tokens[$objOperator]['code'] === T_DOUBLE_COLON) {
+                // The variable lives within a class, and is referenced like
+                // this: MyClass::$_variable, so we don't know its scope.
+                $inClass = true;
+            } else {
+                $inClass = $phpcsFile->hasCondition($stackPtr, array(T_CLASS, T_INTERFACE, T_TRAIT));
+            }
+
+            if ($inClass === true) {
+                $varName = substr($varName, 1);
+            }
+        }
+
+        if (PHP_CodeSniffer::isCamelCaps($varName, false, true, false) === false) {
+            $error = 'Variable "%s" is not in valid camel caps format';
+            $data  = array($originalVarName);
+            $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data);
+        } else if (preg_match('|\d|', $varName) === 1) {
+            $warning = 'Variable "%s" contains numbers but this is discouraged';
+            $data    = array($originalVarName);
+            $phpcsFile->addWarning($warning, $stackPtr, 'ContainsNumbers', $data);
+        }
+
+    }//end processVariable()
+
+
+    /**
+     * Processes class member variables.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the current token in the
+     *                                        stack passed in $tokens.
+     *
+     * @return void
+     */
+    protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens      = $phpcsFile->getTokens();
+        $varName     = ltrim($tokens[$stackPtr]['content'], '$');
+        $memberProps = $phpcsFile->getMemberProperties($stackPtr);
+        $public      = ($memberProps['scope'] === 'public');
+
+        if ($public === true) {
+            if (substr($varName, 0, 1) === '_') {
+                $error = 'Public member variable "%s" must not contain a leading underscore';
+                $data  = array($varName);
+                $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data);
+                return;
+            }
+        } else {
+            if (substr($varName, 0, 1) !== '_') {
+                $scope = ucfirst($memberProps['scope']);
+                $error = '%s member variable "%s" must contain a leading underscore';
+                $data  = array(
+                          $scope,
+                          $varName,
+                         );
+                $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data);
+                return;
+            }
+        }
+
+        if (PHP_CodeSniffer::isCamelCaps($varName, false, $public, false) === false) {
+            $error = 'Member variable "%s" is not in valid camel caps format';
+            $data  = array($varName);
+            $phpcsFile->addError($error, $stackPtr, 'MemberVarNotCamelCaps', $data);
+        } else if (preg_match('|\d|', $varName) === 1) {
+            $warning = 'Member variable "%s" contains numbers but this is discouraged';
+            $data    = array($varName);
+            $phpcsFile->addWarning($warning, $stackPtr, 'MemberVarContainsNumbers', $data);
+        }
+
+    }//end processMemberVar()
+
+
+    /**
+     * Processes the variable found within a double quoted string.
+     *
+     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+     * @param int                  $stackPtr  The position of the double quoted
+     *                                        string.
+     *
+     * @return void
+     */
+    protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+    {
+        $tokens = $phpcsFile->getTokens();
+
+        $phpReservedVars = array(
+                            '_SERVER',
+                            '_GET',
+                            '_POST',
+                            '_REQUEST',
+                            '_SESSION',
+                            '_ENV',
+                            '_COOKIE',
+                            '_FILES',
+                            'GLOBALS',
+                            'http_response_header',
+                            'HTTP_RAW_POST_DATA',
+                            'php_errormsg',
+                           );
+
+        if (preg_match_all('|[^\\\]\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) {
+            foreach ($matches[1] as $varName) {
+                // If it's a php reserved var, then its ok.
+                if (in_array($varName, $phpReservedVars) === true) {
+                    continue;
+                }
+
+                if (PHP_CodeSniffer::isCamelCaps($varName, false, true, false) === false) {
+                    $error = 'Variable "%s" is not in valid camel caps format';
+                    $data  = array($varName);
+                    $phpcsFile->addError($error, $stackPtr, 'StringVarNotCamelCaps', $data);
+                } else if (preg_match('|\d|', $varName) === 1) {
+                    $warning = 'Variable "%s" contains numbers but this is discouraged';
+                    $data    = array($varName);
+                    $phpcsFile->addWarning($warning, $stackPtr, 'StringVarContainsNumbers', $data);
+                }
+            }//end foreach
+        }//end if
+
+    }//end processVariableInString()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/ruleset.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/ruleset.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/ruleset.xml	(revision 5534)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<ruleset name="Zend">
+ <description>A coding standard based on an early Zend Framework coding standard. Note that this standard is out of date.</description>
+
+ <!-- Include some sniffs from all around the place -->
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
+ <rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
+ <rule ref="Generic.PHP.DisallowShortOpenTag"/>
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
+ <rule ref="PEAR.Classes.ClassDeclaration"/>
+ <rule ref="PEAR.ControlStructures.ControlSignature"/>
+ <rule ref="PEAR.Functions.FunctionCallSignature"/>
+ <rule ref="PEAR.Functions.ValidDefaultValue"/>
+ <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
+ <rule ref="Squiz.Functions.GlobalFunction"/>
+
+ <!-- Lines can be 80 chars long, show errors at 120 chars -->
+ <rule ref="Generic.Files.LineLength">
+  <properties>
+   <property name="lineLimit" value="80"/>
+   <property name="absoluteLineLimit" value="120"/>
+  </properties>
+ </rule>
+
+ <!-- Use Unix newlines -->
+ <rule ref="Generic.Files.LineEndings">
+  <properties>
+   <property name="eolChar" value="\n"/>
+  </properties>
+ </rule>
+
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/CSS.php	(revision 5534)
@@ -0,0 +1,505 @@
+<?php
+/**
+ * Tokenizes CSS code.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (class_exists('PHP_CodeSniffer_Tokenizers_PHP', true) === false) {
+    throw new Exception('Class PHP_CodeSniffer_Tokenizers_PHP not found');
+}
+
+/**
+ * Tokenizes CSS code.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Tokenizers_CSS extends PHP_CodeSniffer_Tokenizers_PHP
+{
+
+
+    /**
+     * Creates an array of tokens when given some CSS code.
+     *
+     * Uses the PHP tokenizer to do all the tricky work
+     *
+     * @param string $string  The string to tokenize.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return array
+     */
+    public function tokenizeString($string, $eolChar='\n')
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START CSS TOKENIZING 1ST PASS ***".PHP_EOL;
+        }
+
+        // If the content doesn't have an EOL char on the end, add one so
+        // the open and close tags we add are parsed correctly.
+        $eolAdded = false;
+        if (substr($string, (strlen($eolChar) * -1)) !== $eolChar) {
+            $string  .= $eolChar;
+            $eolAdded = true;
+        }
+
+        $string = str_replace('<?php', '^PHPCS_CSS_T_OPEN_TAG^', $string);
+        $string = str_replace('?>', '^PHPCS_CSS_T_CLOSE_TAG^', $string);
+        $tokens = parent::tokenizeString('<?php '.$string.'?>', $eolChar);
+
+        $finalTokens    = array();
+        $finalTokens[0] = array(
+                           'code'    => T_OPEN_TAG,
+                           'type'    => 'T_OPEN_TAG',
+                           'content' => '',
+                          );
+
+        $newStackPtr      = 1;
+        $numTokens        = count($tokens);
+        $multiLineComment = false;
+        for ($stackPtr = 1; $stackPtr < $numTokens; $stackPtr++) {
+            $token = $tokens[$stackPtr];
+
+            // CSS files don't have lists, breaks etc, so convert these to
+            // standard strings early so they can be converted into T_STYLE
+            // tokens and joined with other strings if needed.
+            if ($token['code'] === T_BREAK
+                || $token['code'] === T_LIST
+                || $token['code'] === T_DEFAULT
+                || $token['code'] === T_SWITCH
+                || $token['code'] === T_FOR
+                || $token['code'] === T_FOREACH
+                || $token['code'] === T_WHILE
+            ) {
+                $token['type'] = 'T_STRING';
+                $token['code'] = T_STRING;
+            }
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $type    = $token['type'];
+                $content = PHP_CodeSniffer::prepareForOutput($token['content']);
+                echo "\tProcess token $stackPtr: $type => $content".PHP_EOL;
+            }
+
+            if ($token['code'] === T_BITWISE_XOR
+                && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_OPEN_TAG'
+            ) {
+                $content = '<?php';
+                for ($stackPtr = ($stackPtr + 3); $stackPtr < $numTokens; $stackPtr++) {
+                    if ($tokens[$stackPtr]['code'] === T_BITWISE_XOR
+                        && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_CLOSE_TAG'
+                    ) {
+                        // Add the end tag and ignore the * we put at the end.
+                        $content  .= '?>';
+                        $stackPtr += 2;
+                        break;
+                    } else {
+                        $content .= $tokens[$stackPtr]['content'];
+                    }
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\t=> Found embedded PHP code: ";
+                    $cleanContent = PHP_CodeSniffer::prepareForOutput($content);
+                    echo $cleanContent.PHP_EOL;
+                }
+
+                $finalTokens[$newStackPtr] = array(
+                                              'type'    => 'T_EMBEDDED_PHP',
+                                              'code'    => T_EMBEDDED_PHP,
+                                              'content' => $content,
+                                             );
+
+                $newStackPtr++;
+                continue;
+            }//end if
+
+            if ($token['code'] === T_GOTO_LABEL) {
+                // Convert these back to T_STRING followed by T_COLON so we can
+                // more easily process style definitions.
+                $finalTokens[$newStackPtr] = array(
+                                              'type'    => 'T_STRING',
+                                              'code'    => T_STRING,
+                                              'content' => substr($token['content'], 0, -1),
+                                             );
+                $newStackPtr++;
+                $finalTokens[$newStackPtr] = array(
+                                              'type'    => 'T_COLON',
+                                              'code'    => T_COLON,
+                                              'content' => ':',
+                                             );
+                $newStackPtr++;
+                continue;
+            }
+
+            if ($token['code'] === T_FUNCTION) {
+                // There are no functions in CSS, so convert this to a string.
+                $finalTokens[$newStackPtr] = array(
+                                              'type'    => 'T_STRING',
+                                              'code'    => T_STRING,
+                                              'content' => $token['content'],
+                                             );
+
+                $newStackPtr++;
+                continue;
+            }
+
+            if ($token['code'] === T_COMMENT
+                && substr($token['content'], 0, 2) === '/*'
+            ) {
+                // Multi-line comment. Record it so we can ignore other
+                // comment tags until we get out of this one.
+                $multiLineComment = true;
+            }
+
+            if ($token['code'] === T_COMMENT
+                && $multiLineComment === false
+                && (substr($token['content'], 0, 2) === '//'
+                || $token['content']{0} === '#')
+            ) {
+                $content = ltrim($token['content'], '#/');
+
+                // Guard against PHP7+ syntax errors by stripping
+                // leading zeros so the content doesn't look like an invalid int.
+                $leadingZero = false;
+                if ($content{0} === '0') {
+                    $content     = '1'.$content;
+                    $leadingZero = true;
+                }
+
+                $commentTokens = parent::tokenizeString('<?php '.$content.'?>', $eolChar);
+
+                // The first and last tokens are the open/close tags.
+                array_shift($commentTokens);
+                array_pop($commentTokens);
+
+                if ($leadingZero === true) {
+                    $commentTokens[0]['content'] = substr($commentTokens[0]['content'], 1);
+                    $content = substr($content, 1);
+                }
+
+                if ($token['content']{0} === '#') {
+                    // The # character is not a comment in CSS files, so
+                    // determine what it means in this context.
+                    $firstContent = $commentTokens[0]['content'];
+
+                    // If the first content is just a number, it is probably a
+                    // colour like 8FB7DB, which PHP splits into 8 and FB7DB.
+                    if (($commentTokens[0]['code'] === T_LNUMBER
+                        || $commentTokens[0]['code'] === T_DNUMBER)
+                        && $commentTokens[1]['code'] === T_STRING
+                    ) {
+                        $firstContent .= $commentTokens[1]['content'];
+                        array_shift($commentTokens);
+                    }
+
+                    // If the first content looks like a colour and not a class
+                    // definition, join the tokens together.
+                    if (preg_match('/^[ABCDEF0-9]+$/i', $firstContent) === 1
+                        && $commentTokens[1]['content'] !== '-'
+                    ) {
+                        array_shift($commentTokens);
+                        // Work out what we trimmed off above and remember to re-add it.
+                        $trimmed = substr($token['content'], 0, (strlen($token['content']) - strlen($content)));
+                        $finalTokens[$newStackPtr] = array(
+                                                      'type'    => 'T_COLOUR',
+                                                      'code'    => T_COLOUR,
+                                                      'content' => $trimmed.$firstContent,
+                                                     );
+                    } else {
+                        $finalTokens[$newStackPtr] = array(
+                                                      'type'    => 'T_HASH',
+                                                      'code'    => T_HASH,
+                                                      'content' => '#',
+                                                     );
+                    }
+                } else {
+                    $finalTokens[$newStackPtr] = array(
+                                                  'type'    => 'T_STRING',
+                                                  'code'    => T_STRING,
+                                                  'content' => '//',
+                                                 );
+                }//end if
+
+                $newStackPtr++;
+
+                array_splice($tokens, $stackPtr, 1, $commentTokens);
+                $numTokens = count($tokens);
+                $stackPtr--;
+                continue;
+            }//end if
+
+            if ($token['code'] === T_COMMENT
+                && substr($token['content'], -2) === '*/'
+            ) {
+                // Multi-line comment is done.
+                $multiLineComment = false;
+            }
+
+            $finalTokens[$newStackPtr] = $token;
+            $newStackPtr++;
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END CSS TOKENIZING 1ST PASS ***".PHP_EOL;
+            echo "\t*** START CSS TOKENIZING 2ND PASS ***".PHP_EOL;
+        }
+
+        // A flag to indicate if we are inside a style definition,
+        // which is defined using curly braces.
+        $inStyleDef = false;
+
+        // A flag to indicate if an At-rule like "@media" is used, which will result
+        // in nested curly brackets.
+        $asperandStart = false;
+
+        $numTokens = count($finalTokens);
+        for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) {
+            $token = $finalTokens[$stackPtr];
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $type    = $token['type'];
+                $content = PHP_CodeSniffer::prepareForOutput($token['content']);
+                echo "\tProcess token $stackPtr: $type => $content".PHP_EOL;
+            }
+
+            switch ($token['code']) {
+            case T_OPEN_CURLY_BRACKET:
+                // Opening curly brackets for an At-rule do not start a style
+                // definition. We also reset the asperand flag here because the next
+                // opening curly bracket could be indeed the start of a style
+                // definition.
+                if ($asperandStart === true) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        if ($inStyleDef === true) {
+                            echo "\t\t* style definition closed *".PHP_EOL;
+                        }
+
+                        if ($asperandStart === true) {
+                            echo "\t\t* at-rule definition closed *".PHP_EOL;
+                        }
+                    }
+
+                    $inStyleDef    = false;
+                    $asperandStart = false;
+                } else {
+                    $inStyleDef = true;
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* style definition opened *".PHP_EOL;
+                    }
+                }
+                break;
+            case T_CLOSE_CURLY_BRACKET:
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    if ($inStyleDef === true) {
+                        echo "\t\t* style definition closed *".PHP_EOL;
+                    }
+
+                    if ($asperandStart === true) {
+                        echo "\t\t* at-rule definition closed *".PHP_EOL;
+                    }
+                }
+
+                $inStyleDef    = false;
+                $asperandStart = false;
+                break;
+            case T_MINUS:
+                // Minus signs are often used instead of spaces inside
+                // class names, IDs and styles.
+                if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) {
+                    if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) {
+                        $newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content'];
+
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
+                            $old = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
+                            $new = PHP_CodeSniffer::prepareForOutput($newContent);
+                            echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
+                        }
+
+                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
+                        unset($finalTokens[$stackPtr]);
+                        unset($finalTokens[($stackPtr - 1)]);
+                    } else {
+                        $newContent = '-'.$finalTokens[($stackPtr + 1)]['content'];
+
+                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
+                        unset($finalTokens[$stackPtr]);
+                    }
+                } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) {
+                    // They can also be used to provide negative numbers.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL;
+                        $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
+                        echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL;
+                    }
+
+                    $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
+                    unset($finalTokens[$stackPtr]);
+                }//end if
+
+                break;
+            case T_COLON:
+                // Only interested in colons that are defining styles.
+                if ($inStyleDef === false) {
+                    break;
+                }
+
+                for ($x = ($stackPtr - 1); $x >= 0; $x--) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
+                        break;
+                    }
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $type = $finalTokens[$x]['type'];
+                    echo "\t\t=> token $x changed from $type to T_STYLE".PHP_EOL;
+                }
+
+                $finalTokens[$x]['type'] = 'T_STYLE';
+                $finalTokens[$x]['code'] = T_STYLE;
+                break;
+            case T_STRING:
+                if (strtolower($token['content']) === 'url') {
+                    // Find the next content.
+                    for ($x = ($stackPtr + 1); $x < $numTokens; $x++) {
+                        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
+                            break;
+                        }
+                    }
+
+                    // Needs to be in the format "url(" for it to be a URL.
+                    if ($finalTokens[$x]['code'] !== T_OPEN_PARENTHESIS) {
+                        continue;
+                    }
+
+                    // Make sure the content isn't empty.
+                    for ($y = ($x + 1); $y < $numTokens; $y++) {
+                        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$y]['code']]) === false) {
+                            break;
+                        }
+                    }
+
+                    if ($finalTokens[$y]['code'] === T_CLOSE_PARENTHESIS) {
+                        continue;
+                    }
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        for ($i = ($stackPtr + 1); $i <= $y; $i++) {
+                            $type    = $finalTokens[$i]['type'];
+                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[$i]['content']);
+                            echo "\tProcess token $i: $type => $content".PHP_EOL;
+                        }
+
+                        echo "\t\t* token starts a URL *".PHP_EOL;
+                    }
+
+                    // Join all the content together inside the url() statement.
+                    $newContent = '';
+                    for ($i = ($x + 2); $i < $numTokens; $i++) {
+                        if ($finalTokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
+                            break;
+                        }
+
+                        $newContent .= $finalTokens[$i]['content'];
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[$i]['content']);
+                            echo "\t\t=> token $i added to URL string and ignored: $content".PHP_EOL;
+                        }
+
+                        unset($finalTokens[$i]);
+                    }
+
+                    $stackPtr = $i;
+
+                    // If the content inside the "url()" is in double quotes
+                    // there will only be one token and so we don't have to do
+                    // anything except change its type. If it is not empty,
+                    // we need to do some token merging.
+                    $finalTokens[($x + 1)]['type'] = 'T_URL';
+                    $finalTokens[($x + 1)]['code'] = T_URL;
+
+                    if ($newContent !== '') {
+                        $finalTokens[($x + 1)]['content'] .= $newContent;
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($x + 1)]['content']);
+                            echo "\t\t=> token content changed to: $content".PHP_EOL;
+                        }
+                    }
+                }//end if
+
+                break;
+            case T_ASPERAND:
+                $asperandStart = true;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\t* at-rule definition opened *".PHP_EOL;
+                }
+                break;
+            default:
+                // Nothing special to be done with this token.
+                break;
+            }//end switch
+        }//end for
+
+        // Reset the array keys to avoid gaps.
+        $finalTokens = array_values($finalTokens);
+        $numTokens   = count($finalTokens);
+
+        // Blank out the content of the end tag.
+        $finalTokens[($numTokens - 1)]['content'] = '';
+
+        if ($eolAdded === true) {
+            // Strip off the extra EOL char we added for tokenizing.
+            $finalTokens[($numTokens - 2)]['content'] = substr(
+                $finalTokens[($numTokens - 2)]['content'],
+                0,
+                (strlen($eolChar) * -1)
+            );
+
+            if ($finalTokens[($numTokens - 2)]['content'] === '') {
+                unset($finalTokens[($numTokens - 2)]);
+                $finalTokens = array_values($finalTokens);
+                $numTokens   = count($finalTokens);
+            }
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END CSS TOKENIZING 2ND PASS ***".PHP_EOL;
+        }
+
+        return $finalTokens;
+
+    }//end tokenizeString()
+
+
+    /**
+     * Performs additional processing after main tokenizing.
+     *
+     * @param array  $tokens  The array of tokens to process.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    public function processAdditional(&$tokens, $eolChar)
+    {
+        /*
+            We override this method because we don't want the PHP version to
+            run during CSS processing because it is wasted processing time.
+        */
+
+    }//end processAdditional()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/Comment.php	(revision 5534)
@@ -0,0 +1,284 @@
+<?php
+/**
+ * Tokenizes doc block comments.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Tokenizes doc block comments.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Tokenizers_Comment
+{
+
+
+    /**
+     * Creates an array of tokens when given some PHP code.
+     *
+     * Starts by using token_get_all() but does a lot of extra processing
+     * to insert information about the context of the token.
+     *
+     * @param string $string   The string to tokenize.
+     * @param string $eolChar  The EOL character to use for splitting strings.
+     * @param int    $stackPtr The position of the first token in the file.
+     *
+     * @return array
+     */
+    public function tokenizeString($string, $eolChar, $stackPtr)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t\t*** START COMMENT TOKENIZING ***".PHP_EOL;
+        }
+
+        $tokens   = array();
+        $numChars = strlen($string);
+
+        /*
+            Doc block comments start with /*, but typically contain an
+            extra star when they are used for function and class comments.
+        */
+
+        $char    = ($numChars - strlen(ltrim($string, '/*')));
+        $openTag = substr($string, 0, $char);
+        $string  = ltrim($string, '/*');
+
+        $tokens[$stackPtr] = array(
+                              'content'      => $openTag,
+                              'code'         => T_DOC_COMMENT_OPEN_TAG,
+                              'type'         => 'T_DOC_COMMENT_OPEN_TAG',
+                              'comment_tags' => array(),
+                             );
+
+        $openPtr = $stackPtr;
+        $stackPtr++;
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $content = PHP_CodeSniffer::prepareForOutput($openTag);
+            echo "\t\tCreate comment token: T_DOC_COMMENT_OPEN_TAG => $content".PHP_EOL;
+        }
+
+        /*
+            Strip off the close tag so it doesn't interfere with any
+            of our comment line processing. The token will be added to the
+            stack just before we return it.
+        */
+
+        $closeTag = array(
+                     'content'        => substr($string, strlen(rtrim($string, '/*'))),
+                     'code'           => T_DOC_COMMENT_CLOSE_TAG,
+                     'type'           => 'T_DOC_COMMENT_CLOSE_TAG',
+                     'comment_opener' => $openPtr,
+                    );
+
+        $string = rtrim($string, '/*');
+
+        /*
+            Process each line of the comment.
+        */
+
+        $lines    = explode($eolChar, $string);
+        $numLines = count($lines);
+        foreach ($lines as $lineNum => $string) {
+            if ($lineNum !== ($numLines - 1)) {
+                $string .= $eolChar;
+            }
+
+            $char     = 0;
+            $numChars = strlen($string);
+
+            // We've started a new line, so process the indent.
+            $space = $this->_collectWhitespace($string, $char, $numChars);
+            if ($space !== null) {
+                $tokens[$stackPtr] = $space;
+                $stackPtr++;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $content = PHP_CodeSniffer::prepareForOutput($space['content']);
+                    $type    = $lineToken['type'];
+                    echo "\t\tCreate comment token: T_DOC_COMMENT_WHITESPACE => $content".PHP_EOL;
+                }
+
+                $char += strlen($space['content']);
+                if ($char === $numChars) {
+                    break;
+                }
+            }
+
+            if ($string === '') {
+                continue;
+            }
+
+            if ($string[$char] === '*') {
+                // This is a function or class doc block line.
+                $char++;
+                $tokens[$stackPtr] = array(
+                                      'content' => '*',
+                                      'code'    => T_DOC_COMMENT_STAR,
+                                      'type'    => 'T_DOC_COMMENT_STAR',
+                                     );
+
+                $stackPtr++;
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\tCreate comment token: T_DOC_COMMENT_STAR => *".PHP_EOL;
+                }
+            }
+
+            // Now we are ready to process the actual content of the line.
+            $lineTokens = $this->_processLine($string, $eolChar, $char, $numChars);
+            foreach ($lineTokens as $lineToken) {
+                $tokens[$stackPtr] = $lineToken;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $content = PHP_CodeSniffer::prepareForOutput($lineToken['content']);
+                    $type    = $lineToken['type'];
+                    echo "\t\tCreate comment token: $type => $content".PHP_EOL;
+                }
+
+                if ($lineToken['code'] === T_DOC_COMMENT_TAG) {
+                    $tokens[$openPtr]['comment_tags'][] = $stackPtr;
+                }
+
+                $stackPtr++;
+            }
+        }//end foreach
+
+        $tokens[$stackPtr] = $closeTag;
+        $tokens[$openPtr]['comment_closer'] = $stackPtr;
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            $content = PHP_CodeSniffer::prepareForOutput($closeTag['content']);
+            echo "\t\tCreate comment token: T_DOC_COMMENT_CLOSE_TAG => $content".PHP_EOL;
+        }
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t\t*** END COMMENT TOKENIZING ***".PHP_EOL;
+        }
+
+        return $tokens;
+
+    }//end tokenizeString()
+
+
+    /**
+     * Process a single line of a comment.
+     *
+     * @param string $string  The comment string being tokenized.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     * @param int    $start   The position in the string to start processing.
+     * @param int    $end     The position in the string to end processing.
+     *
+     * @return array
+     */
+    private function _processLine($string, $eolChar, $start, $end)
+    {
+        $tokens = array();
+
+        // Collect content padding.
+        $space = $this->_collectWhitespace($string, $start, $end);
+        if ($space !== null) {
+            $tokens[] = $space;
+            $start   += strlen($space['content']);
+        }
+
+        if (isset($string[$start]) === false) {
+            return $tokens;
+        }
+
+        if ($string[$start] === '@') {
+            // The content up until the first whitespace is the tag name.
+            $matches = array();
+            preg_match('/@[^\s]+/', $string, $matches, 0, $start);
+            if (isset($matches[0]) === true) {
+                $tagName  = $matches[0];
+                $start   += strlen($tagName);
+                $tokens[] = array(
+                             'content' => $tagName,
+                             'code'    => T_DOC_COMMENT_TAG,
+                             'type'    => 'T_DOC_COMMENT_TAG',
+                            );
+
+                // Then there will be some whitespace.
+                $space = $this->_collectWhitespace($string, $start, $end);
+                if ($space !== null) {
+                    $tokens[] = $space;
+                    $start   += strlen($space['content']);
+                }
+            }
+        }//end if
+
+        // Process the rest of the line.
+        $eol = strpos($string, $eolChar, $start);
+        if ($eol === false) {
+            $eol = $end;
+        }
+
+        if ($eol > $start) {
+            $tokens[] = array(
+                         'content' => substr($string, $start, ($eol - $start)),
+                         'code'    => T_DOC_COMMENT_STRING,
+                         'type'    => 'T_DOC_COMMENT_STRING',
+                        );
+        }
+
+        if ($eol !== $end) {
+            $tokens[] = array(
+                         'content' => substr($string, $eol, strlen($eolChar)),
+                         'code'    => T_DOC_COMMENT_WHITESPACE,
+                         'type'    => 'T_DOC_COMMENT_WHITESPACE',
+                        );
+        }
+
+        return $tokens;
+
+    }//end _processLine()
+
+
+    /**
+     * Collect consecutive whitespace into a single token.
+     *
+     * @param string $string The comment string being tokenized.
+     * @param int    $start  The position in the string to start processing.
+     * @param int    $end    The position in the string to end processing.
+     *
+     * @return array|null
+     */
+    private function _collectWhitespace($string, $start, $end)
+    {
+        $space = '';
+        for ($start; $start < $end; $start++) {
+            if ($string[$start] !== ' ' && $string[$start] !== "\t") {
+                break;
+            }
+
+            $space .= $string[$start];
+        }
+
+        if ($space === '') {
+            return null;
+        }
+
+        $token = array(
+                  'content' => $space,
+                  'code'    => T_DOC_COMMENT_WHITESPACE,
+                  'type'    => 'T_DOC_COMMENT_WHITESPACE',
+                 );
+
+        return $token;
+
+    }//end _collectWhitespace()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php	(revision 5534)
@@ -0,0 +1,1150 @@
+<?php
+/**
+ * Tokenizes JS code.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Tokenizes JS code.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Tokenizers_JS
+{
+
+    /**
+     * A list of tokens that are allowed to open a scope.
+     *
+     * This array also contains information about what kind of token the scope
+     * opener uses to open and close the scope, if the token strictly requires
+     * an opener, if the token can share a scope closer, and who it can be shared
+     * with. An example of a token that shares a scope closer is a CASE scope.
+     *
+     * @var array
+     */
+    public $scopeOpeners = array(
+                            T_IF       => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => false,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_TRY      => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => true,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_CATCH    => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => true,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_ELSE     => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => false,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_FOR      => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => false,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_FUNCTION => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => false,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_WHILE    => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => false,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_DO       => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => true,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_SWITCH   => array(
+                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                           'strict' => true,
+                                           'shared' => false,
+                                           'with'   => array(),
+                                          ),
+                            T_CASE     => array(
+                                           'start'  => array(T_COLON => T_COLON),
+                                           'end'    => array(
+                                                        T_BREAK    => T_BREAK,
+                                                        T_RETURN   => T_RETURN,
+                                                        T_CONTINUE => T_CONTINUE,
+                                                        T_THROW    => T_THROW,
+                                                       ),
+                                           'strict' => true,
+                                           'shared' => true,
+                                           'with'   => array(
+                                                        T_DEFAULT => T_DEFAULT,
+                                                        T_CASE    => T_CASE,
+                                                        T_SWITCH  => T_SWITCH,
+                                                       ),
+                                          ),
+                            T_DEFAULT  => array(
+                                           'start'  => array(T_COLON => T_COLON),
+                                           'end'    => array(
+                                                        T_BREAK    => T_BREAK,
+                                                        T_RETURN   => T_RETURN,
+                                                        T_CONTINUE => T_CONTINUE,
+                                                        T_THROW    => T_THROW,
+                                                       ),
+                                           'strict' => true,
+                                           'shared' => true,
+                                           'with'   => array(
+                                                        T_CASE   => T_CASE,
+                                                        T_SWITCH => T_SWITCH,
+                                                       ),
+                                          ),
+                           );
+
+    /**
+     * A list of tokens that end the scope.
+     *
+     * This array is just a unique collection of the end tokens
+     * from the _scopeOpeners array. The data is duplicated here to
+     * save time during parsing of the file.
+     *
+     * @var array
+     */
+    public $endScopeTokens = array(
+                              T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                              T_BREAK               => T_BREAK,
+                             );
+
+    /**
+     * A list of special JS tokens and their types.
+     *
+     * @var array
+     */
+    protected $tokenValues = array(
+                              'function'  => 'T_FUNCTION',
+                              'prototype' => 'T_PROTOTYPE',
+                              'try'       => 'T_TRY',
+                              'catch'     => 'T_CATCH',
+                              'return'    => 'T_RETURN',
+                              'throw'     => 'T_THROW',
+                              'break'     => 'T_BREAK',
+                              'switch'    => 'T_SWITCH',
+                              'continue'  => 'T_CONTINUE',
+                              'if'        => 'T_IF',
+                              'else'      => 'T_ELSE',
+                              'do'        => 'T_DO',
+                              'while'     => 'T_WHILE',
+                              'for'       => 'T_FOR',
+                              'var'       => 'T_VAR',
+                              'case'      => 'T_CASE',
+                              'default'   => 'T_DEFAULT',
+                              'true'      => 'T_TRUE',
+                              'false'     => 'T_FALSE',
+                              'null'      => 'T_NULL',
+                              'this'      => 'T_THIS',
+                              'typeof'    => 'T_TYPEOF',
+                              '('         => 'T_OPEN_PARENTHESIS',
+                              ')'         => 'T_CLOSE_PARENTHESIS',
+                              '{'         => 'T_OPEN_CURLY_BRACKET',
+                              '}'         => 'T_CLOSE_CURLY_BRACKET',
+                              '['         => 'T_OPEN_SQUARE_BRACKET',
+                              ']'         => 'T_CLOSE_SQUARE_BRACKET',
+                              '?'         => 'T_INLINE_THEN',
+                              '.'         => 'T_OBJECT_OPERATOR',
+                              '+'         => 'T_PLUS',
+                              '-'         => 'T_MINUS',
+                              '*'         => 'T_MULTIPLY',
+                              '%'         => 'T_MODULUS',
+                              '/'         => 'T_DIVIDE',
+                              '^'         => 'T_LOGICAL_XOR',
+                              ','         => 'T_COMMA',
+                              ';'         => 'T_SEMICOLON',
+                              ':'         => 'T_COLON',
+                              '<'         => 'T_LESS_THAN',
+                              '>'         => 'T_GREATER_THAN',
+                              '<='        => 'T_IS_SMALLER_OR_EQUAL',
+                              '>='        => 'T_IS_GREATER_OR_EQUAL',
+                              '!'         => 'T_BOOLEAN_NOT',
+                              '||'        => 'T_BOOLEAN_OR',
+                              '&&'        => 'T_BOOLEAN_AND',
+                              '|'         => 'T_BITWISE_OR',
+                              '&'         => 'T_BITWISE_AND',
+                              '!='        => 'T_IS_NOT_EQUAL',
+                              '!=='       => 'T_IS_NOT_IDENTICAL',
+                              '='         => 'T_EQUAL',
+                              '=='        => 'T_IS_EQUAL',
+                              '==='       => 'T_IS_IDENTICAL',
+                              '-='        => 'T_MINUS_EQUAL',
+                              '+='        => 'T_PLUS_EQUAL',
+                              '*='        => 'T_MUL_EQUAL',
+                              '/='        => 'T_DIV_EQUAL',
+                              '%='        => 'T_MOD_EQUAL',
+                              '++'        => 'T_INC',
+                              '--'        => 'T_DEC',
+                              '//'        => 'T_COMMENT',
+                              '/*'        => 'T_COMMENT',
+                              '/**'       => 'T_DOC_COMMENT',
+                              '*/'        => 'T_COMMENT',
+                             );
+
+    /**
+     * A list string delimiters.
+     *
+     * @var array
+     */
+    protected $stringTokens = array(
+                               '\'' => '\'',
+                               '"'  => '"',
+                              );
+
+    /**
+     * A list tokens that start and end comments.
+     *
+     * @var array
+     */
+    protected $commentTokens = array(
+                                '//'  => null,
+                                '/*'  => '*/',
+                                '/**' => '*/',
+                               );
+
+
+    /**
+     * Creates an array of tokens when given some PHP code.
+     *
+     * Starts by using token_get_all() but does a lot of extra processing
+     * to insert information about the context of the token.
+     *
+     * @param string $string  The string to tokenize.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return array
+     */
+    public function tokenizeString($string, $eolChar='\n')
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START JS TOKENIZING ***".PHP_EOL;
+        }
+
+        $maxTokenLength = 0;
+        foreach ($this->tokenValues as $token => $values) {
+            if (strlen($token) > $maxTokenLength) {
+                $maxTokenLength = strlen($token);
+            }
+        }
+
+        $tokens          = array();
+        $inString        = '';
+        $stringChar      = null;
+        $inComment       = '';
+        $buffer          = '';
+        $preStringBuffer = '';
+        $cleanBuffer     = false;
+
+        $commentTokenizer = new PHP_CodeSniffer_Tokenizers_Comment();
+
+        $tokens[] = array(
+                     'code'    => T_OPEN_TAG,
+                     'type'    => 'T_OPEN_TAG',
+                     'content' => '',
+                    );
+
+        // Convert newlines to single characters for ease of
+        // processing. We will change them back later.
+        $string = str_replace($eolChar, "\n", $string);
+
+        $chars    = str_split($string);
+        $numChars = count($chars);
+        for ($i = 0; $i < $numChars; $i++) {
+            $char = $chars[$i];
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $content       = PHP_CodeSniffer::prepareForOutput($char);
+                $bufferContent = PHP_CodeSniffer::prepareForOutput($buffer);
+
+                if ($inString !== '') {
+                    echo "\t";
+                }
+
+                if ($inComment !== '') {
+                    echo "\t";
+                }
+
+                echo "\tProcess char $i => $content (buffer: $bufferContent)".PHP_EOL;
+            }//end if
+
+            if ($inString === '' && $inComment === '' && $buffer !== '') {
+                // If the buffer only has whitespace and we are about to
+                // add a character, store the whitespace first.
+                if (trim($char) !== '' && trim($buffer) === '') {
+                    $tokens[] = array(
+                                 'code'    => T_WHITESPACE,
+                                 'type'    => 'T_WHITESPACE',
+                                 'content' => str_replace("\n", $eolChar, $buffer),
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput($buffer);
+                        echo "\t=> Added token T_WHITESPACE ($content)".PHP_EOL;
+                    }
+
+                    $buffer = '';
+                }
+
+                // If the buffer is not whitespace and we are about to
+                // add a whitespace character, store the content first.
+                if ($inString === ''
+                    && $inComment === ''
+                    && trim($char) === ''
+                    && trim($buffer) !== ''
+                ) {
+                    $tokens[] = array(
+                                 'code'    => T_STRING,
+                                 'type'    => 'T_STRING',
+                                 'content' => str_replace("\n", $eolChar, $buffer),
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput($buffer);
+                        echo "\t=> Added token T_STRING ($content)".PHP_EOL;
+                    }
+
+                    $buffer = '';
+                }
+            }//end if
+
+            // Process strings.
+            if ($inComment === '' && isset($this->stringTokens[$char]) === true) {
+                if ($inString === $char) {
+                    // This could be the end of the string, but make sure it
+                    // is not escaped first.
+                    $escapes = 0;
+                    for ($x = ($i - 1); $x >= 0; $x--) {
+                        if ($chars[$x] !== '\\') {
+                            break;
+                        }
+
+                        $escapes++;
+                    }
+
+                    if ($escapes === 0 || ($escapes % 2) === 0) {
+                        // There is an even number escape chars,
+                        // so this is not escaped, it is the end of the string.
+                        $tokens[] = array(
+                                     'code'    => T_CONSTANT_ENCAPSED_STRING,
+                                     'type'    => 'T_CONSTANT_ENCAPSED_STRING',
+                                     'content' => str_replace("\n", $eolChar, $buffer).$char,
+                                    );
+
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo "\t\t* found end of string *".PHP_EOL;
+                            $content = PHP_CodeSniffer::prepareForOutput($buffer.$char);
+                            echo "\t=> Added token T_CONSTANT_ENCAPSED_STRING ($content)".PHP_EOL;
+                        }
+
+                        $buffer          = '';
+                        $preStringBuffer = '';
+                        $inString        = '';
+                        $stringChar      = null;
+                        continue;
+                    }//end if
+                } else if ($inString === '') {
+                    $inString        = $char;
+                    $stringChar      = $i;
+                    $preStringBuffer = $buffer;
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* looking for string closer *".PHP_EOL;
+                    }
+                }//end if
+            }//end if
+
+            if ($inString !== '' && $char === "\n") {
+                // Unless this newline character is escaped, the string did not
+                // end before the end of the line, which means it probably
+                // wasn't a string at all (maybe a regex).
+                if ($chars[($i - 1)] !== '\\') {
+                    $i      = $stringChar;
+                    $buffer = $preStringBuffer;
+                    $preStringBuffer = '';
+                    $inString        = '';
+                    $stringChar      = null;
+                    $char            = $chars[$i];
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* found newline before end of string, bailing *".PHP_EOL;
+                    }
+                }
+            }
+
+            $buffer .= $char;
+
+            // We don't look for special tokens inside strings,
+            // so if we are in a string, we can continue here now
+            // that the current char is in the buffer.
+            if ($inString !== '') {
+                continue;
+            }
+
+            // Special case for T_DIVIDE which can actually be
+            // the start of a regular expression.
+            if ($buffer === $char && $char === '/' && $chars[($i + 1)] !== '*') {
+                $regex = $this->getRegexToken(
+                    $i,
+                    $string,
+                    $chars,
+                    $tokens,
+                    $eolChar
+                );
+
+                if ($regex !== null) {
+                    $tokens[] = array(
+                                 'code'    => T_REGULAR_EXPRESSION,
+                                 'type'    => 'T_REGULAR_EXPRESSION',
+                                 'content' => $regex['content'],
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput($regex['content']);
+                        echo "\t=> Added token T_REGULAR_EXPRESSION ($content)".PHP_EOL;
+                    }
+
+                    $i           = $regex['end'];
+                    $buffer      = '';
+                    $cleanBuffer = false;
+                    continue;
+                }//end if
+            }//end if
+
+            // Check for known tokens, but ignore tokens found that are not at
+            // the end of a string, like FOR and this.FORmat.
+            if (isset($this->tokenValues[strtolower($buffer)]) === true
+                && (preg_match('|[a-zA-z0-9_]|', $char) === 0
+                || isset($chars[($i + 1)]) === false
+                || preg_match('|[a-zA-z0-9_]|', $chars[($i + 1)]) === 0)
+            ) {
+                $matchedToken    = false;
+                $lookAheadLength = ($maxTokenLength - strlen($buffer));
+
+                if ($lookAheadLength > 0) {
+                    // The buffer contains a token type, but we need
+                    // to look ahead at the next chars to see if this is
+                    // actually part of a larger token. For example,
+                    // FOR and FOREACH.
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* buffer possibly contains token, looking ahead $lookAheadLength chars *".PHP_EOL;
+                    }
+
+                    $charBuffer = $buffer;
+                    for ($x = 1; $x <= $lookAheadLength; $x++) {
+                        if (isset($chars[($i + $x)]) === false) {
+                            break;
+                        }
+
+                        $charBuffer .= $chars[($i + $x)];
+
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $content = PHP_CodeSniffer::prepareForOutput($charBuffer);
+                            echo "\t\t=> Looking ahead $x chars => $content".PHP_EOL;
+                        }
+
+                        if (isset($this->tokenValues[strtolower($charBuffer)]) === true) {
+                            // We've found something larger that matches
+                            // so we can ignore this char. Except for 1 very specific
+                            // case where a comment like /**/ needs to tokenize as
+                            // T_COMMENT and not T_DOC_COMMENT.
+                            $oldType = $this->tokenValues[strtolower($buffer)];
+                            $newType = $this->tokenValues[strtolower($charBuffer)];
+                            if ($oldType === 'T_COMMENT'
+                                && $newType === 'T_DOC_COMMENT'
+                                && $chars[($i + $x + 1)] === '/'
+                            ) {
+                                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                    echo "\t\t* look ahead ignored T_DOC_COMMENT, continuing *".PHP_EOL;
+                                }
+                            } else {
+                                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                    echo "\t\t* look ahead found more specific token ($newType), ignoring $i *".PHP_EOL;
+                                }
+
+                                $matchedToken = true;
+                                break;
+                            }
+                        }//end if
+                    }//end for
+                }//end if
+
+                if ($matchedToken === false) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1 && $lookAheadLength > 0) {
+                        echo "\t\t* look ahead found nothing *".PHP_EOL;
+                    }
+
+                    $value    = $this->tokenValues[strtolower($buffer)];
+                    $tokens[] = array(
+                                 'code'    => constant($value),
+                                 'type'    => $value,
+                                 'content' => $buffer,
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput($buffer);
+                        echo "\t=> Added token $value ($content)".PHP_EOL;
+                    }
+
+                    $cleanBuffer = true;
+                }//end if
+            } else if (isset($this->tokenValues[strtolower($char)]) === true) {
+                // No matter what token we end up using, we don't
+                // need the content in the buffer any more because we have
+                // found a valid token.
+                $newContent = substr(str_replace("\n", $eolChar, $buffer), 0, -1);
+                if ($newContent !== '') {
+                    $tokens[] = array(
+                                 'code'    => T_STRING,
+                                 'type'    => 'T_STRING',
+                                 'content' => $newContent,
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput(substr($buffer, 0, -1));
+                        echo "\t=> Added token T_STRING ($content)".PHP_EOL;
+                    }
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\t* char is token, looking ahead ".($maxTokenLength - 1).' chars *'.PHP_EOL;
+                }
+
+                // The char is a token type, but we need to look ahead at the
+                // next chars to see if this is actually part of a larger token.
+                // For example, = and ===.
+                $charBuffer   = $char;
+                $matchedToken = false;
+                for ($x = 1; $x <= $maxTokenLength; $x++) {
+                    if (isset($chars[($i + $x)]) === false) {
+                        break;
+                    }
+
+                    $charBuffer .= $chars[($i + $x)];
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput($charBuffer);
+                        echo "\t\t=> Looking ahead $x chars => $content".PHP_EOL;
+                    }
+
+                    if (isset($this->tokenValues[strtolower($charBuffer)]) === true) {
+                        // We've found something larger that matches
+                        // so we can ignore this char.
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type = $this->tokenValues[strtolower($charBuffer)];
+                            echo "\t\t* look ahead found more specific token ($type), ignoring $i *".PHP_EOL;
+                        }
+
+                        $matchedToken = true;
+                        break;
+                    }
+                }//end for
+
+                if ($matchedToken === false) {
+                    $value    = $this->tokenValues[strtolower($char)];
+                    $tokens[] = array(
+                                 'code'    => constant($value),
+                                 'type'    => $value,
+                                 'content' => $char,
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* look ahead found nothing *".PHP_EOL;
+                        $content = PHP_CodeSniffer::prepareForOutput($char);
+                        echo "\t=> Added token $value ($content)".PHP_EOL;
+                    }
+
+                    $cleanBuffer = true;
+                } else {
+                    $buffer = $char;
+                }//end if
+            }//end if
+
+            // Keep track of content inside comments.
+            if ($inComment === ''
+                && array_key_exists($buffer, $this->commentTokens) === true
+            ) {
+                // This is not really a comment if the content
+                // looks like \// (i.e., it is escaped).
+                if (isset($chars[($i - 2)]) === true && $chars[($i - 2)] === '\\') {
+                    $lastToken   = array_pop($tokens);
+                    $lastContent = $lastToken['content'];
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $value   = $this->tokenValues[strtolower($lastContent)];
+                        $content = PHP_CodeSniffer::prepareForOutput($lastContent);
+                        echo "\t=> Removed token $value ($content)".PHP_EOL;
+                    }
+
+                    $lastChars    = str_split($lastContent);
+                    $lastNumChars = count($lastChars);
+                    for ($x = 0; $x < $lastNumChars; $x++) {
+                        $lastChar = $lastChars[$x];
+                        $value    = $this->tokenValues[strtolower($lastChar)];
+                        $tokens[] = array(
+                                     'code'    => constant($value),
+                                     'type'    => $value,
+                                     'content' => $lastChar,
+                                    );
+
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $content = PHP_CodeSniffer::prepareForOutput($lastChar);
+                            echo "\t=> Added token $value ($content)".PHP_EOL;
+                        }
+                    }
+                } else {
+                    // We have started a comment.
+                    $inComment = $buffer;
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* looking for end of comment *".PHP_EOL;
+                    }
+                }//end if
+            } else if ($inComment !== '') {
+                if ($this->commentTokens[$inComment] === null) {
+                    // Comment ends at the next newline.
+                    if (strpos($buffer, "\n") !== false) {
+                        $inComment = '';
+                    }
+                } else {
+                    if ($this->commentTokens[$inComment] === $buffer) {
+                        $inComment = '';
+                    }
+                }
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    if ($inComment === '') {
+                        echo "\t\t* found end of comment *".PHP_EOL;
+                    }
+                }
+
+                if ($inComment === '' && $cleanBuffer === false) {
+                    $tokens[] = array(
+                                 'code'    => T_STRING,
+                                 'type'    => 'T_STRING',
+                                 'content' => str_replace("\n", $eolChar, $buffer),
+                                );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $content = PHP_CodeSniffer::prepareForOutput($buffer);
+                        echo "\t=> Added token T_STRING ($content)".PHP_EOL;
+                    }
+
+                    $buffer = '';
+                }
+            }//end if
+
+            if ($cleanBuffer === true) {
+                $buffer      = '';
+                $cleanBuffer = false;
+            }
+        }//end for
+
+        if (empty($buffer) === false) {
+            // Buffer contains whitespace from the end of the file.
+            $tokens[] = array(
+                         'code'    => T_WHITESPACE,
+                         'type'    => 'T_WHITESPACE',
+                         'content' => str_replace("\n", $eolChar, $buffer),
+                        );
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $content = PHP_CodeSniffer::prepareForOutput($buffer);
+                echo "\t=> Added token T_WHITESPACE ($content)".PHP_EOL;
+            }
+        }
+
+        $tokens[] = array(
+                     'code'    => T_CLOSE_TAG,
+                     'type'    => 'T_CLOSE_TAG',
+                     'content' => '',
+                    );
+
+        /*
+            Now that we have done some basic tokenizing, we need to
+            modify the tokens to join some together and split some apart
+            so they match what the PHP tokenizer does.
+        */
+
+        $finalTokens = array();
+        $newStackPtr = 0;
+        $numTokens   = count($tokens);
+        for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) {
+            $token = $tokens[$stackPtr];
+
+            /*
+                Look for comments and join the tokens together.
+            */
+
+            if ($token['code'] === T_COMMENT || $token['code'] === T_DOC_COMMENT) {
+                $newContent   = '';
+                $tokenContent = $token['content'];
+                $endContent   = $this->commentTokens[$tokenContent];
+                while ($tokenContent !== $endContent) {
+                    if ($endContent === null
+                        && strpos($tokenContent, $eolChar) !== false
+                    ) {
+                        // A null end token means the comment ends at the end of
+                        // the line so we look for newlines and split the token.
+                        $tokens[$stackPtr]['content'] = substr(
+                            $tokenContent,
+                            (strpos($tokenContent, $eolChar) + strlen($eolChar))
+                        );
+
+                        $tokenContent = substr(
+                            $tokenContent,
+                            0,
+                            (strpos($tokenContent, $eolChar) + strlen($eolChar))
+                        );
+
+                        // If the substr failed, skip the token as the content
+                        // will now be blank.
+                        if ($tokens[$stackPtr]['content'] !== false
+                            && $tokens[$stackPtr]['content'] !== ''
+                        ) {
+                            $stackPtr--;
+                        }
+
+                        break;
+                    }//end if
+
+                    $stackPtr++;
+                    $newContent .= $tokenContent;
+                    if (isset($tokens[$stackPtr]) === false) {
+                        break;
+                    }
+
+                    $tokenContent = $tokens[$stackPtr]['content'];
+                }//end while
+
+                if ($token['code'] === T_DOC_COMMENT) {
+                    $commentTokens = $commentTokenizer->tokenizeString($newContent.$tokenContent, $eolChar, $newStackPtr);
+                    foreach ($commentTokens as $commentToken) {
+                        $finalTokens[$newStackPtr] = $commentToken;
+                        $newStackPtr++;
+                    }
+
+                    continue;
+                } else {
+                    // Save the new content in the current token so
+                    // the code below can chop it up on newlines.
+                    $token['content'] = $newContent.$tokenContent;
+                }
+            }//end if
+
+            /*
+                If this token has newlines in its content, split each line up
+                and create a new token for each line. We do this so it's easier
+                to ascertain where errors occur on a line.
+                Note that $token[1] is the token's content.
+            */
+
+            if (strpos($token['content'], $eolChar) !== false) {
+                $tokenLines = explode($eolChar, $token['content']);
+                $numLines   = count($tokenLines);
+
+                for ($i = 0; $i < $numLines; $i++) {
+                    $newToken['content'] = $tokenLines[$i];
+                    if ($i === ($numLines - 1)) {
+                        if ($tokenLines[$i] === '') {
+                            break;
+                        }
+                    } else {
+                        $newToken['content'] .= $eolChar;
+                    }
+
+                    $newToken['type']          = $token['type'];
+                    $newToken['code']          = $token['code'];
+                    $finalTokens[$newStackPtr] = $newToken;
+                    $newStackPtr++;
+                }
+            } else {
+                $finalTokens[$newStackPtr] = $token;
+                $newStackPtr++;
+            }//end if
+
+            // Convert numbers, including decimals.
+            if ($token['code'] === T_STRING
+                || $token['code'] === T_OBJECT_OPERATOR
+            ) {
+                $newContent  = '';
+                $oldStackPtr = $stackPtr;
+                while (preg_match('|^[0-9\.]+$|', $tokens[$stackPtr]['content']) !== 0) {
+                    $newContent .= $tokens[$stackPtr]['content'];
+                    $stackPtr++;
+                }
+
+                if ($newContent !== '' && $newContent !== '.') {
+                    $finalTokens[($newStackPtr - 1)]['content'] = $newContent;
+                    if (ctype_digit($newContent) === true) {
+                        $finalTokens[($newStackPtr - 1)]['code']
+                            = constant('T_LNUMBER');
+                        $finalTokens[($newStackPtr - 1)]['type'] = 'T_LNUMBER';
+                    } else {
+                        $finalTokens[($newStackPtr - 1)]['code']
+                            = constant('T_DNUMBER');
+                        $finalTokens[($newStackPtr - 1)]['type'] = 'T_DNUMBER';
+                    }
+
+                    $stackPtr--;
+                } else {
+                    $stackPtr = $oldStackPtr;
+                }
+            }//end if
+
+            // Convert the token after an object operator into a string, in most cases.
+            if ($token['code'] === T_OBJECT_OPERATOR) {
+                for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$i]['code']]) === true) {
+                        continue;
+                    }
+
+                    if ($tokens[$i]['code'] !== T_PROTOTYPE
+                        && $tokens[$i]['code'] !== T_LNUMBER
+                        && $tokens[$i]['code'] !== T_DNUMBER
+                    ) {
+                        $tokens[$i]['code'] = T_STRING;
+                        $tokens[$i]['type'] = 'T_STRING';
+                    }
+
+                    break;
+                }
+            }
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END TOKENIZING ***".PHP_EOL;
+        }
+
+        return $finalTokens;
+
+    }//end tokenizeString()
+
+
+    /**
+     * Tokenizes a regular expression if one is found.
+     *
+     * If a regular expression is not found, NULL is returned.
+     *
+     * @param string $char    The index of the possible regex start character.
+     * @param string $string  The complete content of the string being tokenized.
+     * @param string $chars   An array of characters being tokenized.
+     * @param string $tokens  The current array of tokens found in the string.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    public function getRegexToken($char, $string, $chars, $tokens, $eolChar)
+    {
+        $beforeTokens = array(
+                         T_EQUAL               => true,
+                         T_OPEN_PARENTHESIS    => true,
+                         T_OPEN_SQUARE_BRACKET => true,
+                         T_RETURN              => true,
+                         T_BOOLEAN_OR          => true,
+                         T_BOOLEAN_AND         => true,
+                         T_BITWISE_OR          => true,
+                         T_BITWISE_AND         => true,
+                         T_COMMA               => true,
+                         T_COLON               => true,
+                         T_TYPEOF              => true,
+                        );
+
+        $afterTokens = array(
+                        ','      => true,
+                        ')'      => true,
+                        ']'      => true,
+                        ';'      => true,
+                        ' '      => true,
+                        '.'      => true,
+                        $eolChar => true,
+                       );
+
+        // Find the last non-whitespace token that was added
+        // to the tokens array.
+        $numTokens = count($tokens);
+        for ($prev = ($numTokens - 1); $prev >= 0; $prev--) {
+            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$prev]['code']]) === false) {
+                break;
+            }
+        }
+
+        if (isset($beforeTokens[$tokens[$prev]['code']]) === false) {
+            return null;
+        }
+
+        // This is probably a regular expression, so look for the end of it.
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t* token possibly starts a regular expression *".PHP_EOL;
+        }
+
+        $numChars = count($chars);
+        for ($next = ($char + 1); $next < $numChars; $next++) {
+            if ($chars[$next] === '/') {
+                // Just make sure this is not escaped first.
+                if ($chars[($next - 1)] !== '\\') {
+                    // In the simple form: /.../ so we found the end.
+                    break;
+                } else if ($chars[($next - 2)] === '\\') {
+                    // In the form: /...\\/ so we found the end.
+                    break;
+                }
+            } else {
+                $possibleEolChar = substr($string, $next, strlen($eolChar));
+                if ($possibleEolChar === $eolChar) {
+                    // This is the last token on the line and regular
+                    // expressions need to be defined on a single line,
+                    // so this is not a regular expression.
+                    break;
+                }
+            }
+        }
+
+        if ($chars[$next] !== '/') {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo "\t* could not find end of regular expression *".PHP_EOL;
+            }
+
+            return null;
+        }
+
+        while (preg_match('|[a-zA-Z]|', $chars[($next + 1)]) !== 0) {
+            // The token directly after the end of the regex can
+            // be modifiers like global and case insensitive
+            // (.e.g, /pattern/gi).
+            $next++;
+        }
+
+        $regexEnd = $next;
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t* found end of regular expression at token $regexEnd *".PHP_EOL;
+        }
+
+        for ($next = ($next + 1); $next < $numChars; $next++) {
+            if ($chars[$next] !== ' ') {
+                break;
+            } else {
+                $possibleEolChar = substr($string, $next, strlen($eolChar));
+                if ($possibleEolChar === $eolChar) {
+                    // This is the last token on the line.
+                    break;
+                }
+            }
+        }
+
+        if (isset($afterTokens[$chars[$next]]) === false) {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo "\t* tokens after regular expression do not look correct *".PHP_EOL;
+            }
+
+            return null;
+        }
+
+        // This is a regular expression, so join all the tokens together.
+        $content = '';
+        for ($x = $char; $x <= $regexEnd; $x++) {
+            $content .= $chars[$x];
+        }
+
+        $token = array(
+                  'start'   => $char,
+                  'end'     => $regexEnd,
+                  'content' => $content,
+                 );
+
+        return $token;
+
+    }//end getRegexToken()
+
+
+    /**
+     * Performs additional processing after main tokenizing.
+     *
+     * This additional processing looks for properties, closures, labels and objects.
+     *
+     * @param array  $tokens  The array of tokens to process.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    public function processAdditional(&$tokens, $eolChar)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START ADDITIONAL JS PROCESSING ***".PHP_EOL;
+        }
+
+        $numTokens  = count($tokens);
+        $classStack = array();
+
+        for ($i = 0; $i < $numTokens; $i++) {
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $type    = $tokens[$i]['type'];
+                $content = PHP_CodeSniffer::prepareForOutput($tokens[$i]['content']);
+
+                echo str_repeat("\t", count($classStack));
+                echo "\tProcess token $i: $type => $content".PHP_EOL;
+            }
+
+            // Looking for functions that are actually closures.
+            if ($tokens[$i]['code'] === T_FUNCTION && isset($tokens[$i]['scope_opener']) === true) {
+                for ($x = ($i + 1); $x < $numTokens; $x++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        break;
+                    }
+                }
+
+                if ($tokens[$x]['code'] === T_OPEN_PARENTHESIS) {
+                    $tokens[$i]['code'] = T_CLOSURE;
+                    $tokens[$i]['type'] = 'T_CLOSURE';
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$i]['line'];
+                        echo str_repeat("\t", count($classStack));
+                        echo "\t* token $i on line $line changed from T_FUNCTION to T_CLOSURE".PHP_EOL;
+                    }
+
+                    for ($x = ($tokens[$i]['scope_opener'] + 1); $x < $tokens[$i]['scope_closer']; $x++) {
+                        if (isset($tokens[$x]['conditions'][$i]) === false) {
+                            continue;
+                        }
+
+                        $tokens[$x]['conditions'][$i] = T_CLOSURE;
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type = $tokens[$x]['type'];
+                            echo str_repeat("\t", count($classStack));
+                            echo "\t\t* cleaned $x ($type) *".PHP_EOL;
+                        }
+                    }
+                }//end if
+
+                continue;
+            } else if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET
+                && isset($tokens[$i]['scope_condition']) === false
+            ) {
+                $classStack[] = $i;
+
+                $closer = $tokens[$i]['bracket_closer'];
+                $tokens[$i]['code']      = T_OBJECT;
+                $tokens[$i]['type']      = 'T_OBJECT';
+                $tokens[$closer]['code'] = T_CLOSE_OBJECT;
+                $tokens[$closer]['type'] = 'T_CLOSE_OBJECT';
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo str_repeat("\t", count($classStack));
+                    echo "\t* token $i converted from T_OPEN_CURLY_BRACKET to T_OBJECT *".PHP_EOL;
+                    echo str_repeat("\t", count($classStack));
+                    echo "\t* token $closer converted from T_CLOSE_CURLY_BRACKET to T_CLOSE_OBJECT *".PHP_EOL;
+                }
+
+                for ($x = ($i + 1); $x < $closer; $x++) {
+                    $tokens[$x]['conditions'][$i] = T_OBJECT;
+                    ksort($tokens[$x]['conditions'], SORT_NUMERIC);
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $type = $tokens[$x]['type'];
+                        echo str_repeat("\t", count($classStack));
+                        echo "\t\t* added T_OBJECT condition to $x ($type) *".PHP_EOL;
+                    }
+                }
+            } else if ($tokens[$i]['code'] === T_CLOSE_OBJECT) {
+                $opener = array_pop($classStack);
+            } else if ($tokens[$i]['code'] === T_COLON) {
+                // If it is a scope opener, it belongs to a
+                // DEFAULT or CASE statement.
+                if (isset($tokens[$i]['scope_condition']) === true) {
+                    continue;
+                }
+
+                // Make sure this is not part of an inline IF statement.
+                for ($x = ($i - 1); $x >= 0; $x--) {
+                    if ($tokens[$x]['code'] === T_INLINE_THEN) {
+                        $tokens[$i]['code'] = T_INLINE_ELSE;
+                        $tokens[$i]['type'] = 'T_INLINE_ELSE';
+
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            echo str_repeat("\t", count($classStack));
+                            echo "\t* token $i converted from T_COLON to T_INLINE_THEN *".PHP_EOL;
+                        }
+
+                        continue(2);
+                    } else if ($tokens[$x]['line'] < $tokens[$i]['line']) {
+                        break;
+                    }
+                }
+
+                // The string to the left of the colon is either a property or label.
+                for ($label = ($i - 1); $label >= 0; $label--) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$label]['code']]) === false) {
+                        break;
+                    }
+                }
+
+                if ($tokens[$label]['code'] !== T_STRING
+                    && $tokens[$label]['code'] !== T_CONSTANT_ENCAPSED_STRING
+                ) {
+                    continue;
+                }
+
+                if (empty($classStack) === false) {
+                    $tokens[$label]['code'] = T_PROPERTY;
+                    $tokens[$label]['type'] = 'T_PROPERTY';
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", count($classStack));
+                        echo "\t* token $label converted from T_STRING to T_PROPERTY *".PHP_EOL;
+                    }
+                } else {
+                    $tokens[$label]['code'] = T_LABEL;
+                    $tokens[$label]['type'] = 'T_LABEL';
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo str_repeat("\t", count($classStack));
+                        echo "\t* token $label converted from T_STRING to T_LABEL *".PHP_EOL;
+                    }
+                }//end if
+            }//end if
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END ADDITIONAL JS PROCESSING ***".PHP_EOL;
+        }
+
+    }//end processAdditional()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/PHP.php	(revision 5534)
@@ -0,0 +1,1504 @@
+<?php
+/**
+ * Tokenizes PHP code.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+/**
+ * Tokenizes PHP code.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_Tokenizers_PHP
+{
+
+    /**
+     * A list of tokens that are allowed to open a scope.
+     *
+     * This array also contains information about what kind of token the scope
+     * opener uses to open and close the scope, if the token strictly requires
+     * an opener, if the token can share a scope closer, and who it can be shared
+     * with. An example of a token that shares a scope closer is a CASE scope.
+     *
+     * @var array
+     */
+    public $scopeOpeners = array(
+                            T_IF            => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDIF               => T_ENDIF,
+                                                             T_ELSE                => T_ELSE,
+                                                             T_ELSEIF              => T_ELSEIF,
+                                                            ),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(
+                                                             T_ELSE   => T_ELSE,
+                                                             T_ELSEIF => T_ELSEIF,
+                                                            ),
+                                               ),
+                            T_TRY           => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_CATCH         => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_FINALLY       => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_ELSE          => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDIF               => T_ENDIF,
+                                                            ),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(
+                                                             T_IF     => T_IF,
+                                                             T_ELSEIF => T_ELSEIF,
+                                                            ),
+                                               ),
+                            T_ELSEIF        => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDIF               => T_ENDIF,
+                                                             T_ELSE                => T_ELSE,
+                                                             T_ELSEIF              => T_ELSEIF,
+                                                            ),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(
+                                                             T_IF   => T_IF,
+                                                             T_ELSE => T_ELSE,
+                                                            ),
+                                               ),
+                            T_FOR           => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDFOR              => T_ENDFOR,
+                                                            ),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_FOREACH       => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDFOREACH          => T_ENDFOREACH,
+                                                            ),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_INTERFACE     => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_FUNCTION      => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_CLASS         => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_TRAIT         => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_USE           => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_DECLARE       => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_NAMESPACE     => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_WHILE         => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDWHILE            => T_ENDWHILE,
+                                                            ),
+                                                'strict' => false,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_DO            => array(
+                                                'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
+                                                'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_SWITCH        => array(
+                                                'start'  => array(
+                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
+                                                             T_COLON              => T_COLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                                                             T_ENDSWITCH           => T_ENDSWITCH,
+                                                            ),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                            T_CASE          => array(
+                                                'start'  => array(
+                                                             T_COLON     => T_COLON,
+                                                             T_SEMICOLON => T_SEMICOLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_BREAK    => T_BREAK,
+                                                             T_RETURN   => T_RETURN,
+                                                             T_CONTINUE => T_CONTINUE,
+                                                             T_THROW    => T_THROW,
+                                                             T_EXIT     => T_EXIT,
+                                                            ),
+                                                'strict' => true,
+                                                'shared' => true,
+                                                'with'   => array(
+                                                             T_DEFAULT => T_DEFAULT,
+                                                             T_CASE    => T_CASE,
+                                                             T_SWITCH  => T_SWITCH,
+                                                            ),
+                                               ),
+                            T_DEFAULT       => array(
+                                                'start'  => array(
+                                                             T_COLON     => T_COLON,
+                                                             T_SEMICOLON => T_SEMICOLON,
+                                                            ),
+                                                'end'    => array(
+                                                             T_BREAK    => T_BREAK,
+                                                             T_RETURN   => T_RETURN,
+                                                             T_CONTINUE => T_CONTINUE,
+                                                             T_THROW    => T_THROW,
+                                                             T_EXIT     => T_EXIT,
+                                                            ),
+                                                'strict' => true,
+                                                'shared' => true,
+                                                'with'   => array(
+                                                             T_CASE   => T_CASE,
+                                                             T_SWITCH => T_SWITCH,
+                                                            ),
+                                               ),
+                            T_START_HEREDOC => array(
+                                                'start'  => array(T_START_HEREDOC => T_START_HEREDOC),
+                                                'end'    => array(T_END_HEREDOC => T_END_HEREDOC),
+                                                'strict' => true,
+                                                'shared' => false,
+                                                'with'   => array(),
+                                               ),
+                           );
+
+    /**
+     * A list of tokens that end the scope.
+     *
+     * This array is just a unique collection of the end tokens
+     * from the _scopeOpeners array. The data is duplicated here to
+     * save time during parsing of the file.
+     *
+     * @var array
+     */
+    public $endScopeTokens = array(
+                              T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
+                              T_ENDIF               => T_ENDIF,
+                              T_ENDFOR              => T_ENDFOR,
+                              T_ENDFOREACH          => T_ENDFOREACH,
+                              T_ENDWHILE            => T_ENDWHILE,
+                              T_ENDSWITCH           => T_ENDSWITCH,
+                              T_BREAK               => T_BREAK,
+                              T_END_HEREDOC         => T_END_HEREDOC,
+                             );
+
+    /**
+     * A cache of different token types, resolved into arrays.
+     *
+     * @var array()
+     * @see standardiseToken()
+     */
+    private static $_resolveTokenCache = array();
+
+
+    /**
+     * Creates an array of tokens when given some PHP code.
+     *
+     * Starts by using token_get_all() but does a lot of extra processing
+     * to insert information about the context of the token.
+     *
+     * @param string $string  The string to tokenize.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return array
+     */
+    public function tokenizeString($string, $eolChar='\n')
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START PHP TOKENIZING ***".PHP_EOL;
+            $isWin = false;
+            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+                $isWin = true;
+            }
+        }
+
+        $tokens      = @token_get_all($string);
+        $finalTokens = array();
+
+        $newStackPtr       = 0;
+        $numTokens         = count($tokens);
+        $lastNotEmptyToken = 0;
+
+        $insideInlineIf = array();
+
+        $commentTokenizer = new PHP_CodeSniffer_Tokenizers_Comment();
+
+        for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) {
+            $token        = (array) $tokens[$stackPtr];
+            $tokenIsArray = isset($token[1]);
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                if ($tokenIsArray === true) {
+                    $type    = token_name($token[0]);
+                    $content = PHP_CodeSniffer::prepareForOutput($token[1]);
+                } else {
+                    $newToken = self::resolveSimpleToken($token[0]);
+                    $type     = $newToken['type'];
+                    $content  = PHP_CodeSniffer::prepareForOutput($token[0]);
+                }
+
+                echo "\tProcess token ";
+                if ($tokenIsArray === true) {
+                    echo "[$stackPtr]";
+                } else {
+                    echo " $stackPtr ";
+                }
+
+                echo ": $type => $content";
+            }//end if
+
+            if ($newStackPtr > 0 && $finalTokens[($newStackPtr - 1)]['code'] !== T_WHITESPACE) {
+                $lastNotEmptyToken = ($newStackPtr - 1);
+            }
+
+            /*
+                If we are using \r\n newline characters, the \r and \n are sometimes
+                split over two tokens. This normally occurs after comments. We need
+                to merge these two characters together so that our line endings are
+                consistent for all lines.
+            */
+
+            if ($tokenIsArray === true && substr($token[1], -1) === "\r") {
+                if (isset($tokens[($stackPtr + 1)]) === true
+                    && is_array($tokens[($stackPtr + 1)]) === true
+                    && $tokens[($stackPtr + 1)][1][0] === "\n"
+                ) {
+                    $token[1] .= "\n";
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        if ($isWin === true) {
+                            echo '\n';
+                        } else {
+                            echo "\033[30;1m\\n\033[0m";
+                        }
+                    }
+
+                    if ($tokens[($stackPtr + 1)][1] === "\n") {
+                        // This token's content has been merged into the previous,
+                        // so we can skip it.
+                        $tokens[($stackPtr + 1)] = '';
+                    } else {
+                        $tokens[($stackPtr + 1)][1] = substr($tokens[($stackPtr + 1)][1], 1);
+                    }
+                }
+            }//end if
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                echo PHP_EOL;
+            }
+
+            /*
+                Parse doc blocks into something that can be easily iterated over.
+            */
+
+            if ($tokenIsArray === true && $token[0] === T_DOC_COMMENT) {
+                $commentTokens = $commentTokenizer->tokenizeString($token[1], $eolChar, $newStackPtr);
+                foreach ($commentTokens as $commentToken) {
+                    $finalTokens[$newStackPtr] = $commentToken;
+                    $newStackPtr++;
+                }
+
+                continue;
+            }
+
+            /*
+                If this is a double quoted string, PHP will tokenize the whole
+                thing which causes problems with the scope map when braces are
+                within the string. So we need to merge the tokens together to
+                provide a single string.
+            */
+
+            if ($tokenIsArray === false && ($token[0] === '"' || $token[0] === 'b"')) {
+                // Binary casts need a special token.
+                if ($token[0] === 'b"') {
+                    $finalTokens[$newStackPtr] = array(
+                                                  'code'    => T_BINARY_CAST,
+                                                  'type'    => 'T_BINARY_CAST',
+                                                  'content' => 'b',
+                                                 );
+                    $newStackPtr++;
+                }
+
+                $tokenContent = '"';
+                $nestedVars   = array();
+                for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {
+                    $subToken        = (array) $tokens[$i];
+                    $subTokenIsArray = isset($subToken[1]);
+
+                    if ($subTokenIsArray === true) {
+                        $tokenContent .= $subToken[1];
+                        if ($subToken[1] === '{'
+                            && $subToken[0] !== T_ENCAPSED_AND_WHITESPACE
+                        ) {
+                            $nestedVars[] = $i;
+                        }
+                    } else {
+                        $tokenContent .= $subToken[0];
+                        if ($subToken[0] === '}') {
+                            array_pop($nestedVars);
+                        }
+                    }
+
+                    if ($subTokenIsArray === false
+                        && $subToken[0] === '"'
+                        && empty($nestedVars) === true
+                    ) {
+                        // We found the other end of the double quoted string.
+                        break;
+                    }
+                }//end for
+
+                $stackPtr = $i;
+
+                // Convert each line within the double quoted string to a
+                // new token, so it conforms with other multiple line tokens.
+                $tokenLines = explode($eolChar, $tokenContent);
+                $numLines   = count($tokenLines);
+                $newToken   = array();
+
+                for ($j = 0; $j < $numLines; $j++) {
+                    $newToken['content'] = $tokenLines[$j];
+                    if ($j === ($numLines - 1)) {
+                        if ($tokenLines[$j] === '') {
+                            break;
+                        }
+                    } else {
+                        $newToken['content'] .= $eolChar;
+                    }
+
+                    $newToken['code']          = T_DOUBLE_QUOTED_STRING;
+                    $newToken['type']          = 'T_DOUBLE_QUOTED_STRING';
+                    $finalTokens[$newStackPtr] = $newToken;
+                    $newStackPtr++;
+                }
+
+                // Continue, as we're done with this token.
+                continue;
+            }//end if
+
+            /*
+                If this is a heredoc, PHP will tokenize the whole
+                thing which causes problems when heredocs don't
+                contain real PHP code, which is almost never.
+                We want to leave the start and end heredoc tokens
+                alone though.
+            */
+
+            if ($tokenIsArray === true && $token[0] === T_START_HEREDOC) {
+                // Add the start heredoc token to the final array.
+                $finalTokens[$newStackPtr] = self::standardiseToken($token);
+
+                // Check if this is actually a nowdoc and use a different token
+                // to help the sniffs.
+                $nowdoc = false;
+                if ($token[1][3] === "'") {
+                    $finalTokens[$newStackPtr]['code'] = T_START_NOWDOC;
+                    $finalTokens[$newStackPtr]['type'] = 'T_START_NOWDOC';
+                    $nowdoc = true;
+                }
+
+                $newStackPtr++;
+
+                $tokenContent = '';
+                for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {
+                    $subTokenIsArray = is_array($tokens[$i]);
+                    if ($subTokenIsArray === true
+                        && $tokens[$i][0] === T_END_HEREDOC
+                    ) {
+                        // We found the other end of the heredoc.
+                        break;
+                    }
+
+                    if ($subTokenIsArray === true) {
+                        $tokenContent .= $tokens[$i][1];
+                    } else {
+                        $tokenContent .= $tokens[$i];
+                    }
+                }
+
+                $stackPtr = $i;
+
+                // Convert each line within the heredoc to a
+                // new token, so it conforms with other multiple line tokens.
+                $tokenLines = explode($eolChar, $tokenContent);
+                $numLines   = count($tokenLines);
+                $newToken   = array();
+
+                for ($j = 0; $j < $numLines; $j++) {
+                    $newToken['content'] = $tokenLines[$j];
+                    if ($j === ($numLines - 1)) {
+                        if ($tokenLines[$j] === '') {
+                            break;
+                        }
+                    } else {
+                        $newToken['content'] .= $eolChar;
+                    }
+
+                    if ($nowdoc === true) {
+                        $newToken['code'] = T_NOWDOC;
+                        $newToken['type'] = 'T_NOWDOC';
+                    } else {
+                        $newToken['code'] = T_HEREDOC;
+                        $newToken['type'] = 'T_HEREDOC';
+                    }
+
+                    $finalTokens[$newStackPtr] = $newToken;
+                    $newStackPtr++;
+                }//end for
+
+                // Add the end heredoc token to the final array.
+                $finalTokens[$newStackPtr] = self::standardiseToken($tokens[$stackPtr]);
+
+                if ($nowdoc === true) {
+                    $finalTokens[$newStackPtr]['code'] = T_END_NOWDOC;
+                    $finalTokens[$newStackPtr]['type'] = 'T_END_NOWDOC';
+                    $nowdoc = true;
+                }
+
+                $newStackPtr++;
+
+                // Continue, as we're done with this token.
+                continue;
+            }//end if
+
+            /*
+                Before PHP 5.6, the ... operator was tokenized as three
+                T_STRING_CONCAT tokens in a row. So look for and combine
+                these tokens in earlier versions.
+            */
+
+            if ($tokenIsArray === false
+                && $token[0] === '.'
+                && isset($tokens[($stackPtr + 1)]) === true
+                && isset($tokens[($stackPtr + 2)]) === true
+                && $tokens[($stackPtr + 1)] === '.'
+                && $tokens[($stackPtr + 2)] === '.'
+            ) {
+                $newToken            = array();
+                $newToken['code']    = T_ELLIPSIS;
+                $newToken['type']    = 'T_ELLIPSIS';
+                $newToken['content'] = '...';
+                $finalTokens[$newStackPtr] = $newToken;
+
+                $newStackPtr++;
+                $stackPtr += 2;
+                continue;
+            }
+
+            /*
+                Before PHP 5.6, the ** operator was tokenized as two
+                T_MULTIPLY tokens in a row. So look for and combine
+                these tokens in earlier versions.
+            */
+
+            if ($tokenIsArray === false
+                && $token[0] === '*'
+                && isset($tokens[($stackPtr + 1)]) === true
+                && $tokens[($stackPtr + 1)] === '*'
+            ) {
+                $newToken            = array();
+                $newToken['code']    = T_POW;
+                $newToken['type']    = 'T_POW';
+                $newToken['content'] = '**';
+                $finalTokens[$newStackPtr] = $newToken;
+
+                $newStackPtr++;
+                $stackPtr++;
+                continue;
+            }
+
+            /*
+                Before PHP 7, the <=> operator was tokenized as
+                T_IS_SMALLER_OR_EQUAL followed by T_GREATER_THAN.
+                So look for and combine these tokens in earlier versions.
+            */
+
+            if ($tokenIsArray === true
+                && $token[0] === T_IS_SMALLER_OR_EQUAL
+                && isset($tokens[($stackPtr + 1)]) === true
+                && $tokens[($stackPtr + 1)][0] === '>'
+            ) {
+                $newToken            = array();
+                $newToken['code']    = T_SPACESHIP;
+                $newToken['type']    = 'T_SPACESHIP';
+                $newToken['content'] = '<=>';
+                $finalTokens[$newStackPtr] = $newToken;
+
+                $newStackPtr++;
+                $stackPtr++;
+                continue;
+            }
+
+            /*
+                Emulate traits in PHP versions less than 5.4.
+            */
+
+            if ($tokenIsArray === true
+                && $token[0] === T_STRING
+                && strtolower($token[1]) === 'trait'
+                && $tokens[($stackPtr - 1)][0] !== T_OBJECT_OPERATOR
+            ) {
+                $finalTokens[$newStackPtr] = array(
+                                              'content' => $token[1],
+                                              'code'    => T_TRAIT,
+                                              'type'    => 'T_TRAIT',
+                                             );
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\t* token $stackPtr changed from T_STRING to T_TRAIT".PHP_EOL;
+                }
+
+                $newStackPtr++;
+                continue;
+            }
+
+            /*
+                PHP doesn't assign a token to goto labels, so we have to.
+                These are just string tokens with a single colon after them. Double
+                colons are already tokenized and so don't interfere with this check.
+                But we do have to account for CASE statements, that look just like
+                goto labels.
+            */
+
+            if ($tokenIsArray === true
+                && $token[0] === T_STRING
+                && $tokens[($stackPtr + 1)] === ':'
+                && $tokens[($stackPtr - 1)][0] !== T_PAAMAYIM_NEKUDOTAYIM
+            ) {
+                $stopTokens = array(
+                               T_CASE               => true,
+                               T_SEMICOLON          => true,
+                               T_OPEN_CURLY_BRACKET => true,
+                               T_INLINE_THEN        => true,
+                              );
+
+                for ($x = ($newStackPtr - 1); $x > 0; $x--) {
+                    if (isset($stopTokens[$finalTokens[$x]['code']]) === true) {
+                        break;
+                    }
+                }
+
+                if ($finalTokens[$x]['code'] !== T_CASE
+                    && $finalTokens[$x]['code'] !== T_INLINE_THEN
+                ) {
+                    $finalTokens[$newStackPtr] = array(
+                                                  'content' => $token[1].':',
+                                                  'code'    => T_GOTO_LABEL,
+                                                  'type'    => 'T_GOTO_LABEL',
+                                                 );
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        echo "\t\t* token $stackPtr changed from T_STRING to T_GOTO_LABEL".PHP_EOL;
+                        echo "\t\t* skipping T_COLON token ".($stackPtr + 1).PHP_EOL;
+                    }
+
+                    $newStackPtr++;
+                    $stackPtr++;
+                    continue;
+                }
+            }//end if
+
+            /*
+                HHVM 3.5 tokenizes "else[\s]+if" as a T_ELSEIF token while PHP
+                proper only tokenizes "elseif" as a T_ELSEIF token. So split
+                up the HHVM token to make it looks like proper PHP.
+            */
+
+            if ($tokenIsArray === true
+                && $token[0] === T_ELSEIF
+                && strtolower($token[1]) !== 'elseif'
+            ) {
+                $finalTokens[$newStackPtr] = array(
+                                              'content' => substr($token[1], 0, 4),
+                                              'code'    => T_ELSE,
+                                              'type'    => 'T_ELSE',
+                                             );
+
+                $newStackPtr++;
+                $finalTokens[$newStackPtr] = array(
+                                              'content' => substr($token[1], 4, -2),
+                                              'code'    => T_WHITESPACE,
+                                              'type'    => 'T_WHITESPACE',
+                                             );
+
+                $newStackPtr++;
+                $finalTokens[$newStackPtr] = array(
+                                              'content' => substr($token[1], -2),
+                                              'code'    => T_IF,
+                                              'type'    => 'T_IF',
+                                             );
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\t* token $stackPtr changed from T_ELSEIF to T_ELSE/T_WHITESPACE/T_IF".PHP_EOL;
+                }
+
+                $newStackPtr++;
+                continue;
+            }//end if
+
+            /*
+                HHVM 3.5 and 3.6 tokenizes a hashbang line such as #!/usr/bin/php
+                as T_HASHANG while PHP proper uses T_INLINE_HTML.
+            */
+
+            if ($tokenIsArray === true && token_name($token[0]) === 'T_HASHBANG') {
+                $finalTokens[$newStackPtr] = array(
+                                              'content' => $token[1],
+                                              'code'    => T_INLINE_HTML,
+                                              'type'    => 'T_INLINE_HTML',
+                                             );
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    echo "\t\t* token $stackPtr changed from T_HASHBANG to T_INLINE_HTML".PHP_EOL;
+                }
+
+                $newStackPtr++;
+                continue;
+            }//end if
+
+            /*
+                If this token has newlines in its content, split each line up
+                and create a new token for each line. We do this so it's easier
+                to ascertain where errors occur on a line.
+                Note that $token[1] is the token's content.
+            */
+
+            if ($tokenIsArray === true && strpos($token[1], $eolChar) !== false) {
+                $tokenLines = explode($eolChar, $token[1]);
+                $numLines   = count($tokenLines);
+                $newToken   = array(
+                               'type'    => token_name($token[0]),
+                               'code'    => $token[0],
+                               'content' => '',
+                              );
+
+                for ($i = 0; $i < $numLines; $i++) {
+                    $newToken['content'] = $tokenLines[$i];
+                    if ($i === ($numLines - 1)) {
+                        if ($tokenLines[$i] === '') {
+                            break;
+                        }
+                    } else {
+                        $newToken['content'] .= $eolChar;
+                    }
+
+                    $finalTokens[$newStackPtr] = $newToken;
+                    $newStackPtr++;
+                }
+            } else {
+                if ($tokenIsArray === true && $token[0] === T_STRING) {
+                    // Some T_STRING tokens should remain that way
+                    // due to their context.
+                    $context = array(
+                                T_OBJECT_OPERATOR      => true,
+                                T_FUNCTION             => true,
+                                T_CLASS                => true,
+                                T_EXTENDS              => true,
+                                T_IMPLEMENTS           => true,
+                                T_NEW                  => true,
+                                T_CONST                => true,
+                                T_NS_SEPARATOR         => true,
+                                T_USE                  => true,
+                                T_NAMESPACE            => true,
+                                T_PAAMAYIM_NEKUDOTAYIM => true,
+                               );
+                    if (isset($context[$finalTokens[$lastNotEmptyToken]['code']]) === true) {
+                        $finalTokens[$newStackPtr] = array(
+                                                      'content' => $token[1],
+                                                      'code'    => T_STRING,
+                                                      'type'    => 'T_STRING',
+                                                     );
+                        $newStackPtr++;
+                        continue;
+                    }
+                }//end if
+
+                $newToken = null;
+                if ($tokenIsArray === false) {
+                    if (isset(self::$_resolveTokenCache[$token[0]]) === true) {
+                        $newToken = self::$_resolveTokenCache[$token[0]];
+                    }
+                } else {
+                    $cacheKey = null;
+                    if ($token[0] === T_STRING) {
+                        $cacheKey = strtolower($token[1]);
+                    } else if ($token[0] !== T_CURLY_OPEN) {
+                        $cacheKey = $token[0];
+                    }
+
+                    if ($cacheKey !== null && isset(self::$_resolveTokenCache[$cacheKey]) === true) {
+                        $newToken            = self::$_resolveTokenCache[$cacheKey];
+                        $newToken['content'] = $token[1];
+                    }
+                }
+
+                if ($newToken === null) {
+                    $newToken = self::standardiseToken($token);
+                }
+
+                // Convert colons that are actually the ELSE component of an
+                // inline IF statement.
+                if ($newToken['code'] === T_INLINE_THEN) {
+                    $insideInlineIf[] = $stackPtr;
+                } else if (empty($insideInlineIf) === false && $newToken['code'] === T_COLON) {
+                    array_pop($insideInlineIf);
+                    $newToken['code'] = T_INLINE_ELSE;
+                    $newToken['type'] = 'T_INLINE_ELSE';
+                }
+
+                // This is a special condition for T_ARRAY tokens used for
+                // type hinting function arguments as being arrays. We want to keep
+                // the parenthesis map clean, so let's tag these tokens as
+                // T_ARRAY_HINT.
+                if ($newToken['code'] === T_ARRAY) {
+                    // Recalculate number of tokens.
+                    for ($i = $stackPtr; $i < $numTokens; $i++) {
+                        if ($tokens[$i] === '(') {
+                            break;
+                        } else if ($tokens[$i][0] === T_VARIABLE) {
+                            $newToken['code'] = T_ARRAY_HINT;
+                            $newToken['type'] = 'T_ARRAY_HINT';
+                            break;
+                        }
+                    }
+                }
+
+                // This is a special case when checking PHP 5.5+ code in PHP < 5.5
+                // where "finally" should be T_FINALLY instead of T_STRING.
+                if ($newToken['code'] === T_STRING
+                    && strtolower($newToken['content']) === 'finally'
+                ) {
+                    $newToken['code'] = T_FINALLY;
+                    $newToken['type'] = 'T_FINALLY';
+                }
+
+                // This is a special case for the PHP 5.5 classname::class syntax
+                // where "class" should be T_STRING instead of T_CLASS.
+                if ($newToken['code'] === T_CLASS
+                    && $finalTokens[($newStackPtr - 1)]['code'] === T_DOUBLE_COLON
+                ) {
+                    $newToken['code'] = T_STRING;
+                    $newToken['type'] = 'T_STRING';
+                }
+
+                // This is a special case for PHP 5.6 use function and use const
+                // where "function" and "const" should be T_STRING instead of T_FUNCTION
+                // and T_CONST.
+                if (($newToken['code'] === T_FUNCTION
+                    || $newToken['code'] === T_CONST)
+                    && $finalTokens[$lastNotEmptyToken]['code'] === T_USE
+                ) {
+                    $newToken['code'] = T_STRING;
+                    $newToken['type'] = 'T_STRING';
+                }
+
+                $finalTokens[$newStackPtr] = $newToken;
+                $newStackPtr++;
+            }//end if
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END PHP TOKENIZING ***".PHP_EOL;
+        }
+
+        return $finalTokens;
+
+    }//end tokenizeString()
+
+
+    /**
+     * Performs additional processing after main tokenizing.
+     *
+     * This additional processing checks for CASE statements that are using curly
+     * braces for scope openers and closers. It also turns some T_FUNCTION tokens
+     * into T_CLOSURE when they are not standard function definitions. It also
+     * detects short array syntax and converts those square brackets into new tokens.
+     * It also corrects some usage of the static and class keywords. It also
+     * assigns tokens to function return types.
+     *
+     * @param array  $tokens  The array of tokens to process.
+     * @param string $eolChar The EOL character to use for splitting strings.
+     *
+     * @return void
+     */
+    public function processAdditional(&$tokens, $eolChar)
+    {
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** START ADDITIONAL PHP PROCESSING ***".PHP_EOL;
+        }
+
+        $numTokens = count($tokens);
+        for ($i = ($numTokens - 1); $i >= 0; $i--) {
+            // Check for any unset scope conditions due to alternate IF/ENDIF syntax.
+            if (isset($tokens[$i]['scope_opener']) === true
+                && isset($tokens[$i]['scope_condition']) === false
+            ) {
+                $tokens[$i]['scope_condition'] = $tokens[$tokens[$i]['scope_opener']]['scope_condition'];
+            }
+
+            if ($tokens[$i]['code'] === T_FUNCTION) {
+                // Context sensitive keywords support.
+                for ($x = ($i + 1); $i < $numTokens; $x++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        // Non-whitespace content.
+                        break;
+                    }
+                }
+
+                if (in_array($tokens[$x]['code'], array(T_STRING, T_OPEN_PARENTHESIS, T_BITWISE_AND), true) === false) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$x]['line'];
+                        $type = $tokens[$x]['type'];
+                        echo "\t* token $x on line $line changed from $type to T_STRING".PHP_EOL;
+                    }
+
+                    $tokens[$x]['code'] = T_STRING;
+                    $tokens[$x]['type'] = 'T_STRING';
+                }
+
+                /*
+                    Detect functions that are actually closures and
+                    assign them a different token.
+                */
+
+                if (isset($tokens[$i]['scope_opener']) === true) {
+                    for ($x = ($i + 1); $x < $numTokens; $x++) {
+                        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false
+                            && $tokens[$x]['code'] !== T_BITWISE_AND
+                        ) {
+                            break;
+                        }
+                    }
+
+                    if ($tokens[$x]['code'] === T_OPEN_PARENTHESIS) {
+                        $tokens[$i]['code'] = T_CLOSURE;
+                        $tokens[$i]['type'] = 'T_CLOSURE';
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $line = $tokens[$i]['line'];
+                            echo "\t* token $i on line $line changed from T_FUNCTION to T_CLOSURE".PHP_EOL;
+                        }
+
+                        for ($x = ($tokens[$i]['scope_opener'] + 1); $x < $tokens[$i]['scope_closer']; $x++) {
+                            if (isset($tokens[$x]['conditions'][$i]) === false) {
+                                continue;
+                            }
+
+                            $tokens[$x]['conditions'][$i] = T_CLOSURE;
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                $type = $tokens[$x]['type'];
+                                echo "\t\t* cleaned $x ($type) *".PHP_EOL;
+                            }
+                        }
+                    }
+
+                    $tokenAfterReturnTypeHint = $tokens[$i]['scope_opener'];
+                } else if (isset($tokens[$i]['parenthesis_closer']) === true) {
+                    for ($x = ($tokens[$i]['parenthesis_closer'] + 1); $i < $numTokens; $x++) {
+                        if ($tokens[$x]['code'] === T_SEMICOLON) {
+                            $tokenAfterReturnTypeHint = $x;
+                            break;
+                        }
+                    }
+                } else {
+                    // Probably a syntax error.
+                    continue;
+                }//end if
+
+                /*
+                    Detect function return values and assign them
+                    a special token, because PHP doesn't.
+                */
+
+                for ($x = ($tokenAfterReturnTypeHint - 1); $x > $i; $x--) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        if ($tokens[$x]['code'] === T_STRING || $tokens[$x]['code'] === T_ARRAY) {
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                                $line = $tokens[$x]['line'];
+                                $type = $tokens[$x]['type'];
+                                echo "\t* token $x on line $line changed from $type to T_RETURN_TYPE".PHP_EOL;
+                            }
+
+                            $tokens[$x]['code'] = T_RETURN_TYPE;
+                            $tokens[$x]['type'] = 'T_RETURN_TYPE';
+                        }
+
+                        break;
+                    }
+                }
+
+                continue;
+            } else if ($tokens[$i]['code'] === T_CLASS && isset($tokens[$i]['scope_opener']) === true) {
+                /*
+                    Detect anonymous classes and assign them a different token.
+                */
+
+                for ($x = ($i + 1); $x < $numTokens; $x++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        break;
+                    }
+                }
+
+                if ($tokens[$x]['code'] === T_OPEN_PARENTHESIS
+                    || $tokens[$x]['code'] === T_OPEN_CURLY_BRACKET
+                ) {
+                    $tokens[$i]['code'] = T_ANON_CLASS;
+                    $tokens[$i]['type'] = 'T_ANON_CLASS';
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$i]['line'];
+                        echo "\t* token $i on line $line changed from T_CLASS to T_ANON_CLASS".PHP_EOL;
+                    }
+
+                    for ($x = ($tokens[$i]['scope_opener'] + 1); $x < $tokens[$i]['scope_closer']; $x++) {
+                        if (isset($tokens[$x]['conditions'][$i]) === false) {
+                            continue;
+                        }
+
+                        $tokens[$x]['conditions'][$i] = T_ANON_CLASS;
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type = $tokens[$x]['type'];
+                            echo "\t\t* cleaned $x ($type) *".PHP_EOL;
+                        }
+                    }
+                }
+
+                continue;
+            } else if ($tokens[$i]['code'] === T_OPEN_SQUARE_BRACKET) {
+                // Unless there is a variable or a bracket before this token,
+                // it is the start of an array being defined using the short syntax.
+                for ($x = ($i - 1); $x > 0; $x--) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        break;
+                    }
+                }
+
+                $allowed = array(
+                            T_CLOSE_CURLY_BRACKET  => T_CLOSE_CURLY_BRACKET,
+                            T_CLOSE_SQUARE_BRACKET => T_CLOSE_SQUARE_BRACKET,
+                            T_CLOSE_PARENTHESIS    => T_CLOSE_PARENTHESIS,
+                            T_VARIABLE             => T_VARIABLE,
+                            T_STRING               => T_STRING,
+                           );
+
+                if (isset($allowed[$tokens[$x]['code']]) === false
+                    && isset($tokens[$i]['bracket_closer']) === true
+                ) {
+                    $tokens[$i]['code'] = T_OPEN_SHORT_ARRAY;
+                    $tokens[$i]['type'] = 'T_OPEN_SHORT_ARRAY';
+
+                    $closer = $tokens[$i]['bracket_closer'];
+                    $tokens[$closer]['code'] = T_CLOSE_SHORT_ARRAY;
+                    $tokens[$closer]['type'] = 'T_CLOSE_SHORT_ARRAY';
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$i]['line'];
+                        echo "\t* token $i on line $line changed from T_OPEN_SQUARE_BRACKET to T_OPEN_SHORT_ARRAY".PHP_EOL;
+                        $line = $tokens[$closer]['line'];
+                        echo "\t* token $closer on line $line changed from T_CLOSE_SQUARE_BRACKET to T_CLOSE_SHORT_ARRAY".PHP_EOL;
+                    }
+                }
+
+                continue;
+            } else if ($tokens[$i]['code'] === T_STATIC) {
+                for ($x = ($i - 1); $x > 0; $x--) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        break;
+                    }
+                }
+
+                if ($tokens[$x]['code'] === T_INSTANCEOF) {
+                    $tokens[$i]['code'] = T_STRING;
+                    $tokens[$i]['type'] = 'T_STRING';
+
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$i]['line'];
+                        echo "\t* token $i on line $line changed from T_STATIC to T_STRING".PHP_EOL;
+                    }
+                }
+
+                continue;
+            } else if ($tokens[$i]['code'] === T_ECHO && $tokens[$i]['content'] === '<?=') {
+                // HHVM tokenizes <?= as T_ECHO but it should be T_OPEN_TAG_WITH_ECHO.
+                $tokens[$i]['code'] = T_OPEN_TAG_WITH_ECHO;
+                $tokens[$i]['type'] = 'T_OPEN_TAG_WITH_ECHO';
+
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $line = $tokens[$i]['line'];
+                    echo "\t* token $i on line $line changed from T_ECHO to T_OPEN_TAG_WITH_ECHO".PHP_EOL;
+                }
+            } else if ($tokens[$i]['code'] === T_TRUE
+                || $tokens[$i]['code'] === T_FALSE
+                || $tokens[$i]['code'] === T_NULL
+            ) {
+                for ($x = ($i + 1); $i < $numTokens; $x++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        // Non-whitespace content.
+                        break;
+                    }
+                }
+
+                $context = array(
+                            T_OBJECT_OPERATOR      => true,
+                            T_NS_SEPARATOR         => true,
+                            T_PAAMAYIM_NEKUDOTAYIM => true,
+                           );
+                if (isset($context[$tokens[$x]['code']]) === true) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$i]['line'];
+                        $type = $tokens[$i]['type'];
+                        echo "\t* token $i on line $line changed from $type to T_STRING".PHP_EOL;
+                    }
+
+                    $tokens[$i]['code'] = T_STRING;
+                    $tokens[$i]['type'] = 'T_STRING';
+                }
+            } else if ($tokens[$i]['code'] === T_CONST) {
+                // Context sensitive keywords support.
+                for ($x = ($i + 1); $i < $numTokens; $x++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        // Non-whitespace content.
+                        break;
+                    }
+                }
+
+                if ($tokens[$x]['code'] !== T_STRING) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$x]['line'];
+                        $type = $tokens[$x]['type'];
+                        echo "\t* token $x on line $line changed from $type to T_STRING".PHP_EOL;
+                    }
+
+                    $tokens[$x]['code'] = T_STRING;
+                    $tokens[$x]['type'] = 'T_STRING';
+                }
+            } else if ($tokens[$i]['code'] === T_PAAMAYIM_NEKUDOTAYIM) {
+                // Context sensitive keywords support.
+                for ($x = ($i + 1); $i < $numTokens; $x++) {
+                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                        // Non-whitespace content.
+                        break;
+                    }
+                }
+
+                if (in_array($tokens[$x]['code'], array(T_STRING, T_VARIABLE, T_DOLLAR), true) === false) {
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                        $line = $tokens[$x]['line'];
+                        $type = $tokens[$x]['type'];
+                        echo "\t* token $x on line $line changed from $type to T_STRING".PHP_EOL;
+                    }
+
+                    $tokens[$x]['code'] = T_STRING;
+                    $tokens[$x]['type'] = 'T_STRING';
+                }
+            }//end if
+
+            if (($tokens[$i]['code'] !== T_CASE
+                && $tokens[$i]['code'] !== T_DEFAULT)
+                || isset($tokens[$i]['scope_opener']) === false
+            ) {
+                // Only interested in CASE and DEFAULT statements from here on in.
+                continue;
+            }
+
+            $scopeOpener = $tokens[$i]['scope_opener'];
+            $scopeCloser = $tokens[$i]['scope_closer'];
+
+            // If the first char after the opener is a curly brace
+            // and that brace has been ignored, it is actually
+            // opening this case statement and the opener and closer are
+            // probably set incorrectly.
+            for ($x = ($scopeOpener + 1); $x < $numTokens; $x++) {
+                if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$tokens[$x]['code']]) === false) {
+                    // Non-whitespace content.
+                    break;
+                }
+            }
+
+            if ($tokens[$x]['code'] === T_CASE) {
+                // Special case for multiple CASE statements that share the same
+                // closer. Because we are going backwards through the file, this next
+                // CASE statement is already fixed, so just use its closer and don't
+                // worry about fixing anything.
+                $newCloser = $tokens[$x]['scope_closer'];
+                $tokens[$i]['scope_closer'] = $newCloser;
+                if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                    $oldType = $tokens[$scopeCloser]['type'];
+                    $newType = $tokens[$newCloser]['type'];
+                    $line    = $tokens[$i]['line'];
+                    echo "\t* token $i (T_CASE) on line $line closer changed from $scopeCloser ($oldType) to $newCloser ($newType)".PHP_EOL;
+                }
+
+                continue;
+            }
+
+            if ($tokens[$x]['code'] !== T_OPEN_CURLY_BRACKET
+                || isset($tokens[$x]['scope_condition']) === true
+            ) {
+                // Not a CASE with a curly brace opener.
+                continue;
+            }
+
+            // The closer for this CASE/DEFAULT should be the closing curly brace and
+            // not whatever it already is. The opener needs to be the opening curly
+            // brace so everything matches up.
+            $newCloser = $tokens[$x]['bracket_closer'];
+            foreach (array($i, $x, $newCloser) as $index) {
+                $tokens[$index]['scope_condition'] = $i;
+                $tokens[$index]['scope_opener']    = $x;
+                $tokens[$index]['scope_closer']    = $newCloser;
+            }
+
+            unset($tokens[$scopeOpener]['scope_condition']);
+            unset($tokens[$scopeOpener]['scope_opener']);
+            unset($tokens[$scopeOpener]['scope_closer']);
+            unset($tokens[$scopeCloser]['scope_condition']);
+            unset($tokens[$scopeCloser]['scope_opener']);
+            unset($tokens[$scopeCloser]['scope_closer']);
+            unset($tokens[$x]['bracket_opener']);
+            unset($tokens[$x]['bracket_closer']);
+            unset($tokens[$newCloser]['bracket_opener']);
+            unset($tokens[$newCloser]['bracket_closer']);
+            $tokens[$scopeCloser]['conditions'][] = $i;
+
+            if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                $line      = $tokens[$i]['line'];
+                $tokenType = $tokens[$i]['type'];
+
+                $oldType = $tokens[$scopeOpener]['type'];
+                $newType = $tokens[$x]['type'];
+                echo "\t* token $i ($tokenType) on line $line opener changed from $scopeOpener ($oldType) to $x ($newType)".PHP_EOL;
+
+                $oldType = $tokens[$scopeCloser]['type'];
+                $newType = $tokens[$newCloser]['type'];
+                echo "\t* token $i ($tokenType) on line $line closer changed from $scopeCloser ($oldType) to $newCloser ($newType)".PHP_EOL;
+            }
+
+            // Now fix up all the tokens that think they are
+            // inside the CASE/DEFAULT statement when they are really outside.
+            for ($x = $newCloser; $x < $scopeCloser; $x++) {
+                foreach ($tokens[$x]['conditions'] as $num => $oldCond) {
+                    if ($oldCond === $tokens[$i]['code']) {
+                        $oldConditions = $tokens[$x]['conditions'];
+                        unset($tokens[$x]['conditions'][$num]);
+
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+                            $type     = $tokens[$x]['type'];
+                            $oldConds = '';
+                            foreach ($oldConditions as $condition) {
+                                $oldConds .= token_name($condition).',';
+                            }
+
+                            $oldConds = rtrim($oldConds, ',');
+
+                            $newConds = '';
+                            foreach ($tokens[$x]['conditions'] as $condition) {
+                                $newConds .= token_name($condition).',';
+                            }
+
+                            $newConds = rtrim($newConds, ',');
+
+                            echo "\t\t* cleaned $x ($type) *".PHP_EOL;
+                            echo "\t\t\t=> conditions changed from $oldConds to $newConds".PHP_EOL;
+                        }
+
+                        break;
+                    }//end if
+                }//end foreach
+            }//end for
+        }//end for
+
+        if (PHP_CODESNIFFER_VERBOSITY > 1) {
+            echo "\t*** END ADDITIONAL PHP PROCESSING ***".PHP_EOL;
+        }
+
+    }//end processAdditional()
+
+
+    /**
+     * Takes a token produced from <code>token_get_all()</code> and produces a
+     * more uniform token.
+     *
+     * @param string|array $token The token to convert.
+     *
+     * @return array The new token.
+     */
+    public static function standardiseToken($token)
+    {
+        if (isset($token[1]) === false) {
+            if (isset(self::$_resolveTokenCache[$token[0]]) === true) {
+                return self::$_resolveTokenCache[$token[0]];
+            }
+        } else {
+            $cacheKey = null;
+            if ($token[0] === T_STRING) {
+                $cacheKey = strtolower($token[1]);
+            } else if ($token[0] !== T_CURLY_OPEN) {
+                $cacheKey = $token[0];
+            }
+
+            if ($cacheKey !== null && isset(self::$_resolveTokenCache[$cacheKey]) === true) {
+                $newToken            = self::$_resolveTokenCache[$cacheKey];
+                $newToken['content'] = $token[1];
+                return $newToken;
+            }
+        }
+
+        if (isset($token[1]) === false) {
+            return self::resolveSimpleToken($token[0]);
+        }
+
+        if ($token[0] === T_STRING) {
+            switch ($cacheKey) {
+            case 'false':
+                $newToken['type'] = 'T_FALSE';
+                break;
+            case 'true':
+                $newToken['type'] = 'T_TRUE';
+                break;
+            case 'null':
+                $newToken['type'] = 'T_NULL';
+                break;
+            case 'self':
+                $newToken['type'] = 'T_SELF';
+                break;
+            case 'parent':
+                $newToken['type'] = 'T_PARENT';
+                break;
+            default:
+                $newToken['type'] = 'T_STRING';
+                break;
+            }
+
+            $newToken['code'] = constant($newToken['type']);
+
+            self::$_resolveTokenCache[$cacheKey] = $newToken;
+        } else if ($token[0] === T_CURLY_OPEN) {
+            $newToken = array(
+                         'code' => T_OPEN_CURLY_BRACKET,
+                         'type' => 'T_OPEN_CURLY_BRACKET',
+                        );
+        } else {
+            $newToken = array(
+                         'code' => $token[0],
+                         'type' => token_name($token[0]),
+                        );
+
+            self::$_resolveTokenCache[$token[0]] = $newToken;
+        }//end if
+
+        $newToken['content'] = $token[1];
+        return $newToken;
+
+    }//end standardiseToken()
+
+
+    /**
+     * Converts simple tokens into a format that conforms to complex tokens
+     * produced by token_get_all().
+     *
+     * Simple tokens are tokens that are not in array form when produced from
+     * token_get_all().
+     *
+     * @param string $token The simple token to convert.
+     *
+     * @return array The new token in array format.
+     */
+    public static function resolveSimpleToken($token)
+    {
+        $newToken = array();
+
+        switch ($token) {
+        case '{':
+            $newToken['type'] = 'T_OPEN_CURLY_BRACKET';
+            break;
+        case '}':
+            $newToken['type'] = 'T_CLOSE_CURLY_BRACKET';
+            break;
+        case '[':
+            $newToken['type'] = 'T_OPEN_SQUARE_BRACKET';
+            break;
+        case ']':
+            $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET';
+            break;
+        case '(':
+            $newToken['type'] = 'T_OPEN_PARENTHESIS';
+            break;
+        case ')':
+            $newToken['type'] = 'T_CLOSE_PARENTHESIS';
+            break;
+        case ':':
+            $newToken['type'] = 'T_COLON';
+            break;
+        case '.':
+            $newToken['type'] = 'T_STRING_CONCAT';
+            break;
+        case '?':
+            $newToken['type'] = 'T_INLINE_THEN';
+            break;
+        case ';':
+            $newToken['type'] = 'T_SEMICOLON';
+            break;
+        case '=':
+            $newToken['type'] = 'T_EQUAL';
+            break;
+        case '*':
+            $newToken['type'] = 'T_MULTIPLY';
+            break;
+        case '/':
+            $newToken['type'] = 'T_DIVIDE';
+            break;
+        case '+':
+            $newToken['type'] = 'T_PLUS';
+            break;
+        case '-':
+            $newToken['type'] = 'T_MINUS';
+            break;
+        case '%':
+            $newToken['type'] = 'T_MODULUS';
+            break;
+        case '^':
+            $newToken['type'] = 'T_BITWISE_XOR';
+            break;
+        case '&':
+            $newToken['type'] = 'T_BITWISE_AND';
+            break;
+        case '|':
+            $newToken['type'] = 'T_BITWISE_OR';
+            break;
+        case '<':
+            $newToken['type'] = 'T_LESS_THAN';
+            break;
+        case '>':
+            $newToken['type'] = 'T_GREATER_THAN';
+            break;
+        case '!':
+            $newToken['type'] = 'T_BOOLEAN_NOT';
+            break;
+        case ',':
+            $newToken['type'] = 'T_COMMA';
+            break;
+        case '@':
+            $newToken['type'] = 'T_ASPERAND';
+            break;
+        case '$':
+            $newToken['type'] = 'T_DOLLAR';
+            break;
+        case '`':
+            $newToken['type'] = 'T_BACKTICK';
+            break;
+        default:
+            $newToken['type'] = 'T_NONE';
+            break;
+        }//end switch
+
+        $newToken['code']    = constant($newToken['type']);
+        $newToken['content'] = $token;
+
+        self::$_resolveTokenCache[$token] = $newToken;
+        return $newToken;
+
+    }//end resolveSimpleToken()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokens.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokens.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokens.php	(revision 5534)
@@ -0,0 +1,749 @@
+<?php
+/**
+ * The Tokens class contains weightings for tokens based on their
+ * probability of occurrence in a file.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+define('T_NONE', 'PHPCS_T_NONE');
+define('T_OPEN_CURLY_BRACKET', 'PHPCS_T_OPEN_CURLY_BRACKET');
+define('T_CLOSE_CURLY_BRACKET', 'PHPCS_T_CLOSE_CURLY_BRACKET');
+define('T_OPEN_SQUARE_BRACKET', 'PHPCS_T_OPEN_SQUARE_BRACKET');
+define('T_CLOSE_SQUARE_BRACKET', 'PHPCS_T_CLOSE_SQUARE_BRACKET');
+define('T_OPEN_PARENTHESIS', 'PHPCS_T_OPEN_PARENTHESIS');
+define('T_CLOSE_PARENTHESIS', 'PHPCS_T_CLOSE_PARENTHESIS');
+define('T_COLON', 'PHPCS_T_COLON');
+define('T_STRING_CONCAT', 'PHPCS_T_STRING_CONCAT');
+define('T_INLINE_THEN', 'PHPCS_T_INLINE_THEN');
+define('T_INLINE_ELSE', 'PHPCS_T_INLINE_ELSE');
+define('T_NULL', 'PHPCS_T_NULL');
+define('T_FALSE', 'PHPCS_T_FALSE');
+define('T_TRUE', 'PHPCS_T_TRUE');
+define('T_SEMICOLON', 'PHPCS_T_SEMICOLON');
+define('T_EQUAL', 'PHPCS_T_EQUAL');
+define('T_MULTIPLY', 'PHPCS_T_MULTIPLY');
+define('T_DIVIDE', 'PHPCS_T_DIVIDE');
+define('T_PLUS', 'PHPCS_T_PLUS');
+define('T_MINUS', 'PHPCS_T_MINUS');
+define('T_MODULUS', 'PHPCS_T_MODULUS');
+define('T_BITWISE_AND', 'PHPCS_T_BITWISE_AND');
+define('T_BITWISE_OR', 'PHPCS_T_BITWISE_OR');
+define('T_BITWISE_XOR', 'PHPCS_T_BITWISE_XOR');
+define('T_ARRAY_HINT', 'PHPCS_T_ARRAY_HINT');
+define('T_GREATER_THAN', 'PHPCS_T_GREATER_THAN');
+define('T_LESS_THAN', 'PHPCS_T_LESS_THAN');
+define('T_BOOLEAN_NOT', 'PHPCS_T_BOOLEAN_NOT');
+define('T_SELF', 'PHPCS_T_SELF');
+define('T_PARENT', 'PHPCS_T_PARENT');
+define('T_DOUBLE_QUOTED_STRING', 'PHPCS_T_DOUBLE_QUOTED_STRING');
+define('T_COMMA', 'PHPCS_T_COMMA');
+define('T_HEREDOC', 'PHPCS_T_HEREDOC');
+define('T_PROTOTYPE', 'PHPCS_T_PROTOTYPE');
+define('T_THIS', 'PHPCS_T_THIS');
+define('T_REGULAR_EXPRESSION', 'PHPCS_T_REGULAR_EXPRESSION');
+define('T_PROPERTY', 'PHPCS_T_PROPERTY');
+define('T_LABEL', 'PHPCS_T_LABEL');
+define('T_OBJECT', 'PHPCS_T_OBJECT');
+define('T_CLOSE_OBJECT', 'PHPCS_T_CLOSE_OBJECT');
+define('T_COLOUR', 'PHPCS_T_COLOUR');
+define('T_HASH', 'PHPCS_T_HASH');
+define('T_URL', 'PHPCS_T_URL');
+define('T_STYLE', 'PHPCS_T_STYLE');
+define('T_ASPERAND', 'PHPCS_T_ASPERAND');
+define('T_DOLLAR', 'PHPCS_T_DOLLAR');
+define('T_TYPEOF', 'PHPCS_T_TYPEOF');
+define('T_CLOSURE', 'PHPCS_T_CLOSURE');
+define('T_ANON_CLASS', 'PHPCS_T_ANON_CLASS');
+define('T_BACKTICK', 'PHPCS_T_BACKTICK');
+define('T_START_NOWDOC', 'PHPCS_T_START_NOWDOC');
+define('T_NOWDOC', 'PHPCS_T_NOWDOC');
+define('T_END_NOWDOC', 'PHPCS_T_END_NOWDOC');
+define('T_OPEN_SHORT_ARRAY', 'PHPCS_T_OPEN_SHORT_ARRAY');
+define('T_CLOSE_SHORT_ARRAY', 'PHPCS_T_CLOSE_SHORT_ARRAY');
+define('T_GOTO_LABEL', 'PHPCS_T_GOTO_LABEL');
+define('T_BINARY_CAST', 'PHPCS_T_BINARY_CAST');
+define('T_EMBEDDED_PHP', 'PHPCS_T_EMBEDDED_PHP');
+define('T_RETURN_TYPE', 'PHPCS_T_RETURN_TYPE');
+
+// Some PHP 5.3 tokens, replicated for lower versions.
+if (defined('T_NAMESPACE') === false) {
+    define('T_NAMESPACE', 'PHPCS_T_NAMESPACE');
+}
+
+if (defined('T_NS_C') === false) {
+    define('T_NS_C', 'PHPCS_T_NS_C');
+}
+
+if (defined('T_NS_SEPARATOR') === false) {
+    define('T_NS_SEPARATOR', 'PHPCS_T_NS_SEPARATOR');
+}
+
+if (defined('T_GOTO') === false) {
+    define('T_GOTO', 'PHPCS_T_GOTO');
+}
+
+if (defined('T_DIR') === false) {
+    define('T_DIR', 'PHPCS_T_DIR');
+}
+
+// Some PHP 5.4 tokens, replicated for lower versions.
+if (defined('T_TRAIT') === false) {
+    define('T_TRAIT', 'PHPCS_T_TRAIT');
+}
+
+if (defined('T_TRAIT_C') === false) {
+    define('T_TRAIT_C', 'PHPCS_T_TRAIT_C');
+}
+
+if (defined('T_INSTEADOF') === false) {
+    define('T_INSTEADOF', 'PHPCS_T_INSTEADOF');
+}
+
+if (defined('T_CALLABLE') === false) {
+    define('T_CALLABLE', 'PHPCS_T_CALLABLE');
+}
+
+// Some PHP 5.5 tokens, replicated for lower versions.
+if (defined('T_FINALLY') === false) {
+    define('T_FINALLY', 'PHPCS_T_FINALLY');
+}
+
+if (defined('T_YIELD') === false) {
+    define('T_YIELD', 'PHPCS_T_YIELD');
+}
+
+// Some PHP 5.6 tokens, replicated for lower versions.
+if (defined('T_ELLIPSIS') === false) {
+    define('T_ELLIPSIS', 'PHPCS_T_ELLIPSIS');
+}
+
+if (defined('T_POW') === false) {
+    define('T_POW', 'PHPCS_T_POW');
+}
+
+// Some PHP 7 tokens, replicated for lower versions.
+if (defined('T_SPACESHIP') === false) {
+    define('T_SPACESHIP', 'PHPCS_T_SPACESHIP');
+}
+
+// Tokens used for parsing doc blocks.
+define('T_DOC_COMMENT_STAR', 'PHPCS_T_DOC_COMMENT_STAR');
+define('T_DOC_COMMENT_WHITESPACE', 'PHPCS_T_DOC_COMMENT_WHITESPACE');
+define('T_DOC_COMMENT_TAG', 'PHPCS_T_DOC_COMMENT_TAG');
+define('T_DOC_COMMENT_OPEN_TAG', 'PHPCS_T_DOC_COMMENT_OPEN_TAG');
+define('T_DOC_COMMENT_CLOSE_TAG', 'PHPCS_T_DOC_COMMENT_CLOSE_TAG');
+define('T_DOC_COMMENT_STRING', 'PHPCS_T_DOC_COMMENT_STRING');
+
+/**
+ * The Tokens class contains weightings for tokens based on their
+ * probability of occurrence in a file.
+ *
+ * The less the chance of a high occurrence of an arbitrary token, the higher
+ * the weighting.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+final class PHP_CodeSniffer_Tokens
+{
+
+    /**
+     * The token weightings.
+     *
+     * @var array(int => int)
+     */
+    public static $weightings = array(
+                                 T_CLASS               => 1000,
+                                 T_INTERFACE           => 1000,
+                                 T_TRAIT               => 1000,
+                                 T_NAMESPACE           => 1000,
+                                 T_FUNCTION            => 100,
+                                 T_CLOSURE             => 100,
+
+                                 /*
+                                     Conditions.
+                                 */
+
+                                 T_WHILE               => 50,
+                                 T_FOR                 => 50,
+                                 T_FOREACH             => 50,
+                                 T_IF                  => 50,
+                                 T_ELSE                => 50,
+                                 T_ELSEIF              => 50,
+                                 T_DO                  => 50,
+                                 T_TRY                 => 50,
+                                 T_CATCH               => 50,
+                                 T_FINALLY             => 50,
+                                 T_SWITCH              => 50,
+
+                                 T_SELF                => 25,
+                                 T_PARENT              => 25,
+
+                                 /*
+                                     Operators and arithmetic.
+                                 */
+
+                                 T_BITWISE_AND         => 8,
+                                 T_BITWISE_OR          => 8,
+                                 T_BITWISE_XOR         => 8,
+
+                                 T_MULTIPLY            => 5,
+                                 T_DIVIDE              => 5,
+                                 T_PLUS                => 5,
+                                 T_MINUS               => 5,
+                                 T_MODULUS             => 5,
+                                 T_POW                 => 5,
+                                 T_SPACESHIP           => 5,
+
+                                 T_SL                  => 5,
+                                 T_SR                  => 5,
+                                 T_SL_EQUAL            => 5,
+                                 T_SR_EQUAL            => 5,
+
+                                 T_EQUAL               => 5,
+                                 T_AND_EQUAL           => 5,
+                                 T_CONCAT_EQUAL        => 5,
+                                 T_DIV_EQUAL           => 5,
+                                 T_MINUS_EQUAL         => 5,
+                                 T_MOD_EQUAL           => 5,
+                                 T_MUL_EQUAL           => 5,
+                                 T_OR_EQUAL            => 5,
+                                 T_PLUS_EQUAL          => 5,
+                                 T_XOR_EQUAL           => 5,
+
+                                 T_BOOLEAN_AND         => 5,
+                                 T_BOOLEAN_OR          => 5,
+
+                                 /*
+                                     Equality.
+                                 */
+
+                                 T_IS_EQUAL            => 5,
+                                 T_IS_NOT_EQUAL        => 5,
+                                 T_IS_IDENTICAL        => 5,
+                                 T_IS_NOT_IDENTICAL    => 5,
+                                 T_IS_SMALLER_OR_EQUAL => 5,
+                                 T_IS_GREATER_OR_EQUAL => 5,
+                                );
+
+    /**
+     * The token weightings.
+     *
+     * @var array(int => int)
+     */
+    public static $knownLengths = array(
+                                   T_ABSTRACT                 => 8,
+                                   T_AND_EQUAL                => 2,
+                                   T_ARRAY                    => 5,
+                                   T_AS                       => 2,
+                                   T_BOOLEAN_AND              => 2,
+                                   T_BOOLEAN_OR               => 2,
+                                   T_BREAK                    => 5,
+                                   T_CALLABLE                 => 8,
+                                   T_CASE                     => 4,
+                                   T_CATCH                    => 5,
+                                   T_CLASS                    => 5,
+                                   T_CLASS_C                  => 9,
+                                   T_CLONE                    => 5,
+                                   T_CONCAT_EQUAL             => 2,
+                                   T_CONST                    => 5,
+                                   T_CONTINUE                 => 8,
+                                   T_CURLY_OPEN               => 2,
+                                   T_DEC                      => 2,
+                                   T_DECLARE                  => 7,
+                                   T_DEFAULT                  => 7,
+                                   T_DIR                      => 7,
+                                   T_DIV_EQUAL                => 2,
+                                   T_DO                       => 2,
+                                   T_DOLLAR_OPEN_CURLY_BRACES => 2,
+                                   T_DOUBLE_ARROW             => 2,
+                                   T_DOUBLE_COLON             => 2,
+                                   T_ECHO                     => 4,
+                                   T_ELSE                     => 4,
+                                   T_ELSEIF                   => 6,
+                                   T_EMPTY                    => 5,
+                                   T_ENDDECLARE               => 10,
+                                   T_ENDFOR                   => 6,
+                                   T_ENDFOREACH               => 10,
+                                   T_ENDIF                    => 5,
+                                   T_ENDSWITCH                => 9,
+                                   T_ENDWHILE                 => 8,
+                                   T_EVAL                     => 4,
+                                   T_EXTENDS                  => 7,
+                                   T_FILE                     => 8,
+                                   T_FINAL                    => 5,
+                                   T_FINALLY                  => 7,
+                                   T_FOR                      => 3,
+                                   T_FOREACH                  => 7,
+                                   T_FUNCTION                 => 8,
+                                   T_FUNC_C                   => 12,
+                                   T_GLOBAL                   => 6,
+                                   T_GOTO                     => 4,
+                                   T_HALT_COMPILER            => 15,
+                                   T_IF                       => 2,
+                                   T_IMPLEMENTS               => 10,
+                                   T_INC                      => 2,
+                                   T_INCLUDE                  => 7,
+                                   T_INCLUDE_ONCE             => 12,
+                                   T_INSTANCEOF               => 10,
+                                   T_INSTEADOF                => 9,
+                                   T_INTERFACE                => 9,
+                                   T_ISSET                    => 5,
+                                   T_IS_EQUAL                 => 2,
+                                   T_IS_GREATER_OR_EQUAL      => 2,
+                                   T_IS_IDENTICAL             => 3,
+                                   T_IS_NOT_EQUAL             => 2,
+                                   T_IS_NOT_IDENTICAL         => 3,
+                                   T_IS_SMALLER_OR_EQUAL      => 2,
+                                   T_LINE                     => 8,
+                                   T_LIST                     => 4,
+                                   T_LOGICAL_AND              => 3,
+                                   T_LOGICAL_OR               => 2,
+                                   T_LOGICAL_XOR              => 3,
+                                   T_METHOD_C                 => 10,
+                                   T_MINUS_EQUAL              => 2,
+                                   T_MOD_EQUAL                => 2,
+                                   T_MUL_EQUAL                => 2,
+                                   T_NAMESPACE                => 9,
+                                   T_NS_C                     => 13,
+                                   T_NS_SEPARATOR             => 1,
+                                   T_NEW                      => 3,
+                                   T_OBJECT_OPERATOR          => 2,
+                                   T_OPEN_TAG_WITH_ECHO       => 3,
+                                   T_OR_EQUAL                 => 2,
+                                   T_PLUS_EQUAL               => 2,
+                                   T_PRINT                    => 5,
+                                   T_PRIVATE                  => 7,
+                                   T_PUBLIC                   => 6,
+                                   T_PROTECTED                => 9,
+                                   T_REQUIRE                  => 7,
+                                   T_REQUIRE_ONCE             => 12,
+                                   T_RETURN                   => 6,
+                                   T_STATIC                   => 6,
+                                   T_SWITCH                   => 6,
+                                   T_THROW                    => 5,
+                                   T_TRAIT                    => 5,
+                                   T_TRAIT_C                  => 9,
+                                   T_TRY                      => 3,
+                                   T_UNSET                    => 5,
+                                   T_USE                      => 3,
+                                   T_VAR                      => 3,
+                                   T_WHILE                    => 5,
+                                   T_XOR_EQUAL                => 2,
+                                   T_YIELD                    => 5,
+                                   T_OPEN_CURLY_BRACKET       => 1,
+                                   T_CLOSE_CURLY_BRACKET      => 1,
+                                   T_OPEN_SQUARE_BRACKET      => 1,
+                                   T_CLOSE_SQUARE_BRACKET     => 1,
+                                   T_OPEN_PARENTHESIS         => 1,
+                                   T_CLOSE_PARENTHESIS        => 1,
+                                   T_COLON                    => 1,
+                                   T_STRING_CONCAT            => 1,
+                                   T_INLINE_THEN              => 1,
+                                   T_INLINE_ELSE              => 1,
+                                   T_NULL                     => 4,
+                                   T_FALSE                    => 5,
+                                   T_TRUE                     => 4,
+                                   T_SEMICOLON                => 1,
+                                   T_EQUAL                    => 1,
+                                   T_MULTIPLY                 => 1,
+                                   T_DIVIDE                   => 1,
+                                   T_PLUS                     => 1,
+                                   T_MINUS                    => 1,
+                                   T_MODULUS                  => 1,
+                                   T_POW                      => 2,
+                                   T_SPACESHIP                => 3,
+                                   T_BITWISE_AND              => 1,
+                                   T_BITWISE_OR               => 1,
+                                   T_BITWISE_XOR              => 1,
+                                   T_SL                       => 2,
+                                   T_SR                       => 2,
+                                   T_SL_EQUAL                 => 3,
+                                   T_SR_EQUAL                 => 3,
+                                   T_ARRAY_HINT               => 5,
+                                   T_GREATER_THAN             => 1,
+                                   T_LESS_THAN                => 1,
+                                   T_BOOLEAN_NOT              => 1,
+                                   T_SELF                     => 4,
+                                   T_PARENT                   => 6,
+                                   T_COMMA                    => 1,
+                                   T_THIS                     => 4,
+                                   T_CLOSURE                  => 8,
+                                   T_BACKTICK                 => 1,
+                                   T_OPEN_SHORT_ARRAY         => 1,
+                                   T_CLOSE_SHORT_ARRAY        => 1,
+                                  );
+
+    /**
+     * Tokens that represent assignments.
+     *
+     * @var array(int)
+     */
+    public static $assignmentTokens = array(
+                                       T_EQUAL        => T_EQUAL,
+                                       T_AND_EQUAL    => T_AND_EQUAL,
+                                       T_CONCAT_EQUAL => T_CONCAT_EQUAL,
+                                       T_DIV_EQUAL    => T_DIV_EQUAL,
+                                       T_MINUS_EQUAL  => T_MINUS_EQUAL,
+                                       T_MOD_EQUAL    => T_MOD_EQUAL,
+                                       T_MUL_EQUAL    => T_MUL_EQUAL,
+                                       T_PLUS_EQUAL   => T_PLUS_EQUAL,
+                                       T_XOR_EQUAL    => T_XOR_EQUAL,
+                                       T_DOUBLE_ARROW => T_DOUBLE_ARROW,
+                                       T_SL_EQUAL     => T_SL_EQUAL,
+                                       T_SR_EQUAL     => T_SR_EQUAL,
+                                      );
+
+    /**
+     * Tokens that represent equality comparisons.
+     *
+     * @var array(int)
+     */
+    public static $equalityTokens = array(
+                                     T_IS_EQUAL            => T_IS_EQUAL,
+                                     T_IS_NOT_EQUAL        => T_IS_NOT_EQUAL,
+                                     T_IS_IDENTICAL        => T_IS_IDENTICAL,
+                                     T_IS_NOT_IDENTICAL    => T_IS_NOT_IDENTICAL,
+                                     T_IS_SMALLER_OR_EQUAL => T_IS_SMALLER_OR_EQUAL,
+                                     T_IS_GREATER_OR_EQUAL => T_IS_GREATER_OR_EQUAL,
+                                    );
+
+    /**
+     * Tokens that represent comparison operator.
+     *
+     * @var array(int)
+     */
+    public static $comparisonTokens = array(
+                                       T_IS_EQUAL            => T_IS_EQUAL,
+                                       T_IS_IDENTICAL        => T_IS_IDENTICAL,
+                                       T_IS_NOT_EQUAL        => T_IS_NOT_EQUAL,
+                                       T_IS_NOT_IDENTICAL    => T_IS_NOT_IDENTICAL,
+                                       T_LESS_THAN           => T_LESS_THAN,
+                                       T_GREATER_THAN        => T_GREATER_THAN,
+                                       T_IS_SMALLER_OR_EQUAL => T_IS_SMALLER_OR_EQUAL,
+                                       T_IS_GREATER_OR_EQUAL => T_IS_GREATER_OR_EQUAL,
+                                      );
+
+    /**
+     * Tokens that represent arithmetic operators.
+     *
+     * @var array(int)
+     */
+    public static $arithmeticTokens = array(
+                                       T_PLUS     => T_PLUS,
+                                       T_MINUS    => T_MINUS,
+                                       T_MULTIPLY => T_MULTIPLY,
+                                       T_DIVIDE   => T_DIVIDE,
+                                       T_MODULUS  => T_MODULUS,
+                                      );
+
+    /**
+     * Tokens that represent casting.
+     *
+     * @var array(int)
+     */
+    public static $castTokens = array(
+                                 T_INT_CAST    => T_INT_CAST,
+                                 T_STRING_CAST => T_STRING_CAST,
+                                 T_DOUBLE_CAST => T_DOUBLE_CAST,
+                                 T_ARRAY_CAST  => T_ARRAY_CAST,
+                                 T_BOOL_CAST   => T_BOOL_CAST,
+                                 T_OBJECT_CAST => T_OBJECT_CAST,
+                                 T_UNSET_CAST  => T_UNSET_CAST,
+                                 T_BINARY_CAST => T_BINARY_CAST,
+                                );
+
+    /**
+     * Token types that open parenthesis.
+     *
+     * @var array(int)
+     */
+    public static $parenthesisOpeners = array(
+                                         T_ARRAY    => T_ARRAY,
+                                         T_FUNCTION => T_FUNCTION,
+                                         T_CLOSURE  => T_CLOSURE,
+                                         T_WHILE    => T_WHILE,
+                                         T_FOR      => T_FOR,
+                                         T_FOREACH  => T_FOREACH,
+                                         T_SWITCH   => T_SWITCH,
+                                         T_IF       => T_IF,
+                                         T_ELSEIF   => T_ELSEIF,
+                                         T_CATCH    => T_CATCH,
+                                         T_DECLARE  => T_DECLARE,
+                                        );
+
+    /**
+     * Tokens that are allowed to open scopes.
+     *
+     * @var array(int)
+     */
+    public static $scopeOpeners = array(
+                                   T_CLASS     => T_CLASS,
+                                   T_INTERFACE => T_INTERFACE,
+                                   T_TRAIT     => T_TRAIT,
+                                   T_NAMESPACE => T_NAMESPACE,
+                                   T_FUNCTION  => T_FUNCTION,
+                                   T_CLOSURE   => T_CLOSURE,
+                                   T_IF        => T_IF,
+                                   T_SWITCH    => T_SWITCH,
+                                   T_CASE      => T_CASE,
+                                   T_DECLARE   => T_DECLARE,
+                                   T_DEFAULT   => T_DEFAULT,
+                                   T_WHILE     => T_WHILE,
+                                   T_ELSE      => T_ELSE,
+                                   T_ELSEIF    => T_ELSEIF,
+                                   T_FOR       => T_FOR,
+                                   T_FOREACH   => T_FOREACH,
+                                   T_DO        => T_DO,
+                                   T_TRY       => T_TRY,
+                                   T_CATCH     => T_CATCH,
+                                   T_FINALLY   => T_FINALLY,
+                                   T_PROPERTY  => T_PROPERTY,
+                                   T_OBJECT    => T_OBJECT,
+                                   T_USE       => T_USE,
+                                  );
+
+    /**
+     * Tokens that represent scope modifiers.
+     *
+     * @var array(int)
+     */
+    public static $scopeModifiers = array(
+                                     T_PRIVATE   => T_PRIVATE,
+                                     T_PUBLIC    => T_PUBLIC,
+                                     T_PROTECTED => T_PROTECTED,
+                                    );
+
+    /**
+     * Tokens that can prefix a method name
+     *
+     * @var array(int)
+     */
+    public static $methodPrefixes = array(
+                                     T_PRIVATE   => T_PRIVATE,
+                                     T_PUBLIC    => T_PUBLIC,
+                                     T_PROTECTED => T_PROTECTED,
+                                     T_ABSTRACT  => T_ABSTRACT,
+                                     T_STATIC    => T_STATIC,
+                                     T_FINAL     => T_FINAL,
+                                    );
+
+    /**
+     * Tokens that perform operations.
+     *
+     * @var array(int)
+     */
+    public static $operators = array(
+                                T_MINUS       => T_MINUS,
+                                T_PLUS        => T_PLUS,
+                                T_MULTIPLY    => T_MULTIPLY,
+                                T_DIVIDE      => T_DIVIDE,
+                                T_MODULUS     => T_MODULUS,
+                                T_POW         => T_POW,
+                                T_SPACESHIP   => T_SPACESHIP,
+                                T_BITWISE_AND => T_BITWISE_AND,
+                                T_BITWISE_OR  => T_BITWISE_OR,
+                                T_BITWISE_XOR => T_BITWISE_XOR,
+                                T_SL          => T_SL,
+                                T_SR          => T_SR,
+                               );
+
+    /**
+     * Tokens that perform boolean operations.
+     *
+     * @var array(int)
+     */
+    public static $booleanOperators = array(
+                                       T_BOOLEAN_AND => T_BOOLEAN_AND,
+                                       T_BOOLEAN_OR  => T_BOOLEAN_OR,
+                                       T_LOGICAL_AND => T_LOGICAL_AND,
+                                       T_LOGICAL_OR  => T_LOGICAL_OR,
+                                       T_LOGICAL_XOR => T_LOGICAL_XOR,
+                                      );
+
+    /**
+     * Tokens that open code blocks.
+     *
+     * @var array(int)
+     */
+    public static $blockOpeners = array(
+                                   T_OPEN_CURLY_BRACKET  => T_OPEN_CURLY_BRACKET,
+                                   T_OPEN_SQUARE_BRACKET => T_OPEN_SQUARE_BRACKET,
+                                   T_OPEN_PARENTHESIS    => T_OPEN_PARENTHESIS,
+                                   T_OBJECT              => T_OBJECT,
+                                  );
+
+    /**
+     * Tokens that don't represent code.
+     *
+     * @var array(int)
+     */
+    public static $emptyTokens = array(
+                                  T_WHITESPACE             => T_WHITESPACE,
+                                  T_COMMENT                => T_COMMENT,
+                                  T_DOC_COMMENT            => T_DOC_COMMENT,
+                                  T_DOC_COMMENT_STAR       => T_DOC_COMMENT_STAR,
+                                  T_DOC_COMMENT_WHITESPACE => T_DOC_COMMENT_WHITESPACE,
+                                  T_DOC_COMMENT_TAG        => T_DOC_COMMENT_TAG,
+                                  T_DOC_COMMENT_OPEN_TAG   => T_DOC_COMMENT_OPEN_TAG,
+                                  T_DOC_COMMENT_CLOSE_TAG  => T_DOC_COMMENT_CLOSE_TAG,
+                                  T_DOC_COMMENT_STRING     => T_DOC_COMMENT_STRING,
+                                 );
+
+    /**
+     * Tokens that are comments.
+     *
+     * @var array(int)
+     */
+    public static $commentTokens = array(
+                                    T_COMMENT                => T_COMMENT,
+                                    T_DOC_COMMENT            => T_DOC_COMMENT,
+                                    T_DOC_COMMENT_STAR       => T_DOC_COMMENT_STAR,
+                                    T_DOC_COMMENT_WHITESPACE => T_DOC_COMMENT_WHITESPACE,
+                                    T_DOC_COMMENT_TAG        => T_DOC_COMMENT_TAG,
+                                    T_DOC_COMMENT_OPEN_TAG   => T_DOC_COMMENT_OPEN_TAG,
+                                    T_DOC_COMMENT_CLOSE_TAG  => T_DOC_COMMENT_CLOSE_TAG,
+                                    T_DOC_COMMENT_STRING     => T_DOC_COMMENT_STRING,
+                                   );
+
+    /**
+     * Tokens that represent strings.
+     *
+     * Note that T_STRINGS are NOT represented in this list.
+     *
+     * @var array(int)
+     */
+    public static $stringTokens = array(
+                                   T_CONSTANT_ENCAPSED_STRING => T_CONSTANT_ENCAPSED_STRING,
+                                   T_DOUBLE_QUOTED_STRING     => T_DOUBLE_QUOTED_STRING,
+                                  );
+
+    /**
+     * Tokens that represent brackets and parenthesis.
+     *
+     * @var array(int)
+     */
+    public static $bracketTokens = array(
+                                    T_OPEN_CURLY_BRACKET   => T_OPEN_CURLY_BRACKET,
+                                    T_CLOSE_CURLY_BRACKET  => T_CLOSE_CURLY_BRACKET,
+                                    T_OPEN_SQUARE_BRACKET  => T_OPEN_SQUARE_BRACKET,
+                                    T_CLOSE_SQUARE_BRACKET => T_CLOSE_SQUARE_BRACKET,
+                                    T_OPEN_PARENTHESIS     => T_OPEN_PARENTHESIS,
+                                    T_CLOSE_PARENTHESIS    => T_CLOSE_PARENTHESIS,
+                                   );
+
+    /**
+     * Tokens that include files.
+     *
+     * @var array(int)
+     */
+    public static $includeTokens = array(
+                                    T_REQUIRE_ONCE => T_REQUIRE_ONCE,
+                                    T_REQUIRE      => T_REQUIRE,
+                                    T_INCLUDE_ONCE => T_INCLUDE_ONCE,
+                                    T_INCLUDE      => T_INCLUDE,
+                                   );
+
+    /**
+     * Tokens that make up a heredoc string.
+     *
+     * @var array(int)
+     */
+    public static $heredocTokens = array(
+                                    T_START_HEREDOC => T_START_HEREDOC,
+                                    T_END_HEREDOC   => T_END_HEREDOC,
+                                    T_HEREDOC       => T_HEREDOC,
+                                    T_START_NOWDOC  => T_START_NOWDOC,
+                                    T_END_NOWDOC    => T_END_NOWDOC,
+                                    T_NOWDOC        => T_NOWDOC,
+                                   );
+
+    /**
+     * Tokens that represent the names of called functions.
+     *
+     * Mostly, these are just strings. But PHP tokeizes some language
+     * constructs and functions using their own tokens.
+     *
+     * @var array(int)
+     */
+    public static $functionNameTokens = array(
+                                         T_STRING       => T_STRING,
+                                         T_EVAL         => T_EVAL,
+                                         T_EXIT         => T_EXIT,
+                                         T_INCLUDE      => T_INCLUDE,
+                                         T_INCLUDE_ONCE => T_INCLUDE_ONCE,
+                                         T_REQUIRE      => T_REQUIRE,
+                                         T_REQUIRE_ONCE => T_REQUIRE_ONCE,
+                                         T_ISSET        => T_ISSET,
+                                         T_UNSET        => T_UNSET,
+                                         T_EMPTY        => T_EMPTY,
+                                        );
+
+
+    /**
+     * A PHP_CodeSniffer_Tokens class cannot be constructed.
+     *
+     * Only static calls are allowed.
+     */
+    private function __construct()
+    {
+
+    }//end __construct()
+
+
+    /**
+     * Returns the highest weighted token type.
+     *
+     * Tokens are weighted by their approximate frequency of appearance in code
+     * - the less frequently they appear in the code, the higher the weighting.
+     * For example T_CLASS tokens appear very infrequently in a file, and
+     * therefore have a high weighting.
+     *
+     * Returns false if there are no weightings for any of the specified tokens.
+     *
+     * @param array(int) $tokens The token types to get the highest weighted
+     *                           type for.
+     *
+     * @return int The highest weighted token.
+     */
+    public static function getHighestWeightedToken(array $tokens)
+    {
+        $highest     = -1;
+        $highestType = false;
+
+        $weights = self::$weightings;
+
+        foreach ($tokens as $token) {
+            if (isset($weights[$token]) === true) {
+                $weight = $weights[$token];
+            } else {
+                $weight = 0;
+            }
+
+            if ($weight > $highest) {
+                $highest     = $weight;
+                $highestType = $token;
+            }
+        }
+
+        return $highestType;
+
+    }//end getHighestWeightedToken()
+
+
+}//end class
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/README.md	(revision 5534)
@@ -0,0 +1,75 @@
+About
+-----
+
+PHP\_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP\_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
+
+[![Build Status](https://travis-ci.org/squizlabs/PHP_CodeSniffer.svg?branch=phpcs-fixer)](https://travis-ci.org/squizlabs/PHP_CodeSniffer) [![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer)
+
+[![Join the chat at https://gitter.im/squizlabs/PHP_CodeSniffer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/squizlabs/PHP_CodeSniffer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+Requirements
+------------
+
+PHP\_CodeSniffer requires PHP version 5.1.2 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements.
+
+The SVN pre-commit hook requires PHP version 5.2.4 or greater due to its use of the vertical whitespace character.
+
+Installation
+------------
+
+The easiest way to get started with PHP\_CodeSniffer is to download the [Phar](http://php.net/manual/en/intro.phar.php) files for each of the commands:
+
+    curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
+    php phpcs.phar -h
+
+    curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar
+    php phpcbf.phar -h
+
+If you use PEAR, you can install PHP\_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP\_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command:
+
+    pear install PHP_CodeSniffer
+
+If you prefer using [Composer](http://getcomposer.org/) you can easily install PHP_CodeSniffer system-wide with the following command:
+
+    composer global require "squizlabs/php_codesniffer=*"
+
+Make sure you have `~/.composer/vendor/bin/` in your PATH.
+
+Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:
+
+```json
+{
+    "require-dev": {
+        "squizlabs/php_codesniffer": "2.*"
+    }
+}
+```
+
+You will then be able to run PHP_CodeSniffer from the vendor bin directory:
+
+    ./vendor/bin/phpcs -h
+    ./vendor/bin/phpcbf -h
+
+You can also download the PHP\_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git checkout:
+
+    git clone git://github.com/squizlabs/PHP_CodeSniffer.git
+    cd PHP_CodeSniffer
+    php scripts/phpcs -h
+    php scripts/phpcbf -h
+
+Documentation
+-------------
+
+The documentation for PHP\_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki).
+
+Information about upcoming features and releases is available on the [Squiz Labs blog](http://www.squizlabs.com/php-codesniffer).
+
+Issues
+------
+
+Bug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/squizlabs/PHP_CodeSniffer/issues) or the [PEAR bug tracker](http://pear.php.net/package/PHP_CodeSniffer/bugs).
+
+Contributing
+-------------
+
+See [CONTRIBUTING.md](CONTRIBUTING.md) for information.
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/composer.json	(revision 5534)
@@ -0,0 +1,66 @@
+{
+    "name": "squizlabs/php_codesniffer",
+    "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+    "type": "library",
+    "keywords": [
+        "phpcs",
+        "standards"
+    ],
+    "homepage": "http://www.squizlabs.com/php-codesniffer",
+    "license": "BSD-3-Clause",
+    "authors": [
+        {
+            "name": "Greg Sherwood",
+            "role": "lead"
+        }
+    ],
+    "support": {
+        "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
+        "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki",
+        "source": "https://github.com/squizlabs/PHP_CodeSniffer"
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.x-dev"
+        }
+    },
+    "autoload": {
+        "classmap": [
+            "CodeSniffer.php",
+            "CodeSniffer/CLI.php",
+            "CodeSniffer/Exception.php",
+            "CodeSniffer/File.php",
+            "CodeSniffer/Fixer.php",
+            "CodeSniffer/Report.php",
+            "CodeSniffer/Reporting.php",
+            "CodeSniffer/Sniff.php",
+            "CodeSniffer/Tokens.php",
+            "CodeSniffer/Reports/",
+            "CodeSniffer/Tokenizers/",
+            "CodeSniffer/DocGenerators/",
+            "CodeSniffer/Standards/AbstractPatternSniff.php",
+            "CodeSniffer/Standards/AbstractScopeSniff.php",
+            "CodeSniffer/Standards/AbstractVariableSniff.php",
+            "CodeSniffer/Standards/IncorrectPatternException.php",
+            "CodeSniffer/Standards/Generic/Sniffs/",
+            "CodeSniffer/Standards/MySource/Sniffs/",
+            "CodeSniffer/Standards/PEAR/Sniffs/",
+            "CodeSniffer/Standards/PSR1/Sniffs/",
+            "CodeSniffer/Standards/PSR2/Sniffs/",
+            "CodeSniffer/Standards/Squiz/Sniffs/",
+            "CodeSniffer/Standards/Zend/Sniffs/"
+        ]
+    },
+    "require": {
+        "php": ">=5.1.2",
+        "ext-tokenizer": "*",
+        "ext-xmlwriter": "*"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "~4.0"
+    },
+    "bin": [
+        "scripts/phpcs",
+        "scripts/phpcbf"
+    ]
+}
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/licence.txt
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/licence.txt	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/licence.txt	(revision 5534)
@@ -0,0 +1,24 @@
+Copyright (c) 2012, Squiz Pty Ltd (ABN 77 084 670 600)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Squiz Pty Ltd nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/phpcs.xml.dist
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/phpcs.xml.dist	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/phpcs.xml.dist	(revision 5534)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<ruleset name="PHP_CodeSniffer">
+ <description>The coding standard for PHP_CodeSniffer itself.</description>
+
+ <file>CodeSniffer.php</file>
+ <file>CodeSniffer</file>
+ <file>scripts</file>
+
+ <exclude-pattern>*/Tests/*</exclude-pattern>
+
+ <arg name="report" value="summary"/>
+ <arg value="np"/>
+
+ <rule ref="PHPCS"/>
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/phpunit.xml.dist
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/phpunit.xml.dist	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/phpunit.xml.dist	(revision 5534)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit>
+    <testsuites>
+        <testsuite name="PHP_CodeSniffer Test Suite">
+            <file>tests/AllTests.php</file>
+        </testsuite>
+    </testsuites>
+</phpunit>
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/build-phar.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/build-phar.php	(revision 5534)
@@ -0,0 +1,128 @@
+#!/usr/bin/env php
+<?php
+/**
+ * Build a PHPCS phar.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Benjamin Pearson <bpearson@squiz.com.au>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+error_reporting(E_ALL | E_STRICT);
+
+if (ini_get('phar.readonly') === '1') {
+    echo 'Unable to build, phar.readonly in php.ini is set to read only.'.PHP_EOL;
+    exit(1);
+}
+
+$cwd = getCwd();
+require_once __DIR__.'/../CodeSniffer.php';
+
+$scripts = array(
+            'phpcs',
+            'phpcbf',
+           );
+
+foreach ($scripts as $script) {
+    echo "Building $script phar".PHP_EOL;
+
+    $pharFile = $cwd.'/'.$script.'.phar';
+    echo "\t=> $pharFile".PHP_EOL;
+    if (file_exists($pharFile) === true) {
+        echo "\t** file exists, removing **".PHP_EOL;
+        unlink($pharFile);
+    }
+
+    $phar = new Phar($pharFile, 0, $script.'.phar');
+
+    echo "\t=> adding files from package.xml... ";
+    buildFromPackage($phar);
+    echo 'done'.PHP_EOL;
+
+    echo "\t=> adding stub... ";
+    $stub  = '#!/usr/bin/env php'."\n";
+    $stub .= '<?php'."\n";
+    $stub .= 'Phar::mapPhar(\''.$script.'.phar\');'."\n";
+    $stub .= 'require_once "phar://'.$script.'.phar/CodeSniffer/CLI.php";'."\n";
+    $stub .= '$cli = new PHP_CodeSniffer_CLI();'."\n";
+    $stub .= '$cli->run'.$script.'();'."\n";
+    $stub .= '__HALT_COMPILER();';
+    $phar->setStub($stub);
+    echo 'done'.PHP_EOL;
+}//end foreach
+
+
+/**
+ * Build from a package list.
+ *
+ * @param object $phar The Phar class.
+ *
+ * @return void
+ */
+function buildFromPackage(&$phar)
+{
+    $packageFile = realpath(__DIR__.'/../package.xml');
+    $dom         = new DOMDocument('1.0', 'utf-8');
+    $loaded      = $dom->loadXML(file_get_contents($packageFile));
+    if ($loaded === false) {
+        echo "Unable to load package file: $packageFile".PHP_EOL;
+        exit(1);
+    }
+
+    $contents  = $dom->getElementsByTagName('contents');
+    $topLevels = $contents->item(0)->childNodes;
+    $tlLength  = $topLevels->length;
+    for ($l = 0; $l < $tlLength; $l++) {
+        $currentLevel = $topLevels->item($l);
+        buildFromNode($phar, $currentLevel, '');
+    }
+
+    // Add licence file.
+    $phar->addFile(realpath(__DIR__.'/../licence.txt'), 'licence.txt');
+    $phar['licence.txt']->compress(Phar::GZ);
+
+}//end buildFromPackage()
+
+
+/**
+ * Add from a node.
+ *
+ * @param object $phar   The Phar class.
+ * @param object $node   The node to add.
+ * @param string $prefix The prefix of the structure.
+ *
+ * @return void
+ */
+function buildFromNode(&$phar, $node, $prefix='')
+{
+    $nodeName = $node->nodeName;
+    if ($nodeName !== 'dir' && $nodeName !== 'file') {
+        // Invalid node.
+        return;
+    }
+
+    $path = $prefix.$node->getAttribute('name');
+    if ($node->getAttribute('role') === 'php' || $node->getAttribute('role') === 'data') {
+        $path = ltrim($path, '/');
+        $phar->addFile(realpath(__DIR__.'/../'.$path), $path);
+        $phar[$path]->compress(Phar::GZ);
+    }
+
+    if ($nodeName === 'dir') {
+        // Descend into the depths.
+        $path     = rtrim($path, '/').'/';
+        $children = $node->childNodes;
+        $childLn  = $children->length;
+        for ($c = 0; $c < $childLn; $c++) {
+            $child = $children->item($c);
+            buildFromNode($phar, $child, $path);
+        }
+    }
+
+}//end buildFromNode()
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcbf
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcbf	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcbf	(revision 5534)
@@ -0,0 +1,23 @@
+#!/usr/bin/env php
+<?php
+/**
+ * PHP Code Beautifier and Fixer
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (is_file(dirname(__FILE__).'/../CodeSniffer/CLI.php') === true) {
+    include_once dirname(__FILE__).'/../CodeSniffer/CLI.php';
+} else {
+    include_once 'PHP/CodeSniffer/CLI.php';
+}
+
+$cli = new PHP_CodeSniffer_CLI();
+$cli->runphpcbf();
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat	(revision 5534)
@@ -0,0 +1,19 @@
+@echo off
+REM PHP Code Beautifier and Fixer
+REM 
+REM PHP version 5
+REM 
+REM @category  PHP
+REM @package   PHP_CodeSniffer
+REM @author    Greg Sherwood <gsherwood@squiz.net>
+REM @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+REM @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+REM @link      http://pear.php.net/package/PHP_CodeSniffer
+
+if "%PHPBIN%" == "" set PHPBIN=@php_bin@
+if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
+GOTO RUN
+:USE_PEAR_PATH
+set PHPBIN=%PHP_PEAR_PHP_BIN%
+:RUN
+"%PHPBIN%" "@bin_dir@\phpcbf" %*
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs	(revision 5534)
@@ -0,0 +1,25 @@
+#!/usr/bin/env php
+<?php
+/**
+ * PHP_CodeSniffer tokenizes PHP code and detects violations of a
+ * defined set of coding standards.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @author    Marc McIntyre <mmcintyre@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (is_file(dirname(__FILE__).'/../CodeSniffer/CLI.php') === true) {
+    include_once dirname(__FILE__).'/../CodeSniffer/CLI.php';
+} else {
+    include_once 'PHP/CodeSniffer/CLI.php';
+}
+
+$cli = new PHP_CodeSniffer_CLI();
+$cli->runphpcs();
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs-svn-pre-commit
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs-svn-pre-commit	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs-svn-pre-commit	(revision 5534)
@@ -0,0 +1,229 @@
+#!@php_bin@
+<?php
+/**
+ * A commit hook for SVN.
+ *
+ * PHP version 5
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Jack Bates <ms419@freezone.co.uk>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+
+if (is_file(dirname(__FILE__).'/../CodeSniffer/CLI.php') === true) {
+    include_once dirname(__FILE__).'/../CodeSniffer/CLI.php';
+} else {
+    include_once 'PHP/CodeSniffer/CLI.php';
+}
+
+define('PHP_CODESNIFFER_SVNLOOK', '/usr/bin/svnlook');
+
+
+/**
+ * A class to process command line options.
+ *
+ * @category  PHP
+ * @package   PHP_CodeSniffer
+ * @author    Jack Bates <ms419@freezone.co.uk>
+ * @author    Greg Sherwood <gsherwood@squiz.net>
+ * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ * @version   Release: @package_version@
+ * @link      http://pear.php.net/package/PHP_CodeSniffer
+ */
+class PHP_CodeSniffer_SVN_Hook extends PHP_CodeSniffer_CLI
+{
+
+
+    /**
+     * Get a list of default values for all possible command line arguments.
+     *
+     * @return array
+     */
+    public function getDefaults()
+    {
+        $defaults = parent::getDefaults();
+
+        $defaults['svnArgs'] = array();
+        return $defaults;
+
+    }//end getDefaults()
+
+
+    /**
+     * Processes an unknown command line argument.
+     *
+     * Assumes all unknown arguments are files and folders to check.
+     *
+     * @param string $arg The command line argument.
+     * @param int    $pos The position of the argument on the command line.
+     *
+     * @return void
+     */
+    public function processUnknownArgument($arg, $pos)
+    {
+        $this->values['svnArgs'][] = escapeshellarg($arg);
+
+    }//end processUnknownArgument()
+
+
+    /**
+     * Runs PHP_CodeSniffer over files are directories.
+     *
+     * @param array $values An array of values determined from CLI args.
+     *
+     * @return int The number of error and warning messages shown.
+     * @see    getCommandLineValues()
+     */
+    public function process($values=array())
+    {
+        if (empty($values) === true) {
+            $values = $this->getCommandLineValues();
+        } else {
+            $values       = array_merge($this->getDefaults(), $values);
+            $this->values = $values;
+        }
+
+        // Get list of files in this transaction.
+        $command = PHP_CODESNIFFER_SVNLOOK.' changed '.implode(' ', $values['svnArgs']);
+        $handle  = popen($command, 'r');
+        if ($handle === false) {
+            echo 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL;
+            exit(2);
+        }
+
+        $contents = stream_get_contents($handle);
+        fclose($handle);
+
+        // Do not check deleted paths.
+        $contents = preg_replace('/^D.*/m', null, $contents);
+
+        // Drop the four characters representing the action which precede the path on
+        // each line.
+        $contents = preg_replace('/^.{4}/m', null, $contents);
+
+        $values['standard'] = $this->validateStandard($values['standard']);
+        foreach ($values['standard'] as $standard) {
+            if (PHP_CodeSniffer::isInstalledStandard($standard) === false) {
+                // They didn't select a valid coding standard, so help them
+                // out by letting them know which standards are installed.
+                echo 'ERROR: the "'.$standard.'" coding standard is not installed. ';
+                $this->printInstalledStandards();
+                exit(2);
+            }
+        }
+
+        $phpcs = new PHP_CodeSniffer(
+            $values['verbosity'],
+            $values['tabWidth'],
+            $values['encoding']
+        );
+
+        // Set file extensions if they were specified. Otherwise,
+        // let PHP_CodeSniffer decide on the defaults.
+        if (empty($values['extensions']) === false) {
+            $phpcs->setAllowedFileExtensions($values['extensions']);
+        } else {
+            $phpcs->setAllowedFileExtensions(array_keys($phpcs->defaultFileExtensions));
+        }
+
+        // Set ignore patterns if they were specified.
+        if (empty($values['ignored']) === false) {
+            $phpcs->setIgnorePatterns($values['ignored']);
+        }
+
+        // Set some convenience member vars.
+        if ($values['errorSeverity'] === null) {
+            $this->errorSeverity = PHPCS_DEFAULT_ERROR_SEV;
+        } else {
+            $this->errorSeverity = $values['errorSeverity'];
+        }
+
+        if ($values['warningSeverity'] === null) {
+            $this->warningSeverity = PHPCS_DEFAULT_WARN_SEV;
+        } else {
+            $this->warningSeverity = $values['warningSeverity'];
+        }
+
+        if (empty($values['reports']) === true) {
+            $this->values['reports']['full'] = $values['reportFile'];
+        }
+
+        // Initialize PHP_CodeSniffer listeners but don't process any files.
+        $phpcs->setCli($this);
+        $phpcs->initStandard($values['standard'], $values['sniffs']);
+
+        // Need double quotes around the following regex beause the vertical whitespace
+        // char is not always treated correctly for whatever reason.
+        foreach (preg_split("/\v|\n/", $contents, -1, PREG_SPLIT_NO_EMPTY) as $path) {
+            // No need to process folders as each changed file is checked.
+            if (substr($path, -1) === '/') {
+                continue;
+            }
+
+            // We need to check ignore rules ourself because they are
+            // not checked when processing a single file.
+            if ($phpcs->shouldProcessFile($path, dirname($path)) === false) {
+                continue;
+            }
+
+            // Get the contents of each file, as it would be after this transaction.
+            $command = PHP_CODESNIFFER_SVNLOOK.' cat '.implode(' ', $values['svnArgs']).' '.escapeshellarg($path);
+            $handle  = popen($command, 'r');
+            if ($handle === false) {
+                echo 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL;
+                exit(2);
+            }
+
+            $contents = stream_get_contents($handle);
+            fclose($handle);
+
+            $phpcs->processFile($path, $contents);
+        }//end foreach
+
+        return $this->printErrorReport(
+            $phpcs,
+            $values['reports'],
+            $values['showSources'],
+            $values['reportFile'],
+            $values['reportWidth']
+        );
+
+    }//end process()
+
+
+    /**
+     * Prints out the usage information for this script.
+     *
+     * @return void
+     */
+    public function printUsage()
+    {
+        parent::printUsage();
+
+        echo PHP_EOL;
+        echo '    Each additional argument is passed to the `svnlook changed ...`'.PHP_EOL;
+        echo '    and `svnlook cat ...` commands.  The report is printed on standard output,'.PHP_EOL;
+        echo '    however Subversion displays only standard error to the user, so in a'.PHP_EOL;
+        echo '    pre-commit hook, this script should be invoked as follows:'.PHP_EOL;
+        echo PHP_EOL;
+        echo '    '.basename($_SERVER['argv'][0]).' ... "$REPOS" -t "$TXN" >&2 || exit 1'.PHP_EOL;
+
+    }//end printUsage()
+
+
+}//end class
+
+$phpcs = new PHP_CodeSniffer_SVN_Hook();
+
+PHP_CodeSniffer_Reporting::startTiming();
+$phpcs->checkRequirements();
+
+$numErrors = $phpcs->process();
+if ($numErrors !== 0) {
+    exit(1);
+}
Index: /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat
===================================================================
--- /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat	(revision 5534)
@@ -0,0 +1,21 @@
+@echo off
+REM PHP_CodeSniffer tokenizes PHP code and detects violations of a
+REM defined set of coding standards.
+REM 
+REM PHP version 5
+REM 
+REM @category  PHP
+REM @package   PHP_CodeSniffer
+REM @author    Greg Sherwood <gsherwood@squiz.net>
+REM @author    Marc McIntyre <mmcintyre@squiz.net>
+REM @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
+REM @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+REM @link      http://pear.php.net/package/PHP_CodeSniffer
+
+if "%PHPBIN%" == "" set PHPBIN=@php_bin@
+if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
+GOTO RUN
+:USE_PEAR_PATH
+set PHPBIN=%PHP_PEAR_PHP_BIN%
+:RUN
+"%PHPBIN%" "@bin_dir@\phpcs" %*
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,52 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 2.5.3 - 2015-09-15
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#15](https://github.com/zendframework/zend-cache/pull/15) fixes an issue
+  observed on HHVM when merging a list of memcached servers to add to the
+  storage resource.
+- [#17](https://github.com/zendframework/zend-cache/pull/17) Composer: moved
+  `zendframework/zend-serializer` from `require` to `require-dev` as using the
+  serializer is optional.
+- A fix was provided for [ZF2015-07](http://framework.zend.com/security/advisory/ZF2015-07),
+  ensuring that any directories or files created by the component use umask 0002
+  in order to prevent arbitrary local execution and/or local privilege
+  escalation.
+
+## 2.5.2 - 2015-07-16
+
+### Added
+
+- [#10](https://github.com/zendframework/zend-cache/pull/10) adds TTL support
+  for the Redis adapter.
+- [#6](https://github.com/zendframework/zend-cache/pull/6) adds more suggestions
+  to the `composer.json` for PHP extensions supported by storage adapters.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#9](https://github.com/zendframework/zend-cache/pull/9) fixes an issue when
+  connecting to a Redis instance with the `persistent_id` option.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-cache/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-cache.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
+standards checks, and provides configuration for our selected checks.
+`php-cs-fixer` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
+```
+
+To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
+flag:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
+```
+
+If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-cache)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-cache.git
+   $ cd zend-cache
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-cache.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-cache.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/README.md	(revision 5534)
@@ -0,0 +1,12 @@
+# zend-cache
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-cache.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-cache)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-cache/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-cache?branch=master)
+
+`Zend\Cache` provides a general cache system for PHP. The `Zend\Cache` component
+is able to cache different patterns (class, object, output, etc) using different
+storage adapters (DB, File, Memcache, etc).
+
+
+- File issues at https://github.com/zendframework/zend-cache/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-cache
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/composer.json	(revision 5534)
@@ -0,0 +1,53 @@
+{
+    "name": "zendframework/zend-cache",
+    "description": "provides a generic way to cache any data",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "cache"
+    ],
+    "homepage": "https://github.com/zendframework/zend-cache",
+    "autoload": {
+        "psr-4": {
+            "Zend\\Cache\\": "src/"
+        }
+    },
+    "require": {
+        "php": ">=5.5",
+        "zendframework/zend-stdlib": "~2.5",
+        "zendframework/zend-servicemanager": "~2.5",
+        "zendframework/zend-eventmanager": "~2.5"
+    },
+    "require-dev": {
+        "zendframework/zend-serializer": "~2.5", 
+        "zendframework/zend-session": "~2.5",
+        "fabpot/php-cs-fixer": "1.7.*",
+        "phpunit/PHPUnit": "~4.0"
+    },
+    "suggest": {
+        "zendframework/zend-serializer": "Zend\\Serializer component",
+        "zendframework/zend-session": "Zend\\Session component",
+        "ext-apcu": "APCU, to use the APC storage adapter",
+        "ext-dba": "DBA, to use the DBA storage adapter",
+        "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter",
+        "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter",
+        "ext-mongo": "Mongo, to use MongoDb storage adapter",
+        "ext-redis": "Redis, to use Redis storage adapter",
+        "ext-wincache": "WinCache, to use the WinCache storage adapter",
+        "ext-xcache": "XCache, to use the XCache storage adapter",
+        "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement"
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.5-dev",
+            "dev-develop": "2.6-dev"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\Cache\\": "test/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/BadMethodCallException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/BadMethodCallException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/BadMethodCallException.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class BadMethodCallException extends \BadMethodCallException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/ExtensionNotLoadedException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/ExtensionNotLoadedException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/ExtensionNotLoadedException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class ExtensionNotLoadedException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class InvalidArgumentException extends \InvalidArgumentException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/LogicException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/LogicException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/LogicException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class LogicException extends \LogicException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/MissingDependencyException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/MissingDependencyException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/MissingDependencyException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class MissingDependencyException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/MissingKeyException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/MissingKeyException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/MissingKeyException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class MissingKeyException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/OutOfSpaceException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/OutOfSpaceException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/OutOfSpaceException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class OutOfSpaceException extends \OverflowException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/UnexpectedValueException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/UnexpectedValueException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/UnexpectedValueException.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class UnexpectedValueException extends \UnexpectedValueException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/UnsupportedMethodCallException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/UnsupportedMethodCallException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Exception/UnsupportedMethodCallException.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Exception;
+
+class UnsupportedMethodCallException extends \BadMethodCallException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/AbstractPattern.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/AbstractPattern.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/AbstractPattern.php	(revision 5534)
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Zend\Cache\Exception;
+
+abstract class AbstractPattern implements PatternInterface
+{
+    /**
+     * @var PatternOptions
+     */
+    protected $options;
+
+    /**
+     * Set pattern options
+     *
+     * @param  PatternOptions $options
+     * @return AbstractPattern
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setOptions(PatternOptions $options)
+    {
+        if (!$options instanceof PatternOptions) {
+            $options = new PatternOptions($options);
+        }
+
+        $this->options = $options;
+        return $this;
+    }
+
+    /**
+     * Get all pattern options
+     *
+     * @return PatternOptions
+     */
+    public function getOptions()
+    {
+        if (null === $this->options) {
+            $this->setOptions(new PatternOptions());
+        }
+        return $this->options;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/CallbackCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/CallbackCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/CallbackCache.php	(revision 5534)
@@ -0,0 +1,202 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Zend\Cache\Exception;
+use Zend\Stdlib\ErrorHandler;
+
+class CallbackCache extends AbstractPattern
+{
+    /**
+     * Set options
+     *
+     * @param  PatternOptions $options
+     * @return CallbackCache
+     * @throws Exception\InvalidArgumentException if missing storage option
+     */
+    public function setOptions(PatternOptions $options)
+    {
+        parent::setOptions($options);
+
+        if (!$options->getStorage()) {
+            throw new Exception\InvalidArgumentException("Missing option 'storage'");
+        }
+        return $this;
+    }
+
+    /**
+     * Call the specified callback or get the result from cache
+     *
+     * @param  callable   $callback  A valid callback
+     * @param  array      $args      Callback arguments
+     * @return mixed Result
+     * @throws Exception\RuntimeException if invalid cached data
+     * @throws \Exception
+     */
+    public function call($callback, array $args = [])
+    {
+        $options = $this->getOptions();
+        $storage = $options->getStorage();
+        $success = null;
+        $key     = $this->generateCallbackKey($callback, $args);
+        $result  = $storage->getItem($key, $success);
+        if ($success) {
+            if (!array_key_exists(0, $result)) {
+                throw new Exception\RuntimeException("Invalid cached data for key '{$key}'");
+            }
+
+            echo isset($result[1]) ? $result[1] : '';
+            return $result[0];
+        }
+
+        $cacheOutput = $options->getCacheOutput();
+        if ($cacheOutput) {
+            ob_start();
+            ob_implicit_flush(0);
+        }
+
+        // TODO: do not cache on errors using [set|restore]_error_handler
+
+        try {
+            if ($args) {
+                $ret = call_user_func_array($callback, $args);
+            } else {
+                $ret = call_user_func($callback);
+            }
+        } catch (\Exception $e) {
+            if ($cacheOutput) {
+                ob_end_flush();
+            }
+            throw $e;
+        }
+
+        if ($cacheOutput) {
+            $data = [$ret, ob_get_flush()];
+        } else {
+            $data = [$ret];
+        }
+
+        $storage->setItem($key, $data);
+
+        return $ret;
+    }
+
+    /**
+     * function call handler
+     *
+     * @param  string $function  Function name to call
+     * @param  array  $args      Function arguments
+     * @return mixed
+     * @throws Exception\RuntimeException
+     * @throws \Exception
+     */
+    public function __call($function, array $args)
+    {
+        return $this->call($function, $args);
+    }
+
+    /**
+     * Generate a unique key in base of a key representing the callback part
+     * and a key representing the arguments part.
+     *
+     * @param  callable   $callback  A valid callback
+     * @param  array      $args      Callback arguments
+     * @return string
+     * @throws Exception\RuntimeException
+     * @throws Exception\InvalidArgumentException
+     */
+    public function generateKey($callback, array $args = [])
+    {
+        return $this->generateCallbackKey($callback, $args);
+    }
+
+    /**
+     * Generate a unique key in base of a key representing the callback part
+     * and a key representing the arguments part.
+     *
+     * @param  callable   $callback  A valid callback
+     * @param  array      $args      Callback arguments
+     * @throws Exception\RuntimeException if callback not serializable
+     * @throws Exception\InvalidArgumentException if invalid callback
+     * @return string
+     */
+    protected function generateCallbackKey($callback, array $args)
+    {
+        if (!is_callable($callback, false, $callbackKey)) {
+            throw new Exception\InvalidArgumentException('Invalid callback');
+        }
+
+        // functions, methods and classnames are case-insensitive
+        $callbackKey = strtolower($callbackKey);
+
+        // generate a unique key of object callbacks
+        if (is_object($callback)) {
+            // Closures & __invoke
+            $object = $callback;
+        } elseif (isset($callback[0])) {
+            // array($object, 'method')
+            $object = $callback[0];
+        }
+        if (isset($object)) {
+            ErrorHandler::start();
+            try {
+                $serializedObject = serialize($object);
+            } catch (\Exception $e) {
+                ErrorHandler::stop();
+                throw new Exception\RuntimeException("Can't serialize callback: see previous exception", 0, $e);
+            }
+            $error = ErrorHandler::stop();
+
+            if (!$serializedObject) {
+                throw new Exception\RuntimeException(
+                    sprintf('Cannot serialize callback%s', ($error ? ': ' . $error->getMessage() : '')),
+                    0,
+                    $error
+                );
+            }
+            $callbackKey.= $serializedObject;
+        }
+
+        return md5($callbackKey) . $this->generateArgumentsKey($args);
+    }
+
+    /**
+     * Generate a unique key of the argument part.
+     *
+     * @param  array $args
+     * @throws Exception\RuntimeException
+     * @return string
+     */
+    protected function generateArgumentsKey(array $args)
+    {
+        if (!$args) {
+            return '';
+        }
+
+        ErrorHandler::start();
+        try {
+            $serializedArgs = serialize(array_values($args));
+        } catch (\Exception $e) {
+            ErrorHandler::stop();
+            throw new Exception\RuntimeException("Can't serialize arguments: see previous exception", 0, $e);
+        }
+        $error = ErrorHandler::stop();
+
+        if (!$serializedArgs) {
+            throw new Exception\RuntimeException(
+                sprintf('Cannot serialize arguments%s', ($error ? ': ' . $error->getMessage() : '')),
+                0,
+                $error
+            );
+        }
+
+        return md5($serializedArgs);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/CaptureCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/CaptureCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/CaptureCache.php	(revision 5534)
@@ -0,0 +1,387 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Zend\Cache\Exception;
+use Zend\Stdlib\ErrorHandler;
+
+class CaptureCache extends AbstractPattern
+{
+    /**
+     * Start the cache
+     *
+     * @param  string $pageId  Page identifier
+     * @return void
+     */
+    public function start($pageId = null)
+    {
+        if ($pageId === null) {
+            $pageId = $this->detectPageId();
+        }
+
+        ob_start(function ($content) use ($pageId) {
+            $this->set($content, $pageId);
+
+            // http://php.net/manual/function.ob-start.php
+            // -> If output_callback  returns FALSE original input is sent to the browser.
+            return false;
+        });
+
+        ob_implicit_flush(0);
+    }
+
+    /**
+     * Write content to page identity
+     *
+     * @param string      $content
+     * @param null|string $pageId
+     * @throws Exception\LogicException
+     */
+    public function set($content, $pageId = null)
+    {
+        $publicDir = $this->getOptions()->getPublicDir();
+        if ($publicDir === null) {
+            throw new Exception\LogicException("Option 'public_dir' no set");
+        }
+
+        if ($pageId === null) {
+            $pageId = $this->detectPageId();
+        }
+
+        $path = $this->pageId2Path($pageId);
+        $file = $path . DIRECTORY_SEPARATOR . $this->pageId2Filename($pageId);
+
+        $this->createDirectoryStructure($publicDir . DIRECTORY_SEPARATOR . $path);
+        $this->putFileContent($publicDir . DIRECTORY_SEPARATOR . $file, $content);
+    }
+
+    /**
+     * Get from cache
+     *
+     * @param  null|string $pageId
+     * @return string|null
+     * @throws Exception\LogicException
+     * @throws Exception\RuntimeException
+     */
+    public function get($pageId = null)
+    {
+        $publicDir = $this->getOptions()->getPublicDir();
+        if ($publicDir === null) {
+            throw new Exception\LogicException("Option 'public_dir' no set");
+        }
+
+        if ($pageId === null) {
+            $pageId = $this->detectPageId();
+        }
+
+        $file = $publicDir
+            . DIRECTORY_SEPARATOR . $this->pageId2Path($pageId)
+            . DIRECTORY_SEPARATOR . $this->pageId2Filename($pageId);
+
+        if (file_exists($file)) {
+            ErrorHandler::start();
+            $content = file_get_contents($file);
+            $error   = ErrorHandler::stop();
+            if ($content === false) {
+                throw new Exception\RuntimeException("Failed to read cached pageId '{$pageId}'", 0, $error);
+            }
+            return $content;
+        }
+    }
+
+    /**
+     * Checks if a cache with given id exists
+     *
+     * @param  null|string $pageId
+     * @throws Exception\LogicException
+     * @return bool
+     */
+    public function has($pageId = null)
+    {
+        $publicDir = $this->getOptions()->getPublicDir();
+        if ($publicDir === null) {
+            throw new Exception\LogicException("Option 'public_dir' no set");
+        }
+
+        if ($pageId === null) {
+            $pageId = $this->detectPageId();
+        }
+
+        $file = $publicDir
+            . DIRECTORY_SEPARATOR . $this->pageId2Path($pageId)
+            . DIRECTORY_SEPARATOR . $this->pageId2Filename($pageId);
+
+        return file_exists($file);
+    }
+
+    /**
+     * Remove from cache
+     *
+     * @param  null|string $pageId
+     * @throws Exception\LogicException
+     * @throws Exception\RuntimeException
+     * @return bool
+     */
+    public function remove($pageId = null)
+    {
+        $publicDir = $this->getOptions()->getPublicDir();
+        if ($publicDir === null) {
+            throw new Exception\LogicException("Option 'public_dir' no set");
+        }
+
+        if ($pageId === null) {
+            $pageId = $this->detectPageId();
+        }
+
+        $file = $publicDir
+            . DIRECTORY_SEPARATOR . $this->pageId2Path($pageId)
+            . DIRECTORY_SEPARATOR . $this->pageId2Filename($pageId);
+
+        if (file_exists($file)) {
+            ErrorHandler::start();
+            $res = unlink($file);
+            $err = ErrorHandler::stop();
+            if (!$res) {
+                throw new Exception\RuntimeException("Failed to remove cached pageId '{$pageId}'", 0, $err);
+            }
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Clear cached pages matching glob pattern
+     *
+     * @param string $pattern
+     * @throws Exception\LogicException
+     */
+    public function clearByGlob($pattern = '**')
+    {
+        $publicDir = $this->getOptions()->getPublicDir();
+        if ($publicDir === null) {
+            throw new Exception\LogicException("Option 'public_dir' no set");
+        }
+
+        $it = new \GlobIterator(
+            $publicDir . '/' . $pattern,
+            \GlobIterator::CURRENT_AS_SELF | \GlobIterator::SKIP_DOTS | \GlobIterator::UNIX_PATHS
+        );
+        foreach ($it as $pathname => $entry) {
+            if ($entry->isFile()) {
+                unlink($pathname);
+            }
+        }
+    }
+
+    /**
+     * Determine the page to save from the request
+     *
+     * @throws Exception\RuntimeException
+     * @return string
+     */
+    protected function detectPageId()
+    {
+        if (!isset($_SERVER['REQUEST_URI'])) {
+            throw new Exception\RuntimeException("Can't auto-detect current page identity");
+        }
+
+        return $_SERVER['REQUEST_URI'];
+    }
+
+    /**
+     * Get filename for page id
+     *
+     * @param string $pageId
+     * @return string
+     */
+    protected function pageId2Filename($pageId)
+    {
+        if (substr($pageId, -1) === '/') {
+            return $this->getOptions()->getIndexFilename();
+        }
+
+        return basename($pageId);
+    }
+
+    /**
+     * Get path for page id
+     *
+     * @param string $pageId
+     * @return string
+     */
+    protected function pageId2Path($pageId)
+    {
+        if (substr($pageId, -1) == '/') {
+            $path = rtrim($pageId, '/');
+        } else {
+            $path = dirname($pageId);
+        }
+
+        // convert requested "/" to the valid local directory separator
+        if ('/' != DIRECTORY_SEPARATOR) {
+            $path = str_replace('/', DIRECTORY_SEPARATOR, $path);
+        }
+
+        return $path;
+    }
+
+    /**
+     * Write content to a file
+     *
+     * @param  string  $file File complete path
+     * @param  string  $data Data to write
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function putFileContent($file, $data)
+    {
+        $options = $this->getOptions();
+        $locking = $options->getFileLocking();
+        $perm    = $options->getFilePermission();
+        $umask   = $options->getUmask();
+        if ($umask !== false && $perm !== false) {
+            $perm = $perm & ~$umask;
+        }
+
+        ErrorHandler::start();
+
+        $umask = ($umask !== false) ? umask($umask) : false;
+        $rs    = file_put_contents($file, $data, $locking ? LOCK_EX : 0);
+        if ($umask) {
+            umask($umask);
+        }
+
+        if ($rs === false) {
+            $err = ErrorHandler::stop();
+            throw new Exception\RuntimeException("Error writing file '{$file}'", 0, $err);
+        }
+
+        if ($perm !== false && !chmod($file, $perm)) {
+            $oct = decoct($perm);
+            $err = ErrorHandler::stop();
+            throw new Exception\RuntimeException("chmod('{$file}', 0{$oct}) failed", 0, $err);
+        }
+
+        ErrorHandler::stop();
+    }
+
+    /**
+     * Creates directory if not already done.
+     *
+     * @param string $pathname
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function createDirectoryStructure($pathname)
+    {
+        // Directory structure already exists
+        if (file_exists($pathname)) {
+            return;
+        }
+
+        $options = $this->getOptions();
+        $perm    = $options->getDirPermission();
+        $umask   = $options->getUmask();
+        if ($umask !== false && $perm !== false) {
+            $perm = $perm & ~$umask;
+        }
+
+        ErrorHandler::start();
+
+        if ($perm === false) {
+            // build-in mkdir function is enough
+
+            $umask = ($umask !== false) ? umask($umask) : false;
+            $res   = mkdir($pathname, ($perm !== false) ? $perm : 0775, true);
+
+            if ($umask !== false) {
+                umask($umask);
+            }
+
+            if (!$res) {
+                $oct = ($perm === false) ? '775' : decoct($perm);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("mkdir('{$pathname}', 0{$oct}, true) failed", 0, $err);
+            }
+
+            if ($perm !== false && !chmod($pathname, $perm)) {
+                $oct = decoct($perm);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
+            }
+        } else {
+            // build-in mkdir function sets permission together with current umask
+            // which doesn't work well on multo threaded webservers
+            // -> create directories one by one and set permissions
+
+            // find existing path and missing path parts
+            $parts = [];
+            $path  = $pathname;
+            while (!file_exists($path)) {
+                array_unshift($parts, basename($path));
+                $nextPath = dirname($path);
+                if ($nextPath === $path) {
+                    break;
+                }
+                $path = $nextPath;
+            }
+
+            // make all missing path parts
+            foreach ($parts as $part) {
+                $path.= DIRECTORY_SEPARATOR . $part;
+
+                // create a single directory, set and reset umask immediately
+                $umask = ($umask !== false) ? umask($umask) : false;
+                $res   = mkdir($path, ($perm === false) ? 0775 : $perm, false);
+                if ($umask !== false) {
+                    umask($umask);
+                }
+
+                if (!$res) {
+                    $oct = ($perm === false) ? '775' : decoct($perm);
+                    ErrorHandler::stop();
+                    throw new Exception\RuntimeException(
+                        "mkdir('{$path}', 0{$oct}, false) failed"
+                    );
+                }
+
+                if ($perm !== false && !chmod($path, $perm)) {
+                    $oct = decoct($perm);
+                    ErrorHandler::stop();
+                    throw new Exception\RuntimeException(
+                        "chmod('{$path}', 0{$oct}) failed"
+                    );
+                }
+            }
+        }
+
+        ErrorHandler::stop();
+    }
+
+    /**
+     * Returns the generated file name.
+     *
+     * @param null|string $pageId
+     * @return string
+     */
+    public function getFilename($pageId = null)
+    {
+        if ($pageId === null) {
+            $pageId = $this->detectPageId();
+        }
+
+        $publicDir = $this->getOptions()->getPublicDir();
+        $path      = $this->pageId2Path($pageId);
+        $file      = $path . DIRECTORY_SEPARATOR . $this->pageId2Filename($pageId);
+
+        return $publicDir . $file;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/ClassCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/ClassCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/ClassCache.php	(revision 5534)
@@ -0,0 +1,167 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Zend\Cache;
+use Zend\Cache\Exception;
+
+class ClassCache extends CallbackCache
+{
+    /**
+     * Set options
+     *
+     * @param  PatternOptions $options
+     * @return ClassCache
+     * @throws Exception\InvalidArgumentException if missing 'class' or 'storage' options
+     */
+    public function setOptions(PatternOptions $options)
+    {
+        parent::setOptions($options);
+
+        if (!$options->getClass()) {
+            throw new Exception\InvalidArgumentException("Missing option 'class'");
+        } elseif (!$options->getStorage()) {
+            throw new Exception\InvalidArgumentException("Missing option 'storage'");
+        }
+        return $this;
+    }
+
+    /**
+     * Call and cache a class method
+     *
+     * @param  string $method  Method name to call
+     * @param  array  $args    Method arguments
+     * @return mixed
+     * @throws Exception\RuntimeException
+     * @throws \Exception
+     */
+    public function call($method, array $args = [])
+    {
+        $options   = $this->getOptions();
+        $classname = $options->getClass();
+        $method    = strtolower($method);
+        $callback  = $classname . '::' . $method;
+
+        $cache = $options->getCacheByDefault();
+        if ($cache) {
+            $cache = !in_array($method, $options->getClassNonCacheMethods());
+        } else {
+            $cache = in_array($method, $options->getClassCacheMethods());
+        }
+
+        if (!$cache) {
+            if ($args) {
+                return call_user_func_array($callback, $args);
+            } else {
+                return $classname::$method();
+            }
+        }
+
+        return parent::call($callback, $args);
+    }
+
+    /**
+     * Generate a unique key in base of a key representing the callback part
+     * and a key representing the arguments part.
+     *
+     * @param  string     $method  The method
+     * @param  array      $args    Callback arguments
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    public function generateKey($method, array $args = [])
+    {
+        return $this->generateCallbackKey(
+            $this->getOptions()->getClass() . '::' . $method,
+            $args
+        );
+    }
+
+    /**
+     * Generate a unique key in base of a key representing the callback part
+     * and a key representing the arguments part.
+     *
+     * @param  callable   $callback  A valid callback
+     * @param  array      $args      Callback arguments
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    protected function generateCallbackKey($callback, array $args)
+    {
+        $callbackKey = md5(strtolower($callback));
+        $argumentKey = $this->generateArgumentsKey($args);
+        return $callbackKey . $argumentKey;
+    }
+
+    /**
+     * Calling a method of the entity.
+     *
+     * @param  string $method  Method name to call
+     * @param  array  $args    Method arguments
+     * @return mixed
+     * @throws Exception\RuntimeException
+     * @throws \Exception
+     */
+    public function __call($method, array $args)
+    {
+        return $this->call($method, $args);
+    }
+
+    /**
+     * Set a static property
+     *
+     * @param  string $name
+     * @param  mixed  $value
+     * @return void
+     * @see   http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
+     */
+    public function __set($name, $value)
+    {
+        $class = $this->getOptions()->getClass();
+        $class::$name = $value;
+    }
+
+    /**
+     * Get a static property
+     *
+     * @param  string $name
+     * @return mixed
+     * @see    http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
+     */
+    public function __get($name)
+    {
+        $class = $this->getOptions()->getClass();
+        return $class::$name;
+    }
+
+    /**
+     * Is a static property exists.
+     *
+     * @param  string $name
+     * @return bool
+     */
+    public function __isset($name)
+    {
+        $class = $this->getOptions()->getClass();
+        return isset($class::$name);
+    }
+
+    /**
+     * Unset a static property
+     *
+     * @param  string $name
+     * @return void
+     */
+    public function __unset($name)
+    {
+        $class = $this->getOptions()->getClass();
+        unset($class::$name);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/ObjectCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/ObjectCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/ObjectCache.php	(revision 5534)
@@ -0,0 +1,284 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Zend\Cache\Exception;
+
+class ObjectCache extends CallbackCache
+{
+    /**
+     * Set options
+     *
+     * @param  PatternOptions $options
+     * @return void
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setOptions(PatternOptions $options)
+    {
+        parent::setOptions($options);
+
+        if (!$options->getObject()) {
+            throw new Exception\InvalidArgumentException("Missing option 'object'");
+        } elseif (!$options->getStorage()) {
+            throw new Exception\InvalidArgumentException("Missing option 'storage'");
+        }
+    }
+
+    /**
+     * Call and cache a class method
+     *
+     * @param  string $method  Method name to call
+     * @param  array  $args    Method arguments
+     * @return mixed
+     * @throws Exception\RuntimeException
+     * @throws \Exception
+     */
+    public function call($method, array $args = [])
+    {
+        $options = $this->getOptions();
+        $object  = $options->getObject();
+        $method  = strtolower($method);
+
+        // handle magic methods
+        switch ($method) {
+            case '__set':
+                $property = array_shift($args);
+                $value    = array_shift($args);
+
+                $object->{$property} = $value;
+
+                if (!$options->getObjectCacheMagicProperties()
+                    || property_exists($object, $property)
+                ) {
+                    // no caching if property isn't magic
+                    // or caching magic properties is disabled
+                    return;
+                }
+
+                // remove cached __get and __isset
+                $removeKeys = null;
+                if (method_exists($object, '__get')) {
+                    $removeKeys[] = $this->generateKey('__get', [$property]);
+                }
+                if (method_exists($object, '__isset')) {
+                    $removeKeys[] = $this->generateKey('__isset', [$property]);
+                }
+                if ($removeKeys) {
+                    $options->getStorage()->removeItems($removeKeys);
+                }
+                return;
+
+            case '__get':
+                $property = array_shift($args);
+
+                if (!$options->getObjectCacheMagicProperties()
+                    || property_exists($object, $property)
+                ) {
+                    // no caching if property isn't magic
+                    // or caching magic properties is disabled
+                    return $object->{$property};
+                }
+
+                array_unshift($args, $property);
+                return parent::call([$object, '__get'], $args);
+
+            case '__isset':
+                $property = array_shift($args);
+
+                if (!$options->getObjectCacheMagicProperties()
+                    || property_exists($object, $property)
+                ) {
+                    // no caching if property isn't magic
+                    // or caching magic properties is disabled
+                    return isset($object->{$property});
+                }
+
+                return parent::call([$object, '__isset'], [$property]);
+
+            case '__unset':
+                $property = array_shift($args);
+
+                unset($object->{$property});
+
+                if (!$options->getObjectCacheMagicProperties()
+                    || property_exists($object, $property)
+                ) {
+                    // no caching if property isn't magic
+                    // or caching magic properties is disabled
+                    return;
+                }
+
+                // remove previous cached __get and __isset calls
+                $removeKeys = null;
+                if (method_exists($object, '__get')) {
+                    $removeKeys[] = $this->generateKey('__get', [$property]);
+                }
+                if (method_exists($object, '__isset')) {
+                    $removeKeys[] = $this->generateKey('__isset', [$property]);
+                }
+                if ($removeKeys) {
+                    $options->getStorage()->removeItems($removeKeys);
+                }
+                return;
+        }
+
+        $cache = $options->getCacheByDefault();
+        if ($cache) {
+            $cache = !in_array($method, $options->getObjectNonCacheMethods());
+        } else {
+            $cache = in_array($method, $options->getObjectCacheMethods());
+        }
+
+        if (!$cache) {
+            if ($args) {
+                return call_user_func_array([$object, $method], $args);
+            }
+            return $object->{$method}();
+        }
+
+        return parent::call([$object, $method], $args);
+    }
+
+    /**
+     * Generate a unique key in base of a key representing the callback part
+     * and a key representing the arguments part.
+     *
+     * @param  string     $method  The method
+     * @param  array      $args    Callback arguments
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    public function generateKey($method, array $args = [])
+    {
+        return $this->generateCallbackKey(
+            [$this->getOptions()->getObject(), $method],
+            $args
+        );
+    }
+
+    /**
+     * Generate a unique key in base of a key representing the callback part
+     * and a key representing the arguments part.
+     *
+     * @param  callable   $callback  A valid callback
+     * @param  array      $args      Callback arguments
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    protected function generateCallbackKey($callback, array $args = [])
+    {
+        $callbackKey = md5($this->getOptions()->getObjectKey() . '::' . strtolower($callback[1]));
+        $argumentKey = $this->generateArgumentsKey($args);
+        return $callbackKey . $argumentKey;
+    }
+
+    /**
+     * Class method call handler
+     *
+     * @param  string $method  Method name to call
+     * @param  array  $args    Method arguments
+     * @return mixed
+     * @throws Exception\RuntimeException
+     * @throws \Exception
+     */
+    public function __call($method, array $args)
+    {
+        return $this->call($method, $args);
+    }
+
+    /**
+     * Writing data to properties.
+     *
+     * NOTE:
+     * Magic properties will be cached too if the option cacheMagicProperties
+     * is enabled and the property doesn't exist in real. If so it calls __set
+     * and removes cached data of previous __get and __isset calls.
+     *
+     * @param  string $name
+     * @param  mixed  $value
+     * @return void
+     * @see    http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
+     */
+    public function __set($name, $value)
+    {
+        return $this->call('__set', [$name, $value]);
+    }
+
+    /**
+     * Reading data from properties.
+     *
+     * NOTE:
+     * Magic properties will be cached too if the option cacheMagicProperties
+     * is enabled and the property doesn't exist in real. If so it calls __get.
+     *
+     * @param  string $name
+     * @return mixed
+     * @see http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
+     */
+    public function __get($name)
+    {
+        return $this->call('__get', [$name]);
+    }
+
+    /**
+     * Checking existing properties.
+     *
+     * NOTE:
+     * Magic properties will be cached too if the option cacheMagicProperties
+     * is enabled and the property doesn't exist in real. If so it calls __get.
+     *
+     * @param  string $name
+     * @return bool
+     * @see    http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
+     */
+    public function __isset($name)
+    {
+        return $this->call('__isset', [$name]);
+    }
+
+    /**
+     * Unseting a property.
+     *
+     * NOTE:
+     * Magic properties will be cached too if the option cacheMagicProperties
+     * is enabled and the property doesn't exist in real. If so it removes
+     * previous cached __isset and __get calls.
+     *
+     * @param  string $name
+     * @return void
+     * @see    http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
+     */
+    public function __unset($name)
+    {
+        return $this->call('__unset', [$name]);
+    }
+
+    /**
+     * Handle casting to string
+     *
+     * @return string
+     * @see    http://php.net/manual/language.oop5.magic.php#language.oop5.magic.tostring
+     */
+    public function __toString()
+    {
+        return $this->call('__toString');
+    }
+
+    /**
+     * Handle invoke calls
+     *
+     * @return mixed
+     * @see    http://php.net/manual/language.oop5.magic.php#language.oop5.magic.invoke
+     */
+    public function __invoke()
+    {
+        return $this->call('__invoke', func_get_args());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/OutputCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/OutputCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/OutputCache.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Zend\Cache\Exception;
+
+class OutputCache extends AbstractPattern
+{
+    /**
+     * The key stack
+     *
+     * @var array
+     */
+    protected $keyStack = [];
+
+    /**
+     * Set options
+     *
+     * @param  PatternOptions $options
+     * @return OutputCache
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setOptions(PatternOptions $options)
+    {
+        parent::setOptions($options);
+
+        if (!$options->getStorage()) {
+            throw new Exception\InvalidArgumentException("Missing option 'storage'");
+        }
+
+        return $this;
+    }
+
+    /**
+     * if there is a cached item with the given key display it's data and return true
+     * else start buffering output until end() is called or the script ends.
+     *
+     * @param  string  $key Key
+     * @throws Exception\MissingKeyException if key is missing
+     * @return bool
+     */
+    public function start($key)
+    {
+        if (($key = (string) $key) === '') {
+            throw new Exception\MissingKeyException('Missing key to read/write output from cache');
+        }
+
+        $success = null;
+        $data    = $this->getOptions()->getStorage()->getItem($key, $success);
+        if ($success) {
+            echo $data;
+            return true;
+        }
+
+        ob_start();
+        ob_implicit_flush(0);
+        $this->keyStack[] = $key;
+        return false;
+    }
+
+    /**
+     * Stops buffering output, write buffered data to cache using the given key on start()
+     * and displays the buffer.
+     *
+     * @throws Exception\RuntimeException if output cache not started or buffering not active
+     * @return bool TRUE on success, FALSE on failure writing to cache
+     */
+    public function end()
+    {
+        $key = array_pop($this->keyStack);
+        if ($key === null) {
+            throw new Exception\RuntimeException('Output cache not started');
+        }
+
+        $output = ob_get_flush();
+        if ($output === false) {
+            throw new Exception\RuntimeException('Output buffering not active');
+        }
+
+        return $this->getOptions()->getStorage()->setItem($key, $output);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/PatternInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/PatternInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/PatternInterface.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+interface PatternInterface
+{
+    /**
+     * Set pattern options
+     *
+     * @param  PatternOptions $options
+     * @return PatternInterface
+     */
+    public function setOptions(PatternOptions $options);
+
+    /**
+     * Get all pattern options
+     *
+     * @return PatternOptions
+     */
+    public function getOptions();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/PatternOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/PatternOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Pattern/PatternOptions.php	(revision 5534)
@@ -0,0 +1,765 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Pattern;
+
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\StorageFactory;
+use Zend\Cache\Storage\StorageInterface as Storage;
+use Zend\Stdlib\AbstractOptions;
+
+class PatternOptions extends AbstractOptions
+{
+    /**
+     * Used by:
+     * - ClassCache
+     * - ObjectCache
+     * @var bool
+     */
+    protected $cacheByDefault = true;
+
+    /**
+     * Used by:
+     * - CallbackCache
+     * - ClassCache
+     * - ObjectCache
+     * @var bool
+     */
+    protected $cacheOutput = true;
+
+    /**
+     * Used by:
+     * - ClassCache
+     * @var null|string
+     */
+    protected $class;
+
+    /**
+     * Used by:
+     * - ClassCache
+     * @var array
+     */
+    protected $classCacheMethods = [];
+
+    /**
+     * Used by:
+     * - ClassCache
+     * @var array
+     */
+    protected $classNonCacheMethods = [];
+
+    /**
+     * Used by:
+     * - CaptureCache
+     * @var false|int
+     */
+    protected $umask = false;
+
+    /**
+     * Used by:
+     * - CaptureCache
+     * @var false|int
+     */
+    protected $dirPermission = 0700;
+
+    /**
+     * Used by:
+     * - CaptureCache
+     * @var false|int
+     */
+    protected $filePermission = 0600;
+
+    /**
+     * Used by:
+     * - CaptureCache
+     * @var bool
+     */
+    protected $fileLocking = true;
+
+    /**
+     * Used by:
+     * - CaptureCache
+     * @var string
+     */
+    protected $indexFilename = 'index.html';
+
+    /**
+     * Used by:
+     * - ObjectCache
+     * @var null|object
+     */
+    protected $object;
+
+    /**
+     * Used by:
+     * - ObjectCache
+     * @var bool
+     */
+    protected $objectCacheMagicProperties = false;
+
+    /**
+     * Used by:
+     * - ObjectCache
+     * @var array
+     */
+    protected $objectCacheMethods = [];
+
+    /**
+     * Used by:
+     * - ObjectCache
+     * @var null|string
+     */
+    protected $objectKey;
+
+    /**
+     * Used by:
+     * - ObjectCache
+     * @var array
+     */
+    protected $objectNonCacheMethods = ['__tostring'];
+
+    /**
+     * Used by:
+     * - CaptureCache
+     * @var null|string
+     */
+    protected $publicDir;
+
+    /**
+     * Used by:
+     * - CallbackCache
+     * - ClassCache
+     * - ObjectCache
+     * - OutputCache
+     * @var null|Storage
+     */
+    protected $storage;
+
+    /**
+     * Constructor
+     *
+     * @param  array|Traversable|null $options
+     * @return PatternOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function __construct($options = null)
+    {
+        // disable file/directory permissions by default on windows systems
+        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
+            $this->filePermission = false;
+            $this->dirPermission = false;
+        }
+
+        parent::__construct($options);
+    }
+
+    /**
+     * Set flag indicating whether or not to cache by default
+     *
+     * Used by:
+     * - ClassCache
+     * - ObjectCache
+     *
+     * @param  bool $cacheByDefault
+     * @return PatternOptions
+     */
+    public function setCacheByDefault($cacheByDefault)
+    {
+        $this->cacheByDefault = $cacheByDefault;
+        return $this;
+    }
+
+    /**
+     * Do we cache by default?
+     *
+     * Used by:
+     * - ClassCache
+     * - ObjectCache
+     *
+     * @return bool
+     */
+    public function getCacheByDefault()
+    {
+        return $this->cacheByDefault;
+    }
+
+    /**
+     * Set whether or not to cache output
+     *
+     * Used by:
+     * - CallbackCache
+     * - ClassCache
+     * - ObjectCache
+     *
+     * @param  bool $cacheOutput
+     * @return PatternOptions
+     */
+    public function setCacheOutput($cacheOutput)
+    {
+        $this->cacheOutput = (bool) $cacheOutput;
+        return $this;
+    }
+
+    /**
+     * Will we cache output?
+     *
+     * Used by:
+     * - CallbackCache
+     * - ClassCache
+     * - ObjectCache
+     *
+     * @return bool
+     */
+    public function getCacheOutput()
+    {
+        return $this->cacheOutput;
+    }
+
+    /**
+     * Set class name
+     *
+     * Used by:
+     * - ClassCache
+     *
+     * @param  string $class
+     * @throws Exception\InvalidArgumentException
+     * @return PatternOptions
+     */
+    public function setClass($class)
+    {
+        if (!is_string($class)) {
+            throw new Exception\InvalidArgumentException('Invalid classname provided; must be a string');
+        }
+        $this->class = $class;
+        return $this;
+    }
+
+    /**
+     * Get class name
+     *
+     * Used by:
+     * - ClassCache
+     *
+     * @return null|string
+     */
+    public function getClass()
+    {
+        return $this->class;
+    }
+
+    /**
+     * Set list of method return values to cache
+     *
+     * Used by:
+     * - ClassCache
+     *
+     * @param  array $classCacheMethods
+     * @return PatternOptions
+     */
+    public function setClassCacheMethods(array $classCacheMethods)
+    {
+        $this->classCacheMethods = $this->recursiveStrtolower($classCacheMethods);
+        return $this;
+    }
+
+    /**
+     * Get list of methods from which to cache return values
+     *
+     * Used by:
+     * - ClassCache
+     *
+     * @return array
+     */
+    public function getClassCacheMethods()
+    {
+        return $this->classCacheMethods;
+    }
+
+    /**
+     * Set list of method return values NOT to cache
+     *
+     * Used by:
+     * - ClassCache
+     *
+     * @param  array $classNonCacheMethods
+     * @return PatternOptions
+     */
+    public function setClassNonCacheMethods(array $classNonCacheMethods)
+    {
+        $this->classNonCacheMethods = $this->recursiveStrtolower($classNonCacheMethods);
+        return $this;
+    }
+
+    /**
+     * Get list of methods from which NOT to cache return values
+     *
+     * Used by:
+     * - ClassCache
+     *
+     * @return array
+     */
+    public function getClassNonCacheMethods()
+    {
+        return $this->classNonCacheMethods;
+    }
+
+    /**
+     * Set directory permission
+     *
+     * @param  false|int $dirPermission
+     * @throws Exception\InvalidArgumentException
+     * @return PatternOptions
+     */
+    public function setDirPermission($dirPermission)
+    {
+        if ($dirPermission !== false) {
+            if (is_string($dirPermission)) {
+                $dirPermission = octdec($dirPermission);
+            } else {
+                $dirPermission = (int) $dirPermission;
+            }
+
+            // validate
+            if (($dirPermission & 0700) != 0700) {
+                throw new Exception\InvalidArgumentException(
+                    'Invalid directory permission: need permission to execute, read and write by owner'
+                );
+            }
+        }
+
+        $this->dirPermission = $dirPermission;
+        return $this;
+    }
+
+    /**
+     * Gets directory permission
+     *
+     * @return false|int
+     */
+    public function getDirPermission()
+    {
+        return $this->dirPermission;
+    }
+
+    /**
+     * Set umask
+     *
+     * Used by:
+     * - CaptureCache
+     *
+     * @param  false|int $umask
+     * @throws Exception\InvalidArgumentException
+     * @return PatternOptions
+     */
+    public function setUmask($umask)
+    {
+        if ($umask !== false) {
+            if (is_string($umask)) {
+                $umask = octdec($umask);
+            } else {
+                $umask = (int) $umask;
+            }
+
+            // validate
+            if ($umask & 0700) {
+                throw new Exception\InvalidArgumentException(
+                    'Invalid umask: need permission to execute, read and write by owner'
+                );
+            }
+
+            // normalize
+            $umask = $umask & ~0002;
+        }
+
+        $this->umask = $umask;
+        return $this;
+    }
+
+    /**
+     * Get umask
+     *
+     * Used by:
+     * - CaptureCache
+     *
+     * @return false|int
+     */
+    public function getUmask()
+    {
+        return $this->umask;
+    }
+
+    /**
+     * Set whether or not file locking should be used
+     *
+     * Used by:
+     * - CaptureCache
+     *
+     * @param  bool $fileLocking
+     * @return PatternOptions
+     */
+    public function setFileLocking($fileLocking)
+    {
+        $this->fileLocking = (bool) $fileLocking;
+        return $this;
+    }
+
+    /**
+     * Is file locking enabled?
+     *
+     * Used by:
+     * - CaptureCache
+     *
+     * @return bool
+     */
+    public function getFileLocking()
+    {
+        return $this->fileLocking;
+    }
+
+    /**
+     * Set file permission
+     *
+     * @param  false|int $filePermission
+     * @throws Exception\InvalidArgumentException
+     * @return PatternOptions
+     */
+    public function setFilePermission($filePermission)
+    {
+        if ($filePermission !== false) {
+            if (is_string($filePermission)) {
+                $filePermission = octdec($filePermission);
+            } else {
+                $filePermission = (int) $filePermission;
+            }
+
+            // validate
+            if (($filePermission & 0600) != 0600) {
+                throw new Exception\InvalidArgumentException(
+                    'Invalid file permission: need permission to read and write by owner'
+                );
+            } elseif ($filePermission & 0111) {
+                throw new Exception\InvalidArgumentException(
+                    "Invalid file permission: Files shoudn't be executable"
+                );
+            }
+        }
+
+        $this->filePermission = $filePermission;
+        return $this;
+    }
+
+    /**
+     * Gets file permission
+     *
+     * @return false|int
+     */
+    public function getFilePermission()
+    {
+        return $this->filePermission;
+    }
+
+    /**
+     * Set value for index filename
+     *
+     * @param  string $indexFilename
+     * @return PatternOptions
+     */
+    public function setIndexFilename($indexFilename)
+    {
+        $this->indexFilename = (string) $indexFilename;
+        return $this;
+    }
+
+    /**
+     * Get value for index filename
+     *
+     * @return string
+     */
+    public function getIndexFilename()
+    {
+        return $this->indexFilename;
+    }
+
+    /**
+     * Set object to cache
+     *
+     * @param  mixed $object
+     * @throws Exception\InvalidArgumentException
+     * @return PatternOptions
+     */
+    public function setObject($object)
+    {
+        if (!is_object($object)) {
+            throw new Exception\InvalidArgumentException(
+                sprintf('%s expects an object; received "%s"', __METHOD__, gettype($object))
+            );
+        }
+        $this->object = $object;
+        return $this;
+    }
+
+    /**
+     * Get object to cache
+     *
+     * @return null|object
+     */
+    public function getObject()
+    {
+        return $this->object;
+    }
+
+    /**
+     * Set flag indicating whether or not to cache magic properties
+     *
+     * Used by:
+     * - ObjectCache
+     *
+     * @param  bool $objectCacheMagicProperties
+     * @return PatternOptions
+     */
+    public function setObjectCacheMagicProperties($objectCacheMagicProperties)
+    {
+        $this->objectCacheMagicProperties = (bool) $objectCacheMagicProperties;
+        return $this;
+    }
+
+    /**
+     * Should we cache magic properties?
+     *
+     * Used by:
+     * - ObjectCache
+     *
+     * @return bool
+     */
+    public function getObjectCacheMagicProperties()
+    {
+        return $this->objectCacheMagicProperties;
+    }
+
+    /**
+     * Set list of object methods for which to cache return values
+     *
+     * @param  array $objectCacheMethods
+     * @return PatternOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setObjectCacheMethods(array $objectCacheMethods)
+    {
+        $this->objectCacheMethods = $this->normalizeObjectMethods($objectCacheMethods);
+        return $this;
+    }
+
+    /**
+     * Get list of object methods for which to cache return values
+     *
+     * @return array
+     */
+    public function getObjectCacheMethods()
+    {
+        return $this->objectCacheMethods;
+    }
+
+    /**
+     * Set the object key part.
+     *
+     * Used to generate a callback key in order to speed up key generation.
+     *
+     * Used by:
+     * - ObjectCache
+     *
+     * @param  null|string $objectKey The object key or NULL to use the objects class name
+     * @return PatternOptions
+     */
+    public function setObjectKey($objectKey)
+    {
+        if ($objectKey !== null) {
+            $this->objectKey = (string) $objectKey;
+        } else {
+            $this->objectKey = null;
+        }
+        return $this;
+    }
+
+    /**
+     * Get object key
+     *
+     * Used by:
+     * - ObjectCache
+     *
+     * @return string
+     */
+    public function getObjectKey()
+    {
+        if ($this->objectKey === null) {
+            return get_class($this->getObject());
+        }
+        return $this->objectKey;
+    }
+
+    /**
+     * Set list of object methods for which NOT to cache return values
+     *
+     * @param  array $objectNonCacheMethods
+     * @return PatternOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setObjectNonCacheMethods(array $objectNonCacheMethods)
+    {
+        $this->objectNonCacheMethods = $this->normalizeObjectMethods($objectNonCacheMethods);
+        return $this;
+    }
+
+    /**
+     * Get list of object methods for which NOT to cache return values
+     *
+     * @return array
+     */
+    public function getObjectNonCacheMethods()
+    {
+        return $this->objectNonCacheMethods;
+    }
+
+    /**
+     * Set location of public directory
+     *
+     * Used by:
+     * - CaptureCache
+     *
+     * @param  string $publicDir
+     * @throws Exception\InvalidArgumentException
+     * @return PatternOptions
+     */
+    public function setPublicDir($publicDir)
+    {
+        $publicDir = (string) $publicDir;
+
+        if (!is_dir($publicDir)) {
+            throw new Exception\InvalidArgumentException(
+                "Public directory '{$publicDir}' not found or not a directory"
+            );
+        } elseif (!is_writable($publicDir)) {
+            throw new Exception\InvalidArgumentException(
+                "Public directory '{$publicDir}' not writable"
+            );
+        } elseif (!is_readable($publicDir)) {
+            throw new Exception\InvalidArgumentException(
+                "Public directory '{$publicDir}' not readable"
+            );
+        }
+
+        $this->publicDir = rtrim(realpath($publicDir), DIRECTORY_SEPARATOR);
+        return $this;
+    }
+
+    /**
+     * Get location of public directory
+     *
+     * Used by:
+     * - CaptureCache
+     *
+     * @return null|string
+     */
+    public function getPublicDir()
+    {
+        return $this->publicDir;
+    }
+
+    /**
+     * Set storage adapter
+     *
+     * Required for the following Pattern classes:
+     * - CallbackCache
+     * - ClassCache
+     * - ObjectCache
+     * - OutputCache
+     *
+     * @param  string|array|Storage $storage
+     * @return PatternOptions
+     */
+    public function setStorage($storage)
+    {
+        $this->storage = $this->storageFactory($storage);
+        return $this;
+    }
+
+    /**
+     * Get storage adapter
+     *
+     * Used by:
+     * - CallbackCache
+     * - ClassCache
+     * - ObjectCache
+     * - OutputCache
+     *
+     * @return null|Storage
+     */
+    public function getStorage()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Recursively apply strtolower on all values of an array, and return as a
+     * list of unique values
+     *
+     * @param  array $array
+     * @return array
+     */
+    protected function recursiveStrtolower(array $array)
+    {
+        return array_values(array_unique(array_map('strtolower', $array)));
+    }
+
+    /**
+     * Normalize object methods
+     *
+     * Recursively casts values to lowercase, then determines if any are in a
+     * list of methods not handled, raising an exception if so.
+     *
+     * @param  array $methods
+     * @return array
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeObjectMethods(array $methods)
+    {
+        $methods   = $this->recursiveStrtolower($methods);
+        $intersect = array_intersect(['__set', '__get', '__unset', '__isset'], $methods);
+        if (!empty($intersect)) {
+            throw new Exception\InvalidArgumentException(
+                "Magic properties are handled by option 'cache_magic_properties'"
+            );
+        }
+        return $methods;
+    }
+
+    /**
+     * Create a storage object from a given specification
+     *
+     * @param  array|string|Storage $storage
+     * @throws Exception\InvalidArgumentException
+     * @return Storage
+     */
+    protected function storageFactory($storage)
+    {
+        if (is_array($storage)) {
+            $storage = StorageFactory::factory($storage);
+        } elseif (is_string($storage)) {
+            $storage = StorageFactory::adapterFactory($storage);
+        } elseif (!($storage instanceof Storage)) {
+            throw new Exception\InvalidArgumentException(
+                'The storage must be an instanceof Zend\Cache\Storage\StorageInterface '
+                . 'or an array passed to Zend\Cache\Storage::factory '
+                . 'or simply the name of the storage adapter'
+            );
+        }
+
+        return $storage;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/PatternFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/PatternFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/PatternFactory.php	(revision 5534)
@@ -0,0 +1,92 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache;
+
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+
+abstract class PatternFactory
+{
+    /**
+     * The pattern manager
+     *
+     * @var null|PatternPluginManager
+     */
+    protected static $plugins = null;
+
+    /**
+     * Instantiate a cache pattern
+     *
+     * @param  string|Pattern\PatternInterface $patternName
+     * @param  array|Traversable|Pattern\PatternOptions $options
+     * @return Pattern\PatternInterface
+     * @throws Exception\InvalidArgumentException
+     */
+    public static function factory($patternName, $options = [])
+    {
+        if ($options instanceof Traversable) {
+            $options = ArrayUtils::iteratorToArray($options);
+        }
+        if (is_array($options)) {
+            $options = new Pattern\PatternOptions($options);
+        } elseif (!$options instanceof Pattern\PatternOptions) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects an array, Traversable object, or %s\Pattern\PatternOptions object; received "%s"',
+                __METHOD__,
+                __NAMESPACE__,
+                (is_object($options) ? get_class($options) : gettype($options))
+            ));
+        }
+
+        if ($patternName instanceof Pattern\PatternInterface) {
+            $patternName->setOptions($options);
+            return $patternName;
+        }
+
+        $pattern = static::getPluginManager()->get($patternName);
+        $pattern->setOptions($options);
+        return $pattern;
+    }
+
+    /**
+     * Get the pattern plugin manager
+     *
+     * @return PatternPluginManager
+     */
+    public static function getPluginManager()
+    {
+        if (static::$plugins === null) {
+            static::$plugins = new PatternPluginManager();
+        }
+
+        return static::$plugins;
+    }
+
+    /**
+     * Set the pattern plugin manager
+     *
+     * @param  PatternPluginManager $plugins
+     * @return void
+     */
+    public static function setPluginManager(PatternPluginManager $plugins)
+    {
+        static::$plugins = $plugins;
+    }
+
+    /**
+     * Reset pattern plugin manager to default
+     *
+     * @return void
+     */
+    public static function resetPluginManager()
+    {
+        static::$plugins = null;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/PatternPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/PatternPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/PatternPluginManager.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache;
+
+use Zend\ServiceManager\AbstractPluginManager;
+
+/**
+ * Plugin manager implementation for cache pattern adapters
+ *
+ * Enforces that retrieved adapters are instances of
+ * Pattern\PatternInterface. Additionally, it registers a number of default
+ * patterns available.
+ */
+class PatternPluginManager extends AbstractPluginManager
+{
+    /**
+     * Default set of adapters
+     *
+     * @var array
+     */
+    protected $invokableClasses = [
+        'callback' => 'Zend\Cache\Pattern\CallbackCache',
+        'capture'  => 'Zend\Cache\Pattern\CaptureCache',
+        'class'    => 'Zend\Cache\Pattern\ClassCache',
+        'object'   => 'Zend\Cache\Pattern\ObjectCache',
+        'output'   => 'Zend\Cache\Pattern\OutputCache',
+        'page'     => 'Zend\Cache\Pattern\PageCache',
+    ];
+
+    /**
+     * Don't share by default
+     *
+     * @var array
+     */
+    protected $shareByDefault = false;
+
+    /**
+     * Validate the plugin
+     *
+     * Checks that the pattern adapter loaded is an instance of Pattern\PatternInterface.
+     *
+     * @param  mixed $plugin
+     * @return void
+     * @throws Exception\RuntimeException if invalid
+     */
+    public function validatePlugin($plugin)
+    {
+        if ($plugin instanceof Pattern\PatternInterface) {
+            // we're okay
+            return;
+        }
+
+        throw new Exception\RuntimeException(sprintf(
+            'Plugin of type %s is invalid; must implement %s\Pattern\PatternInterface',
+            (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
+            __NAMESPACE__
+        ));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Service/StorageCacheAbstractServiceFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Service/StorageCacheAbstractServiceFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Service/StorageCacheAbstractServiceFactory.php	(revision 5534)
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Service;
+
+use Zend\Cache\StorageFactory;
+use Zend\ServiceManager\AbstractFactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+/**
+ * Storage cache factory for multiple caches.
+ */
+class StorageCacheAbstractServiceFactory implements AbstractFactoryInterface
+{
+    /**
+     * @var array
+     */
+    protected $config;
+
+    /**
+     * Configuration key for cache objects
+     *
+     * @var string
+     */
+    protected $configKey = 'caches';
+
+    /**
+     * @param  ServiceLocatorInterface $services
+     * @param  string                  $name
+     * @param  string                  $requestedName
+     * @return bool
+     */
+    public function canCreateServiceWithName(ServiceLocatorInterface $services, $name, $requestedName)
+    {
+        $config = $this->getConfig($services);
+        if (empty($config)) {
+            return false;
+        }
+
+        return (isset($config[$requestedName]) && is_array($config[$requestedName]));
+    }
+
+    /**
+     * @param  ServiceLocatorInterface              $services
+     * @param  string                               $name
+     * @param  string                               $requestedName
+     * @return \Zend\Cache\Storage\StorageInterface
+     */
+    public function createServiceWithName(ServiceLocatorInterface $services, $name, $requestedName)
+    {
+        $config = $this->getConfig($services);
+        $config = $config[$requestedName];
+        return StorageFactory::factory($config);
+    }
+
+    /**
+     * Retrieve cache configuration, if any
+     *
+     * @param  ServiceLocatorInterface $services
+     * @return array
+     */
+    protected function getConfig(ServiceLocatorInterface $services)
+    {
+        if ($this->config !== null) {
+            return $this->config;
+        }
+
+        if (!$services->has('Config')) {
+            $this->config = [];
+            return $this->config;
+        }
+
+        $config = $services->get('Config');
+        if (!isset($config[$this->configKey])) {
+            $this->config = [];
+            return $this->config;
+        }
+
+        $this->config = $config[$this->configKey];
+        return $this->config;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Service/StorageCacheFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Service/StorageCacheFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Service/StorageCacheFactory.php	(revision 5534)
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Service;
+
+use Zend\Cache\StorageFactory;
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+/**
+ * Storage cache factory.
+ */
+class StorageCacheFactory implements FactoryInterface
+{
+    public function createService(ServiceLocatorInterface $serviceLocator)
+    {
+        // Configure the cache
+        $config = $serviceLocator->get('Config');
+        $cacheConfig = isset($config['cache']) ? $config['cache'] : [];
+        $cache = StorageFactory::factory($cacheConfig);
+
+        return $cache;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractAdapter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractAdapter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractAdapter.php	(revision 5534)
@@ -0,0 +1,1578 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use ArrayObject;
+use SplObjectStorage;
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\Event;
+use Zend\Cache\Storage\ExceptionEvent;
+use Zend\Cache\Storage\Plugin;
+use Zend\Cache\Storage\PostEvent;
+use Zend\Cache\Storage\StorageInterface;
+use Zend\EventManager\EventManager;
+use Zend\EventManager\EventManagerInterface;
+use Zend\EventManager\EventsCapableInterface;
+
+abstract class AbstractAdapter implements StorageInterface, EventsCapableInterface
+{
+    /**
+     * The used EventManager if any
+     *
+     * @var null|EventManagerInterface
+     */
+    protected $events = null;
+
+    /**
+     * Event handles of this adapter
+     * @var array
+     */
+    protected $eventHandles = [];
+
+    /**
+     * The plugin registry
+     *
+     * @var SplObjectStorage Registered plugins
+     */
+    protected $pluginRegistry;
+
+    /**
+     * Capabilities of this adapter
+     *
+     * @var null|Capabilities
+     */
+    protected $capabilities = null;
+
+    /**
+     * Marker to change capabilities
+     *
+     * @var null|object
+     */
+    protected $capabilityMarker;
+
+    /**
+     * options
+     *
+     * @var mixed
+     */
+    protected $options;
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|Traversable|AdapterOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        if ($options) {
+            $this->setOptions($options);
+        }
+    }
+
+    /**
+     * Destructor
+     *
+     * detach all registered plugins to free
+     * event handles of event manager
+     *
+     * @return void
+     */
+    public function __destruct()
+    {
+        foreach ($this->getPluginRegistry() as $plugin) {
+            $this->removePlugin($plugin);
+        }
+
+        if ($this->eventHandles) {
+            $events = $this->getEventManager();
+            foreach ($this->eventHandles as $handle) {
+                $events->detach($handle);
+            }
+        }
+    }
+
+    /* configuration */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|AdapterOptions $options
+     * @return AbstractAdapter
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if ($this->options !== $options) {
+            if (!$options instanceof AdapterOptions) {
+                $options = new AdapterOptions($options);
+            }
+
+            if ($this->options) {
+                $this->options->setAdapter(null);
+            }
+            $options->setAdapter($this);
+            $this->options = $options;
+
+            $event = new Event('option', $this, new ArrayObject($options->toArray()));
+            $this->getEventManager()->trigger($event);
+        }
+        return $this;
+    }
+
+    /**
+     * Get options.
+     *
+     * @return AdapterOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new AdapterOptions());
+        }
+        return $this->options;
+    }
+
+    /**
+     * Enable/Disable caching.
+     *
+     * Alias of setWritable and setReadable.
+     *
+     * @see    setWritable()
+     * @see    setReadable()
+     * @param  bool $flag
+     * @return AbstractAdapter
+     */
+    public function setCaching($flag)
+    {
+        $flag    = (bool) $flag;
+        $options = $this->getOptions();
+        $options->setWritable($flag);
+        $options->setReadable($flag);
+        return $this;
+    }
+
+    /**
+     * Get caching enabled.
+     *
+     * Alias of getWritable and getReadable.
+     *
+     * @see    getWritable()
+     * @see    getReadable()
+     * @return bool
+     */
+    public function getCaching()
+    {
+        $options = $this->getOptions();
+        return ($options->getWritable() && $options->getReadable());
+    }
+
+    /* Event/Plugin handling */
+
+    /**
+     * Get the event manager
+     *
+     * @return EventManagerInterface
+     */
+    public function getEventManager()
+    {
+        if ($this->events === null) {
+            $this->events = new EventManager([__CLASS__, get_class($this)]);
+        }
+        return $this->events;
+    }
+
+    /**
+     * Trigger a pre event and return the event response collection
+     *
+     * @param  string $eventName
+     * @param  ArrayObject $args
+     * @return \Zend\EventManager\ResponseCollection All handler return values
+     */
+    protected function triggerPre($eventName, ArrayObject $args)
+    {
+        return $this->getEventManager()->trigger(new Event($eventName . '.pre', $this, $args));
+    }
+
+    /**
+     * Triggers the PostEvent and return the result value.
+     *
+     * @param  string      $eventName
+     * @param  ArrayObject $args
+     * @param  mixed       $result
+     * @return mixed
+     */
+    protected function triggerPost($eventName, ArrayObject $args, & $result)
+    {
+        $postEvent = new PostEvent($eventName . '.post', $this, $args, $result);
+        $eventRs   = $this->getEventManager()->trigger($postEvent);
+
+        return $eventRs->stopped()
+            ? $eventRs->last()
+            : $postEvent->getResult();
+    }
+
+    /**
+     * Trigger an exception event
+     *
+     * If the ExceptionEvent has the flag "throwException" enabled throw the
+     * exception after trigger else return the result.
+     *
+     * @param  string      $eventName
+     * @param  ArrayObject $args
+     * @param  mixed       $result
+     * @param  \Exception  $exception
+     * @throws Exception\ExceptionInterface
+     * @return mixed
+     */
+    protected function triggerException($eventName, ArrayObject $args, & $result, \Exception $exception)
+    {
+        $exceptionEvent = new ExceptionEvent($eventName . '.exception', $this, $args, $result, $exception);
+        $eventRs        = $this->getEventManager()->trigger($exceptionEvent);
+
+        if ($exceptionEvent->getThrowException()) {
+            throw $exceptionEvent->getException();
+        }
+
+        return $eventRs->stopped()
+            ? $eventRs->last()
+            : $exceptionEvent->getResult();
+    }
+
+    /**
+     * Check if a plugin is registered
+     *
+     * @param  Plugin\PluginInterface $plugin
+     * @return bool
+     */
+    public function hasPlugin(Plugin\PluginInterface $plugin)
+    {
+        $registry = $this->getPluginRegistry();
+        return $registry->contains($plugin);
+    }
+
+    /**
+     * Register a plugin
+     *
+     * @param  Plugin\PluginInterface $plugin
+     * @param  int                    $priority
+     * @return AbstractAdapter Fluent interface
+     * @throws Exception\LogicException
+     */
+    public function addPlugin(Plugin\PluginInterface $plugin, $priority = 1)
+    {
+        $registry = $this->getPluginRegistry();
+        if ($registry->contains($plugin)) {
+            throw new Exception\LogicException(sprintf(
+                'Plugin of type "%s" already registered',
+                get_class($plugin)
+            ));
+        }
+
+        $plugin->attach($this->getEventManager(), $priority);
+        $registry->attach($plugin);
+
+        return $this;
+    }
+
+    /**
+     * Unregister an already registered plugin
+     *
+     * @param  Plugin\PluginInterface $plugin
+     * @return AbstractAdapter Fluent interface
+     * @throws Exception\LogicException
+     */
+    public function removePlugin(Plugin\PluginInterface $plugin)
+    {
+        $registry = $this->getPluginRegistry();
+        if ($registry->contains($plugin)) {
+            $plugin->detach($this->getEventManager());
+            $registry->detach($plugin);
+        }
+        return $this;
+    }
+
+    /**
+     * Return registry of plugins
+     *
+     * @return SplObjectStorage
+     */
+    public function getPluginRegistry()
+    {
+        if (!$this->pluginRegistry instanceof SplObjectStorage) {
+            $this->pluginRegistry = new SplObjectStorage();
+        }
+        return $this->pluginRegistry;
+    }
+
+    /* reading */
+
+    /**
+     * Get an item.
+     *
+     * @param  string  $key
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getItem.pre(PreEvent)
+     * @triggers getItem.post(PostEvent)
+     * @triggers getItem.exception(ExceptionEvent)
+     */
+    public function getItem($key, & $success = null, & $casToken = null)
+    {
+        if (!$this->getOptions()->getReadable()) {
+            $success = false;
+            return;
+        }
+
+        $this->normalizeKey($key);
+
+        $argn = func_num_args();
+        $args = [
+            'key' => & $key,
+        ];
+        if ($argn > 1) {
+            $args['success'] = & $success;
+        }
+        if ($argn > 2) {
+            $args['casToken'] = & $casToken;
+        }
+        $args = new ArrayObject($args);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            if ($eventRs->stopped()) {
+                $result = $eventRs->last();
+            } elseif ($args->offsetExists('success') && $args->offsetExists('casToken')) {
+                $result = $this->internalGetItem($args['key'], $args['success'], $args['casToken']);
+            } elseif ($args->offsetExists('success')) {
+                $result = $this->internalGetItem($args['key'], $args['success']);
+            } else {
+                $result = $this->internalGetItem($args['key']);
+            }
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = null;
+            $success = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    abstract protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null);
+
+    /**
+     * Get multiple items.
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getItems.pre(PreEvent)
+     * @triggers getItems.post(PostEvent)
+     * @triggers getItems.exception(ExceptionEvent)
+     */
+    public function getItems(array $keys)
+    {
+        if (!$this->getOptions()->getReadable()) {
+            return [];
+        }
+
+        $this->normalizeKeys($keys);
+        $args = new ArrayObject([
+            'keys' => & $keys,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalGetItems($args['keys']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = [];
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $success = null;
+        $result  = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $value = $this->internalGetItem($normalizedKey, $success);
+            if ($success) {
+                $result[$normalizedKey] = $value;
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Test if an item exists.
+     *
+     * @param  string $key
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers hasItem.pre(PreEvent)
+     * @triggers hasItem.post(PostEvent)
+     * @triggers hasItem.exception(ExceptionEvent)
+     */
+    public function hasItem($key)
+    {
+        if (!$this->getOptions()->getReadable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key' => & $key,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalHasItem($args['key']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $success = null;
+        $this->internalGetItem($normalizedKey, $success);
+        return $success;
+    }
+
+    /**
+     * Test multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers hasItems.pre(PreEvent)
+     * @triggers hasItems.post(PostEvent)
+     * @triggers hasItems.exception(ExceptionEvent)
+     */
+    public function hasItems(array $keys)
+    {
+        if (!$this->getOptions()->getReadable()) {
+            return [];
+        }
+
+        $this->normalizeKeys($keys);
+        $args = new ArrayObject([
+            'keys' => & $keys,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalHasItems($args['keys']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = [];
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if ($this->internalHasItem($normalizedKey)) {
+                $result[] = $normalizedKey;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $key
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getMetadata.pre(PreEvent)
+     * @triggers getMetadata.post(PostEvent)
+     * @triggers getMetadata.exception(ExceptionEvent)
+     */
+    public function getMetadata($key)
+    {
+        if (!$this->getOptions()->getReadable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key' => & $key,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalGetMetadata($args['key']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to get metadata of an item.
+     *
+     * @param  string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        if (!$this->internalHasItem($normalizedKey)) {
+            return false;
+        }
+
+        return [];
+    }
+
+    /**
+     * Get multiple metadata
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and metadata
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getMetadatas.pre(PreEvent)
+     * @triggers getMetadatas.post(PostEvent)
+     * @triggers getMetadatas.exception(ExceptionEvent)
+     */
+    public function getMetadatas(array $keys)
+    {
+        if (!$this->getOptions()->getReadable()) {
+            return [];
+        }
+
+        $this->normalizeKeys($keys);
+        $args = new ArrayObject([
+            'keys' => & $keys,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalGetMetadatas($args['keys']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = [];
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to get multiple metadata
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and metadata
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadatas(array & $normalizedKeys)
+    {
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $metadata = $this->internalGetMetadata($normalizedKey);
+            if ($metadata !== false) {
+                $result[$normalizedKey] = $metadata;
+            }
+        }
+        return $result;
+    }
+
+    /* writing */
+
+    /**
+     * Store an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers setItem.pre(PreEvent)
+     * @triggers setItem.post(PostEvent)
+     * @triggers setItem.exception(ExceptionEvent)
+     */
+    public function setItem($key, $value)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key'   => & $key,
+            'value' => & $value,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalSetItem($args['key'], $args['value']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    abstract protected function internalSetItem(& $normalizedKey, & $value);
+
+    /**
+     * Store multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers setItems.pre(PreEvent)
+     * @triggers setItems.post(PostEvent)
+     * @triggers setItems.exception(ExceptionEvent)
+     */
+    public function setItems(array $keyValuePairs)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return array_keys($keyValuePairs);
+        }
+
+        $this->normalizeKeyValuePairs($keyValuePairs);
+        $args = new ArrayObject([
+            'keyValuePairs' => & $keyValuePairs,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalSetItems($args['keyValuePairs']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = array_keys($keyValuePairs);
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $failedKeys = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            if (!$this->internalSetItem($normalizedKey, $value)) {
+                $failedKeys[] = $normalizedKey;
+            }
+        }
+        return $failedKeys;
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers addItem.pre(PreEvent)
+     * @triggers addItem.post(PostEvent)
+     * @triggers addItem.exception(ExceptionEvent)
+     */
+    public function addItem($key, $value)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key'   => & $key,
+            'value' => & $value,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalAddItem($args['key'], $args['value']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        if ($this->internalHasItem($normalizedKey)) {
+            return false;
+        }
+        return $this->internalSetItem($normalizedKey, $value);
+    }
+
+    /**
+     * Add multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers addItems.pre(PreEvent)
+     * @triggers addItems.post(PostEvent)
+     * @triggers addItems.exception(ExceptionEvent)
+     */
+    public function addItems(array $keyValuePairs)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return array_keys($keyValuePairs);
+        }
+
+        $this->normalizeKeyValuePairs($keyValuePairs);
+        $args = new ArrayObject([
+            'keyValuePairs' => & $keyValuePairs,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalAddItems($args['keyValuePairs']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = array_keys($keyValuePairs);
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to add multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItems(array & $normalizedKeyValuePairs)
+    {
+        $result = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            if (!$this->internalAddItem($normalizedKey, $value)) {
+                $result[] = $normalizedKey;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Replace an existing item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers replaceItem.pre(PreEvent)
+     * @triggers replaceItem.post(PostEvent)
+     * @triggers replaceItem.exception(ExceptionEvent)
+     */
+    public function replaceItem($key, $value)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key'   => & $key,
+            'value' => & $value,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalReplaceItem($args['key'], $args['value']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        if (!$this->internalhasItem($normalizedKey)) {
+            return false;
+        }
+
+        return $this->internalSetItem($normalizedKey, $value);
+    }
+
+    /**
+     * Replace multiple existing items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers replaceItems.pre(PreEvent)
+     * @triggers replaceItems.post(PostEvent)
+     * @triggers replaceItems.exception(ExceptionEvent)
+     */
+    public function replaceItems(array $keyValuePairs)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return array_keys($keyValuePairs);
+        }
+
+        $this->normalizeKeyValuePairs($keyValuePairs);
+        $args = new ArrayObject([
+            'keyValuePairs' => & $keyValuePairs,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalReplaceItems($args['keyValuePairs']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = array_keys($keyValuePairs);
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to replace multiple existing items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItems(array & $normalizedKeyValuePairs)
+    {
+        $result = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            if (!$this->internalReplaceItem($normalizedKey, $value)) {
+                $result[] = $normalizedKey;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Set an item only if token matches
+     *
+     * It uses the token received from getItem() to check if the item has
+     * changed before overwriting it.
+     *
+     * @param  mixed  $token
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     * @see    getItem()
+     * @see    setItem()
+     */
+    public function checkAndSetItem($token, $key, $value)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'token' => & $token,
+            'key'   => & $key,
+            'value' => & $value,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalCheckAndSetItem($args['token'], $args['key'], $args['value']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to set an item only if token matches
+     *
+     * @param  mixed  $token
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     * @see    getItem()
+     * @see    setItem()
+     */
+    protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
+    {
+        $oldValue = $this->internalGetItem($normalizedKey);
+        if ($oldValue !== $token) {
+            return false;
+        }
+
+        return $this->internalSetItem($normalizedKey, $value);
+    }
+
+    /**
+     * Reset lifetime of an item
+     *
+     * @param  string $key
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers touchItem.pre(PreEvent)
+     * @triggers touchItem.post(PostEvent)
+     * @triggers touchItem.exception(ExceptionEvent)
+     */
+    public function touchItem($key)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key' => & $key,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalTouchItem($args['key']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to reset lifetime of an item
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalTouchItem(& $normalizedKey)
+    {
+        $success = null;
+        $value   = $this->internalGetItem($normalizedKey, $success);
+        if (!$success) {
+            return false;
+        }
+
+        return $this->internalReplaceItem($normalizedKey, $value);
+    }
+
+    /**
+     * Reset lifetime of multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not updated keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers touchItems.pre(PreEvent)
+     * @triggers touchItems.post(PostEvent)
+     * @triggers touchItems.exception(ExceptionEvent)
+     */
+    public function touchItems(array $keys)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return $keys;
+        }
+
+        $this->normalizeKeys($keys);
+        $args = new ArrayObject([
+            'keys' => & $keys,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalTouchItems($args['keys']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            return $this->triggerException(__FUNCTION__, $args, $keys, $e);
+        }
+    }
+
+    /**
+     * Internal method to reset lifetime of multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of not updated keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalTouchItems(array & $normalizedKeys)
+    {
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if (!$this->internalTouchItem($normalizedKey)) {
+                $result[] = $normalizedKey;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Remove an item.
+     *
+     * @param  string $key
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers removeItem.pre(PreEvent)
+     * @triggers removeItem.post(PostEvent)
+     * @triggers removeItem.exception(ExceptionEvent)
+     */
+    public function removeItem($key)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key' => & $key,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalRemoveItem($args['key']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    abstract protected function internalRemoveItem(& $normalizedKey);
+
+    /**
+     * Remove multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not removed keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers removeItems.pre(PreEvent)
+     * @triggers removeItems.post(PostEvent)
+     * @triggers removeItems.exception(ExceptionEvent)
+     */
+    public function removeItems(array $keys)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return $keys;
+        }
+
+        $this->normalizeKeys($keys);
+        $args = new ArrayObject([
+            'keys' => & $keys,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalRemoveItems($args['keys']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            return $this->triggerException(__FUNCTION__, $args, $keys, $e);
+        }
+    }
+
+    /**
+     * Internal method to remove multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of not removed keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItems(array & $normalizedKeys)
+    {
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if (!$this->internalRemoveItem($normalizedKey)) {
+                $result[] = $normalizedKey;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Increment an item.
+     *
+     * @param  string $key
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers incrementItem.pre(PreEvent)
+     * @triggers incrementItem.post(PostEvent)
+     * @triggers incrementItem.exception(ExceptionEvent)
+     */
+    public function incrementItem($key, $value)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key'   => & $key,
+            'value' => & $value,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalIncrementItem($args['key'], $args['value']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $success  = null;
+        $value    = (int) $value;
+        $get      = (int) $this->internalGetItem($normalizedKey, $success);
+        $newValue = $get + $value;
+
+        if ($success) {
+            $this->internalReplaceItem($normalizedKey, $newValue);
+        } else {
+            $this->internalAddItem($normalizedKey, $newValue);
+        }
+
+        return $newValue;
+    }
+
+    /**
+     * Increment multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Associative array of keys and new values
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers incrementItems.pre(PreEvent)
+     * @triggers incrementItems.post(PostEvent)
+     * @triggers incrementItems.exception(ExceptionEvent)
+     */
+    public function incrementItems(array $keyValuePairs)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return [];
+        }
+
+        $this->normalizeKeyValuePairs($keyValuePairs);
+        $args = new ArrayObject([
+            'keyValuePairs' => & $keyValuePairs,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalIncrementItems($args['keyValuePairs']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = [];
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to increment multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Associative array of keys and new values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItems(array & $normalizedKeyValuePairs)
+    {
+        $result = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            $newValue = $this->internalIncrementItem($normalizedKey, $value);
+            if ($newValue !== false) {
+                $result[$normalizedKey] = $newValue;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Decrement an item.
+     *
+     * @param  string $key
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers decrementItem.pre(PreEvent)
+     * @triggers decrementItem.post(PostEvent)
+     * @triggers decrementItem.exception(ExceptionEvent)
+     */
+    public function decrementItem($key, $value)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return false;
+        }
+
+        $this->normalizeKey($key);
+        $args = new ArrayObject([
+            'key'   => & $key,
+            'value' => & $value,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalDecrementItem($args['key'], $args['value']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $success  = null;
+        $value    = (int) $value;
+        $get      = (int) $this->internalGetItem($normalizedKey, $success);
+        $newValue = $get - $value;
+
+        if ($success) {
+            $this->internalReplaceItem($normalizedKey, $newValue);
+        } else {
+            $this->internalAddItem($normalizedKey, $newValue);
+        }
+
+        return $newValue;
+    }
+
+    /**
+     * Decrement multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Associative array of keys and new values
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers incrementItems.pre(PreEvent)
+     * @triggers incrementItems.post(PostEvent)
+     * @triggers incrementItems.exception(ExceptionEvent)
+     */
+    public function decrementItems(array $keyValuePairs)
+    {
+        if (!$this->getOptions()->getWritable()) {
+            return [];
+        }
+
+        $this->normalizeKeyValuePairs($keyValuePairs);
+        $args = new ArrayObject([
+            'keyValuePairs' => & $keyValuePairs,
+        ]);
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalDecrementItems($args['keyValuePairs']);
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = [];
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to decrement multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Associative array of keys and new values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItems(array & $normalizedKeyValuePairs)
+    {
+        $result = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            $newValue = $this->decrementItem($normalizedKey, $value);
+            if ($newValue !== false) {
+                $result[$normalizedKey] = $newValue;
+            }
+        }
+        return $result;
+    }
+
+    /* status */
+
+    /**
+     * Get capabilities of this adapter
+     *
+     * @return Capabilities
+     * @triggers getCapabilities.pre(PreEvent)
+     * @triggers getCapabilities.post(PostEvent)
+     * @triggers getCapabilities.exception(ExceptionEvent)
+     */
+    public function getCapabilities()
+    {
+        $args = new ArrayObject();
+
+        try {
+            $eventRs = $this->triggerPre(__FUNCTION__, $args);
+
+            $result = $eventRs->stopped()
+                ? $eventRs->last()
+                : $this->internalGetCapabilities();
+
+            return $this->triggerPost(__FUNCTION__, $args, $result);
+        } catch (\Exception $e) {
+            $result = false;
+            return $this->triggerException(__FUNCTION__, $args, $result, $e);
+        }
+    }
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $this->capabilityMarker = new stdClass();
+            $this->capabilities     = new Capabilities($this, $this->capabilityMarker);
+        }
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Validates and normalizes a key
+     *
+     * @param  string $key
+     * @return void
+     * @throws Exception\InvalidArgumentException On an invalid key
+     */
+    protected function normalizeKey(& $key)
+    {
+        $key = (string) $key;
+
+        if ($key === '') {
+            throw new Exception\InvalidArgumentException(
+                "An empty key isn't allowed"
+            );
+        } elseif (($p = $this->getOptions()->getKeyPattern()) && !preg_match($p, $key)) {
+            throw new Exception\InvalidArgumentException(
+                "The key '{$key}' doesn't match against pattern '{$p}'"
+            );
+        }
+    }
+
+    /**
+     * Validates and normalizes multiple keys
+     *
+     * @param  array $keys
+     * @return void
+     * @throws Exception\InvalidArgumentException On an invalid key
+     */
+    protected function normalizeKeys(array & $keys)
+    {
+        if (!$keys) {
+            throw new Exception\InvalidArgumentException(
+                "An empty list of keys isn't allowed"
+            );
+        }
+
+        array_walk($keys, [$this, 'normalizeKey']);
+        $keys = array_values(array_unique($keys));
+    }
+
+    /**
+     * Validates and normalizes an array of key-value pairs
+     *
+     * @param  array $keyValuePairs
+     * @return void
+     * @throws Exception\InvalidArgumentException On an invalid key
+     */
+    protected function normalizeKeyValuePairs(array & $keyValuePairs)
+    {
+        $normalizedKeyValuePairs = [];
+        foreach ($keyValuePairs as $key => $value) {
+            $this->normalizeKey($key);
+            $normalizedKeyValuePairs[$key] = $value;
+        }
+        $keyValuePairs = $normalizedKeyValuePairs;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractZendServer.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractZendServer.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AbstractZendServer.php	(revision 5534)
@@ -0,0 +1,273 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\Capabilities;
+
+abstract class AbstractZendServer extends AbstractAdapter
+{
+    /**
+     * The namespace separator used on Zend Data Cache functions
+     *
+     * @var string
+     */
+    const NAMESPACE_SEPARATOR = '::';
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $namespace   = $this->getOptions()->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR;
+
+        $result = $this->zdcFetch($prefix . $normalizedKey);
+        if ($result === null) {
+            $success = false;
+        } else {
+            $success  = true;
+            $casToken = $result;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $namespace = $this->getOptions()->getNamespace();
+        if ($namespace === '') {
+            return $this->zdcFetchMulti($normalizedKeys);
+        }
+
+        $prefix       = $namespace . self::NAMESPACE_SEPARATOR;
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $fetch   = $this->zdcFetchMulti($internalKeys);
+        $result  = [];
+        $prefixL = strlen($prefix);
+        foreach ($fetch as $k => & $v) {
+            $result[substr($k, $prefixL)] = $v;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $namespace = $this->getOptions()->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR;
+        return  ($this->zdcFetch($prefix . $normalizedKey) !== false);
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $namespace = $this->getOptions()->getNamespace();
+        if ($namespace === '') {
+            return array_keys($this->zdcFetchMulti($normalizedKeys));
+        }
+
+        $prefix       = $namespace . self::NAMESPACE_SEPARATOR;
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $fetch   = $this->zdcFetchMulti($internalKeys);
+        $result  = [];
+        $prefixL = strlen($prefix);
+        foreach ($fetch as $internalKey => & $value) {
+            $result[] = substr($internalKey, $prefixL);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Get metadata for multiple items
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and metadata
+     *
+     * @triggers getMetadatas.pre(PreEvent)
+     * @triggers getMetadatas.post(PostEvent)
+     * @triggers getMetadatas.exception(ExceptionEvent)
+     */
+    protected function internalGetMetadatas(array & $normalizedKeys)
+    {
+        $namespace = $this->getOptions()->getNamespace();
+        if ($namespace === '') {
+            $result = $this->zdcFetchMulti($normalizedKeys);
+            return array_fill_keys(array_keys($result), []);
+        }
+
+        $prefix       = $namespace . self::NAMESPACE_SEPARATOR;
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $fetch   = $this->zdcFetchMulti($internalKeys);
+        $result  = [];
+        $prefixL = strlen($prefix);
+        foreach ($fetch as $internalKey => $value) {
+            $result[substr($internalKey, $prefixL)] = [];
+        }
+
+        return $result;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR;
+        $this->zdcStore($prefix . $normalizedKey, $value, $options->getTtl());
+        return true;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $namespace = $this->getOptions()->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR;
+        return $this->zdcDelete($prefix . $normalizedKey);
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $this->capabilityMarker = new stdClass();
+            $this->capabilities     = new Capabilities(
+                $this,
+                $this->capabilityMarker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => true,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => true,
+                        'object'   => 'object',
+                        'resource' => false,
+                    ],
+                    'supportedMetadata'  => [],
+                    'maxTtl'             => 0,
+                    'staticTtl'          => true,
+                    'ttlPrecision'       => 1,
+                    'useRequestTime'     => false,
+                    'expiredRead'        => false,
+                    'maxKeyLength'       => 0,
+                    'namespaceIsPrefix'  => true,
+                    'namespaceSeparator' => self::NAMESPACE_SEPARATOR,
+                ]
+            );
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal wrapper of zend_[disk|shm]_cache_* functions */
+
+    /**
+     * Store data into Zend Data Cache (zdc)
+     *
+     * @param  string $internalKey
+     * @param  mixed  $value
+     * @param  int    $ttl
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    abstract protected function zdcStore($internalKey, $value, $ttl);
+
+    /**
+     * Fetch a single item from Zend Data Cache (zdc)
+     *
+     * @param  string $internalKey
+     * @return mixed The stored value or FALSE if item wasn't found
+     * @throws Exception\RuntimeException
+     */
+    abstract protected function zdcFetch($internalKey);
+
+    /**
+     * Fetch multiple items from Zend Data Cache (zdc)
+     *
+     * @param  array $internalKeys
+     * @return array All found items
+     * @throws Exception\RuntimeException
+     */
+    abstract protected function zdcFetchMulti(array $internalKeys);
+
+    /**
+     * Delete data from Zend Data Cache (zdc)
+     *
+     * @param  string $internalKey
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    abstract protected function zdcDelete($internalKey);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AdapterOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AdapterOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/AdapterOptions.php	(revision 5534)
@@ -0,0 +1,264 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use ArrayObject;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\Event;
+use Zend\Cache\Storage\StorageInterface;
+use Zend\EventManager\EventsCapableInterface;
+use Zend\Stdlib\AbstractOptions;
+use Zend\Stdlib\ErrorHandler;
+
+/**
+ * Unless otherwise marked, all options in this class affect all adapters.
+ */
+class AdapterOptions extends AbstractOptions
+{
+    /**
+     * The adapter using these options
+     *
+     * @var null|StorageInterface
+     */
+    protected $adapter;
+
+    /**
+     * Validate key against pattern
+     *
+     * @var string
+     */
+    protected $keyPattern = '';
+
+    /**
+     * Namespace option
+     *
+     * @var string
+     */
+    protected $namespace = 'zfcache';
+
+    /**
+     * Readable option
+     *
+     * @var bool
+     */
+    protected $readable = true;
+
+    /**
+     * TTL option
+     *
+     * @var int|float 0 means infinite or maximum of adapter
+     */
+    protected $ttl = 0;
+
+    /**
+     * Writable option
+     *
+     * @var bool
+     */
+    protected $writable = true;
+
+    /**
+     * Adapter using this instance
+     *
+     * @param  StorageInterface|null $adapter
+     * @return AdapterOptions
+     */
+    public function setAdapter(StorageInterface $adapter = null)
+    {
+        $this->adapter = $adapter;
+        return $this;
+    }
+
+    /**
+     * Set key pattern
+     *
+     * @param  null|string $keyPattern
+     * @throws Exception\InvalidArgumentException
+     * @return AdapterOptions
+     */
+    public function setKeyPattern($keyPattern)
+    {
+        $keyPattern = (string) $keyPattern;
+        if ($this->keyPattern !== $keyPattern) {
+            // validate pattern
+            if ($keyPattern !== '') {
+                ErrorHandler::start(E_WARNING);
+                $result = preg_match($keyPattern, '');
+                $error = ErrorHandler::stop();
+                if ($result === false) {
+                    throw new Exception\InvalidArgumentException(sprintf(
+                        'Invalid pattern "%s"%s',
+                        $keyPattern,
+                        ($error ? ': ' . $error->getMessage() : '')
+                    ), 0, $error);
+                }
+            }
+
+            $this->triggerOptionEvent('key_pattern', $keyPattern);
+            $this->keyPattern = $keyPattern;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get key pattern
+     *
+     * @return string
+     */
+    public function getKeyPattern()
+    {
+        return $this->keyPattern;
+    }
+
+    /**
+     * Set namespace.
+     *
+     * @param  string $namespace
+     * @return AdapterOptions
+     */
+    public function setNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($this->namespace !== $namespace) {
+            $this->triggerOptionEvent('namespace', $namespace);
+            $this->namespace = $namespace;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get namespace
+     *
+     * @return string
+     */
+    public function getNamespace()
+    {
+        return $this->namespace;
+    }
+
+    /**
+     * Enable/Disable reading data from cache.
+     *
+     * @param  bool $readable
+     * @return AbstractAdapter
+     */
+    public function setReadable($readable)
+    {
+        $readable = (bool) $readable;
+        if ($this->readable !== $readable) {
+            $this->triggerOptionEvent('readable', $readable);
+            $this->readable = $readable;
+        }
+        return $this;
+    }
+
+    /**
+     * If reading data from cache enabled.
+     *
+     * @return bool
+     */
+    public function getReadable()
+    {
+        return $this->readable;
+    }
+
+    /**
+     * Set time to live.
+     *
+     * @param  int|float $ttl
+     * @return AdapterOptions
+     */
+    public function setTtl($ttl)
+    {
+        $this->normalizeTtl($ttl);
+        if ($this->ttl !== $ttl) {
+            $this->triggerOptionEvent('ttl', $ttl);
+            $this->ttl = $ttl;
+        }
+        return $this;
+    }
+
+    /**
+     * Get time to live.
+     *
+     * @return float
+     */
+    public function getTtl()
+    {
+        return $this->ttl;
+    }
+
+    /**
+     * Enable/Disable writing data to cache.
+     *
+     * @param  bool $writable
+     * @return AdapterOptions
+     */
+    public function setWritable($writable)
+    {
+        $writable = (bool) $writable;
+        if ($this->writable !== $writable) {
+            $this->triggerOptionEvent('writable', $writable);
+            $this->writable = $writable;
+        }
+        return $this;
+    }
+
+    /**
+     * If writing data to cache enabled.
+     *
+     * @return bool
+     */
+    public function getWritable()
+    {
+        return $this->writable;
+    }
+
+    /**
+     * Triggers an option event if this options instance has a connection to
+     * an adapter implements EventsCapableInterface.
+     *
+     * @param string $optionName
+     * @param mixed  $optionValue
+     * @return void
+     */
+    protected function triggerOptionEvent($optionName, $optionValue)
+    {
+        if ($this->adapter instanceof EventsCapableInterface) {
+            $event = new Event('option', $this->adapter, new ArrayObject([$optionName => $optionValue]));
+            $this->adapter->getEventManager()->trigger($event);
+        }
+    }
+
+    /**
+     * Validates and normalize a TTL.
+     *
+     * @param  int|float $ttl
+     * @throws Exception\InvalidArgumentException
+     * @return void
+     */
+    protected function normalizeTtl(&$ttl)
+    {
+        if (!is_int($ttl)) {
+            $ttl = (float) $ttl;
+
+            // convert to int if possible
+            if ($ttl === (float) (int) $ttl) {
+                $ttl = (int) $ttl;
+            }
+        }
+
+        if ($ttl < 0) {
+            throw new Exception\InvalidArgumentException("TTL can't be negative");
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Apc.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Apc.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Apc.php	(revision 5534)
@@ -0,0 +1,750 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use APCIterator as BaseApcIterator;
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class Apc extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    ClearByNamespaceInterface,
+    ClearByPrefixInterface,
+    FlushableInterface,
+    IterableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Buffered total space in bytes
+     *
+     * @var null|int|float
+     */
+    protected $totalSpace;
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|Traversable|ApcOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        $enabled = ini_get('apc.enabled');
+        if (PHP_SAPI == 'cli') {
+            $enabled = $enabled && (bool) ini_get('apc.enable_cli');
+        }
+
+        if (!$enabled) {
+            throw new Exception\ExtensionNotLoadedException(
+                "ext/apc is disabled - see 'apc.enabled' and 'apc.enable_cli'"
+            );
+        }
+
+        parent::__construct($options);
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|ApcOptions $options
+     * @return Apc
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof ApcOptions) {
+            $options = new ApcOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return ApcOptions
+     * @see    setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new ApcOptions());
+        }
+        return $this->options;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        if ($this->totalSpace === null) {
+            $smaInfo = apc_sma_info(true);
+            $this->totalSpace = $smaInfo['num_seg'] * $smaInfo['seg_size'];
+        }
+
+        return $this->totalSpace;
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $smaInfo = apc_sma_info(true);
+        return $smaInfo['avail_mem'];
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return ApcIterator
+     */
+    public function getIterator()
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = '';
+        $pattern   = null;
+        if ($namespace !== '') {
+            $prefix  = $namespace . $options->getNamespaceSeparator();
+            $pattern = '/^' . preg_quote($prefix, '/') . '/';
+        }
+
+        $baseIt = new BaseApcIterator('user', $pattern, 0, 1, APC_LIST_ACTIVE);
+        return new ApcIterator($this, $baseIt, $prefix);
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        return apc_clear_cache('user');
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items by given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        $options = $this->getOptions();
+        $prefix  = $namespace . $options->getNamespaceSeparator();
+        $pattern = '/^' . preg_quote($prefix, '/') . '/';
+        return apc_delete(new BaseApcIterator('user', $pattern, 0, 1, APC_LIST_ACTIVE));
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $nsPrefix  = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $pattern = '/^' . preg_quote($nsPrefix . $prefix, '/') . '/';
+        return apc_delete(new BaseApcIterator('user', $pattern, 0, 1, APC_LIST_ACTIVE));
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $result      = apc_fetch($internalKey, $success);
+
+        if (!$success) {
+            return;
+        }
+
+        $casToken = $result;
+        return $result;
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return apc_fetch($normalizedKeys);
+        }
+
+        $prefix       = $namespace . $options->getNamespaceSeparator();
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $fetch = apc_fetch($internalKeys);
+
+        // remove namespace prefix
+        $prefixL = strlen($prefix);
+        $result  = [];
+        foreach ($fetch as $internalKey => & $value) {
+            $result[substr($internalKey, $prefixL)] = $value;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        return apc_exists($prefix . $normalizedKey);
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            // array_filter with no callback will remove entries equal to FALSE
+            return array_keys(array_filter(apc_exists($normalizedKeys)));
+        }
+
+        $prefix       = $namespace . $options->getNamespaceSeparator();
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $exists  = apc_exists($internalKeys);
+        $result  = [];
+        $prefixL = strlen($prefix);
+        foreach ($exists as $internalKey => $bool) {
+            if ($bool === true) {
+                $result[] = substr($internalKey, $prefixL);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        // @see http://pecl.php.net/bugs/bug.php?id=22564
+        if (!apc_exists($internalKey)) {
+            $metadata = false;
+        } else {
+            $format   = APC_ITER_ALL ^ APC_ITER_VALUE ^ APC_ITER_TYPE ^ APC_ITER_REFCOUNT;
+            $regexp   = '/^' . preg_quote($internalKey, '/') . '$/';
+            $it       = new BaseApcIterator('user', $regexp, $format, 100, APC_LIST_ACTIVE);
+            $metadata = $it->current();
+        }
+
+        if (!$metadata) {
+            return false;
+        }
+
+        $this->normalizeMetadata($metadata);
+        return $metadata;
+    }
+
+    /**
+     * Get metadata of multiple items
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and metadata
+     *
+     * @triggers getMetadatas.pre(PreEvent)
+     * @triggers getMetadatas.post(PostEvent)
+     * @triggers getMetadatas.exception(ExceptionEvent)
+     */
+    protected function internalGetMetadatas(array & $normalizedKeys)
+    {
+        $keysRegExp = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $keysRegExp[] = preg_quote($normalizedKey, '/');
+        }
+
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefixL   = 0;
+
+        if ($namespace === '') {
+            $pattern = '/^(' . implode('|', $keysRegExp) . ')' . '$/';
+        } else {
+            $prefix  = $namespace . $options->getNamespaceSeparator();
+            $prefixL = strlen($prefix);
+            $pattern = '/^' . preg_quote($prefix, '/') . '(' . implode('|', $keysRegExp) . ')' . '$/';
+        }
+
+        $format  = APC_ITER_ALL ^ APC_ITER_VALUE ^ APC_ITER_TYPE ^ APC_ITER_REFCOUNT;
+        $it      = new BaseApcIterator('user', $pattern, $format, 100, APC_LIST_ACTIVE);
+        $result  = [];
+        foreach ($it as $internalKey => $metadata) {
+            // @see http://pecl.php.net/bugs/bug.php?id=22564
+            if (!apc_exists($internalKey)) {
+                continue;
+            }
+
+            $this->normalizeMetadata($metadata);
+            $result[substr($internalKey, $prefixL)] = $metadata;
+        }
+
+        return $result;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+
+        if (!apc_store($internalKey, $value, $ttl)) {
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "apc_store('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return array_keys(apc_store($normalizedKeyValuePairs, null, $options->getTtl()));
+        }
+
+        $prefix                = $namespace . $options->getNamespaceSeparator();
+        $internalKeyValuePairs = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => &$value) {
+            $internalKey = $prefix . $normalizedKey;
+            $internalKeyValuePairs[$internalKey] = &$value;
+        }
+
+        $failedKeys = apc_store($internalKeyValuePairs, null, $options->getTtl());
+        $failedKeys = array_keys($failedKeys);
+
+        // remove prefix
+        $prefixL = strlen($prefix);
+        foreach ($failedKeys as & $key) {
+            $key = substr($key, $prefixL);
+        }
+
+        return $failedKeys;
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+
+        if (!apc_add($internalKey, $value, $ttl)) {
+            if (apc_exists($internalKey)) {
+                return false;
+            }
+
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "apc_add('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to add multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItems(array & $normalizedKeyValuePairs)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return array_keys(apc_add($normalizedKeyValuePairs, null, $options->getTtl()));
+        }
+
+        $prefix                = $namespace . $options->getNamespaceSeparator();
+        $internalKeyValuePairs = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            $internalKey = $prefix . $normalizedKey;
+            $internalKeyValuePairs[$internalKey] = $value;
+        }
+
+        $failedKeys = apc_add($internalKeyValuePairs, null, $options->getTtl());
+        $failedKeys = array_keys($failedKeys);
+
+        // remove prefix
+        $prefixL = strlen($prefix);
+        foreach ($failedKeys as & $key) {
+            $key = substr($key, $prefixL);
+        }
+
+        return $failedKeys;
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        if (!apc_exists($internalKey)) {
+            return false;
+        }
+
+        $ttl = $options->getTtl();
+        if (!apc_store($internalKey, $value, $ttl)) {
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "apc_store('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        return apc_delete($prefix . $normalizedKey);
+    }
+
+    /**
+     * Internal method to remove multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of not removed keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItems(array & $normalizedKeys)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return apc_delete($normalizedKeys);
+        }
+
+        $prefix       = $namespace . $options->getNamespaceSeparator();
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $failedKeys = apc_delete($internalKeys);
+
+        // remove prefix
+        $prefixL = strlen($prefix);
+        foreach ($failedKeys as & $key) {
+            $key = substr($key, $prefixL);
+        }
+
+        return $failedKeys;
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $value       = (int) $value;
+        $newValue    = apc_inc($internalKey, $value);
+
+        // initial value
+        if ($newValue === false) {
+            $ttl      = $options->getTtl();
+            $newValue = $value;
+            if (!apc_add($internalKey, $newValue, $ttl)) {
+                throw new Exception\RuntimeException(
+                    "apc_add('{$internalKey}', {$newValue}, {$ttl}) failed"
+                );
+            }
+        }
+
+        return $newValue;
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $value       = (int) $value;
+        $newValue    = apc_dec($internalKey, $value);
+
+        // initial value
+        if ($newValue === false) {
+            $ttl      = $options->getTtl();
+            $newValue = -$value;
+            if (!apc_add($internalKey, $newValue, $ttl)) {
+                throw new Exception\RuntimeException(
+                    "apc_add('{$internalKey}', {$newValue}, {$ttl}) failed"
+                );
+            }
+        }
+
+        return $newValue;
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $marker       = new stdClass();
+            $capabilities = new Capabilities(
+                $this,
+                $marker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => true,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => true,
+                        'object'   => 'object',
+                        'resource' => false,
+                    ],
+                    'supportedMetadata' => [
+                        'internal_key',
+                        'atime', 'ctime', 'mtime', 'rtime',
+                        'size', 'hits', 'ttl',
+                    ],
+                    'minTtl'             => 1,
+                    'maxTtl'             => 0,
+                    'staticTtl'          => true,
+                    'ttlPrecision'       => 1,
+                    'useRequestTime'     => (bool) ini_get('apc.use_request_time'),
+                    'expiredRead'        => false,
+                    'maxKeyLength'       => 5182,
+                    'namespaceIsPrefix'  => true,
+                    'namespaceSeparator' => $this->getOptions()->getNamespaceSeparator(),
+                ]
+            );
+
+            // update namespace separator on change option
+            $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) {
+                $params = $event->getParams();
+
+                if (isset($params['namespace_separator'])) {
+                    $capabilities->setNamespaceSeparator($marker, $params['namespace_separator']);
+                }
+            });
+
+            $this->capabilities     = $capabilities;
+            $this->capabilityMarker = $marker;
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Normalize metadata to work with APC
+     *
+     * @param  array $metadata
+     * @return void
+     */
+    protected function normalizeMetadata(array & $metadata)
+    {
+        $apcMetadata = $metadata;
+        $metadata = [
+            'internal_key' => isset($metadata['key']) ? $metadata['key'] : $metadata['info'],
+            'atime'        => isset($metadata['access_time']) ? $metadata['access_time'] : $metadata['atime'],
+            'ctime'        => isset($metadata['creation_time']) ? $metadata['creation_time'] : $metadata['ctime'],
+            'mtime'        => isset($metadata['modified_time']) ? $metadata['modified_time'] : $metadata['mtime'],
+            'rtime'        => isset($metadata['deletion_time']) ? $metadata['deletion_time'] : $metadata['dtime'],
+            'size'         => $metadata['mem_size'],
+            'hits'         => isset($metadata['nhits']) ? $metadata['nhits'] : $metadata['num_hits'],
+            'ttl'          => $metadata['ttl'],
+        ];
+    }
+
+    /**
+     * Internal method to set an item only if token matches
+     *
+     * @param  mixed  $token
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @see    getItem()
+     * @see    setItem()
+     */
+    protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
+    {
+        if (is_int($token) && is_int($value)) {
+            return apc_cas($normalizedKey, $token, $value);
+        }
+
+        return parent::internalCheckAndSetItem($token, $normalizedKey, $value);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ApcIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ApcIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ApcIterator.php	(revision 5534)
@@ -0,0 +1,157 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use APCIterator as BaseApcIterator;
+use Zend\Cache\Storage\IteratorInterface;
+
+class ApcIterator implements IteratorInterface
+{
+    /**
+     * The apc storage instance
+     *
+     * @var Apc
+     */
+    protected $storage;
+
+    /**
+     * The iterator mode
+     *
+     * @var int
+     */
+    protected $mode = IteratorInterface::CURRENT_AS_KEY;
+
+    /**
+     * The base APCIterator instance
+     *
+     * @var BaseApcIterator
+     */
+    protected $baseIterator;
+
+    /**
+     * The length of the namespace prefix
+     *
+     * @var int
+     */
+    protected $prefixLength;
+
+    /**
+     * Constructor
+     *
+     * @param Apc             $storage
+     * @param BaseApcIterator $baseIterator
+     * @param string          $prefix
+     */
+    public function __construct(Apc $storage, BaseApcIterator $baseIterator, $prefix)
+    {
+        $this->storage      = $storage;
+        $this->baseIterator = $baseIterator;
+        $this->prefixLength = strlen($prefix);
+    }
+
+    /**
+     * Get storage instance
+     *
+     * @return Apc
+     */
+    public function getStorage()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Get iterator mode
+     *
+     * @return int Value of IteratorInterface::CURRENT_AS_*
+     */
+    public function getMode()
+    {
+        return $this->mode;
+    }
+
+    /**
+     * Set iterator mode
+     *
+     * @param int $mode
+     * @return ApcIterator Fluent interface
+     */
+    public function setMode($mode)
+    {
+        $this->mode = (int) $mode;
+        return $this;
+    }
+
+    /* Iterator */
+
+    /**
+     * Get current key, value or metadata.
+     *
+     * @return mixed
+     */
+    public function current()
+    {
+        if ($this->mode == IteratorInterface::CURRENT_AS_SELF) {
+            return $this;
+        }
+
+        $key = $this->key();
+
+        if ($this->mode == IteratorInterface::CURRENT_AS_VALUE) {
+            return $this->storage->getItem($key);
+        } elseif ($this->mode == IteratorInterface::CURRENT_AS_METADATA) {
+            return $this->storage->getMetadata($key);
+        }
+
+        return $key;
+    }
+
+    /**
+     * Get current key
+     *
+     * @return string
+     */
+    public function key()
+    {
+        $key = $this->baseIterator->key();
+
+        // remove namespace prefix
+        return substr($key, $this->prefixLength);
+    }
+
+    /**
+     * Move forward to next element
+     *
+     * @return void
+     */
+    public function next()
+    {
+        $this->baseIterator->next();
+    }
+
+    /**
+     * Checks if current position is valid
+     *
+     * @return bool
+     */
+    public function valid()
+    {
+        return $this->baseIterator->valid();
+    }
+
+    /**
+     * Rewind the Iterator to the first element.
+     *
+     * @return void
+     */
+    public function rewind()
+    {
+        return $this->baseIterator->rewind();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ApcOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ApcOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ApcOptions.php	(revision 5534)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+/**
+ * These are options specific to the APC adapter
+ */
+class ApcOptions extends AdapterOptions
+{
+    /**
+     * Namespace separator
+     *
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return ApcOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+        $this->namespaceSeparator = $namespaceSeparator;
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/BlackHole.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/BlackHole.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/BlackHole.php	(revision 5534)
@@ -0,0 +1,502 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\ClearExpiredInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Cache\Storage\OptimizableInterface;
+use Zend\Cache\Storage\StorageInterface;
+use Zend\Cache\Storage\TaggableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class BlackHole implements
+    StorageInterface,
+    AvailableSpaceCapableInterface,
+    ClearByNamespaceInterface,
+    ClearByPrefixInterface,
+    ClearExpiredInterface,
+    FlushableInterface,
+    IterableInterface,
+    OptimizableInterface,
+    TaggableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Capabilities of this adapter
+     *
+     * @var null|Capabilities
+     */
+    protected $capabilities = null;
+
+    /**
+     * Marker to change capabilities
+     *
+     * @var null|object
+     */
+    protected $capabilityMarker;
+
+    /**
+     * options
+     *
+     * @var null|AdapterOptions
+     */
+    protected $options;
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|\Traversable|AdapterOptions $options
+     */
+    public function __construct($options = null)
+    {
+        if ($options) {
+            $this->setOptions($options);
+        }
+    }
+
+    /**
+     * Set options.
+     *
+     * @param array|\Traversable|AdapterOptions $options
+     * @return StorageInterface Fluent interface
+     */
+    public function setOptions($options)
+    {
+        if ($this->options !== $options) {
+            if (!$options instanceof AdapterOptions) {
+                $options = new AdapterOptions($options);
+            }
+
+            if ($this->options) {
+                $this->options->setAdapter(null);
+            }
+            $options->setAdapter($this);
+            $this->options = $options;
+        }
+        return $this;
+    }
+
+    /**
+     * Get options
+     *
+     * @return AdapterOptions
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new AdapterOptions());
+        }
+        return $this->options;
+    }
+
+    /**
+     * Get an item.
+     *
+     * @param  string  $key
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     */
+    public function getItem($key, & $success = null, & $casToken = null)
+    {
+        $success = false;
+        return;
+    }
+
+    /**
+     * Get multiple items.
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and values
+     */
+    public function getItems(array $keys)
+    {
+        return [];
+    }
+
+    /**
+     * Test if an item exists.
+     *
+     * @param  string $key
+     * @return bool
+     */
+    public function hasItem($key)
+    {
+        return false;
+    }
+
+    /**
+     * Test multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of found keys
+     */
+    public function hasItems(array $keys)
+    {
+        return [];
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $key
+     * @return array|bool Metadata on success, false on failure
+     */
+    public function getMetadata($key)
+    {
+        return false;
+    }
+
+    /**
+     * Get multiple metadata
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and metadata
+     */
+    public function getMetadatas(array $keys)
+    {
+        return [];
+    }
+
+    /**
+     * Store an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     */
+    public function setItem($key, $value)
+    {
+        return false;
+    }
+
+    /**
+     * Store multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     */
+    public function setItems(array $keyValuePairs)
+    {
+        return array_keys($keyValuePairs);
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     */
+    public function addItem($key, $value)
+    {
+        return false;
+    }
+
+    /**
+     * Add multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     */
+    public function addItems(array $keyValuePairs)
+    {
+        return array_keys($keyValuePairs);
+    }
+
+    /**
+     * Replace an existing item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     */
+    public function replaceItem($key, $value)
+    {
+        return false;
+    }
+
+    /**
+     * Replace multiple existing items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     */
+    public function replaceItems(array $keyValuePairs)
+    {
+        return array_keys($keyValuePairs);
+    }
+
+    /**
+     * Set an item only if token matches
+     *
+     * It uses the token received from getItem() to check if the item has
+     * changed before overwriting it.
+     *
+     * @param  mixed  $token
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     */
+    public function checkAndSetItem($token, $key, $value)
+    {
+        return false;
+    }
+
+    /**
+     * Reset lifetime of an item
+     *
+     * @param  string $key
+     * @return bool
+     */
+    public function touchItem($key)
+    {
+        return false;
+    }
+
+    /**
+     * Reset lifetime of multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not updated keys
+     */
+    public function touchItems(array $keys)
+    {
+        return $keys;
+    }
+
+    /**
+     * Remove an item.
+     *
+     * @param  string $key
+     * @return bool
+     */
+    public function removeItem($key)
+    {
+        return false;
+    }
+
+    /**
+     * Remove multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not removed keys
+     */
+    public function removeItems(array $keys)
+    {
+        return $keys;
+    }
+
+    /**
+     * Increment an item.
+     *
+     * @param  string $key
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     */
+    public function incrementItem($key, $value)
+    {
+        return false;
+    }
+
+    /**
+     * Increment multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Associative array of keys and new values
+     */
+    public function incrementItems(array $keyValuePairs)
+    {
+        return [];
+    }
+
+    /**
+     * Decrement an item.
+     *
+     * @param  string $key
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     */
+    public function decrementItem($key, $value)
+    {
+        return false;
+    }
+
+    /**
+     * Decrement multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Associative array of keys and new values
+     */
+    public function decrementItems(array $keyValuePairs)
+    {
+        return [];
+    }
+
+    /**
+     * Capabilities of this storage
+     *
+     * @return Capabilities
+     */
+    public function getCapabilities()
+    {
+        if ($this->capabilities === null) {
+            // use default capabilities only
+            $this->capabilityMarker = new stdClass();
+            $this->capabilities     = new Capabilities($this, $this->capabilityMarker);
+        }
+        return $this->capabilities;
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        return 0;
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items of given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        return false;
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        return false;
+    }
+
+    /* ClearExpiredInterface */
+
+    /**
+     * Remove expired items
+     *
+     * @return bool
+     */
+    public function clearExpired()
+    {
+        return false;
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        return false;
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return KeyListIterator
+     */
+    public function getIterator()
+    {
+        return new KeyListIterator($this, []);
+    }
+
+    /* OptimizableInterface */
+
+    /**
+     * Optimize the storage
+     *
+     * @return bool
+     */
+    public function optimize()
+    {
+        return false;
+    }
+
+    /* TaggableInterface */
+
+    /**
+     * Set tags to an item by given key.
+     * An empty array will remove all tags.
+     *
+     * @param string   $key
+     * @param string[] $tags
+     * @return bool
+     */
+    public function setTags($key, array $tags)
+    {
+        return false;
+    }
+
+    /**
+     * Get tags of an item by given key
+     *
+     * @param string $key
+     * @return string[]|FALSE
+     */
+    public function getTags($key)
+    {
+        return false;
+    }
+
+    /**
+     * Remove items matching given tags.
+     *
+     * If $disjunction only one of the given tags must match
+     * else all given tags must match.
+     *
+     * @param string[] $tags
+     * @param  bool  $disjunction
+     * @return bool
+     */
+    public function clearByTags(array $tags, $disjunction = false)
+    {
+        return false;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        return 0;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Dba.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Dba.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Dba.php	(revision 5534)
@@ -0,0 +1,545 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Cache\Storage\OptimizableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+use Zend\Stdlib\ErrorHandler;
+
+class Dba extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    ClearByNamespaceInterface,
+    ClearByPrefixInterface,
+    FlushableInterface,
+    IterableInterface,
+    OptimizableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * The DBA resource handle
+     *
+     * @var null|resource
+     */
+    protected $handle;
+
+    /**
+     * Buffered total space in bytes
+     *
+     * @var null|int|float
+     */
+    protected $totalSpace;
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|Traversable|DbaOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        if (!extension_loaded('dba')) {
+            throw new Exception\ExtensionNotLoadedException('Missing ext/dba');
+        }
+
+        parent::__construct($options);
+    }
+
+    /**
+     * Destructor
+     *
+     * Closes an open dba resource
+     *
+     * @see AbstractAdapter::__destruct()
+     * @return void
+     */
+    public function __destruct()
+    {
+        $this->_close();
+
+        parent::__destruct();
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|DbaOptions $options
+     * @return self
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof DbaOptions) {
+            $options = new DbaOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return DbaOptions
+     * @see    setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new DbaOptions());
+        }
+        return $this->options;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        if ($this->totalSpace === null) {
+            $pathname = $this->getOptions()->getPathname();
+
+            if ($pathname === '') {
+                throw new Exception\LogicException('No pathname to database file');
+            }
+
+            ErrorHandler::start();
+            $total = disk_total_space(dirname($pathname));
+            $error = ErrorHandler::stop();
+            if ($total === false) {
+                throw new Exception\RuntimeException("Can't detect total space of '{$pathname}'", 0, $error);
+            }
+            $this->totalSpace = $total;
+
+            // clean total space buffer on change pathname
+            $events     = $this->getEventManager();
+            $handle     = null;
+            $totalSpace = & $this->totalSpace;
+            $callback   = function ($event) use (& $events, & $handle, & $totalSpace) {
+                $params = $event->getParams();
+                if (isset($params['pathname'])) {
+                    $totalSpace = null;
+                    $events->detach($handle);
+                }
+            };
+            $events->attach('option', $callback);
+        }
+
+        return $this->totalSpace;
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return float
+     */
+    public function getAvailableSpace()
+    {
+        $pathname = $this->getOptions()->getPathname();
+
+        if ($pathname === '') {
+            throw new Exception\LogicException('No pathname to database file');
+        }
+
+        ErrorHandler::start();
+        $avail = disk_free_space(dirname($pathname));
+        $error = ErrorHandler::stop();
+        if ($avail === false) {
+            throw new Exception\RuntimeException("Can't detect free space of '{$pathname}'", 0, $error);
+        }
+
+        return $avail;
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        $pathname = $this->getOptions()->getPathname();
+
+        if ($pathname === '') {
+            throw new Exception\LogicException('No pathname to database file');
+        }
+
+        if (file_exists($pathname)) {
+            // close the dba file before delete
+            // and reopen (create) on next use
+            $this->_close();
+
+            ErrorHandler::start();
+            $result = unlink($pathname);
+            $error  = ErrorHandler::stop();
+            if (!$result) {
+                throw new Exception\RuntimeException("unlink('{$pathname}') failed", 0, $error);
+            }
+        }
+
+        return true;
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items by given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        $prefix  = $namespace . $this->getOptions()->getNamespaceSeparator();
+        $prefixl = strlen($prefix);
+        $result  = true;
+
+        $this->_open();
+
+        do {
+            // Workaround for PHP-Bug #62491 & #62492
+            $recheck     = false;
+            $internalKey = dba_firstkey($this->handle);
+            while ($internalKey !== false && $internalKey !== null) {
+                if (substr($internalKey, 0, $prefixl) === $prefix) {
+                    $result = dba_delete($internalKey, $this->handle) && $result;
+                }
+
+                $internalKey = dba_nextkey($this->handle);
+            }
+        } while ($recheck);
+
+        return $result;
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix;
+        $prefixL   = strlen($prefix);
+        $result    = true;
+
+        $this->_open();
+
+        // Workaround for PHP-Bug #62491 & #62492
+        do {
+            $recheck     = false;
+            $internalKey = dba_firstkey($this->handle);
+            while ($internalKey !== false && $internalKey !== null) {
+                if (substr($internalKey, 0, $prefixL) === $prefix) {
+                    $result = dba_delete($internalKey, $this->handle) && $result;
+                    $recheck = true;
+                }
+
+                $internalKey = dba_nextkey($this->handle);
+            }
+        } while ($recheck);
+
+        return $result;
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return DbaIterator
+     */
+    public function getIterator()
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+        return new DbaIterator($this, $this->handle, $prefix);
+    }
+
+    /* OptimizableInterface */
+
+    /**
+     * Optimize the storage
+     *
+     * @return bool
+     * @return Exception\RuntimeException
+     */
+    public function optimize()
+    {
+        $this->_open();
+        if (!dba_optimize($this->handle)) {
+            throw new Exception\RuntimeException('dba_optimize failed');
+        }
+        return true;
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+        $this->_open();
+        $value = dba_fetch($prefix . $normalizedKey, $this->handle);
+
+        if ($value === false) {
+            $success = false;
+            return;
+        }
+
+        $success = true;
+        $casToken = $value;
+        return $value;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+        $this->_open();
+        return dba_exists($prefix . $normalizedKey, $this->handle);
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        $cacheableValue = (string) $value; // dba_replace requires a string
+
+        $this->_open();
+        if (!dba_replace($internalKey, $cacheableValue, $this->handle)) {
+            throw new Exception\RuntimeException("dba_replace('{$internalKey}', ...) failed");
+        }
+
+        return true;
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        $this->_open();
+
+        // Workaround for PHP-Bug #54242 & #62489
+        if (dba_exists($internalKey, $this->handle)) {
+            return false;
+        }
+
+        // Workaround for PHP-Bug #54242 & #62489
+        // dba_insert returns true if key already exists
+        ErrorHandler::start();
+        $result = dba_insert($internalKey, $value, $this->handle);
+        $error  = ErrorHandler::stop();
+        if (!$result || $error) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        $this->_open();
+
+        // Workaround for PHP-Bug #62490
+        if (!dba_exists($internalKey, $this->handle)) {
+            return false;
+        }
+
+        return dba_delete($internalKey, $this->handle);
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $marker       = new stdClass();
+            $capabilities = new Capabilities(
+                $this,
+                $marker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => 'string',
+                        'boolean'  => 'string',
+                        'integer'  => 'string',
+                        'double'   => 'string',
+                        'string'   => true,
+                        'array'    => false,
+                        'object'   => false,
+                        'resource' => false,
+                    ],
+                    'minTtl'             => 0,
+                    'supportedMetadata'  => [],
+                    'maxKeyLength'       => 0, // TODO: maxKeyLength ????
+                    'namespaceIsPrefix'  => true,
+                    'namespaceSeparator' => $this->getOptions()->getNamespaceSeparator(),
+                ]
+            );
+
+            // update namespace separator on change option
+            $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) {
+                $params = $event->getParams();
+
+                if (isset($params['namespace_separator'])) {
+                    $capabilities->setNamespaceSeparator($marker, $params['namespace_separator']);
+                }
+            });
+
+            $this->capabilities     = $capabilities;
+            $this->capabilityMarker = $marker;
+        }
+
+        return $this->capabilities;
+    }
+
+    /**
+     * Open the database if not already done.
+     *
+     * @return void
+     * @throws Exception\LogicException
+     * @throws Exception\RuntimeException
+     */
+    protected function _open()
+    {
+        if (!$this->handle) {
+            $options = $this->getOptions();
+            $pathname = $options->getPathname();
+            $mode     = $options->getMode();
+            $handler  = $options->getHandler();
+
+            if ($pathname === '') {
+                throw new Exception\LogicException('No pathname to database file');
+            }
+
+            ErrorHandler::start();
+            $dba =  dba_open($pathname, $mode, $handler);
+            $err = ErrorHandler::stop();
+            if (!$dba) {
+                throw new Exception\RuntimeException(
+                    "dba_open('{$pathname}', '{$mode}', '{$handler}') failed",
+                    0,
+                    $err
+                );
+            }
+            $this->handle = $dba;
+        }
+    }
+
+    /**
+     * Close database file if opened
+     *
+     * @return void
+     */
+    protected function _close()
+    {
+        if ($this->handle) {
+            ErrorHandler::start(E_NOTICE);
+            dba_close($this->handle);
+            ErrorHandler::stop();
+            $this->handle = null;
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/DbaIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/DbaIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/DbaIterator.php	(revision 5534)
@@ -0,0 +1,190 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\IteratorInterface;
+
+class DbaIterator implements IteratorInterface
+{
+    /**
+     * The apc storage instance
+     *
+     * @var Dba
+     */
+    protected $storage;
+
+    /**
+     * The iterator mode
+     *
+     * @var int
+     */
+    protected $mode = IteratorInterface::CURRENT_AS_KEY;
+
+    /**
+     * The dba resource handle
+     *
+     * @var resource
+     */
+    protected $handle;
+
+    /**
+     * The length of the namespace prefix
+     *
+     * @var int
+     */
+    protected $prefixLength;
+
+    /**
+     * The current internal key
+     *
+     * @var string|bool
+     */
+    protected $currentInternalKey;
+
+    /**
+     * Constructor
+     *
+     * @param Dba      $storage
+     * @param resource $handle
+     * @param string   $prefix
+     */
+    public function __construct(Dba $storage, $handle, $prefix)
+    {
+        $this->storage      = $storage;
+        $this->handle       = $handle;
+        $this->prefixLength = strlen($prefix);
+
+        $this->rewind();
+    }
+
+    /**
+     * Get storage instance
+     *
+     * @return Dba
+     */
+    public function getStorage()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Get iterator mode
+     *
+     * @return int Value of IteratorInterface::CURRENT_AS_*
+     */
+    public function getMode()
+    {
+        return $this->mode;
+    }
+
+    /**
+     * Set iterator mode
+     *
+     * @param int $mode
+     * @return ApcIterator Fluent interface
+     */
+    public function setMode($mode)
+    {
+        $this->mode = (int) $mode;
+        return $this;
+    }
+
+    /* Iterator */
+
+    /**
+     * Get current key, value or metadata.
+     *
+     * @return mixed
+     * @throws Exception\RuntimeException
+     */
+    public function current()
+    {
+        if ($this->mode == IteratorInterface::CURRENT_AS_SELF) {
+            return $this;
+        }
+
+        $key = $this->key();
+
+        if ($this->mode == IteratorInterface::CURRENT_AS_VALUE) {
+            return $this->storage->getItem($key);
+        } elseif ($this->mode == IteratorInterface::CURRENT_AS_METADATA) {
+            return $this->storage->getMetadata($key);
+        }
+
+        return $key;
+    }
+
+    /**
+     * Get current key
+     *
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    public function key()
+    {
+        if ($this->currentInternalKey === false) {
+            throw new Exception\RuntimeException("Iterator is on an invalid state");
+        }
+
+        // remove namespace prefix
+        return substr($this->currentInternalKey, $this->prefixLength);
+    }
+
+    /**
+     * Move forward to next element
+     *
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    public function next()
+    {
+        if ($this->currentInternalKey === false) {
+            throw new Exception\RuntimeException("Iterator is on an invalid state");
+        }
+
+        $this->currentInternalKey = dba_nextkey($this->handle);
+
+        // Workaround for PHP-Bug #62492
+        if ($this->currentInternalKey === null) {
+            $this->currentInternalKey = false;
+        }
+    }
+
+    /**
+     * Checks if current position is valid
+     *
+     * @return bool
+     */
+    public function valid()
+    {
+        return ($this->currentInternalKey !== false);
+    }
+
+    /**
+     * Rewind the Iterator to the first element.
+     *
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    public function rewind()
+    {
+        if ($this->currentInternalKey === false) {
+            throw new Exception\RuntimeException("Iterator is on an invalid state");
+        }
+
+        $this->currentInternalKey = dba_firstkey($this->handle);
+
+        // Workaround for PHP-Bug #62492
+        if ($this->currentInternalKey === null) {
+            $this->currentInternalKey = false;
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/DbaOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/DbaOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/DbaOptions.php	(revision 5534)
@@ -0,0 +1,135 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+
+/**
+ * These are options specific to the APC adapter
+ */
+class DbaOptions extends AdapterOptions
+{
+    /**
+     * Namespace separator
+     *
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * Pathname to the database file
+     *
+     * @var string
+     */
+    protected $pathname = '';
+
+    /**
+     * The mode to open the database
+     *
+     * @var string
+     */
+    protected $mode = 'c';
+
+    /**
+     * The name of the handler which shall be used for accessing the database.
+     *
+     * @var string
+     */
+    protected $handler = 'flatfile';
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return DbaOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+        $this->namespaceSeparator = $namespaceSeparator;
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * Set pathname to database file
+     *
+     * @param string $pathname
+     * @return DbaOptions
+     */
+    public function setPathname($pathname)
+    {
+        $this->pathname = (string) $pathname;
+        $this->triggerOptionEvent('pathname', $pathname);
+        return $this;
+    }
+
+    /**
+     * Get pathname to database file
+     *
+     * @return string
+     */
+    public function getPathname()
+    {
+        return $this->pathname;
+    }
+
+    /**
+     *
+     *
+     * @param string $mode
+     * @return \Zend\Cache\Storage\Adapter\DbaOptions
+     */
+    public function setMode($mode)
+    {
+        $this->mode = (string) $mode;
+        $this->triggerOptionEvent('mode', $mode);
+        return $this;
+    }
+
+    public function getMode()
+    {
+        return $this->mode;
+    }
+
+    public function setHandler($handler)
+    {
+        $handler = (string) $handler;
+
+        if (!function_exists('dba_handlers') || !in_array($handler, dba_handlers())) {
+            throw new Exception\ExtensionNotLoadedException("DBA-Handler '{$handler}' not supported");
+        }
+
+        if ($handler === 'inifile') {
+            throw new Exception\ExtensionNotLoadedException(
+                "DBA-Handler 'inifile' does not reliably support write operations"
+            );
+        }
+
+        $this->triggerOptionEvent('handler', $handler);
+        $this->handler = $handler;
+        return $this;
+    }
+
+    public function getHandler()
+    {
+        return $this->handler;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Filesystem.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Filesystem.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Filesystem.php	(revision 5534)
@@ -0,0 +1,1620 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Exception as BaseException;
+use GlobIterator;
+use stdClass;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\ClearExpiredInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Cache\Storage\OptimizableInterface;
+use Zend\Cache\Storage\TaggableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+use Zend\Stdlib\ErrorHandler;
+use ArrayObject;
+
+class Filesystem extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    ClearByNamespaceInterface,
+    ClearByPrefixInterface,
+    ClearExpiredInterface,
+    FlushableInterface,
+    IterableInterface,
+    OptimizableInterface,
+    TaggableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Buffered total space in bytes
+     *
+     * @var null|int|float
+     */
+    protected $totalSpace;
+
+    /**
+     * An identity for the last filespec
+     * (cache directory + namespace prefix + key + directory level)
+     *
+     * @var string
+     */
+    protected $lastFileSpecId = '';
+
+    /**
+     * The last used filespec
+     *
+     * @var string
+     */
+    protected $lastFileSpec = '';
+
+    /**
+     * Set options.
+     *
+     * @param  array|\Traversable|FilesystemOptions $options
+     * @return Filesystem
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof FilesystemOptions) {
+            $options = new FilesystemOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return FilesystemOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new FilesystemOptions());
+        }
+        return $this->options;
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @throws Exception\RuntimeException
+     * @return bool
+     */
+    public function flush()
+    {
+        $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME;
+        $dir   = $this->getOptions()->getCacheDir();
+        $clearFolder = null;
+        $clearFolder = function ($dir) use (& $clearFolder, $flags) {
+            $it = new GlobIterator($dir . DIRECTORY_SEPARATOR . '*', $flags);
+            foreach ($it as $pathname) {
+                if ($it->isDir()) {
+                    $clearFolder($pathname);
+                    rmdir($pathname);
+                } else {
+                    unlink($pathname);
+                }
+            }
+        };
+
+        ErrorHandler::start();
+        $clearFolder($dir);
+        $error = ErrorHandler::stop();
+        if ($error) {
+            throw new Exception\RuntimeException("Flushing directory '{$dir}' failed", 0, $error);
+        }
+
+        return true;
+    }
+
+    /* ClearExpiredInterface */
+
+    /**
+     * Remove expired items
+     *
+     * @return bool
+     *
+     * @triggers clearExpired.exception(ExceptionEvent)
+     */
+    public function clearExpired()
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+        $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_FILEINFO;
+        $path  = $options->getCacheDir()
+            . str_repeat(DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel())
+            . DIRECTORY_SEPARATOR . $prefix . '*.dat';
+        $glob = new GlobIterator($path, $flags);
+        $time = time();
+        $ttl  = $options->getTtl();
+
+        ErrorHandler::start();
+        foreach ($glob as $entry) {
+            $mtime = $entry->getMTime();
+            if ($time >= $mtime + $ttl) {
+                $pathname = $entry->getPathname();
+                unlink($pathname);
+
+                $tagPathname = substr($pathname, 0, -4) . '.tag';
+                if (file_exists($tagPathname)) {
+                    unlink($tagPathname);
+                }
+            }
+        }
+        $error = ErrorHandler::stop();
+        if ($error) {
+            $result = false;
+            return $this->triggerException(
+                __FUNCTION__,
+                new ArrayObject(),
+                $result,
+                new Exception\RuntimeException('Failed to clear expired items', 0, $error)
+            );
+        }
+
+        return true;
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items by given namespace
+     *
+     * @param string $namespace
+     * @throws Exception\RuntimeException
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        $options = $this->getOptions();
+        $prefix  = $namespace . $options->getNamespaceSeparator();
+
+        $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME;
+        $path = $options->getCacheDir()
+            . str_repeat(DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel())
+            . DIRECTORY_SEPARATOR . $prefix . '*.*';
+        $glob = new GlobIterator($path, $flags);
+
+        ErrorHandler::start();
+        foreach ($glob as $pathname) {
+            unlink($pathname);
+        }
+        $error = ErrorHandler::stop();
+        if ($error) {
+            throw new Exception\RuntimeException("Failed to remove files of '{$path}'", 0, $error);
+        }
+
+        return true;
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @throws Exception\RuntimeException
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $nsPrefix  = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+        $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME;
+        $path = $options->getCacheDir()
+            . str_repeat(DIRECTORY_SEPARATOR . $nsPrefix . '*', $options->getDirLevel())
+            . DIRECTORY_SEPARATOR . $nsPrefix . $prefix . '*.*';
+        $glob = new GlobIterator($path, $flags);
+
+        ErrorHandler::start();
+        foreach ($glob as $pathname) {
+            unlink($pathname);
+        }
+        $error = ErrorHandler::stop();
+        if ($error) {
+            throw new Exception\RuntimeException("Failed to remove files of '{$path}'", 0, $error);
+        }
+
+        return true;
+    }
+
+    /* TaggableInterface  */
+
+    /**
+     * Set tags to an item by given key.
+     * An empty array will remove all tags.
+     *
+     * @param string   $key
+     * @param string[] $tags
+     * @return bool
+     */
+    public function setTags($key, array $tags)
+    {
+        $this->normalizeKey($key);
+        if (!$this->internalHasItem($key)) {
+            return false;
+        }
+
+        $filespec = $this->getFileSpec($key);
+
+        if (!$tags) {
+            $this->unlink($filespec . '.tag');
+            return true;
+        }
+
+        $this->putFileContent($filespec . '.tag', implode("\n", $tags));
+        return true;
+    }
+
+    /**
+     * Get tags of an item by given key
+     *
+     * @param string $key
+     * @return string[]|FALSE
+     */
+    public function getTags($key)
+    {
+        $this->normalizeKey($key);
+        if (!$this->internalHasItem($key)) {
+            return false;
+        }
+
+        $filespec = $this->getFileSpec($key);
+        $tags     = [];
+        if (file_exists($filespec . '.tag')) {
+            $tags = explode("\n", $this->getFileContent($filespec . '.tag'));
+        }
+
+        return $tags;
+    }
+
+    /**
+     * Remove items matching given tags.
+     *
+     * If $disjunction only one of the given tags must match
+     * else all given tags must match.
+     *
+     * @param string[] $tags
+     * @param  bool  $disjunction
+     * @return bool
+     */
+    public function clearByTags(array $tags, $disjunction = false)
+    {
+        if (!$tags) {
+            return true;
+        }
+
+        $tagCount  = count($tags);
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+        $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME;
+        $path  = $options->getCacheDir()
+            . str_repeat(DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel())
+            . DIRECTORY_SEPARATOR . $prefix . '*.tag';
+        $glob = new GlobIterator($path, $flags);
+
+        foreach ($glob as $pathname) {
+            $diff = array_diff($tags, explode("\n", $this->getFileContent($pathname)));
+
+            $rem  = false;
+            if ($disjunction && count($diff) < $tagCount) {
+                $rem = true;
+            } elseif (!$disjunction && !$diff) {
+                $rem = true;
+            }
+
+            if ($rem) {
+                unlink($pathname);
+
+                $datPathname = substr($pathname, 0, -4) . '.dat';
+                if (file_exists($datPathname)) {
+                    unlink($datPathname);
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return FilesystemIterator
+     */
+    public function getIterator()
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $path      = $options->getCacheDir()
+            . str_repeat(DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel())
+            . DIRECTORY_SEPARATOR . $prefix . '*.dat';
+        return new FilesystemIterator($this, $path, $prefix);
+    }
+
+    /* OptimizableInterface */
+
+    /**
+     * Optimize the storage
+     *
+     * @return bool
+     * @return Exception\RuntimeException
+     */
+    public function optimize()
+    {
+        $options = $this->getOptions();
+        if ($options->getDirLevel()) {
+            $namespace = $options->getNamespace();
+            $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+
+            // removes only empty directories
+            $this->rmDir($options->getCacheDir(), $prefix);
+        }
+        return true;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @throws Exception\RuntimeException
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        if ($this->totalSpace === null) {
+            $path = $this->getOptions()->getCacheDir();
+
+            ErrorHandler::start();
+            $total = disk_total_space($path);
+            $error = ErrorHandler::stop();
+            if ($total === false) {
+                throw new Exception\RuntimeException("Can't detect total space of '{$path}'", 0, $error);
+            }
+            $this->totalSpace = $total;
+
+            // clean total space buffer on change cache_dir
+            $events     = $this->getEventManager();
+            $handle     = null;
+            $totalSpace = & $this->totalSpace;
+            $callback   = function ($event) use (& $events, & $handle, & $totalSpace) {
+                $params = $event->getParams();
+                if (isset($params['cache_dir'])) {
+                    $totalSpace = null;
+                    $events->detach($handle);
+                }
+            };
+            $events->attach('option', $callback);
+        }
+
+        return $this->totalSpace;
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @throws Exception\RuntimeException
+     * @return float
+     */
+    public function getAvailableSpace()
+    {
+        $path = $this->getOptions()->getCacheDir();
+
+        ErrorHandler::start();
+        $avail = disk_free_space($path);
+        $error = ErrorHandler::stop();
+        if ($avail === false) {
+            throw new Exception\RuntimeException("Can't detect free space of '{$path}'", 0, $error);
+        }
+
+        return $avail;
+    }
+
+    /* reading */
+
+    /**
+     * Get an item.
+     *
+     * @param  string  $key
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getItem.pre(PreEvent)
+     * @triggers getItem.post(PostEvent)
+     * @triggers getItem.exception(ExceptionEvent)
+     */
+    public function getItem($key, & $success = null, & $casToken = null)
+    {
+        $options = $this->getOptions();
+        if ($options->getReadable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        $argn = func_num_args();
+        if ($argn > 2) {
+            return parent::getItem($key, $success, $casToken);
+        } elseif ($argn > 1) {
+            return parent::getItem($key, $success);
+        }
+
+        return parent::getItem($key);
+    }
+
+    /**
+     * Get multiple items.
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getItems.pre(PreEvent)
+     * @triggers getItems.post(PostEvent)
+     * @triggers getItems.exception(ExceptionEvent)
+     */
+    public function getItems(array $keys)
+    {
+        $options = $this->getOptions();
+        if ($options->getReadable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::getItems($keys);
+    }
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return null|mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     * @throws BaseException
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        if (!$this->internalHasItem($normalizedKey)) {
+            $success = false;
+            return;
+        }
+
+        try {
+            $filespec = $this->getFileSpec($normalizedKey);
+            $data     = $this->getFileContent($filespec . '.dat');
+
+            // use filemtime + filesize as CAS token
+            if (func_num_args() > 2) {
+                $casToken = filemtime($filespec . '.dat') . filesize($filespec . '.dat');
+            }
+            $success  = true;
+            return $data;
+        } catch (BaseException $e) {
+            $success = false;
+            throw $e;
+        }
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $keys    = $normalizedKeys; // Don't change argument passed by reference
+        $result  = [];
+        while ($keys) {
+            // LOCK_NB if more than one items have to read
+            $nonBlocking = count($keys) > 1;
+            $wouldblock  = null;
+
+            // read items
+            foreach ($keys as $i => $key) {
+                if (!$this->internalHasItem($key)) {
+                    unset($keys[$i]);
+                    continue;
+                }
+
+                $filespec = $this->getFileSpec($key);
+                $data     = $this->getFileContent($filespec . '.dat', $nonBlocking, $wouldblock);
+                if ($nonBlocking && $wouldblock) {
+                    continue;
+                } else {
+                    unset($keys[$i]);
+                }
+
+                $result[$key] = $data;
+            }
+
+            // TODO: Don't check ttl after first iteration
+            // $options['ttl'] = 0;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Test if an item exists.
+     *
+     * @param  string $key
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers hasItem.pre(PreEvent)
+     * @triggers hasItem.post(PostEvent)
+     * @triggers hasItem.exception(ExceptionEvent)
+     */
+    public function hasItem($key)
+    {
+        $options = $this->getOptions();
+        if ($options->getReadable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::hasItem($key);
+    }
+
+    /**
+     * Test multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers hasItems.pre(PreEvent)
+     * @triggers hasItems.post(PostEvent)
+     * @triggers hasItems.exception(ExceptionEvent)
+     */
+    public function hasItems(array $keys)
+    {
+        $options = $this->getOptions();
+        if ($options->getReadable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::hasItems($keys);
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $file = $this->getFileSpec($normalizedKey) . '.dat';
+        if (!file_exists($file)) {
+            return false;
+        }
+
+        $ttl = $this->getOptions()->getTtl();
+        if ($ttl) {
+            ErrorHandler::start();
+            $mtime = filemtime($file);
+            $error = ErrorHandler::stop();
+            if (!$mtime) {
+                throw new Exception\RuntimeException("Error getting mtime of file '{$file}'", 0, $error);
+            }
+
+            if (time() >= ($mtime + $ttl)) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Get metadata
+     *
+     * @param string $key
+     * @return array|bool Metadata on success, false on failure
+     */
+    public function getMetadata($key)
+    {
+        $options = $this->getOptions();
+        if ($options->getReadable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::getMetadata($key);
+    }
+
+    /**
+     * Get metadatas
+     *
+     * @param array $keys
+     * @param array $options
+     * @return array Associative array of keys and metadata
+     */
+    public function getMetadatas(array $keys, array $options = [])
+    {
+        $options = $this->getOptions();
+        if ($options->getReadable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::getMetadatas($keys);
+    }
+
+    /**
+     * Get info by key
+     *
+     * @param string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        if (!$this->internalHasItem($normalizedKey)) {
+            return false;
+        }
+
+        $options  = $this->getOptions();
+        $filespec = $this->getFileSpec($normalizedKey);
+        $file     = $filespec . '.dat';
+
+        $metadata = [
+            'filespec' => $filespec,
+            'mtime'    => filemtime($file)
+        ];
+
+        if (!$options->getNoCtime()) {
+            $metadata['ctime'] = filectime($file);
+        }
+
+        if (!$options->getNoAtime()) {
+            $metadata['atime'] = fileatime($file);
+        }
+
+        return $metadata;
+    }
+
+    /**
+     * Internal method to get multiple metadata
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and metadata
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadatas(array & $normalizedKeys)
+    {
+        $options = $this->getOptions();
+        $result  = [];
+
+        foreach ($normalizedKeys as $normalizedKey) {
+            $filespec = $this->getFileSpec($normalizedKey);
+            $file     = $filespec . '.dat';
+
+            $metadata = [
+                'filespec' => $filespec,
+                'mtime'    => filemtime($file),
+            ];
+
+            if (!$options->getNoCtime()) {
+                $metadata['ctime'] = filectime($file);
+            }
+
+            if (!$options->getNoAtime()) {
+                $metadata['atime'] = fileatime($file);
+            }
+
+            $result[$normalizedKey] = $metadata;
+        }
+
+        return $result;
+    }
+
+    /* writing */
+
+    /**
+     * Store an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers setItem.pre(PreEvent)
+     * @triggers setItem.post(PostEvent)
+     * @triggers setItem.exception(ExceptionEvent)
+     */
+    public function setItem($key, $value)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+        return parent::setItem($key, $value);
+    }
+
+    /**
+     * Store multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers setItems.pre(PreEvent)
+     * @triggers setItems.post(PostEvent)
+     * @triggers setItems.exception(ExceptionEvent)
+     */
+    public function setItems(array $keyValuePairs)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::setItems($keyValuePairs);
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers addItem.pre(PreEvent)
+     * @triggers addItem.post(PostEvent)
+     * @triggers addItem.exception(ExceptionEvent)
+     */
+    public function addItem($key, $value)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::addItem($key, $value);
+    }
+
+    /**
+     * Add multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers addItems.pre(PreEvent)
+     * @triggers addItems.post(PostEvent)
+     * @triggers addItems.exception(ExceptionEvent)
+     */
+    public function addItems(array $keyValuePairs)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::addItems($keyValuePairs);
+    }
+
+    /**
+     * Replace an existing item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers replaceItem.pre(PreEvent)
+     * @triggers replaceItem.post(PostEvent)
+     * @triggers replaceItem.exception(ExceptionEvent)
+     */
+    public function replaceItem($key, $value)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::replaceItem($key, $value);
+    }
+
+    /**
+     * Replace multiple existing items.
+     *
+     * @param  array $keyValuePairs
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers replaceItems.pre(PreEvent)
+     * @triggers replaceItems.post(PostEvent)
+     * @triggers replaceItems.exception(ExceptionEvent)
+     */
+    public function replaceItems(array $keyValuePairs)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::replaceItems($keyValuePairs);
+    }
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $filespec = $this->getFileSpec($normalizedKey);
+        $this->prepareDirectoryStructure($filespec);
+
+        // write data in non-blocking mode
+        $wouldblock = null;
+        $this->putFileContent($filespec . '.dat', $value, true, $wouldblock);
+
+        // delete related tag file (if present)
+        $this->unlink($filespec . '.tag');
+
+        // Retry writing data in blocking mode if it was blocked before
+        if ($wouldblock) {
+            $this->putFileContent($filespec . '.dat', $value);
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        // create an associated array of files and contents to write
+        $contents = [];
+        foreach ($normalizedKeyValuePairs as $key => & $value) {
+            $filespec = $this->getFileSpec($key);
+            $this->prepareDirectoryStructure($filespec);
+
+            // *.dat file
+            $contents[$filespec . '.dat'] = & $value;
+
+            // *.tag file
+            $this->unlink($filespec . '.tag');
+        }
+
+        // write to disk
+        while ($contents) {
+            $nonBlocking = count($contents) > 1;
+            $wouldblock  = null;
+
+            foreach ($contents as $file => & $content) {
+                $this->putFileContent($file, $content, $nonBlocking, $wouldblock);
+                if (!$nonBlocking || !$wouldblock) {
+                    unset($contents[$file]);
+                }
+            }
+        }
+
+        // return OK
+        return [];
+    }
+
+    /**
+     * Set an item only if token matches
+     *
+     * It uses the token received from getItem() to check if the item has
+     * changed before overwriting it.
+     *
+     * @param  mixed  $token
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     * @see    getItem()
+     * @see    setItem()
+     */
+    public function checkAndSetItem($token, $key, $value)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::checkAndSetItem($token, $key, $value);
+    }
+
+    /**
+     * Internal method to set an item only if token matches
+     *
+     * @param  mixed  $token
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     * @see    getItem()
+     * @see    setItem()
+     */
+    protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
+    {
+        if (!$this->internalHasItem($normalizedKey)) {
+            return false;
+        }
+
+        // use filemtime + filesize as CAS token
+        $file  = $this->getFileSpec($normalizedKey) . '.dat';
+        $check = filemtime($file) . filesize($file);
+        if ($token !== $check) {
+            return false;
+        }
+
+        return $this->internalSetItem($normalizedKey, $value);
+    }
+
+    /**
+     * Reset lifetime of an item
+     *
+     * @param  string $key
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers touchItem.pre(PreEvent)
+     * @triggers touchItem.post(PostEvent)
+     * @triggers touchItem.exception(ExceptionEvent)
+     */
+    public function touchItem($key)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::touchItem($key);
+    }
+
+    /**
+     * Reset lifetime of multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not updated keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers touchItems.pre(PreEvent)
+     * @triggers touchItems.post(PostEvent)
+     * @triggers touchItems.exception(ExceptionEvent)
+     */
+    public function touchItems(array $keys)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::touchItems($keys);
+    }
+
+    /**
+     * Internal method to reset lifetime of an item
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalTouchItem(& $normalizedKey)
+    {
+        if (!$this->internalHasItem($normalizedKey)) {
+            return false;
+        }
+
+        $filespec = $this->getFileSpec($normalizedKey);
+
+        ErrorHandler::start();
+        $touch = touch($filespec . '.dat');
+        $error = ErrorHandler::stop();
+        if (!$touch) {
+            throw new Exception\RuntimeException("Error touching file '{$filespec}.dat'", 0, $error);
+        }
+
+        return true;
+    }
+
+    /**
+     * Remove an item.
+     *
+     * @param  string $key
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers removeItem.pre(PreEvent)
+     * @triggers removeItem.post(PostEvent)
+     * @triggers removeItem.exception(ExceptionEvent)
+     */
+    public function removeItem($key)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::removeItem($key);
+    }
+
+    /**
+     * Remove multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not removed keys
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers removeItems.pre(PreEvent)
+     * @triggers removeItems.post(PostEvent)
+     * @triggers removeItems.exception(ExceptionEvent)
+     */
+    public function removeItems(array $keys)
+    {
+        $options = $this->getOptions();
+        if ($options->getWritable() && $options->getClearStatCache()) {
+            clearstatcache();
+        }
+
+        return parent::removeItems($keys);
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $filespec = $this->getFileSpec($normalizedKey);
+        if (!file_exists($filespec . '.dat')) {
+            return false;
+        } else {
+            $this->unlink($filespec . '.dat');
+            $this->unlink($filespec . '.tag');
+        }
+        return true;
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $marker  = new stdClass();
+            $options = $this->getOptions();
+
+            // detect metadata
+            $metadata = ['mtime', 'filespec'];
+            if (!$options->getNoAtime()) {
+                $metadata[] = 'atime';
+            }
+            if (!$options->getNoCtime()) {
+                $metadata[] = 'ctime';
+            }
+
+            $capabilities = new Capabilities(
+                $this,
+                $marker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => 'string',
+                        'boolean'  => 'string',
+                        'integer'  => 'string',
+                        'double'   => 'string',
+                        'string'   => true,
+                        'array'    => false,
+                        'object'   => false,
+                        'resource' => false,
+                    ],
+                    'supportedMetadata'  => $metadata,
+                    'minTtl'             => 1,
+                    'maxTtl'             => 0,
+                    'staticTtl'          => false,
+                    'ttlPrecision'       => 1,
+                    'expiredRead'        => true,
+                    'maxKeyLength'       => 251, // 255 - strlen(.dat | .tag)
+                    'namespaceIsPrefix'  => true,
+                    'namespaceSeparator' => $options->getNamespaceSeparator(),
+                ]
+            );
+
+            // update capabilities on change options
+            $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) {
+                $params = $event->getParams();
+
+                if (isset($params['namespace_separator'])) {
+                    $capabilities->setNamespaceSeparator($marker, $params['namespace_separator']);
+                }
+
+                if (isset($params['no_atime']) || isset($params['no_ctime'])) {
+                    $metadata = $capabilities->getSupportedMetadata();
+
+                    if (isset($params['no_atime']) && !$params['no_atime']) {
+                        $metadata[] = 'atime';
+                    } elseif (isset($params['no_atime']) && ($index = array_search('atime', $metadata)) !== false) {
+                        unset($metadata[$index]);
+                    }
+
+                    if (isset($params['no_ctime']) && !$params['no_ctime']) {
+                        $metadata[] = 'ctime';
+                    } elseif (isset($params['no_ctime']) && ($index = array_search('ctime', $metadata)) !== false) {
+                        unset($metadata[$index]);
+                    }
+
+                    $capabilities->setSupportedMetadata($marker, $metadata);
+                }
+            });
+
+            $this->capabilityMarker = $marker;
+            $this->capabilities     = $capabilities;
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Removes directories recursive by namespace
+     *
+     * @param  string $dir    Directory to delete
+     * @param  string $prefix Namespace + Separator
+     * @return bool
+     */
+    protected function rmDir($dir, $prefix)
+    {
+        $glob = glob(
+            $dir . DIRECTORY_SEPARATOR . $prefix  . '*',
+            GLOB_ONLYDIR | GLOB_NOESCAPE | GLOB_NOSORT
+        );
+        if (!$glob) {
+            // On some systems glob returns false even on empty result
+            return true;
+        }
+
+        $ret = true;
+        foreach ($glob as $subdir) {
+            // skip removing current directory if removing of sub-directory failed
+            if ($this->rmDir($subdir, $prefix)) {
+                // ignore not empty directories
+                ErrorHandler::start();
+                $ret = rmdir($subdir) && $ret;
+                ErrorHandler::stop();
+            } else {
+                $ret = false;
+            }
+        }
+
+        return $ret;
+    }
+
+    /**
+     * Get file spec of the given key and namespace
+     *
+     * @param  string $normalizedKey
+     * @return string
+     */
+    protected function getFileSpec($normalizedKey)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $path      = $options->getCacheDir() . DIRECTORY_SEPARATOR;
+        $level     = $options->getDirLevel();
+
+        $fileSpecId = $path . $prefix . $normalizedKey . '/' . $level;
+        if ($this->lastFileSpecId !== $fileSpecId) {
+            if ($level > 0) {
+                // create up to 256 directories per directory level
+                $hash = md5($normalizedKey);
+                for ($i = 0, $max = ($level * 2); $i < $max; $i+= 2) {
+                    $path .= $prefix . $hash[$i] . $hash[$i+1] . DIRECTORY_SEPARATOR;
+                }
+            }
+
+            $this->lastFileSpecId = $fileSpecId;
+            $this->lastFileSpec   = $path . $prefix . $normalizedKey;
+        }
+
+        return $this->lastFileSpec;
+    }
+
+    /**
+     * Read info file
+     *
+     * @param  string  $file
+     * @param  bool $nonBlocking Don't block script if file is locked
+     * @param  bool $wouldblock  The optional argument is set to TRUE if the lock would block
+     * @return array|bool The info array or false if file wasn't found
+     * @throws Exception\RuntimeException
+     */
+    protected function readInfoFile($file, $nonBlocking = false, & $wouldblock = null)
+    {
+        if (!file_exists($file)) {
+            return false;
+        }
+
+        $content = $this->getFileContent($file, $nonBlocking, $wouldblock);
+        if ($nonBlocking && $wouldblock) {
+            return false;
+        }
+
+        ErrorHandler::start();
+        $ifo = unserialize($content);
+        $err = ErrorHandler::stop();
+        if (!is_array($ifo)) {
+            throw new Exception\RuntimeException("Corrupted info file '{$file}'", 0, $err);
+        }
+
+        return $ifo;
+    }
+
+    /**
+     * Read a complete file
+     *
+     * @param  string  $file        File complete path
+     * @param  bool $nonBlocking Don't block script if file is locked
+     * @param  bool $wouldblock  The optional argument is set to TRUE if the lock would block
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    protected function getFileContent($file, $nonBlocking = false, & $wouldblock = null)
+    {
+        $locking    = $this->getOptions()->getFileLocking();
+        $wouldblock = null;
+
+        ErrorHandler::start();
+
+        // if file locking enabled -> file_get_contents can't be used
+        if ($locking) {
+            $fp = fopen($file, 'rb');
+            if ($fp === false) {
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error opening file '{$file}'", 0, $err);
+            }
+
+            if ($nonBlocking) {
+                $lock = flock($fp, LOCK_SH | LOCK_NB, $wouldblock);
+                if ($wouldblock) {
+                    fclose($fp);
+                    ErrorHandler::stop();
+                    return;
+                }
+            } else {
+                $lock = flock($fp, LOCK_SH);
+            }
+
+            if (!$lock) {
+                fclose($fp);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error locking file '{$file}'", 0, $err);
+            }
+
+            $res = stream_get_contents($fp);
+            if ($res === false) {
+                flock($fp, LOCK_UN);
+                fclose($fp);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException('Error getting stream contents', 0, $err);
+            }
+
+            flock($fp, LOCK_UN);
+            fclose($fp);
+
+        // if file locking disabled -> file_get_contents can be used
+        } else {
+            $res = file_get_contents($file, false);
+            if ($res === false) {
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error getting file contents for file '{$file}'", 0, $err);
+            }
+        }
+
+        ErrorHandler::stop();
+        return $res;
+    }
+
+    /**
+     * Prepares a directory structure for the given file(spec)
+     * using the configured directory level.
+     *
+     * @param string $file
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function prepareDirectoryStructure($file)
+    {
+        $options = $this->getOptions();
+        $level   = $options->getDirLevel();
+
+        // Directory structure is required only if directory level > 0
+        if (!$level) {
+            return;
+        }
+
+        // Directory structure already exists
+        $pathname = dirname($file);
+        if (file_exists($pathname)) {
+            return;
+        }
+
+        $perm     = $options->getDirPermission();
+        $umask    = $options->getUmask();
+        if ($umask !== false && $perm !== false) {
+            $perm = $perm & ~$umask;
+        }
+
+        ErrorHandler::start();
+
+        if ($perm === false || $level == 1) {
+            // build-in mkdir function is enough
+
+            $umask = ($umask !== false) ? umask($umask) : false;
+            $res   = mkdir($pathname, ($perm !== false) ? $perm : 0775, true);
+
+            if ($umask !== false) {
+                umask($umask);
+            }
+
+            if (!$res) {
+                $err = ErrorHandler::stop();
+
+                // Issue 6435:
+                // mkdir could fail because of a race condition it was already created by another process
+                // after the first file_exists above
+                if (file_exists($pathname)) {
+                    return;
+                }
+
+                $oct = ($perm === false) ? '775' : decoct($perm);
+                throw new Exception\RuntimeException("mkdir('{$pathname}', 0{$oct}, true) failed", 0, $err);
+            }
+
+            if ($perm !== false && !chmod($pathname, $perm)) {
+                $oct = decoct($perm);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
+            }
+        } else {
+            // build-in mkdir function sets permission together with current umask
+            // which doesn't work well on multo threaded webservers
+            // -> create directories one by one and set permissions
+
+            // find existing path and missing path parts
+            $parts = [];
+            $path  = $pathname;
+            while (!file_exists($path)) {
+                array_unshift($parts, basename($path));
+                $nextPath = dirname($path);
+                if ($nextPath === $path) {
+                    break;
+                }
+                $path = $nextPath;
+            }
+
+            // make all missing path parts
+            foreach ($parts as $part) {
+                $path.= DIRECTORY_SEPARATOR . $part;
+
+                // create a single directory, set and reset umask immediately
+                $umask = ($umask !== false) ? umask($umask) : false;
+                $res   = mkdir($path, ($perm === false) ? 0775 : $perm, false);
+                if ($umask !== false) {
+                    umask($umask);
+                }
+
+                if (!$res) {
+                    // Issue 6435:
+                    // mkdir could fail because of a race condition it was already created by another process
+                    // after the first file_exists above ... go to the next path part.
+                    if (file_exists($path)) {
+                        continue;
+                    }
+
+                    $oct = ($perm === false) ? '775' : decoct($perm);
+                    ErrorHandler::stop();
+                    throw new Exception\RuntimeException(
+                        "mkdir('{$path}', 0{$oct}, false) failed"
+                    );
+                }
+
+                if ($perm !== false && !chmod($path, $perm)) {
+                    $oct = decoct($perm);
+                    ErrorHandler::stop();
+                    throw new Exception\RuntimeException(
+                        "chmod('{$path}', 0{$oct}) failed"
+                    );
+                }
+            }
+        }
+
+        ErrorHandler::stop();
+    }
+
+    /**
+     * Write content to a file
+     *
+     * @param  string  $file        File complete path
+     * @param  string  $data        Data to write
+     * @param  bool $nonBlocking Don't block script if file is locked
+     * @param  bool $wouldblock  The optional argument is set to TRUE if the lock would block
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function putFileContent($file, $data, $nonBlocking = false, & $wouldblock = null)
+    {
+        if (! is_string($data)) {
+            // Ensure we have a string
+            $data = (string) $data;
+        }
+
+        $options     = $this->getOptions();
+        $locking     = $options->getFileLocking();
+        $nonBlocking = $locking && $nonBlocking;
+        $wouldblock  = null;
+
+        $umask = $options->getUmask();
+        $perm  = $options->getFilePermission();
+        if ($umask !== false && $perm !== false) {
+            $perm = $perm & ~$umask;
+        }
+
+        ErrorHandler::start();
+
+        // if locking and non blocking is enabled -> file_put_contents can't used
+        if ($locking && $nonBlocking) {
+            $umask = ($umask !== false) ? umask($umask) : false;
+
+            $fp = fopen($file, 'cb');
+
+            if ($umask) {
+                umask($umask);
+            }
+
+            if (!$fp) {
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error opening file '{$file}'", 0, $err);
+            }
+
+            if ($perm !== false && !chmod($file, $perm)) {
+                fclose($fp);
+                $oct = decoct($perm);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("chmod('{$file}', 0{$oct}) failed", 0, $err);
+            }
+
+            if (!flock($fp, LOCK_EX | LOCK_NB, $wouldblock)) {
+                fclose($fp);
+                $err = ErrorHandler::stop();
+                if ($wouldblock) {
+                    return;
+                } else {
+                    throw new Exception\RuntimeException("Error locking file '{$file}'", 0, $err);
+                }
+            }
+
+            if (fwrite($fp, $data) === false) {
+                flock($fp, LOCK_UN);
+                fclose($fp);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error writing file '{$file}'", 0, $err);
+            }
+
+            if (!ftruncate($fp, strlen($data))) {
+                flock($fp, LOCK_UN);
+                fclose($fp);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error truncating file '{$file}'", 0, $err);
+            }
+
+            flock($fp, LOCK_UN);
+            fclose($fp);
+
+        // else -> file_put_contents can be used
+        } else {
+            $flags = 0;
+            if ($locking) {
+                $flags = $flags | LOCK_EX;
+            }
+
+            $umask = ($umask !== false) ? umask($umask) : false;
+
+            $rs = file_put_contents($file, $data, $flags);
+
+            if ($umask) {
+                umask($umask);
+            }
+
+            if ($rs === false) {
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("Error writing file '{$file}'", 0, $err);
+            }
+
+            if ($perm !== false && !chmod($file, $perm)) {
+                $oct = decoct($perm);
+                $err = ErrorHandler::stop();
+                throw new Exception\RuntimeException("chmod('{$file}', 0{$oct}) failed", 0, $err);
+            }
+        }
+
+        ErrorHandler::stop();
+    }
+
+    /**
+     * Unlink a file
+     *
+     * @param string $file
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function unlink($file)
+    {
+        ErrorHandler::start();
+        $res = unlink($file);
+        $err = ErrorHandler::stop();
+
+        // only throw exception if file still exists after deleting
+        if (!$res && file_exists($file)) {
+            throw new Exception\RuntimeException(
+                "Error unlinking file '{$file}'; file still exists",
+                0,
+                $err
+            );
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/FilesystemIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/FilesystemIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/FilesystemIterator.php	(revision 5534)
@@ -0,0 +1,179 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use GlobIterator;
+use Zend\Cache\Storage\IteratorInterface;
+
+class FilesystemIterator implements IteratorInterface
+{
+    /**
+     * The Filesystem storage instance
+     *
+     * @var Filesystem
+     */
+    protected $storage;
+
+    /**
+     * The iterator mode
+     *
+     * @var int
+     */
+    protected $mode = IteratorInterface::CURRENT_AS_KEY;
+
+    /**
+     * The GlobIterator instance
+     *
+     * @var GlobIterator
+     */
+    protected $globIterator;
+
+    /**
+     * The namespace sprefix
+     *
+     * @var string
+     */
+    protected $prefix;
+
+    /**
+     * String length of namespace prefix
+     *
+     * @var int
+     */
+    protected $prefixLength;
+
+    /**
+     * Constructor
+     *
+     * @param Filesystem  $storage
+     * @param string      $path
+     * @param string      $prefix
+     */
+    public function __construct(Filesystem $storage, $path, $prefix)
+    {
+        $this->storage      = $storage;
+        $this->globIterator = new GlobIterator($path, GlobIterator::KEY_AS_FILENAME);
+        $this->prefix       = $prefix;
+        $this->prefixLength = strlen($prefix);
+    }
+
+    /**
+     * Get storage instance
+     *
+     * @return Filesystem
+     */
+    public function getStorage()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Get iterator mode
+     *
+     * @return int Value of IteratorInterface::CURRENT_AS_*
+     */
+    public function getMode()
+    {
+        return $this->mode;
+    }
+
+    /**
+     * Set iterator mode
+     *
+     * @param int $mode
+     * @return FilesystemIterator Fluent interface
+     */
+    public function setMode($mode)
+    {
+        $this->mode = (int) $mode;
+        return $this;
+    }
+
+    /* Iterator */
+
+    /**
+     * Get current key, value or metadata.
+     *
+     * @return mixed
+     */
+    public function current()
+    {
+        if ($this->mode == IteratorInterface::CURRENT_AS_SELF) {
+            return $this;
+        }
+
+        $key = $this->key();
+
+        if ($this->mode == IteratorInterface::CURRENT_AS_VALUE) {
+            return $this->storage->getItem($key);
+        } elseif ($this->mode == IteratorInterface::CURRENT_AS_METADATA) {
+            return $this->storage->getMetadata($key);
+        }
+
+        return $key;
+    }
+
+    /**
+     * Get current key
+     *
+     * @return string
+     */
+    public function key()
+    {
+        $filename = $this->globIterator->key();
+
+        // return without namespace prefix and file suffix
+        return substr($filename, $this->prefixLength, -4);
+    }
+
+    /**
+     * Move forward to next element
+     *
+     * @return void
+     */
+    public function next()
+    {
+        $this->globIterator->next();
+    }
+
+    /**
+     * Checks if current position is valid
+     *
+     * @return bool
+     */
+    public function valid()
+    {
+        try {
+            return $this->globIterator->valid();
+        } catch (\LogicException $e) {
+            // @link https://bugs.php.net/bug.php?id=55701
+            // GlobIterator throws LogicException with message
+            // 'The parent constructor was not called: the object is in an invalid state'
+            return false;
+        }
+    }
+
+    /**
+     * Rewind the Iterator to the first element.
+     *
+     * @return bool false if the operation failed.
+     */
+    public function rewind()
+    {
+        try {
+            return $this->globIterator->rewind();
+        } catch (\LogicException $e) {
+            // @link https://bugs.php.net/bug.php?id=55701
+            // GlobIterator throws LogicException with message
+            // 'The parent constructor was not called: the object is in an invalid state'
+            return false;
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/FilesystemOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/FilesystemOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/FilesystemOptions.php	(revision 5534)
@@ -0,0 +1,457 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Traversable;
+use Zend\Cache\Exception;
+
+/**
+ * These are options specific to the Filesystem adapter
+ */
+class FilesystemOptions extends AdapterOptions
+{
+    /**
+     * Directory to store cache files
+     *
+     * @var null|string The cache directory
+     *                  or NULL for the systems temporary directory
+     */
+    protected $cacheDir = null;
+
+    /**
+     * Call clearstatcache enabled?
+     *
+     * @var bool
+     */
+    protected $clearStatCache = true;
+
+    /**
+     * How much sub-directaries should be created?
+     *
+     * @var int
+     */
+    protected $dirLevel = 1;
+
+    /**
+     * Permission creating new directories
+     *
+     * @var false|int
+     */
+    protected $dirPermission = 0700;
+
+    /**
+     * Lock files on writing
+     *
+     * @var bool
+     */
+    protected $fileLocking = true;
+
+    /**
+     * Permission creating new files
+     *
+     * @var false|int
+     */
+    protected $filePermission = 0600;
+
+    /**
+     * Overwrite default key pattern
+     *
+     * Defined in AdapterOptions
+     *
+     * @var string
+     */
+    protected $keyPattern = '/^[a-z0-9_\+\-]*$/Di';
+
+    /**
+     * Namespace separator
+     *
+     * @var string
+     */
+    protected $namespaceSeparator = '-';
+
+    /**
+     * Don't get 'fileatime' as 'atime' on metadata
+     *
+     * @var bool
+     */
+    protected $noAtime = true;
+
+    /**
+     * Don't get 'filectime' as 'ctime' on metadata
+     *
+     * @var bool
+     */
+    protected $noCtime = true;
+
+    /**
+     * Umask to create files and directories
+     *
+     * @var false|int
+     */
+    protected $umask = false;
+
+    /**
+     * Constructor
+     *
+     * @param  array|Traversable|null $options
+     * @return FilesystemOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function __construct($options = null)
+    {
+        // disable file/directory permissions by default on windows systems
+        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
+            $this->filePermission = false;
+            $this->dirPermission = false;
+        }
+
+        parent::__construct($options);
+    }
+
+    /**
+     * Set cache dir
+     *
+     * @param  string $cacheDir
+     * @return FilesystemOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setCacheDir($cacheDir)
+    {
+        if ($cacheDir !== null) {
+            if (!is_dir($cacheDir)) {
+                throw new Exception\InvalidArgumentException(
+                    "Cache directory '{$cacheDir}' not found or not a directory"
+                );
+            } elseif (!is_writable($cacheDir)) {
+                throw new Exception\InvalidArgumentException(
+                    "Cache directory '{$cacheDir}' not writable"
+                );
+            } elseif (!is_readable($cacheDir)) {
+                throw new Exception\InvalidArgumentException(
+                    "Cache directory '{$cacheDir}' not readable"
+                );
+            }
+
+            $cacheDir = rtrim(realpath($cacheDir), DIRECTORY_SEPARATOR);
+        } else {
+            $cacheDir = sys_get_temp_dir();
+        }
+
+        $this->triggerOptionEvent('cache_dir', $cacheDir);
+        $this->cacheDir = $cacheDir;
+        return $this;
+    }
+
+    /**
+     * Get cache dir
+     *
+     * @return null|string
+     */
+    public function getCacheDir()
+    {
+        if ($this->cacheDir === null) {
+            $this->setCacheDir(null);
+        }
+
+        return $this->cacheDir;
+    }
+
+    /**
+     * Set clear stat cache
+     *
+     * @param  bool $clearStatCache
+     * @return FilesystemOptions
+     */
+    public function setClearStatCache($clearStatCache)
+    {
+        $clearStatCache = (bool) $clearStatCache;
+        $this->triggerOptionEvent('clear_stat_cache', $clearStatCache);
+        $this->clearStatCache = $clearStatCache;
+        return $this;
+    }
+
+    /**
+     * Get clear stat cache
+     *
+     * @return bool
+     */
+    public function getClearStatCache()
+    {
+        return $this->clearStatCache;
+    }
+
+    /**
+     * Set dir level
+     *
+     * @param  int $dirLevel
+     * @return FilesystemOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setDirLevel($dirLevel)
+    {
+        $dirLevel = (int) $dirLevel;
+        if ($dirLevel < 0 || $dirLevel > 16) {
+            throw new Exception\InvalidArgumentException(
+                "Directory level '{$dirLevel}' must be between 0 and 16"
+            );
+        }
+        $this->triggerOptionEvent('dir_level', $dirLevel);
+        $this->dirLevel = $dirLevel;
+        return $this;
+    }
+
+    /**
+     * Get dir level
+     *
+     * @return int
+     */
+    public function getDirLevel()
+    {
+        return $this->dirLevel;
+    }
+
+    /**
+     * Set permission to create directories on unix systems
+     *
+     * @param false|string|int $dirPermission FALSE to disable explicit permission or an octal number
+     * @return FilesystemOptions
+     * @see setUmask
+     * @see setFilePermission
+     * @link http://php.net/manual/function.chmod.php
+     */
+    public function setDirPermission($dirPermission)
+    {
+        if ($dirPermission !== false) {
+            if (is_string($dirPermission)) {
+                $dirPermission = octdec($dirPermission);
+            } else {
+                $dirPermission = (int) $dirPermission;
+            }
+
+            // validate
+            if (($dirPermission & 0700) != 0700) {
+                throw new Exception\InvalidArgumentException(
+                    'Invalid directory permission: need permission to execute, read and write by owner'
+                );
+            }
+        }
+
+        if ($this->dirPermission !== $dirPermission) {
+            $this->triggerOptionEvent('dir_permission', $dirPermission);
+            $this->dirPermission = $dirPermission;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get permission to create directories on unix systems
+     *
+     * @return false|int
+     */
+    public function getDirPermission()
+    {
+        return $this->dirPermission;
+    }
+
+    /**
+     * Set file locking
+     *
+     * @param  bool $fileLocking
+     * @return FilesystemOptions
+     */
+    public function setFileLocking($fileLocking)
+    {
+        $fileLocking = (bool) $fileLocking;
+        $this->triggerOptionEvent('file_locking', $fileLocking);
+        $this->fileLocking = $fileLocking;
+        return $this;
+    }
+
+    /**
+     * Get file locking
+     *
+     * @return bool
+     */
+    public function getFileLocking()
+    {
+        return $this->fileLocking;
+    }
+
+    /**
+     * Set permission to create files on unix systems
+     *
+     * @param false|string|int $filePermission FALSE to disable explicit permission or an octal number
+     * @return FilesystemOptions
+     * @see setUmask
+     * @see setDirPermission
+     * @link http://php.net/manual/function.chmod.php
+     */
+    public function setFilePermission($filePermission)
+    {
+        if ($filePermission !== false) {
+            if (is_string($filePermission)) {
+                $filePermission = octdec($filePermission);
+            } else {
+                $filePermission = (int) $filePermission;
+            }
+
+            // validate
+            if (($filePermission & 0600) != 0600) {
+                throw new Exception\InvalidArgumentException(
+                    'Invalid file permission: need permission to read and write by owner'
+                );
+            } elseif ($filePermission & 0111) {
+                throw new Exception\InvalidArgumentException(
+                    "Invalid file permission: Cache files shoudn't be executable"
+                );
+            }
+        }
+
+        if ($this->filePermission !== $filePermission) {
+            $this->triggerOptionEvent('file_permission', $filePermission);
+            $this->filePermission = $filePermission;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get permission to create files on unix systems
+     *
+     * @return false|int
+     */
+    public function getFilePermission()
+    {
+        return $this->filePermission;
+    }
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return FilesystemOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+        $this->namespaceSeparator = $namespaceSeparator;
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * Set no atime
+     *
+     * @param  bool $noAtime
+     * @return FilesystemOptions
+     */
+    public function setNoAtime($noAtime)
+    {
+        $noAtime = (bool) $noAtime;
+        $this->triggerOptionEvent('no_atime', $noAtime);
+        $this->noAtime = $noAtime;
+        return $this;
+    }
+
+    /**
+     * Get no atime
+     *
+     * @return bool
+     */
+    public function getNoAtime()
+    {
+        return $this->noAtime;
+    }
+
+    /**
+     * Set no ctime
+     *
+     * @param  bool $noCtime
+     * @return FilesystemOptions
+     */
+    public function setNoCtime($noCtime)
+    {
+        $noCtime = (bool) $noCtime;
+        $this->triggerOptionEvent('no_ctime', $noCtime);
+        $this->noCtime = $noCtime;
+        return $this;
+    }
+
+    /**
+     * Get no ctime
+     *
+     * @return bool
+     */
+    public function getNoCtime()
+    {
+        return $this->noCtime;
+    }
+
+    /**
+     * Set the umask to create files and directories on unix systems
+     *
+     * Note: On multithreaded webservers it's better to explicit set file and dir permission.
+     *
+     * @param false|string|int $umask FALSE to disable umask or an octal number
+     * @return FilesystemOptions
+     * @see setFilePermission
+     * @see setDirPermission
+     * @link http://php.net/manual/function.umask.php
+     * @link http://en.wikipedia.org/wiki/Umask
+     */
+    public function setUmask($umask)
+    {
+        if ($umask !== false) {
+            if (is_string($umask)) {
+                $umask = octdec($umask);
+            } else {
+                $umask = (int) $umask;
+            }
+
+            // validate
+            if ($umask & 0700) {
+                throw new Exception\InvalidArgumentException(
+                    'Invalid umask: need permission to execute, read and write by owner'
+                );
+            }
+
+            // normalize
+            $umask = $umask & ~0002;
+        }
+
+        if ($this->umask !== $umask) {
+            $this->triggerOptionEvent('umask', $umask);
+            $this->umask = $umask;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get the umask to create files and directories on unix systems
+     *
+     * @return false|int
+     */
+    public function getUmask()
+    {
+        return $this->umask;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/KeyListIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/KeyListIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/KeyListIterator.php	(revision 5534)
@@ -0,0 +1,169 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Countable;
+use Zend\Cache\Storage\IteratorInterface;
+use Zend\Cache\Storage\StorageInterface;
+
+class KeyListIterator implements IteratorInterface, Countable
+{
+    /**
+     * The storage instance
+     *
+     * @var StorageInterface
+     */
+    protected $storage;
+
+    /**
+     * The iterator mode
+     *
+     * @var int
+     */
+    protected $mode = IteratorInterface::CURRENT_AS_KEY;
+
+    /**
+     * Keys to iterate over
+     *
+     * @var string[]
+     */
+    protected $keys;
+
+    /**
+     * Number of keys
+     *
+     * @var int
+     */
+    protected $count;
+
+    /**
+     * Current iterator position
+     *
+     * @var int
+     */
+    protected $position = 0;
+
+    /**
+     * Constructor
+     *
+     * @param StorageInterface $storage
+     * @param array            $keys
+     */
+    public function __construct(StorageInterface $storage, array $keys)
+    {
+        $this->storage = $storage;
+        $this->keys    = $keys;
+        $this->count   = count($keys);
+    }
+
+    /**
+     * Get storage instance
+     *
+     * @return StorageInterface
+     */
+    public function getStorage()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Get iterator mode
+     *
+     * @return int Value of IteratorInterface::CURRENT_AS_*
+     */
+    public function getMode()
+    {
+        return $this->mode;
+    }
+
+    /**
+     * Set iterator mode
+     *
+     * @param int $mode
+     * @return KeyListIterator Fluent interface
+     */
+    public function setMode($mode)
+    {
+        $this->mode = (int) $mode;
+        return $this;
+    }
+
+    /**
+     * Get current key, value or metadata.
+     *
+     * @return mixed
+     */
+    public function current()
+    {
+        if ($this->mode == IteratorInterface::CURRENT_AS_SELF) {
+            return $this;
+        }
+
+        $key = $this->key();
+
+        if ($this->mode == IteratorInterface::CURRENT_AS_METADATA) {
+            return $this->storage->getMetadata($key);
+        } elseif ($this->mode == IteratorInterface::CURRENT_AS_VALUE) {
+            return $this->storage->getItem($key);
+        }
+
+        return $key;
+    }
+
+    /**
+     * Get current key
+     *
+     * @return string
+     */
+    public function key()
+    {
+        return $this->keys[$this->position];
+    }
+
+    /**
+     * Checks if current position is valid
+     *
+     * @return bool
+     */
+    public function valid()
+    {
+        return $this->position < $this->count;
+    }
+
+    /**
+     * Move forward to next element
+     *
+     * @return void
+     */
+    public function next()
+    {
+        $this->position++;
+    }
+
+    /**
+     * Rewind the Iterator to the first element.
+     *
+     * @return void
+     */
+    public function rewind()
+    {
+        $this->position = 0;
+    }
+
+    /**
+     * Count number of items
+     *
+     * @return int
+     */
+    public function count()
+    {
+        return $this->count;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memcache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memcache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memcache.php	(revision 5534)
@@ -0,0 +1,574 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Memcache as MemcacheResource;
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class Memcache extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    FlushableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Has this instance been initialized
+     *
+     * @var bool
+     */
+    protected $initialized = false;
+
+    /**
+     * The memcache resource manager
+     *
+     * @var null|MemcacheResourceManager
+     */
+    protected $resourceManager;
+
+    /**
+     * The memcache resource id
+     *
+     * @var null|string
+     */
+    protected $resourceId;
+
+    /**
+     * The namespace prefix
+     *
+     * @var string
+     */
+    protected $namespacePrefix = '';
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|Traversable|MemcacheOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        if (version_compare('2.0.0', phpversion('memcache')) > 0) {
+            throw new Exception\ExtensionNotLoadedException("Missing ext/memcache version >= 2.0.0");
+        }
+
+        parent::__construct($options);
+
+        // reset initialized flag on update option(s)
+        $initialized = & $this->initialized;
+        $this->getEventManager()->attach('option', function () use (& $initialized) {
+            $initialized = false;
+        });
+    }
+
+    /**
+     * Initialize the internal memcache resource
+     *
+     * @return MemcacheResource
+     */
+    protected function getMemcacheResource()
+    {
+        if ($this->initialized) {
+            return $this->resourceManager->getResource($this->resourceId);
+        }
+
+        $options = $this->getOptions();
+
+        // get resource manager and resource id
+        $this->resourceManager = $options->getResourceManager();
+        $this->resourceId      = $options->getResourceId();
+
+        // init namespace prefix
+        $this->namespacePrefix = '';
+        $namespace = $options->getNamespace();
+        if ($namespace !== '') {
+            $this->namespacePrefix = $namespace . $options->getNamespaceSeparator();
+        }
+
+        // update initialized flag
+        $this->initialized = true;
+
+        return $this->resourceManager->getResource($this->resourceId);
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|MemcacheOptions $options
+     * @return Memcache
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof MemcacheOptions) {
+            $options = new MemcacheOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return MemcacheOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new MemcacheOptions());
+        }
+        return $this->options;
+    }
+
+    /**
+     * @param  mixed $value
+     * @return int
+     */
+    protected function getWriteFlag(& $value)
+    {
+        if (!$this->getOptions()->getCompression()) {
+            return 0;
+        }
+        // Don't compress numeric or boolean types
+        return (is_bool($value) || is_int($value) || is_float($value)) ? 0 : MEMCACHE_COMPRESSED;
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        $memc = $this->getMemcacheResource();
+        if (!$memc->flush()) {
+            return new Exception\RuntimeException("Memcache flush failed");
+        }
+        return true;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        $memc  = $this->getMemcacheResource();
+        $stats = $memc->getExtendedStats();
+        if ($stats === false) {
+            return new Exception\RuntimeException("Memcache getStats failed");
+        }
+
+        $mem = array_pop($stats);
+        return $mem['limit_maxbytes'];
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $memc  = $this->getMemcacheResource();
+        $stats = $memc->getExtendedStats();
+        if ($stats === false) {
+            throw new Exception\RuntimeException('Memcache getStats failed');
+        }
+
+        $mem = array_pop($stats);
+        return $mem['limit_maxbytes'] - $mem['bytes'];
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool    $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $memc        = $this->getMemcacheResource();
+        $internalKey = $this->namespacePrefix . $normalizedKey;
+
+        $result = $memc->get($internalKey);
+        $success = ($result !== false);
+        if ($result === false) {
+            return;
+        }
+
+        $casToken = $result;
+        return $result;
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $memc = $this->getMemcacheResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $result = $memc->get($normalizedKeys);
+        if ($result === false) {
+            return [];
+        }
+
+        // remove namespace prefix from result
+        if ($this->namespacePrefix !== '') {
+            $tmp            = [];
+            $nsPrefixLength = strlen($this->namespacePrefix);
+            foreach ($result as $internalKey => & $value) {
+                $tmp[substr($internalKey, $nsPrefixLength)] = & $value;
+            }
+            $result = $tmp;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $memc  = $this->getMemcacheResource();
+        $value = $memc->get($this->namespacePrefix . $normalizedKey);
+        return ($value !== false);
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $memc = $this->getMemcacheResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $result = $memc->get($normalizedKeys);
+        if ($result === false) {
+            return [];
+        }
+
+        // Convert to a single list
+        $result = array_keys($result);
+
+        // remove namespace prefix
+        if ($result && $this->namespacePrefix !== '') {
+            $nsPrefixLength = strlen($this->namespacePrefix);
+            foreach ($result as & $internalKey) {
+                $internalKey = substr($internalKey, $nsPrefixLength);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Get metadata of multiple items
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and metadata
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadatas(array & $normalizedKeys)
+    {
+        $memc = $this->getMemcacheResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $result = $memc->get($normalizedKeys);
+        if ($result === false) {
+            return [];
+        }
+
+        // remove namespace prefix and use an empty array as metadata
+        if ($this->namespacePrefix === '') {
+            foreach ($result as & $value) {
+                $value = [];
+            }
+            return $result;
+        }
+
+        $final          = [];
+        $nsPrefixLength = strlen($this->namespacePrefix);
+        foreach (array_keys($result) as $internalKey) {
+            $final[substr($internalKey, $nsPrefixLength)] = [];
+        }
+        return $final;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcacheResource();
+        $expiration = $this->expirationTime();
+        $flag       = $this->getWriteFlag($value);
+
+        if (!$memc->set($this->namespacePrefix . $normalizedKey, $value, $flag, $expiration)) {
+            throw new Exception\RuntimeException('Memcache set value failed');
+        }
+
+        return true;
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcacheResource();
+        $expiration = $this->expirationTime();
+        $flag       = $this->getWriteFlag($value);
+
+        return $memc->add($this->namespacePrefix . $normalizedKey, $value, $flag, $expiration);
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcacheResource();
+        $expiration = $this->expirationTime();
+        $flag       = $this->getWriteFlag($value);
+
+        return $memc->replace($this->namespacePrefix . $normalizedKey, $value, $flag, $expiration);
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $memc   = $this->getMemcacheResource();
+        // Delete's second parameter (timeout) is deprecated and not supported.
+        // Values other than 0 may cause delete to fail.
+        // http://www.php.net/manual/memcache.delete.php
+        return $memc->delete($this->namespacePrefix . $normalizedKey, 0);
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $memc        = $this->getMemcacheResource();
+        $internalKey = $this->namespacePrefix . $normalizedKey;
+        $value       = (int) $value;
+        $newValue    = $memc->increment($internalKey, $value);
+
+        if ($newValue !== false) {
+            return $newValue;
+        }
+
+        // Set initial value. Don't use compression!
+        // http://www.php.net/manual/memcache.increment.php
+        $newValue = $value;
+        if (!$memc->add($internalKey, $newValue, 0, $this->expirationTime())) {
+            throw new Exception\RuntimeException('Memcache unable to add increment value');
+        }
+
+        return $newValue;
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $memc        = $this->getMemcacheResource();
+        $internalKey = $this->namespacePrefix . $normalizedKey;
+        $value       = (int) $value;
+        $newValue    = $memc->decrement($internalKey, $value);
+
+        if ($newValue !== false) {
+            return $newValue;
+        }
+
+        // Set initial value. Don't use compression!
+        // http://www.php.net/manual/memcache.decrement.php
+        $newValue = -$value;
+        if (!$memc->add($internalKey, $newValue, 0, $this->expirationTime())) {
+            throw new Exception\RuntimeException('Memcache unable to add decrement value');
+        }
+
+        return $newValue;
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities !== null) {
+            return $this->capabilities;
+        }
+
+        if (version_compare('3.0.3', phpversion('memcache')) <= 0) {
+            // In ext/memcache v3.0.3:
+            // Scalar data types (int, bool, double) are preserved by get/set.
+            // http://pecl.php.net/package/memcache/3.0.3
+            //
+            // This effectively removes support for `boolean` types since
+            // "not found" return values are === false.
+            $supportedDatatypes = [
+                'NULL'     => true,
+                'boolean'  => false,
+                'integer'  => true,
+                'double'   => true,
+                'string'   => true,
+                'array'    => true,
+                'object'   => 'object',
+                'resource' => false,
+            ];
+        } else {
+            // In stable 2.x ext/memcache versions, scalar data types are
+            // converted to strings and must be manually cast back to original
+            // types by the user.
+            //
+            // ie. It is impossible to know if the saved value: (string)"1"
+            // was previously: (bool)true, (int)1, or (string)"1".
+            // Similarly, the saved value: (string)""
+            // might have previously been: (bool)false or (string)""
+            $supportedDatatypes = [
+                'NULL'     => true,
+                'boolean'  => 'boolean',
+                'integer'  => 'integer',
+                'double'   => 'double',
+                'string'   => true,
+                'array'    => true,
+                'object'   => 'object',
+                'resource' => false,
+            ];
+        }
+
+        $this->capabilityMarker = new stdClass();
+        $this->capabilities     = new Capabilities(
+            $this,
+            $this->capabilityMarker,
+            [
+                'supportedDatatypes' => $supportedDatatypes,
+                'supportedMetadata'  => [],
+                'minTtl'             => 1,
+                'maxTtl'             => 0,
+                'staticTtl'          => true,
+                'ttlPrecision'       => 1,
+                'useRequestTime'     => false,
+                'expiredRead'        => false,
+                'maxKeyLength'       => 255,
+                'namespaceIsPrefix'  => true,
+            ]
+        );
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Get expiration time by ttl
+     *
+     * Some storage commands involve sending an expiration value (relative to
+     * an item or to an operation requested by the client) to the server. In
+     * all such cases, the actual value sent may either be Unix time (number of
+     * seconds since January 1, 1970, as an integer), or a number of seconds
+     * starting from current time. In the latter case, this number of seconds
+     * may not exceed 60*60*24*30 (number of seconds in 30 days); if the
+     * expiration value is larger than that, the server will consider it to be
+     * real Unix time value rather than an offset from current time.
+     *
+     * @return int
+     */
+    protected function expirationTime()
+    {
+        $ttl = $this->getOptions()->getTtl();
+        if ($ttl > 2592000) {
+            return time() + $ttl;
+        }
+        return $ttl;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcacheOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcacheOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcacheOptions.php	(revision 5534)
@@ -0,0 +1,284 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+
+/**
+ * These are options specific to the Memcache adapter
+ */
+class MemcacheOptions extends AdapterOptions
+{
+    /**
+     * The namespace separator
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * The memcache resource manager
+     *
+     * @var null|MemcacheResourceManager
+     */
+    protected $resourceManager;
+
+    /**
+     * The resource id of the resource manager
+     *
+     * @var string
+     */
+    protected $resourceId = 'default';
+
+    /**
+     * Enable compression when data is written
+     *
+     * @var bool
+     */
+    protected $compression = false;
+
+    /**
+     * Set namespace.
+     *
+     * It can't be longer than 128 characters.
+     *
+     * @see AdapterOptions::setNamespace()
+     * @see MemcacheOptions::setPrefixKey()
+     */
+    public function setNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+
+        if (128 < strlen($namespace)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects a prefix key of no longer than 128 characters',
+                __METHOD__
+            ));
+        }
+
+        return parent::setNamespace($namespace);
+    }
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return MemcacheOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        if ($this->namespaceSeparator !== $namespaceSeparator) {
+            $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+            $this->namespaceSeparator = $namespaceSeparator;
+        }
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * Set the memcache resource manager to use
+     *
+     * @param null|MemcacheResourceManager $resourceManager
+     * @return MemcacheOptions
+     */
+    public function setResourceManager(MemcacheResourceManager $resourceManager = null)
+    {
+        if ($this->resourceManager !== $resourceManager) {
+            $this->triggerOptionEvent('resource_manager', $resourceManager);
+            $this->resourceManager = $resourceManager;
+        }
+        return $this;
+    }
+
+    /**
+     * Get the memcache resource manager
+     *
+     * @return MemcacheResourceManager
+     */
+    public function getResourceManager()
+    {
+        if (!$this->resourceManager) {
+            $this->resourceManager = new MemcacheResourceManager();
+        }
+        return $this->resourceManager;
+    }
+
+    /**
+     * Get the memcache resource id
+     *
+     * @return string
+     */
+    public function getResourceId()
+    {
+        return $this->resourceId;
+    }
+
+    /**
+     * Set the memcache resource id
+     *
+     * @param string $resourceId
+     * @return MemcacheOptions
+     */
+    public function setResourceId($resourceId)
+    {
+        $resourceId = (string) $resourceId;
+        if ($this->resourceId !== $resourceId) {
+            $this->triggerOptionEvent('resource_id', $resourceId);
+            $this->resourceId = $resourceId;
+        }
+        return $this;
+    }
+
+    /**
+     * Is compressed writes turned on?
+     *
+     * @return boolean
+     */
+    public function getCompression()
+    {
+        return $this->compression;
+    }
+
+    /**
+     * Set whether compressed writes are turned on or not
+     *
+     * @param boolean $compression
+     * @return $this
+     */
+    public function setCompression($compression)
+    {
+        $compression = (bool) $compression;
+        if ($this->compression !== $compression) {
+            $this->triggerOptionEvent('compression', $compression);
+            $this->compression = $compression;
+        }
+        return $this;
+    }
+
+    /**
+     * Sets a list of memcache servers to add on initialize
+     *
+     * @param string|array $servers list of servers
+     * @return MemcacheOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setServers($servers)
+    {
+        $this->getResourceManager()->addServers($this->getResourceId(), $servers);
+        return $this;
+    }
+
+    /**
+     * Get Servers
+     *
+     * @return array
+     */
+    public function getServers()
+    {
+        return $this->getResourceManager()->getServers($this->getResourceId());
+    }
+
+    /**
+     * Set compress threshold
+     *
+     * @param  int|string|array|\ArrayAccess|null $threshold
+     * @return MemcacheOptions
+     */
+    public function setAutoCompressThreshold($threshold)
+    {
+        $this->getResourceManager()->setAutoCompressThreshold($this->getResourceId(), $threshold);
+        return $this;
+    }
+
+    /**
+     * Get compress threshold
+     *
+     * @return int|null
+     */
+    public function getAutoCompressThreshold()
+    {
+        return $this->getResourceManager()->getAutoCompressThreshold($this->getResourceId());
+    }
+
+    /**
+     * Set compress min savings option
+     *
+     * @param  float|string|null $minSavings
+     * @return MemcacheOptions
+     */
+    public function setAutoCompressMinSavings($minSavings)
+    {
+        $this->getResourceManager()->setAutoCompressMinSavings($this->getResourceId(), $minSavings);
+        return $this;
+    }
+
+    /**
+     * Get compress min savings
+     *
+     * @return Exception\RuntimeException
+     */
+    public function getAutoCompressMinSavings()
+    {
+        return $this->getResourceManager()->getAutoCompressMinSavings($this->getResourceId());
+    }
+
+    /**
+     * Set default server values
+     *
+     * @param array $serverDefaults
+     * @return MemcacheOptions
+     */
+    public function setServerDefaults(array $serverDefaults)
+    {
+        $this->getResourceManager()->setServerDefaults($this->getResourceId(), $serverDefaults);
+        return $this;
+    }
+
+    /**
+     * Get default server values
+     *
+     * @return array
+     */
+    public function getServerDefaults()
+    {
+        return $this->getResourceManager()->getServerDefaults($this->getResourceId());
+    }
+
+    /**
+     * Set callback for server connection failures
+     *
+     * @param callable $callback
+     * @return $this
+     */
+    public function setFailureCallback($callback)
+    {
+        $this->getResourceManager()->setFailureCallback($this->getResourceId(), $callback);
+        return $this;
+    }
+
+    /**
+     * Get callback for server connection failures
+     *
+     * @return callable
+     */
+    public function getFailureCallback()
+    {
+        return $this->getResourceManager()->getFailureCallback($this->getResourceId());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcacheResourceManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcacheResourceManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcacheResourceManager.php	(revision 5534)
@@ -0,0 +1,649 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use ArrayAccess;
+use Memcache as MemcacheResource;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Stdlib\ArrayUtils;
+
+/**
+ * This is a resource manager for memcache
+ */
+class MemcacheResourceManager
+{
+    /**
+     * Registered resources
+     *
+     * @var array
+     */
+    protected $resources = [];
+
+    /**
+     * Default server values per resource
+     *
+     * @var array
+     */
+    protected $serverDefaults = [];
+
+    /**
+     * Failure callback per resource
+     *
+     * @var callable[]
+     */
+    protected $failureCallbacks = [];
+
+    /**
+     * Check if a resource exists
+     *
+     * @param string $id
+     * @return bool
+     */
+    public function hasResource($id)
+    {
+        return isset($this->resources[$id]);
+    }
+
+    /**
+     * Gets a memcache resource
+     *
+     * @param string $id
+     * @return MemcacheResource
+     * @throws Exception\RuntimeException
+     */
+    public function getResource($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            return $resource;
+        }
+
+        $memc = new MemcacheResource();
+        $this->setResourceAutoCompressThreshold(
+            $memc,
+            $resource['auto_compress_threshold'],
+            $resource['auto_compress_min_savings']
+        );
+        foreach ($resource['servers'] as $server) {
+            $this->addServerToResource(
+                $memc,
+                $server,
+                $this->serverDefaults[$id],
+                $this->failureCallbacks[$id]
+            );
+        }
+
+        // buffer and return
+        $this->resources[$id] = $memc;
+        return $memc;
+    }
+
+    /**
+     * Set a resource
+     *
+     * @param string $id
+     * @param array|Traversable|MemcacheResource $resource
+     * @param callable $failureCallback
+     * @param array|Traversable $serverDefaults
+     * @return MemcacheResourceManager
+     */
+    public function setResource($id, $resource, $failureCallback = null, $serverDefaults = [])
+    {
+        $id = (string) $id;
+
+        if ($serverDefaults instanceof Traversable) {
+            $serverDefaults = ArrayUtils::iteratorToArray($serverDefaults);
+        } elseif (!is_array($serverDefaults)) {
+            throw new Exception\InvalidArgumentException(
+                'ServerDefaults must be an instance Traversable or an array'
+            );
+        }
+
+        if (!($resource instanceof MemcacheResource)) {
+            if ($resource instanceof Traversable) {
+                $resource = ArrayUtils::iteratorToArray($resource);
+            } elseif (!is_array($resource)) {
+                throw new Exception\InvalidArgumentException(
+                    'Resource must be an instance of Memcache or an array or Traversable'
+                );
+            }
+
+            if (isset($resource['server_defaults'])) {
+                $serverDefaults = array_merge($serverDefaults, $resource['server_defaults']);
+                unset($resource['server_defaults']);
+            }
+
+            $resourceOptions = [
+                'servers' => [],
+                'auto_compress_threshold'   => null,
+                'auto_compress_min_savings' => null,
+            ];
+            $resource = array_merge($resourceOptions, $resource);
+
+            // normalize and validate params
+            $this->normalizeAutoCompressThreshold(
+                $resource['auto_compress_threshold'],
+                $resource['auto_compress_min_savings']
+            );
+            $this->normalizeServers($resource['servers']);
+        }
+
+        $this->normalizeServerDefaults($serverDefaults);
+
+        $this->resources[$id] = $resource;
+        $this->failureCallbacks[$id] = $failureCallback;
+        $this->serverDefaults[$id] = $serverDefaults;
+
+        return $this;
+    }
+
+    /**
+     * Remove a resource
+     *
+     * @param string $id
+     * @return MemcacheResourceManager
+     */
+    public function removeResource($id)
+    {
+        unset($this->resources[$id]);
+        return $this;
+    }
+
+    /**
+     * Normalize compress threshold options
+     *
+     * @param int|string|array|ArrayAccess $threshold
+     * @param float|string                 $minSavings
+     */
+    protected function normalizeAutoCompressThreshold(& $threshold, & $minSavings)
+    {
+        if (is_array($threshold) || ($threshold instanceof ArrayAccess)) {
+            $tmpThreshold = (isset($threshold['threshold'])) ? $threshold['threshold'] : null;
+            $minSavings = (isset($threshold['min_savings'])) ? $threshold['min_savings'] : $minSavings;
+            $threshold = $tmpThreshold;
+        }
+        if (isset($threshold)) {
+            $threshold = (int) $threshold;
+        }
+        if (isset($minSavings)) {
+            $minSavings = (float) $minSavings;
+        }
+    }
+
+    /**
+     * Set compress threshold on a Memcache resource
+     *
+     * @param MemcacheResource $resource
+     * @param int $threshold
+     * @param float $minSavings
+     */
+    protected function setResourceAutoCompressThreshold(MemcacheResource $resource, $threshold, $minSavings)
+    {
+        if (!isset($threshold)) {
+            return;
+        }
+        if (isset($minSavings)) {
+            $resource->setCompressThreshold($threshold, $minSavings);
+        } else {
+            $resource->setCompressThreshold($threshold);
+        }
+    }
+
+    /**
+     * Get compress threshold
+     *
+     * @param  string $id
+     * @return int|null
+     * @throws \Zend\Cache\Exception\RuntimeException
+     */
+    public function getAutoCompressThreshold($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            // Cannot get options from Memcache resource once created
+            throw new Exception\RuntimeException("Cannot get compress threshold once resource is created");
+        }
+        return $resource['auto_compress_threshold'];
+    }
+
+    /**
+     * Set compress threshold
+     *
+     * @param string                            $id
+     * @param int|string|array|ArrayAccess|null $threshold
+     * @param float|string|bool                 $minSavings
+     * @return MemcacheResourceManager
+     */
+    public function setAutoCompressThreshold($id, $threshold, $minSavings = false)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'auto_compress_threshold' => $threshold,
+            ]);
+        }
+
+        $this->normalizeAutoCompressThreshold($threshold, $minSavings);
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            $this->setResourceAutoCompressThreshold($resource, $threshold, $minSavings);
+        } else {
+            $resource['auto_compress_threshold'] = $threshold;
+            if ($minSavings !== false) {
+                $resource['auto_compress_min_savings'] = $minSavings;
+            }
+        }
+        return $this;
+    }
+
+    /**
+     * Get compress min savings
+     *
+     * @param  string $id
+     * @return float|null
+     * @throws Exception\RuntimeException
+     */
+    public function getAutoCompressMinSavings($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            // Cannot get options from Memcache resource once created
+            throw new Exception\RuntimeException("Cannot get compress min savings once resource is created");
+        }
+        return $resource['auto_compress_min_savings'];
+    }
+
+    /**
+     * Set compress min savings
+     *
+     * @param  string            $id
+     * @param  float|string|null $minSavings
+     * @return MemcacheResourceManager
+     * @throws \Zend\Cache\Exception\RuntimeException
+     */
+    public function setAutoCompressMinSavings($id, $minSavings)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'auto_compress_min_savings' => $minSavings,
+            ]);
+        }
+
+        $minSavings = (float) $minSavings;
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            throw new Exception\RuntimeException(
+                "Cannot set compress min savings without a threshold value once a resource is created"
+            );
+        } else {
+            $resource['auto_compress_min_savings'] = $minSavings;
+        }
+        return $this;
+    }
+
+    /**
+     * Set default server values
+     * array(
+     *   'persistent' => <persistent>, 'weight' => <weight>,
+     *   'timeout' => <timeout>, 'retry_interval' => <retryInterval>,
+     * )
+     * @param string $id
+     * @param array  $serverDefaults
+     * @return MemcacheResourceManager
+     */
+    public function setServerDefaults($id, array $serverDefaults)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'server_defaults' => $serverDefaults
+            ]);
+        }
+
+        $this->normalizeServerDefaults($serverDefaults);
+        $this->serverDefaults[$id] = $serverDefaults;
+
+        return $this;
+    }
+
+    /**
+     * Get default server values
+     *
+     * @param string $id
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function getServerDefaults($id)
+    {
+        if (!isset($this->serverDefaults[$id])) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+        return $this->serverDefaults[$id];
+    }
+
+    /**
+     * @param array $serverDefaults
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeServerDefaults(& $serverDefaults)
+    {
+        if (!is_array($serverDefaults) && !($serverDefaults instanceof Traversable)) {
+            throw new Exception\InvalidArgumentException(
+                "Server defaults must be an array or an instance of Traversable"
+            );
+        }
+
+        // Defaults
+        $result = [
+            'persistent' => true,
+            'weight' => 1,
+            'timeout' => 1, // seconds
+            'retry_interval' => 15, // seconds
+        ];
+
+        foreach ($serverDefaults as $key => $value) {
+            switch ($key) {
+                case 'persistent':
+                    $value = (bool) $value;
+                    break;
+                case 'weight':
+                case 'timeout':
+                case 'retry_interval':
+                    $value = (int) $value;
+                    break;
+            }
+            $result[$key] = $value;
+        }
+
+        $serverDefaults = $result;
+    }
+
+    /**
+     * Set callback for server connection failures
+     *
+     * @param string $id
+     * @param callable|null $failureCallback
+     * @return MemcacheResourceManager
+     */
+    public function setFailureCallback($id, $failureCallback)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [], $failureCallback);
+        }
+
+        $this->failureCallbacks[$id] = $failureCallback;
+        return $this;
+    }
+
+    /**
+     * Get callback for server connection failures
+     *
+     * @param string $id
+     * @return callable
+     * @throws Exception\RuntimeException
+     */
+    public function getFailureCallback($id)
+    {
+        if (!isset($this->failureCallbacks[$id])) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+        return $this->failureCallbacks[$id];
+    }
+
+    /**
+     * Get servers
+     *
+     * @param string $id
+     * @throws Exception\RuntimeException
+     * @return array array('host' => <host>, 'port' => <port>, 'weight' => <weight>)
+     */
+    public function getServers($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            throw new Exception\RuntimeException("Cannot get server list once resource is created");
+        }
+        return $resource['servers'];
+    }
+
+    /**
+     * Add servers
+     *
+     * @param string       $id
+     * @param string|array $servers
+     * @return MemcacheResourceManager
+     */
+    public function addServers($id, $servers)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'servers' => $servers
+            ]);
+        }
+
+        $this->normalizeServers($servers);
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcacheResource) {
+            foreach ($servers as $server) {
+                $this->addServerToResource(
+                    $resource,
+                    $server,
+                    $this->serverDefaults[$id],
+                    $this->failureCallbacks[$id]
+                );
+            }
+        } else {
+            // don't add servers twice
+            $resource['servers'] = array_merge(
+                $resource['servers'],
+                array_udiff($servers, $resource['servers'], [$this, 'compareServers'])
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Add one server
+     *
+     * @param string       $id
+     * @param string|array $server
+     * @return MemcacheResourceManager
+     */
+    public function addServer($id, $server)
+    {
+        return $this->addServers($id, [$server]);
+    }
+
+    /**
+     * @param MemcacheResource $resource
+     * @param array $server
+     * @param array $serverDefaults
+     * @param callable|null $failureCallback
+     */
+    protected function addServerToResource(
+        MemcacheResource $resource,
+        array $server,
+        array $serverDefaults,
+        $failureCallback
+    ) {
+        // Apply server defaults
+        $server = array_merge($serverDefaults, $server);
+
+        // Reorder parameters
+        $params = [
+            $server['host'],
+            $server['port'],
+            $server['persistent'],
+            $server['weight'],
+            $server['timeout'],
+            $server['retry_interval'],
+            $server['status'],
+        ];
+        if (isset($failureCallback)) {
+            $params[] = $failureCallback;
+        }
+        call_user_func_array([$resource, 'addServer'], $params);
+    }
+
+    /**
+     * Normalize a list of servers into the following format:
+     * array(array('host' => <host>, 'port' => <port>, 'weight' => <weight>)[, ...])
+     *
+     * @param string|array $servers
+     */
+    protected function normalizeServers(& $servers)
+    {
+        if (is_string($servers)) {
+            // Convert string into a list of servers
+            $servers = explode(',', $servers);
+        }
+
+        $result = [];
+        foreach ($servers as $server) {
+            $this->normalizeServer($server);
+            $result[$server['host'] . ':' . $server['port']] = $server;
+        }
+
+        $servers = array_values($result);
+    }
+
+    /**
+     * Normalize one server into the following format:
+     * array(
+     *   'host' => <host>, 'port' => <port>, 'weight' => <weight>,
+     *   'status' => <status>, 'persistent' => <persistent>,
+     *   'timeout' => <timeout>, 'retry_interval' => <retryInterval>,
+     * )
+     *
+     * @param string|array $server
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeServer(& $server)
+    {
+        // WARNING: The order of this array is important.
+        // Used for converting an ordered array to a keyed array.
+        // Append new options, do not insert or you will break BC.
+        $sTmp = [
+            'host'           => null,
+            'port'           => 11211,
+            'weight'         => null,
+            'status'         => true,
+            'persistent'     => null,
+            'timeout'        => null,
+            'retry_interval' => null,
+        ];
+
+        // convert a single server into an array
+        if ($server instanceof Traversable) {
+            $server = ArrayUtils::iteratorToArray($server);
+        }
+
+        if (is_array($server)) {
+            if (isset($server[0])) {
+                // Convert ordered array to keyed array
+                // array(<host>[, <port>[, <weight>[, <status>[, <persistent>[, <timeout>[, <retryInterval>]]]]]])
+                $server = array_combine(
+                    array_slice(array_keys($sTmp), 0, count($server)),
+                    $server
+                );
+            }
+            $sTmp = array_merge($sTmp, $server);
+        } elseif (is_string($server)) {
+            // parse server from URI host{:?port}{?weight}
+            $server = trim($server);
+            if (strpos($server, '://') === false) {
+                $server = 'tcp://' . $server;
+            }
+
+            $urlParts = parse_url($server);
+            if (!$urlParts) {
+                throw new Exception\InvalidArgumentException("Invalid server given");
+            }
+
+            $sTmp = array_merge($sTmp, array_intersect_key($urlParts, $sTmp));
+            if (isset($urlParts['query'])) {
+                $query = null;
+                parse_str($urlParts['query'], $query);
+                $sTmp = array_merge($sTmp, array_intersect_key($query, $sTmp));
+            }
+        }
+
+        if (!$sTmp['host']) {
+            throw new Exception\InvalidArgumentException('Missing required server host');
+        }
+
+        // Filter values
+        foreach ($sTmp as $key => $value) {
+            if (isset($value)) {
+                switch ($key) {
+                    case 'host':
+                        $value = (string) $value;
+                        break;
+                    case 'status':
+                    case 'persistent':
+                        $value = (bool) $value;
+                        break;
+                    case 'port':
+                    case 'weight':
+                    case 'timeout':
+                    case 'retry_interval':
+                        $value = (int) $value;
+                        break;
+                }
+            }
+            $sTmp[$key] = $value;
+        }
+        $sTmp = array_filter(
+            $sTmp,
+            function ($val) {
+                return isset($val);
+            }
+        );
+
+        $server = $sTmp;
+    }
+
+    /**
+     * Compare 2 normalized server arrays
+     * (Compares only the host and the port)
+     *
+     * @param array $serverA
+     * @param array $serverB
+     * @return int
+     */
+    protected function compareServers(array $serverA, array $serverB)
+    {
+        $keyA = $serverA['host'] . ':' . $serverA['port'];
+        $keyB = $serverB['host'] . ':' . $serverB['port'];
+        if ($keyA === $keyB) {
+            return 0;
+        }
+        return $keyA > $keyB ? 1 : -1;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memcached.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memcached.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memcached.php	(revision 5534)
@@ -0,0 +1,703 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Memcached as MemcachedResource;
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class Memcached extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    FlushableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Major version of ext/memcached
+     *
+     * @var null|int
+     */
+    protected static $extMemcachedMajorVersion;
+
+    /**
+     * Has this instance be initialized
+     *
+     * @var bool
+     */
+    protected $initialized = false;
+
+    /**
+     * The memcached resource manager
+     *
+     * @var null|MemcachedResourceManager
+     */
+    protected $resourceManager;
+
+    /**
+     * The memcached resource id
+     *
+     * @var null|string
+     */
+    protected $resourceId;
+
+    /**
+     * The namespace prefix
+     *
+     * @var string
+     */
+    protected $namespacePrefix = '';
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|Traversable|MemcachedOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        if (static::$extMemcachedMajorVersion === null) {
+            $v = (string) phpversion('memcached');
+            static::$extMemcachedMajorVersion = ($v !== '') ? (int) $v[0] : 0;
+        }
+
+        if (static::$extMemcachedMajorVersion < 1) {
+            throw new Exception\ExtensionNotLoadedException('Need ext/memcached version >= 1.0.0');
+        }
+
+        parent::__construct($options);
+
+        // reset initialized flag on update option(s)
+        $initialized = & $this->initialized;
+        $this->getEventManager()->attach('option', function () use (& $initialized) {
+            $initialized = false;
+        });
+    }
+
+    /**
+     * Initialize the internal memcached resource
+     *
+     * @return MemcachedResource
+     */
+    protected function getMemcachedResource()
+    {
+        if (!$this->initialized) {
+            $options = $this->getOptions();
+
+            // get resource manager and resource id
+            $this->resourceManager = $options->getResourceManager();
+            $this->resourceId      = $options->getResourceId();
+
+            // init namespace prefix
+            $namespace = $options->getNamespace();
+            if ($namespace !== '') {
+                $this->namespacePrefix = $namespace . $options->getNamespaceSeparator();
+            } else {
+                $this->namespacePrefix = '';
+            }
+
+            // update initialized flag
+            $this->initialized = true;
+        }
+
+        return $this->resourceManager->getResource($this->resourceId);
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|MemcachedOptions $options
+     * @return Memcached
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof MemcachedOptions) {
+            $options = new MemcachedOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return MemcachedOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new MemcachedOptions());
+        }
+        return $this->options;
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        $memc = $this->getMemcachedResource();
+        if (!$memc->flush()) {
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+        return true;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        $memc  = $this->getMemcachedResource();
+        $stats = $memc->getStats();
+        if ($stats === false) {
+            throw new Exception\RuntimeException($memc->getResultMessage());
+        }
+
+        $mem = array_pop($stats);
+        return $mem['limit_maxbytes'];
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $memc  = $this->getMemcachedResource();
+        $stats = $memc->getStats();
+        if ($stats === false) {
+            throw new Exception\RuntimeException($memc->getResultMessage());
+        }
+
+        $mem = array_pop($stats);
+        return $mem['limit_maxbytes'] - $mem['bytes'];
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $memc        = $this->getMemcachedResource();
+        $internalKey = $this->namespacePrefix . $normalizedKey;
+
+        if (func_num_args() > 2) {
+            $result = $memc->get($internalKey, null, $casToken);
+        } else {
+            $result = $memc->get($internalKey);
+        }
+
+        $success = true;
+        if ($result === false) {
+            $rsCode = $memc->getResultCode();
+            if ($rsCode == MemcachedResource::RES_NOTFOUND) {
+                $result = null;
+                $success = false;
+            } elseif ($rsCode) {
+                $success = false;
+                throw $this->getExceptionByResultCode($rsCode);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $memc = $this->getMemcachedResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $result = $memc->getMulti($normalizedKeys);
+        if ($result === false) {
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+
+        // remove namespace prefix from result
+        if ($result && $this->namespacePrefix !== '') {
+            $tmp            = [];
+            $nsPrefixLength = strlen($this->namespacePrefix);
+            foreach ($result as $internalKey => & $value) {
+                $tmp[substr($internalKey, $nsPrefixLength)] = & $value;
+            }
+            $result = $tmp;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $memc  = $this->getMemcachedResource();
+        $value = $memc->get($this->namespacePrefix . $normalizedKey);
+        if ($value === false) {
+            $rsCode = $memc->getResultCode();
+            if ($rsCode == MemcachedResource::RES_SUCCESS) {
+                return true;
+            } elseif ($rsCode == MemcachedResource::RES_NOTFOUND) {
+                return false;
+            } else {
+                throw $this->getExceptionByResultCode($rsCode);
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of found keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $memc = $this->getMemcachedResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $result = $memc->getMulti($normalizedKeys);
+        if ($result === false) {
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+
+        // Convert to a simgle list
+        $result = array_keys($result);
+
+        // remove namespace prefix
+        if ($result && $this->namespacePrefix !== '') {
+            $nsPrefixLength = strlen($this->namespacePrefix);
+            foreach ($result as & $internalKey) {
+                $internalKey = substr($internalKey, $nsPrefixLength);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Get metadata of multiple items
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and metadata
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadatas(array & $normalizedKeys)
+    {
+        $memc = $this->getMemcachedResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $result = $memc->getMulti($normalizedKeys);
+        if ($result === false) {
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+
+        // remove namespace prefix and use an empty array as metadata
+        if ($this->namespacePrefix !== '') {
+            $tmp            = [];
+            $nsPrefixLength = strlen($this->namespacePrefix);
+            foreach (array_keys($result) as $internalKey) {
+                $tmp[substr($internalKey, $nsPrefixLength)] = [];
+            }
+            $result = $tmp;
+        } else {
+            foreach ($result as & $value) {
+                $value = [];
+            }
+        }
+
+        return $result;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcachedResource();
+        $expiration = $this->expirationTime();
+        if (!$memc->set($this->namespacePrefix . $normalizedKey, $value, $expiration)) {
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $memc       = $this->getMemcachedResource();
+        $expiration = $this->expirationTime();
+
+        $namespacedKeyValuePairs = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => & $value) {
+            $namespacedKeyValuePairs[$this->namespacePrefix . $normalizedKey] = & $value;
+        }
+
+        if (!$memc->setMulti($namespacedKeyValuePairs, $expiration)) {
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+
+        return [];
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcachedResource();
+        $expiration = $this->expirationTime();
+        if (!$memc->add($this->namespacePrefix . $normalizedKey, $value, $expiration)) {
+            if ($memc->getResultCode() == MemcachedResource::RES_NOTSTORED) {
+                return false;
+            }
+            throw $this->getExceptionByResultCode($memc->getResultCode());
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcachedResource();
+        $expiration = $this->expirationTime();
+        if (!$memc->replace($this->namespacePrefix . $normalizedKey, $value, $expiration)) {
+            $rsCode = $memc->getResultCode();
+            if ($rsCode == MemcachedResource::RES_NOTSTORED) {
+                return false;
+            }
+            throw $this->getExceptionByResultCode($rsCode);
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to set an item only if token matches
+     *
+     * @param  mixed  $token
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     * @see    getItem()
+     * @see    setItem()
+     */
+    protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
+    {
+        $memc       = $this->getMemcachedResource();
+        $expiration = $this->expirationTime();
+        $result     = $memc->cas($token, $this->namespacePrefix . $normalizedKey, $value, $expiration);
+
+        if ($result === false) {
+            $rsCode = $memc->getResultCode();
+            if ($rsCode !== 0 && $rsCode != MemcachedResource::RES_DATA_EXISTS) {
+                throw $this->getExceptionByResultCode($rsCode);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $memc   = $this->getMemcachedResource();
+        $result = $memc->delete($this->namespacePrefix . $normalizedKey);
+
+        if ($result === false) {
+            $rsCode = $memc->getResultCode();
+            if ($rsCode == MemcachedResource::RES_NOTFOUND) {
+                return false;
+            } elseif ($rsCode != MemcachedResource::RES_SUCCESS) {
+                throw $this->getExceptionByResultCode($rsCode);
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to remove multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of not removed keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItems(array & $normalizedKeys)
+    {
+        // support for removing multiple items at once has been added in ext/memcached-2.0.0
+        if (static::$extMemcachedMajorVersion < 2) {
+            return parent::internalRemoveItems($normalizedKeys);
+        }
+
+        $memc = $this->getMemcachedResource();
+
+        foreach ($normalizedKeys as & $normalizedKey) {
+            $normalizedKey = $this->namespacePrefix . $normalizedKey;
+        }
+
+        $rsCodes = $memc->deleteMulti($normalizedKeys);
+
+        $missingKeys = [];
+        foreach ($rsCodes as $key => $rsCode) {
+            if ($rsCode !== true && $rsCode != MemcachedResource::RES_SUCCESS) {
+                if ($rsCode != MemcachedResource::RES_NOTFOUND) {
+                    throw $this->getExceptionByResultCode($rsCode);
+                }
+                $missingKeys[] = $key;
+            }
+        }
+
+        // remove namespace prefix
+        if ($missingKeys && $this->namespacePrefix !== '') {
+            $nsPrefixLength = strlen($this->namespacePrefix);
+            foreach ($missingKeys as & $missingKey) {
+                $missingKey = substr($missingKey, $nsPrefixLength);
+            }
+        }
+
+        return $missingKeys;
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $memc        = $this->getMemcachedResource();
+        $internalKey = $this->namespacePrefix . $normalizedKey;
+        $value       = (int) $value;
+        $newValue    = $memc->increment($internalKey, $value);
+
+        if ($newValue === false) {
+            $rsCode = $memc->getResultCode();
+
+            // initial value
+            if ($rsCode == MemcachedResource::RES_NOTFOUND) {
+                $newValue = $value;
+                $memc->add($internalKey, $newValue, $this->expirationTime());
+                $rsCode = $memc->getResultCode();
+            }
+
+            if ($rsCode) {
+                throw $this->getExceptionByResultCode($rsCode);
+            }
+        }
+
+        return $newValue;
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $memc        = $this->getMemcachedResource();
+        $internalKey = $this->namespacePrefix . $normalizedKey;
+        $value       = (int) $value;
+        $newValue    = $memc->decrement($internalKey, $value);
+
+        if ($newValue === false) {
+            $rsCode = $memc->getResultCode();
+
+            // initial value
+            if ($rsCode == MemcachedResource::RES_NOTFOUND) {
+                $newValue = -$value;
+                $memc->add($internalKey, $newValue, $this->expirationTime());
+                $rsCode = $memc->getResultCode();
+            }
+
+            if ($rsCode) {
+                throw $this->getExceptionByResultCode($rsCode);
+            }
+        }
+
+        return $newValue;
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $this->capabilityMarker = new stdClass();
+            $this->capabilities     = new Capabilities(
+                $this,
+                $this->capabilityMarker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => true,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => true,
+                        'object'   => 'object',
+                        'resource' => false,
+                    ],
+                    'supportedMetadata'  => [],
+                    'minTtl'             => 1,
+                    'maxTtl'             => 0,
+                    'staticTtl'          => true,
+                    'ttlPrecision'       => 1,
+                    'useRequestTime'     => false,
+                    'expiredRead'        => false,
+                    'maxKeyLength'       => 255,
+                    'namespaceIsPrefix'  => true,
+                ]
+            );
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Get expiration time by ttl
+     *
+     * Some storage commands involve sending an expiration value (relative to
+     * an item or to an operation requested by the client) to the server. In
+     * all such cases, the actual value sent may either be Unix time (number of
+     * seconds since January 1, 1970, as an integer), or a number of seconds
+     * starting from current time. In the latter case, this number of seconds
+     * may not exceed 60*60*24*30 (number of seconds in 30 days); if the
+     * expiration value is larger than that, the server will consider it to be
+     * real Unix time value rather than an offset from current time.
+     *
+     * @return int
+     */
+    protected function expirationTime()
+    {
+        $ttl = $this->getOptions()->getTtl();
+        if ($ttl > 2592000) {
+            return time() + $ttl;
+        }
+        return $ttl;
+    }
+
+    /**
+     * Generate exception based of memcached result code
+     *
+     * @param int $code
+     * @return Exception\RuntimeException
+     * @throws Exception\InvalidArgumentException On success code
+     */
+    protected function getExceptionByResultCode($code)
+    {
+        switch ($code) {
+            case MemcachedResource::RES_SUCCESS:
+                throw new Exception\InvalidArgumentException(
+                    "The result code '{$code}' (SUCCESS) isn't an error"
+                );
+
+            default:
+                return new Exception\RuntimeException($this->getMemcachedResource()->getResultMessage());
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcachedOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcachedOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcachedOptions.php	(revision 5534)
@@ -0,0 +1,319 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Memcached as MemcachedResource;
+use Zend\Cache\Exception;
+
+/**
+ * These are options specific to the Memcached adapter
+ */
+class MemcachedOptions extends AdapterOptions
+{
+    /**
+     * The namespace separator
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * The memcached resource manager
+     *
+     * @var null|MemcachedResourceManager
+     */
+    protected $resourceManager;
+
+    /**
+     * The resource id of the resource manager
+     *
+     * @var string
+     */
+    protected $resourceId = 'default';
+
+    /**
+     * Set namespace.
+     *
+     * The option Memcached::OPT_PREFIX_KEY will be used as the namespace.
+     * It can't be longer than 128 characters.
+     *
+     * @see AdapterOptions::setNamespace()
+     * @see MemcachedOptions::setPrefixKey()
+     */
+    public function setNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+
+        if (128 < strlen($namespace)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects a prefix key of no longer than 128 characters',
+                __METHOD__
+            ));
+        }
+
+        return parent::setNamespace($namespace);
+    }
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return MemcachedOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        if ($this->namespaceSeparator !== $namespaceSeparator) {
+            $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+            $this->namespaceSeparator = $namespaceSeparator;
+        }
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * A memcached resource to share
+     *
+     * @param null|MemcachedResource $memcachedResource
+     * @return MemcachedOptions
+     * @deprecated Please use the resource manager instead
+     */
+    public function setMemcachedResource(MemcachedResource $memcachedResource = null)
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the feature'
+            . ', please use the resource manager instead',
+            E_USER_DEPRECATED
+        );
+
+        if ($memcachedResource !== null) {
+            $this->triggerOptionEvent('memcached_resource', $memcachedResource);
+            $resourceManager = $this->getResourceManager();
+            $resourceId      = $this->getResourceId();
+            $resourceManager->setResource($resourceId, $memcachedResource);
+        }
+        return $this;
+    }
+
+    /**
+     * Get memcached resource to share
+     *
+     * @return MemcachedResource
+     * @deprecated Please use the resource manager instead
+     */
+    public function getMemcachedResource()
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the feature'
+            . ', please use the resource manager instead',
+            E_USER_DEPRECATED
+        );
+
+        return $this->resourceManager->getResource($this->getResourceId());
+    }
+
+    /**
+     * Set the memcached resource manager to use
+     *
+     * @param null|MemcachedResourceManager $resourceManager
+     * @return MemcachedOptions
+     */
+    public function setResourceManager(MemcachedResourceManager $resourceManager = null)
+    {
+        if ($this->resourceManager !== $resourceManager) {
+            $this->triggerOptionEvent('resource_manager', $resourceManager);
+            $this->resourceManager = $resourceManager;
+        }
+        return $this;
+    }
+
+    /**
+     * Get the memcached resource manager
+     *
+     * @return MemcachedResourceManager
+     */
+    public function getResourceManager()
+    {
+        if (!$this->resourceManager) {
+            $this->resourceManager = new MemcachedResourceManager();
+        }
+        return $this->resourceManager;
+    }
+
+    /**
+     * Get the memcached resource id
+     *
+     * @return string
+     */
+    public function getResourceId()
+    {
+        return $this->resourceId;
+    }
+
+    /**
+     * Set the memcached resource id
+     *
+     * @param string $resourceId
+     * @return MemcachedOptions
+     */
+    public function setResourceId($resourceId)
+    {
+        $resourceId = (string) $resourceId;
+        if ($this->resourceId !== $resourceId) {
+            $this->triggerOptionEvent('resource_id', $resourceId);
+            $this->resourceId = $resourceId;
+        }
+        return $this;
+    }
+
+    /**
+     * Get the persistent id
+     *
+     * @return string
+     */
+    public function getPersistentId()
+    {
+        return $this->getResourceManager()->getPersistentId($this->getResourceId());
+    }
+
+    /**
+     * Set the persistent id
+     *
+     * @param string $persistentId
+     * @return MemcachedOptions
+     */
+    public function setPersistentId($persistentId)
+    {
+        $this->triggerOptionEvent('persistent_id', $persistentId);
+        $this->getResourceManager()->setPersistentId($this->getResourceId(), $persistentId);
+        return $this;
+    }
+
+    /**
+     * Add a server to the list
+     *
+     * @param string $host
+     * @param int $port
+     * @param int $weight
+     * @return MemcachedOptions
+     * @deprecated Please use the resource manager instead
+     */
+    public function addServer($host, $port = 11211, $weight = 0)
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the feature'
+            . ', please use the resource manager instead',
+            E_USER_DEPRECATED
+        );
+
+        $this->getResourceManager()->addServer($this->getResourceId(), [
+            'host'   => $host,
+            'port'   => $port,
+            'weight' => $weight
+        ]);
+
+        return $this;
+    }
+
+    /**
+    * Set a list of memcached servers to add on initialize
+    *
+    * @param string|array $servers list of servers
+    * @return MemcachedOptions
+    * @throws Exception\InvalidArgumentException
+    */
+    public function setServers($servers)
+    {
+        $this->getResourceManager()->setServers($this->getResourceId(), $servers);
+        return $this;
+    }
+
+    /**
+     * Get Servers
+     *
+     * @return array
+     */
+    public function getServers()
+    {
+        return $this->getResourceManager()->getServers($this->getResourceId());
+    }
+
+    /**
+    * Set libmemcached options
+    *
+    * @param array $libOptions
+    * @return MemcachedOptions
+    * @link http://php.net/manual/memcached.constants.php
+    */
+    public function setLibOptions(array $libOptions)
+    {
+        $this->getResourceManager()->setLibOptions($this->getResourceId(), $libOptions);
+        return $this;
+    }
+
+    /**
+     * Set libmemcached option
+     *
+     * @param string|int $key
+     * @param mixed $value
+     * @return MemcachedOptions
+     * @link http://php.net/manual/memcached.constants.php
+     * @deprecated Please use lib_options or the resource manager instead
+     */
+    public function setLibOption($key, $value)
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the feature'
+            . ', please use "lib_options" or the resource manager instead',
+            E_USER_DEPRECATED
+        );
+
+        $this->getResourceManager()->setLibOption($this->getResourceId(), $key, $value);
+        return $this;
+    }
+
+    /**
+     * Get libmemcached options
+     *
+     * @return array
+     * @link http://php.net/manual/memcached.constants.php
+     */
+    public function getLibOptions()
+    {
+        return $this->getResourceManager()->getLibOptions($this->getResourceId());
+    }
+
+    /**
+    * Get libmemcached option
+    *
+    * @param string|int $key
+    * @return mixed
+    * @link http://php.net/manual/memcached.constants.php
+    * @deprecated Please use lib_options or the resource manager instead
+    */
+    public function getLibOption($key)
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the feature'
+            . ', please use "lib_options" or the resource manager instead',
+            E_USER_DEPRECATED
+        );
+
+        return $this->getResourceManager()->getLibOption($this->getResourceId(), $key);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcachedResourceManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcachedResourceManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemcachedResourceManager.php	(revision 5534)
@@ -0,0 +1,547 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Memcached as MemcachedResource;
+use ReflectionClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Stdlib\ArrayUtils;
+
+/**
+ * This is a resource manager for memcached
+ */
+class MemcachedResourceManager
+{
+    /**
+     * Registered resources
+     *
+     * @var array
+     */
+    protected $resources = [];
+
+    /**
+     * Get servers
+     * @param string $id
+     * @throws Exception\RuntimeException
+     * @return array array('host' => <host>, 'port' => <port>, 'weight' => <weight>)
+     */
+    public function getServers($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+
+        if ($resource instanceof MemcachedResource) {
+            return $resource->getServerList();
+        }
+        return $resource['servers'];
+    }
+
+    /**
+     * Normalize one server into the following format:
+     * array('host' => <host>, 'port' => <port>, 'weight' => <weight>)
+     *
+     * @param string|array &$server
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeServer(&$server)
+    {
+        $host   = null;
+        $port   = 11211;
+        $weight = 0;
+
+        // convert a single server into an array
+        if ($server instanceof Traversable) {
+            $server = ArrayUtils::iteratorToArray($server);
+        }
+
+        if (is_array($server)) {
+            // array(<host>[, <port>[, <weight>]])
+            if (isset($server[0])) {
+                $host   = (string) $server[0];
+                $port   = isset($server[1]) ? (int) $server[1] : $port;
+                $weight = isset($server[2]) ? (int) $server[2] : $weight;
+            }
+
+            // array('host' => <host>[, 'port' => <port>[, 'weight' => <weight>]])
+            if (!isset($server[0]) && isset($server['host'])) {
+                $host   = (string) $server['host'];
+                $port   = isset($server['port'])   ? (int) $server['port']   : $port;
+                $weight = isset($server['weight']) ? (int) $server['weight'] : $weight;
+            }
+        } else {
+            // parse server from URI host{:?port}{?weight}
+            $server = trim($server);
+            if (strpos($server, '://') === false) {
+                $server = 'tcp://' . $server;
+            }
+
+            $server = parse_url($server);
+            if (!$server) {
+                throw new Exception\InvalidArgumentException("Invalid server given");
+            }
+
+            $host = $server['host'];
+            $port = isset($server['port']) ? (int) $server['port'] : $port;
+
+            if (isset($server['query'])) {
+                $query = null;
+                parse_str($server['query'], $query);
+                if (isset($query['weight'])) {
+                    $weight = (int) $query['weight'];
+                }
+            }
+        }
+
+        if (!$host) {
+            throw new Exception\InvalidArgumentException('Missing required server host');
+        }
+
+        $server = [
+            'host'   => $host,
+            'port'   => $port,
+            'weight' => $weight,
+        ];
+    }
+
+    /**
+     * Check if a resource exists
+     *
+     * @param string $id
+     * @return bool
+     */
+    public function hasResource($id)
+    {
+        return isset($this->resources[$id]);
+    }
+
+    /**
+     * Gets a memcached resource
+     *
+     * @param string $id
+     * @return MemcachedResource
+     * @throws Exception\RuntimeException
+     */
+    public function getResource($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = $this->resources[$id];
+        if ($resource instanceof MemcachedResource) {
+            return $resource;
+        }
+
+        if ($resource['persistent_id'] !== '') {
+            $memc = new MemcachedResource($resource['persistent_id']);
+        } else {
+            $memc = new MemcachedResource();
+        }
+
+        if (method_exists($memc, 'setOptions')) {
+            $memc->setOptions($resource['lib_options']);
+        } else {
+            foreach ($resource['lib_options'] as $k => $v) {
+                $memc->setOption($k, $v);
+            }
+        }
+
+        // merge and add servers (with persistence id servers could be added already)
+        $servers = array_udiff($resource['servers'], $memc->getServerList(), [$this, 'compareServers']);
+        if ($servers) {
+            $memc->addServers(array_values(array_map('array_values', $servers)));
+        }
+
+        // buffer and return
+        $this->resources[$id] = $memc;
+        return $memc;
+    }
+
+    /**
+     * Set a resource
+     *
+     * @param string $id
+     * @param array|Traversable|MemcachedResource $resource
+     * @return MemcachedResourceManager Fluent interface
+     */
+    public function setResource($id, $resource)
+    {
+        $id = (string) $id;
+
+        if (!($resource instanceof MemcachedResource)) {
+            if ($resource instanceof Traversable) {
+                $resource = ArrayUtils::iteratorToArray($resource);
+            } elseif (!is_array($resource)) {
+                throw new Exception\InvalidArgumentException(
+                    'Resource must be an instance of Memcached or an array or Traversable'
+                );
+            }
+
+            $resource = array_merge([
+                'persistent_id' => '',
+                'lib_options'   => [],
+                'servers'       => [],
+            ], $resource);
+
+            // normalize and validate params
+            $this->normalizePersistentId($resource['persistent_id']);
+            $this->normalizeLibOptions($resource['lib_options']);
+            $this->normalizeServers($resource['servers']);
+        }
+
+        $this->resources[$id] = $resource;
+        return $this;
+    }
+
+    /**
+     * Remove a resource
+     *
+     * @param string $id
+     * @return MemcachedResourceManager Fluent interface
+     */
+    public function removeResource($id)
+    {
+        unset($this->resources[$id]);
+        return $this;
+    }
+
+    /**
+     * Set the persistent id
+     *
+     * @param string $id
+     * @param string $persistentId
+     * @return MemcachedResourceManager Fluent interface
+     * @throws Exception\RuntimeException
+     */
+    public function setPersistentId($id, $persistentId)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'persistent_id' => $persistentId
+            ]);
+        }
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcachedResource) {
+            throw new Exception\RuntimeException(
+                "Can't change persistent id of resource {$id} after instanziation"
+            );
+        }
+
+        $this->normalizePersistentId($persistentId);
+        $resource['persistent_id'] = $persistentId;
+
+        return $this;
+    }
+
+    /**
+     * Get the persistent id
+     *
+     * @param string $id
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    public function getPersistentId($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+
+        if ($resource instanceof MemcachedResource) {
+            throw new Exception\RuntimeException(
+                "Can't get persistent id of an instantiated memcached resource"
+            );
+        }
+
+        return $resource['persistent_id'];
+    }
+
+    /**
+     * Normalize the persistent id
+     *
+     * @param string $persistentId
+     */
+    protected function normalizePersistentId(& $persistentId)
+    {
+        $persistentId = (string) $persistentId;
+    }
+
+    /**
+     * Set Libmemcached options
+     *
+     * @param string $id
+     * @param array  $libOptions
+     * @return MemcachedResourceManager Fluent interface
+     */
+    public function setLibOptions($id, array $libOptions)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'lib_options' => $libOptions
+            ]);
+        }
+
+        $this->normalizeLibOptions($libOptions);
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcachedResource) {
+            if (method_exists($resource, 'setOptions')) {
+                $resource->setOptions($libOptions);
+            } else {
+                foreach ($libOptions as $key => $value) {
+                    $resource->setOption($key, $value);
+                }
+            }
+        } else {
+            $resource['lib_options'] = $libOptions;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get Libmemcached options
+     *
+     * @param string $id
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function getLibOptions($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+
+        if ($resource instanceof MemcachedResource) {
+            $libOptions = [];
+            $reflection = new ReflectionClass('Memcached');
+            $constants  = $reflection->getConstants();
+            foreach ($constants as $constName => $constValue) {
+                if (substr($constName, 0, 4) == 'OPT_') {
+                    $libOptions[$constValue] = $resource->getOption($constValue);
+                }
+            }
+            return $libOptions;
+        }
+        return $resource['lib_options'];
+    }
+
+    /**
+     * Set one Libmemcached option
+     *
+     * @param string     $id
+     * @param string|int $key
+     * @param mixed      $value
+     * @return MemcachedResourceManager Fluent interface
+     */
+    public function setLibOption($id, $key, $value)
+    {
+        return $this->setLibOptions($id, [$key => $value]);
+    }
+
+    /**
+     * Get one Libmemcached option
+     *
+     * @param string     $id
+     * @param string|int $key
+     * @return mixed
+     * @throws Exception\RuntimeException
+     */
+    public function getLibOption($id, $key)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $this->normalizeLibOptionKey($key);
+        $resource   = & $this->resources[$id];
+
+        if ($resource instanceof MemcachedResource) {
+            return $resource->getOption($key);
+        }
+
+        return isset($resource['lib_options'][$key]) ? $resource['lib_options'][$key] : null;
+    }
+
+    /**
+     * Normalize libmemcached options
+     *
+     * @param array|Traversable $libOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeLibOptions(& $libOptions)
+    {
+        if (!is_array($libOptions) && !($libOptions instanceof Traversable)) {
+            throw new Exception\InvalidArgumentException(
+                "Lib-Options must be an array or an instance of Traversable"
+            );
+        }
+
+        $result = [];
+        foreach ($libOptions as $key => $value) {
+            $this->normalizeLibOptionKey($key);
+            $result[$key] = $value;
+        }
+
+        $libOptions = $result;
+    }
+
+    /**
+     * Convert option name into it's constant value
+     *
+     * @param string|int $key
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeLibOptionKey(& $key)
+    {
+        // convert option name into it's constant value
+        if (is_string($key)) {
+            $const = 'Memcached::OPT_' . str_replace([' ', '-'], '_', strtoupper($key));
+            if (!defined($const)) {
+                throw new Exception\InvalidArgumentException("Unknown libmemcached option '{$key}' ({$const})");
+            }
+            $key = constant($const);
+        } else {
+            $key = (int) $key;
+        }
+    }
+
+    /**
+     * Set servers
+     *
+     * $servers can be an array list or a comma separated list of servers.
+     * One server in the list can be descripted as follows:
+     * - URI:   [tcp://]<host>[:<port>][?weight=<weight>]
+     * - Assoc: array('host' => <host>[, 'port' => <port>][, 'weight' => <weight>])
+     * - List:  array(<host>[, <port>][, <weight>])
+     *
+     * @param string       $id
+     * @param string|array $servers
+     * @return MemcachedResourceManager
+     */
+    public function setServers($id, $servers)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'servers' => $servers
+            ]);
+        }
+
+        $this->normalizeServers($servers);
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcachedResource) {
+            // don't add servers twice
+            $servers = array_udiff($servers, $resource->getServerList(), [$this, 'compareServers']);
+            if ($servers) {
+                $resource->addServers($servers);
+            }
+        } else {
+            $resource['servers'] = $servers;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Add servers
+     *
+     * @param string       $id
+     * @param string|array $servers
+     * @return MemcachedResourceManager
+     */
+    public function addServers($id, $servers)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'servers' => $servers
+            ]);
+        }
+
+        $this->normalizeServers($servers);
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof MemcachedResource) {
+            // don't add servers twice
+            $servers = array_udiff($servers, $resource->getServerList(), [$this, 'compareServers']);
+            if ($servers) {
+                $resource->addServers($servers);
+            }
+        } else {
+            // don't add servers twice
+            $resource['servers'] = array_merge(
+                $resource['servers'],
+                array_udiff($servers, $resource['servers'], [$this, 'compareServers'])
+            );
+        }
+
+        return $this;
+    }
+
+    /**
+     * Add one server
+     *
+     * @param string       $id
+     * @param string|array $server
+     * @return MemcachedResourceManager
+     */
+    public function addServer($id, $server)
+    {
+        return $this->addServers($id, [$server]);
+    }
+
+    /**
+     * Normalize a list of servers into the following format:
+     * array(array('host' => <host>, 'port' => <port>, 'weight' => <weight>)[, ...])
+     *
+     * @param string|array $servers
+     */
+    protected function normalizeServers(& $servers)
+    {
+        if (!is_array($servers) && !$servers instanceof Traversable) {
+            // Convert string into a list of servers
+            $servers = explode(',', $servers);
+        }
+
+        $result = [];
+        foreach ($servers as $server) {
+            $this->normalizeServer($server);
+            $result[$server['host'] . ':' . $server['port']] = $server;
+        }
+
+        $servers = array_values($result);
+    }
+
+    /**
+     * Compare 2 normalized server arrays
+     * (Compares only the host and the port)
+     *
+     * @param array $serverA
+     * @param array $serverB
+     * @return int
+     */
+    protected function compareServers(array $serverA, array $serverB)
+    {
+        $keyA = $serverA['host'] . ':' . $serverA['port'];
+        $keyB = $serverB['host'] . ':' . $serverB['port'];
+        if ($keyA === $keyB) {
+            return 0;
+        }
+        return $keyA > $keyB ? 1 : -1;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Memory.php	(revision 5534)
@@ -0,0 +1,747 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\ClearExpiredInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Cache\Storage\TaggableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class Memory extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    ClearByPrefixInterface,
+    ClearByNamespaceInterface,
+    ClearExpiredInterface,
+    FlushableInterface,
+    IterableInterface,
+    TaggableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Data Array
+     *
+     * Format:
+     * array(
+     *     <NAMESPACE> => array(
+     *         <KEY> => array(
+     *             0 => <VALUE>
+     *             1 => <MICROTIME>
+     *             ['tags' => <TAGS>]
+     *         )
+     *     )
+     * )
+     *
+     * @var array
+     */
+    protected $data = [];
+
+    /**
+     * Set options.
+     *
+     * @param  array|\Traversable|MemoryOptions $options
+     * @return Memory
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof MemoryOptions) {
+            $options = new MemoryOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return MemoryOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new MemoryOptions());
+        }
+        return $this->options;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int
+     */
+    public function getTotalSpace()
+    {
+        return $this->getOptions()->getMemoryLimit();
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $total = $this->getOptions()->getMemoryLimit();
+        $avail = $total - (float) memory_get_usage(true);
+        return ($avail > 0) ? $avail : 0;
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return KeyListIterator
+     */
+    public function getIterator()
+    {
+        $ns   = $this->getOptions()->getNamespace();
+        $keys = [];
+
+        if (isset($this->data[$ns])) {
+            foreach ($this->data[$ns] as $key => & $tmp) {
+                if ($this->internalHasItem($key)) {
+                    $keys[] = $key;
+                }
+            }
+        }
+
+        return new KeyListIterator($this, $keys);
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        $this->data = [];
+        return true;
+    }
+
+    /* ClearExpiredInterface */
+
+    /**
+     * Remove expired items
+     *
+     * @return bool
+     */
+    public function clearExpired()
+    {
+        $ttl = $this->getOptions()->getTtl();
+        if ($ttl <= 0) {
+            return true;
+        }
+
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns])) {
+            return true;
+        }
+
+        $data = & $this->data[$ns];
+        foreach ($data as $key => & $item) {
+            if (microtime(true) >= $data[$key][1] + $ttl) {
+                unset($data[$key]);
+            }
+        }
+
+        return true;
+    }
+
+    /* ClearByNamespaceInterface */
+
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        unset($this->data[$namespace]);
+        return true;
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns])) {
+            return true;
+        }
+
+        $prefixL = strlen($prefix);
+        $data    = & $this->data[$ns];
+        foreach ($data as $key => & $item) {
+            if (substr($key, 0, $prefixL) === $prefix) {
+                unset($data[$key]);
+            }
+        }
+
+        return true;
+    }
+
+    /* TaggableInterface */
+
+    /**
+     * Set tags to an item by given key.
+     * An empty array will remove all tags.
+     *
+     * @param string   $key
+     * @param string[] $tags
+     * @return bool
+     */
+    public function setTags($key, array $tags)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns][$key])) {
+            return false;
+        }
+
+        $this->data[$ns][$key]['tags'] = $tags;
+        return true;
+    }
+
+    /**
+     * Get tags of an item by given key
+     *
+     * @param string $key
+     * @return string[]|FALSE
+    */
+    public function getTags($key)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns][$key])) {
+            return false;
+        }
+
+        return isset($this->data[$ns][$key]['tags']) ? $this->data[$ns][$key]['tags'] : [];
+    }
+
+    /**
+     * Remove items matching given tags.
+     *
+     * If $disjunction only one of the given tags must match
+     * else all given tags must match.
+     *
+     * @param string[] $tags
+     * @param  bool  $disjunction
+     * @return bool
+    */
+    public function clearByTags(array $tags, $disjunction = false)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns])) {
+            return true;
+        }
+
+        $tagCount = count($tags);
+        $data     = & $this->data[$ns];
+        foreach ($data as $key => & $item) {
+            if (isset($item['tags'])) {
+                $diff = array_diff($tags, $item['tags']);
+                if (($disjunction && count($diff) < $tagCount) || (!$disjunction && !$diff)) {
+                    unset($data[$key]);
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $options = $this->getOptions();
+        $ns      = $options->getNamespace();
+        $success = isset($this->data[$ns][$normalizedKey]);
+        if ($success) {
+            $data = & $this->data[$ns][$normalizedKey];
+            $ttl  = $options->getTtl();
+            if ($ttl && microtime(true) >= ($data[1] + $ttl)) {
+                $success = false;
+            }
+        }
+
+        if (!$success) {
+            return;
+        }
+
+        $casToken = $data[0];
+        return $data[0];
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $options = $this->getOptions();
+        $ns      = $options->getNamespace();
+        if (!isset($this->data[$ns])) {
+            return [];
+        }
+
+        $data = & $this->data[$ns];
+        $ttl  = $options->getTtl();
+        $now  = microtime(true);
+
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if (isset($data[$normalizedKey])) {
+                if (!$ttl || $now < ($data[$normalizedKey][1] + $ttl)) {
+                    $result[$normalizedKey] = $data[$normalizedKey][0];
+                }
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $options = $this->getOptions();
+        $ns      = $options->getNamespace();
+        if (!isset($this->data[$ns][$normalizedKey])) {
+            return false;
+        }
+
+        // check if expired
+        $ttl = $options->getTtl();
+        if ($ttl && microtime(true) >= ($this->data[$ns][$normalizedKey][1] + $ttl)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param array $normalizedKeys
+     * @return array Array of found keys
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $options = $this->getOptions();
+        $ns      = $options->getNamespace();
+        if (!isset($this->data[$ns])) {
+            return [];
+        }
+
+        $data = & $this->data[$ns];
+        $ttl  = $options->getTtl();
+        $now  = microtime(true);
+
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if (isset($data[$normalizedKey])) {
+                if (!$ttl || $now < ($data[$normalizedKey][1] + $ttl)) {
+                    $result[] = $normalizedKey;
+                }
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getMetadata.pre(PreEvent)
+     * @triggers getMetadata.post(PostEvent)
+     * @triggers getMetadata.exception(ExceptionEvent)
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        if (!$this->internalHasItem($normalizedKey)) {
+            return false;
+        }
+
+        $ns = $this->getOptions()->getNamespace();
+        return [
+            'mtime' => $this->data[$ns][$normalizedKey][1],
+        ];
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $options = $this->getOptions();
+
+        if (!$this->hasAvailableSpace()) {
+            $memoryLimit = $options->getMemoryLimit();
+            throw new Exception\OutOfSpaceException(
+                "Memory usage exceeds limit ({$memoryLimit})."
+            );
+        }
+
+        $ns = $options->getNamespace();
+        $this->data[$ns][$normalizedKey] = [$value, microtime(true)];
+
+        return true;
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $options = $this->getOptions();
+
+        if (!$this->hasAvailableSpace()) {
+            $memoryLimit = $options->getMemoryLimit();
+            throw new Exception\OutOfSpaceException(
+                "Memory usage exceeds limit ({$memoryLimit})."
+            );
+        }
+
+        $ns = $options->getNamespace();
+        if (!isset($this->data[$ns])) {
+            $this->data[$ns] = [];
+        }
+
+        $data = & $this->data[$ns];
+        $now  = microtime(true);
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            $data[$normalizedKey] = [$value, $now];
+        }
+
+        return [];
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $options = $this->getOptions();
+
+        if (!$this->hasAvailableSpace()) {
+            $memoryLimit = $options->getMemoryLimit();
+            throw new Exception\OutOfSpaceException(
+                "Memory usage exceeds limit ({$memoryLimit})."
+            );
+        }
+
+        $ns = $options->getNamespace();
+        if (isset($this->data[$ns][$normalizedKey])) {
+            return false;
+        }
+
+        $this->data[$ns][$normalizedKey] = [$value, microtime(true)];
+        return true;
+    }
+
+    /**
+     * Internal method to add multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItems(array & $normalizedKeyValuePairs)
+    {
+        $options = $this->getOptions();
+
+        if (!$this->hasAvailableSpace()) {
+            $memoryLimit = $options->getMemoryLimit();
+            throw new Exception\OutOfSpaceException(
+                "Memory usage exceeds limit ({$memoryLimit})."
+            );
+        }
+
+        $ns = $options->getNamespace();
+        if (!isset($this->data[$ns])) {
+            $this->data[$ns] = [];
+        }
+
+        $result = [];
+        $data   = & $this->data[$ns];
+        $now    = microtime(true);
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            if (isset($data[$normalizedKey])) {
+                $result[] = $normalizedKey;
+            } else {
+                $data[$normalizedKey] = [$value, $now];
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns][$normalizedKey])) {
+            return false;
+        }
+        $this->data[$ns][$normalizedKey] = [$value, microtime(true)];
+
+        return true;
+    }
+
+    /**
+     * Internal method to replace multiple existing items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItems(array & $normalizedKeyValuePairs)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns])) {
+            return array_keys($normalizedKeyValuePairs);
+        }
+
+        $result = [];
+        $data   = & $this->data[$ns];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            if (!isset($data[$normalizedKey])) {
+                $result[] = $normalizedKey;
+            } else {
+                $data[$normalizedKey] = [$value, microtime(true)];
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to reset lifetime of an item
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalTouchItem(& $normalizedKey)
+    {
+        $ns = $this->getOptions()->getNamespace();
+
+        if (!isset($this->data[$ns][$normalizedKey])) {
+            return false;
+        }
+
+        $this->data[$ns][$normalizedKey][1] = microtime(true);
+        return true;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (!isset($this->data[$ns][$normalizedKey])) {
+            return false;
+        }
+
+        unset($this->data[$ns][$normalizedKey]);
+
+        // remove empty namespace
+        if (!$this->data[$ns]) {
+            unset($this->data[$ns]);
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (isset($this->data[$ns][$normalizedKey])) {
+            $data = & $this->data[$ns][$normalizedKey];
+            $data[0]+= $value;
+            $data[1] = microtime(true);
+            $newValue = $data[0];
+        } else {
+            // initial value
+            $newValue                        = $value;
+            $this->data[$ns][$normalizedKey] = [$newValue, microtime(true)];
+        }
+
+        return $newValue;
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $ns = $this->getOptions()->getNamespace();
+        if (isset($this->data[$ns][$normalizedKey])) {
+            $data = & $this->data[$ns][$normalizedKey];
+            $data[0]-= $value;
+            $data[1] = microtime(true);
+            $newValue = $data[0];
+        } else {
+            // initial value
+            $newValue                        = -$value;
+            $this->data[$ns][$normalizedKey] = [$newValue, microtime(true)];
+        }
+
+        return $newValue;
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $this->capabilityMarker = new stdClass();
+            $this->capabilities = new Capabilities(
+                $this,
+                $this->capabilityMarker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => true,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => true,
+                        'object'   => true,
+                        'resource' => true,
+                    ],
+                    'supportedMetadata'  => ['mtime'],
+                    'minTtl'             => 1,
+                    'maxTtl'             => PHP_INT_MAX,
+                    'staticTtl'          => false,
+                    'ttlPrecision'       => 0.05,
+                    'expiredRead'        => true,
+                    'maxKeyLength'       => 0,
+                    'namespaceIsPrefix'  => false,
+                    'namespaceSeparator' => '',
+                ]
+            );
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Has space available to store items?
+     *
+     * @return bool
+     */
+    protected function hasAvailableSpace()
+    {
+        $total = $this->getOptions()->getMemoryLimit();
+
+        // check memory limit disabled
+        if ($total <= 0) {
+            return true;
+        }
+
+        $free = $total - (float) memory_get_usage(true);
+        return ($free > 0);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemoryOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemoryOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MemoryOptions.php	(revision 5534)
@@ -0,0 +1,112 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+
+/**
+ * These are options specific to the APC adapter
+ */
+class MemoryOptions extends AdapterOptions
+{
+    /**
+     * memory limit
+     *
+     * @var null|int
+     */
+    protected $memoryLimit = null;
+
+    /**
+     * Set memory limit
+     *
+     * - A number less or equal 0 will disable the memory limit
+     * - When a number is used, the value is measured in bytes. Shorthand notation may also be used.
+     * - If the used memory of PHP exceeds this limit an OutOfSpaceException
+     *   will be thrown.
+     *
+     * @link http://php.net/manual/faq.using.php#faq.using.shorthandbytes
+     * @param  string|int $memoryLimit
+     * @return MemoryOptions
+     */
+    public function setMemoryLimit($memoryLimit)
+    {
+        $memoryLimit = $this->normalizeMemoryLimit($memoryLimit);
+
+        if ($this->memoryLimit != $memoryLimit) {
+            $this->triggerOptionEvent('memory_limit', $memoryLimit);
+            $this->memoryLimit = $memoryLimit;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get memory limit
+     *
+     * If the used memory of PHP exceeds this limit an OutOfSpaceException
+     * will be thrown.
+     *
+     * @return int
+     */
+    public function getMemoryLimit()
+    {
+        if ($this->memoryLimit === null) {
+            // By default use half of PHP's memory limit if possible
+            $memoryLimit = $this->normalizeMemoryLimit(ini_get('memory_limit'));
+            if ($memoryLimit >= 0) {
+                $this->memoryLimit = (int) ($memoryLimit / 2);
+            } else {
+                // disable memory limit
+                $this->memoryLimit = 0;
+            }
+        }
+
+        return $this->memoryLimit;
+    }
+
+    /**
+     * Normalized a given value of memory limit into the number of bytes
+     *
+     * @param string|int $value
+     * @throws Exception\InvalidArgumentException
+     * @return int
+     */
+    protected function normalizeMemoryLimit($value)
+    {
+        if (is_numeric($value)) {
+            return (int) $value;
+        }
+
+        if (!preg_match('/(\-?\d+)\s*(\w*)/', ini_get('memory_limit'), $matches)) {
+            throw new Exception\InvalidArgumentException("Invalid  memory limit '{$value}'");
+        }
+
+        $value = (int) $matches[1];
+        if ($value <= 0) {
+            return 0;
+        }
+
+        switch (strtoupper($matches[2])) {
+            case 'G':
+                $value*= 1024;
+                // no break
+
+            case 'M':
+                $value*= 1024;
+                // no break
+
+            case 'K':
+                $value*= 1024;
+                // no break
+        }
+
+        return $value;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDb.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDb.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDb.php	(revision 5534)
@@ -0,0 +1,285 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use MongoCollection as MongoResource;
+use MongoDate;
+use MongoException as MongoResourceException;
+use stdClass;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\FlushableInterface;
+
+class MongoDb extends AbstractAdapter implements FlushableInterface
+{
+    /**
+     * Has this instance be initialized
+     *
+     * @var bool
+     */
+    private $initialized = false;
+
+    /**
+     * the mongodb resource manager
+     *
+     * @var null|MongoDbResourceManager
+     */
+    private $resourceManager;
+
+    /**
+     * The mongodb resource id
+     *
+     * @var null|string
+     */
+    private $resourceId;
+
+    /**
+     * The namespace prefix
+     *
+     * @var string
+     */
+    private $namespacePrefix = '';
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws Exception\ExtensionNotLoadedException
+     */
+    public function __construct($options = null)
+    {
+        if (!class_exists('Mongo') || !class_exists('MongoClient')) {
+            throw new Exception\ExtensionNotLoadedException('MongoDb extension not loaded or Mongo polyfill not included');
+        }
+
+        parent::__construct($options);
+
+        $initialized = & $this->initialized;
+
+        $this->getEventManager()->attach(
+            'option',
+            function () use (& $initialized) {
+                $initialized = false;
+            }
+        );
+    }
+
+    /**
+     * get mongodb resource
+     *
+     * @return MongoResource
+     */
+    private function getMongoDbResource()
+    {
+        if (! $this->initialized) {
+            $options = $this->getOptions();
+
+            $this->resourceManager = $options->getResourceManager();
+            $this->resourceId      = $options->getResourceId();
+            $namespace             = $options->getNamespace();
+            $this->namespacePrefix = ($namespace === '' ? '' : $namespace . $options->getNamespaceSeparator());
+            $this->initialized     = true;
+        }
+
+        return $this->resourceManager->getResource($this->resourceId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function setOptions($options)
+    {
+        return parent::setOptions($options instanceof MongoDbOptions ? $options : new MongoDbOptions($options));
+    }
+
+    /**
+     * Get options.
+     *
+     * @return MongoDbOptions
+     * @see    setOptions()
+     */
+    public function getOptions()
+    {
+        return $this->options;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws Exception\RuntimeException
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $result  = $this->fetchFromCollection($normalizedKey);
+        $success = false;
+
+        if (null === $result) {
+            return;
+        }
+
+        if (isset($result['expires'])) {
+            if (! $result['expires'] instanceof MongoDate) {
+                throw new Exception\RuntimeException(sprintf(
+                    "The found item _id '%s' for key '%s' is not a valid cache item"
+                    . ": the field 'expired' isn't an instance of MongoDate, '%s' found instead",
+                    (string) $result['_id'],
+                    $this->namespacePrefix . $normalizedKey,
+                    is_object($result['expires']) ? get_class($result['expires']) : gettype($result['expires'])
+                ));
+            }
+
+            if ($result['expires']->sec < time()) {
+                $this->internalRemoveItem($key);
+
+                return;
+            }
+        }
+
+        if (! array_key_exists('value', $result)) {
+            throw new Exception\RuntimeException(sprintf(
+                "The found item _id '%s' for key '%s' is not a valid cache item: missing the field 'value'",
+                (string) $result['_id'],
+                $this->namespacePrefix . $normalizedKey
+            ));
+        }
+
+        $success = true;
+
+        return $casToken = $result['value'];
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws Exception\RuntimeException
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $mongo     = $this->getMongoDbResource();
+        $key       = $this->namespacePrefix . $normalizedKey;
+        $ttl       = $this->getOptions()->getTTl();
+        $expires   = null;
+        $cacheItem = [
+            'key' => $key,
+            'value' => $value,
+        ];
+
+        if ($ttl > 0) {
+            $expiresMicro         = microtime(true) + $ttl;
+            $expiresSecs          = (int) $expiresMicro;
+            $cacheItem['expires'] = new MongoDate($expiresSecs, $expiresMicro - $expiresSecs);
+        }
+
+        try {
+            $mongo->remove(['key' => $key]);
+
+            $result = $mongo->insert($cacheItem);
+        } catch (MongoResourceException $e) {
+            throw new Exception\RuntimeException($e->getMessage(), $e->getCode(), $e);
+        }
+
+        return null !== $result && ((double) 1) === $result['ok'];
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws Exception\RuntimeException
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        try {
+            $result = $this->getMongoDbResource()->remove(['key' => $this->namespacePrefix . $normalizedKey]);
+        } catch (MongoResourceException $e) {
+            throw new Exception\RuntimeException($e->getMessage(), $e->getCode(), $e);
+        }
+
+        return false !== $result
+            && ((double) 1) === $result['ok']
+            && $result['n'] > 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function flush()
+    {
+        $result = $this->getMongoDbResource()->drop();
+
+        return ((double) 1) === $result['ok'];
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities) {
+            return $this->capabilities;
+        }
+
+        return $this->capabilities = new Capabilities(
+            $this,
+            $this->capabilityMarker = new stdClass(),
+            [
+                'supportedDatatypes' => [
+                    'NULL'     => true,
+                    'boolean'  => true,
+                    'integer'  => true,
+                    'double'   => true,
+                    'string'   => true,
+                    'array'    => true,
+                    'object'   => false,
+                    'resource' => false,
+                ],
+                'supportedMetadata'  => [
+                    '_id',
+                ],
+                'minTtl'             => 0,
+                'maxTtl'             => 0,
+                'staticTtl'          => true,
+                'ttlPrecision'       => 1,
+                'useRequestTime'     => false,
+                'expiredRead'        => false,
+                'maxKeyLength'       => 255,
+                'namespaceIsPrefix'  => true,
+            ]
+        );
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        $result = $this->fetchFromCollection($normalizedKey);
+
+        return null !== $result ? ['_id' => $result['_id']] : false;
+    }
+
+    /**
+     * Return raw records from MongoCollection
+     *
+     * @param string $normalizedKey
+     *
+     * @return array|null
+     *
+     * @throws Exception\RuntimeException
+     */
+    private function fetchFromCollection(& $normalizedKey)
+    {
+        try {
+            return $this->getMongoDbResource()->findOne(['key' => $this->namespacePrefix . $normalizedKey]);
+        } catch (MongoResourceException $e) {
+            throw new Exception\RuntimeException($e->getMessage(), $e->getCode(), $e);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDbOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDbOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDbOptions.php	(revision 5534)
@@ -0,0 +1,158 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+class MongoDbOptions extends AdapterOptions
+{
+    /**
+     * The namespace separator
+     *
+     * @var string
+     */
+    private $namespaceSeparator = ':';
+
+    /**
+     * The mongo DB resource manager
+     *
+     * @var null|MongoDbResourceManager
+     */
+    private $resourceManager;
+
+    /**
+     * The resource id of the resource manager
+     *
+     * @var string
+     */
+    private $resourceId = 'default';
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     *
+     * @return self
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+
+        if ($this->namespaceSeparator !== $namespaceSeparator) {
+            $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+
+            $this->namespaceSeparator = $namespaceSeparator;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * Set the mongodb resource manager to use
+     *
+     * @param null|MongoDbResourceManager $resourceManager
+     *
+     * @return self
+     */
+    public function setResourceManager(MongoDbResourceManager $resourceManager = null)
+    {
+        if ($this->resourceManager !== $resourceManager) {
+            $this->triggerOptionEvent('resource_manager', $resourceManager);
+
+            $this->resourceManager = $resourceManager;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get the mongodb resource manager
+     *
+     * @return MongoDbResourceManager
+     */
+    public function getResourceManager()
+    {
+        return $this->resourceManager ?: $this->resourceManager = new MongoDbResourceManager();
+    }
+
+    /**
+     * Get the mongodb resource id
+     *
+     * @return string
+     */
+    public function getResourceId()
+    {
+        return $this->resourceId;
+    }
+
+    /**
+     * Set the mongodb resource id
+     *
+     * @param string $resourceId
+     *
+     * @return self
+     */
+    public function setResourceId($resourceId)
+    {
+        $resourceId = (string) $resourceId;
+
+        if ($this->resourceId !== $resourceId) {
+            $this->triggerOptionEvent('resource_id', $resourceId);
+
+            $this->resourceId = $resourceId;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Set the mongo DB server
+     *
+     * @param string $server
+     * @return self
+     */
+    public function setServer($server)
+    {
+        $this->getResourceManager()->setServer($this->getResourceId(), $server);
+        return $this;
+    }
+
+    public function setConnectionOptions(array $connectionOptions)
+    {
+        $this->getResourceManager()->setConnectionOptions($this->getResourceId(), $connectionOptions);
+        return $this;
+    }
+
+    public function setDriverOptions(array $driverOptions)
+    {
+        $this->getResourceManager()->setDriverOptions($this->getResourceId(), $driverOptions);
+        return $this;
+    }
+
+    public function setDatabase($database)
+    {
+        $this->getResourceManager()->setDatabase($this->getResourceId(), $database);
+        return $this;
+    }
+
+    public function setCollection($collection)
+    {
+        $this->getResourceManager()->setCollection($this->getResourceId(), $collection);
+        return $this;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDbResourceManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDbResourceManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/MongoDbResourceManager.php	(revision 5534)
@@ -0,0 +1,204 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use MongoCollection;
+use MongoException;
+use Zend\Cache\Exception;
+
+class MongoDbResourceManager
+{
+    /**
+     * Registered resources
+     *
+     * @var array[]
+     */
+    private $resources = [];
+
+    /**
+     * Check if a resource exists
+     *
+     * @param string $id
+     *
+     * @return bool
+     */
+    public function hasResource($id)
+    {
+        return isset($this->resources[$id]);
+    }
+
+    /**
+     * Set a resource
+     *
+     * @param string $id
+     * @param array|MongoCollection $resource
+     *
+     * @return self
+     *
+     * @throws Exception\RuntimeException
+     */
+    public function setResource($id, $resource)
+    {
+        if ($resource instanceof MongoCollection) {
+            $this->resources[$id] = [
+                'db'                  => (string) $resource->db,
+                'db_instance'         => $resource->db,
+                'collection'          => (string) $resource,
+                'collection_instance' => $resource,
+            ];
+            return $this;
+        }
+
+        if (! is_array($resource)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects an array or MongoCollection; received %s',
+                __METHOD__,
+                (is_object($resource) ? get_class($resource) : gettype($resource))
+            ));
+        }
+
+        $this->resources[$id] = $resource;
+        return $this;
+    }
+
+    /**
+     * Instantiate and return the MongoCollection resource
+     *
+     * @param string $id
+     * @return MongoCollection
+     * @throws Exception\RuntimeException
+     */
+    public function getResource($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = $this->resources[$id];
+        if (!isset($resource['collection_instance'])) {
+            try {
+                if (!isset($resource['db_instance'])) {
+                    if (!isset($resource['client_instance'])) {
+                        $clientClass = version_compare(phpversion('mongo'), '1.3.0', '<') ? 'Mongo' : 'MongoClient';
+                        $resource['client_instance'] = new $clientClass(
+                            isset($resource['server']) ? $resource['server'] : null,
+                            isset($resource['connection_options']) ? $resource['connection_options'] : [],
+                            isset($resource['driver_options']) ? $resource['driver_options'] : []
+                        );
+                    }
+
+                    $resource['db_instance'] = $resource['client_instance']->selectDB(
+                        isset($resource['db']) ? $resource['db'] : ''
+                    );
+                }
+
+                $collection = $resource['db_instance']->selectCollection(
+                    isset($resource['collection']) ? $resource['collection'] : ''
+                );
+                $collection->ensureIndex(['key' => 1]);
+
+                $this->resources[$id]['collection_instance'] = $collection;
+            } catch (MongoException $e) {
+                throw new Exception\RuntimeException($e->getMessage(), $e->getCode(), $e);
+            }
+        }
+
+        return $this->resources[$id]['collection_instance'];
+    }
+
+    public function setServer($id, $server)
+    {
+        $this->resources[$id]['server'] = (string)$server;
+
+        unset($this->resource[$id]['client_instance']);
+        unset($this->resource[$id]['db_instance']);
+        unset($this->resource[$id]['collection_instance']);
+    }
+
+    public function getServer($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        return isset($this->resources[$id]['server']) ? $this->resources[$id]['server'] : null;
+    }
+
+    public function setConnectionOptions($id, array $connectionOptions)
+    {
+        $this->resources[$id]['connection_options'] = $connectionOptions;
+
+        unset($this->resource[$id]['client_instance']);
+        unset($this->resource[$id]['db_instance']);
+        unset($this->resource[$id]['collection_instance']);
+    }
+
+    public function getConnectionOptions($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        return isset($this->resources[$id]['connection_options'])
+            ? $this->resources[$id]['connection_options']
+            : [];
+    }
+
+    public function setDriverOptions($id, array $driverOptions)
+    {
+        $this->resources[$id]['driver_options'] = $driverOptions;
+
+        unset($this->resource[$id]['client_instance']);
+        unset($this->resource[$id]['db_instance']);
+        unset($this->resource[$id]['collection_instance']);
+    }
+
+    public function getDriverOptions($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        return isset($this->resources[$id]['driver_options']) ? $this->resources[$id]['driver_options'] : [];
+    }
+
+    public function setDatabase($id, $database)
+    {
+        $this->resources[$id]['db'] = (string)$database;
+
+        unset($this->resource[$id]['db_instance']);
+        unset($this->resource[$id]['collection_instance']);
+    }
+
+    public function getDatabase($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        return isset($this->resources[$id]['db']) ? $this->resources[$id]['db'] : '';
+    }
+
+    public function setCollection($id, $collection)
+    {
+        $this->resources[$id]['collection'] = (string)$collection;
+
+        unset($this->resource[$id]['collection_instance']);
+    }
+
+    public function getCollection($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        return isset($this->resources[$id]['collection']) ? $this->resources[$id]['collection'] : '';
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Redis.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Redis.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Redis.php	(revision 5534)
@@ -0,0 +1,549 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Redis as RedisResource;
+use RedisException as RedisResourceException;
+use stdClass;
+use Traversable;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class Redis extends AbstractAdapter implements
+    ClearByPrefixInterface,
+    FlushableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Has this instance be initialized
+     *
+     * @var bool
+     */
+    protected $initialized = false;
+
+    /**
+     * The redis resource manager
+     *
+     * @var null|RedisResourceManager
+     */
+    protected $resourceManager;
+
+    /**
+     * The redis resource id
+     *
+     * @var null|string
+     */
+    protected $resourceId;
+
+    /**
+     * The namespace prefix
+     *
+     * @var string
+     */
+    protected $namespacePrefix = '';
+
+    /**
+     * Create new Adapter for redis storage
+     *
+     * @param null|array|Traversable|RedisOptions $options
+     * @see \Zend\Cache\Storage\Adapter\Abstract
+     */
+    public function __construct($options = null)
+    {
+        if (!extension_loaded('redis')) {
+            throw new Exception\ExtensionNotLoadedException("Redis extension is not loaded");
+        }
+
+        parent::__construct($options);
+
+        // reset initialized flag on update option(s)
+        $initialized = & $this->initialized;
+        $this->getEventManager()->attach('option', function () use (& $initialized) {
+            $initialized = false;
+        });
+    }
+
+    /**
+     * Get Redis resource
+     *
+     * @return RedisResource
+     */
+    protected function getRedisResource()
+    {
+        if (!$this->initialized) {
+            $options = $this->getOptions();
+
+            // get resource manager and resource id
+            $this->resourceManager = $options->getResourceManager();
+            $this->resourceId      = $options->getResourceId();
+
+            // init namespace prefix
+            $namespace = $options->getNamespace();
+            if ($namespace !== '') {
+                $this->namespacePrefix = $namespace . $options->getNamespaceSeparator();
+            } else {
+                $this->namespacePrefix = '';
+            }
+
+            // update initialized flag
+            $this->initialized = true;
+        }
+
+        return $this->resourceManager->getResource($this->resourceId);
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|RedisOptions $options
+     * @return Redis
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof RedisOptions) {
+            $options = new RedisOptions($options);
+        }
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return RedisOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new RedisOptions());
+        }
+        return $this->options;
+    }
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param string  &$normalizedKey Key where to store data
+     * @param bool &$success       If the operation was successfull
+     * @param mixed   &$casToken      Token
+     * @return mixed Data on success, false on key not found
+     * @throws Exception\RuntimeException
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            $value = $redis->get($this->namespacePrefix . $normalizedKey);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+
+        if ($value === false) {
+            $success = false;
+            return;
+        }
+
+        $success = true;
+        $casToken = $value;
+        return $value;
+    }
+
+     /**
+     * Internal method to get multiple items.
+     *
+     * @param array &$normalizedKeys Array of keys to be obtained
+     *
+     * @return array Associative array of keys and values
+     * @throws Exception\RuntimeException
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $redis = $this->getRedisResource();
+
+        $namespacedKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $namespacedKeys[] = $this->namespacePrefix . $normalizedKey;
+        }
+
+        try {
+            $results = $redis->mGet($namespacedKeys);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+        //combine the key => value pairs and remove all missing values
+        return array_filter(
+            array_combine($normalizedKeys, $results),
+            function ($value) {
+                return $value !== false;
+            }
+        );
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param string &$normalizedKey Normalized key which will be checked
+     *
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            return $redis->exists($this->namespacePrefix . $normalizedKey);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param string &$normalizedKey Key in Redis under which value will be saved
+     * @param mixed  &$value         Value to store under cache key
+     *
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $redis = $this->getRedisResource();
+        $ttl = $this->getOptions()->getTtl();
+
+        try {
+            if ($ttl) {
+                if ($this->resourceManager->getMajorVersion($this->resourceId) < 2) {
+                    throw new Exception\UnsupportedMethodCallException("To use ttl you need version >= 2.0.0");
+                }
+                $success = $redis->setex($this->namespacePrefix . $normalizedKey, $ttl, $value);
+            } else {
+                $success = $redis->set($this->namespacePrefix . $normalizedKey, $value);
+            }
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+
+        return $success;
+    }
+
+     /**
+     * Internal method to store multiple items.
+     *
+     * @param array &$normalizedKeyValuePairs An array of normalized key/value pairs
+     *
+     * @return array Array of not stored keys
+     * @throws Exception\RuntimeException
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $redis = $this->getRedisResource();
+        $ttl   = $this->getOptions()->getTtl();
+
+        $namespacedKeyValuePairs = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            $namespacedKeyValuePairs[$this->namespacePrefix . $normalizedKey] = $value;
+        }
+        try {
+            if ($ttl > 0) {
+                //check if ttl is supported
+                if ($this->resourceManager->getMajorVersion($this->resourceId) < 2) {
+                    throw new Exception\UnsupportedMethodCallException("To use ttl you need version >= 2.0.0");
+                }
+                //mSet does not allow ttl, so use transaction
+                $transaction = $redis->multi();
+                foreach ($namespacedKeyValuePairs as $key => $value) {
+                    $transaction->setex($key, $ttl, $value);
+                }
+                $success = $transaction->exec();
+            } else {
+                $success = $redis->mSet($namespacedKeyValuePairs);
+            }
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+        if (!$success) {
+            throw new Exception\RuntimeException($redis->getLastError());
+        }
+
+        return [];
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            return $redis->setnx($this->namespacePrefix . $normalizedKey, $value);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /**
+     * Internal method to touch an item.
+     *
+     * @param string &$normalizedKey Key which will be touched
+     *
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function internalTouchItem(& $normalizedKey)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            $ttl = $this->getOptions()->getTtl();
+            return (bool) $redis->expire($this->namespacePrefix . $normalizedKey, $ttl);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param string &$normalizedKey Key which will be removed
+     *
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            return (bool) $redis->delete($this->namespacePrefix . $normalizedKey);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\RuntimeException
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            return $redis->incrBy($this->namespacePrefix . $normalizedKey, $value);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\RuntimeException
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $redis = $this->getRedisResource();
+        try {
+            return $redis->decrBy($this->namespacePrefix . $normalizedKey, $value);
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /**
+     * Flush currently set DB
+     *
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    public function flush()
+    {
+        $redis = $this->getRedisResource();
+        try {
+            return $redis->flushDB();
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $redis = $this->getRedisResource();
+
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix;
+
+        $redis->delete($redis->keys($prefix.'*'));
+
+        return true;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        $redis  = $this->getRedisResource();
+        try {
+            $info = $redis->info();
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+
+        return $info['used_memory'];
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $this->capabilityMarker = new stdClass();
+
+            $redisVersion = $this->resourceManager->getMajorVersion($this->resourceId);
+            $minTtl = version_compare($redisVersion, '2', '<') ? 0 : 1;
+            $supportedMetadata = version_compare($redisVersion, '2', '>=') ? ['ttl'] : [];
+
+            //without serialization redis supports only strings for simple
+            //get/set methods
+            $this->capabilities     = new Capabilities(
+                $this,
+                $this->capabilityMarker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => 'string',
+                        'boolean'  => 'string',
+                        'integer'  => 'string',
+                        'double'   => 'string',
+                        'string'   => true,
+                        'array'    => false,
+                        'object'   => false,
+                        'resource' => false,
+                    ],
+                    'supportedMetadata'  => $supportedMetadata,
+                    'minTtl'             => $minTtl,
+                    'maxTtl'             => 0,
+                    'staticTtl'          => true,
+                    'ttlPrecision'       => 1,
+                    'useRequestTime'     => false,
+                    'expiredRead'        => false,
+                    'maxKeyLength'       => 255,
+                    'namespaceIsPrefix'  => true,
+                ]
+            );
+        }
+
+        return $this->capabilities;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        $redis    = $this->getRedisResource();
+        $metadata = [];
+
+        try {
+            $redisVersion = $this->resourceManager->getMajorVersion($this->resourceId);
+
+            // redis >= 2.8
+            // The command 'pttl' returns -2 if the item does not exist
+            // and -1 if the item has no associated expire
+            if (version_compare($redisVersion, '2.8',  '>=')) {
+                $pttl = $redis->pttl($this->namespacePrefix . $normalizedKey);
+                if ($pttl <= -2) {
+                    return false;
+                }
+                $metadata['ttl'] = ($pttl == -1) ? null : $pttl / 1000;
+
+            // redis >= 2.6
+            // The command 'pttl' returns -1 if the item does not exist or the item as no associated expire
+            } elseif (version_compare($redisVersion, '2.6', '>=')) {
+                $pttl = $redis->pttl($this->namespacePrefix . $normalizedKey);
+                if ($pttl <= -1) {
+                    if (!$this->internalHasItem($normalizedKey)) {
+                        return false;
+                    }
+                    $metadata['ttl'] = null;
+                } else {
+                    $metadata['ttl'] = $pttl / 1000;
+                }
+
+            // redis >= 2
+            // The command 'pttl' is not supported but 'ttl'
+            // The command 'ttl' returns 0 if the item does not exist same as if the item is going to be expired
+            // NOTE: In case of ttl=0 we return false because the item is going to be expired in a very near future
+            //       and then doesn't exist any more
+            } elseif (version_compare($redisVersion, '2', '>=')) {
+                $ttl = $redis->ttl($this->namespacePrefix . $normalizedKey);
+                if ($ttl <= -1) {
+                    if (!$this->internalHasItem($normalizedKey)) {
+                        return false;
+                    }
+                    $metadata['ttl'] = null;
+                } else {
+                    $metadata['ttl'] = $ttl;
+                }
+
+            // redis < 2
+            // The commands 'pttl' and 'ttl' are not supported
+            // but item existence have to be checked
+            } elseif (!$this->internalHasItem($normalizedKey)) {
+                return false;
+            }
+        } catch (RedisResourceException $e) {
+            throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
+        }
+
+        return $metadata;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/RedisOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/RedisOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/RedisOptions.php	(revision 5534)
@@ -0,0 +1,263 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+
+class RedisOptions extends AdapterOptions
+{
+    /**
+     * The namespace separator
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * The redis resource manager
+     *
+     * @var null|RedisResourceManager
+     */
+    protected $resourceManager;
+
+    /**
+     * The resource id of the resource manager
+     *
+     * @var string
+     */
+    protected $resourceId = 'default';
+
+    /**
+     * Set namespace.
+     *
+     * The option Redis::OPT_PREFIX will be used as the namespace.
+     * It can't be longer than 128 characters.
+     *
+     * @param string $namespace Prefix for each key stored in redis
+     * @return \Zend\Cache\Storage\Adapter\RedisOptions
+     *
+     * @see AdapterOptions::setNamespace()
+     * @see RedisOptions::setPrefixKey()
+     */
+    public function setNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+
+        if (128 < strlen($namespace)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects a prefix key of no longer than 128 characters',
+                __METHOD__
+            ));
+        }
+
+        return parent::setNamespace($namespace);
+    }
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return RedisOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        if ($this->namespaceSeparator !== $namespaceSeparator) {
+            $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+            $this->namespaceSeparator = $namespaceSeparator;
+        }
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * Set the redis resource manager to use
+     *
+     * @param null|RedisResourceManager $resourceManager
+     * @return RedisOptions
+     */
+    public function setResourceManager(RedisResourceManager $resourceManager = null)
+    {
+        if ($this->resourceManager !== $resourceManager) {
+            $this->triggerOptionEvent('resource_manager', $resourceManager);
+            $this->resourceManager = $resourceManager;
+        }
+        return $this;
+    }
+
+    /**
+     * Get the redis resource manager
+     *
+     * @return RedisResourceManager
+     */
+    public function getResourceManager()
+    {
+        if (!$this->resourceManager) {
+            $this->resourceManager = new RedisResourceManager();
+        }
+        return $this->resourceManager;
+    }
+
+    /**
+     * Get the redis resource id
+     *
+     * @return string
+     */
+    public function getResourceId()
+    {
+        return $this->resourceId;
+    }
+
+    /**
+     * Set the redis resource id
+     *
+     * @param string $resourceId
+     * @return RedisOptions
+     */
+    public function setResourceId($resourceId)
+    {
+        $resourceId = (string) $resourceId;
+        if ($this->resourceId !== $resourceId) {
+            $this->triggerOptionEvent('resource_id', $resourceId);
+            $this->resourceId = $resourceId;
+        }
+        return $this;
+    }
+
+    /**
+     * Get the persistent id
+     *
+     * @return string
+     */
+    public function getPersistentId()
+    {
+        return $this->getResourceManager()->getPersistentId($this->getResourceId());
+    }
+
+    /**
+     * Set the persistent id
+     *
+     * @param string $persistentId
+     * @return RedisOptions
+     */
+    public function setPersistentId($persistentId)
+    {
+        $this->triggerOptionEvent('persistent_id', $persistentId);
+        $this->getResourceManager()->setPersistentId($this->getResourceId(), $persistentId);
+        return $this;
+    }
+
+     /**
+    * Set redis options
+    *
+    * @param array $libOptions
+    * @return RedisOptions
+    * @link http://github.com/nicolasff/phpredis#setoption
+    */
+    public function setLibOptions(array $libOptions)
+    {
+        $this->triggerOptionEvent('lib_option', $libOptions);
+        $this->getResourceManager()->setLibOptions($this->getResourceId(), $libOptions);
+        return $this;
+    }
+
+    /**
+     * Get redis options
+     *
+     * @return array
+     * @link http://github.com/nicolasff/phpredis#setoption
+     */
+    public function getLibOptions()
+    {
+        return $this->getResourceManager()->getLibOptions($this->getResourceId());
+    }
+
+    /**
+     * Set server
+     *
+     * Server can be described as follows:
+     * - URI:   /path/to/sock.sock
+     * - Assoc: array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]])
+     * - List:  array(<host>[, <port>, [, <timeout>]])
+     *
+     * @param string|array $server
+     *
+     * @return RedisOptions
+     */
+    public function setServer($server)
+    {
+        $this->getResourceManager()->setServer($this->getResourceId(), $server);
+        return $this;
+    }
+
+    /**
+     * Get server
+     *
+     * @return array array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]])
+     */
+    public function getServer()
+    {
+        return $this->getResourceManager()->getServer($this->getResourceId());
+    }
+
+    /**
+     * Set resource database number
+     *
+     * @param int $database Database number
+     *
+     * @return RedisOptions
+     */
+    public function setDatabase($database)
+    {
+        $this->getResourceManager()->setDatabase($this->getResourceId(), $database);
+        return $this;
+    }
+
+    /**
+     * Get resource database number
+     *
+     * @return int Database number
+     */
+    public function getDatabase()
+    {
+        return $this->getResourceManager()->getDatabase($this->getResourceId());
+    }
+
+    /**
+     * Set resource password
+     *
+     * @param string $password Password
+     *
+     * @return RedisOptions
+     */
+    public function setPassword($password)
+    {
+        $this->getResourceManager()->setPassword($this->getResourceId(), $password);
+        return $this;
+    }
+
+    /**
+     * Get resource password
+     *
+     * @return string
+     */
+    public function getPassword()
+    {
+        return $this->getResourceManager()->getPassword($this->getResourceId());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/RedisResourceManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/RedisResourceManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/RedisResourceManager.php	(revision 5534)
@@ -0,0 +1,645 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Redis as RedisResource;
+use ReflectionClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Stdlib\ArrayUtils;
+
+/**
+ * This is a resource manager for redis
+ */
+class RedisResourceManager
+{
+    /**
+     * Registered resources
+     *
+     * @var array
+     */
+    protected $resources = [];
+
+    /**
+     * Check if a resource exists
+     *
+     * @param string $id
+     * @return bool
+     */
+    public function hasResource($id)
+    {
+        return isset($this->resources[$id]);
+    }
+
+    /**
+     * Get redis server version
+     *
+     * @param string $id
+     * @return int
+     * @throws Exception\RuntimeException
+     */
+    public function getMajorVersion($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        return (int) $resource['version'];
+    }
+
+    /**
+     * Get redis server version
+     *
+     * @deprecated 2.2.2 Use getMajorVersion instead
+     *
+     * @param string $id
+     * @return int
+     * @throws Exception\RuntimeException
+     */
+    public function getMayorVersion($id)
+    {
+        return $this->getMajorVersion($id);
+    }
+
+    /**
+     * Get redis resource database
+     *
+     * @param string $id
+     * @return string
+     */
+    public function getDatabase($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        return $resource['database'];
+    }
+
+    /**
+     * Get redis resource password
+     *
+     * @param string $id
+     * @return string
+     */
+    public function getPassword($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        return $resource['password'];
+    }
+
+    /**
+     * Gets a redis resource
+     *
+     * @param string $id
+     * @return RedisResourceManager
+     * @throws Exception\RuntimeException
+     */
+    public function getResource($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        if ($resource['resource'] instanceof RedisResource) {
+            //in case new server was set then connect
+            if (!$resource['initialized']) {
+                $this->connect($resource);
+            }
+            $info = $resource['resource']->info();
+            $resource['version'] = $info['redis_version'];
+            return $resource['resource'];
+        }
+
+        $redis = new RedisResource();
+
+        $resource['resource'] = $redis;
+        $this->connect($resource);
+
+        foreach ($resource['lib_options'] as $k => $v) {
+            $redis->setOption($k, $v);
+        }
+
+        $info = $redis->info();
+        $resource['version'] = $info['redis_version'];
+        $this->resources[$id]['resource'] = $redis;
+        return $redis;
+    }
+
+    /**
+     * Get server
+     * @param string $id
+     * @throws Exception\RuntimeException
+     * @return array array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]])
+     */
+    public function getServer($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+        return $resource['server'];
+    }
+
+    /**
+     * Normalize one server into the following format:
+     * array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]])
+     *
+     * @param string|array $server
+     *
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeServer(&$server)
+    {
+        $host    = null;
+        $port    = null;
+        $timeout = 0;
+
+        // convert a single server into an array
+        if ($server instanceof Traversable) {
+            $server = ArrayUtils::iteratorToArray($server);
+        }
+
+        if (is_array($server)) {
+            // array(<host>[, <port>[, <timeout>]])
+            if (isset($server[0])) {
+                $host    = (string) $server[0];
+                $port    = isset($server[1]) ? (int) $server[1] : $port;
+                $timeout = isset($server[2]) ? (int) $server[2] : $timeout;
+            }
+
+            // array('host' => <host>[, 'port' => <port>, ['timeout' => <timeout>]])
+            if (!isset($server[0]) && isset($server['host'])) {
+                $host    = (string) $server['host'];
+                $port    = isset($server['port'])    ? (int) $server['port']    : $port;
+                $timeout = isset($server['timeout']) ? (int) $server['timeout'] : $timeout;
+            }
+        } else {
+            // parse server from URI host{:?port}
+            $server = trim($server);
+            if (strpos($server, '/') !== 0) {
+                //non unix domain socket connection
+                $server = parse_url($server);
+            } else {
+                $server = ['host' => $server];
+            }
+            if (!$server) {
+                throw new Exception\InvalidArgumentException("Invalid server given");
+            }
+
+            $host    = $server['host'];
+            $port    = isset($server['port'])    ? (int) $server['port']    : $port;
+            $timeout = isset($server['timeout']) ? (int) $server['timeout'] : $timeout;
+        }
+
+        if (!$host) {
+            throw new Exception\InvalidArgumentException('Missing required server host');
+        }
+
+        $server = [
+            'host'    => $host,
+            'port'    => $port,
+            'timeout' => $timeout,
+        ];
+    }
+
+    /**
+     * Extract password to be used on connection
+     *
+     * @param mixed $resource
+     * @param mixed $serverUri
+     *
+     * @return string|null
+     */
+    protected function extractPassword($resource, $serverUri)
+    {
+        if (! empty($resource['password'])) {
+            return $resource['password'];
+        }
+
+        if (! is_string($serverUri)) {
+            return;
+        }
+
+        // parse server from URI host{:?port}
+        $server = trim($serverUri);
+
+        if (strpos($server, '/') === 0) {
+            return;
+        }
+
+        //non unix domain socket connection
+        $server = parse_url($server);
+
+        return isset($server['pass']) ? $server['pass'] : null;
+    }
+
+    /**
+     * Connects to redis server
+     *
+     *
+     * @param array & $resource
+     *
+     * @return null
+     * @throws Exception\RuntimeException
+     */
+    protected function connect(array & $resource)
+    {
+        $server = $resource['server'];
+        $redis  = $resource['resource'];
+        if ($resource['persistent_id'] !== '') {
+            //connect or reuse persistent connection
+            $success = $redis->pconnect($server['host'], $server['port'], $server['timeout'], $resource['persistent_id']);
+        } elseif ($server['port']) {
+            $success = $redis->connect($server['host'], $server['port'], $server['timeout']);
+        } elseif ($server['timeout']) {
+            //connect through unix domain socket
+            $success = $redis->connect($server['host'], $server['timeout']);
+        } else {
+            $success = $redis->connect($server['host']);
+        }
+
+        if (!$success) {
+            throw new Exception\RuntimeException('Could not estabilish connection with Redis instance');
+        }
+
+        $resource['initialized'] = true;
+        if ($resource['password']) {
+            $redis->auth($resource['password']);
+        }
+        $redis->select($resource['database']);
+    }
+
+    /**
+     * Set a resource
+     *
+     * @param string $id
+     * @param array|Traversable|RedisResource $resource
+     * @return RedisResourceManager Fluent interface
+     */
+    public function setResource($id, $resource)
+    {
+        $id = (string) $id;
+        //TODO: how to get back redis connection info from resource?
+        $defaults = [
+            'persistent_id' => '',
+            'lib_options'   => [],
+            'server'        => [],
+            'password'      => '',
+            'database'      => 0,
+            'resource'      => null,
+            'initialized'   => false,
+            'version'       => 0,
+        ];
+        if (!$resource instanceof RedisResource) {
+            if ($resource instanceof Traversable) {
+                $resource = ArrayUtils::iteratorToArray($resource);
+            } elseif (!is_array($resource)) {
+                throw new Exception\InvalidArgumentException(
+                    'Resource must be an instance of an array or Traversable'
+                );
+            }
+
+            $resource = array_merge($defaults, $resource);
+            // normalize and validate params
+            $this->normalizePersistentId($resource['persistent_id']);
+            $this->normalizeLibOptions($resource['lib_options']);
+
+            // #6495 note: order is important here, as `normalizeServer` applies destructive
+            // transformations on $resource['server']
+            $resource['password'] = $this->extractPassword($resource, $resource['server']);
+
+            $this->normalizeServer($resource['server']);
+        } else {
+            //there are two ways of determining if redis is already initialized
+            //with connect function:
+            //1) pinging server
+            //2) checking undocumented property socket which is available only
+            //after successful connect
+            $resource = array_merge(
+                $defaults,
+                [
+                    'resource' => $resource,
+                    'initialized' => isset($resource->socket),
+                ]
+            );
+        }
+        $this->resources[$id] = $resource;
+        return $this;
+    }
+
+    /**
+     * Remove a resource
+     *
+     * @param string $id
+     * @return RedisResourceManager Fluent interface
+     */
+    public function removeResource($id)
+    {
+        unset($this->resources[$id]);
+        return $this;
+    }
+
+    /**
+     * Set the persistent id
+     *
+     * @param string $id
+     * @param string $persistentId
+     * @return RedisResourceManager Fluent interface
+     * @throws Exception\RuntimeException
+     */
+    public function setPersistentId($id, $persistentId)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'persistent_id' => $persistentId
+            ]);
+        }
+
+        $resource = & $this->resources[$id];
+        if ($resource instanceof RedisResource) {
+            throw new Exception\RuntimeException(
+                "Can't change persistent id of resource {$id} after instanziation"
+            );
+        }
+
+        $this->normalizePersistentId($persistentId);
+        $resource['persistent_id'] = $persistentId;
+
+        return $this;
+    }
+
+    /**
+     * Get the persistent id
+     *
+     * @param string $id
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    public function getPersistentId($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+
+        if ($resource instanceof RedisResource) {
+            throw new Exception\RuntimeException(
+                "Can't get persistent id of an instantiated redis resource"
+            );
+        }
+
+        return $resource['persistent_id'];
+    }
+
+    /**
+     * Normalize the persistent id
+     *
+     * @param string $persistentId
+     */
+    protected function normalizePersistentId(& $persistentId)
+    {
+        $persistentId = (string) $persistentId;
+    }
+
+    /**
+     * Set Redis options
+     *
+     * @param string $id
+     * @param array  $libOptions
+     * @return RedisResourceManager Fluent interface
+     */
+    public function setLibOptions($id, array $libOptions)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'lib_options' => $libOptions
+            ]);
+        }
+
+        $this->normalizeLibOptions($libOptions);
+        $resource = & $this->resources[$id];
+
+        $resource['lib_options'] = $libOptions;
+
+        if ($resource['resource'] instanceof RedisResource) {
+            $redis = & $resource['resource'];
+            if (method_exists($redis, 'setOptions')) {
+                $redis->setOptions($libOptions);
+            } else {
+                foreach ($libOptions as $key => $value) {
+                    $redis->setOption($key, $value);
+                }
+            }
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get Redis options
+     *
+     * @param string $id
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function getLibOptions($id)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $resource = & $this->resources[$id];
+
+        if ($resource instanceof RedisResource) {
+            $libOptions = [];
+            $reflection = new ReflectionClass('Redis');
+            $constants  = $reflection->getConstants();
+            foreach ($constants as $constName => $constValue) {
+                if (substr($constName, 0, 4) == 'OPT_') {
+                    $libOptions[$constValue] = $resource->getOption($constValue);
+                }
+            }
+            return $libOptions;
+        }
+        return $resource['lib_options'];
+    }
+
+    /**
+     * Set one Redis option
+     *
+     * @param string     $id
+     * @param string|int $key
+     * @param mixed      $value
+     * @return RedisResourceManager Fluent interface
+     */
+    public function setLibOption($id, $key, $value)
+    {
+        return $this->setLibOptions($id, [$key => $value]);
+    }
+
+    /**
+     * Get one Redis option
+     *
+     * @param string     $id
+     * @param string|int $key
+     * @return mixed
+     * @throws Exception\RuntimeException
+     */
+    public function getLibOption($id, $key)
+    {
+        if (!$this->hasResource($id)) {
+            throw new Exception\RuntimeException("No resource with id '{$id}'");
+        }
+
+        $this->normalizeLibOptionKey($key);
+        $resource   = & $this->resources[$id];
+
+        if ($resource instanceof RedisResource) {
+            return $resource->getOption($key);
+        }
+
+        return isset($resource['lib_options'][$key]) ? $resource['lib_options'][$key] : null;
+    }
+
+    /**
+     * Normalize Redis options
+     *
+     * @param array|Traversable $libOptions
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeLibOptions(& $libOptions)
+    {
+        if (!is_array($libOptions) && !($libOptions instanceof Traversable)) {
+            throw new Exception\InvalidArgumentException(
+                "Lib-Options must be an array or an instance of Traversable"
+            );
+        }
+
+        $result = [];
+        foreach ($libOptions as $key => $value) {
+            $this->normalizeLibOptionKey($key);
+            $result[$key] = $value;
+        }
+
+        $libOptions = $result;
+    }
+
+    /**
+     * Convert option name into it's constant value
+     *
+     * @param string|int $key
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeLibOptionKey(& $key)
+    {
+        // convert option name into it's constant value
+        if (is_string($key)) {
+            $const = 'Redis::OPT_' . str_replace([' ', '-'], '_', strtoupper($key));
+            if (!defined($const)) {
+                throw new Exception\InvalidArgumentException("Unknown redis option '{$key}' ({$const})");
+            }
+            $key = constant($const);
+        } else {
+            $key = (int) $key;
+        }
+    }
+
+    /**
+     * Set server
+     *
+     * Server can be described as follows:
+     * - URI:   /path/to/sock.sock
+     * - Assoc: array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]])
+     * - List:  array(<host>[, <port>, [, <timeout>]])
+     *
+     * @param string       $id
+     * @param string|array $server
+     * @return RedisResourceManager
+     */
+    public function setServer($id, $server)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'server' => $server
+            ]);
+        }
+
+        $this->normalizeServer($server);
+
+        $resource             = & $this->resources[$id];
+        $resource['password'] = $this->extractPassword($resource, $server);
+
+        if ($resource['resource'] instanceof RedisResource) {
+            $resourceParams = ['server' => $server];
+
+            if (! empty($resource['password'])) {
+                $resourceParams['password'] = $resource['password'];
+            }
+
+            $this->setResource($id, $resourceParams);
+        } else {
+            $resource['server'] = $server;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Set redis password
+     *
+     * @param string $id
+     * @param string $password
+     * @return RedisResource
+     */
+    public function setPassword($id, $password)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'password' => $password,
+            ]);
+        }
+
+        $resource = & $this->resources[$id];
+        $resource['password']    = $password;
+        $resource['initialized'] = false;
+        return $this;
+    }
+
+    /**
+     * Set redis database number
+     *
+     * @param string $id
+     * @param int $database
+     * @return RedisResourceManager
+     */
+    public function setDatabase($id, $database)
+    {
+        if (!$this->hasResource($id)) {
+            return $this->setResource($id, [
+                'database' => (int) $database,
+            ]);
+        }
+
+        $resource = & $this->resources[$id];
+        $resource['database']    = $database;
+        $resource['initialized'] = false;
+        return $this;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Session.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Session.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/Session.php	(revision 5534)
@@ -0,0 +1,546 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Session\Container as SessionContainer;
+
+class Session extends AbstractAdapter implements
+    ClearByPrefixInterface,
+    FlushableInterface,
+    IterableInterface
+{
+    /**
+     * Set options.
+     *
+     * @param  array|\Traversable|SessionOptions $options
+     * @return Memory
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof SessionOptions) {
+            $options = new SessionOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return SessionOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new SessionOptions());
+        }
+        return $this->options;
+    }
+
+    /**
+     * Get the session container
+     *
+     * @return SessionContainer
+     */
+    protected function getSessionContainer()
+    {
+        $sessionContainer = $this->getOptions()->getSessionContainer();
+        if (!$sessionContainer) {
+            throw new Exception\RuntimeException("No session container configured");
+        }
+        return $sessionContainer;
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return KeyListIterator
+     */
+    public function getIterator()
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if ($cntr->offsetExists($ns)) {
+            $keys = array_keys($cntr->offsetGet($ns));
+        } else {
+            $keys = [];
+        }
+
+        return new KeyListIterator($this, $keys);
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole session container
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        $this->getSessionContainer()->exchangeArray([]);
+        return true;
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            return true;
+        }
+
+        $data    = $cntr->offsetGet($ns);
+        $prefixL = strlen($prefix);
+        foreach ($data as $key => & $item) {
+            if (substr($key, 0, $prefixL) === $prefix) {
+                unset($data[$key]);
+            }
+        }
+        $cntr->offsetSet($ns, $data);
+
+        return true;
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $cntr    = $this->getSessionContainer();
+        $ns      = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            $success = false;
+            return;
+        }
+
+        $data    = $cntr->offsetGet($ns);
+        $success = array_key_exists($normalizedKey, $data);
+        if (!$success) {
+            return;
+        }
+
+        $casToken = $value = $data[$normalizedKey];
+        return $value;
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            return [];
+        }
+
+        $data   = $cntr->offsetGet($ns);
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if (array_key_exists($normalizedKey, $data)) {
+                $result[$normalizedKey] = $data[$normalizedKey];
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            return false;
+        }
+
+        $data = $cntr->offsetGet($ns);
+        return array_key_exists($normalizedKey, $data);
+    }
+
+    /**
+     * Internal method to test multiple items.
+     *
+     * @param array $normalizedKeys
+     * @return array Array of found keys
+     */
+    protected function internalHasItems(array & $normalizedKeys)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            return [];
+        }
+
+        $data   = $cntr->offsetGet($ns);
+        $result = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            if (array_key_exists($normalizedKey, $data)) {
+                $result[] = $normalizedKey;
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     *
+     * @triggers getMetadata.pre(PreEvent)
+     * @triggers getMetadata.post(PostEvent)
+     * @triggers getMetadata.exception(ExceptionEvent)
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        return $this->internalHasItem($normalizedKey) ? [] : false;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+        $data = $cntr->offsetExists($ns) ? $cntr->offsetGet($ns) : [];
+        $data[$normalizedKey] = $value;
+        $cntr->offsetSet($ns, $data);
+        return true;
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if ($cntr->offsetExists($ns)) {
+            $data = array_merge($cntr->offsetGet($ns), $normalizedKeyValuePairs);
+        } else {
+            $data = $normalizedKeyValuePairs;
+        }
+        $cntr->offsetSet($ns, $data);
+
+        return [];
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if ($cntr->offsetExists($ns)) {
+            $data = $cntr->offsetGet($ns);
+
+            if (array_key_exists($normalizedKey, $data)) {
+                return false;
+            }
+
+            $data[$normalizedKey] = $value;
+        } else {
+            $data = [$normalizedKey => $value];
+        }
+
+        $cntr->offsetSet($ns, $data);
+        return true;
+    }
+
+    /**
+     * Internal method to add multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItems(array & $normalizedKeyValuePairs)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        $result = [];
+        if ($cntr->offsetExists($ns)) {
+            $data = $cntr->offsetGet($ns);
+
+            foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+                if (array_key_exists($normalizedKey, $data)) {
+                    $result[] = $normalizedKey;
+                } else {
+                    $data[$normalizedKey] = $value;
+                }
+            }
+        } else {
+            $data = $normalizedKeyValuePairs;
+        }
+
+        $cntr->offsetSet($ns, $data);
+        return $result;
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            return false;
+        }
+
+        $data = $cntr->offsetGet($ns);
+        if (!array_key_exists($normalizedKey, $data)) {
+            return false;
+        }
+        $data[$normalizedKey] = $value;
+        $cntr->offsetSet($ns, $data);
+
+        return true;
+    }
+
+    /**
+     * Internal method to replace multiple existing items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItems(array & $normalizedKeyValuePairs)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+        if (!$cntr->offsetExists($ns)) {
+            return array_keys($normalizedKeyValuePairs);
+        }
+
+        $data   = $cntr->offsetGet($ns);
+        $result = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            if (!array_key_exists($normalizedKey, $data)) {
+                $result[] = $normalizedKey;
+            } else {
+                $data[$normalizedKey] = $value;
+            }
+        }
+        $cntr->offsetSet($ns, $data);
+
+        return $result;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if (!$cntr->offsetExists($ns)) {
+            return false;
+        }
+
+        $data = $cntr->offsetGet($ns);
+        if (!array_key_exists($normalizedKey, $data)) {
+            return false;
+        }
+
+        unset($data[$normalizedKey]);
+
+        if (!$data) {
+            $cntr->offsetUnset($ns);
+        } else {
+            $cntr->offsetSet($ns, $data);
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if ($cntr->offsetExists($ns)) {
+            $data = $cntr->offsetGet($ns);
+        } else {
+            $data = [];
+        }
+
+        if (array_key_exists($normalizedKey, $data)) {
+            $data[$normalizedKey]+= $value;
+            $newValue = $data[$normalizedKey];
+        } else {
+            // initial value
+            $newValue             = $value;
+            $data[$normalizedKey] = $newValue;
+        }
+
+        $cntr->offsetSet($ns, $data);
+        return $newValue;
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $cntr = $this->getSessionContainer();
+        $ns   = $this->getOptions()->getNamespace();
+
+        if ($cntr->offsetExists($ns)) {
+            $data = $cntr->offsetGet($ns);
+        } else {
+            $data = [];
+        }
+
+        if (array_key_exists($normalizedKey, $data)) {
+            $data[$normalizedKey]-= $value;
+            $newValue = $data[$normalizedKey];
+        } else {
+            // initial value
+            $newValue             = -$value;
+            $data[$normalizedKey] = $newValue;
+        }
+
+        $cntr->offsetSet($ns, $data);
+        return $newValue;
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $this->capabilityMarker = new stdClass();
+            $this->capabilities = new Capabilities(
+                $this,
+                $this->capabilityMarker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => true,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => 'array',
+                        'object'   => 'object',
+                        'resource' => false,
+                    ],
+                    'supportedMetadata'  => [],
+                    'minTtl'             => 0,
+                    'maxKeyLength'       => 0,
+                    'namespaceIsPrefix'  => false,
+                    'namespaceSeparator' => '',
+                ]
+            );
+        }
+
+        return $this->capabilities;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/SessionOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/SessionOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/SessionOptions.php	(revision 5534)
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Session\Container as SessionContainer;
+
+/**
+ * These are options specific to the APC adapter
+ */
+class SessionOptions extends AdapterOptions
+{
+    /**
+     * The session container
+     *
+     * @var null|SessionContainer
+     */
+    protected $sessionContainer = null;
+
+    /**
+     * Set the session container
+     *
+     * @param  null|SessionContainer $sessionContainer
+     * @return SessionOptions
+     */
+    public function setSessionContainer(SessionContainer $sessionContainer = null)
+    {
+        if ($this->sessionContainer != $sessionContainer) {
+            $this->triggerOptionEvent('session_container', $sessionContainer);
+            $this->sessionContainer = $sessionContainer;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get the session container
+     *
+     * @return null|SessionContainer
+     */
+    public function getSessionContainer()
+    {
+        return $this->sessionContainer;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/WinCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/WinCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/WinCache.php	(revision 5534)
@@ -0,0 +1,533 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class WinCache extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    FlushableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Constructor
+     *
+     * @param  array|Traversable|WinCacheOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        if (!extension_loaded('wincache')) {
+            throw new Exception\ExtensionNotLoadedException("WinCache extension is not loaded");
+        }
+
+        $enabled = ini_get('wincache.ucenabled');
+        if (PHP_SAPI == 'cli') {
+            $enabled = $enabled && (bool) ini_get('wincache.enablecli');
+        }
+
+        if (!$enabled) {
+            throw new Exception\ExtensionNotLoadedException(
+                "WinCache is disabled - see 'wincache.ucenabled' and 'wincache.enablecli'"
+            );
+        }
+
+        parent::__construct($options);
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|WinCacheOptions $options
+     * @return WinCache
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof WinCacheOptions) {
+            $options = new WinCacheOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return WinCacheOptions
+     * @see setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new WinCacheOptions());
+        }
+        return $this->options;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        $mem = wincache_ucache_meminfo();
+        return $mem['memory_total'];
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $mem = wincache_ucache_meminfo();
+        return $mem['memory_free'];
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        return wincache_ucache_clear();
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $result      = wincache_ucache_get($internalKey, $success);
+
+        if ($success) {
+            $casToken = $result;
+        } else {
+            $result = null;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to get multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Associative array of keys and values
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItems(array & $normalizedKeys)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return wincache_ucache_get($normalizedKeys);
+        }
+
+        $prefix       = $namespace . $options->getNamespaceSeparator();
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $fetch = wincache_ucache_get($internalKeys);
+
+        // remove namespace prefix
+        $prefixL = strlen($prefix);
+        $result  = [];
+        foreach ($fetch as $internalKey => & $value) {
+            $result[substr($internalKey, $prefixL)] = & $value;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        return wincache_ucache_exists($prefix . $normalizedKey);
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        $info = wincache_ucache_info(true, $internalKey);
+        if (isset($info['ucache_entries'][1])) {
+            $metadata = $info['ucache_entries'][1];
+            $this->normalizeMetadata($metadata);
+            return $metadata;
+        }
+
+        return false;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+
+        if (!wincache_ucache_set($internalKey, $value, $ttl)) {
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "wincache_ucache_set('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to store multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItems(array & $normalizedKeyValuePairs)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return wincache_ucache_set($normalizedKeyValuePairs, null, $options->getTtl());
+        }
+
+        $prefix                = $namespace . $options->getNamespaceSeparator();
+        $internalKeyValuePairs = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => & $value) {
+            $internalKey = $prefix . $normalizedKey;
+            $internalKeyValuePairs[$internalKey] = & $value;
+        }
+
+        $result = wincache_ucache_set($internalKeyValuePairs, null, $options->getTtl());
+
+        // remove key prefic
+        $prefixL = strlen($prefix);
+        foreach ($result as & $key) {
+            $key = substr($key, $prefixL);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Add an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+
+        if (!wincache_ucache_add($internalKey, $value, $ttl)) {
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "wincache_ucache_add('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to add multiple items.
+     *
+     * @param  array $normalizedKeyValuePairs
+     * @return array Array of not stored keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalAddItems(array & $normalizedKeyValuePairs)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            return wincache_ucache_add($normalizedKeyValuePairs, null, $options->getTtl());
+        }
+
+        $prefix                = $namespace . $options->getNamespaceSeparator();
+        $internalKeyValuePairs = [];
+        foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
+            $internalKey = $prefix . $normalizedKey;
+            $internalKeyValuePairs[$internalKey] = $value;
+        }
+
+        $result = wincache_ucache_add($internalKeyValuePairs, null, $options->getTtl());
+
+        // remove key prefic
+        $prefixL = strlen($prefix);
+        foreach ($result as & $key) {
+            $key = substr($key, $prefixL);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to replace an existing item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalReplaceItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        if (!wincache_ucache_exists($internalKey)) {
+            return false;
+        }
+
+        $ttl = $options->getTtl();
+        if (!wincache_ucache_set($internalKey, $value, $ttl)) {
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "wincache_ucache_set('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        return wincache_ucache_delete($internalKey);
+    }
+
+    /**
+     * Internal method to remove multiple items.
+     *
+     * @param  array $normalizedKeys
+     * @return array Array of not removed keys
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItems(array & $normalizedKeys)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        if ($namespace === '') {
+            $result = wincache_ucache_delete($normalizedKeys);
+            return ($result === false) ? $normalizedKeys : $result;
+        }
+
+        $prefix       = $namespace . $options->getNamespaceSeparator();
+        $internalKeys = [];
+        foreach ($normalizedKeys as $normalizedKey) {
+            $internalKeys[] = $prefix . $normalizedKey;
+        }
+
+        $result = wincache_ucache_delete($internalKeys);
+        if ($result === false) {
+            return $normalizedKeys;
+        } elseif ($result) {
+            // remove key prefix
+            $prefixL = strlen($prefix);
+            foreach ($result as & $key) {
+                $key = substr($key, $prefixL);
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        return wincache_ucache_inc($internalKey, (int) $value);
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        return wincache_ucache_dec($internalKey, (int) $value);
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $marker       = new stdClass();
+            $capabilities = new Capabilities(
+                $this,
+                $marker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => true,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => true,
+                        'object'   => 'object',
+                        'resource' => false,
+                    ],
+                    'supportedMetadata' => [
+                        'internal_key', 'ttl', 'hits', 'size'
+                    ],
+                    'minTtl'             => 1,
+                    'maxTtl'             => 0,
+                    'staticTtl'          => true,
+                    'ttlPrecision'       => 1,
+                    'useRequestTime'     => false,
+                    'expiredRead'        => false,
+                    'namespaceIsPrefix'  => true,
+                    'namespaceSeparator' => $this->getOptions()->getNamespaceSeparator(),
+                ]
+            );
+
+            // update namespace separator on change option
+            $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) {
+                $params = $event->getParams();
+
+                if (isset($params['namespace_separator'])) {
+                    $capabilities->setNamespaceSeparator($marker, $params['namespace_separator']);
+                }
+            });
+
+            $this->capabilities     = $capabilities;
+            $this->capabilityMarker = $marker;
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Normalize metadata to work with WinCache
+     *
+     * @param  array $metadata
+     * @return void
+     */
+    protected function normalizeMetadata(array & $metadata)
+    {
+        $metadata['internal_key'] = $metadata['key_name'];
+        $metadata['hits']         = $metadata['hitcount'];
+        $metadata['ttl']          = $metadata['ttl_seconds'];
+        $metadata['size']         = $metadata['value_size'];
+
+        unset(
+            $metadata['key_name'],
+            $metadata['hitcount'],
+            $metadata['ttl_seconds'],
+            $metadata['value_size']
+        );
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/WinCacheOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/WinCacheOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/WinCacheOptions.php	(revision 5534)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+/**
+ * These are options specific to the APC adapter
+ */
+class WinCacheOptions extends AdapterOptions
+{
+    /**
+     * Namespace separator
+     *
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return WinCacheOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+        $this->namespaceSeparator = $namespaceSeparator;
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/XCache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/XCache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/XCache.php	(revision 5534)
@@ -0,0 +1,524 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use stdClass;
+use Traversable;
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\ClearByPrefixInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\IterableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class XCache extends AbstractAdapter implements
+    AvailableSpaceCapableInterface,
+    ClearByNamespaceInterface,
+    ClearByPrefixInterface,
+    FlushableInterface,
+    IterableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Backup HTTP authentication properties of $_SERVER array
+     *
+     * @var array
+     */
+    protected $backupAuth = [];
+
+    /**
+     * Total space in bytes
+     *
+     * @var int|float
+     */
+    protected $totalSpace;
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|Traversable|XCacheOptions $options
+     * @throws Exception\ExceptionInterface
+     */
+    public function __construct($options = null)
+    {
+        if (!extension_loaded('xcache')) {
+            throw new Exception\ExtensionNotLoadedException('Missing ext/xcache');
+        }
+
+        if (PHP_SAPI == 'cli') {
+            throw new Exception\ExtensionNotLoadedException(
+                "ext/xcache isn't available on SAPI 'cli'"
+            );
+        }
+
+        if (ini_get('xcache.var_size') <= 0) {
+            throw new Exception\ExtensionNotLoadedException(
+                "ext/xcache is disabled - see 'xcache.var_size'"
+            );
+        }
+
+        parent::__construct($options);
+    }
+
+    /* options */
+
+    /**
+     * Set options.
+     *
+     * @param  array|Traversable|XCacheOptions $options
+     * @return XCache
+     * @see    getOptions()
+     */
+    public function setOptions($options)
+    {
+        if (!$options instanceof XCacheOptions) {
+            $options = new XCacheOptions($options);
+        }
+
+        return parent::setOptions($options);
+    }
+
+    /**
+     * Get options.
+     *
+     * @return XCacheOptions
+     * @see    setOptions()
+     */
+    public function getOptions()
+    {
+        if (!$this->options) {
+            $this->setOptions(new XCacheOptions());
+        }
+        return $this->options;
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        if ($this->totalSpace === null) {
+            $this->totalSpace = 0;
+
+            $this->initAdminAuth();
+            $cnt = xcache_count(XC_TYPE_VAR);
+            for ($i=0; $i < $cnt; $i++) {
+                $info = xcache_info(XC_TYPE_VAR, $i);
+                $this->totalSpace+= $info['size'];
+            }
+            $this->resetAdminAuth();
+        }
+
+        return $this->totalSpace;
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $availableSpace = 0;
+
+        $this->initAdminAuth();
+        $cnt = xcache_count(XC_TYPE_VAR);
+        for ($i = 0; $i < $cnt; $i++) {
+            $info = xcache_info(XC_TYPE_VAR, $i);
+            $availableSpace+= $info['avail'];
+        }
+        $this->resetAdminAuth();
+
+        return $availableSpace;
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items by given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        $options = $this->getOptions();
+        $prefix  = $namespace . $options->getNamespaceSeparator();
+
+        xcache_unset_by_prefix($prefix);
+        return true;
+    }
+
+    /* ClearByPrefixInterface */
+
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix)
+    {
+        $prefix = (string) $prefix;
+        if ($prefix === '') {
+            throw new Exception\InvalidArgumentException('No prefix given');
+        }
+
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix;
+
+        xcache_unset_by_prefix($prefix);
+        return true;
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        $this->initAdminAuth();
+        $cnt = xcache_count(XC_TYPE_VAR);
+        for ($i = 0; $i < $cnt; $i++) {
+            xcache_clear_cache(XC_TYPE_VAR, $i);
+        }
+        $this->resetAdminAuth();
+
+        return true;
+    }
+
+    /* IterableInterface */
+
+    /**
+     * Get the storage iterator
+     *
+     * @return KeyListIterator
+     */
+    public function getIterator()
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $keys      = [];
+
+        $this->initAdminAuth();
+
+        if ($namespace === '') {
+            $cnt = xcache_count(XC_TYPE_VAR);
+            for ($i=0; $i < $cnt; $i++) {
+                $list = xcache_list(XC_TYPE_VAR, $i);
+                foreach ($list['cache_list'] as & $item) {
+                    $keys[] = $item['name'];
+                }
+            }
+        } else {
+            $prefix  = $namespace . $options->getNamespaceSeparator();
+            $prefixL = strlen($prefix);
+
+            $cnt = xcache_count(XC_TYPE_VAR);
+            for ($i=0; $i < $cnt; $i++) {
+                $list = xcache_list(XC_TYPE_VAR, $i);
+                foreach ($list['cache_list'] as & $item) {
+                    $keys[] = substr($item['name'], $prefixL);
+                }
+            }
+        }
+
+        $this->resetAdminAuth();
+
+        return new KeyListIterator($this, $keys);
+    }
+
+    /* reading */
+
+    /**
+     * Internal method to get an item.
+     *
+     * @param  string  $normalizedKey
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        $result  = xcache_get($internalKey);
+        $success = ($result !== null);
+
+        if ($success) {
+            $casToken = $result;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Internal method to test if an item exists.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalHasItem(& $normalizedKey)
+    {
+        $options   = $this->getOptions();
+        $namespace = $options->getNamespace();
+        $prefix    = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        return xcache_isset($prefix . $normalizedKey);
+    }
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $normalizedKey
+     * @return array|bool Metadata on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalGetMetadata(& $normalizedKey)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        if (xcache_isset($internalKey)) {
+            $this->initAdminAuth();
+            $cnt = xcache_count(XC_TYPE_VAR);
+            for ($i=0; $i < $cnt; $i++) {
+                $list = xcache_list(XC_TYPE_VAR, $i);
+                foreach ($list['cache_list'] as & $metadata) {
+                    if ($metadata['name'] === $internalKey) {
+                        $this->normalizeMetadata($metadata);
+                        return $metadata;
+                    }
+                }
+            }
+            $this->resetAdminAuth();
+        }
+
+        return false;
+    }
+
+    /* writing */
+
+    /**
+     * Internal method to store an item.
+     *
+     * @param  string $normalizedKey
+     * @param  mixed  $value
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalSetItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($options === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+
+        if (!xcache_set($internalKey, $value, $ttl)) {
+            $type = is_object($value) ? get_class($value) : gettype($value);
+            throw new Exception\RuntimeException(
+                "xcache_set('{$internalKey}', <{$type}>, {$ttl}) failed"
+            );
+        }
+
+        return true;
+    }
+
+    /**
+     * Internal method to remove an item.
+     *
+     * @param  string $normalizedKey
+     * @return bool
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalRemoveItem(& $normalizedKey)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+
+        return xcache_unset($internalKey);
+    }
+
+    /**
+     * Internal method to increment an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalIncrementItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+        $value       = (int) $value;
+
+        return xcache_inc($internalKey, $value, $ttl);
+    }
+
+    /**
+     * Internal method to decrement an item.
+     *
+     * @param  string $normalizedKey
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws Exception\ExceptionInterface
+     */
+    protected function internalDecrementItem(& $normalizedKey, & $value)
+    {
+        $options     = $this->getOptions();
+        $namespace   = $options->getNamespace();
+        $prefix      = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();
+        $internalKey = $prefix . $normalizedKey;
+        $ttl         = $options->getTtl();
+        $value       = (int) $value;
+
+        return xcache_dec($internalKey, $value, $ttl);
+    }
+
+    /* status */
+
+    /**
+     * Internal method to get capabilities of this adapter
+     *
+     * @return Capabilities
+     */
+    protected function internalGetCapabilities()
+    {
+        if ($this->capabilities === null) {
+            $marker       = new stdClass();
+            $capabilities = new Capabilities(
+                $this,
+                $marker,
+                [
+                    'supportedDatatypes' => [
+                        'NULL'     => false,
+                        'boolean'  => true,
+                        'integer'  => true,
+                        'double'   => true,
+                        'string'   => true,
+                        'array'    => true,
+                        'object'   => 'object',
+                        'resource' => false,
+                    ],
+                    'supportedMetadata' => [
+                        'internal_key',
+                        'size', 'refcount', 'hits',
+                        'ctime', 'atime', 'hvalue',
+                    ],
+                    'minTtl'             => 1,
+                    'maxTtl'             => (int)ini_get('xcache.var_maxttl'),
+                    'staticTtl'          => true,
+                    'ttlPrecision'       => 1,
+                    'useRequestTime'     => true,
+                    'expiredRead'        => false,
+                    'maxKeyLength'       => 5182,
+                    'namespaceIsPrefix'  => true,
+                    'namespaceSeparator' => $this->getOptions()->getNamespaceSeparator(),
+                ]
+            );
+
+            // update namespace separator on change option
+            $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) {
+                $params = $event->getParams();
+
+                if (isset($params['namespace_separator'])) {
+                    $capabilities->setNamespaceSeparator($marker, $params['namespace_separator']);
+                }
+            });
+
+            $this->capabilities     = $capabilities;
+            $this->capabilityMarker = $marker;
+        }
+
+        return $this->capabilities;
+    }
+
+    /* internal */
+
+    /**
+     * Init authentication before calling admin functions
+     *
+     * @return void
+     */
+    protected function initAdminAuth()
+    {
+        $options = $this->getOptions();
+
+        if ($options->getAdminAuth()) {
+            $adminUser = $options->getAdminUser();
+            $adminPass = $options->getAdminPass();
+
+            // backup HTTP authentication properties
+            if (isset($_SERVER['PHP_AUTH_USER'])) {
+                $this->backupAuth['PHP_AUTH_USER'] = $_SERVER['PHP_AUTH_USER'];
+            }
+            if (isset($_SERVER['PHP_AUTH_PW'])) {
+                $this->backupAuth['PHP_AUTH_PW'] = $_SERVER['PHP_AUTH_PW'];
+            }
+
+            // set authentication
+            $_SERVER['PHP_AUTH_USER'] = $adminUser;
+            $_SERVER['PHP_AUTH_PW']   = $adminPass;
+        }
+    }
+
+    /**
+     * Reset authentication after calling admin functions
+     *
+     * @return void
+     */
+    protected function resetAdminAuth()
+    {
+        unset($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
+        $_SERVER = $this->backupAuth + $_SERVER;
+        $this->backupAuth = [];
+    }
+
+    /**
+     * Normalize metadata to work with XCache
+     *
+     * @param  array $metadata
+     */
+    protected function normalizeMetadata(array & $metadata)
+    {
+        $metadata['internal_key'] = &$metadata['name'];
+        unset($metadata['name']);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/XCacheOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/XCacheOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/XCacheOptions.php	(revision 5534)
@@ -0,0 +1,146 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+/**
+ * These are options specific to the XCache adapter
+ */
+class XCacheOptions extends AdapterOptions
+{
+    /**
+     * Namespace separator
+     *
+     * @var string
+     */
+    protected $namespaceSeparator = ':';
+
+    /**
+     * Handle admin authentication
+     *
+     * @var bool
+     */
+    protected $adminAuth = false;
+
+    /**
+     * Username to call admin functions
+     *
+     * @var null|string
+     */
+    protected $adminUser;
+
+    /**
+     * Password to call admin functions
+     *
+     * @var null|string
+     */
+    protected $adminPass;
+
+    /**
+     * Set namespace separator
+     *
+     * @param  string $namespaceSeparator
+     * @return XCacheOptions
+     */
+    public function setNamespaceSeparator($namespaceSeparator)
+    {
+        $namespaceSeparator = (string) $namespaceSeparator;
+        $this->triggerOptionEvent('namespace_separator', $namespaceSeparator);
+        $this->namespaceSeparator = $namespaceSeparator;
+        return $this;
+    }
+
+    /**
+     * Get namespace separator
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->namespaceSeparator;
+    }
+
+    /**
+     * Set username to call admin functions
+     *
+     * @param  null|string $adminUser
+     * @return XCacheOptions
+     */
+    public function setAdminUser($adminUser)
+    {
+        $adminUser = ($adminUser === null) ? null : (string) $adminUser;
+        if ($this->adminUser !== $adminUser) {
+            $this->triggerOptionEvent('admin_user', $adminUser);
+            $this->adminUser = $adminUser;
+        }
+        return $this;
+    }
+
+    /**
+     * Get username to call admin functions
+     *
+     * @return string
+     */
+    public function getAdminUser()
+    {
+        return $this->adminUser;
+    }
+
+    /**
+     * Enable/Disable admin authentication handling
+     *
+     * @param  bool $adminAuth
+     * @return XCacheOptions
+     */
+    public function setAdminAuth($adminAuth)
+    {
+        $adminAuth = (bool) $adminAuth;
+        if ($this->adminAuth !== $adminAuth) {
+            $this->triggerOptionEvent('admin_auth', $adminAuth);
+            $this->adminAuth = $adminAuth;
+        }
+        return $this;
+    }
+
+    /**
+     * Get admin authentication enabled
+     *
+     * @return bool
+     */
+    public function getAdminAuth()
+    {
+        return $this->adminAuth;
+    }
+
+    /**
+     * Set password to call admin functions
+     *
+     * @param  null|string $adminPass
+     * @return XCacheOptions
+     */
+    public function setAdminPass($adminPass)
+    {
+        $adminPass = ($adminPass === null) ? null : (string) $adminPass;
+        if ($this->adminPass !== $adminPass) {
+            $this->triggerOptionEvent('admin_pass', $adminPass);
+            $this->adminPass = $adminPass;
+        }
+        return $this;
+    }
+
+    /**
+     * Get password to call admin functions
+     *
+     * @return string
+     */
+    public function getAdminPass()
+    {
+        return $this->adminPass;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ZendServerDisk.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ZendServerDisk.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ZendServerDisk.php	(revision 5534)
@@ -0,0 +1,186 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\AvailableSpaceCapableInterface;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+use Zend\Stdlib\ErrorHandler;
+
+class ZendServerDisk extends AbstractZendServer implements
+    AvailableSpaceCapableInterface,
+    ClearByNamespaceInterface,
+    FlushableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Buffered total space in bytes
+     *
+     * @var null|int|float
+     */
+    protected $totalSpace;
+
+    /**
+     * Constructor
+     *
+     * @param  null|array|\Traversable|AdapterOptions $options
+     * @throws Exception\ExtensionNotLoadedException
+     */
+    public function __construct($options = [])
+    {
+        if (!function_exists('zend_disk_cache_store')) {
+            throw new Exception\ExtensionNotLoadedException("Missing 'zend_disk_cache_*' functions");
+        } elseif (PHP_SAPI == 'cli') {
+            throw new Exception\ExtensionNotLoadedException("Zend server data cache isn't available on cli");
+        }
+
+        parent::__construct($options);
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        return zend_disk_cache_clear();
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items of given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        return zend_disk_cache_clear($namespace);
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @throws Exception\RuntimeException
+     * @return int|float
+     */
+    public function getTotalSpace()
+    {
+        if ($this->totalSpace === null) {
+            $path = ini_get('zend_datacache.disk.save_path');
+
+            ErrorHandler::start();
+            $total = disk_total_space($path);
+            $error = ErrorHandler::stop();
+            if ($total === false) {
+                throw new Exception\RuntimeException("Can't detect total space of '{$path}'", 0, $error);
+            }
+
+            $this->totalSpace = $total;
+        }
+        return $this->totalSpace;
+    }
+
+    /* AvailableSpaceCapableInterface */
+
+    /**
+     * Get available space in bytes
+     *
+     * @throws Exception\RuntimeException
+     * @return int|float
+     */
+    public function getAvailableSpace()
+    {
+        $path = ini_get('zend_datacache.disk.save_path');
+
+        ErrorHandler::start();
+        $avail = disk_free_space($path);
+        $error = ErrorHandler::stop();
+        if ($avail === false) {
+            throw new Exception\RuntimeException("Can't detect free space of '{$path}'", 0, $error);
+        }
+
+        return $avail;
+    }
+
+    /* internal  */
+
+    /**
+     * Store data into Zend Data Disk Cache
+     *
+     * @param  string $internalKey
+     * @param  mixed  $value
+     * @param  int    $ttl
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcStore($internalKey, $value, $ttl)
+    {
+        if (!zend_disk_cache_store($internalKey, $value, $ttl)) {
+            $valueType = gettype($value);
+            throw new Exception\RuntimeException(
+                "zend_disk_cache_store($internalKey, <{$valueType}>, {$ttl}) failed"
+            );
+        }
+    }
+
+    /**
+     * Fetch a single item from Zend Data Disk Cache
+     *
+     * @param  string $internalKey
+     * @return mixed The stored value or NULL if item wasn't found
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcFetch($internalKey)
+    {
+        return zend_disk_cache_fetch((string) $internalKey);
+    }
+
+    /**
+     * Fetch multiple items from Zend Data Disk Cache
+     *
+     * @param  array $internalKeys
+     * @return array All found items
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcFetchMulti(array $internalKeys)
+    {
+        $items = zend_disk_cache_fetch($internalKeys);
+        if ($items === false) {
+            throw new Exception\RuntimeException("zend_disk_cache_fetch(<array>) failed");
+        }
+        return $items;
+    }
+
+    /**
+     * Delete data from Zend Data Disk Cache
+     *
+     * @param  string $internalKey
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcDelete($internalKey)
+    {
+        return zend_disk_cache_delete($internalKey);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ZendServerShm.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ZendServerShm.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Adapter/ZendServerShm.php	(revision 5534)
@@ -0,0 +1,141 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Adapter;
+
+use Zend\Cache\Exception;
+use Zend\Cache\Storage\ClearByNamespaceInterface;
+use Zend\Cache\Storage\FlushableInterface;
+use Zend\Cache\Storage\TotalSpaceCapableInterface;
+
+class ZendServerShm extends AbstractZendServer implements
+    ClearByNamespaceInterface,
+    FlushableInterface,
+    TotalSpaceCapableInterface
+{
+    /**
+     * Constructor
+     *
+     * @param  null|array|\Traversable|AdapterOptions $options
+     * @throws Exception\ExtensionNotLoadedException
+     */
+    public function __construct($options = [])
+    {
+        if (!function_exists('zend_shm_cache_store')) {
+            throw new Exception\ExtensionNotLoadedException("Missing 'zend_shm_cache_*' functions");
+        } elseif (PHP_SAPI == 'cli') {
+            throw new Exception\ExtensionNotLoadedException("Zend server data cache isn't available on cli");
+        }
+
+        parent::__construct($options);
+    }
+
+    /* FlushableInterface */
+
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush()
+    {
+        return zend_shm_cache_clear();
+    }
+
+    /* ClearByNamespaceInterface */
+
+    /**
+     * Remove items of given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace)
+    {
+        $namespace = (string) $namespace;
+        if ($namespace === '') {
+            throw new Exception\InvalidArgumentException('No namespace given');
+        }
+
+        return zend_shm_cache_clear($namespace);
+    }
+
+    /* TotalSpaceCapableInterface */
+
+    /**
+     * Get total space in bytes
+     *
+     * @return int
+     */
+    public function getTotalSpace()
+    {
+        return (int) ini_get('zend_datacache.shm.memory_cache_size') * 1048576;
+    }
+
+    /* internal */
+
+    /**
+     * Store data into Zend Data SHM Cache
+     *
+     * @param  string $internalKey
+     * @param  mixed  $value
+     * @param  int    $ttl
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcStore($internalKey, $value, $ttl)
+    {
+        if (!zend_shm_cache_store($internalKey, $value, $ttl)) {
+            $valueType = gettype($value);
+            throw new Exception\RuntimeException(
+                "zend_shm_cache_store($internalKey, <{$valueType}>, {$ttl}) failed"
+            );
+        }
+    }
+
+    /**
+     * Fetch a single item from Zend Data SHM Cache
+     *
+     * @param  string $internalKey
+     * @return mixed The stored value or NULL if item wasn't found
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcFetch($internalKey)
+    {
+        return zend_shm_cache_fetch((string) $internalKey);
+    }
+
+    /**
+     * Fetch multiple items from Zend Data SHM Cache
+     *
+     * @param  array $internalKeys
+     * @return array All found items
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcFetchMulti(array $internalKeys)
+    {
+        $items = zend_shm_cache_fetch($internalKeys);
+        if ($items === false) {
+            throw new Exception\RuntimeException("zend_shm_cache_fetch(<array>) failed");
+        }
+        return $items;
+    }
+
+    /**
+     * Delete data from Zend Data SHM Cache
+     *
+     * @param  string $internalKey
+     * @return bool
+     * @throws Exception\RuntimeException
+     */
+    protected function zdcDelete($internalKey)
+    {
+        return zend_shm_cache_delete($internalKey);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/AdapterPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/AdapterPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/AdapterPluginManager.php	(revision 5534)
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use Zend\Cache\Exception;
+use Zend\ServiceManager\AbstractPluginManager;
+
+/**
+ * Plugin manager implementation for cache storage adapters
+ *
+ * Enforces that adapters retrieved are instances of
+ * StorageInterface. Additionally, it registers a number of default
+ * adapters available.
+ */
+class AdapterPluginManager extends AbstractPluginManager
+{
+    /**
+     * Default set of adapters
+     *
+     * @var array
+     */
+    protected $invokableClasses = [
+        'apc'            => 'Zend\Cache\Storage\Adapter\Apc',
+        'blackhole'      => 'Zend\Cache\Storage\Adapter\BlackHole',
+        'dba'            => 'Zend\Cache\Storage\Adapter\Dba',
+        'filesystem'     => 'Zend\Cache\Storage\Adapter\Filesystem',
+        'memcache'       => 'Zend\Cache\Storage\Adapter\Memcache',
+        'memcached'      => 'Zend\Cache\Storage\Adapter\Memcached',
+        'memory'         => 'Zend\Cache\Storage\Adapter\Memory',
+        'mongodb'        => 'Zend\Cache\Storage\Adapter\MongoDb',
+        'redis'          => 'Zend\Cache\Storage\Adapter\Redis',
+        'session'        => 'Zend\Cache\Storage\Adapter\Session',
+        'xcache'         => 'Zend\Cache\Storage\Adapter\XCache',
+        'wincache'       => 'Zend\Cache\Storage\Adapter\WinCache',
+        'zendserverdisk' => 'Zend\Cache\Storage\Adapter\ZendServerDisk',
+        'zendservershm'  => 'Zend\Cache\Storage\Adapter\ZendServerShm',
+    ];
+
+    /**
+     * Do not share by default
+     *
+     * @var array
+     */
+    protected $shareByDefault = false;
+
+    /**
+     * Validate the plugin
+     *
+     * Checks that the adapter loaded is an instance of StorageInterface.
+     *
+     * @param  mixed $plugin
+     * @return void
+     * @throws Exception\RuntimeException if invalid
+     */
+    public function validatePlugin($plugin)
+    {
+        if ($plugin instanceof StorageInterface) {
+            // we're okay
+            return;
+        }
+
+        throw new Exception\RuntimeException(sprintf(
+            'Plugin of type %s is invalid; must implement %s\StorageInterface',
+            (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
+            __NAMESPACE__
+        ));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/AvailableSpaceCapableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/AvailableSpaceCapableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/AvailableSpaceCapableInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface AvailableSpaceCapableInterface
+{
+    /**
+     * Get available space in bytes
+     *
+     * @return int|float
+     */
+    public function getAvailableSpace();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Capabilities.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Capabilities.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Capabilities.php	(revision 5534)
@@ -0,0 +1,541 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use ArrayObject;
+use stdClass;
+use Zend\Cache\Exception;
+use Zend\EventManager\EventsCapableInterface;
+
+class Capabilities
+{
+    /**
+     * The storage instance
+     *
+     * @var StorageInterface
+     */
+    protected $storage;
+
+    /**
+     * A marker to set/change capabilities
+     *
+     * @var stdClass
+     */
+    protected $marker;
+
+    /**
+     * Base capabilities
+     *
+     * @var null|Capabilities
+     */
+    protected $baseCapabilities;
+
+    /**
+     * Expire read
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|bool
+     */
+    protected $expiredRead;
+
+    /**
+     * Max. key length
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|int
+     */
+    protected $maxKeyLength;
+
+    /**
+     * Min. TTL (0 means items never expire)
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|int
+     */
+    protected $minTtl;
+
+    /**
+     * Max. TTL (0 means infinite)
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|int
+     */
+    protected $maxTtl;
+
+    /**
+     * Namespace is prefix
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|bool
+     */
+    protected $namespaceIsPrefix;
+
+    /**
+     * Namespace separator
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|string
+     */
+    protected $namespaceSeparator;
+
+    /**
+     * Static ttl
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|bool
+     */
+    protected $staticTtl;
+
+    /**
+     * Supported datatypes
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|array
+     */
+    protected $supportedDatatypes;
+
+    /**
+     * Supported metdata
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|array
+     */
+    protected $supportedMetadata;
+
+    /**
+     * TTL precision
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|int
+     */
+    protected $ttlPrecision;
+
+    /**
+     * Use request time
+     *
+     * If it's NULL the capability isn't set and the getter
+     * returns the base capability or the default value.
+     *
+     * @var null|bool
+     */
+    protected $useRequestTime;
+
+    /**
+     * Constructor
+     *
+     * @param StorageInterface  $storage
+     * @param stdClass          $marker
+     * @param array             $capabilities
+     * @param null|Capabilities $baseCapabilities
+     */
+    public function __construct(
+        StorageInterface $storage,
+        stdClass $marker,
+        array $capabilities = [],
+        Capabilities $baseCapabilities = null
+    ) {
+        $this->storage = $storage;
+        $this->marker  = $marker;
+        $this->baseCapabilities = $baseCapabilities;
+
+        foreach ($capabilities as $name => $value) {
+            $this->setCapability($marker, $name, $value);
+        }
+    }
+
+    /**
+     * Get the storage adapter
+     *
+     * @return StorageInterface
+     */
+    public function getAdapter()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Get supported datatypes
+     *
+     * @return array
+     */
+    public function getSupportedDatatypes()
+    {
+        return $this->getCapability('supportedDatatypes', [
+            'NULL'     => false,
+            'boolean'  => false,
+            'integer'  => false,
+            'double'   => false,
+            'string'   => true,
+            'array'    => false,
+            'object'   => false,
+            'resource' => false,
+        ]);
+    }
+
+    /**
+     * Set supported datatypes
+     *
+     * @param  stdClass $marker
+     * @param  array $datatypes
+     * @throws Exception\InvalidArgumentException
+     * @return Capabilities Fluent interface
+     */
+    public function setSupportedDatatypes(stdClass $marker, array $datatypes)
+    {
+        $allTypes = [
+            'array',
+            'boolean',
+            'double',
+            'integer',
+            'NULL',
+            'object',
+            'resource',
+            'string',
+        ];
+
+        // check/normalize datatype values
+        foreach ($datatypes as $type => &$toType) {
+            if (!in_array($type, $allTypes)) {
+                throw new Exception\InvalidArgumentException("Unknown datatype '{$type}'");
+            }
+
+            if (is_string($toType)) {
+                $toType = strtolower($toType);
+                if (!in_array($toType, $allTypes)) {
+                    throw new Exception\InvalidArgumentException("Unknown datatype '{$toType}'");
+                }
+            } else {
+                $toType = (bool) $toType;
+            }
+        }
+
+        // add missing datatypes as not supported
+        $missingTypes = array_diff($allTypes, array_keys($datatypes));
+        foreach ($missingTypes as $type) {
+            $datatypes[$type] = false;
+        }
+
+        return $this->setCapability($marker, 'supportedDatatypes', $datatypes);
+    }
+
+    /**
+     * Get supported metadata
+     *
+     * @return array
+     */
+    public function getSupportedMetadata()
+    {
+        return $this->getCapability('supportedMetadata', []);
+    }
+
+    /**
+     * Set supported metadata
+     *
+     * @param  stdClass $marker
+     * @param  string[] $metadata
+     * @throws Exception\InvalidArgumentException
+     * @return Capabilities Fluent interface
+     */
+    public function setSupportedMetadata(stdClass $marker, array $metadata)
+    {
+        foreach ($metadata as $name) {
+            if (!is_string($name)) {
+                throw new Exception\InvalidArgumentException('$metadata must be an array of strings');
+            }
+        }
+        return $this->setCapability($marker, 'supportedMetadata', $metadata);
+    }
+
+    /**
+     * Get minimum supported time-to-live
+     *
+     * @return int 0 means items never expire
+     */
+    public function getMinTtl()
+    {
+        return $this->getCapability('minTtl', 0);
+    }
+
+    /**
+     * Set minimum supported time-to-live
+     *
+     * @param  stdClass $marker
+     * @param  int $minTtl
+     * @throws Exception\InvalidArgumentException
+     * @return Capabilities Fluent interface
+     */
+    public function setMinTtl(stdClass $marker, $minTtl)
+    {
+        $minTtl = (int) $minTtl;
+        if ($minTtl < 0) {
+            throw new Exception\InvalidArgumentException('$minTtl must be greater or equal 0');
+        }
+        return $this->setCapability($marker, 'minTtl', $minTtl);
+    }
+
+    /**
+     * Get maximum supported time-to-live
+     *
+     * @return int 0 means infinite
+     */
+    public function getMaxTtl()
+    {
+        return $this->getCapability('maxTtl', 0);
+    }
+
+    /**
+     * Set maximum supported time-to-live
+     *
+     * @param  stdClass $marker
+     * @param  int $maxTtl
+     * @throws Exception\InvalidArgumentException
+     * @return Capabilities Fluent interface
+     */
+    public function setMaxTtl(stdClass $marker, $maxTtl)
+    {
+        $maxTtl = (int) $maxTtl;
+        if ($maxTtl < 0) {
+            throw new Exception\InvalidArgumentException('$maxTtl must be greater or equal 0');
+        }
+        return $this->setCapability($marker, 'maxTtl', $maxTtl);
+    }
+
+    /**
+     * Is the time-to-live handled static (on write)
+     * or dynamic (on read)
+     *
+     * @return bool
+     */
+    public function getStaticTtl()
+    {
+        return $this->getCapability('staticTtl', false);
+    }
+
+    /**
+     * Set if the time-to-live handled static (on write) or dynamic (on read)
+     *
+     * @param  stdClass $marker
+     * @param  bool $flag
+     * @return Capabilities Fluent interface
+     */
+    public function setStaticTtl(stdClass $marker, $flag)
+    {
+        return $this->setCapability($marker, 'staticTtl', (bool) $flag);
+    }
+
+    /**
+     * Get time-to-live precision
+     *
+     * @return float
+     */
+    public function getTtlPrecision()
+    {
+        return $this->getCapability('ttlPrecision', 1);
+    }
+
+    /**
+     * Set time-to-live precision
+     *
+     * @param  stdClass $marker
+     * @param  float $ttlPrecision
+     * @throws Exception\InvalidArgumentException
+     * @return Capabilities Fluent interface
+     */
+    public function setTtlPrecision(stdClass $marker, $ttlPrecision)
+    {
+        $ttlPrecision = (float) $ttlPrecision;
+        if ($ttlPrecision <= 0) {
+            throw new Exception\InvalidArgumentException('$ttlPrecision must be greater than 0');
+        }
+        return $this->setCapability($marker, 'ttlPrecision', $ttlPrecision);
+    }
+
+    /**
+     * Get use request time
+     *
+     * @return bool
+     */
+    public function getUseRequestTime()
+    {
+        return $this->getCapability('useRequestTime', false);
+    }
+
+    /**
+     * Set use request time
+     *
+     * @param  stdClass $marker
+     * @param  bool $flag
+     * @return Capabilities Fluent interface
+     */
+    public function setUseRequestTime(stdClass $marker, $flag)
+    {
+        return $this->setCapability($marker, 'useRequestTime', (bool) $flag);
+    }
+
+    /**
+     * Get if expired items are readable
+     *
+     * @return bool
+     */
+    public function getExpiredRead()
+    {
+        return $this->getCapability('expiredRead', false);
+    }
+
+    /**
+     * Set if expired items are readable
+     *
+     * @param  stdClass $marker
+     * @param  bool $flag
+     * @return Capabilities Fluent interface
+     */
+    public function setExpiredRead(stdClass $marker, $flag)
+    {
+        return $this->setCapability($marker, 'expiredRead', (bool) $flag);
+    }
+
+    /**
+     * Get maximum key lenth
+     *
+     * @return int -1 means unknown, 0 means infinite
+     */
+    public function getMaxKeyLength()
+    {
+        return $this->getCapability('maxKeyLength', -1);
+    }
+
+    /**
+     * Set maximum key length
+     *
+     * @param  stdClass $marker
+     * @param  int $maxKeyLength
+     * @throws Exception\InvalidArgumentException
+     * @return Capabilities Fluent interface
+     */
+    public function setMaxKeyLength(stdClass $marker, $maxKeyLength)
+    {
+        $maxKeyLength = (int) $maxKeyLength;
+        if ($maxKeyLength < -1) {
+            throw new Exception\InvalidArgumentException('$maxKeyLength must be greater or equal than -1');
+        }
+        return $this->setCapability($marker, 'maxKeyLength', $maxKeyLength);
+    }
+
+    /**
+     * Get if namespace support is implemented as prefix
+     *
+     * @return bool
+     */
+    public function getNamespaceIsPrefix()
+    {
+        return $this->getCapability('namespaceIsPrefix', true);
+    }
+
+    /**
+     * Set if namespace support is implemented as prefix
+     *
+     * @param  stdClass $marker
+     * @param  bool $flag
+     * @return Capabilities Fluent interface
+     */
+    public function setNamespaceIsPrefix(stdClass $marker, $flag)
+    {
+        return $this->setCapability($marker, 'namespaceIsPrefix', (bool) $flag);
+    }
+
+    /**
+     * Get namespace separator if namespace is implemented as prefix
+     *
+     * @return string
+     */
+    public function getNamespaceSeparator()
+    {
+        return $this->getCapability('namespaceSeparator', '');
+    }
+
+    /**
+     * Set the namespace separator if namespace is implemented as prefix
+     *
+     * @param  stdClass $marker
+     * @param  string $separator
+     * @return Capabilities Fluent interface
+     */
+    public function setNamespaceSeparator(stdClass $marker, $separator)
+    {
+        return $this->setCapability($marker, 'namespaceSeparator', (string) $separator);
+    }
+
+    /**
+     * Get a capability
+     *
+     * @param  string $property
+     * @param  mixed $default
+     * @return mixed
+     */
+    protected function getCapability($property, $default = null)
+    {
+        if ($this->$property !== null) {
+            return $this->$property;
+        } elseif ($this->baseCapabilities) {
+            $getMethod = 'get' . $property;
+            return $this->baseCapabilities->$getMethod();
+        }
+        return $default;
+    }
+
+    /**
+     * Change a capability
+     *
+     * @param  stdClass $marker
+     * @param  string $property
+     * @param  mixed $value
+     * @return Capabilities Fluent interface
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function setCapability(stdClass $marker, $property, $value)
+    {
+        if ($this->marker !== $marker) {
+            throw new Exception\InvalidArgumentException('Invalid marker');
+        }
+
+        if ($this->$property !== $value) {
+            $this->$property = $value;
+
+            // trigger event
+            if ($this->storage instanceof EventsCapableInterface) {
+                $this->storage->getEventManager()->trigger('capability', $this->storage, new ArrayObject([
+                    $property => $value
+                ]));
+            }
+        }
+
+        return $this;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearByNamespaceInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearByNamespaceInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearByNamespaceInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface ClearByNamespaceInterface
+{
+    /**
+     * Remove items of given namespace
+     *
+     * @param string $namespace
+     * @return bool
+     */
+    public function clearByNamespace($namespace);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearByPrefixInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearByPrefixInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearByPrefixInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface ClearByPrefixInterface
+{
+    /**
+     * Remove items matching given prefix
+     *
+     * @param string $prefix
+     * @return bool
+     */
+    public function clearByPrefix($prefix);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearExpiredInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearExpiredInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ClearExpiredInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface ClearExpiredInterface
+{
+    /**
+     * Remove expired items
+     *
+     * @return bool
+     */
+    public function clearExpired();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Event.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Event.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Event.php	(revision 5534)
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use ArrayObject;
+use Zend\EventManager\Event as BaseEvent;
+
+class Event extends BaseEvent
+{
+    /**
+     * Constructor
+     *
+     * Accept a storage adapter and its parameters.
+     *
+     * @param  string           $name Event name
+     * @param  StorageInterface $storage
+     * @param  ArrayObject      $params
+     */
+    public function __construct($name, StorageInterface $storage, ArrayObject $params)
+    {
+        parent::__construct($name, $storage, $params);
+    }
+
+    /**
+     * Set the event target/context
+     *
+     * @param  StorageInterface $target
+     * @return Event
+     * @see    Zend\EventManager\Event::setTarget()
+     */
+    public function setTarget($target)
+    {
+        return $this->setStorage($target);
+    }
+
+    /**
+     * Alias of setTarget
+     *
+     * @param  StorageInterface $storage
+     * @return Event
+     * @see    Zend\EventManager\Event::setTarget()
+     */
+    public function setStorage(StorageInterface $storage)
+    {
+        $this->target = $storage;
+        return $this;
+    }
+
+    /**
+     * Alias of getTarget
+     *
+     * @return StorageInterface
+     */
+    public function getStorage()
+    {
+        return $this->getTarget();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ExceptionEvent.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ExceptionEvent.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/ExceptionEvent.php	(revision 5534)
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use ArrayObject;
+use Exception;
+
+class ExceptionEvent extends PostEvent
+{
+    /**
+     * The exception to be thrown
+     *
+     * @var Exception
+     */
+    protected $exception;
+
+    /**
+     * Throw the exception or use the result
+     *
+     * @var bool
+     */
+    protected $throwException = true;
+
+    /**
+     * Constructor
+     *
+     * Accept a target and its parameters.
+     *
+     * @param  string $name
+     * @param  StorageInterface $storage
+     * @param  ArrayObject $params
+     * @param  mixed $result
+     * @param  Exception $exception
+     */
+    public function __construct($name, StorageInterface $storage, ArrayObject $params, & $result, Exception $exception)
+    {
+        parent::__construct($name, $storage, $params, $result);
+        $this->setException($exception);
+    }
+
+    /**
+     * Set the exception to be thrown
+     *
+     * @param  Exception $exception
+     * @return ExceptionEvent
+     */
+    public function setException(Exception $exception)
+    {
+        $this->exception = $exception;
+        return $this;
+    }
+
+    /**
+     * Get the exception to be thrown
+     *
+     * @return Exception
+     */
+    public function getException()
+    {
+        return $this->exception;
+    }
+
+    /**
+     * Throw the exception or use the result
+     *
+     * @param  bool $flag
+     * @return ExceptionEvent
+     */
+    public function setThrowException($flag)
+    {
+        $this->throwException = (bool) $flag;
+        return $this;
+    }
+
+    /**
+     * Throw the exception or use the result
+     *
+     * @return bool
+     */
+    public function getThrowException()
+    {
+        return $this->throwException;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/FlushableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/FlushableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/FlushableInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface FlushableInterface
+{
+    /**
+     * Flush the whole storage
+     *
+     * @return bool
+     */
+    public function flush();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/IterableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/IterableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/IterableInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use IteratorAggregate;
+
+/**
+ *
+ * @method IteratorInterface getIterator() Get the storage iterator
+ */
+interface IterableInterface extends IteratorAggregate
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/IteratorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/IteratorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/IteratorInterface.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use Iterator;
+
+interface IteratorInterface extends Iterator
+{
+    const CURRENT_AS_SELF     = 0;
+    const CURRENT_AS_KEY      = 1;
+    const CURRENT_AS_VALUE    = 2;
+    const CURRENT_AS_METADATA = 3;
+
+    /**
+     * Get storage instance
+     *
+     * @return StorageInterface
+     */
+    public function getStorage();
+
+    /**
+     * Get iterator mode
+     *
+     * @return int Value of IteratorInterface::CURRENT_AS_*
+     */
+    public function getMode();
+
+    /**
+     * Set iterator mode
+     *
+     * @param int $mode Value of IteratorInterface::CURRENT_AS_*
+     * @return IteratorInterface Fluent interface
+     */
+    public function setMode($mode);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/OptimizableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/OptimizableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/OptimizableInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface OptimizableInterface
+{
+    /**
+     * Optimize the storage
+     *
+     * @return bool
+     */
+    public function optimize();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/AbstractPlugin.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/AbstractPlugin.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/AbstractPlugin.php	(revision 5534)
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\EventManager\AbstractListenerAggregate;
+
+abstract class AbstractPlugin extends AbstractListenerAggregate implements PluginInterface
+{
+    /**
+     * @var PluginOptions
+     */
+    protected $options;
+
+    /**
+     * Set pattern options
+     *
+     * @param  PluginOptions $options
+     * @return AbstractPlugin
+     */
+    public function setOptions(PluginOptions $options)
+    {
+        $this->options = $options;
+        return $this;
+    }
+
+    /**
+     * Get all pattern options
+     *
+     * @return PluginOptions
+     */
+    public function getOptions()
+    {
+        if (null === $this->options) {
+            $this->setOptions(new PluginOptions());
+        }
+        return $this->options;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/ClearExpiredByFactor.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/ClearExpiredByFactor.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/ClearExpiredByFactor.php	(revision 5534)
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\Cache\Storage\ClearExpiredInterface;
+use Zend\Cache\Storage\PostEvent;
+use Zend\EventManager\EventManagerInterface;
+
+class ClearExpiredByFactor extends AbstractPlugin
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function attach(EventManagerInterface $events, $priority = 1)
+    {
+        $callback = [$this, 'clearExpiredByFactor'];
+
+        $this->listeners[] = $events->attach('setItem.post', $callback, $priority);
+        $this->listeners[] = $events->attach('setItems.post', $callback, $priority);
+        $this->listeners[] = $events->attach('addItem.post', $callback, $priority);
+        $this->listeners[] = $events->attach('addItems.post', $callback, $priority);
+    }
+
+    /**
+     * Clear expired items by factor after writing new item(s)
+     *
+     * @param  PostEvent $event
+     * @return void
+     */
+    public function clearExpiredByFactor(PostEvent $event)
+    {
+        $storage = $event->getStorage();
+        if (!($storage instanceof ClearExpiredInterface)) {
+            return;
+        }
+
+        $factor = $this->getOptions()->getClearingFactor();
+        if ($factor && mt_rand(1, $factor) == 1) {
+            $storage->clearExpired();
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/ExceptionHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/ExceptionHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/ExceptionHandler.php	(revision 5534)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\Cache\Storage\ExceptionEvent;
+use Zend\EventManager\EventManagerInterface;
+
+class ExceptionHandler extends AbstractPlugin
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function attach(EventManagerInterface $events, $priority = 1)
+    {
+        $callback = [$this, 'onException'];
+
+        // read
+        $this->listeners[] = $events->attach('getItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('getItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('hasItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('hasItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('getMetadata.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('getMetadatas.exception', $callback, $priority);
+
+        // write
+        $this->listeners[] = $events->attach('setItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('setItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('addItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('addItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('replaceItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('replaceItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('touchItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('touchItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('removeItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('removeItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('checkAndSetItem.exception', $callback, $priority);
+
+        // increment / decrement item(s)
+        $this->listeners[] = $events->attach('incrementItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('incrementItems.exception', $callback, $priority);
+
+        $this->listeners[] = $events->attach('decrementItem.exception', $callback, $priority);
+        $this->listeners[] = $events->attach('decrementItems.exception', $callback, $priority);
+
+        // utility
+        $this->listeners[] = $events->attach('clearExpired.exception', $callback, $priority);
+    }
+
+    /**
+     * On exception
+     *
+     * @param  ExceptionEvent $event
+     * @return void
+     */
+    public function onException(ExceptionEvent $event)
+    {
+        $options  = $this->getOptions();
+        $callback = $options->getExceptionCallback();
+        if ($callback) {
+            call_user_func($callback, $event->getException());
+        }
+
+        $event->setThrowException($options->getThrowExceptions());
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/IgnoreUserAbort.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/IgnoreUserAbort.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/IgnoreUserAbort.php	(revision 5534)
@@ -0,0 +1,117 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\Cache\Storage\Event;
+use Zend\EventManager\EventManagerInterface;
+
+class IgnoreUserAbort extends AbstractPlugin
+{
+    /**
+     * The storage who activated ignore_user_abort.
+     *
+     * @var null|\Zend\Cache\Storage\StorageInterface
+     */
+    protected $activatedTarget = null;
+
+    /**
+     * {@inheritDoc}
+     */
+    public function attach(EventManagerInterface $events, $priority = 1)
+    {
+        $cbOnBefore = [$this, 'onBefore'];
+        $cbOnAfter  = [$this, 'onAfter'];
+
+        $this->listeners[] = $events->attach('setItem.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('setItem.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('setItem.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('setItems.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('setItems.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('setItems.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('addItem.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('addItem.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('addItem.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('addItems.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('addItems.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('addItems.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('replaceItem.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('replaceItem.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('replaceItem.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('replaceItems.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('replaceItems.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('replaceItems.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('checkAndSetItem.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('checkAndSetItem.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('checkAndSetItem.exception', $cbOnAfter, $priority);
+
+        // increment / decrement item(s)
+        $this->listeners[] = $events->attach('incrementItem.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('incrementItem.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('incrementItem.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('incrementItems.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('incrementItems.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('incrementItems.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('decrementItem.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('decrementItem.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('decrementItem.exception', $cbOnAfter, $priority);
+
+        $this->listeners[] = $events->attach('decrementItems.pre', $cbOnBefore, $priority);
+        $this->listeners[] = $events->attach('decrementItems.post', $cbOnAfter, $priority);
+        $this->listeners[] = $events->attach('decrementItems.exception', $cbOnAfter, $priority);
+    }
+
+    /**
+     * Activate ignore_user_abort if not already done
+     * and save the target who activated it.
+     *
+     * @param  Event $event
+     * @return void
+     */
+    public function onBefore(Event $event)
+    {
+        if ($this->activatedTarget === null && !ignore_user_abort(true)) {
+            $this->activatedTarget = $event->getStorage();
+        }
+    }
+
+    /**
+     * Reset ignore_user_abort if it's activated and if it's the same target
+     * who activated it.
+     *
+     * If exit_on_abort is enabled and the connection has been aborted
+     * exit the script.
+     *
+     * @param  Event $event
+     * @return void
+     */
+    public function onAfter(Event $event)
+    {
+        if ($this->activatedTarget === $event->getStorage()) {
+            // exit if connection aborted
+            if ($this->getOptions()->getExitOnAbort() && connection_aborted()) {
+                exit;
+            }
+
+            // reset ignore_user_abort
+            ignore_user_abort(false);
+
+            // remove activated target
+            $this->activatedTarget = null;
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/OptimizeByFactor.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/OptimizeByFactor.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/OptimizeByFactor.php	(revision 5534)
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\Cache\Storage\OptimizableInterface;
+use Zend\Cache\Storage\PostEvent;
+use Zend\EventManager\EventManagerInterface;
+
+class OptimizeByFactor extends AbstractPlugin
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function attach(EventManagerInterface $events, $priority = 1)
+    {
+        $callback          = [$this, 'optimizeByFactor'];
+        $this->listeners[] = $events->attach('removeItem.post', $callback, $priority);
+        $this->listeners[] = $events->attach('removeItems.post', $callback, $priority);
+    }
+
+    /**
+     * Optimize by factor on a success _RESULT_
+     *
+     * @param  PostEvent $event
+     * @return void
+     */
+    public function optimizeByFactor(PostEvent $event)
+    {
+        $storage = $event->getStorage();
+        if (!($storage instanceof OptimizableInterface)) {
+            return;
+        }
+
+        $factor = $this->getOptions()->getOptimizingFactor();
+        if ($factor && mt_rand(1, $factor) == 1) {
+            $storage->optimize();
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/PluginInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/PluginInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/PluginInterface.php	(revision 5534)
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\EventManager\ListenerAggregateInterface;
+
+interface PluginInterface extends ListenerAggregateInterface
+{
+    /**
+     * Set options
+     *
+     * @param  PluginOptions $options
+     * @return PluginInterface
+     */
+    public function setOptions(PluginOptions $options);
+
+    /**
+     * Get options
+     *
+     * @return PluginOptions
+     */
+    public function getOptions();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/PluginOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/PluginOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/PluginOptions.php	(revision 5534)
@@ -0,0 +1,300 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use Zend\Cache\Exception;
+use Zend\Serializer\Adapter\AdapterInterface as SerializerAdapter;
+use Zend\Serializer\Serializer as SerializerFactory;
+use Zend\Stdlib\AbstractOptions;
+
+class PluginOptions extends AbstractOptions
+{
+    /**
+     * Used by:
+     * - ClearByFactor
+     * @var int
+     */
+    protected $clearingFactor = 0;
+
+    /**
+     * Used by:
+     * - ExceptionHandler
+     * @var null|callable
+     */
+    protected $exceptionCallback;
+
+    /**
+     * Used by:
+     * - IgnoreUserAbort
+     * @var bool
+     */
+    protected $exitOnAbort = true;
+
+    /**
+     * Used by:
+     * - OptimizeByFactor
+     * @var int
+     */
+    protected $optimizingFactor = 0;
+
+    /**
+     * Used by:
+     * - Serializer
+     * @var string|SerializerAdapter
+     */
+    protected $serializer;
+
+    /**
+     * Used by:
+     * - Serializer
+     * @var array
+     */
+    protected $serializerOptions = [];
+
+    /**
+     * Used by:
+     * - ExceptionHandler
+     * @var bool
+     */
+    protected $throwExceptions = true;
+
+    /**
+     * Set automatic clearing factor
+     *
+     * Used by:
+     * - ClearExpiredByFactor
+     *
+     * @param  int $clearingFactor
+     * @return PluginOptions
+     */
+    public function setClearingFactor($clearingFactor)
+    {
+        $this->clearingFactor = $this->normalizeFactor($clearingFactor);
+        return $this;
+    }
+
+    /**
+     * Get automatic clearing factor
+     *
+     * Used by:
+     * - ClearExpiredByFactor
+     *
+     * @return int
+     */
+    public function getClearingFactor()
+    {
+        return $this->clearingFactor;
+    }
+
+    /**
+     * Set callback to call on intercepted exception
+     *
+     * Used by:
+     * - ExceptionHandler
+     *
+     * @param  null|callable $exceptionCallback
+     * @throws Exception\InvalidArgumentException
+     * @return PluginOptions
+     */
+    public function setExceptionCallback($exceptionCallback)
+    {
+        if ($exceptionCallback !== null && !is_callable($exceptionCallback, true)) {
+            throw new Exception\InvalidArgumentException('Not a valid callback');
+        }
+        $this->exceptionCallback = $exceptionCallback;
+        return $this;
+    }
+
+    /**
+     * Get callback to call on intercepted exception
+     *
+     * Used by:
+     * - ExceptionHandler
+     *
+     * @return null|callable
+     */
+    public function getExceptionCallback()
+    {
+        return $this->exceptionCallback;
+    }
+
+    /**
+     * Exit if connection aborted and ignore_user_abort is disabled.
+     *
+     * @param  bool $exitOnAbort
+     * @return PluginOptions
+     */
+    public function setExitOnAbort($exitOnAbort)
+    {
+        $this->exitOnAbort = (bool) $exitOnAbort;
+        return $this;
+    }
+
+    /**
+     * Exit if connection aborted and ignore_user_abort is disabled.
+     *
+     * @return bool
+     */
+    public function getExitOnAbort()
+    {
+        return $this->exitOnAbort;
+    }
+
+    /**
+     * Set automatic optimizing factor
+     *
+     * Used by:
+     * - OptimizeByFactor
+     *
+     * @param  int $optimizingFactor
+     * @return PluginOptions
+     */
+    public function setOptimizingFactor($optimizingFactor)
+    {
+        $this->optimizingFactor = $this->normalizeFactor($optimizingFactor);
+        return $this;
+    }
+
+    /**
+     * Set automatic optimizing factor
+     *
+     * Used by:
+     * - OptimizeByFactor
+     *
+     * @return int
+     */
+    public function getOptimizingFactor()
+    {
+        return $this->optimizingFactor;
+    }
+
+    /**
+     * Set serializer
+     *
+     * Used by:
+     * - Serializer
+     *
+     * @param  string|SerializerAdapter $serializer
+     * @throws Exception\InvalidArgumentException
+     * @return self
+     */
+    public function setSerializer($serializer)
+    {
+        if (!is_string($serializer) && !$serializer instanceof SerializerAdapter) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects either a string serializer name or Zend\Serializer\Adapter\AdapterInterface instance; '
+                . 'received "%s"',
+                __METHOD__,
+                (is_object($serializer) ? get_class($serializer) : gettype($serializer))
+            ));
+        }
+        $this->serializer = $serializer;
+        return $this;
+    }
+
+    /**
+     * Get serializer
+     *
+     * Used by:
+     * - Serializer
+     *
+     * @return SerializerAdapter
+     */
+    public function getSerializer()
+    {
+        if (!$this->serializer instanceof SerializerAdapter) {
+            // use default serializer
+            if (!$this->serializer) {
+                $this->setSerializer(SerializerFactory::getDefaultAdapter());
+            // instantiate by class name + serializer_options
+            } else {
+                $options = $this->getSerializerOptions();
+                $this->setSerializer(SerializerFactory::factory($this->serializer, $options));
+            }
+        }
+        return $this->serializer;
+    }
+
+    /**
+     * Set configuration options for instantiating a serializer adapter
+     *
+     * Used by:
+     * - Serializer
+     *
+     * @param  mixed $serializerOptions
+     * @return PluginOptions
+     */
+    public function setSerializerOptions($serializerOptions)
+    {
+        $this->serializerOptions = $serializerOptions;
+        return $this;
+    }
+
+    /**
+     * Get configuration options for instantiating a serializer adapter
+     *
+     * Used by:
+     * - Serializer
+     *
+     * @return array
+     */
+    public function getSerializerOptions()
+    {
+        return $this->serializerOptions;
+    }
+
+    /**
+     * Set flag indicating we should re-throw exceptions
+     *
+     * Used by:
+     * - ExceptionHandler
+     *
+     * @param  bool $throwExceptions
+     * @return PluginOptions
+     */
+    public function setThrowExceptions($throwExceptions)
+    {
+        $this->throwExceptions = (bool) $throwExceptions;
+        return $this;
+    }
+
+    /**
+     * Should we re-throw exceptions?
+     *
+     * Used by:
+     * - ExceptionHandler
+     *
+     * @return bool
+     */
+    public function getThrowExceptions()
+    {
+        return $this->throwExceptions;
+    }
+
+    /**
+     * Normalize a factor
+     *
+     * Cast to int and ensure we have a value greater than zero.
+     *
+     * @param  int $factor
+     * @return int
+     * @throws Exception\InvalidArgumentException
+     */
+    protected function normalizeFactor($factor)
+    {
+        $factor = (int) $factor;
+        if ($factor < 0) {
+            throw new Exception\InvalidArgumentException(
+                "Invalid factor '{$factor}': must be greater or equal 0"
+            );
+        }
+        return $factor;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/Serializer.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/Serializer.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/Plugin/Serializer.php	(revision 5534)
@@ -0,0 +1,259 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage\Plugin;
+
+use stdClass;
+use Zend\Cache\Storage\Capabilities;
+use Zend\Cache\Storage\Event;
+use Zend\Cache\Storage\PostEvent;
+use Zend\EventManager\EventManagerInterface;
+
+class Serializer extends AbstractPlugin
+{
+    /**
+     * @var array
+     */
+    protected $capabilities = [];
+
+    /**
+     * {@inheritDoc}
+     */
+    public function attach(EventManagerInterface $events, $priority = 1)
+    {
+        // The higher the priority the sooner the plugin will be called on pre events
+        // but the later it will be called on post events.
+        $prePriority  = $priority;
+        $postPriority = -$priority;
+
+        // read
+        $this->listeners[] = $events->attach('getItem.post', [$this, 'onReadItemPost'], $postPriority);
+        $this->listeners[] = $events->attach('getItems.post', [$this, 'onReadItemsPost'], $postPriority);
+
+        // write
+        $this->listeners[] = $events->attach('setItem.pre', [$this, 'onWriteItemPre'], $prePriority);
+        $this->listeners[] = $events->attach('setItems.pre', [$this, 'onWriteItemsPre'], $prePriority);
+
+        $this->listeners[] = $events->attach('addItem.pre', [$this, 'onWriteItemPre'], $prePriority);
+        $this->listeners[] = $events->attach('addItems.pre', [$this, 'onWriteItemsPre'], $prePriority);
+
+        $this->listeners[] = $events->attach('replaceItem.pre', [$this, 'onWriteItemPre'], $prePriority);
+        $this->listeners[] = $events->attach('replaceItems.pre', [$this, 'onWriteItemsPre'], $prePriority);
+
+        $this->listeners[] = $events->attach('checkAndSetItem.pre', [$this, 'onWriteItemPre'], $prePriority);
+
+        // increment / decrement item(s)
+        $this->listeners[] = $events->attach('incrementItem.pre', [$this, 'onIncrementItemPre'], $prePriority);
+        $this->listeners[] = $events->attach('incrementItems.pre', [$this, 'onIncrementItemsPre'], $prePriority);
+
+        $this->listeners[] = $events->attach('decrementItem.pre', [$this, 'onDecrementItemPre'], $prePriority);
+        $this->listeners[] = $events->attach('decrementItems.pre', [$this, 'onDecrementItemsPre'], $prePriority);
+
+        // overwrite capabilities
+        $this->listeners[] = $events->attach('getCapabilities.post', [$this, 'onGetCapabilitiesPost'], $postPriority);
+    }
+
+    /**
+     * On read item post
+     *
+     * @param  PostEvent $event
+     * @return void
+     */
+    public function onReadItemPost(PostEvent $event)
+    {
+        $serializer = $this->getOptions()->getSerializer();
+        $result     = $event->getResult();
+        $result     = $serializer->unserialize($result);
+        $event->setResult($result);
+    }
+
+    /**
+     * On read items post
+     *
+     * @param  PostEvent $event
+     * @return void
+     */
+    public function onReadItemsPost(PostEvent $event)
+    {
+        $serializer = $this->getOptions()->getSerializer();
+        $result     = $event->getResult();
+        foreach ($result as &$value) {
+            $value = $serializer->unserialize($value);
+        }
+        $event->setResult($result);
+    }
+
+    /**
+     * On write item pre
+     *
+     * @param  Event $event
+     * @return void
+     */
+    public function onWriteItemPre(Event $event)
+    {
+        $serializer = $this->getOptions()->getSerializer();
+        $params     = $event->getParams();
+        $params['value'] = $serializer->serialize($params['value']);
+    }
+
+    /**
+     * On write items pre
+     *
+     * @param  Event $event
+     * @return void
+     */
+    public function onWriteItemsPre(Event $event)
+    {
+        $serializer = $this->getOptions()->getSerializer();
+        $params     = $event->getParams();
+        foreach ($params['keyValuePairs'] as &$value) {
+            $value = $serializer->serialize($value);
+        }
+    }
+
+    /**
+     * On increment item pre
+     *
+     * @param  Event $event
+     * @return mixed
+     */
+    public function onIncrementItemPre(Event $event)
+    {
+        $storage  = $event->getTarget();
+        $params   = $event->getParams();
+        $casToken = null;
+        $success  = null;
+        $oldValue = $storage->getItem($params['key'], $success, $casToken);
+        $newValue = $oldValue + $params['value'];
+
+        if ($success) {
+            $storage->checkAndSetItem($casToken, $params['key'], $oldValue + $params['value']);
+            $result = $newValue;
+        } else {
+            $result = false;
+        }
+
+        $event->stopPropagation(true);
+        return $result;
+    }
+
+    /**
+     * On increment items pre
+     *
+     * @param  Event $event
+     * @return mixed
+     */
+    public function onIncrementItemsPre(Event $event)
+    {
+        $storage       = $event->getTarget();
+        $params        = $event->getParams();
+        $keyValuePairs = $storage->getItems(array_keys($params['keyValuePairs']));
+        foreach ($params['keyValuePairs'] as $key => & $value) {
+            if (isset($keyValuePairs[$key])) {
+                $keyValuePairs[$key]+= $value;
+            } else {
+                $keyValuePairs[$key] = $value;
+            }
+        }
+
+        $failedKeys = $storage->setItems($keyValuePairs);
+        foreach ($failedKeys as $failedKey) {
+            unset($keyValuePairs[$failedKey]);
+        }
+
+        $event->stopPropagation(true);
+        return $keyValuePairs;
+    }
+
+    /**
+     * On decrement item pre
+     *
+     * @param  Event $event
+     * @return mixed
+     */
+    public function onDecrementItemPre(Event $event)
+    {
+        $storage  = $event->getTarget();
+        $params   = $event->getParams();
+        $success  = null;
+        $casToken = null;
+        $oldValue = $storage->getItem($params['key'], $success, $casToken);
+        $newValue = $oldValue - $params['value'];
+
+        if ($success) {
+            $storage->checkAndSetItem($casToken, $params['key'], $oldValue + $params['value']);
+            $result = $newValue;
+        } else {
+            $result = false;
+        }
+
+        $event->stopPropagation(true);
+        return $result;
+    }
+
+    /**
+     * On decrement items pre
+     *
+     * @param  Event $event
+     * @return mixed
+     */
+    public function onDecrementItemsPre(Event $event)
+    {
+        $storage       = $event->getTarget();
+        $params        = $event->getParams();
+        $keyValuePairs = $storage->getItems(array_keys($params['keyValuePairs']));
+        foreach ($params['keyValuePairs'] as $key => &$value) {
+            if (isset($keyValuePairs[$key])) {
+                $keyValuePairs[$key]-= $value;
+            } else {
+                $keyValuePairs[$key] = -$value;
+            }
+        }
+
+        $failedKeys = $storage->setItems($keyValuePairs);
+        foreach ($failedKeys as $failedKey) {
+            unset($keyValuePairs[$failedKey]);
+        }
+
+        $event->stopPropagation(true);
+        return $keyValuePairs;
+    }
+
+    /**
+     * On get capabilities
+     *
+     * @param  PostEvent $event
+     * @return void
+     */
+    public function onGetCapabilitiesPost(PostEvent $event)
+    {
+        $baseCapabilities = $event->getResult();
+        $index = spl_object_hash($baseCapabilities);
+
+        if (!isset($this->capabilities[$index])) {
+            $this->capabilities[$index] = new Capabilities(
+                $baseCapabilities->getAdapter(),
+                new stdClass(), // marker
+                ['supportedDatatypes' => [
+                    'NULL'     => true,
+                    'boolean'  => true,
+                    'integer'  => true,
+                    'double'   => true,
+                    'string'   => true,
+                    'array'    => true,
+                    'object'   => 'object',
+                    'resource' => false,
+                ]],
+                $baseCapabilities
+            );
+        }
+
+        $event->setResult($this->capabilities[$index]);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/PluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/PluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/PluginManager.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use Zend\Cache\Exception;
+use Zend\ServiceManager\AbstractPluginManager;
+
+/**
+ * Plugin manager implementation for cache plugins
+ *
+ * Enforces that plugins retrieved are instances of
+ * Plugin\PluginInterface. Additionally, it registers a number of default
+ * plugins available.
+ */
+class PluginManager extends AbstractPluginManager
+{
+    /**
+     * Default set of plugins
+     *
+     * @var array
+     */
+    protected $invokableClasses = [
+        'clearexpiredbyfactor' => 'Zend\Cache\Storage\Plugin\ClearExpiredByFactor',
+        'exceptionhandler'     => 'Zend\Cache\Storage\Plugin\ExceptionHandler',
+        'ignoreuserabort'      => 'Zend\Cache\Storage\Plugin\IgnoreUserAbort',
+        'optimizebyfactor'     => 'Zend\Cache\Storage\Plugin\OptimizeByFactor',
+        'serializer'           => 'Zend\Cache\Storage\Plugin\Serializer',
+    ];
+
+    /**
+     * Do not share by default
+     *
+     * @var array
+     */
+    protected $shareByDefault = false;
+
+    /**
+     * Validate the plugin
+     *
+     * Checks that the plugin loaded is an instance of Plugin\PluginInterface.
+     *
+     * @param  mixed $plugin
+     * @return void
+     * @throws Exception\RuntimeException if invalid
+     */
+    public function validatePlugin($plugin)
+    {
+        if ($plugin instanceof Plugin\PluginInterface) {
+            // we're okay
+            return;
+        }
+
+        throw new Exception\RuntimeException(sprintf(
+            'Plugin of type %s is invalid; must implement %s\Plugin\PluginInterface',
+            (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
+            __NAMESPACE__
+        ));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/PostEvent.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/PostEvent.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/PostEvent.php	(revision 5534)
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use ArrayObject;
+
+class PostEvent extends Event
+{
+    /**
+     * The result/return value
+     *
+     * @var mixed
+     */
+    protected $result;
+
+    /**
+     * Constructor
+     *
+     * Accept a target and its parameters.
+     *
+     * @param  string           $name
+     * @param  StorageInterface $storage
+     * @param  ArrayObject      $params
+     * @param  mixed            $result
+     */
+    public function __construct($name, StorageInterface $storage, ArrayObject $params, & $result)
+    {
+        parent::__construct($name, $storage, $params);
+        $this->setResult($result);
+    }
+
+    /**
+     * Set the result/return value
+     *
+     * @param  mixed $value
+     * @return PostEvent
+     */
+    public function setResult(& $value)
+    {
+        $this->result = & $value;
+        return $this;
+    }
+
+    /**
+     * Get the result/return value
+     *
+     * @return mixed
+     */
+    public function & getResult()
+    {
+        return $this->result;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/StorageInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/StorageInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/StorageInterface.php	(revision 5534)
@@ -0,0 +1,246 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+use Traversable;
+
+interface StorageInterface
+{
+    /**
+     * Set options.
+     *
+     * @param array|Traversable|Adapter\AdapterOptions $options
+     * @return StorageInterface Fluent interface
+     */
+    public function setOptions($options);
+
+    /**
+     * Get options
+     *
+     * @return Adapter\AdapterOptions
+     */
+    public function getOptions();
+
+    /* reading */
+
+    /**
+     * Get an item.
+     *
+     * @param  string  $key
+     * @param  bool $success
+     * @param  mixed   $casToken
+     * @return mixed Data on success, null on failure
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function getItem($key, & $success = null, & $casToken = null);
+
+    /**
+     * Get multiple items.
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and values
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function getItems(array $keys);
+
+    /**
+     * Test if an item exists.
+     *
+     * @param  string $key
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function hasItem($key);
+
+    /**
+     * Test multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of found keys
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function hasItems(array $keys);
+
+    /**
+     * Get metadata of an item.
+     *
+     * @param  string $key
+     * @return array|bool Metadata on success, false on failure
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function getMetadata($key);
+
+    /**
+     * Get multiple metadata
+     *
+     * @param  array $keys
+     * @return array Associative array of keys and metadata
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function getMetadatas(array $keys);
+
+    /* writing */
+
+    /**
+     * Store an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function setItem($key, $value);
+
+    /**
+     * Store multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function setItems(array $keyValuePairs);
+
+    /**
+     * Add an item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function addItem($key, $value);
+
+    /**
+     * Add multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function addItems(array $keyValuePairs);
+
+    /**
+     * Replace an existing item.
+     *
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function replaceItem($key, $value);
+
+    /**
+     * Replace multiple existing items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Array of not stored keys
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function replaceItems(array $keyValuePairs);
+
+    /**
+     * Set an item only if token matches
+     *
+     * It uses the token received from getItem() to check if the item has
+     * changed before overwriting it.
+     *
+     * @param  mixed  $token
+     * @param  string $key
+     * @param  mixed  $value
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     * @see    getItem()
+     * @see    setItem()
+     */
+    public function checkAndSetItem($token, $key, $value);
+
+    /**
+     * Reset lifetime of an item
+     *
+     * @param  string $key
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function touchItem($key);
+
+    /**
+     * Reset lifetime of multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not updated keys
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function touchItems(array $keys);
+
+    /**
+     * Remove an item.
+     *
+     * @param  string $key
+     * @return bool
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function removeItem($key);
+
+    /**
+     * Remove multiple items.
+     *
+     * @param  array $keys
+     * @return array Array of not removed keys
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function removeItems(array $keys);
+
+    /**
+     * Increment an item.
+     *
+     * @param  string $key
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function incrementItem($key, $value);
+
+    /**
+     * Increment multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Associative array of keys and new values
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function incrementItems(array $keyValuePairs);
+
+    /**
+     * Decrement an item.
+     *
+     * @param  string $key
+     * @param  int    $value
+     * @return int|bool The new value on success, false on failure
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function decrementItem($key, $value);
+
+    /**
+     * Decrement multiple items.
+     *
+     * @param  array $keyValuePairs
+     * @return array Associative array of keys and new values
+     * @throws \Zend\Cache\Exception\ExceptionInterface
+     */
+    public function decrementItems(array $keyValuePairs);
+
+    /* status */
+
+    /**
+     * Capabilities of this storage
+     *
+     * @return Capabilities
+     */
+    public function getCapabilities();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/TaggableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/TaggableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/TaggableInterface.php	(revision 5534)
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface TaggableInterface
+{
+    /**
+     * Set tags to an item by given key.
+     * An empty array will remove all tags.
+     *
+     * @param string   $key
+     * @param string[] $tags
+     * @return bool
+     */
+    public function setTags($key, array $tags);
+
+    /**
+     * Get tags of an item by given key
+     *
+     * @param string $key
+     * @return string[]|FALSE
+     */
+    public function getTags($key);
+
+    /**
+     * Remove items matching given tags.
+     *
+     * If $disjunction only one of the given tags must match
+     * else all given tags must match.
+     *
+     * @param string[] $tags
+     * @param  bool  $disjunction
+     * @return bool
+     */
+    public function clearByTags(array $tags, $disjunction = false);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/TotalSpaceCapableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/TotalSpaceCapableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/Storage/TotalSpaceCapableInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache\Storage;
+
+interface TotalSpaceCapableInterface
+{
+    /**
+     * Get total space in bytes
+     *
+     * @return int|float
+     */
+    public function getTotalSpace();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/StorageFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/StorageFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-cache/src/StorageFactory.php	(revision 5534)
@@ -0,0 +1,247 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Cache;
+
+use Traversable;
+use Zend\EventManager\EventsCapableInterface;
+use Zend\Stdlib\ArrayUtils;
+
+abstract class StorageFactory
+{
+    /**
+     * Plugin manager for loading adapters
+     *
+     * @var null|Storage\AdapterPluginManager
+     */
+    protected static $adapters = null;
+
+    /**
+     * Plugin manager for loading plugins
+     *
+     * @var null|Storage\PluginManager
+     */
+    protected static $plugins = null;
+
+    /**
+     * The storage factory
+     * This can instantiate storage adapters and plugins.
+     *
+     * @param array|Traversable $cfg
+     * @return Storage\StorageInterface
+     * @throws Exception\InvalidArgumentException
+     */
+    public static function factory($cfg)
+    {
+        if ($cfg instanceof Traversable) {
+            $cfg = ArrayUtils::iteratorToArray($cfg);
+        }
+
+        if (!is_array($cfg)) {
+            throw new Exception\InvalidArgumentException(
+                'The factory needs an associative array '
+                . 'or a Traversable object as an argument'
+            );
+        }
+
+        // instantiate the adapter
+        if (!isset($cfg['adapter'])) {
+            throw new Exception\InvalidArgumentException('Missing "adapter"');
+        }
+        $adapterName    = $cfg['adapter'];
+        $adapterOptions = [];
+        if (is_array($cfg['adapter'])) {
+            if (!isset($cfg['adapter']['name'])) {
+                throw new Exception\InvalidArgumentException('Missing "adapter.name"');
+            }
+
+            $adapterName    = $cfg['adapter']['name'];
+            $adapterOptions = isset($cfg['adapter']['options']) ? $cfg['adapter']['options'] : [];
+        }
+        if (isset($cfg['options'])) {
+            $adapterOptions = array_merge($adapterOptions, $cfg['options']);
+        }
+
+        $adapter = static::adapterFactory((string) $adapterName, $adapterOptions);
+
+        // add plugins
+        if (isset($cfg['plugins'])) {
+            if (!$adapter instanceof EventsCapableInterface) {
+                throw new Exception\RuntimeException(sprintf(
+                    "The adapter '%s' doesn't implement '%s' and therefore can't handle plugins",
+                    get_class($adapter),
+                    'Zend\EventManager\EventsCapableInterface'
+                ));
+            }
+
+            if (!is_array($cfg['plugins'])) {
+                throw new Exception\InvalidArgumentException(
+                    'Plugins needs to be an array'
+                );
+            }
+
+            foreach ($cfg['plugins'] as $k => $v) {
+                $pluginPrio = 1; // default priority
+
+                if (is_string($k)) {
+                    if (!is_array($v)) {
+                        throw new Exception\InvalidArgumentException(
+                            "'plugins.{$k}' needs to be an array"
+                        );
+                    }
+                    $pluginName    = $k;
+                    $pluginOptions = $v;
+                } elseif (is_array($v)) {
+                    if (!isset($v['name'])) {
+                        throw new Exception\InvalidArgumentException("Invalid plugins[{$k}] or missing plugins[{$k}].name");
+                    }
+                    $pluginName = (string) $v['name'];
+
+                    if (isset($v['options'])) {
+                        $pluginOptions = $v['options'];
+                    } else {
+                        $pluginOptions = [];
+                    }
+
+                    if (isset($v['priority'])) {
+                        $pluginPrio = $v['priority'];
+                    }
+                } else {
+                    $pluginName    = $v;
+                    $pluginOptions = [];
+                }
+
+                $plugin = static::pluginFactory($pluginName, $pluginOptions);
+                $adapter->addPlugin($plugin, $pluginPrio);
+            }
+        }
+
+        return $adapter;
+    }
+
+    /**
+     * Instantiate a storage adapter
+     *
+     * @param  string|Storage\StorageInterface                  $adapterName
+     * @param  array|Traversable|Storage\Adapter\AdapterOptions $options
+     * @return Storage\StorageInterface
+     * @throws Exception\RuntimeException
+     */
+    public static function adapterFactory($adapterName, $options = [])
+    {
+        if ($adapterName instanceof Storage\StorageInterface) {
+            // $adapterName is already an adapter object
+            $adapter = $adapterName;
+        } else {
+            $adapter = static::getAdapterPluginManager()->get($adapterName);
+        }
+
+        if ($options) {
+            $adapter->setOptions($options);
+        }
+
+        return $adapter;
+    }
+
+    /**
+     * Get the adapter plugin manager
+     *
+     * @return Storage\AdapterPluginManager
+     */
+    public static function getAdapterPluginManager()
+    {
+        if (static::$adapters === null) {
+            static::$adapters = new Storage\AdapterPluginManager();
+        }
+        return static::$adapters;
+    }
+
+    /**
+     * Change the adapter plugin manager
+     *
+     * @param  Storage\AdapterPluginManager $adapters
+     * @return void
+     */
+    public static function setAdapterPluginManager(Storage\AdapterPluginManager $adapters)
+    {
+        static::$adapters = $adapters;
+    }
+
+    /**
+     * Resets the internal adapter plugin manager
+     *
+     * @return void
+     */
+    public static function resetAdapterPluginManager()
+    {
+        static::$adapters = null;
+    }
+
+    /**
+     * Instantiate a storage plugin
+     *
+     * @param string|Storage\Plugin\PluginInterface     $pluginName
+     * @param array|Traversable|Storage\Plugin\PluginOptions $options
+     * @return Storage\Plugin\PluginInterface
+     * @throws Exception\RuntimeException
+     */
+    public static function pluginFactory($pluginName, $options = [])
+    {
+        if ($pluginName instanceof Storage\Plugin\PluginInterface) {
+            // $pluginName is already a plugin object
+            $plugin = $pluginName;
+        } else {
+            $plugin = static::getPluginManager()->get($pluginName);
+        }
+
+        if (!$options instanceof Storage\Plugin\PluginOptions) {
+            $options = new Storage\Plugin\PluginOptions($options);
+        }
+
+        if ($options) {
+            $plugin->setOptions($options);
+        }
+
+        return $plugin;
+    }
+
+    /**
+     * Get the plugin manager
+     *
+     * @return Storage\PluginManager
+     */
+    public static function getPluginManager()
+    {
+        if (static::$plugins === null) {
+            static::$plugins = new Storage\PluginManager();
+        }
+        return static::$plugins;
+    }
+
+    /**
+     * Change the plugin manager
+     *
+     * @param  Storage\PluginManager $plugins
+     * @return void
+     */
+    public static function setPluginManager(Storage\PluginManager $plugins)
+    {
+        static::$plugins = $plugins;
+    }
+
+    /**
+     * Resets the internal plugin manager
+     *
+     * @return void
+     */
+    public static function resetPluginManager()
+    {
+        static::$plugins = null;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,41 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 2.6.0 - 2016-02-04
+
+### Added
+
+- [#6](https://github.com/zendframework/zend-config/pull/6) adds the ability for
+  the `PhpArray` writer to optionally translate strings that evaluate to known
+  classes to `ClassName::class` syntax; the feature works for both keys and
+  values.
+- [#21](https://github.com/zendframework/zend-config/pull/21) adds revised
+  documentation, and publishes it to https://zendframework.github.io/zend-config/
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#8](https://github.com/zendframework/zend-config/pull/8),
+  [#18](https://github.com/zendframework/zend-config/pull/18), and
+  [#20](https://github.com/zendframework/zend-config/pull/20) update the
+  code base to make it forwards-compatible with the v3.0 versions of
+  zend-stdlib and zend-servicemanager. Primarily, this involved:
+  - Updating the `AbstractConfigFactory` to implement the new methods in the
+    v3 `AbstractFactoryInterface` definition, and updating the v2 methods to
+    proxy to those.
+  - Updating `ReaderPluginManager` and `WriterPluginManager` to follow the
+    changes to `AbstractPluginManager`. In particular, instead of defining
+    invokables, they now define a combination of aliases and factories (using
+    the new `InvokableFactory`); additionally, they each now implement both
+    `validatePlugin()` from v2 and `validate()` from v3.
+  - Pinning to stable versions of already updated components.
+  - Selectively omitting zend-i18n-reliant tests when testing against
+    zend-servicemanager v3.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-config/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-config.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
+standards checks, and provides configuration for our selected checks.
+`php-cs-fixer` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
+```
+
+To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
+flag:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
+```
+
+If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-config)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-config.git
+   $ cd zend-config
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-config.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-config.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/README.md	(revision 5534)
@@ -0,0 +1,13 @@
+# zend-config
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-config.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-config)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-config/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-config?branch=master)
+
+`Zend\Config` is designed to simplify access to configuration data within
+applications. It provides a nested object property-based user interface for
+accessing this configuration data within application code. The configuration
+data may come from a variety of media supporting hierarchical data storage.
+
+
+- File issues at https://github.com/zendframework/zend-config/issues
+- Documentation is at https://zendframework.github.io/zend-config/
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/composer.json	(revision 5534)
@@ -0,0 +1,46 @@
+{
+    "name": "zendframework/zend-config",
+    "description": "provides a nested object property based user interface for accessing this configuration data within application code",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "config"
+    ],
+    "homepage": "https://github.com/zendframework/zend-config",
+    "autoload": {
+        "psr-4": {
+            "Zend\\Config\\": "src/"
+        }
+    },
+    "require": {
+        "php": "^5.5 || ^7.0",
+        "zendframework/zend-stdlib": "^2.7 || ^3.0"
+    },
+    "require-dev": {
+        "zendframework/zend-filter": "^2.6",
+        "zendframework/zend-i18n": "^2.5",
+        "zendframework/zend-json": "^2.6.1",
+        "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
+        "fabpot/php-cs-fixer": "1.7.*",
+        "phpunit/PHPUnit": "~4.0"
+    },
+    "suggest": {
+        "zendframework/zend-filter": "Zend\\Filter component",
+        "zendframework/zend-i18n": "Zend\\I18n component",
+        "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
+        "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.6-dev",
+            "dev-develop": "2.7-dev"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\Config\\": "test/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/factory.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/factory.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/factory.md	(revision 5534)
@@ -0,0 +1,62 @@
+# The Factory
+
+`Zend\Config\Factory` provides the ability to load configuration files to an
+array or to a `Zend\Config\Config` object. The factory has two purposes
+
+- Loading configuration file(s)
+- Storing a configuration file
+
+> ## Storage writes to a single file
+>
+> Storing the configuration always writes to a **single** file. The factory is
+> not aware of merged configuration files, and as such cannot split
+> configuration to multiple files.  If you want to store particular
+> configuration sections to separate files, you should separate them manually.
+
+## Loading configuration files
+
+The first example illustrates loading a single configuration file:
+
+```php
+// Load a PHP file as array:
+$config = Zend\Config\Factory::fromFile(__DIR__ . '/config/my.config.php');
+
+// Load an XML file as Config object; the second parameter, when true,
+// casts the configuration to a Config instance:
+$config = Zend\Config\Factory::fromFile(__DIR__.'/config/my.config.xml', true);
+```
+
+The next example demonstrates merging multiple files; note that they are in
+separate formats!
+
+```php
+$config = Zend\Config\Factory::fromFiles([
+    __DIR__.'/config/my.config.php',
+    __DIR__.'/config/my.config.xml',
+]);
+```
+
+## Storing configuration
+
+Sometimes you may want to write configuration to a file. To do this, use the
+factory's `toFile()` method:
+
+```php
+$config = new Zend\Config\Config([], true);
+$config->settings = [];
+$config->settings->myname = 'framework';
+$config->settings->date   = '2012-12-12 12:12:12';
+
+//Store the configuration
+Zend\Config\Factory::toFile(__DIR__ . '/config/my.config.php', $config);
+
+//Store an array
+$config = [
+    'settings' => [
+        'myname' => 'framework',
+        'data'   => '2012-12-12 12:12:12',
+    ],
+];
+
+Zend\Config\Factory::toFile(__DIR__ . '/config/my.config.php', $config);
+```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/index.html
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/index.html	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/index.html	(revision 5534)
@@ -0,0 +1,10 @@
+<div class="container">
+  <div class="jumbotron">
+    <h1>zend-config</h1>
+    
+    <p>Read and write configuration files.</p>
+
+    <pre><code class="language-bash">$ composer require zendframework/zend-config</code></pre>
+  </div>
+</div>
+
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/index.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/index.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/index.md	(revision 5534)
@@ -0,0 +1,1 @@
+../../README.md
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/intro.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/intro.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/intro.md	(revision 5534)
@@ -0,0 +1,78 @@
+# Introduction
+
+zend-config is designed to simplify access to configuration data within applications. It provides
+a nested object, property-based user interface for accessing this configuration data within
+application code. The configuration data may come from a variety of formats supporting hierarchical
+data storage. Currently, zend-config provides adapters that read and write configuration data
+stored in INI, JSON, YAML, and XML files.
+
+## Using Reader Classes
+
+Normally, users will use one of the [reader classes](reader.md) to read a
+configuration file, but if configuration data is available in a PHP array, one
+may simply pass the data to `Zend\Config\Config`'s constructor in order to
+utilize a simple object-oriented interface:
+
+```php
+// An array of configuration data is given
+$configArray = [
+    'webhost'  => 'www.example.com',
+    'database' => [
+        'adapter' => 'pdo_mysql',
+        'params'  => [
+            'host'     => 'db.example.com',
+            'username' => 'dbuser',
+            'password' => 'secret',
+            'dbname'   => 'mydatabase',
+        ],
+    ],
+];
+
+// Create the object-oriented wrapper using the configuration data
+$config = new Zend\Config\Config($configArray);
+
+// Print a configuration datum (results in 'www.example.com')
+echo $config->webhost;
+```
+
+As illustrated in the example above, `Zend\Config\Config` provides nested object
+property syntax to access configuration data passed to its constructor.
+
+Along with the object-oriented access to the data values, `Zend\Config\Config`
+also has a `get()` method that accepts a default value to return if the data
+element requested doesn't exist in the configuration array. For example:
+
+```php
+$host = $config->database->get('host', 'localhost');
+```
+
+## Using PHP Configuration Files
+
+PHP-basd configuration files are often recommended due to the speed with which
+they are parsed, and the fact that they can be cached by opcode caches.
+
+The following code illustrates how to use PHP configuration files:
+
+```php
+// config.php
+return [
+    'webhost'  => 'www.example.com',
+    'database' => array(
+        'adapter' => 'pdo_mysql',
+        'params'  => [
+            'host'     => 'db.example.com',
+            'username' => 'dbuser',
+            'password' => 'secret',
+            'dbname'   => 'mydatabase',
+        ],
+    ],
+];
+```
+
+```php
+// Consumes the configuration array
+$config = new Zend\Config\Config(include 'config.php');
+
+// Print a configuration datum (results in 'www.example.com')
+echo $config->webhost;
+```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/processor.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/processor.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/processor.md	(revision 5534)
@@ -0,0 +1,142 @@
+# Zend\\Config\\Processor
+
+`Zend\Config\Processor` provides the ability to perform operations on a
+`Zend\Config\Config` object. `Zend\Config\Processor` is itself an interface that
+defining two methods: `process()` and `processValue()`.
+
+zend-config provides the following concrete implementations:
+
+- `Zend\Config\Processor\Constant`: manage PHP constant values.
+- `Zend\Config\Processor\Filter`: filter the configuration data using `Zend\Filter`.
+- `Zend\Config\Processor\Queue`: manage a queue of operations to apply to configuration data.
+- `Zend\Config\Processor\Token`: find and replace specific tokens.
+- `Zend\Config\Processor\Translator`: translate configuration values in other languages using `Zend\I18n\Translator`.
+
+## Zend\\Config\\Processor\\Constant
+
+### Using Zend\\Config\\Processor\\Constant
+
+This example illustrates the basic usage of `Zend\Config\Processor\Constant`:
+
+```php
+define ('TEST_CONST', 'bar');
+
+// Provide the second parameter as boolean true to allow modifications:
+$config = new Zend\Config\Config(['foo' => 'TEST_CONST'], true);
+$processor = new Zend\Config\Processor\Constant();
+
+echo $config->foo . ',';
+$processor->process($config);
+echo $config->foo;
+```
+
+This example returns the output: `TEST_CONST,bar`.
+
+## Zend\\Config\\Processor\\Filter
+
+### Using Zend\\Config\\Processor\\Filter
+
+This example illustrates basic usage of `Zend\Config\Processor\Filter`:
+
+```php
+use Zend\Filter\StringToUpper;
+use Zend\Config\Processor\Filter as FilterProcessor;
+use Zend\Config\Config;
+
+// Provide the second parameter as boolean true to allow modifications:
+$config = new Config(['foo' => 'bar'], true);
+$upper = new StringToUpper();
+
+$upperProcessor = new FilterProcessor($upper);
+
+echo $config->foo . ',';
+$upperProcessor->process($config);
+echo $config->foo;
+```
+
+This example returns the output: `bar,BAR`.
+
+## Zend\\Config\\Processor\\Queue
+
+### Using Zend\\Config\\Processor\\Queue
+
+This example illustrates basic usage of `Zend\Config\Processor\Queue`:
+
+```php
+use Zend\Filter\StringToLower;
+use Zend\Filter\StringToUpper;
+use Zend\Config\Processor\Filter as FilterProcessor;
+use Zend\Config\Processor\Queue;
+use Zend\Config\Config;
+
+// Provide the second parameter as boolean true to allow modifications:
+$config = new Config(['foo' => 'bar'], true);
+$upper  = new StringToUpper();
+$lower  = new StringToLower();
+
+$lowerProcessor = new FilterProcessor($lower);
+$upperProcessor = new FilterProcessor($upper);
+
+$queue = new Queue();
+$queue->insert($upperProcessor);
+$queue->insert($lowerProcessor);
+$queue->process($config);
+
+echo $config->foo;
+```
+
+This example returns the output: `bar`. The filters in the queue are applied in
+*FIFO* (First In, First Out) order .
+
+## Zend\\Config\\Processor\\Token
+
+### Using Zend\\Config\\Processor\\Token
+
+This example illustrates basic usage of `Zend\Config\Processor\Token`:
+
+```php
+// Provide the second parameter as boolean true to allow modifications:
+$config = new Config(['foo' => 'Value is TOKEN'], true);
+$processor = new TokenProcessor();
+
+$processor->addToken('TOKEN', 'bar');
+echo $config->foo . ',';
+$processor->process($config);
+echo $config->foo;
+```
+
+This example returns the output: `Value is TOKEN,Value is bar`.
+
+## Zend\\Config\\Processor\\Translator
+
+### Using Zend\\Config\\Processor\\Translator
+
+This example illustrates basic usage of `Zend\Config\Processor\Translator`:
+
+```php
+use Zend\Config\Config;
+use Zend\Config\Processor\Translator as TranslatorProcessor;
+use Zend\I18n\Translator\Translator;
+
+// Provide the second parameter as boolean true to allow modifications:
+$config = new Config(['animal' => 'dog'], true);
+
+/*
+ * The following mapping is used for the translation
+ * loader provided to the translator instance:
+ *
+ * $italian = [
+ *     'dog' => 'cane'
+ * ];
+ */
+
+$translator = new Translator();
+// ... configure the translator ...
+$processor = new TranslatorProcessor($translator);
+
+echo "English: {$config->animal}, ";
+$processor->process($config);
+echo "Italian: {$config->animal}";
+```
+
+This example returns the output: `English: dog,Italian: cane`.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/reader.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/reader.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/reader.md	(revision 5534)
@@ -0,0 +1,354 @@
+# Zend\\Config\\Reader
+
+`Zend\Config\Reader` gives you the ability to read a config file. It works with
+concrete implementations for different file formats. `Zend\Config\Reader` itself
+is only an interface, defining the methods `fromFile()` and `fromString()`. The
+concrete implementations of this interface are:
+
+- `Zend\Config\Reader\Ini`
+- `Zend\Config\Reader\Xml`
+- `Zend\Config\Reader\Json`
+- `Zend\Config\Reader\Yaml`
+- `Zend\Config\Reader\JavaProperties`
+
+`fromFile()` and `fromString()` are expected to return a PHP array containing
+the data from the specified configuration.
+
+> ## Differences from ZF1
+>
+> The `Zend\Config\Reader` component no longer supports the following features:
+>
+> - Inheritance of sections.
+> - Reading of specific sections.
+
+## Zend\\Config\\Reader\\Ini
+
+`Zend\Config\Reader\Ini` enables developers to store configuration data in a
+familiar INI format, and then to read them in the application by using an array
+syntax.
+
+`Zend\Config\Reader\Ini` utilizes the [`parse_ini_file()`](http://php.net/parse_ini_file) PHP
+function. Please review this documentation to be aware of its specific behaviors, which propagate to
+`Zend\Config\Reader\Ini`, such as how the special values of `TRUE`, `FALSE`, "yes", "no", and
+`NULL` are handled.
+
+> ### Key Separator
+>
+> By default, the key separator character is the period character (`.`). This can be changed,
+> however, using the `setNestSeparator()` method. For example:
+>
+> ```php
+> $reader = new Zend\Config\Reader\Ini();
+> $reader-setNestSeparator('-');
+> ```
+
+The following example illustrates basic usage of `Zend\Config\Reader\Ini` for
+loading configuration data from an INI file. In this example, configuration data
+for both a production system and for a staging system exists.
+
+```ini
+webhost                  = 'www.example.com'
+database.adapter         = 'pdo_mysql'
+database.params.host     = 'db.example.com'
+database.params.username = 'dbuser'
+database.params.password = 'secret'
+database.params.dbname   = 'dbproduction'
+```
+
+We can use `Zend\Config\Reader\Ini` to read this INI file:
+
+```php
+$reader = new Zend\Config\Reader\Ini();
+$data   = $reader->fromFile('/path/to/config.ini');
+
+echo $data['webhost'];  // prints "www.example.com"
+echo $data['database']['params']['dbname'];  // prints "dbproduction"
+```
+
+`Zend\Config\Reader\Ini` supports a feature to include the content of a INI file
+in a specific section of another INI file. For instance, suppose we have an INI
+file with the database configuration:
+
+```ini
+database.adapter         = 'pdo_mysql'
+database.params.host     = 'db.example.com'
+database.params.username = 'dbuser'
+database.params.password = 'secret'
+database.params.dbname   = 'dbproduction'
+```
+
+We can include this configuration in another INI file by using the `@include`
+notation:
+
+```ini
+webhost  = 'www.example.com'
+@include = 'database.ini'
+```
+
+If we read this file using the component `Zend\Config\Reader\Ini`, we will obtain the same
+configuration data structure as in the previous example.
+
+The `@include = 'file-to-include.ini'` notation can be used also in a subelement
+of a value. For instance we can have an INI file like the following:
+
+```ini
+adapter         = 'pdo_mysql'
+params.host     = 'db.example.com'
+params.username = 'dbuser'
+params.password = 'secret'
+params.dbname   = 'dbproduction'
+```
+
+And assign the `@include` as a subelement of the `database` value:
+
+```ini
+webhost           = 'www.example.com'
+database.@include = 'database.ini'
+```
+
+## Zend\\Config\\Reader\\Xml
+
+`Zend\Config\Reader\Xml` enables developers to provide configuration data in a
+familiar XML format and consume it in the application using an array syntax.
+The root element of the XML file or string is irrelevant and may be named
+arbitrarily.
+
+The following example illustrates basic usage of `Zend\Config\Reader\Xml` for loading configuration
+data from an XML file. First, our XML configuration in the file `config.xml`:
+
+```markup
+<?xml version="1.0" encoding="utf-8"?>
+<config>
+    <webhost>www.example.com</webhost>
+    <database>
+        <adapter value="pdo_mysql"/>
+        <params>
+            <host value="db.example.com"/>
+            <username value="dbuser"/>
+            <password value="secret"/>
+            <dbname value="dbproduction"/>
+        </params>
+    </database>
+</config>
+```
+
+We can use the `Zend\Config\Reader\Xml` to read the XML configuration:
+
+```php
+$reader = new Zend\Config\Reader\Xml();
+$data   = $reader->fromFile('/path/to/config.xml');
+
+echo $data['webhost'];  // prints "www.example.com"
+echo $data['database']['params']['dbname']['value'];  // prints "dbproduction"
+```
+
+`Zend\Config\Reader\Xml` utilizes PHP's [XMLReader](http://php.net/xmlreader) class. Please
+review its documentation to be aware of its specific behaviors, which propagate to
+`Zend\Config\Reader\Xml`.
+
+Using `Zend\Config\Reader\Xml`, we can include the content of XML files in a
+specific XML element.  This is provided using the standard
+[XInclude](http://www.w3.org/TR/xinclude/) functionality of XML. To use this
+functionality, you must add the namespace
+`xmlns:xi="http://www.w3.org/2001/XInclude"` to the XML file.
+
+Suppose we have an XML file that contains only the database configuration:
+
+```markup
+<?xml version="1.0" encoding="utf-8"?>
+<config>
+    <database>
+        <adapter>pdo_mysql</adapter>
+        <params>
+            <host>db.example.com</host>
+            <username>dbuser</username>
+            <password>secret</password>
+            <dbname>dbproduction</dbname>
+        </params>
+    </database>
+</config>
+```
+
+We can include this configuration in another XML file using an xinclude:
+
+```markup
+<?xml version="1.0" encoding="utf-8"?>
+<config xmlns:xi="http://www.w3.org/2001/XInclude">
+    <webhost>www.example.com</webhost>
+    <xi:include href="database.xml"/>
+</config>
+```
+
+The syntax to include an XML file in a specific element is `<xi:include
+href="file-to-include.xml"/>`
+
+## Zend\\Config\\Reader\\Json
+
+`Zend\Config\Reader\Json` enables developers to consume configuration data in
+JSON, and read it in the application by using an array syntax.
+
+The following example illustrates a basic use of `Zend\Config\Reader\Json` for
+loading configuration data from a JSON file.
+
+Consider the following JSON configuration file:
+
+```javascript
+{
+  "webhost"  : "www.example.com",
+  "database" : {
+    "adapter" : "pdo_mysql",
+    "params"  : {
+      "host"     : "db.example.com",
+      "username" : "dbuser",
+      "password" : "secret",
+      "dbname"   : "dbproduction"
+    }
+  }
+}
+```
+
+We can use `Zend\Config\Reader\Json` to read the file:
+
+```php
+$reader = new Zend\Config\Reader\Json();
+$data   = $reader->fromFile('/path/to/config.json');
+
+echo $data['webhost'];  // prints "www.example.com"
+echo $data['database']['params']['dbname'];  // prints "dbproduction"
+```
+
+`Zend\Config\Reader\Json` utilizes [zend-json](https://github.com/zendframework/zend-json).
+
+Using `Zend\Config\Reader\Json`, we can include the content of a JSON file in a
+specific JSON section or element. This is provided using the special syntax
+`@include`. Suppose we have a JSON file that contains only the database
+configuration:
+
+```javascript
+{
+  "database" : {
+    "adapter" : "pdo_mysql",
+    "params"  : {
+      "host"     : "db.example.com",
+      "username" : "dbuser",
+      "password" : "secret",
+      "dbname"   : "dbproduction"
+    }
+  }
+}
+```
+
+Now let's include it via another configuration file:
+
+```javascript
+{
+    "webhost"  : "www.example.com",
+    "@include" : "database.json"
+}
+```
+
+## Zend\\Config\\Reader\\Yaml
+
+`Zend\Config\Reader\Yaml` enables developers to consume configuration data in a
+YAML format, and read them in the application by using an array syntax. In order
+to use the YAML reader, we need to pass a callback to an external PHP library or
+use the [YAML PECL extension](http://www.php.net/manual/en/book.yaml.php).
+
+The following example illustrates basic usage of `Zend\Config\Reader\Yaml`,
+using the YAML PECL extension.
+
+Consider the following YAML file:
+
+```yaml
+webhost: www.example.com
+database:
+    adapter: pdo_mysql
+    params:
+      host:     db.example.com
+      username: dbuser
+      password: secret
+      dbname:   dbproduction
+```
+
+We can use `Zend\Config\Reader\Yaml` to read this YAML file:
+
+```php
+$reader = new Zend\Config\Reader\Yaml();
+$data   = $reader->fromFile('/path/to/config.yaml');
+
+echo $data['webhost'];  // prints "www.example.com"
+echo $data['database']['params']['dbname'];  // prints "dbproduction"
+```
+
+If you want to use an external YAML reader, you must pass a callback function to
+the class constructor.  For instance, if you want to use the
+[Spyc](http://code.google.com/p/spyc/) library:
+
+```php
+// include the Spyc library
+require_once 'path/to/spyc.php';
+
+$reader = new Zend\Config\Reader\Yaml(['Spyc', 'YAMLLoadString']);
+$data   = $reader->fromFile('/path/to/config.yaml');
+
+echo $data['webhost'];  // prints "www.example.com"
+echo $data['database']['params']['dbname'];  // prints "dbproduction"
+```
+
+You can also instantiate `Zend\Config\Reader\Yaml` without any parameters, and
+specify the YAML reader using the `setYamlDecoder()` method.
+
+Using `Zend\Config\ReaderYaml`, we can include the content of another YAML file
+in a specific YAML section or element. This is provided using the special syntax
+`@include`.
+
+Consider the following YAML file containing only database configuration:
+
+```yaml
+database:
+    adapter: pdo_mysql
+    params:
+      host:     db.example.com
+      username: dbuser
+      password: secret
+      dbname:   dbproduction
+```
+
+We can include this configuration in another YAML file:
+
+```yaml
+webhost:  www.example.com
+@include: database.yaml
+```
+
+## Zend\\Config\\Reader\\JavaProperties
+
+`Zend\Config\Reader\JavaProperties` enables developers to provide configuration
+data in the popular JavaProperties format, and read it in the application by
+using array syntax.
+
+The following example illustrates basic usage of `Zend\Config\Reader\JavaProperties`
+for loading configuration data from a JavaProperties file.
+
+Suppose we have the following JavaProperties configuration file:
+
+```ini
+#comment
+!comment
+webhost:www.example.com
+database.adapter:pdo_mysql
+database.params.host:db.example.com
+database.params.username:dbuser
+database.params.password:secret
+database.params.dbname:dbproduction
+```
+
+We can use `Zend\Config\Reader\JavaProperties` to read it:
+
+```php
+$reader = new Zend\Config\Reader\JavaProperties();
+$data   = $reader->fromFile('/path/to/config.properties');
+
+echo $data['webhost'];  // prints "www.example.com"
+echo $data['database.params.dbname'];  // prints "dbproduction"
+```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/theory.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/theory.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/theory.md	(revision 5534)
@@ -0,0 +1,53 @@
+# Theory of Operation
+
+Configuration data are made accessible to `Zend\Config\Config`'s constructor via
+an associative array, which may be multi-dimensional so data can be organized
+from general to specific. Concrete adapter classes adapt configuration data from
+storage to produce the associative array for `Zend\Config\Config`'s constructor.
+If needed, user scripts may provide such arrays directly to
+`Zend\Config\Config`'s constructor, without using a reader class.
+
+Each value in the configuration data array becomes a property of the
+`Zend\Config\Config` object.  The key is used as the property name. If a value
+is itself an array, then the resulting object property is created as a new
+`Zend\Config\Config` object, loaded with the array data. This occurs
+recursively, such that a hierarchy of configuration data may be created with any
+number of levels.
+
+`Zend\Config\Config` implements the [Countable](http://php.net/manual/en/class.countable.php)
+and [Iterator](http://php.net/manual/en/class.iterator.php) interfaces in order
+to facilitate simple access to configuration data. Thus, `Zend\Config\Config`
+objects support the [count()](http://php.net/count) function and PHP constructs
+such as [foreach](http://php.net/foreach).
+
+By default, configuration data made available through `Zend\Config\Config` are
+read-only, and an assignment (e.g., `$config->database->host = 'example.com';`)
+results in an exception. This default behavior may be overridden through the
+constructor, allowing modification of data values.  Also, when modifications are
+allowed, `Zend\Config\Config` supports unsetting of values (e.g.,
+`unset($config->database->host)`). The `isReadOnly()` method can be used to
+determine if modifications to a given `Zend\Config\Config` object are allowed,
+and the `setReadOnly()` method can be used to stop any further modifications to
+a `Zend\Config\Config` object that was created allowing modifications.
+
+> ## Modifying Config does not save changes
+>
+> It is important not to confuse such in-memory modifications with saving
+> configuration data out to specific storage media. Tools for creating and
+> modifying configuration data for various storage media are out of scope with
+> respect to `Zend\Config\Config`. Third-party open source solutions are readily
+> available for the purpose of creating and modifying configuration data for
+> various storage media.
+
+If you have two `Zend\Config\Config` objects, you can merge them into a single
+object using the `merge()` function. For example, given `$config` and
+`$localConfig`, you can merge data from `$localConfig` to `$config` using
+`$config->merge($localConfig);`. The items in `$localConfig` will override any
+items with the same name in `$config`.
+
+> ## Merging requires modifications
+>
+> The `Zend\Config\Config` object that is performing the merge must have been
+> constructed to allow modifications, by passing `TRUE` as the second parameter
+> of the constructor. The `setReadOnly()` method can then be used to prevent any
+> further modifications after the merge is complete.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/writer.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/writer.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/doc/book/writer.md	(revision 5534)
@@ -0,0 +1,265 @@
+# Zend\\Config\\Writer
+
+`Zend\Config\Writer` provides the ability to write config files from an array,
+`Zend\Config\Config` instance, or any `Traversable` object. `Zend\Config\Writer`
+is itself only an interface that defining the methods `toFile()` and
+`toString()`.
+
+We have five writers implementing the interface:
+
+- `Zend\Config\Writer\Ini`
+- `Zend\Config\Writer\Xml`
+- `Zend\Config\Writer\PhpArray`
+- `Zend\Config\Writer\Json`
+- `Zend\Config\Writer\Yaml`
+
+## Zend\\Config\\Writer\\Ini
+
+The INI writer has two modes for rendering with regard to sections. By default, the top-level
+configuration is always written into section names. By calling
+`$writer->setRenderWithoutSectionsFlags(true);` all options are written into the global namespace of
+the INI file and no sections are applied.
+
+`Zend\Config\Writer\Ini` has an additional option parameter, `nestSeparator`,
+which defines with which character the single nodes are separated. The default
+is a single dot (`.`), such as is accepted by `Zend\Config\Reader\Ini` by
+default.
+
+When modifying or creating a `Zend\Config\Config` object, there are several
+considerations to keep in mind. To create or modify a value, you simply say set
+the parameter of the `Config` object via the parameter accessor (`->`). To
+create a section in the root or to create a branch, just create a new array
+(`$config->branch = [];`).
+
+### Using Zend\\Config\\Writer\\Ini
+
+Consider the following code, which creates a configuration structure:
+
+```php
+// Create the config object
+$config = new Zend\Config\Config([], true);
+$config->production = [];
+
+$config->production->webhost = 'www.example.com';
+$config->production->database = [];
+$config->production->database->params = [];
+$config->production->database->params->host = 'localhost';
+$config->production->database->params->username = 'production';
+$config->production->database->params->password = 'secret';
+$config->production->database->params->dbname = 'dbproduction';
+
+$writer = new Zend\Config\Writer\Ini();
+echo $writer->toString($config);
+```
+
+The result of this code is the following INI string:
+
+```ini
+[production]
+webhost = "www.example.com"
+database.params.host = "localhost"
+database.params.username = "production"
+database.params.password = "secret"
+database.params.dbname = "dbproduction"
+```
+
+You can use the method `toFile()` to store the INI data to a file instead.
+
+## Zend\\Config\\Writer\\Xml
+
+`Zend\Config\Writer\Xml` can be used to generate an XML string or file.
+
+### Using Zend\\Config\\Writer\\Xml
+
+Consider the following code, which creates a configuration structure:
+
+```php
+// Create the config object
+$config = new Zend\Config\Config([], true);
+$config->production = [];
+
+$config->production->webhost = 'www.example.com';
+$config->production->database = [];
+$config->production->database->params = [];
+$config->production->database->params->host = 'localhost';
+$config->production->database->params->username = 'production';
+$config->production->database->params->password = 'secret';
+$config->production->database->params->dbname = 'dbproduction';
+
+$writer = new Zend\Config\Writer\Xml();
+echo $writer->toString($config);
+```
+
+The result of this code is the following XML string:
+
+```markup
+<?xml version="1.0" encoding="UTF-8"?>
+<zend-config>
+    <production>
+        <webhost>www.example.com</webhost>
+        <database>
+            <params>
+                <host>localhost</host>
+                <username>production</username>
+                <password>secret</password>
+                <dbname>dbproduction</dbname>
+            </params>
+        </database>
+    </production>
+</zend-config>
+```
+
+You can use the method `toFile()` to store the XML data to a file.
+
+## Zend\\Config\\Writer\\PhpArray
+
+`Zend\Config\Writer\PhpArray` can be used to generate a PHP script that
+represents and returns configuration.
+
+### Using Zend\\Config\\Writer\\PhpArray
+
+Consider the following code, which creates a configuration structure:
+
+```php
+// Create the config object
+$config = new Zend\Config\Config([], true);
+$config->production = [];
+
+$config->production->webhost = 'www.example.com';
+$config->production->database = [];
+$config->production->database->params = [];
+$config->production->database->params->host = 'localhost';
+$config->production->database->params->username = 'production';
+$config->production->database->params->password = 'secret';
+$config->production->database->params->dbname = 'dbproduction';
+
+$writer = new Zend\Config\Writer\PhpArray();
+echo $writer->toString($config);
+```
+
+The result of this code is the following PHP script:
+
+```php
+<?php
+return array (
+  'production' =>
+  array (
+    'webhost' => 'www.example.com',
+    'database' =>
+    array (
+      'params' =>
+      array (
+        'host' => 'localhost',
+        'username' => 'production',
+        'password' => 'secret',
+        'dbname' => 'dbproduction',
+      ),
+    ),
+  ),
+);
+```
+
+You can use the method `toFile()` to save the PHP script to a file.
+
+## Zend\\Config\\Writer\\Json
+
+`Zend\Config\Writer\Json` can be used to generate a JSON representation of
+configuration.
+
+### Using Zend\\Config\\Writer\\Json
+
+Consider the following code, which creates a configuration structure:
+
+```php
+// Create the config object
+$config = new Zend\Config\Config([], true);
+$config->production = [];
+
+$config->production->webhost = 'www.example.com';
+$config->production->database = [];
+$config->production->database->params = [];
+$config->production->database->params->host = 'localhost';
+$config->production->database->params->username = 'production';
+$config->production->database->params->password = 'secret';
+$config->production->database->params->dbname = 'dbproduction';
+
+$writer = new Zend\Config\Writer\Json();
+echo $writer->toString($config);
+```
+
+The result of this code is the following JSON string:
+
+```javascript
+{
+  "webhost": "www.example.com",
+  "database": {
+    "params": {
+      "host": "localhost",
+      "username": "production",
+      "password": "secret",
+      "dbname": "dbproduction"
+    }
+  }
+}
+```
+
+You can use the method `toFile()` to save the JSON data to a file.
+
+`Zend\Config\Writer\Json` uses the zend-json component to convert the data to
+JSON.
+
+## Zend\\Config\\Writer\\Yaml
+
+`Zend\Config\Writer\Yaml` can be used to generate a PHP code that returns the YAML
+representation of configuration. In order to use the YAML writer, we need to pass a
+callback to an external PHP library, or use the
+[YAML PECL extension](http://www.php.net/manual/en/book.yaml.php).
+
+### Using Zend\\Config\\Writer\\Yaml
+
+Consider the following code, which creates a configuration structure using the
+YAML PECL extension:
+
+```php
+// Create the config object
+$config = new Zend\Config\Config([], true);
+$config->production = [];
+
+$config->production->webhost = 'www.example.com';
+$config->production->database = [];
+$config->production->database->params = [];
+$config->production->database->params->host = 'localhost';
+$config->production->database->params->username = 'production';
+$config->production->database->params->password = 'secret';
+$config->production->database->params->dbname = 'dbproduction';
+
+$writer = new Zend\Config\Writer\Yaml();
+echo $writer->toString($config);
+```
+
+The result of this code is the following YAML string contains the following value:
+
+```yaml
+webhost: www.example.com
+database:
+    params:
+      host:     localhost
+      username: production
+      password: secret
+      dbname:   dbproduction
+```
+
+You can use the method `toFile()` to save the YAML data to a file.
+
+If you want to use an external YAML writer library, pass the callback function
+that will generate the YAML from the configuration when instantiating the
+writer.  For instance, to use the [Spyc](http://code.google.com/p/spyc/)
+library:
+
+```php
+// include the Spyc library
+require_once 'path/to/spyc.php';
+
+$writer = new Zend\Config\Writer\Yaml(['Spyc', 'YAMLDump']);
+echo $writer->toString($config);
+```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/mkdocs.yml
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/mkdocs.yml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/mkdocs.yml	(revision 5534)
@@ -0,0 +1,15 @@
+docs_dir: doc/book
+site_dir: doc/html
+pages:
+    - index.md
+    - Introduction: intro.md
+    - "Theory of Operation": theory.md
+    - Reference:
+      - "Zend\\Config\\Reader": reader.md
+      - "Zend\\Config\\Writer": writer.md
+      - "Zend\\Config\\Processor": processor.md
+      - "Config Factory": factory.md
+site_name: zend-config
+site_description: Zend\Config
+repo_url: 'https://github.com/zendframework/zend-config'
+copyright: 'Copyright (c) 2016 <a href="http://www.zend.com/">Zend Technologies USA Inc.</a>'
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/AbstractConfigFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/AbstractConfigFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/AbstractConfigFactory.php	(revision 5534)
@@ -0,0 +1,199 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config;
+
+use Interop\Container\ContainerInterface;
+use Traversable;
+use Zend\ServiceManager\AbstractFactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+/**
+ * Class AbstractConfigFactory
+ */
+class AbstractConfigFactory implements AbstractFactoryInterface
+{
+    /**
+     * @var array
+     */
+    protected $configs = [];
+
+    /**
+     * @var string[]
+     */
+    protected $defaultPatterns = [
+        '#config[\._-](.*)$#i',
+        '#^(.*)[\\\\\._-]config$#i'
+    ];
+
+    /**
+     * @var string[]
+     */
+    protected $patterns;
+
+    /**
+     * Determine if we can create a service with name (SM v2)
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @param $name
+     * @param $requestedName
+     * @return bool
+     */
+    public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
+    {
+        return $this->canCreate($serviceLocator, $requestedName);
+    }
+
+    /**
+     * Determine if we can create a service (SM v3)
+     *
+     * @param ContainerInterface $container
+     * @param string $requestedName
+     * @return bool
+     */
+    public function canCreate(ContainerInterface $container, $requestedName)
+    {
+        if (isset($this->configs[$requestedName])) {
+            return true;
+        }
+
+        if (! $container->has('Config')) {
+            return false;
+        }
+
+        $key = $this->match($requestedName);
+        if (null === $key) {
+            return false;
+        }
+
+        $config = $container->get('Config');
+        return isset($config[$key]);
+    }
+
+    /**
+     * Create service with name (SM v2)
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @param string $name
+     * @param string $requestedName
+     * @return string|mixed|array
+     */
+    public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
+    {
+        return $this($serviceLocator, $requestedName);
+    }
+
+    /**
+     * Create service with name (SM v3)
+     *
+     * @param ContainerInterface $container
+     * @param string $requestedName
+     * @param array $options
+     * @return string|mixed|array
+     */
+    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
+    {
+        if (isset($this->configs[$requestedName])) {
+            return $this->configs[$requestedName];
+        }
+
+        $key = $this->match($requestedName);
+        if (isset($this->configs[$key])) {
+            $this->configs[$requestedName] = $this->configs[$key];
+            return $this->configs[$key];
+        }
+
+        $config = $container->get('Config');
+        $this->configs[$requestedName] = $this->configs[$key] = $config[$key];
+        return $config[$key];
+    }
+
+    /**
+     * @param string $pattern
+     * @return self
+     * @throws Exception\InvalidArgumentException
+     */
+    public function addPattern($pattern)
+    {
+        if (!is_string($pattern)) {
+            throw new Exception\InvalidArgumentException('pattern must be string');
+        }
+
+        $patterns = $this->getPatterns();
+        array_unshift($patterns, $pattern);
+        $this->setPatterns($patterns);
+        return $this;
+    }
+
+    /**
+     * @param array|Traversable $patterns
+     * @return self
+     * @throws Exception\InvalidArgumentException
+     */
+    public function addPatterns($patterns)
+    {
+        if ($patterns instanceof Traversable) {
+            $patterns = iterator_to_array($patterns);
+        }
+
+        if (!is_array($patterns)) {
+            throw new Exception\InvalidArgumentException("patterns must be array or Traversable");
+        }
+
+        foreach ($patterns as $pattern) {
+            $this->addPattern($pattern);
+        }
+
+        return $this;
+    }
+
+    /**
+     * @param array|Traversable $patterns
+     * @return self
+     * @throws \InvalidArgumentException
+     */
+    public function setPatterns($patterns)
+    {
+        if ($patterns instanceof Traversable) {
+            $patterns = iterator_to_array($patterns);
+        }
+
+        if (!is_array($patterns)) {
+            throw new \InvalidArgumentException("patterns must be array or Traversable");
+        }
+
+        $this->patterns = $patterns;
+        return $this;
+    }
+
+    /**
+     * @return array
+     */
+    public function getPatterns()
+    {
+        if (null === $this->patterns) {
+            $this->setPatterns($this->defaultPatterns);
+        }
+        return $this->patterns;
+    }
+
+    /**
+     * @param string $requestedName
+     * @return null|string
+     */
+    protected function match($requestedName)
+    {
+        foreach ($this->getPatterns() as $pattern) {
+            if (preg_match($pattern, $requestedName, $matches)) {
+                return $matches[1];
+            }
+        }
+        return;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Config.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Config.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Config.php	(revision 5534)
@@ -0,0 +1,386 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config;
+
+use ArrayAccess;
+use Countable;
+use Iterator;
+
+/**
+ * Provides a property based interface to an array.
+ * The data are read-only unless $allowModifications is set to true
+ * on construction.
+ *
+ * Implements Countable, Iterator and ArrayAccess
+ * to facilitate easy access to the data.
+ */
+class Config implements Countable, Iterator, ArrayAccess
+{
+    /**
+     * Whether modifications to configuration data are allowed.
+     *
+     * @var bool
+     */
+    protected $allowModifications;
+
+    /**
+     * Data within the configuration.
+     *
+     * @var array
+     */
+    protected $data = [];
+
+    /**
+     * Used when unsetting values during iteration to ensure we do not skip
+     * the next element.
+     *
+     * @var bool
+     */
+    protected $skipNextIteration;
+
+    /**
+     * Constructor.
+     *
+     * Data is read-only unless $allowModifications is set to true
+     * on construction.
+     *
+     * @param  array   $array
+     * @param  bool $allowModifications
+     */
+    public function __construct(array $array, $allowModifications = false)
+    {
+        $this->allowModifications = (bool) $allowModifications;
+
+        foreach ($array as $key => $value) {
+            if (is_array($value)) {
+                $this->data[$key] = new static($value, $this->allowModifications);
+            } else {
+                $this->data[$key] = $value;
+            }
+        }
+    }
+
+    /**
+     * Retrieve a value and return $default if there is no element set.
+     *
+     * @param  string $name
+     * @param  mixed  $default
+     * @return mixed
+     */
+    public function get($name, $default = null)
+    {
+        if (array_key_exists($name, $this->data)) {
+            return $this->data[$name];
+        }
+
+        return $default;
+    }
+
+    /**
+     * Magic function so that $obj->value will work.
+     *
+     * @param  string $name
+     * @return mixed
+     */
+    public function __get($name)
+    {
+        return $this->get($name);
+    }
+
+    /**
+     * Set a value in the config.
+     *
+     * Only allow setting of a property if $allowModifications  was set to true
+     * on construction. Otherwise, throw an exception.
+     *
+     * @param  string $name
+     * @param  mixed  $value
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    public function __set($name, $value)
+    {
+        if ($this->allowModifications) {
+            if (is_array($value)) {
+                $value = new static($value, true);
+            }
+
+            if (null === $name) {
+                $this->data[] = $value;
+            } else {
+                $this->data[$name] = $value;
+            }
+        } else {
+            throw new Exception\RuntimeException('Config is read only');
+        }
+    }
+
+    /**
+     * Deep clone of this instance to ensure that nested Zend\Configs are also
+     * cloned.
+     *
+     * @return void
+     */
+    public function __clone()
+    {
+        $array = [];
+
+        foreach ($this->data as $key => $value) {
+            if ($value instanceof self) {
+                $array[$key] = clone $value;
+            } else {
+                $array[$key] = $value;
+            }
+        }
+
+        $this->data = $array;
+    }
+
+    /**
+     * Return an associative array of the stored data.
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $array = [];
+        $data  = $this->data;
+
+        /** @var self $value */
+        foreach ($data as $key => $value) {
+            if ($value instanceof self) {
+                $array[$key] = $value->toArray();
+            } else {
+                $array[$key] = $value;
+            }
+        }
+
+        return $array;
+    }
+
+    /**
+     * isset() overloading
+     *
+     * @param  string $name
+     * @return bool
+     */
+    public function __isset($name)
+    {
+        return isset($this->data[$name]);
+    }
+
+    /**
+     * unset() overloading
+     *
+     * @param  string $name
+     * @return void
+     * @throws Exception\InvalidArgumentException
+     */
+    public function __unset($name)
+    {
+        if (!$this->allowModifications) {
+            throw new Exception\InvalidArgumentException('Config is read only');
+        } elseif (isset($this->data[$name])) {
+            unset($this->data[$name]);
+            $this->skipNextIteration = true;
+        }
+    }
+
+    /**
+     * count(): defined by Countable interface.
+     *
+     * @see    Countable::count()
+     * @return int
+     */
+    public function count()
+    {
+        return count($this->data);
+    }
+
+    /**
+     * current(): defined by Iterator interface.
+     *
+     * @see    Iterator::current()
+     * @return mixed
+     */
+    public function current()
+    {
+        $this->skipNextIteration = false;
+        return current($this->data);
+    }
+
+    /**
+     * key(): defined by Iterator interface.
+     *
+     * @see    Iterator::key()
+     * @return mixed
+     */
+    public function key()
+    {
+        return key($this->data);
+    }
+
+    /**
+     * next(): defined by Iterator interface.
+     *
+     * @see    Iterator::next()
+     * @return void
+     */
+    public function next()
+    {
+        if ($this->skipNextIteration) {
+            $this->skipNextIteration = false;
+            return;
+        }
+
+        next($this->data);
+    }
+
+    /**
+     * rewind(): defined by Iterator interface.
+     *
+     * @see    Iterator::rewind()
+     * @return void
+     */
+    public function rewind()
+    {
+        $this->skipNextIteration = false;
+        reset($this->data);
+    }
+
+    /**
+     * valid(): defined by Iterator interface.
+     *
+     * @see    Iterator::valid()
+     * @return bool
+     */
+    public function valid()
+    {
+        return ($this->key() !== null);
+    }
+
+    /**
+     * offsetExists(): defined by ArrayAccess interface.
+     *
+     * @see    ArrayAccess::offsetExists()
+     * @param  mixed $offset
+     * @return bool
+     */
+    public function offsetExists($offset)
+    {
+        return $this->__isset($offset);
+    }
+
+    /**
+     * offsetGet(): defined by ArrayAccess interface.
+     *
+     * @see    ArrayAccess::offsetGet()
+     * @param  mixed $offset
+     * @return mixed
+     */
+    public function offsetGet($offset)
+    {
+        return $this->__get($offset);
+    }
+
+    /**
+     * offsetSet(): defined by ArrayAccess interface.
+     *
+     * @see    ArrayAccess::offsetSet()
+     * @param  mixed $offset
+     * @param  mixed $value
+     * @return void
+     */
+    public function offsetSet($offset, $value)
+    {
+        $this->__set($offset, $value);
+    }
+
+    /**
+     * offsetUnset(): defined by ArrayAccess interface.
+     *
+     * @see    ArrayAccess::offsetUnset()
+     * @param  mixed $offset
+     * @return void
+     */
+    public function offsetUnset($offset)
+    {
+        $this->__unset($offset);
+    }
+
+    /**
+     * Merge another Config with this one.
+     *
+     * For duplicate keys, the following will be performed:
+     * - Nested Configs will be recursively merged.
+     * - Items in $merge with INTEGER keys will be appended.
+     * - Items in $merge with STRING keys will overwrite current values.
+     *
+     * @param  Config $merge
+     * @return Config
+     */
+    public function merge(Config $merge)
+    {
+        /** @var Config $value */
+        foreach ($merge as $key => $value) {
+            if (array_key_exists($key, $this->data)) {
+                if (is_int($key)) {
+                    $this->data[] = $value;
+                } elseif ($value instanceof self && $this->data[$key] instanceof self) {
+                    $this->data[$key]->merge($value);
+                } else {
+                    if ($value instanceof self) {
+                        $this->data[$key] = new static($value->toArray(), $this->allowModifications);
+                    } else {
+                        $this->data[$key] = $value;
+                    }
+                }
+            } else {
+                if ($value instanceof self) {
+                    $this->data[$key] = new static($value->toArray(), $this->allowModifications);
+                } else {
+                    $this->data[$key] = $value;
+                }
+            }
+        }
+
+        return $this;
+    }
+
+    /**
+     * Prevent any more modifications being made to this instance.
+     *
+     * Useful after merge() has been used to merge multiple Config objects
+     * into one object which should then not be modified again.
+     *
+     * @return void
+     */
+    public function setReadOnly()
+    {
+        $this->allowModifications = false;
+
+        /** @var Config $value */
+        foreach ($this->data as $value) {
+            if ($value instanceof self) {
+                $value->setReadOnly();
+            }
+        }
+    }
+
+    /**
+     * Returns whether this Config object is read only or not.
+     *
+     * @return bool
+     */
+    public function isReadOnly()
+    {
+        return !$this->allowModifications;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Exception;
+
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Exception;
+
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Exception;
+
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Factory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Factory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Factory.php	(revision 5534)
@@ -0,0 +1,300 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config;
+
+use Zend\ServiceManager\ServiceManager;
+use Zend\Stdlib\ArrayUtils;
+
+class Factory
+{
+    /**
+     * Plugin manager for loading readers
+     *
+     * @var null|ReaderPluginManager
+     */
+    public static $readers = null;
+
+    /**
+     * Plugin manager for loading writers
+     *
+     * @var null|WriterPluginManager
+     */
+    public static $writers = null;
+
+    /**
+     * Registered config file extensions.
+     * key is extension, value is reader instance or plugin name
+     *
+     * @var array
+     */
+    protected static $extensions = [
+        'ini'         => 'ini',
+        'json'        => 'json',
+        'xml'         => 'xml',
+        'yaml'        => 'yaml',
+        'properties'  => 'javaproperties',
+    ];
+
+    /**
+     * Register config file extensions for writing
+     * key is extension, value is writer instance or plugin name
+     *
+     * @var array
+     */
+    protected static $writerExtensions = [
+        'php'  => 'php',
+        'ini'  => 'ini',
+        'json' => 'json',
+        'xml'  => 'xml',
+        'yaml' => 'yaml',
+    ];
+
+    /**
+     * Read a config from a file.
+     *
+     * @param  string  $filename
+     * @param  bool $returnConfigObject
+     * @param  bool $useIncludePath
+     * @return array|Config
+     * @throws Exception\InvalidArgumentException
+     * @throws Exception\RuntimeException
+     */
+    public static function fromFile($filename, $returnConfigObject = false, $useIncludePath = false)
+    {
+        $filepath = $filename;
+        if (!file_exists($filename)) {
+            if (!$useIncludePath) {
+                throw new Exception\RuntimeException(sprintf(
+                    'Filename "%s" cannot be found relative to the working directory',
+                    $filename
+                ));
+            }
+
+            $fromIncludePath = stream_resolve_include_path($filename);
+            if (!$fromIncludePath) {
+                throw new Exception\RuntimeException(sprintf(
+                    'Filename "%s" cannot be found relative to the working directory or the include_path ("%s")',
+                    $filename,
+                    get_include_path()
+                ));
+            }
+            $filepath = $fromIncludePath;
+        }
+
+        $pathinfo = pathinfo($filepath);
+
+        if (!isset($pathinfo['extension'])) {
+            throw new Exception\RuntimeException(sprintf(
+                'Filename "%s" is missing an extension and cannot be auto-detected',
+                $filename
+            ));
+        }
+
+        $extension = strtolower($pathinfo['extension']);
+
+        if ($extension === 'php') {
+            if (!is_file($filepath) || !is_readable($filepath)) {
+                throw new Exception\RuntimeException(sprintf(
+                    "File '%s' doesn't exist or not readable",
+                    $filename
+                ));
+            }
+
+            $config = include $filepath;
+        } elseif (isset(static::$extensions[$extension])) {
+            $reader = static::$extensions[$extension];
+            if (!$reader instanceof Reader\ReaderInterface) {
+                $reader = static::getReaderPluginManager()->get($reader);
+                static::$extensions[$extension] = $reader;
+            }
+
+            /* @var Reader\ReaderInterface $reader */
+            $config = $reader->fromFile($filepath);
+        } else {
+            throw new Exception\RuntimeException(sprintf(
+                'Unsupported config file extension: .%s',
+                $pathinfo['extension']
+            ));
+        }
+
+        return ($returnConfigObject) ? new Config($config) : $config;
+    }
+
+    /**
+     * Read configuration from multiple files and merge them.
+     *
+     * @param  array   $files
+     * @param  bool $returnConfigObject
+     * @param  bool $useIncludePath
+     * @return array|Config
+     */
+    public static function fromFiles(array $files, $returnConfigObject = false, $useIncludePath = false)
+    {
+        $config = [];
+
+        foreach ($files as $file) {
+            $config = ArrayUtils::merge($config, static::fromFile($file, false, $useIncludePath));
+        }
+
+        return ($returnConfigObject) ? new Config($config) : $config;
+    }
+
+    /**
+     * Writes a config to a file
+     *
+     * @param string $filename
+     * @param array|Config $config
+     * @return bool TRUE on success | FALSE on failure
+     * @throws Exception\RuntimeException
+     * @throws Exception\InvalidArgumentException
+     */
+    public static function toFile($filename, $config)
+    {
+        if ((is_object($config) && !($config instanceof Config))
+            || (!is_object($config) && !is_array($config))
+        ) {
+            throw new Exception\InvalidArgumentException(
+                __METHOD__." \$config should be an array or instance of Zend\\Config\\Config"
+            );
+        }
+
+        $extension = substr(strrchr($filename, '.'), 1);
+        $directory = dirname($filename);
+
+        if (!is_dir($directory)) {
+            throw new Exception\RuntimeException(
+                "Directory '{$directory}' does not exists!"
+            );
+        }
+
+        if (!is_writable($directory)) {
+            throw new Exception\RuntimeException(
+                "Cannot write in directory '{$directory}'"
+            );
+        }
+
+        if (!isset(static::$writerExtensions[$extension])) {
+            throw new Exception\RuntimeException(
+                "Unsupported config file extension: '.{$extension}' for writing."
+            );
+        }
+
+        $writer = static::$writerExtensions[$extension];
+        if (($writer instanceof Writer\AbstractWriter) === false) {
+            $writer = self::getWriterPluginManager()->get($writer);
+            static::$writerExtensions[$extension] = $writer;
+        }
+
+        if (is_object($config)) {
+            $config = $config->toArray();
+        }
+
+        $content = $writer->processConfig($config);
+
+        return (bool) (file_put_contents($filename, $content) !== false);
+    }
+
+    /**
+     * Set reader plugin manager
+     *
+     * @param ReaderPluginManager $readers
+     * @return void
+     */
+    public static function setReaderPluginManager(ReaderPluginManager $readers)
+    {
+        static::$readers = $readers;
+    }
+
+    /**
+     * Get the reader plugin manager
+     *
+     * @return ReaderPluginManager
+     */
+    public static function getReaderPluginManager()
+    {
+        if (static::$readers === null) {
+            static::$readers = new ReaderPluginManager(new ServiceManager());
+        }
+        return static::$readers;
+    }
+
+    /**
+     * Set writer plugin manager
+     *
+     * @param WriterPluginManager $writers
+     * @return void
+     */
+    public static function setWriterPluginManager(WriterPluginManager $writers)
+    {
+        static::$writers = $writers;
+    }
+
+    /**
+     * Get the writer plugin manager
+     *
+     * @return WriterPluginManager
+     */
+    public static function getWriterPluginManager()
+    {
+        if (static::$writers === null) {
+            static::$writers = new WriterPluginManager(new ServiceManager());
+        }
+
+        return static::$writers;
+    }
+
+    /**
+     * Set config reader for file extension
+     *
+     * @param  string $extension
+     * @param  string|Reader\ReaderInterface $reader
+     * @throws Exception\InvalidArgumentException
+     * @return void
+     */
+    public static function registerReader($extension, $reader)
+    {
+        $extension = strtolower($extension);
+
+        if (!is_string($reader) && !$reader instanceof Reader\ReaderInterface) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                'Reader should be plugin name, class name or ' .
+                'instance of %s\Reader\ReaderInterface; received "%s"',
+                __NAMESPACE__,
+                (is_object($reader) ? get_class($reader) : gettype($reader))
+            ));
+        }
+
+        static::$extensions[$extension] = $reader;
+    }
+
+    /**
+     * Set config writer for file extension
+     *
+     * @param string $extension
+     * @param string|Writer\AbstractWriter $writer
+     * @throws Exception\InvalidArgumentException
+     * @return void
+     */
+    public static function registerWriter($extension, $writer)
+    {
+        $extension = strtolower($extension);
+
+        if (!is_string($writer) && !$writer instanceof Writer\AbstractWriter) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                'Writer should be plugin name, class name or ' .
+                'instance of %s\Writer\AbstractWriter; received "%s"',
+                __NAMESPACE__,
+                (is_object($writer) ? get_class($writer) : gettype($writer))
+            ));
+        }
+
+        static::$writerExtensions[$extension] = $writer;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Constant.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Constant.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Constant.php	(revision 5534)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Processor;
+
+class Constant extends Token implements ProcessorInterface
+{
+    /**
+     * Replace only user-defined tokens
+     *
+     * @var bool
+     */
+    protected $userOnly = true;
+
+    /**
+     * Constant Processor walks through a Config structure and replaces all
+     * PHP constants with their respective values
+     *
+     * @param bool   $userOnly              True to process only user-defined constants, false to process all PHP constants
+     * @param string $prefix                Optional prefix
+     * @param string $suffix                Optional suffix
+     * @return \Zend\Config\Processor\Constant
+     */
+    public function __construct($userOnly = true, $prefix = '', $suffix = '')
+    {
+        $this->setUserOnly($userOnly);
+        $this->setPrefix($prefix);
+        $this->setSuffix($suffix);
+
+        $this->loadConstants();
+    }
+
+    /**
+     * @return bool
+     */
+    public function getUserOnly()
+    {
+        return $this->userOnly;
+    }
+
+    /**
+     * Should we use only user-defined constants?
+     *
+     * @param  bool $userOnly
+     * @return Constant
+     */
+    public function setUserOnly($userOnly)
+    {
+        $this->userOnly = (bool) $userOnly;
+        return $this;
+    }
+
+    /**
+     * Load all currently defined constants into parser.
+     *
+     * @return void
+     */
+    public function loadConstants()
+    {
+        if ($this->userOnly) {
+            $constants = get_defined_constants(true);
+            $constants = isset($constants['user']) ? $constants['user'] : [];
+            $this->setTokens($constants);
+        } else {
+            $this->setTokens(get_defined_constants());
+        }
+    }
+
+    /**
+     * Get current token registry.
+     * @return array
+     */
+    public function getTokens()
+    {
+        return $this->tokens;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Filter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Filter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Filter.php	(revision 5534)
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Processor;
+
+use Zend\Config\Config;
+use Zend\Config\Exception;
+use Zend\Filter\FilterInterface as ZendFilter;
+
+class Filter implements ProcessorInterface
+{
+    /**
+     * @var ZendFilter
+     */
+    protected $filter;
+
+    /**
+     * Filter all config values using the supplied Zend\Filter
+     *
+     * @param ZendFilter $filter
+     */
+    public function __construct(ZendFilter $filter)
+    {
+        $this->setFilter($filter);
+    }
+
+    /**
+     * @param  ZendFilter $filter
+     * @return Filter
+     */
+    public function setFilter(ZendFilter $filter)
+    {
+        $this->filter = $filter;
+        return $this;
+    }
+
+    /**
+     * @return ZendFilter
+     */
+    public function getFilter()
+    {
+        return $this->filter;
+    }
+
+    /**
+     * Process
+     *
+     * @param  Config $config
+     * @return Config
+     * @throws Exception\InvalidArgumentException
+     */
+    public function process(Config $config)
+    {
+        if ($config->isReadOnly()) {
+            throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
+        }
+
+        /**
+         * Walk through config and replace values
+         */
+        foreach ($config as $key => $val) {
+            if ($val instanceof Config) {
+                $this->process($val);
+            } else {
+                $config->$key = $this->filter->filter($val);
+            }
+        }
+
+        return $config;
+    }
+
+    /**
+     * Process a single value
+     *
+     * @param  mixed $value
+     * @return mixed
+     */
+    public function processValue($value)
+    {
+        return $this->filter->filter($value);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/ProcessorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/ProcessorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/ProcessorInterface.php	(revision 5534)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Processor;
+
+use Zend\Config\Config;
+
+interface ProcessorInterface
+{
+    /**
+     * Process the whole Config structure and recursively parse all its values.
+     *
+     * @param  Config $value
+     * @return Config
+     */
+    public function process(Config $value);
+
+    /**
+     * Process a single value
+     *
+     * @param  mixed $value
+     * @return mixed
+     */
+    public function processValue($value);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Queue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Queue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Queue.php	(revision 5534)
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Processor;
+
+use Zend\Config\Config;
+use Zend\Config\Exception;
+use Zend\Stdlib\PriorityQueue;
+
+class Queue extends PriorityQueue implements ProcessorInterface
+{
+    /**
+     * Process the whole config structure with each parser in the queue.
+     *
+     * @param  Config $config
+     * @return Config
+     * @throws Exception\InvalidArgumentException
+     */
+    public function process(Config $config)
+    {
+        if ($config->isReadOnly()) {
+            throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
+        }
+
+        foreach ($this as $parser) {
+            /** @var $parser ProcessorInterface */
+            $parser->process($config);
+        }
+    }
+
+    /**
+     * Process a single value
+     *
+     * @param  mixed $value
+     * @return mixed
+     */
+    public function processValue($value)
+    {
+        foreach ($this as $parser) {
+            /** @var $parser ProcessorInterface */
+            $value = $parser->processValue($value);
+        }
+
+        return $value;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Token.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Token.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Token.php	(revision 5534)
@@ -0,0 +1,273 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Processor;
+
+use Traversable;
+use Zend\Config\Config;
+use Zend\Config\Exception;
+
+class Token implements ProcessorInterface
+{
+    /**
+     * Token prefix.
+     *
+     * @var string
+     */
+    protected $prefix = '';
+
+    /**
+     * Token suffix.
+     *
+     * @var string
+     */
+    protected $suffix = '';
+
+    /**
+     * The registry of tokens
+     *
+     * @var array
+     */
+    protected $tokens = [];
+
+    /**
+     * Replacement map
+     *
+     * @var array
+     */
+    protected $map = null;
+
+    /**
+     * Token Processor walks through a Config structure and replaces all
+     * occurrences of tokens with supplied values.
+     *
+     * @param  array|Config|Traversable   $tokens  Associative array of TOKEN => value
+     *                                             to replace it with
+     * @param    string $prefix
+     * @param    string $suffix
+     * @return   Token
+     */
+    public function __construct($tokens = [], $prefix = '', $suffix = '')
+    {
+        $this->setTokens($tokens);
+        $this->setPrefix($prefix);
+        $this->setSuffix($suffix);
+    }
+
+    /**
+     * @param  string $prefix
+     * @return Token
+     */
+    public function setPrefix($prefix)
+    {
+        // reset map
+        $this->map = null;
+        $this->prefix = $prefix;
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getPrefix()
+    {
+        return $this->prefix;
+    }
+
+    /**
+     * @param  string $suffix
+     * @return Token
+     */
+    public function setSuffix($suffix)
+    {
+        // reset map
+        $this->map = null;
+        $this->suffix = $suffix;
+
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getSuffix()
+    {
+        return $this->suffix;
+    }
+
+    /**
+     * Set token registry.
+     *
+     * @param  array|Config|Traversable  $tokens  Associative array of TOKEN => value
+     *                                            to replace it with
+     * @return Token
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setTokens($tokens)
+    {
+        if (is_array($tokens)) {
+            $this->tokens = $tokens;
+        } elseif ($tokens instanceof Config) {
+            $this->tokens = $tokens->toArray();
+        } elseif ($tokens instanceof Traversable) {
+            $this->tokens = [];
+            foreach ($tokens as $key => $val) {
+                $this->tokens[$key] = $val;
+            }
+        } else {
+            throw new Exception\InvalidArgumentException('Cannot use ' . gettype($tokens) . ' as token registry.');
+        }
+
+        // reset map
+        $this->map = null;
+
+        return $this;
+    }
+
+    /**
+     * Get current token registry.
+     *
+     * @return array
+     */
+    public function getTokens()
+    {
+        return $this->tokens;
+    }
+
+    /**
+     * Add new token.
+     *
+     * @param  string $token
+     * @param  mixed $value
+     * @return Token
+     * @throws Exception\InvalidArgumentException
+     */
+    public function addToken($token, $value)
+    {
+        if (!is_scalar($token)) {
+            throw new Exception\InvalidArgumentException('Cannot use ' . gettype($token) . ' as token name.');
+        }
+        $this->tokens[$token] = $value;
+
+        // reset map
+        $this->map = null;
+
+        return $this;
+    }
+
+    /**
+     * Add new token.
+     *
+     * @param string $token
+     * @param mixed $value
+     * @return Token
+     */
+    public function setToken($token, $value)
+    {
+        return $this->addToken($token, $value);
+    }
+
+    /**
+     * Build replacement map
+     *
+     * @return array
+     */
+    protected function buildMap()
+    {
+        if (null === $this->map) {
+            if (!$this->suffix && !$this->prefix) {
+                $this->map = $this->tokens;
+            } else {
+                $this->map = [];
+
+                foreach ($this->tokens as $token => $value) {
+                    $this->map[$this->prefix . $token . $this->suffix] = $value;
+                }
+            }
+
+            foreach (array_keys($this->map) as $key) {
+                if (empty($key)) {
+                    unset($this->map[$key]);
+                }
+            }
+        }
+
+        return $this->map;
+    }
+
+    /**
+     * Process
+     *
+     * @param  Config $config
+     * @return Config
+     * @throws Exception\InvalidArgumentException
+     */
+    public function process(Config $config)
+    {
+        return $this->doProcess($config, $this->buildMap());
+    }
+
+    /**
+     * Process a single value
+     *
+     * @param $value
+     * @return mixed
+     */
+    public function processValue($value)
+    {
+        return $this->doProcess($value, $this->buildMap());
+    }
+
+    /**
+     * Applies replacement map to the given value by modifying the value itself
+     *
+     * @param mixed $value
+     * @param array $replacements
+     *
+     * @return mixed
+     *
+     * @throws Exception\InvalidArgumentException if the provided value is a read-only {@see Config}
+     */
+    private function doProcess($value, array $replacements)
+    {
+        if ($value instanceof Config) {
+            if ($value->isReadOnly()) {
+                throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
+            }
+
+            foreach ($value as $key => $val) {
+                $value->$key = $this->doProcess($val, $replacements);
+            }
+
+            return $value;
+        }
+
+        if ($value instanceof Traversable || is_array($value)) {
+            foreach ($value as & $val) {
+                $val = $this->doProcess($val, $replacements);
+            }
+
+            return $value;
+        }
+
+        if (!is_string($value) && (is_bool($value) || is_numeric($value))) {
+            $stringVal  = (string) $value;
+            $changedVal = strtr($stringVal, $this->map);
+
+            // replace the value only if a string replacement occurred
+            if ($changedVal !== $stringVal) {
+                return $changedVal;
+            }
+
+            return $value;
+        }
+
+        return strtr((string) $value, $this->map);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Translator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Translator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Processor/Translator.php	(revision 5534)
@@ -0,0 +1,139 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Processor;
+
+use Zend\Config\Config;
+use Zend\Config\Exception;
+use Zend\I18n\Translator\Translator as ZendTranslator;
+
+class Translator implements ProcessorInterface
+{
+    /**
+     * @var ZendTranslator
+     */
+    protected $translator;
+
+    /**
+     * @var string|null
+     */
+    protected $locale = null;
+
+    /**
+     * @var string
+     */
+    protected $textDomain = 'default';
+
+    /**
+     * Translator uses the supplied Zend\I18n\Translator\Translator to find
+     * and translate language strings in config.
+     *
+     * @param  ZendTranslator $translator
+     * @param  string $textDomain
+     * @param  string|null $locale
+     */
+    public function __construct(ZendTranslator $translator, $textDomain = 'default', $locale = null)
+    {
+        $this->setTranslator($translator);
+        $this->setTextDomain($textDomain);
+        $this->setLocale($locale);
+    }
+
+    /**
+     * @param  ZendTranslator $translator
+     * @return Translator
+     */
+    public function setTranslator(ZendTranslator $translator)
+    {
+        $this->translator = $translator;
+        return $this;
+    }
+
+    /**
+     * @return ZendTranslator
+     */
+    public function getTranslator()
+    {
+        return $this->translator;
+    }
+
+    /**
+     * @param  string|null $locale
+     * @return Translator
+     */
+    public function setLocale($locale)
+    {
+        $this->locale = $locale;
+        return $this;
+    }
+
+    /**
+     * @return string|null
+     */
+    public function getLocale()
+    {
+        return $this->locale;
+    }
+
+    /**
+     * @param  string $textDomain
+     * @return Translator
+     */
+    public function setTextDomain($textDomain)
+    {
+        $this->textDomain = $textDomain;
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getTextDomain()
+    {
+        return $this->textDomain;
+    }
+
+    /**
+     * Process
+     *
+     * @param  Config $config
+     * @return Config
+     * @throws Exception\InvalidArgumentException
+     */
+    public function process(Config $config)
+    {
+        if ($config->isReadOnly()) {
+            throw new Exception\InvalidArgumentException('Cannot process config because it is read-only');
+        }
+
+        /**
+         * Walk through config and replace values
+         */
+        foreach ($config as $key => $val) {
+            if ($val instanceof Config) {
+                $this->process($val);
+            } else {
+                $config->{$key} = $this->translator->translate($val, $this->textDomain, $this->locale);
+            }
+        }
+
+        return $config;
+    }
+
+    /**
+     * Process a single value
+     *
+     * @param $value
+     * @return string
+     */
+    public function processValue($value)
+    {
+        return $this->translator->translate($value, $this->textDomain, $this->locale);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Ini.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Ini.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Ini.php	(revision 5534)
@@ -0,0 +1,225 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Reader;
+
+use Zend\Config\Exception;
+
+/**
+ * INI config reader.
+ */
+class Ini implements ReaderInterface
+{
+    /**
+     * Separator for nesting levels of configuration data identifiers.
+     *
+     * @var string
+     */
+    protected $nestSeparator = '.';
+
+    /**
+     * Directory of the file to process.
+     *
+     * @var string
+     */
+    protected $directory;
+
+    /**
+     * Set nest separator.
+     *
+     * @param  string $separator
+     * @return self
+     */
+    public function setNestSeparator($separator)
+    {
+        $this->nestSeparator = $separator;
+        return $this;
+    }
+
+    /**
+     * Get nest separator.
+     *
+     * @return string
+     */
+    public function getNestSeparator()
+    {
+        return $this->nestSeparator;
+    }
+
+    /**
+     * fromFile(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromFile()
+     * @param  string $filename
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function fromFile($filename)
+    {
+        if (!is_file($filename) || !is_readable($filename)) {
+            throw new Exception\RuntimeException(sprintf(
+                "File '%s' doesn't exist or not readable",
+                $filename
+            ));
+        }
+
+        $this->directory = dirname($filename);
+
+        set_error_handler(
+            function ($error, $message = '') use ($filename) {
+                throw new Exception\RuntimeException(
+                    sprintf('Error reading INI file "%s": %s', $filename, $message),
+                    $error
+                );
+            },
+            E_WARNING
+        );
+        $ini = parse_ini_file($filename, true);
+        restore_error_handler();
+
+        return $this->process($ini);
+    }
+
+    /**
+     * fromString(): defined by Reader interface.
+     *
+     * @param  string $string
+     * @return array|bool
+     * @throws Exception\RuntimeException
+     */
+    public function fromString($string)
+    {
+        if (empty($string)) {
+            return [];
+        }
+        $this->directory = null;
+
+        set_error_handler(
+            function ($error, $message = '') {
+                throw new Exception\RuntimeException(
+                    sprintf('Error reading INI string: %s', $message),
+                    $error
+                );
+            },
+            E_WARNING
+        );
+        $ini = parse_ini_string($string, true);
+        restore_error_handler();
+
+        return $this->process($ini);
+    }
+
+    /**
+     * Process data from the parsed ini file.
+     *
+     * @param  array $data
+     * @return array
+     */
+    protected function process(array $data)
+    {
+        $config = [];
+
+        foreach ($data as $section => $value) {
+            if (is_array($value)) {
+                if (strpos($section, $this->nestSeparator) !== false) {
+                    $sections = explode($this->nestSeparator, $section);
+                    $config = array_merge_recursive($config, $this->buildNestedSection($sections, $value));
+                } else {
+                    $config[$section] = $this->processSection($value);
+                }
+            } else {
+                $this->processKey($section, $value, $config);
+            }
+        }
+
+        return $config;
+    }
+
+    /**
+     * Process a nested section
+     *
+     * @param array $sections
+     * @param mixed $value
+     * @return array
+     */
+    private function buildNestedSection($sections, $value)
+    {
+        if (count($sections) == 0) {
+            return $this->processSection($value);
+        }
+
+        $nestedSection = [];
+
+        $first = array_shift($sections);
+        $nestedSection[$first] = $this->buildNestedSection($sections, $value);
+
+        return $nestedSection;
+    }
+
+    /**
+     * Process a section.
+     *
+     * @param  array $section
+     * @return array
+     */
+    protected function processSection(array $section)
+    {
+        $config = [];
+
+        foreach ($section as $key => $value) {
+            $this->processKey($key, $value, $config);
+        }
+
+        return $config;
+    }
+
+    /**
+     * Process a key.
+     *
+     * @param  string $key
+     * @param  string $value
+     * @param  array  $config
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    protected function processKey($key, $value, array &$config)
+    {
+        if (strpos($key, $this->nestSeparator) !== false) {
+            $pieces = explode($this->nestSeparator, $key, 2);
+
+            if (!strlen($pieces[0]) || !strlen($pieces[1])) {
+                throw new Exception\RuntimeException(sprintf('Invalid key "%s"', $key));
+            } elseif (!isset($config[$pieces[0]])) {
+                if ($pieces[0] === '0' && !empty($config)) {
+                    $config = [$pieces[0] => $config];
+                } else {
+                    $config[$pieces[0]] = [];
+                }
+            } elseif (!is_array($config[$pieces[0]])) {
+                throw new Exception\RuntimeException(
+                    sprintf('Cannot create sub-key for "%s", as key already exists', $pieces[0])
+                );
+            }
+
+            $this->processKey($pieces[1], $value, $config[$pieces[0]]);
+        } else {
+            if ($key === '@include') {
+                if ($this->directory === null) {
+                    throw new Exception\RuntimeException('Cannot process @include statement for a string config');
+                }
+
+                $reader  = clone $this;
+                $include = $reader->fromFile($this->directory . '/' . $value);
+                $config  = array_replace_recursive($config, $include);
+            } else {
+                $config[$key] = $value;
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/JavaProperties.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/JavaProperties.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/JavaProperties.php	(revision 5534)
@@ -0,0 +1,138 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Reader;
+
+use Zend\Config\Exception;
+
+/**
+ * Java-style properties config reader.
+ */
+class JavaProperties implements ReaderInterface
+{
+    /**
+     * Directory of the Java-style properties file
+     *
+     * @var string
+     */
+    protected $directory;
+
+    /**
+     * fromFile(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromFile()
+     * @param  string $filename
+     * @return array
+     * @throws Exception\RuntimeException if the file cannot be read
+     */
+    public function fromFile($filename)
+    {
+        if (!is_file($filename) || !is_readable($filename)) {
+            throw new Exception\RuntimeException(sprintf(
+                "File '%s' doesn't exist or not readable",
+                $filename
+            ));
+        }
+
+        $this->directory = dirname($filename);
+
+        $config = $this->parse(file_get_contents($filename));
+
+        return $this->process($config);
+    }
+
+    /**
+     * fromString(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromString()
+     * @param  string $string
+     * @return array
+     * @throws Exception\RuntimeException if an @include key is found
+     */
+    public function fromString($string)
+    {
+        if (empty($string)) {
+            return [];
+        }
+
+        $this->directory = null;
+
+        $config = $this->parse($string);
+
+        return $this->process($config);
+    }
+
+    /**
+     * Process the array for @include
+     *
+     * @param  array $data
+     * @return array
+     * @throws Exception\RuntimeException if an @include key is found
+     */
+    protected function process(array $data)
+    {
+        foreach ($data as $key => $value) {
+            if (trim($key) === '@include') {
+                if ($this->directory === null) {
+                    throw new Exception\RuntimeException('Cannot process @include statement for a string');
+                }
+                $reader = clone $this;
+                unset($data[$key]);
+                $data = array_replace_recursive($data, $reader->fromFile($this->directory . '/' . $value));
+            }
+        }
+        return $data;
+    }
+
+    /**
+     * Parse Java-style properties string
+     *
+     * @todo Support use of the equals sign "key=value" as key-value delimiter
+     * @todo Ignore whitespace that precedes text past the first line of multiline values
+     *
+     * @param  string $string
+     * @return array
+     */
+    protected function parse($string)
+    {
+        $result = [];
+        $lines = explode("\n", $string);
+        $key = "";
+        $isWaitingOtherLine = false;
+        foreach ($lines as $i => $line) {
+            // Ignore empty lines and commented lines
+            if (empty($line)
+               || (!$isWaitingOtherLine && strpos($line, "#") === 0)
+               || (!$isWaitingOtherLine && strpos($line, "!") === 0)) {
+                continue;
+            }
+
+            // Add a new key-value pair or append value to a previous pair
+            if (!$isWaitingOtherLine) {
+                $key = substr($line, 0, strpos($line, ':'));
+                $value = substr($line, strpos($line, ':') + 1, strlen($line));
+            } else {
+                $value .= $line;
+            }
+
+            // Check if ends with single '\' (indicating another line is expected)
+            if (strrpos($value, "\\") === strlen($value) - strlen("\\")) {
+                $value = substr($value, 0, strlen($value) - 1);
+                $isWaitingOtherLine = true;
+            } else {
+                $isWaitingOtherLine = false;
+            }
+
+            $result[$key] = stripslashes($value);
+            unset($lines[$i]);
+        }
+
+        return $result;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Json.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Json.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Json.php	(revision 5534)
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Reader;
+
+use Zend\Config\Exception;
+use Zend\Json\Exception as JsonException;
+use Zend\Json\Json as JsonFormat;
+
+/**
+ * JSON config reader.
+ */
+class Json implements ReaderInterface
+{
+    /**
+     * Directory of the JSON file
+     *
+     * @var string
+     */
+    protected $directory;
+
+    /**
+     * fromFile(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromFile()
+     * @param  string $filename
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function fromFile($filename)
+    {
+        if (!is_file($filename) || !is_readable($filename)) {
+            throw new Exception\RuntimeException(sprintf(
+                "File '%s' doesn't exist or not readable",
+                $filename
+            ));
+        }
+
+        $this->directory = dirname($filename);
+
+        try {
+            $config = JsonFormat::decode(file_get_contents($filename), JsonFormat::TYPE_ARRAY);
+        } catch (JsonException\RuntimeException $e) {
+            throw new Exception\RuntimeException($e->getMessage());
+        }
+
+        return $this->process($config);
+    }
+
+    /**
+     * fromString(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromString()
+     * @param  string $string
+     * @return array|bool
+     * @throws Exception\RuntimeException
+     */
+    public function fromString($string)
+    {
+        if (empty($string)) {
+            return [];
+        }
+
+        $this->directory = null;
+
+        try {
+            $config = JsonFormat::decode($string, JsonFormat::TYPE_ARRAY);
+        } catch (JsonException\RuntimeException $e) {
+            throw new Exception\RuntimeException($e->getMessage());
+        }
+
+        return $this->process($config);
+    }
+
+    /**
+     * Process the array for @include
+     *
+     * @param  array $data
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    protected function process(array $data)
+    {
+        foreach ($data as $key => $value) {
+            if (is_array($value)) {
+                $data[$key] = $this->process($value);
+            }
+            if (trim($key) === '@include') {
+                if ($this->directory === null) {
+                    throw new Exception\RuntimeException('Cannot process @include statement for a JSON string');
+                }
+                $reader = clone $this;
+                unset($data[$key]);
+                $data = array_replace_recursive($data, $reader->fromFile($this->directory . '/' . $value));
+            }
+        }
+        return $data;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/ReaderInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/ReaderInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/ReaderInterface.php	(revision 5534)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Reader;
+
+interface ReaderInterface
+{
+    /**
+     * Read from a file and create an array
+     *
+     * @param  string $filename
+     * @return array
+     */
+    public function fromFile($filename);
+
+    /**
+     * Read from a string and create an array
+     *
+     * @param  string $string
+     * @return array|bool
+     */
+    public function fromString($string);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Xml.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Xml.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Xml.php	(revision 5534)
@@ -0,0 +1,203 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Reader;
+
+use XMLReader;
+use Zend\Config\Exception;
+
+/**
+ * XML config reader.
+ */
+class Xml implements ReaderInterface
+{
+    /**
+     * XML Reader instance.
+     *
+     * @var XMLReader
+     */
+    protected $reader;
+
+    /**
+     * Directory of the file to process.
+     *
+     * @var string
+     */
+    protected $directory;
+
+    /**
+     * Nodes to handle as plain text.
+     *
+     * @var array
+     */
+    protected $textNodes = [
+        XMLReader::TEXT,
+        XMLReader::CDATA,
+        XMLReader::WHITESPACE,
+        XMLReader::SIGNIFICANT_WHITESPACE
+    ];
+
+    /**
+     * fromFile(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromFile()
+     * @param  string $filename
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function fromFile($filename)
+    {
+        if (!is_file($filename) || !is_readable($filename)) {
+            throw new Exception\RuntimeException(sprintf(
+                "File '%s' doesn't exist or not readable",
+                $filename
+            ));
+        }
+        $this->reader = new XMLReader();
+        $this->reader->open($filename, null, LIBXML_XINCLUDE);
+
+        $this->directory = dirname($filename);
+
+        set_error_handler(
+            function ($error, $message = '') use ($filename) {
+                throw new Exception\RuntimeException(
+                    sprintf('Error reading XML file "%s": %s', $filename, $message),
+                    $error
+                );
+            },
+            E_WARNING
+        );
+        $return = $this->process();
+        restore_error_handler();
+        $this->reader->close();
+
+        return $return;
+    }
+
+    /**
+     * fromString(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromString()
+     * @param  string $string
+     * @return array|bool
+     * @throws Exception\RuntimeException
+     */
+    public function fromString($string)
+    {
+        if (empty($string)) {
+            return [];
+        }
+        $this->reader = new XMLReader();
+
+        $this->reader->xml($string, null, LIBXML_XINCLUDE);
+
+        $this->directory = null;
+
+        set_error_handler(
+            function ($error, $message = '') {
+                throw new Exception\RuntimeException(
+                    sprintf('Error reading XML string: %s', $message),
+                    $error
+                );
+            },
+            E_WARNING
+        );
+        $return = $this->process();
+        restore_error_handler();
+        $this->reader->close();
+
+        return $return;
+    }
+
+    /**
+     * Process data from the created XMLReader.
+     *
+     * @return array
+     */
+    protected function process()
+    {
+        return $this->processNextElement();
+    }
+
+    /**
+     * Process the next inner element.
+     *
+     * @return mixed
+     */
+    protected function processNextElement()
+    {
+        $children = [];
+        $text     = '';
+
+        while ($this->reader->read()) {
+            if ($this->reader->nodeType === XMLReader::ELEMENT) {
+                if ($this->reader->depth === 0) {
+                    return $this->processNextElement();
+                }
+
+                $attributes = $this->getAttributes();
+                $name       = $this->reader->name;
+
+                if ($this->reader->isEmptyElement) {
+                    $child = [];
+                } else {
+                    $child = $this->processNextElement();
+                }
+
+                if ($attributes) {
+                    if (is_string($child)) {
+                        $child = ['_' => $child];
+                    }
+
+                    if (! is_array($child)) {
+                        $child = [];
+                    }
+
+                    $child = array_merge($child, $attributes);
+                }
+
+                if (isset($children[$name])) {
+                    if (!is_array($children[$name]) || !array_key_exists(0, $children[$name])) {
+                        $children[$name] = [$children[$name]];
+                    }
+
+                    $children[$name][] = $child;
+                } else {
+                    $children[$name] = $child;
+                }
+            } elseif ($this->reader->nodeType === XMLReader::END_ELEMENT) {
+                break;
+            } elseif (in_array($this->reader->nodeType, $this->textNodes)) {
+                $text .= $this->reader->value;
+            }
+        }
+
+        return $children ?: $text;
+    }
+
+    /**
+     * Get all attributes on the current node.
+     *
+     * @return array
+     */
+    protected function getAttributes()
+    {
+        $attributes = [];
+
+        if ($this->reader->hasAttributes) {
+            while ($this->reader->moveToNextAttribute()) {
+                $attributes[$this->reader->localName] = $this->reader->value;
+            }
+
+            $this->reader->moveToElement();
+        }
+
+        return $attributes;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Yaml.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Yaml.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Reader/Yaml.php	(revision 5534)
@@ -0,0 +1,159 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Reader;
+
+use Zend\Config\Exception;
+
+/**
+ * YAML config reader.
+ */
+class Yaml implements ReaderInterface
+{
+    /**
+     * Directory of the YAML file
+     *
+     * @var string
+     */
+    protected $directory;
+
+    /**
+     * YAML decoder callback
+     *
+     * @var callable
+     */
+    protected $yamlDecoder;
+
+    /**
+     * Constructor
+     *
+     * @param callable $yamlDecoder
+     */
+    public function __construct($yamlDecoder = null)
+    {
+        if ($yamlDecoder !== null) {
+            $this->setYamlDecoder($yamlDecoder);
+        } else {
+            if (function_exists('yaml_parse')) {
+                $this->setYamlDecoder('yaml_parse');
+            }
+        }
+    }
+
+    /**
+     * Set callback for decoding YAML
+     *
+     * @param  string|callable $yamlDecoder the decoder to set
+     * @return Yaml
+     * @throws Exception\RuntimeException
+     */
+    public function setYamlDecoder($yamlDecoder)
+    {
+        if (!is_callable($yamlDecoder)) {
+            throw new Exception\RuntimeException(
+                'Invalid parameter to setYamlDecoder() - must be callable'
+            );
+        }
+        $this->yamlDecoder = $yamlDecoder;
+        return $this;
+    }
+
+    /**
+     * Get callback for decoding YAML
+     *
+     * @return callable
+     */
+    public function getYamlDecoder()
+    {
+        return $this->yamlDecoder;
+    }
+
+    /**
+     * fromFile(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromFile()
+     * @param  string $filename
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public function fromFile($filename)
+    {
+        if (!is_file($filename) || !is_readable($filename)) {
+            throw new Exception\RuntimeException(sprintf(
+                "File '%s' doesn't exist or not readable",
+                $filename
+            ));
+        }
+
+        if (null === $this->getYamlDecoder()) {
+            throw new Exception\RuntimeException("You didn't specify a Yaml callback decoder");
+        }
+
+        $this->directory = dirname($filename);
+
+        $config = call_user_func($this->getYamlDecoder(), file_get_contents($filename));
+        if (null === $config) {
+            throw new Exception\RuntimeException("Error parsing YAML data");
+        }
+
+        return $this->process($config);
+    }
+
+    /**
+     * fromString(): defined by Reader interface.
+     *
+     * @see    ReaderInterface::fromString()
+     * @param  string $string
+     * @return array|bool
+     * @throws Exception\RuntimeException
+     */
+    public function fromString($string)
+    {
+        if (null === $this->getYamlDecoder()) {
+            throw new Exception\RuntimeException("You didn't specify a Yaml callback decoder");
+        }
+        if (empty($string)) {
+            return [];
+        }
+
+        $this->directory = null;
+
+        $config = call_user_func($this->getYamlDecoder(), $string);
+        if (null === $config) {
+            throw new Exception\RuntimeException("Error parsing YAML data");
+        }
+
+        return $this->process($config);
+    }
+
+    /**
+     * Process the array for @include
+     *
+     * @param  array $data
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    protected function process(array $data)
+    {
+        foreach ($data as $key => $value) {
+            if (is_array($value)) {
+                $data[$key] = $this->process($value);
+            }
+            if (trim($key) === '@include') {
+                if ($this->directory === null) {
+                    throw new Exception\RuntimeException('Cannot process @include statement for a json string');
+                }
+                $reader = clone $this;
+                unset($data[$key]);
+                $data = array_replace_recursive($data, $reader->fromFile($this->directory . '/' . $value));
+            }
+        }
+        return $data;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/ReaderPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/ReaderPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/ReaderPluginManager.php	(revision 5534)
@@ -0,0 +1,93 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config;
+
+use Interop\Container\ContainerInterface;
+use Zend\ServiceManager\AbstractPluginManager;
+use Zend\ServiceManager\Exception\InvalidServiceException;
+use Zend\ServiceManager\Factory\InvokableFactory;
+
+class ReaderPluginManager extends AbstractPluginManager
+{
+    protected $instanceOf = Reader\ReaderInterface::class;
+
+    protected $aliases = [
+        'ini'            => Reader\Ini::class,
+        'Ini'            => Reader\Ini::class,
+        'json'           => Reader\Json::class,
+        'Json'           => Reader\Json::class,
+        'xml'            => Reader\Xml::class,
+        'Xml'            => Reader\Xml::class,
+        'yaml'           => Reader\Yaml::class,
+        'Yaml'           => Reader\Yaml::class,
+        'javaproperties' => Reader\JavaProperties::class,
+        'javaProperties' => Reader\JavaProperties::class,
+        'JavaProperties' => Reader\JavaProperties::class,
+    ];
+
+    protected $factories = [
+        Reader\Ini::class            => InvokableFactory::class,
+        Reader\Json::class           => InvokableFactory::class,
+        Reader\Xml::class            => InvokableFactory::class,
+        Reader\Yaml::class           => InvokableFactory::class,
+        Reader\JavaProperties::class => InvokableFactory::class,
+        // Legacy (v2) due to alias resolution; canonical form of resolved
+        // alias is used to look up the factory, while the non-normalized
+        // resolved alias is used as the requested name passed to the factory.
+        'zendconfigreaderini'            => InvokableFactory::class,
+        'zendconfigreaderjson'           => InvokableFactory::class,
+        'zendconfigreaderxml'            => InvokableFactory::class,
+        'zendconfigreaderyaml'           => InvokableFactory::class,
+        'zendconfigreaderjavaproperties' => InvokableFactory::class,
+    ];
+
+    /**
+     * Validate the plugin is of the expected type (v3).
+     *
+     * Validates against `$instanceOf`.
+     *
+     * @param mixed $instance
+     * @throws InvalidServiceException
+     */
+    public function validate($instance)
+    {
+        if (! $instance instanceof $this->instanceOf) {
+            throw new InvalidServiceException(sprintf(
+                '%s can only create instances of %s; %s is invalid',
+                get_class($this),
+                $this->instanceOf,
+                (is_object($instance) ? get_class($instance) : gettype($instance))
+            ));
+        }
+    }
+
+    /**
+     * Validate the plugin is of the expected type (v2).
+     *
+     * Proxies to `validate()`.
+     *
+     * @param mixed $instance
+     * @throws Exception\InvalidArgumentException
+     */
+    public function validatePlugin($instance)
+    {
+        try {
+            $this->validate($instance);
+        } catch (InvalidServiceException $e) {
+            throw new Exception\InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
+        }
+    }
+
+    public function __construct(ContainerInterface $container, array $config = [])
+    {
+        $config = array_merge_recursive(['aliases' => $this->aliases], $config);
+        parent::__construct($container, $config);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/AbstractWriter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/AbstractWriter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/AbstractWriter.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+use Traversable;
+use Zend\Config\Exception;
+use Zend\Stdlib\ArrayUtils;
+
+abstract class AbstractWriter implements WriterInterface
+{
+    /**
+     * toFile(): defined by Writer interface.
+     *
+     * @see    WriterInterface::toFile()
+     * @param  string  $filename
+     * @param  mixed   $config
+     * @param  bool $exclusiveLock
+     * @return void
+     * @throws Exception\InvalidArgumentException
+     * @throws Exception\RuntimeException
+     */
+    public function toFile($filename, $config, $exclusiveLock = true)
+    {
+        if (empty($filename)) {
+            throw new Exception\InvalidArgumentException('No file name specified');
+        }
+
+        $flags = 0;
+        if ($exclusiveLock) {
+            $flags |= LOCK_EX;
+        }
+
+        set_error_handler(
+            function ($error, $message = '') use ($filename) {
+                throw new Exception\RuntimeException(
+                    sprintf('Error writing to "%s": %s', $filename, $message),
+                    $error
+                );
+            },
+            E_WARNING
+        );
+
+        try {
+            file_put_contents($filename, $this->toString($config), $flags);
+        } catch (\Exception $e) {
+            restore_error_handler();
+            throw $e;
+        }
+
+        restore_error_handler();
+    }
+
+    /**
+     * toString(): defined by Writer interface.
+     *
+     * @see    WriterInterface::toString()
+     * @param  mixed   $config
+     * @return string
+     * @throws Exception\InvalidArgumentException
+     */
+    public function toString($config)
+    {
+        if ($config instanceof Traversable) {
+            $config = ArrayUtils::iteratorToArray($config);
+        } elseif (!is_array($config)) {
+            throw new Exception\InvalidArgumentException(__METHOD__ . ' expects an array or Traversable config');
+        }
+
+        return $this->processConfig($config);
+    }
+
+    /**
+     * @param array $config
+     * @return string
+     */
+    abstract protected function processConfig(array $config);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Ini.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Ini.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Ini.php	(revision 5534)
@@ -0,0 +1,183 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+use Zend\Config\Exception;
+
+class Ini extends AbstractWriter
+{
+    /**
+     * Separator for nesting levels of configuration data identifiers.
+     *
+     * @var string
+     */
+    protected $nestSeparator = '.';
+
+    /**
+     * If true the INI string is rendered in the global namespace without
+     * sections.
+     *
+     * @var bool
+     */
+    protected $renderWithoutSections = false;
+
+    /**
+     * Set nest separator.
+     *
+     * @param  string $separator
+     * @return self
+     */
+    public function setNestSeparator($separator)
+    {
+        $this->nestSeparator = $separator;
+        return $this;
+    }
+
+    /**
+     * Get nest separator.
+     *
+     * @return string
+     */
+    public function getNestSeparator()
+    {
+        return $this->nestSeparator;
+    }
+
+    /**
+     * Set if rendering should occur without sections or not.
+     *
+     * If set to true, the INI file is rendered without sections completely
+     * into the global namespace of the INI file.
+     *
+     * @param  bool $withoutSections
+     * @return Ini
+     */
+    public function setRenderWithoutSectionsFlags($withoutSections)
+    {
+        $this->renderWithoutSections = (bool) $withoutSections;
+        return $this;
+    }
+
+    /**
+     * Return whether the writer should render without sections.
+     *
+     * @return bool
+     */
+    public function shouldRenderWithoutSections()
+    {
+        return $this->renderWithoutSections;
+    }
+
+    /**
+     * processConfig(): defined by AbstractWriter.
+     *
+     * @param  array $config
+     * @return string
+     */
+    public function processConfig(array $config)
+    {
+        $iniString = '';
+
+        if ($this->shouldRenderWithoutSections()) {
+            $iniString .= $this->addBranch($config);
+        } else {
+            $config = $this->sortRootElements($config);
+
+            foreach ($config as $sectionName => $data) {
+                if (!is_array($data)) {
+                    $iniString .= $sectionName
+                               .  ' = '
+                               .  $this->prepareValue($data)
+                               .  "\n";
+                } else {
+                    $iniString .= '[' . $sectionName . ']' . "\n"
+                               .  $this->addBranch($data)
+                               .  "\n";
+                }
+            }
+        }
+
+        return $iniString;
+    }
+
+    /**
+     * Add a branch to an INI string recursively.
+     *
+     * @param  array $config
+     * @param  array $parents
+     * @return string
+     */
+    protected function addBranch(array $config, $parents = [])
+    {
+        $iniString = '';
+
+        foreach ($config as $key => $value) {
+            $group = array_merge($parents, [$key]);
+
+            if (is_array($value)) {
+                $iniString .= $this->addBranch($value, $group);
+            } else {
+                $iniString .= implode($this->nestSeparator, $group)
+                           .  ' = '
+                           .  $this->prepareValue($value)
+                           .  "\n";
+            }
+        }
+
+        return $iniString;
+    }
+
+    /**
+     * Prepare a value for INI.
+     *
+     * @param  mixed $value
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    protected function prepareValue($value)
+    {
+        if (is_int($value) || is_float($value)) {
+            return $value;
+        } elseif (is_bool($value)) {
+            return ($value ? 'true' : 'false');
+        } elseif (false === strpos($value, '"')) {
+            return '"' . $value .  '"';
+        } else {
+            throw new Exception\RuntimeException('Value can not contain double quotes');
+        }
+    }
+
+    /**
+     * Root elements that are not assigned to any section needs to be on the
+     * top of config.
+     *
+     * @param  array $config
+     * @return array
+     */
+    protected function sortRootElements(array $config)
+    {
+        $sections = [];
+
+        // Remove sections from config array.
+        foreach ($config as $key => $value) {
+            if (is_array($value)) {
+                $sections[$key] = $value;
+                unset($config[$key]);
+            }
+        }
+
+        // Read sections to the end.
+        foreach ($sections as $key => $value) {
+            $config[$key] = $value;
+        }
+
+        return $config;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Json.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Json.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Json.php	(revision 5534)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+use Zend\Json\Json as JsonFormat;
+
+class Json extends AbstractWriter
+{
+    /**
+     * processConfig(): defined by AbstractWriter.
+     *
+     * @param  array $config
+     * @return string
+     */
+    public function processConfig(array $config)
+    {
+        return JsonFormat::encode($config);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/PhpArray.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/PhpArray.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/PhpArray.php	(revision 5534)
@@ -0,0 +1,238 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+use Zend\Config\Exception;
+
+class PhpArray extends AbstractWriter
+{
+    /**
+     * @var string
+     */
+    const INDENT_STRING = '    ';
+
+    /**
+     * @var bool
+     */
+    protected $useBracketArraySyntax = false;
+
+    /**
+     * @var bool
+     */
+    protected $useClassNameScalars = false;
+
+    /**
+     * processConfig(): defined by AbstractWriter.
+     *
+     * @param  array $config
+     * @return string
+     */
+    public function processConfig(array $config)
+    {
+        $arraySyntax = [
+            'open' => $this->useBracketArraySyntax ? '[' : 'array(',
+            'close' => $this->useBracketArraySyntax ? ']' : ')'
+        ];
+
+        return "<?php\n" .
+        "return " . $arraySyntax['open'] . "\n" . $this->processIndented($config, $arraySyntax) .
+        $arraySyntax['close'] . ";\n";
+    }
+
+    /**
+     * Sets whether or not to use the PHP 5.4+ "[]" array syntax.
+     *
+     * @param  bool $value
+     * @return self
+     */
+    public function setUseBracketArraySyntax($value)
+    {
+        $this->useBracketArraySyntax = $value;
+        return $this;
+    }
+
+    /**
+     * Sets whether or not to render resolvable FQN strings as scalars, using PHP 5.5+ class-keyword
+     *
+     * @param boolean $value
+     * @return self
+     */
+    public function setUseClassNameScalars($value)
+    {
+        $this->useClassNameScalars = $value;
+        return $this;
+    }
+
+    /**
+     * @return boolean
+     */
+    public function getUseClassNameScalars()
+    {
+        return $this->useClassNameScalars;
+    }
+
+    /**
+     * toFile(): defined by Writer interface.
+     *
+     * @see    WriterInterface::toFile()
+     * @param  string  $filename
+     * @param  mixed   $config
+     * @param  bool $exclusiveLock
+     * @return void
+     * @throws Exception\InvalidArgumentException
+     * @throws Exception\RuntimeException
+     */
+    public function toFile($filename, $config, $exclusiveLock = true)
+    {
+        if (empty($filename)) {
+            throw new Exception\InvalidArgumentException('No file name specified');
+        }
+
+        $flags = 0;
+        if ($exclusiveLock) {
+            $flags |= LOCK_EX;
+        }
+
+        set_error_handler(
+            function ($error, $message = '') use ($filename) {
+                throw new Exception\RuntimeException(
+                    sprintf('Error writing to "%s": %s', $filename, $message),
+                    $error
+                );
+            },
+            E_WARNING
+        );
+
+        try {
+            // for Windows, paths are escaped.
+            $dirname = str_replace('\\', '\\\\', dirname($filename));
+
+            $string  = $this->toString($config);
+            $string  = str_replace("'" . $dirname, "__DIR__ . '", $string);
+
+            file_put_contents($filename, $string, $flags);
+        } catch (\Exception $e) {
+            restore_error_handler();
+            throw $e;
+        }
+
+        restore_error_handler();
+    }
+
+    /**
+     * Recursively processes a PHP config array structure into a readable format.
+     *
+     * @param  array $config
+     * @param  array $arraySyntax
+     * @param  int   $indentLevel
+     * @return string
+     */
+    protected function processIndented(array $config, array $arraySyntax, &$indentLevel = 1)
+    {
+        $arrayString = "";
+
+        foreach ($config as $key => $value) {
+            $arrayString .= str_repeat(self::INDENT_STRING, $indentLevel);
+            $arrayString .= (is_int($key) ? $key : $this->processStringKey($key)) . ' => ';
+
+            if (is_array($value)) {
+                if ($value === []) {
+                    $arrayString .= $arraySyntax['open'] . $arraySyntax['close'] . ",\n";
+                } else {
+                    $indentLevel++;
+                    $arrayString .= $arraySyntax['open'] . "\n"
+                        . $this->processIndented($value, $arraySyntax, $indentLevel)
+                        . str_repeat(self::INDENT_STRING, --$indentLevel) . $arraySyntax['close'] . ",\n";
+                }
+            } elseif (is_object($value)) {
+                $arrayString .= var_export($value, true) . ",\n";
+            } elseif (is_string($value)) {
+                $arrayString .= $this->processStringValue($value) . ",\n";
+            } elseif (is_bool($value)) {
+                $arrayString .= ($value ? 'true' : 'false') . ",\n";
+            } elseif ($value === null) {
+                $arrayString .= "null,\n";
+            } else {
+                $arrayString .= $value . ",\n";
+            }
+        }
+
+        return $arrayString;
+    }
+
+    /**
+     * Process a string configuration value
+     *
+     * @param string $value
+     * @return string
+     */
+    protected function processStringValue($value)
+    {
+        if ($this->useClassNameScalars && false !== ($fqnValue = $this->fqnStringToClassNameScalar($value))) {
+            return $fqnValue;
+        }
+
+        return var_export($value, true);
+    }
+
+    /**
+     * Process a string configuration key
+     *
+     * @param string $key
+     * @return string
+     */
+    protected function processStringKey($key)
+    {
+        if ($this->useClassNameScalars && false !== ($fqnKey = $this->fqnStringToClassNameScalar($key))) {
+            return $fqnKey;
+        }
+
+        return "'" . addslashes($key) . "'";
+    }
+
+    /**
+     * Attempts to convert a FQN string to class name scalar.
+     * Returns false if string is not a valid FQN or can not be resolved to an existing name.
+     *
+     * @param string $string
+     * @return bool|string
+     */
+    protected function fqnStringToClassNameScalar($string)
+    {
+        if (strlen($string) < 1) {
+            return false;
+        }
+
+        if ($string[0] !== '\\') {
+            $string = '\\' . $string;
+        }
+
+        if ($this->checkStringIsFqn($string)) {
+            return $string . '::class';
+        }
+
+        return false;
+    }
+
+    /**
+     * Check whether a string represents a resolvable FQCN
+     *
+     * @param string $string
+     * @return bool
+     */
+    protected function checkStringIsFqn($string)
+    {
+        if (!preg_match('/^(?:\x5c[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $string)) {
+            return false;
+        }
+
+        return class_exists($string) || interface_exists($string) || trait_exists($string);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/WriterInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/WriterInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/WriterInterface.php	(revision 5534)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+interface WriterInterface
+{
+    /**
+     * Write a config object to a file.
+     *
+     * @param  string  $filename
+     * @param  mixed   $config
+     * @param  bool $exclusiveLock
+     * @return void
+     */
+    public function toFile($filename, $config, $exclusiveLock = true);
+
+    /**
+     * Write a config object to a string.
+     *
+     * @param  mixed $config
+     * @return string
+     */
+    public function toString($config);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Xml.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Xml.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Xml.php	(revision 5534)
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+use XMLWriter;
+use Zend\Config\Exception;
+
+class Xml extends AbstractWriter
+{
+    /**
+     * processConfig(): defined by AbstractWriter.
+     *
+     * @param  array $config
+     * @return string
+     */
+    public function processConfig(array $config)
+    {
+        $writer = new XMLWriter();
+        $writer->openMemory();
+        $writer->setIndent(true);
+        $writer->setIndentString(str_repeat(' ', 4));
+
+        $writer->startDocument('1.0', 'UTF-8');
+        $writer->startElement('zend-config');
+
+        foreach ($config as $sectionName => $data) {
+            if (!is_array($data)) {
+                $writer->writeElement($sectionName, (string) $data);
+            } else {
+                $this->addBranch($sectionName, $data, $writer);
+            }
+        }
+
+        $writer->endElement();
+        $writer->endDocument();
+
+        return $writer->outputMemory();
+    }
+
+    /**
+     * Add a branch to an XML object recursively.
+     *
+     * @param  string    $branchName
+     * @param  array     $config
+     * @param  XMLWriter $writer
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    protected function addBranch($branchName, array $config, XMLWriter $writer)
+    {
+        $branchType = null;
+
+        foreach ($config as $key => $value) {
+            if ($branchType === null) {
+                if (is_numeric($key)) {
+                    $branchType = 'numeric';
+                } else {
+                    $writer->startElement($branchName);
+                    $branchType = 'string';
+                }
+            } elseif ($branchType !== (is_numeric($key) ? 'numeric' : 'string')) {
+                throw new Exception\RuntimeException('Mixing of string and numeric keys is not allowed');
+            }
+
+            if ($branchType === 'numeric') {
+                if (is_array($value)) {
+                    $this->addBranch($branchName, $value, $writer);
+                } else {
+                    $writer->writeElement($branchName, (string) $value);
+                }
+            } else {
+                if (is_array($value)) {
+                    $this->addBranch($key, $value, $writer);
+                } else {
+                    $writer->writeElement($key, (string) $value);
+                }
+            }
+        }
+
+        if ($branchType === 'string') {
+            $writer->endElement();
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Yaml.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Yaml.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/Writer/Yaml.php	(revision 5534)
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config\Writer;
+
+use Zend\Config\Exception;
+
+class Yaml extends AbstractWriter
+{
+    /**
+     * YAML encoder callback
+     *
+     * @var callable
+     */
+    protected $yamlEncoder;
+
+    /**
+     * Constructor
+     *
+     * @param callable|string|null $yamlEncoder
+     */
+    public function __construct($yamlEncoder = null)
+    {
+        if ($yamlEncoder !== null) {
+            $this->setYamlEncoder($yamlEncoder);
+        } else {
+            if (function_exists('yaml_emit')) {
+                $this->setYamlEncoder('yaml_emit');
+            }
+        }
+    }
+
+    /**
+     * Get callback for decoding YAML
+     *
+     * @return callable
+     */
+    public function getYamlEncoder()
+    {
+        return $this->yamlEncoder;
+    }
+
+    /**
+     * Set callback for decoding YAML
+     *
+     * @param  callable $yamlEncoder the decoder to set
+     * @return Yaml
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setYamlEncoder($yamlEncoder)
+    {
+        if (!is_callable($yamlEncoder)) {
+            throw new Exception\InvalidArgumentException('Invalid parameter to setYamlEncoder() - must be callable');
+        }
+        $this->yamlEncoder = $yamlEncoder;
+        return $this;
+    }
+
+    /**
+     * processConfig(): defined by AbstractWriter.
+     *
+     * @param  array $config
+     * @return string
+     * @throws Exception\RuntimeException
+     */
+    public function processConfig(array $config)
+    {
+        if (null === $this->getYamlEncoder()) {
+            throw new Exception\RuntimeException("You didn't specify a Yaml callback encoder");
+        }
+
+        $config = call_user_func($this->getYamlEncoder(), $config);
+        if (null === $config) {
+            throw new Exception\RuntimeException("Error generating YAML data");
+        }
+
+        return $config;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/WriterPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/WriterPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-config/src/WriterPluginManager.php	(revision 5534)
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Config;
+
+use Interop\Container\ContainerInterface;
+use Zend\ServiceManager\AbstractPluginManager;
+use Zend\ServiceManager\Exception\InvalidServiceException;
+use Zend\ServiceManager\Factory\InvokableFactory;
+
+class WriterPluginManager extends AbstractPluginManager
+{
+    protected $instanceOf = Writer\AbstractWriter::class;
+
+    protected $aliases = [
+        'ini'      => Writer\Ini::class,
+        'Ini'      => Writer\Ini::class,
+        'json'     => Writer\Json::class,
+        'Json'     => Writer\Json::class,
+        'php'      => Writer\PhpArray::class,
+        'phparray' => Writer\PhpArray::class,
+        'phpArray' => Writer\PhpArray::class,
+        'PhpArray' => Writer\PhpArray::class,
+        'yaml'     => Writer\Yaml::class,
+        'Yaml'     => Writer\Yaml::class,
+        'xml'      => Writer\Xml::class,
+        'Xml'      => Writer\Xml::class,
+    ];
+
+    protected $factories = [
+        Writer\Ini::class      => InvokableFactory::class,
+        Writer\Json::class     => InvokableFactory::class,
+        Writer\PhpArray::class => InvokableFactory::class,
+        Writer\Yaml::class     => InvokableFactory::class,
+        Writer\Xml::class      => InvokableFactory::class,
+        // Legacy (v2) due to alias resolution; canonical form of resolved
+        // alias is used to look up the factory, while the non-normalized
+        // resolved alias is used as the requested name passed to the factory.
+        'zendconfigwriterini'      => InvokableFactory::class,
+        'zendconfigwriterjson'     => InvokableFactory::class,
+        'zendconfigwriterphparray' => InvokableFactory::class,
+        'zendconfigwriteryaml'     => InvokableFactory::class,
+        'zendconfigwriterxml'      => InvokableFactory::class,
+    ];
+
+    /**
+     * Validate the plugin is of the expected type (v3).
+     *
+     * Validates against `$instanceOf`.
+     *
+     * @param mixed $instance
+     * @throws InvalidServiceException
+     */
+    public function validate($instance)
+    {
+        if (! $instance instanceof $this->instanceOf) {
+            throw new InvalidServiceException(sprintf(
+                '%s can only create instances of %s; %s is invalid',
+                get_class($this),
+                $this->instanceOf,
+                (is_object($instance) ? get_class($instance) : gettype($instance))
+            ));
+        }
+    }
+
+    /**
+     * Validate the plugin is of the expected type (v2).
+     *
+     * Proxies to `validate()`.
+     *
+     * @param mixed $instance
+     * @throws Exception\InvalidArgumentException
+     */
+    public function validatePlugin($instance)
+    {
+        try {
+            $this->validate($instance);
+        } catch (InvalidServiceException $e) {
+            throw new Exception\InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
+        }
+    }
+
+    public function __construct(ContainerInterface $container, array $config = [])
+    {
+        $config = array_merge_recursive(['aliases' => $this->aliases], $config);
+        parent::__construct($container, $config);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,106 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 2.6.2 - 2016-01-12
+
+### Added
+
+- [#19](https://github.com/zendframework/zend-eventmanager/pull/19) adds a new
+  trait, `Zend\EventManager\Test\EventListenerIntrospectionTrait`, intended for
+  composition in unit tests. It provides a number of methods that can be used
+  to retrieve listeners with or without associated priority, and the assertion
+  `assertListenerAtPriority(callable $listener, $priority, $event, EventManager $events, $message = '')`,
+  which can be used for testing that a listener was registered at the specified
+  priority with the specified event.
+
+  The features in this patch are intended to facilitate testing against both
+  version 2 and version 3 of zend-eventmanager, as it provides a consistent API
+  for retrieving lists of events and listeners between the two versions.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
+## 2.6.0 - 2015-09-29
+
+### Added
+
+- Added `Zend\EventManager\SharedEventsCapableInterface`. This interface will
+  largely replace `Zend\EventManager\SharedEventManagerAwareInterface` in
+  version 3, and the latter was updated to extend it.
+- Added `EventManager::triggerEvent(EventInterface $event)` as a
+  forwards-compatibility feature.
+- Add `EventManager::triggerEventUntil(callable $callback, EventIterface $event)`
+  as a forwards-compatibility feature.
+- Adds [Athletic](https://github.com/polyfractal/athletic) benchmarks to aid in
+  gauging performanc impact of changes; these are a development change only.
+
+### Deprecated
+
+- Marked `GlobalEventManager` as deprecated; this class will be removed in
+  version 3.
+- Marked `StaticEventManager` as deprecated; this class will be removed in
+  version 3.
+- Marked `SharedListenerAggregateInterface` as deprecated; this interface will
+  be removed in version 3.
+- Marked `SharedEventAggregateAwareInterface` as deprecated; this interface will
+  be removed in version 3.
+- Marked `SharedEventManagerAwareInterface` as deprecated; this interface will
+  be removed in version 3.
+- Marked `EventManager::setSharedManager()` as deprecated; this method will be
+  removed in version 3.
+- Marked `EventManager::unsetSharedManager()` as deprecated; this method will be
+  removed in version 3.
+- Marked `EventManagerInterface::` and `EventManager::getEvents()` as
+  deprecated; this method will be removed in version 3.
+- Marked `EventManagerInterface::` and `EventManager::getListeners()` as
+  deprecated; this method will be removed in version 3.
+- Marked `EventManagerInterface::` and `Eventmanager::setEventClass()` as
+  deprecated; this method is renamed to `setEventPrototype(EventInterface $event)`
+  in version 3.
+- Marked `EventManagerInterface::` and `EventManager::attachAggregate()` as
+  deprecated; this method will be removed in version 3.
+- Marked `EventManagerInterface::` and `EventManager::detachAggregate()` as
+  deprecated; this method will be removed in version 3.
+- Marked `SharedEventManagerInterface::` and `SharedEventManager::getEvents()`
+  as deprecated; this method will be removed in version 3.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
+## 2.5.2 - 2015-07-16
+
+### Added
+
+- [#5](https://github.com/zendframework/zend-eventmanager/pull/5) adds a number
+  of unit tests to improve test coverage, and thus maintainability and
+  stability.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- [#3](https://github.com/zendframework/zend-eventmanager/pull/3) removes some
+  PHP 5.3- and 5.4-isms (such as marking Traits as requiring 5.4, and closing
+  over a copy of `$this`) from the test suite.
+
+### Fixed
+
+- [#5](https://github.com/zendframework/zend-eventmanager/pull/5) fixes a bug in
+  `FilterIterator` that occurs when attempting to extract from an empty heap.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-event-manager/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-event-manager.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
+standards checks, and provides configuration for our selected checks.
+`php-cs-fixer` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
+```
+
+To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
+flag:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
+```
+
+If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-event-manager)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-event-manager.git
+   $ cd zend-event-manager
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-event-manager.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-event-manager.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/README.md	(revision 5534)
@@ -0,0 +1,30 @@
+# zend-eventmanager
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-eventmanager.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-eventmanager)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-eventmanager/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-eventmanager?branch=master)
+
+The `Zend\EventManager` is a component designed for the following use cases:
+
+- Implementing simple subject/observer patterns.
+- Implementing Aspect-Oriented designs.
+- Implementing event-driven architectures.
+
+The basic architecture allows you to attach and detach listeners to named events,
+both on a per-instance basis as well as via shared collections; trigger events;
+and interrupt execution of listeners.
+
+
+- File issues at https://github.com/zendframework/zend-eventmanager/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-eventmanager
+
+## Benchmarks
+
+We provide scripts for benchmarking zend-eventmanager using the
+[Athletic](https://github.com/polyfractal/athletic) framework; these can be
+found in the `benchmarks/` directory.
+
+To execute the benchmarks you can run the following command:
+
+```bash
+$ vendor/bin/athletic -p benchmarks
+```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/composer.json	(revision 5534)
@@ -0,0 +1,38 @@
+{
+    "name": "zendframework/zend-eventmanager",
+    "description": " ",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "eventmanager"
+    ],
+    "homepage": "https://github.com/zendframework/zend-eventmanager",
+    "autoload": {
+        "psr-4": {
+            "Zend\\EventManager\\": "src/"
+        }
+    },
+    "require": {
+        "php": ">=5.5",
+        "zendframework/zend-stdlib": "~2.5"
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.6-dev",
+            "dev-develop": "3.0-dev"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\EventManager\\": "test/",
+            "ZendBench\\EventManager\\": "benchmarks/"
+        }
+    },
+    "require-dev": {
+        "fabpot/php-cs-fixer": "1.7.*",
+        "phpunit/PHPUnit": "~4.0",
+        "athletic/athletic": "dev-master"
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/AbstractListenerAggregate.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/AbstractListenerAggregate.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/AbstractListenerAggregate.php	(revision 5534)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Abstract aggregate listener
+ */
+abstract class AbstractListenerAggregate implements ListenerAggregateInterface
+{
+    /**
+     * @var \Zend\Stdlib\CallbackHandler[]
+     */
+    protected $listeners = [];
+
+    /**
+     * {@inheritDoc}
+     */
+    public function detach(EventManagerInterface $events)
+    {
+        foreach ($this->listeners as $index => $callback) {
+            if ($events->detach($callback)) {
+                unset($this->listeners[$index]);
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Event.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Event.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Event.php	(revision 5534)
@@ -0,0 +1,209 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use ArrayAccess;
+
+/**
+ * Representation of an event
+ *
+ * Encapsulates the target context and parameters passed, and provides some
+ * behavior for interacting with the event manager.
+ */
+class Event implements EventInterface
+{
+    /**
+     * @var string Event name
+     */
+    protected $name;
+
+    /**
+     * @var string|object The event target
+     */
+    protected $target;
+
+    /**
+     * @var array|ArrayAccess|object The event parameters
+     */
+    protected $params = [];
+
+    /**
+     * @var bool Whether or not to stop propagation
+     */
+    protected $stopPropagation = false;
+
+    /**
+     * Constructor
+     *
+     * Accept a target and its parameters.
+     *
+     * @param  string $name Event name
+     * @param  string|object $target
+     * @param  array|ArrayAccess $params
+     */
+    public function __construct($name = null, $target = null, $params = null)
+    {
+        if (null !== $name) {
+            $this->setName($name);
+        }
+
+        if (null !== $target) {
+            $this->setTarget($target);
+        }
+
+        if (null !== $params) {
+            $this->setParams($params);
+        }
+    }
+
+    /**
+     * Get event name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    /**
+     * Get the event target
+     *
+     * This may be either an object, or the name of a static method.
+     *
+     * @return string|object
+     */
+    public function getTarget()
+    {
+        return $this->target;
+    }
+
+    /**
+     * Set parameters
+     *
+     * Overwrites parameters
+     *
+     * @param  array|ArrayAccess|object $params
+     * @return Event
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setParams($params)
+    {
+        if (!is_array($params) && !is_object($params)) {
+            throw new Exception\InvalidArgumentException(
+                sprintf('Event parameters must be an array or object; received "%s"', gettype($params))
+            );
+        }
+
+        $this->params = $params;
+        return $this;
+    }
+
+    /**
+     * Get all parameters
+     *
+     * @return array|object|ArrayAccess
+     */
+    public function getParams()
+    {
+        return $this->params;
+    }
+
+    /**
+     * Get an individual parameter
+     *
+     * If the parameter does not exist, the $default value will be returned.
+     *
+     * @param  string|int $name
+     * @param  mixed $default
+     * @return mixed
+     */
+    public function getParam($name, $default = null)
+    {
+        // Check in params that are arrays or implement array access
+        if (is_array($this->params) || $this->params instanceof ArrayAccess) {
+            if (!isset($this->params[$name])) {
+                return $default;
+            }
+
+            return $this->params[$name];
+        }
+
+        // Check in normal objects
+        if (!isset($this->params->{$name})) {
+            return $default;
+        }
+        return $this->params->{$name};
+    }
+
+    /**
+     * Set the event name
+     *
+     * @param  string $name
+     * @return Event
+     */
+    public function setName($name)
+    {
+        $this->name = (string) $name;
+        return $this;
+    }
+
+    /**
+     * Set the event target/context
+     *
+     * @param  null|string|object $target
+     * @return Event
+     */
+    public function setTarget($target)
+    {
+        $this->target = $target;
+        return $this;
+    }
+
+    /**
+     * Set an individual parameter to a value
+     *
+     * @param  string|int $name
+     * @param  mixed $value
+     * @return Event
+     */
+    public function setParam($name, $value)
+    {
+        if (is_array($this->params) || $this->params instanceof ArrayAccess) {
+            // Arrays or objects implementing array access
+            $this->params[$name] = $value;
+        } else {
+            // Objects
+            $this->params->{$name} = $value;
+        }
+        return $this;
+    }
+
+    /**
+     * Stop further event propagation
+     *
+     * @param  bool $flag
+     * @return void
+     */
+    public function stopPropagation($flag = true)
+    {
+        $this->stopPropagation = (bool) $flag;
+    }
+
+    /**
+     * Is propagation stopped?
+     *
+     * @return bool
+     */
+    public function propagationIsStopped()
+    {
+        return $this->stopPropagation;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventInterface.php	(revision 5534)
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use ArrayAccess;
+
+/**
+ * Representation of an event
+ */
+interface EventInterface
+{
+    /**
+     * Get event name
+     *
+     * @return string
+     */
+    public function getName();
+
+    /**
+     * Get target/context from which event was triggered
+     *
+     * @return null|string|object
+     */
+    public function getTarget();
+
+    /**
+     * Get parameters passed to the event
+     *
+     * @return array|ArrayAccess
+     */
+    public function getParams();
+
+    /**
+     * Get a single parameter by name
+     *
+     * @param  string $name
+     * @param  mixed $default Default value to return if parameter does not exist
+     * @return mixed
+     */
+    public function getParam($name, $default = null);
+
+    /**
+     * Set the event name
+     *
+     * @param  string $name
+     * @return void
+     */
+    public function setName($name);
+
+    /**
+     * Set the event target/context
+     *
+     * @param  null|string|object $target
+     * @return void
+     */
+    public function setTarget($target);
+
+    /**
+     * Set event parameters
+     *
+     * @param  string $params
+     * @return void
+     */
+    public function setParams($params);
+
+    /**
+     * Set a single parameter by key
+     *
+     * @param  string $name
+     * @param  mixed $value
+     * @return void
+     */
+    public function setParam($name, $value);
+
+    /**
+     * Indicate whether or not the parent EventManagerInterface should stop propagating events
+     *
+     * @param  bool $flag
+     * @return void
+     */
+    public function stopPropagation($flag = true);
+
+    /**
+     * Has this event indicated event propagation should stop?
+     *
+     * @return bool
+     */
+    public function propagationIsStopped();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManager.php	(revision 5534)
@@ -0,0 +1,572 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use ArrayAccess;
+use ArrayObject;
+use Traversable;
+use Zend\Stdlib\CallbackHandler;
+use Zend\Stdlib\PriorityQueue;
+
+/**
+ * Event manager: notification system
+ *
+ * Use the EventManager when you want to create a per-instance notification
+ * system for your objects.
+ */
+class EventManager implements EventManagerInterface
+{
+    /**
+     * Subscribed events and their listeners
+     * @var array Array of PriorityQueue objects
+     */
+    protected $events = [];
+
+    /**
+     * @var string Class representing the event being emitted
+     */
+    protected $eventClass = 'Zend\EventManager\Event';
+
+    /**
+     * Identifiers, used to pull shared signals from SharedEventManagerInterface instance
+     * @var array
+     */
+    protected $identifiers = [];
+
+    /**
+     * Shared event manager
+     * @var false|null|SharedEventManagerInterface
+     */
+    protected $sharedManager = null;
+
+    /**
+     * Constructor
+     *
+     * Allows optionally specifying identifier(s) to use to pull signals from a
+     * SharedEventManagerInterface.
+     *
+     * @param  null|string|int|array|Traversable $identifiers
+     */
+    public function __construct($identifiers = null)
+    {
+        $this->setIdentifiers($identifiers);
+    }
+
+    /**
+     * Set the event class to utilize
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  string $class
+     * @return EventManager
+     */
+    public function setEventClass($class)
+    {
+        $this->eventClass = $class;
+        return $this;
+    }
+
+    /**
+     * Set shared event manager
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param SharedEventManagerInterface $sharedEventManager
+     * @return EventManager
+     */
+    public function setSharedManager(SharedEventManagerInterface $sharedEventManager)
+    {
+        $this->sharedManager = $sharedEventManager;
+        StaticEventManager::setInstance($sharedEventManager);
+        return $this;
+    }
+
+    /**
+     * Remove any shared event manager currently attached
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @return void
+     */
+    public function unsetSharedManager()
+    {
+        $this->sharedManager = false;
+    }
+
+    /**
+     * Get shared event manager
+     *
+     * If one is not defined, but we have a static instance in
+     * StaticEventManager, that one will be used and set in this instance.
+     *
+     * If none is available in the StaticEventManager, a boolean false is
+     * returned.
+     *
+     * @return false|SharedEventManagerInterface
+     */
+    public function getSharedManager()
+    {
+        // "false" means "I do not want a shared manager; don't try and fetch one"
+        if (false === $this->sharedManager
+            || $this->sharedManager instanceof SharedEventManagerInterface
+        ) {
+            return $this->sharedManager;
+        }
+
+        if (!StaticEventManager::hasInstance()) {
+            return false;
+        }
+
+        $this->sharedManager = StaticEventManager::getInstance();
+        return $this->sharedManager;
+    }
+
+    /**
+     * Get the identifier(s) for this EventManager
+     *
+     * @return array
+     */
+    public function getIdentifiers()
+    {
+        return $this->identifiers;
+    }
+
+    /**
+     * Set the identifiers (overrides any currently set identifiers)
+     *
+     * @param string|int|array|Traversable $identifiers
+     * @return EventManager Provides a fluent interface
+     */
+    public function setIdentifiers($identifiers)
+    {
+        if (is_array($identifiers) || $identifiers instanceof Traversable) {
+            $this->identifiers = array_unique((array) $identifiers);
+        } elseif ($identifiers !== null) {
+            $this->identifiers = [$identifiers];
+        }
+        return $this;
+    }
+
+    /**
+     * Add some identifier(s) (appends to any currently set identifiers)
+     *
+     * @param string|int|array|Traversable $identifiers
+     * @return EventManager Provides a fluent interface
+     */
+    public function addIdentifiers($identifiers)
+    {
+        if (is_array($identifiers) || $identifiers instanceof Traversable) {
+            $this->identifiers = array_unique(array_merge($this->identifiers, (array) $identifiers));
+        } elseif ($identifiers !== null) {
+            $this->identifiers = array_unique(array_merge($this->identifiers, [$identifiers]));
+        }
+        return $this;
+    }
+
+    /**
+     * Trigger all listeners for a given event
+     *
+     * @param  string|EventInterface $event
+     * @param  string|object     $target   Object calling emit, or symbol describing target (such as static method name)
+     * @param  array|ArrayAccess $argv     Array of arguments; typically, should be associative
+     * @param  null|callable     $callback Trigger listeners until return value of this callback evaluate to true
+     * @return ResponseCollection All listener return values
+     * @throws Exception\InvalidCallbackException
+     */
+    public function trigger($event, $target = null, $argv = [], $callback = null)
+    {
+        if ($event instanceof EventInterface) {
+            $e        = $event;
+            $event    = $e->getName();
+            $callback = $target;
+        } elseif ($target instanceof EventInterface) {
+            $e = $target;
+            $e->setName($event);
+            $callback = $argv;
+        } elseif ($argv instanceof EventInterface) {
+            $e = $argv;
+            $e->setName($event);
+            $e->setTarget($target);
+        } else {
+            $e = new $this->eventClass();
+            $e->setName($event);
+            $e->setTarget($target);
+            $e->setParams($argv);
+        }
+
+        if ($callback && !is_callable($callback)) {
+            throw new Exception\InvalidCallbackException('Invalid callback provided');
+        }
+
+        // Initial value of stop propagation flag should be false
+        $e->stopPropagation(false);
+
+        return $this->triggerListeners($event, $e, $callback);
+    }
+
+    /**
+     * Trigger listeners until return value of one causes a callback to
+     * evaluate to true
+     *
+     * Triggers listeners until the provided callback evaluates the return
+     * value of one as true, or until all listeners have been executed.
+     *
+     * @deprecated The signature of this method will change in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/changed.md}
+     *     for details.
+     * @param  string|EventInterface $event
+     * @param  string|object $target Object calling emit, or symbol describing target (such as static method name)
+     * @param  array|ArrayAccess $argv Array of arguments; typically, should be associative
+     * @param  callable $callback
+     * @return ResponseCollection
+     * @throws Exception\InvalidCallbackException if invalid callable provided
+     */
+    public function triggerUntil($event, $target, $argv = null, $callback = null)
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the future. Please use trigger() instead.',
+            E_USER_DEPRECATED
+        );
+        return $this->trigger($event, $target, $argv, $callback);
+    }
+
+    /**
+     * Trigger an event instance.
+     *
+     * @param EventInterface $event
+     * @return ResponseCollection
+     */
+    public function triggerEvent(EventInterface $event)
+    {
+        return $this->triggerListeners($event->getName(), $event);
+    }
+
+    /**
+     * Trigger an event instance, short-circuiting if a listener response evaluates true via the callback.
+     *
+     * @param callable $callback
+     * @param EventInterface $event
+     * @return ResponseCollection
+     */
+    public function triggerEventUntil(callable $callback, EventInterface $event)
+    {
+        return $this->triggerListeners($event->getName(), $event, $callback);
+    }
+
+    /**
+     * Attach a listener to an event
+     *
+     * The first argument is the event, and the next argument describes a
+     * callback that will respond to that event. A CallbackHandler instance
+     * describing the event listener combination will be returned.
+     *
+     * The last argument indicates a priority at which the event should be
+     * executed. By default, this value is 1; however, you may set it for any
+     * integer value. Higher values have higher priority (i.e., execute first).
+     *
+     * You can specify "*" for the event name. In such cases, the listener will
+     * be triggered for every event.
+     *
+     * @param  string|array|ListenerAggregateInterface $event An event or array of event names. If a ListenerAggregateInterface, proxies to {@link attachAggregate()}.
+     * @param  callable|int $callback If string $event provided, expects PHP callback; for a ListenerAggregateInterface $event, this will be the priority
+     * @param  int $priority If provided, the priority at which to register the callable
+     * @return CallbackHandler|mixed CallbackHandler if attaching callable (to allow later unsubscribe); mixed if attaching aggregate
+     * @throws Exception\InvalidArgumentException
+     */
+    public function attach($event, $callback = null, $priority = 1)
+    {
+        // Proxy ListenerAggregateInterface arguments to attachAggregate()
+        if ($event instanceof ListenerAggregateInterface) {
+            return $this->attachAggregate($event, $callback);
+        }
+
+        // Null callback is invalid
+        if (null === $callback) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s: expects a callback; none provided',
+                __METHOD__
+            ));
+        }
+
+        // Array of events should be registered individually, and return an array of all listeners
+        if (is_array($event)) {
+            $listeners = [];
+            foreach ($event as $name) {
+                $listeners[] = $this->attach($name, $callback, $priority);
+            }
+            return $listeners;
+        }
+
+        // If we don't have a priority queue for the event yet, create one
+        if (empty($this->events[$event])) {
+            $this->events[$event] = new PriorityQueue();
+        }
+
+        // Create a callback handler, setting the event and priority in its metadata
+        $listener = new CallbackHandler($callback, ['event' => $event, 'priority' => $priority]);
+
+        // Inject the callback handler into the queue
+        $this->events[$event]->insert($listener, $priority);
+        return $listener;
+    }
+
+    /**
+     * Attach a listener aggregate
+     *
+     * Listener aggregates accept an EventManagerInterface instance, and call attach()
+     * one or more times, typically to attach to multiple events using local
+     * methods.
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  ListenerAggregateInterface $aggregate
+     * @param  int $priority If provided, a suggested priority for the aggregate to use
+     * @return mixed return value of {@link ListenerAggregateInterface::attach()}
+     */
+    public function attachAggregate(ListenerAggregateInterface $aggregate, $priority = 1)
+    {
+        return $aggregate->attach($this, $priority);
+    }
+
+    /**
+     * Unsubscribe a listener from an event
+     *
+     * @param  CallbackHandler|ListenerAggregateInterface $listener
+     * @return bool Returns true if event and listener found, and unsubscribed; returns false if either event or listener not found
+     * @throws Exception\InvalidArgumentException if invalid listener provided
+     */
+    public function detach($listener)
+    {
+        if ($listener instanceof ListenerAggregateInterface) {
+            return $this->detachAggregate($listener);
+        }
+
+        if (!$listener instanceof CallbackHandler) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s: expected a ListenerAggregateInterface or CallbackHandler; received "%s"',
+                __METHOD__,
+                (is_object($listener) ? get_class($listener) : gettype($listener))
+            ));
+        }
+
+        $event = $listener->getMetadatum('event');
+        if (!$event || empty($this->events[$event])) {
+            return false;
+        }
+        $return = $this->events[$event]->remove($listener);
+        if (!$return) {
+            return false;
+        }
+        if (!count($this->events[$event])) {
+            unset($this->events[$event]);
+        }
+        return true;
+    }
+
+    /**
+     * Detach a listener aggregate
+     *
+     * Listener aggregates accept an EventManagerInterface instance, and call detach()
+     * of all previously attached listeners.
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  ListenerAggregateInterface $aggregate
+     * @return mixed return value of {@link ListenerAggregateInterface::detach()}
+     */
+    public function detachAggregate(ListenerAggregateInterface $aggregate)
+    {
+        return $aggregate->detach($this);
+    }
+
+    /**
+     * Retrieve all registered events
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @return array
+     */
+    public function getEvents()
+    {
+        return array_keys($this->events);
+    }
+
+    /**
+     * Retrieve all listeners for a given event
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  string $event
+     * @return PriorityQueue
+     */
+    public function getListeners($event)
+    {
+        if (!array_key_exists($event, $this->events)) {
+            return new PriorityQueue();
+        }
+        return $this->events[$event];
+    }
+
+    /**
+     * Clear all listeners for a given event
+     *
+     * @param  string $event
+     * @return void
+     */
+    public function clearListeners($event)
+    {
+        if (!empty($this->events[$event])) {
+            unset($this->events[$event]);
+        }
+    }
+
+    /**
+     * Prepare arguments
+     *
+     * Use this method if you want to be able to modify arguments from within a
+     * listener. It returns an ArrayObject of the arguments, which may then be
+     * passed to trigger().
+     *
+     * @param  array $args
+     * @return ArrayObject
+     */
+    public function prepareArgs(array $args)
+    {
+        return new ArrayObject($args);
+    }
+
+    /**
+     * Trigger listeners
+     *
+     * Actual functionality for triggering listeners, to which trigger() delegate.
+     *
+     * @param  string           $event Event name
+     * @param  EventInterface $e
+     * @param  null|callable    $callback
+     * @return ResponseCollection
+     */
+    protected function triggerListeners($event, EventInterface $e, $callback = null)
+    {
+        $responses = new ResponseCollection;
+        $listeners = $this->getListeners($event);
+
+        // Add shared/wildcard listeners to the list of listeners,
+        // but don't modify the listeners object
+        $sharedListeners         = $this->getSharedListeners($event);
+        $sharedWildcardListeners = $this->getSharedListeners('*');
+        $wildcardListeners       = $this->getListeners('*');
+        if (count($sharedListeners) || count($sharedWildcardListeners) || count($wildcardListeners)) {
+            $listeners = clone $listeners;
+
+            // Shared listeners on this specific event
+            $this->insertListeners($listeners, $sharedListeners);
+
+            // Shared wildcard listeners
+            $this->insertListeners($listeners, $sharedWildcardListeners);
+
+            // Add wildcard listeners
+            $this->insertListeners($listeners, $wildcardListeners);
+        }
+
+        foreach ($listeners as $listener) {
+            $listenerCallback = $listener->getCallback();
+
+            // Trigger the listener's callback, and push its result onto the
+            // response collection
+            $responses->push(call_user_func($listenerCallback, $e));
+
+            // If the event was asked to stop propagating, do so
+            if ($e->propagationIsStopped()) {
+                $responses->setStopped(true);
+                break;
+            }
+
+            // If the result causes our validation callback to return true,
+            // stop propagation
+            if ($callback && call_user_func($callback, $responses->last())) {
+                $responses->setStopped(true);
+                break;
+            }
+        }
+
+        return $responses;
+    }
+
+    /**
+     * Get list of all listeners attached to the shared event manager for
+     * identifiers registered by this instance
+     *
+     * @param  string $event
+     * @return array
+     */
+    protected function getSharedListeners($event)
+    {
+        if (!$sharedManager = $this->getSharedManager()) {
+            return [];
+        }
+
+        $identifiers     = $this->getIdentifiers();
+        //Add wildcard id to the search, if not already added
+        if (!in_array('*', $identifiers)) {
+            $identifiers[] = '*';
+        }
+        $sharedListeners = [];
+
+        foreach ($identifiers as $id) {
+            if (!$listeners = $sharedManager->getListeners($id, $event)) {
+                continue;
+            }
+
+            if (!is_array($listeners) && !($listeners instanceof Traversable)) {
+                continue;
+            }
+
+            foreach ($listeners as $listener) {
+                if (!$listener instanceof CallbackHandler) {
+                    continue;
+                }
+                $sharedListeners[] = $listener;
+            }
+        }
+
+        return $sharedListeners;
+    }
+
+    /**
+     * Add listeners to the master queue of listeners
+     *
+     * Used to inject shared listeners and wildcard listeners.
+     *
+     * @param  PriorityQueue $masterListeners
+     * @param  array|Traversable $listeners
+     * @return void
+     */
+    protected function insertListeners($masterListeners, $listeners)
+    {
+        foreach ($listeners as $listener) {
+            $priority = $listener->getMetadatum('priority');
+            if (null === $priority) {
+                $priority = 1;
+            } elseif (is_array($priority)) {
+                // If we have an array, likely using PriorityQueue. Grab first
+                // element of the array, as that's the actual priority.
+                $priority = array_shift($priority);
+            }
+            $masterListeners->insert($listener, $priority);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerAwareInterface.php	(revision 5534)
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface to automate setter injection for an EventManager instance
+ */
+interface EventManagerAwareInterface extends EventsCapableInterface
+{
+    /**
+     * Inject an EventManager instance
+     *
+     * @param  EventManagerInterface $eventManager
+     * @return void
+     */
+    public function setEventManager(EventManagerInterface $eventManager);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerAwareTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerAwareTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerAwareTrait.php	(revision 5534)
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use Traversable;
+
+/**
+ * A trait for objects that provide events.
+ *
+ * If you use this trait in an object, you will probably want to also implement
+ * EventManagerAwareInterface, which will make it so the default initializer in
+ * a ZF2 MVC application will automatically inject an instance of the
+ * EventManager into your object when it is pulled from the ServiceManager.
+ *
+ * @see Zend\Mvc\Service\ServiceManagerConfig
+ */
+trait EventManagerAwareTrait
+{
+    /**
+     * @var EventManagerInterface
+     */
+    protected $events;
+
+    /**
+     * Set the event manager instance used by this context.
+     *
+     * For convenience, this method will also set the class name / LSB name as
+     * identifiers, in addition to any string or array of strings set to the
+     * $this->eventIdentifier property.
+     *
+     * @param  EventManagerInterface $events
+     * @return mixed
+     */
+    public function setEventManager(EventManagerInterface $events)
+    {
+        $identifiers = [__CLASS__, get_class($this)];
+        if (isset($this->eventIdentifier)) {
+            if ((is_string($this->eventIdentifier))
+                || (is_array($this->eventIdentifier))
+                || ($this->eventIdentifier instanceof Traversable)
+            ) {
+                $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier));
+            } elseif (is_object($this->eventIdentifier)) {
+                $identifiers[] = $this->eventIdentifier;
+            }
+            // silently ignore invalid eventIdentifier types
+        }
+        $events->setIdentifiers($identifiers);
+        $this->events = $events;
+        if (method_exists($this, 'attachDefaultListeners')) {
+            $this->attachDefaultListeners();
+        }
+        return $this;
+    }
+
+    /**
+     * Retrieve the event manager
+     *
+     * Lazy-loads an EventManager instance if none registered.
+     *
+     * @return EventManagerInterface
+     */
+    public function getEventManager()
+    {
+        if (!$this->events instanceof EventManagerInterface) {
+            $this->setEventManager(new EventManager());
+        }
+        return $this->events;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventManagerInterface.php	(revision 5534)
@@ -0,0 +1,161 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use Traversable;
+use Zend\Stdlib\CallbackHandler;
+
+/**
+ * Interface for messengers
+ */
+interface EventManagerInterface extends SharedEventManagerAwareInterface
+{
+    /**
+     * Trigger an event
+     *
+     * Should allow handling the following scenarios:
+     * - Passing Event object only
+     * - Passing event name and Event object only
+     * - Passing event name, target, and Event object
+     * - Passing event name, target, and array|ArrayAccess of arguments
+     * - Passing event name, target, array|ArrayAccess of arguments, and callback
+     *
+     * @param  string|EventInterface $event
+     * @param  object|string $target
+     * @param  array|object $argv
+     * @param  null|callable $callback
+     * @return ResponseCollection
+     */
+    public function trigger($event, $target = null, $argv = [], $callback = null);
+
+    /**
+     * Trigger an event until the given callback returns a boolean true
+     *
+     * Should allow handling the following scenarios:
+     * - Passing Event object and callback only
+     * - Passing event name, Event object, and callback only
+     * - Passing event name, target, Event object, and callback
+     * - Passing event name, target, array|ArrayAccess of arguments, and callback
+     *
+     * @deprecated The signature of this method will change in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/changed.md}
+     *     for details.
+     * @param  string|EventInterface $event
+     * @param  object|string $target
+     * @param  array|object $argv
+     * @param  callable $callback
+     * @return ResponseCollection
+     */
+    public function triggerUntil($event, $target, $argv = null, $callback = null);
+
+    /**
+     * Attach a listener to an event
+     *
+     * @param  string $event
+     * @param  callable $callback
+     * @param  int $priority Priority at which to register listener
+     * @return CallbackHandler
+     */
+    public function attach($event, $callback = null, $priority = 1);
+
+    /**
+     * Detach an event listener
+     *
+     * @param  CallbackHandler|ListenerAggregateInterface $listener
+     * @return bool
+     */
+    public function detach($listener);
+
+    /**
+     * Get a list of events for which this collection has listeners
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @return array
+     */
+    public function getEvents();
+
+    /**
+     * Retrieve a list of listeners registered to a given event
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  string $event
+     * @return array|object
+     */
+    public function getListeners($event);
+
+    /**
+     * Clear all listeners for a given event
+     *
+     * @param  string $event
+     * @return void
+     */
+    public function clearListeners($event);
+
+    /**
+     * Set the event class to utilize
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  string $class
+     * @return EventManagerInterface
+     */
+    public function setEventClass($class);
+
+    /**
+     * Get the identifier(s) for this EventManager
+     *
+     * @return array
+     */
+    public function getIdentifiers();
+
+    /**
+     * Set the identifiers (overrides any currently set identifiers)
+     *
+     * @param string|int|array|Traversable $identifiers
+     * @return EventManagerInterface
+     */
+    public function setIdentifiers($identifiers);
+
+    /**
+     * Add some identifier(s) (appends to any currently set identifiers)
+     *
+     * @param string|int|array|Traversable $identifiers
+     * @return EventManagerInterface
+     */
+    public function addIdentifiers($identifiers);
+
+    /**
+     * Attach a listener aggregate
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  ListenerAggregateInterface $aggregate
+     * @param  int $priority If provided, a suggested priority for the aggregate to use
+     * @return mixed return value of {@link ListenerAggregateInterface::attach()}
+     */
+    public function attachAggregate(ListenerAggregateInterface $aggregate, $priority = 1);
+
+    /**
+     * Detach a listener aggregate
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  ListenerAggregateInterface $aggregate
+     * @return mixed return value of {@link ListenerAggregateInterface::detach()}
+     */
+    public function detachAggregate(ListenerAggregateInterface $aggregate);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventsCapableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventsCapableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/EventsCapableInterface.php	(revision 5534)
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface providing events that can be attached, detached and triggered.
+ */
+interface EventsCapableInterface
+{
+    /**
+     * Retrieve the event manager
+     *
+     * Lazy-loads an EventManager instance if none registered.
+     *
+     * @return EventManagerInterface
+     */
+    public function getEventManager();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/DomainException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/DomainException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/DomainException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager\Exception;
+
+class DomainException extends \DomainException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager\Exception;
+
+/**
+ * Base exception interface
+ */
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager\Exception;
+
+/**
+ * Invalid argument exception
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/InvalidCallbackException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/InvalidCallbackException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Exception/InvalidCallbackException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager\Exception;
+
+/**
+ * Invalid callback exception
+ */
+class InvalidCallbackException extends DomainException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Filter/FilterInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Filter/FilterInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Filter/FilterInterface.php	(revision 5534)
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager\Filter;
+
+use Zend\EventManager\ResponseCollection;
+use Zend\Stdlib\CallbackHandler;
+
+/**
+ * Interface for intercepting filter chains
+ */
+interface FilterInterface
+{
+    /**
+     * Execute the filter chain
+     *
+     * @param  string|object $context
+     * @param  array $params
+     * @return mixed
+     */
+    public function run($context, array $params = []);
+
+    /**
+     * Attach an intercepting filter
+     *
+     * @param  callable $callback
+     * @return CallbackHandler
+     */
+    public function attach($callback);
+
+    /**
+     * Detach an intercepting filter
+     *
+     * @param  CallbackHandler $filter
+     * @return bool
+     */
+    public function detach(CallbackHandler $filter);
+
+    /**
+     * Get all intercepting filters
+     *
+     * @return array
+     */
+    public function getFilters();
+
+    /**
+     * Clear all filters
+     *
+     * @return void
+     */
+    public function clearFilters();
+
+    /**
+     * Get all filter responses
+     *
+     * @return ResponseCollection
+     */
+    public function getResponses();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Filter/FilterIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Filter/FilterIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Filter/FilterIterator.php	(revision 5534)
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager\Filter;
+
+use Zend\Stdlib\CallbackHandler;
+use Zend\Stdlib\SplPriorityQueue;
+
+/**
+ * Specialized priority queue implementation for use with an intercepting
+ * filter chain.
+ *
+ * Allows removal
+ */
+class FilterIterator extends SplPriorityQueue
+{
+    /**
+     * Does the queue contain a given value?
+     *
+     * @param  mixed $datum
+     * @return bool
+     */
+    public function contains($datum)
+    {
+        $chain = clone $this;
+        foreach ($chain as $item) {
+            if ($item === $datum) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Remove a value from the queue
+     *
+     * This is an expensive operation. It must first iterate through all values,
+     * and then re-populate itself. Use only if absolutely necessary.
+     *
+     * @param  mixed $datum
+     * @return bool
+     */
+    public function remove($datum)
+    {
+        $this->setExtractFlags(self::EXTR_BOTH);
+
+        // Iterate and remove any matches
+        $removed = false;
+        $items   = [];
+        $this->rewind();
+        while (!$this->isEmpty()) {
+            $item = $this->extract();
+            if ($item['data'] === $datum) {
+                $removed = true;
+                continue;
+            }
+            $items[] = $item;
+        }
+
+        // Repopulate
+        foreach ($items as $item) {
+            $this->insert($item['data'], $item['priority']);
+        }
+
+        $this->setExtractFlags(self::EXTR_DATA);
+        return $removed;
+    }
+
+    /**
+     * Iterate the next filter in the chain
+     *
+     * Iterates and calls the next filter in the chain.
+     *
+     * @param  mixed $context
+     * @param  array $params
+     * @param  FilterIterator $chain
+     * @return mixed
+     */
+    public function next($context = null, array $params = [], $chain = null)
+    {
+        if (empty($context) || ($chain instanceof FilterIterator && $chain->isEmpty())) {
+            return;
+        }
+
+        //We can't extract from an empty heap
+        if ($this->isEmpty()) {
+            return;
+        }
+
+        $next = $this->extract();
+        if (!$next instanceof CallbackHandler) {
+            return;
+        }
+
+        $return = call_user_func($next->getCallback(), $context, $params, $chain);
+        return $return;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/FilterChain.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/FilterChain.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/FilterChain.php	(revision 5534)
@@ -0,0 +1,120 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use Zend\Stdlib\CallbackHandler;
+
+/**
+ * FilterChain: intercepting filter manager
+ */
+class FilterChain implements Filter\FilterInterface
+{
+    /**
+     * @var Filter\FilterIterator All filters
+     */
+    protected $filters;
+
+    /**
+     * Constructor
+     *
+     * Initializes Filter\FilterIterator in which filters will be aggregated
+     */
+    public function __construct()
+    {
+        $this->filters = new Filter\FilterIterator();
+    }
+
+    /**
+     * Apply the filters
+     *
+     * Begins iteration of the filters.
+     *
+     * @param  mixed $context Object under observation
+     * @param  mixed $argv Associative array of arguments
+     * @return mixed
+     */
+    public function run($context, array $argv = [])
+    {
+        $chain = clone $this->getFilters();
+
+        if ($chain->isEmpty()) {
+            return;
+        }
+
+        $next = $chain->extract();
+        if (!$next instanceof CallbackHandler) {
+            return;
+        }
+
+        return call_user_func($next->getCallback(), $context, $argv, $chain);
+    }
+
+    /**
+     * Connect a filter to the chain
+     *
+     * @param  callable $callback PHP Callback
+     * @param  int $priority Priority in the queue at which to execute; defaults to 1 (higher numbers == higher priority)
+     * @return CallbackHandler (to allow later unsubscribe)
+     * @throws Exception\InvalidCallbackException
+     */
+    public function attach($callback, $priority = 1)
+    {
+        if (empty($callback)) {
+            throw new Exception\InvalidCallbackException('No callback provided');
+        }
+        $filter = new CallbackHandler($callback, ['priority' => $priority]);
+        $this->filters->insert($filter, $priority);
+        return $filter;
+    }
+
+    /**
+     * Detach a filter from the chain
+     *
+     * @param  CallbackHandler $filter
+     * @return bool Returns true if filter found and unsubscribed; returns false otherwise
+     */
+    public function detach(CallbackHandler $filter)
+    {
+        return $this->filters->remove($filter);
+    }
+
+    /**
+     * Retrieve all filters
+     *
+     * @return Filter\FilterIterator
+     */
+    public function getFilters()
+    {
+        return $this->filters;
+    }
+
+    /**
+     * Clear all filters
+     *
+     * @return void
+     */
+    public function clearFilters()
+    {
+        $this->filters = new Filter\FilterIterator();
+    }
+
+    /**
+     * Return current responses
+     *
+     * Only available while the chain is still being iterated. Returns the
+     * current ResponseCollection.
+     *
+     * @return null|ResponseCollection
+     */
+    public function getResponses()
+    {
+        return;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/GlobalEventManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/GlobalEventManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/GlobalEventManager.php	(revision 5534)
@@ -0,0 +1,145 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use Zend\Stdlib\CallbackHandler;
+use Zend\Stdlib\PriorityQueue;
+
+/**
+ * Event manager: notification system
+ *
+ * Use the EventManager when you want to create a per-instance notification
+ * system for your objects.
+ *
+ * @deprecated This class is deprecated with 2.6.0, and will be removed in 3.0.0.
+ *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+ *     for details.
+ */
+class GlobalEventManager
+{
+    /**
+     * @var EventManagerInterface
+     */
+    protected static $events;
+
+    /**
+     * Set the event collection on which this will operate
+     *
+     * @param  null|EventManagerInterface $events
+     * @return void
+     */
+    public static function setEventCollection(EventManagerInterface $events = null)
+    {
+        static::$events = $events;
+    }
+
+    /**
+     * Get event collection on which this operates
+     *
+     * @return EventManagerInterface
+     */
+    public static function getEventCollection()
+    {
+        if (null === static::$events) {
+            static::setEventCollection(new EventManager());
+        }
+        return static::$events;
+    }
+
+    /**
+     * Trigger an event
+     *
+     * @param  string        $event
+     * @param  object|string $context
+     * @param  array|object  $argv
+     * @param  null|callable $callback
+     * @return ResponseCollection
+     */
+    public static function trigger($event, $context, $argv = [], $callback = null)
+    {
+        return static::getEventCollection()->trigger($event, $context, $argv, $callback);
+    }
+
+    /**
+     * Trigger listeners until return value of one causes a callback to evaluate
+     * to true.
+     *
+     * @param  string $event
+     * @param  string|object $context
+     * @param  array|object $argv
+     * @param  callable $callback
+     * @return ResponseCollection
+     * @deprecated Please use trigger()
+     */
+    public static function triggerUntil($event, $context, $argv, $callback)
+    {
+        trigger_error(
+            'This method is deprecated and will be removed in the future. Please use trigger() instead.',
+            E_USER_DEPRECATED
+        );
+        return static::trigger($event, $context, $argv, $callback);
+    }
+
+    /**
+     * Attach a listener to an event
+     *
+     * @param  string $event
+     * @param  callable $callback
+     * @param  int $priority
+     * @return CallbackHandler
+     */
+    public static function attach($event, $callback, $priority = 1)
+    {
+        return static::getEventCollection()->attach($event, $callback, $priority);
+    }
+
+    /**
+     * Detach a callback from a listener
+     *
+     * @param  CallbackHandler $listener
+     * @return bool
+     */
+    public static function detach(CallbackHandler $listener)
+    {
+        return static::getEventCollection()->detach($listener);
+    }
+
+    /**
+     * Retrieve list of events this object manages
+     *
+     * @return array
+     */
+    public static function getEvents()
+    {
+        return static::getEventCollection()->getEvents();
+    }
+
+    /**
+     * Retrieve all listeners for a given event
+     *
+     * @param  string $event
+     * @return PriorityQueue|array
+     */
+    public static function getListeners($event)
+    {
+        return static::getEventCollection()->getListeners($event);
+    }
+
+    /**
+     * Clear all listeners for a given event
+     *
+     * @param  string $event
+     * @return void
+     */
+    public static function clearListeners($event)
+    {
+        static::getEventCollection()->clearListeners($event);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ListenerAggregateInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ListenerAggregateInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ListenerAggregateInterface.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface for self-registering event listeners.
+ *
+ * Classes implementing this interface may be registered by name or instance
+ * with an EventManager, without an event name. The {@link attach()} method will
+ * then be called with the current EventManager instance, allowing the class to
+ * wire up one or more listeners.
+ */
+interface ListenerAggregateInterface
+{
+    /**
+     * Attach one or more listeners
+     *
+     * Implementors may add an optional $priority argument; the EventManager
+     * implementation will pass this to the aggregate.
+     *
+     * @param EventManagerInterface $events
+     *
+     * @return void
+     */
+    public function attach(EventManagerInterface $events);
+
+    /**
+     * Detach all previously attached listeners
+     *
+     * @param EventManagerInterface $events
+     *
+     * @return void
+     */
+    public function detach(EventManagerInterface $events);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ListenerAggregateTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ListenerAggregateTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ListenerAggregateTrait.php	(revision 5534)
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Provides logic to easily create aggregate listeners, without worrying about
+ * manually detaching events
+ */
+trait ListenerAggregateTrait
+{
+    /**
+     * @var \Zend\Stdlib\CallbackHandler[]
+     */
+    protected $listeners = [];
+
+    /**
+     * {@inheritDoc}
+     */
+    public function detach(EventManagerInterface $events)
+    {
+        foreach ($this->listeners as $index => $callback) {
+            if ($events->detach($callback)) {
+                unset($this->listeners[$index]);
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ProvidesEvents.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ProvidesEvents.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ProvidesEvents.php	(revision 5534)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+trigger_error('Zend\EventManager\ProvidesEvents has been deprecated in favor of Zend\EventManager\EventManagerAwareTrait; please update your code', E_USER_DEPRECATED);
+
+/**
+ * @deprecated Please use EventManagerAwareTrait instead.
+ *
+ * This trait exists solely for backwards compatibility in the 2.x branch and
+ * will likely be removed in 3.x.
+ */
+trait ProvidesEvents
+{
+    use EventManagerAwareTrait;
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ResponseCollection.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ResponseCollection.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/ResponseCollection.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use SplStack;
+
+/**
+ * Collection of signal handler return values
+ */
+class ResponseCollection extends SplStack
+{
+    protected $stopped = false;
+
+    /**
+     * Did the last response provided trigger a short circuit of the stack?
+     *
+     * @return bool
+     */
+    public function stopped()
+    {
+        return $this->stopped;
+    }
+
+    /**
+     * Mark the collection as stopped (or its opposite)
+     *
+     * @param  bool $flag
+     * @return ResponseCollection
+     */
+    public function setStopped($flag)
+    {
+        $this->stopped = (bool) $flag;
+        return $this;
+    }
+
+    /**
+     * Convenient access to the first handler return value.
+     *
+     * @return mixed The first handler return value
+     */
+    public function first()
+    {
+        return parent::bottom();
+    }
+
+    /**
+     * Convenient access to the last handler return value.
+     *
+     * If the collection is empty, returns null. Otherwise, returns value
+     * returned by last handler.
+     *
+     * @return mixed The last handler return value
+     */
+    public function last()
+    {
+        if (count($this) === 0) {
+            return;
+        }
+        return parent::top();
+    }
+
+    /**
+     * Check if any of the responses match the given value.
+     *
+     * @param  mixed $value The value to look for among responses
+     * @return bool
+     */
+    public function contains($value)
+    {
+        foreach ($this as $response) {
+            if ($response === $value) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventAggregateAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventAggregateAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventAggregateAwareInterface.php	(revision 5534)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface for allowing attachment of shared aggregate listeners.
+ *
+ * @deprecated This interface is deprecated with 2.6.0, and will be removed in 3.0.0.
+ *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+ *     for details.
+ */
+interface SharedEventAggregateAwareInterface
+{
+    /**
+     * Attach a listener aggregate
+     *
+     * @param  SharedListenerAggregateInterface $aggregate
+     * @param  int $priority If provided, a suggested priority for the aggregate to use
+     * @return mixed return value of {@link SharedListenerAggregateInterface::attachShared()}
+     */
+    public function attachAggregate(SharedListenerAggregateInterface $aggregate, $priority = 1);
+
+    /**
+     * Detach a listener aggregate
+     *
+     * @param  SharedListenerAggregateInterface $aggregate
+     * @return mixed return value of {@link SharedListenerAggregateInterface::detachShared()}
+    */
+    public function detachAggregate(SharedListenerAggregateInterface $aggregate);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManager.php	(revision 5534)
@@ -0,0 +1,179 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use Zend\Stdlib\CallbackHandler;
+use Zend\Stdlib\PriorityQueue;
+
+/**
+ * Shared/contextual EventManager
+ *
+ * Allows attaching to EMs composed by other classes without having an instance first.
+ * The assumption is that the SharedEventManager will be injected into EventManager
+ * instances, and then queried for additional listeners when triggering an event.
+ */
+class SharedEventManager implements
+    SharedEventAggregateAwareInterface,
+    SharedEventManagerInterface
+{
+    /**
+     * Identifiers with event connections
+     * @var array
+     */
+    protected $identifiers = [];
+
+    /**
+     * Attach a listener to an event
+     *
+     * Allows attaching a callback to an event offered by one or more
+     * identifying components. As an example, the following connects to the
+     * "getAll" event of both an AbstractResource and EntityResource:
+     *
+     * <code>
+     * $sharedEventManager = new SharedEventManager();
+     * $sharedEventManager->attach(
+     *     array('My\Resource\AbstractResource', 'My\Resource\EntityResource'),
+     *     'getAll',
+     *     function ($e) use ($cache) {
+     *         if (!$id = $e->getParam('id', false)) {
+     *             return;
+     *         }
+     *         if (!$data = $cache->load(get_class($resource) . '::getOne::' . $id )) {
+     *             return;
+     *         }
+     *         return $data;
+     *     }
+     * );
+     * </code>
+     *
+     * @param  string|array $id Identifier(s) for event emitting component(s)
+     * @param  string $event
+     * @param  callable $callback PHP Callback
+     * @param  int $priority Priority at which listener should execute
+     * @return CallbackHandler|array Either CallbackHandler or array of CallbackHandlers
+     */
+    public function attach($id, $event, $callback, $priority = 1)
+    {
+        $ids = (array) $id;
+        $listeners = [];
+        foreach ($ids as $id) {
+            if (!array_key_exists($id, $this->identifiers)) {
+                $this->identifiers[$id] = new EventManager($id);
+            }
+            $listeners[] = $this->identifiers[$id]->attach($event, $callback, $priority);
+        }
+        if (count($listeners) > 1) {
+            return $listeners;
+        }
+        return $listeners[0];
+    }
+
+    /**
+     * Attach a listener aggregate
+     *
+     * Listener aggregates accept an EventManagerInterface instance, and call attachShared()
+     * one or more times, typically to attach to multiple events using local
+     * methods.
+     *
+     * @param  SharedListenerAggregateInterface $aggregate
+     * @param  int $priority If provided, a suggested priority for the aggregate to use
+     * @return mixed return value of {@link ListenerAggregateInterface::attachShared()}
+     */
+    public function attachAggregate(SharedListenerAggregateInterface $aggregate, $priority = 1)
+    {
+        return $aggregate->attachShared($this, $priority);
+    }
+
+    /**
+     * Detach a listener from an event offered by a given resource
+     *
+     * @param  string|int $id
+     * @param  CallbackHandler $listener
+     * @return bool Returns true if event and listener found, and unsubscribed; returns false if either event or listener not found
+     */
+    public function detach($id, CallbackHandler $listener)
+    {
+        if (!array_key_exists($id, $this->identifiers)) {
+            return false;
+        }
+        return $this->identifiers[$id]->detach($listener);
+    }
+
+    /**
+     * Detach a listener aggregate
+     *
+     * Listener aggregates accept a SharedEventManagerInterface instance, and call detachShared()
+     * of all previously attached listeners.
+     *
+     * @param  SharedListenerAggregateInterface $aggregate
+     * @return mixed return value of {@link SharedListenerAggregateInterface::detachShared()}
+     */
+    public function detachAggregate(SharedListenerAggregateInterface $aggregate)
+    {
+        return $aggregate->detachShared($this);
+    }
+
+    /**
+     * Retrieve all registered events for a given resource
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  string|int $id
+     * @return array
+     */
+    public function getEvents($id)
+    {
+        if (!array_key_exists($id, $this->identifiers)) {
+            //Check if there are any id wildcards listeners
+            if ('*' != $id && array_key_exists('*', $this->identifiers)) {
+                return $this->identifiers['*']->getEvents();
+            }
+            return false;
+        }
+        return $this->identifiers[$id]->getEvents();
+    }
+
+    /**
+     * Retrieve all listeners for a given identifier and event
+     *
+     * @param  string|int $id
+     * @param  string|int $event
+     * @return false|PriorityQueue
+     */
+    public function getListeners($id, $event)
+    {
+        if (!array_key_exists($id, $this->identifiers)) {
+            return false;
+        }
+        return $this->identifiers[$id]->getListeners($event);
+    }
+
+    /**
+     * Clear all listeners for a given identifier, optionally for a specific event
+     *
+     * @param  string|int $id
+     * @param  null|string $event
+     * @return bool
+     */
+    public function clearListeners($id, $event = null)
+    {
+        if (!array_key_exists($id, $this->identifiers)) {
+            return false;
+        }
+
+        if (null === $event) {
+            unset($this->identifiers[$id]);
+            return true;
+        }
+
+        return $this->identifiers[$id]->clearListeners($event);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManagerAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManagerAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManagerAwareInterface.php	(revision 5534)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface to automate setter injection for a SharedEventManagerInterface instance
+ *
+ * @deprecated This interface is deprecated with 2.6.0, and will be removed in 3.0.0.
+ *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+ *     for details.
+ */
+interface SharedEventManagerAwareInterface extends SharedEventsCapableInterface
+{
+    /**
+     * Inject a SharedEventManager instance
+     *
+     * @param  SharedEventManagerInterface $sharedEventManager
+     * @return SharedEventManagerAwareInterface
+     */
+    public function setSharedManager(SharedEventManagerInterface $sharedEventManager);
+
+    /**
+     * Remove any shared collections
+     *
+     * @return void
+     */
+    public function unsetSharedManager();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManagerInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManagerInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventManagerInterface.php	(revision 5534)
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+use Zend\Stdlib\CallbackHandler;
+use Zend\Stdlib\PriorityQueue;
+
+/**
+ * Interface for shared event listener collections
+ */
+interface SharedEventManagerInterface
+{
+    /**
+     * Retrieve all listeners for a given identifier and event
+     *
+     * @param  string|int $id
+     * @param  string|int $event
+     * @return false|PriorityQueue
+     */
+    public function getListeners($id, $event);
+
+    /**
+     * Attach a listener to an event
+     *
+     * @param  string|array $id Identifier(s) for event emitting component(s)
+     * @param  string $event
+     * @param  callable $callback PHP Callback
+     * @param  int $priority Priority at which listener should execute
+     * @return CallbackHandler|array Either CallbackHandler or array of CallbackHandlers
+     */
+    public function attach($id, $event, $callback, $priority = 1);
+
+    /**
+     * Detach a listener from an event offered by a given resource
+     *
+     * @param  string|int $id
+     * @param  CallbackHandler $listener
+     * @return bool Returns true if event and listener found, and unsubscribed; returns false if either event or listener not found
+     */
+    public function detach($id, CallbackHandler $listener);
+
+    /**
+     * Retrieve all registered events for a given resource
+     *
+     * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
+     *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+     *     for details.
+     * @param  string|int $id
+     * @return array
+     */
+    public function getEvents($id);
+
+    /**
+     * Clear all listeners for a given identifier, optionally for a specific event
+     *
+     * @param  string|int $id
+     * @param  null|string $event
+     * @return bool
+     */
+    public function clearListeners($id, $event = null);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventsCapableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventsCapableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedEventsCapableInterface.php	(revision 5534)
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zend-eventmanager for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface indicating that an object composes or can compose a
+ * SharedEventManagerInterface instance.
+ */
+interface SharedEventsCapableInterface
+{
+    /**
+     * Retrieve the shared event manager, if composed.
+     *
+     * @return null|SharedEventManagerInterface
+     */
+    public function getSharedManager();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedListenerAggregateInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedListenerAggregateInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/SharedListenerAggregateInterface.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Interface for self-registering event listeners.
+ *
+ * Classes implementing this interface may be registered by name or instance
+ * with a SharedEventManager, without an event name. The {@link attach()} method will
+ * then be called with the current SharedEventManager instance, allowing the class to
+ * wire up one or more listeners.
+ *
+ * @deprecated This interface is deprecated with 2.6.0, and will be removed in 3.0.0.
+ *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+ *     for details.
+ */
+interface SharedListenerAggregateInterface
+{
+    /**
+     * Attach one or more listeners
+     *
+     * Implementors may add an optional $priority argument; the SharedEventManager
+     * implementation will pass this to the aggregate.
+     *
+     * @param SharedEventManagerInterface $events
+     */
+    public function attachShared(SharedEventManagerInterface $events);
+
+    /**
+     * Detach all previously attached listeners
+     *
+     * @param SharedEventManagerInterface $events
+     */
+    public function detachShared(SharedEventManagerInterface $events);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/StaticEventManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/StaticEventManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/StaticEventManager.php	(revision 5534)
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\EventManager;
+
+/**
+ * Static version of EventManager
+ *
+ * @deprecated This class is deprecated with 2.6.0, and will be removed in 3.0.0.
+ *     See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
+ *     for details.
+ */
+class StaticEventManager extends SharedEventManager
+{
+    /**
+     * @var SharedEventManagerInterface
+     */
+    protected static $instance;
+
+    /**
+     * Singleton
+     */
+    protected function __construct()
+    {
+    }
+
+    /**
+     * Singleton
+     *
+     * @return void
+     */
+    private function __clone()
+    {
+    }
+
+    /**
+     * Retrieve instance
+     *
+     * @return StaticEventManager
+     */
+    public static function getInstance()
+    {
+        if (null === static::$instance) {
+            static::setInstance(new static());
+        }
+        return static::$instance;
+    }
+
+    /**
+     * Set the singleton to a specific SharedEventManagerInterface instance
+     *
+     * @param SharedEventManagerInterface $instance
+     * @return void
+     */
+    public static function setInstance(SharedEventManagerInterface $instance)
+    {
+        static::$instance = $instance;
+    }
+
+    /**
+     * Is a singleton instance defined?
+     *
+     * @return bool
+     */
+    public static function hasInstance()
+    {
+        return (static::$instance instanceof SharedEventManagerInterface);
+    }
+
+    /**
+     * Reset the singleton instance
+     *
+     * @return void
+     */
+    public static function resetInstance()
+    {
+        static::$instance = null;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Test/EventListenerIntrospectionTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Test/EventListenerIntrospectionTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-eventmanager/src/Test/EventListenerIntrospectionTrait.php	(revision 5534)
@@ -0,0 +1,136 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zend-eventmanager for the canonical source repository
+ * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md
+ */
+
+namespace Zend\EventManager\Test;
+
+use PHPUnit_Framework_Assert as Assert;
+use Zend\EventManager\EventManager;
+use Zend\Stdlib\PriorityQueue;
+
+/**
+ * Trait providing utility methods and assertions for use in PHPUnit test cases.
+ *
+ * This trait may be composed into a test case, and provides:
+ *
+ * - methods for introspecting events and listeners
+ * - methods for asserting listeners are attached at a specific priority
+ *
+ * Some functionality in this trait duplicates functionality present in the
+ * version 2 EventManagerInterface and/or EventManager implementation, but
+ * abstracts that functionality for use in v3. As such, components or code
+ * that is testing for listener registration should use the methods in this
+ * trait to ensure tests are forwards-compatible between zend-eventmanager
+ * versions.
+ */
+trait EventListenerIntrospectionTrait
+{
+    /**
+     * Retrieve a list of event names from an event manager.
+     *
+     * @param EventManager $events
+     * @return string[]
+     */
+    private function getEventsFromEventManager(EventManager $events)
+    {
+        return $events->getEvents();
+    }
+
+    /**
+     * Retrieve an interable list of listeners for an event.
+     *
+     * Given an event and an event manager, returns an iterator with the
+     * listeners for that event, in priority order.
+     *
+     * If $withPriority is true, the key values will be the priority at which
+     * the given listener is attached.
+     *
+     * Do not pass $withPriority if you want to cast the iterator to an array,
+     * as many listeners will likely have the same priority, and thus casting
+     * will collapse to the last added.
+     *
+     * @param string $event
+     * @param EventManager $events
+     * @param bool $withPriority
+     * @return \Traversable
+     */
+    private function getListenersForEvent($event, EventManager $events, $withPriority = false)
+    {
+        $listeners = $events->getListeners($event);
+        return $this->traverseListeners($listeners, $withPriority);
+    }
+
+    /**
+     * Assert that a given listener exists at the specified priority.
+     *
+     * @param callable $expectedListener
+     * @param int $expectedPriority
+     * @param string $event
+     * @param EventManager $events
+     * @param string $message Failure message to use, if any.
+     */
+    private function assertListenerAtPriority(
+        callable $expectedListener,
+        $expectedPriority,
+        $event,
+        EventManager $events,
+        $message = ''
+    ) {
+        $message = $message ?: sprintf(
+            'Listener not found for event "%s" and priority %d',
+            $event,
+            $expectedPriority
+        );
+        $listeners = $this->getListenersForEvent($event, $events, true);
+        $found     = false;
+        foreach ($listeners as $priority => $listener) {
+            if ($listener === $expectedListener
+                && $priority === $expectedPriority
+            ) {
+                $found = true;
+                break;
+            }
+        }
+        Assert::assertTrue($found, $message);
+    }
+
+    /**
+     * Returns an indexed array of listeners for an event.
+     *
+     * Returns an indexed array of listeners for an event, in priority order.
+     * Priority values will not be included; use this only for testing if
+     * specific listeners are present, or for a count of listeners.
+     *
+     * @param string $event
+     * @param EventManager $events
+     * @return callable[]
+     */
+    private function getArrayOfListenersForEvent($event, EventManager $events)
+    {
+        return iterator_to_array($this->getListenersForEvent($event, $events));
+    }
+
+    /**
+     * Generator for traversing listeners in priority order.
+     *
+     * @param PriorityQueue $listeners
+     * @param bool $withPriority When true, yields priority as key.
+     */
+    public function traverseListeners(PriorityQueue $queue, $withPriority = false)
+    {
+        foreach ($queue as $handler) {
+            $listener = $handler->getCallback();
+            if ($withPriority) {
+                $priority = (int) $handler->getMetadatum('priority');
+                yield $priority => $listener;
+            } else {
+                yield $listener;
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,39 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 1.0.0 - 2015-09-17
+
+Initial release. This ports all hydrator classes and functionality from
+[zend-stdlib](https://github.com/zendframework/zend-stdlib) to a standalone
+repository. All final keywords are removed, to allow a deprecation cycle in the
+zend-stdlib component.
+
+Please note: the following classes will be marked as `final` for a version 2.0.0
+release to immediately follow 1.0.0:
+
+- `Zend\Hydrator\NamingStrategy\IdentityNamingStrategy`
+- `Zend\Hydrator\NamingStrategy\ArrayMapNamingStrategy`
+- `Zend\Hydrator\NamingStrategy\CompositeNamingStrategy`
+- `Zend\Hydrator\Strategy\ExplodeStrategy`
+- `Zend\Hydrator\Strategy\StrategyChain`
+- `Zend\Hydrator\Strategy\DateTimeFormatterStrategy`
+- `Zend\Hydrator\Strategy\BooleanStrategy`
+
+As such, you should not extend them.
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-hydrator/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-hydrator.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
+standards checks, and provides configuration for our selected checks.
+`phpcs` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/phpcs
+```
+
+`phpcs` also provides a tool that can automatically fix many CS issues,
+`phpcbf`:
+
+```console
+$ ./vendor/bin/phpcbf
+```
+
+If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-hydrator)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-hydrator.git
+   $ cd zend-hydrator
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-hydrator.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-hydrator.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/README.md	(revision 5534)
@@ -0,0 +1,11 @@
+# zend-hydrator
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-hydrator.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-hydrator)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-hydrator/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-hydrator?branch=master)
+
+`Zend\Hydrator` provides utilities for mapping arrays to objects, and vice
+versa, including facilities for filtering which data is mapped as well as
+providing mechanisms for mapping nested structures.
+
+- File issues at https://github.com/zendframework/zend-hydrator/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-stdlib
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/composer.json	(revision 5534)
@@ -0,0 +1,47 @@
+{
+    "name": "zendframework/zend-hydrator",
+    "description": " ",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "hydrator"
+    ],
+    "homepage": "https://github.com/zendframework/zend-hydrator",
+    "autoload": {
+        "psr-4": {
+            "Zend\\Hydrator\\": "src/"
+        }
+    },
+    "require": {
+        "php": ">=5.5",
+        "zendframework/zend-stdlib": "^2.5.1"
+    },
+    "require-dev": {
+        "zendframework/zend-eventmanager": "^2.5.1",
+        "zendframework/zend-inputfilter": "^2.5.1",
+        "zendframework/zend-serializer": "^2.5.1",
+        "zendframework/zend-servicemanager": "^2.5.1",
+        "zendframework/zend-filter": "^2.5.1",
+        "phpunit/PHPUnit": "~4.0",
+        "squizlabs/php_codesniffer": "^2.0@dev"
+    },
+    "suggest": {
+        "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage",
+        "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy",
+        "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage",
+        "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage"
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "extra": {
+        "branch-alias": {
+            "dev-master": "1.0-dev",
+            "dev-develop": "1.1-dev"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\Hydrator\\": "test/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/phpcs.xml
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/phpcs.xml	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/phpcs.xml	(revision 5534)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<ruleset name="Zend Framework coding standard">
+    <description>Zend Framework coding standard</description>
+
+    <!-- display progress -->
+    <arg value="p"/>
+    <arg name="colors"/>
+
+    <!-- inherit rules from: -->
+    <rule ref="PSR2"/>
+    <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
+    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
+        <properties>
+            <property name="ignoreBlankLines" value="false"/>
+        </properties>
+    </rule>
+
+    <!-- Paths to check -->
+    <file>src</file>
+    <file>test</file>
+</ruleset>
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/AbstractHydrator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/AbstractHydrator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/AbstractHydrator.php	(revision 5534)
@@ -0,0 +1,283 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use ArrayObject;
+
+abstract class AbstractHydrator implements
+    HydratorInterface,
+    StrategyEnabledInterface,
+    FilterEnabledInterface,
+    NamingStrategyEnabledInterface
+{
+    /**
+     * The list with strategies that this hydrator has.
+     *
+     * @var ArrayObject
+     */
+    protected $strategies;
+
+    /**
+     * An instance of NamingStrategy\NamingStrategyInterface
+     *
+     * @var NamingStrategy\NamingStrategyInterface
+     */
+    protected $namingStrategy;
+
+    /**
+     * Composite to filter the methods, that need to be hydrated
+     *
+     * @var Filter\FilterComposite
+     */
+    protected $filterComposite;
+
+    /**
+     * Initializes a new instance of this class.
+     */
+    public function __construct()
+    {
+        $this->strategies = new ArrayObject();
+        $this->filterComposite = new Filter\FilterComposite();
+    }
+
+    /**
+     * Gets the strategy with the given name.
+     *
+     * @param string $name The name of the strategy to get.
+     *
+     * @throws Exception\InvalidArgumentException
+     * @return Strategy\StrategyInterface
+     */
+    public function getStrategy($name)
+    {
+        if (isset($this->strategies[$name])) {
+            return $this->strategies[$name];
+        }
+
+        if (!isset($this->strategies['*'])) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s: no strategy by name of "%s", and no wildcard strategy present',
+                __METHOD__,
+                $name
+            ));
+        }
+
+        return $this->strategies['*'];
+    }
+
+    /**
+     * Checks if the strategy with the given name exists.
+     *
+     * @param string $name The name of the strategy to check for.
+     * @return bool
+     */
+    public function hasStrategy($name)
+    {
+        return array_key_exists($name, $this->strategies)
+               || array_key_exists('*', $this->strategies);
+    }
+
+    /**
+     * Adds the given strategy under the given name.
+     *
+     * @param string $name The name of the strategy to register.
+     * @param Strategy\StrategyInterface $strategy The strategy to register.
+     * @return HydratorInterface
+     */
+    public function addStrategy($name, Strategy\StrategyInterface $strategy)
+    {
+        $this->strategies[$name] = $strategy;
+        return $this;
+    }
+
+    /**
+     * Removes the strategy with the given name.
+     *
+     * @param string $name The name of the strategy to remove.
+     * @return HydratorInterface
+     */
+    public function removeStrategy($name)
+    {
+        unset($this->strategies[$name]);
+        return $this;
+    }
+
+    /**
+     * Converts a value for extraction. If no strategy exists the plain value is returned.
+     *
+     * @param  string $name  The name of the strategy to use.
+     * @param  mixed  $value  The value that should be converted.
+     * @param  mixed  $object The object is optionally provided as context.
+     * @return mixed
+     */
+    public function extractValue($name, $value, $object = null)
+    {
+        if ($this->hasStrategy($name)) {
+            $strategy = $this->getStrategy($name);
+            $value = $strategy->extract($value, $object);
+        }
+        return $value;
+    }
+
+    /**
+     * Converts a value for hydration. If no strategy exists the plain value is returned.
+     *
+     * @param string $name The name of the strategy to use.
+     * @param mixed $value The value that should be converted.
+     * @param array $data The whole data is optionally provided as context.
+     * @return mixed
+     */
+    public function hydrateValue($name, $value, $data = null)
+    {
+        if ($this->hasStrategy($name)) {
+            $strategy = $this->getStrategy($name);
+            $value = $strategy->hydrate($value, $data);
+        }
+        return $value;
+    }
+
+    /**
+     * Convert a name for extraction. If no naming strategy exists, the plain value is returned.
+     *
+     * @param string $name    The name to convert.
+     * @param null   $object  The object is optionally provided as context.
+     * @return mixed
+     */
+    public function extractName($name, $object = null)
+    {
+        if ($this->hasNamingStrategy()) {
+            $name = $this->getNamingStrategy()->extract($name, $object);
+        }
+        return $name;
+    }
+
+    /**
+     * Converts a value for hydration. If no naming strategy exists, the plain value is returned.
+     *
+     * @param string $name  The name to convert.
+     * @param array  $data  The whole data is optionally provided as context.
+     * @return mixed
+     */
+    public function hydrateName($name, $data = null)
+    {
+        if ($this->hasNamingStrategy()) {
+            $name = $this->getNamingStrategy()->hydrate($name, $data);
+        }
+        return $name;
+    }
+
+    /**
+     * Get the filter instance
+     *
+     * @return Filter\FilterComposite
+     */
+    public function getFilter()
+    {
+        return $this->filterComposite;
+    }
+
+    /**
+     * Add a new filter to take care of what needs to be hydrated.
+     * To exclude e.g. the method getServiceLocator:
+     *
+     * <code>
+     * $composite->addFilter("servicelocator",
+     *     function ($property) {
+     *         list($class, $method) = explode('::', $property);
+     *         if ($method === 'getServiceLocator') {
+     *             return false;
+     *         }
+     *         return true;
+     *     }, FilterComposite::CONDITION_AND
+     * );
+     * </code>
+     *
+     * @param string $name Index in the composite
+     * @param callable|Filter\FilterInterface $filter
+     * @param int $condition
+     * @return Filter\FilterComposite
+     */
+    public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR)
+    {
+        return $this->filterComposite->addFilter($name, $filter, $condition);
+    }
+
+    /**
+     * Check whether a specific filter exists at key $name or not
+     *
+     * @param string $name Index in the composite
+     * @return bool
+     */
+    public function hasFilter($name)
+    {
+        return $this->filterComposite->hasFilter($name);
+    }
+
+    /**
+     * Remove a filter from the composition.
+     * To not extract "has" methods, you simply need to unregister it
+     *
+     * <code>
+     * $filterComposite->removeFilter('has');
+     * </code>
+     *
+     * @param $name
+     * @return Filter\FilterComposite
+     */
+    public function removeFilter($name)
+    {
+        return $this->filterComposite->removeFilter($name);
+    }
+
+    /**
+     * Adds the given naming strategy
+     *
+     * @param NamingStrategy\NamingStrategyInterface $strategy The naming to register.
+     * @return self
+     */
+    public function setNamingStrategy(NamingStrategy\NamingStrategyInterface $strategy)
+    {
+        $this->namingStrategy = $strategy;
+
+        return $this;
+    }
+
+    /**
+     * Gets the naming strategy.
+     *
+     * @return NamingStrategy\NamingStrategyInterface
+     */
+    public function getNamingStrategy()
+    {
+        return $this->namingStrategy;
+    }
+
+    /**
+     * Checks if a naming strategy exists.
+     *
+     * @return bool
+     */
+    public function hasNamingStrategy()
+    {
+        return isset($this->namingStrategy);
+    }
+
+    /**
+     * Removes the naming strategy
+     *
+     * @return self
+     */
+    public function removeNamingStrategy()
+    {
+        $this->namingStrategy = null;
+
+        return $this;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php	(revision 5534)
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\EventManager;
+use Zend\EventManager\EventManagerAwareInterface;
+use Zend\EventManager\EventManagerInterface;
+use Zend\Hydrator\HydratorInterface;
+
+/**
+ * Aggregate hydrator that composes multiple hydrators via events
+ */
+class AggregateHydrator implements HydratorInterface, EventManagerAwareInterface
+{
+    const DEFAULT_PRIORITY = 1;
+
+    /**
+     * @var EventManagerInterface|null
+     */
+    protected $eventManager;
+
+    /**
+     * Attaches the provided hydrator to the list of hydrators to be used while hydrating/extracting data
+     *
+     * @param HydratorInterface $hydrator
+     * @param int $priority
+     */
+    public function add(HydratorInterface $hydrator, $priority = self::DEFAULT_PRIORITY)
+    {
+        $this->getEventManager()->attachAggregate(new HydratorListener($hydrator), $priority);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function extract($object)
+    {
+        $event = new ExtractEvent($this, $object);
+
+        $this->getEventManager()->trigger($event);
+
+        return $event->getExtractedData();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function hydrate(array $data, $object)
+    {
+        $event = new HydrateEvent($this, $object, $data);
+
+        $this->getEventManager()->trigger($event);
+
+        return $event->getHydratedObject();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function setEventManager(EventManagerInterface $eventManager)
+    {
+        $eventManager->setIdentifiers([__CLASS__, get_class($this)]);
+
+        $this->eventManager = $eventManager;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getEventManager()
+    {
+        if (null === $this->eventManager) {
+            $this->setEventManager(new EventManager());
+        }
+
+        return $this->eventManager;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/ExtractEvent.php	(revision 5534)
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\Event;
+
+/**
+ * Event triggered when the {@see AggregateHydrator} extracts
+ * data from an object
+ */
+class ExtractEvent extends Event
+{
+    const EVENT_EXTRACT = 'extract';
+
+    /**
+     * {@inheritDoc}
+     */
+    protected $name = self::EVENT_EXTRACT;
+
+    /**
+     * @var object
+     */
+    protected $extractionObject;
+
+    /**
+     * @var array
+     */
+    protected $extractedData = [];
+
+    /**
+     * @param object $target
+     * @param object $extractionObject
+     */
+    public function __construct($target, $extractionObject)
+    {
+        $this->target           = $target;
+        $this->extractionObject = $extractionObject;
+    }
+
+    /**
+     * Retrieves the object from which data is extracted
+     *
+     * @return object
+     */
+    public function getExtractionObject()
+    {
+        return $this->extractionObject;
+    }
+
+    /**
+     * @param object $extractionObject
+     *
+     * @return void
+     */
+    public function setExtractionObject($extractionObject)
+    {
+        $this->extractionObject = $extractionObject;
+    }
+
+    /**
+     * Retrieves the data that has been extracted
+     *
+     * @return array
+     */
+    public function getExtractedData()
+    {
+        return $this->extractedData;
+    }
+
+    /**
+     * @param array $extractedData
+     *
+     * @return void
+     */
+    public function setExtractedData(array $extractedData)
+    {
+        $this->extractedData = $extractedData;
+    }
+
+    /**
+     * Merge provided data with the extracted data
+     *
+     * @param array $additionalData
+     *
+     * @return void
+     */
+    public function mergeExtractedData(array $additionalData)
+    {
+        $this->extractedData = array_merge($this->extractedData, $additionalData);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/HydrateEvent.php	(revision 5534)
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\Event;
+
+/**
+ * Event triggered when the {@see AggregateHydrator} hydrates
+ * data into an object
+ */
+class HydrateEvent extends Event
+{
+    const EVENT_HYDRATE = 'hydrate';
+
+    /**
+     * {@inheritDoc}
+     */
+    protected $name = self::EVENT_HYDRATE;
+
+    /**
+     * @var object
+     */
+    protected $hydratedObject;
+
+    /**
+     * @var array
+     */
+    protected $hydrationData;
+
+    /**
+     * @param object $target
+     * @param object $hydratedObject
+     * @param array  $hydrationData
+     */
+    public function __construct($target, $hydratedObject, array $hydrationData)
+    {
+        $this->target         = $target;
+        $this->hydratedObject = $hydratedObject;
+        $this->hydrationData  = $hydrationData;
+    }
+
+    /**
+     * Retrieves the object that is being hydrated
+     *
+     * @return object
+     */
+    public function getHydratedObject()
+    {
+        return $this->hydratedObject;
+    }
+
+    /**
+     * @param object $hydratedObject
+     */
+    public function setHydratedObject($hydratedObject)
+    {
+        $this->hydratedObject = $hydratedObject;
+    }
+
+    /**
+     * Retrieves the data that is being used for hydration
+     *
+     * @return array
+     */
+    public function getHydrationData()
+    {
+        return $this->hydrationData;
+    }
+
+    /**
+     * @param array $hydrationData
+     */
+    public function setHydrationData(array $hydrationData)
+    {
+        $this->hydrationData = $hydrationData;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Aggregate;
+
+use Zend\EventManager\AbstractListenerAggregate;
+use Zend\EventManager\EventManagerInterface;
+use Zend\Hydrator\HydratorInterface;
+
+/**
+ * Aggregate listener wrapping around a hydrator.
+ *
+ * Listens to {@see HydrateEvent::EVENT_HYDRATE} and {@see ExtractEvent::EVENT_EXTRACT}
+ */
+class HydratorListener extends AbstractListenerAggregate
+{
+    /**
+     * @var HydratorInterface
+     */
+    protected $hydrator;
+
+    /**
+     * @param HydratorInterface $hydrator
+     */
+    public function __construct(HydratorInterface $hydrator)
+    {
+        $this->hydrator = $hydrator;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function attach(EventManagerInterface $events, $priority = 1)
+    {
+        $this->listeners[] = $events->attach(HydrateEvent::EVENT_HYDRATE, [$this, 'onHydrate'], $priority);
+        $this->listeners[] = $events->attach(ExtractEvent::EVENT_EXTRACT, [$this, 'onExtract'], $priority);
+    }
+
+    /**
+     * Callback to be used when {@see HydrateEvent::EVENT_HYDRATE} is triggered
+     *
+     * @param HydrateEvent $event
+     * @return object
+     * @internal
+     */
+    public function onHydrate(HydrateEvent $event)
+    {
+        $object = $this->hydrator->hydrate($event->getHydrationData(), $event->getHydratedObject());
+        $event->setHydratedObject($object);
+        return $object;
+    }
+
+    /**
+     * Callback to be used when {@see ExtractEvent::EVENT_EXTRACT} is triggered
+     *
+     * @param ExtractEvent $event
+     * @return array
+     * @internal
+     */
+    public function onExtract(ExtractEvent $event)
+    {
+        $data = $this->hydrator->extract($event->getExtractionObject());
+        $event->mergeExtractedData($data);
+        return $data;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ArraySerializable.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ArraySerializable.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ArraySerializable.php	(revision 5534)
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+class ArraySerializable extends AbstractHydrator
+{
+    /**
+     * Extract values from the provided object
+     *
+     * Extracts values via the object's getArrayCopy() method.
+     *
+     * @param  object $object
+     * @return array
+     * @throws Exception\BadMethodCallException for an $object not implementing getArrayCopy()
+     */
+    public function extract($object)
+    {
+        if (! is_callable([$object, 'getArrayCopy'])) {
+            throw new Exception\BadMethodCallException(
+                sprintf('%s expects the provided object to implement getArrayCopy()', __METHOD__)
+            );
+        }
+
+        $data   = $object->getArrayCopy();
+        $filter = $this->getFilter();
+
+        foreach ($data as $name => $value) {
+            if (!$filter->filter($name)) {
+                unset($data[$name]);
+                continue;
+            }
+            $extractedName = $this->extractName($name, $object);
+            // replace the original key with extracted, if differ
+            if ($extractedName !== $name) {
+                unset($data[$name]);
+                $name = $extractedName;
+            }
+            $data[$name] = $this->extractValue($name, $value, $object);
+        }
+
+        return $data;
+    }
+
+    /**
+     * Hydrate an object
+     *
+     * Hydrates an object by passing $data to either its exchangeArray() or
+     * populate() method.
+     *
+     * @param  array $data
+     * @param  object $object
+     * @return object
+     * @throws Exception\BadMethodCallException for an $object not implementing exchangeArray() or populate()
+     */
+    public function hydrate(array $data, $object)
+    {
+        $replacement = [];
+        foreach ($data as $key => $value) {
+            $name = $this->hydrateName($key, $data);
+            $replacement[$name] = $this->hydrateValue($name, $value, $data);
+        }
+
+        if (is_callable([$object, 'exchangeArray'])) {
+            $object->exchangeArray($replacement);
+        } elseif (is_callable([$object, 'populate'])) {
+            $object->populate($replacement);
+        } else {
+            throw new Exception\BadMethodCallException(
+                sprintf('%s expects the provided object to implement exchangeArray() or populate()', __METHOD__)
+            );
+        }
+        return $object;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ClassMethods.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ClassMethods.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ClassMethods.php	(revision 5534)
@@ -0,0 +1,268 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+
+class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface
+{
+    /**
+     * Holds the names of the methods used for hydration, indexed by class::property name,
+     * false if the hydration method is not callable/usable for hydration purposes
+     *
+     * @var string[]|bool[]
+     */
+    private $hydrationMethodsCache = [];
+
+    /**
+     * A map of extraction methods to property name to be used during extraction, indexed
+     * by class name and method name
+     *
+     * @var string[][]
+     */
+    private $extractionMethodsCache = [];
+
+    /**
+     * Flag defining whether array keys are underscore-separated (true) or camel case (false)
+     *
+     * @var bool
+     */
+    protected $underscoreSeparatedKeys = true;
+
+    /**
+     * @var Filter\FilterInterface
+     */
+    private $callableMethodFilter;
+
+    /**
+     * Define if extract values will use camel case or name with underscore
+     * @param bool|array $underscoreSeparatedKeys
+     */
+    public function __construct($underscoreSeparatedKeys = true)
+    {
+        parent::__construct();
+        $this->setUnderscoreSeparatedKeys($underscoreSeparatedKeys);
+
+        $this->callableMethodFilter = new Filter\OptionalParametersFilter();
+
+        $this->filterComposite->addFilter('is', new Filter\IsFilter());
+        $this->filterComposite->addFilter('has', new Filter\HasFilter());
+        $this->filterComposite->addFilter('get', new Filter\GetFilter());
+        $this->filterComposite->addFilter(
+            'parameter',
+            new Filter\OptionalParametersFilter(),
+            Filter\FilterComposite::CONDITION_AND
+        );
+    }
+
+    /**
+     * @param  array|Traversable                 $options
+     * @return ClassMethods
+     * @throws Exception\InvalidArgumentException
+     */
+    public function setOptions($options)
+    {
+        if ($options instanceof Traversable) {
+            $options = ArrayUtils::iteratorToArray($options);
+        } elseif (!is_array($options)) {
+            throw new Exception\InvalidArgumentException(
+                'The options parameter must be an array or a Traversable'
+            );
+        }
+        if (isset($options['underscoreSeparatedKeys'])) {
+            $this->setUnderscoreSeparatedKeys($options['underscoreSeparatedKeys']);
+        }
+
+        return $this;
+    }
+
+    /**
+     * @param  bool      $underscoreSeparatedKeys
+     * @return ClassMethods
+     */
+    public function setUnderscoreSeparatedKeys($underscoreSeparatedKeys)
+    {
+        $this->underscoreSeparatedKeys = (bool) $underscoreSeparatedKeys;
+
+        if ($this->underscoreSeparatedKeys) {
+            $this->setNamingStrategy(new NamingStrategy\UnderscoreNamingStrategy);
+        } elseif ($this->getNamingStrategy() instanceof NamingStrategy\UnderscoreNamingStrategy) {
+            $this->removeNamingStrategy();
+        }
+
+        return $this;
+    }
+
+    /**
+     * @return bool
+     */
+    public function getUnderscoreSeparatedKeys()
+    {
+        return $this->underscoreSeparatedKeys;
+    }
+
+    /**
+     * Extract values from an object with class methods
+     *
+     * Extracts the getter/setter of the given $object.
+     *
+     * @param  object                           $object
+     * @return array
+     * @throws Exception\BadMethodCallException for a non-object $object
+     */
+    public function extract($object)
+    {
+        if (!is_object($object)) {
+            throw new Exception\BadMethodCallException(sprintf(
+                '%s expects the provided $object to be a PHP object)',
+                __METHOD__
+            ));
+        }
+
+        $objectClass = get_class($object);
+
+        // reset the hydrator's hydrator's cache for this object, as the filter may be per-instance
+        if ($object instanceof Filter\FilterProviderInterface) {
+            $this->extractionMethodsCache[$objectClass] = null;
+        }
+
+        // pass 1 - finding out which properties can be extracted, with which methods (populate hydration cache)
+        if (! isset($this->extractionMethodsCache[$objectClass])) {
+            $this->extractionMethodsCache[$objectClass] = [];
+            $filter                                     = $this->filterComposite;
+            $methods                                    = get_class_methods($object);
+
+            if ($object instanceof Filter\FilterProviderInterface) {
+                $filter = new Filter\FilterComposite(
+                    [$object->getFilter()],
+                    [new Filter\MethodMatchFilter('getFilter')]
+                );
+            }
+
+            foreach ($methods as $method) {
+                $methodFqn = $objectClass . '::' . $method;
+
+                if (! ($filter->filter($methodFqn) && $this->callableMethodFilter->filter($methodFqn))) {
+                    continue;
+                }
+
+                $attribute = $method;
+
+                if (strpos($method, 'get') === 0) {
+                    $attribute = substr($method, 3);
+                    if (!property_exists($object, $attribute)) {
+                        $attribute = lcfirst($attribute);
+                    }
+                }
+
+                $this->extractionMethodsCache[$objectClass][$method] = $attribute;
+            }
+        }
+
+        $values = [];
+
+        // pass 2 - actually extract data
+        foreach ($this->extractionMethodsCache[$objectClass] as $methodName => $attributeName) {
+            $realAttributeName          = $this->extractName($attributeName, $object);
+            $values[$realAttributeName] = $this->extractValue($realAttributeName, $object->$methodName(), $object);
+        }
+
+        return $values;
+    }
+
+    /**
+     * Hydrate an object by populating getter/setter methods
+     *
+     * Hydrates an object by getter/setter methods of the object.
+     *
+     * @param  array                            $data
+     * @param  object                           $object
+     * @return object
+     * @throws Exception\BadMethodCallException for a non-object $object
+     */
+    public function hydrate(array $data, $object)
+    {
+        if (!is_object($object)) {
+            throw new Exception\BadMethodCallException(sprintf(
+                '%s expects the provided $object to be a PHP object)',
+                __METHOD__
+            ));
+        }
+
+        $objectClass = get_class($object);
+
+        foreach ($data as $property => $value) {
+            $propertyFqn = $objectClass . '::$' . $property;
+
+            if (! isset($this->hydrationMethodsCache[$propertyFqn])) {
+                $setterName = 'set' . ucfirst($this->hydrateName($property, $data));
+
+                $this->hydrationMethodsCache[$propertyFqn] = is_callable([$object, $setterName])
+                    ? $setterName
+                    : false;
+            }
+
+            if ($this->hydrationMethodsCache[$propertyFqn]) {
+                $object->{$this->hydrationMethodsCache[$propertyFqn]}($this->hydrateValue($property, $value, $data));
+            }
+        }
+
+        return $object;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR)
+    {
+        $this->resetCaches();
+
+        return parent::addFilter($name, $filter, $condition);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function removeFilter($name)
+    {
+        $this->resetCaches();
+
+        return parent::removeFilter($name);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function setNamingStrategy(NamingStrategy\NamingStrategyInterface $strategy)
+    {
+        $this->resetCaches();
+
+        return parent::setNamingStrategy($strategy);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function removeNamingStrategy()
+    {
+        $this->resetCaches();
+
+        return parent::removeNamingStrategy();
+    }
+
+    /**
+     * Reset all local hydration/extraction caches
+     */
+    private function resetCaches()
+    {
+        $this->hydrationMethodsCache = $this->extractionMethodsCache = [];
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/DelegatingHydrator.php	(revision 5534)
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DelegatingHydrator implements HydratorInterface
+{
+    /**
+     * @var ServiceLocatorInterface
+     */
+    protected $hydrators;
+
+    /**
+     * Constructor
+     *
+     * @param ServiceLocatorInterface $hydrators
+     */
+    public function __construct(ServiceLocatorInterface $hydrators)
+    {
+        $this->hydrators = $hydrators;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function hydrate(array $data, $object)
+    {
+        return $this->getHydrator($object)->hydrate($data, $object);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function extract($object)
+    {
+        return $this->getHydrator($object)->extract($object);
+    }
+
+    /**
+     * Gets hydrator of an object
+     *
+     * @param  object $object
+     * @return HydratorInterface
+     */
+    protected function getHydrator($object)
+    {
+        return $this->hydrators->get(get_class($object));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/DelegatingHydratorFactory.php	(revision 5534)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DelegatingHydratorFactory implements FactoryInterface
+{
+    /**
+     * Creates DelegatingHydrator
+     *
+     * @param  ServiceLocatorInterface $serviceLocator
+     * @return DelegatingHydrator
+     */
+    public function createService(ServiceLocatorInterface $serviceLocator)
+    {
+        // Assume that this factory is registered with the HydratorManager,
+        // and just pass it directly on.
+        return new DelegatingHydrator($serviceLocator);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/BadMethodCallException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Bad method call exception
+ */
+class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/DomainException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/DomainException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/DomainException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Domain exception
+ */
+class DomainException extends \DomainException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Exception marker interface
+ */
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/ExtensionNotLoadedException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Extension not loaded exception
+ */
+class ExtensionNotLoadedException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Invalid Argument Exception
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/InvalidCallbackException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Invalid callback exception
+ */
+class InvalidCallbackException extends DomainException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/LogicException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/LogicException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/LogicException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Logic exception
+ */
+class LogicException extends \LogicException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Exception;
+
+/**
+ * Runtime exception
+ */
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ExtractionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ExtractionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ExtractionInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface ExtractionInterface
+{
+    /**
+     * Extract values from an object
+     *
+     * @param  object $object
+     * @return array
+     */
+    public function extract($object);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterComposite.php	(revision 5534)
@@ -0,0 +1,198 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+use ArrayObject;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+class FilterComposite implements FilterInterface
+{
+    /**
+     * @var ArrayObject
+     */
+    protected $orFilter;
+
+    /**
+     * @var ArrayObject
+     */
+    protected $andFilter;
+
+    /**
+     * Constant to add with "or" conditition
+     */
+    const CONDITION_OR = 1;
+
+    /**
+     * Constant to add with "and" conditition
+     */
+    const CONDITION_AND = 2;
+
+    /**
+     * Define default Filter
+     *
+     * @param  array $orFilter
+     * @param  array $andFilter
+     * @throws InvalidArgumentException
+     */
+    public function __construct($orFilter = [], $andFilter = [])
+    {
+        array_walk(
+            $orFilter,
+            function ($value, $key) {
+                if (!is_callable($value) && !$value instanceof FilterInterface) {
+                    throw new InvalidArgumentException(
+                        'The value of ' . $key . ' should be either a callable or ' .
+                        'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
+                    );
+                }
+            }
+        );
+
+        array_walk(
+            $andFilter,
+            function ($value, $key) {
+                if (!is_callable($value) && !$value instanceof FilterInterface) {
+                    throw new InvalidArgumentException(
+                        'The value of ' . $key . '  should be either a callable or ' .
+                        'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
+                    );
+                }
+            }
+        );
+
+        $this->orFilter = new ArrayObject($orFilter);
+        $this->andFilter = new ArrayObject($andFilter);
+    }
+
+    /**
+     * Add a filter to the composite. Has to be indexed with $name in
+     * order to identify a specific filter.
+     *
+     * This example will exclude all methods from the hydration, that starts with 'getService'
+     * <code>
+     * $composite->addFilter('exclude',
+     *     function ($method) {
+     *         if (preg_match('/^getService/', $method) {
+     *             return false;
+     *         }
+     *         return true;
+     *     }, FilterComposite::CONDITION_AND
+     * );
+     * </code>
+     *
+     * @param  string                   $name
+     * @param  callable|FilterInterface $filter
+     * @param  int                      $condition Can be either
+     *     FilterComposite::CONDITION_OR or FilterComposite::CONDITION_AND
+     * @throws InvalidArgumentException
+     * @return FilterComposite
+     */
+    public function addFilter($name, $filter, $condition = self::CONDITION_OR)
+    {
+        if (!is_callable($filter) && !($filter instanceof FilterInterface)) {
+            throw new InvalidArgumentException(
+                'The value of ' . $name . ' should be either a callable or ' .
+                'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
+            );
+        }
+
+        if ($condition === self::CONDITION_OR) {
+            $this->orFilter[$name] = $filter;
+        } elseif ($condition === self::CONDITION_AND) {
+            $this->andFilter[$name] = $filter;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Remove a filter from the composition
+     *
+     * @param $name string Identifier for the filter
+     * @return FilterComposite
+     */
+    public function removeFilter($name)
+    {
+        if (isset($this->orFilter[$name])) {
+            unset($this->orFilter[$name]);
+        }
+
+        if (isset($this->andFilter[$name])) {
+            unset($this->andFilter[$name]);
+        }
+
+        return $this;
+    }
+
+    /**
+     * Check if $name has a filter registered
+     *
+     * @param $name string Identifier for the filter
+     * @return bool
+     */
+    public function hasFilter($name)
+    {
+        return isset($this->orFilter[$name]) || isset($this->andFilter[$name]);
+    }
+
+    /**
+     * Filter the composite based on the AND and OR condition
+     * Will return true if one from the "or conditions" and all from
+     * the "and condition" returns true. Otherwise false
+     *
+     * @param $property string Parameter will be e.g. Parent\Namespace\Class::method
+     * @return bool
+     */
+    public function filter($property)
+    {
+        $andCount = count($this->andFilter);
+        $orCount = count($this->orFilter);
+        // return true if no filters are registered
+        if ($orCount === 0 && $andCount === 0) {
+            return true;
+        } elseif ($orCount === 0 && $andCount !== 0) {
+            $returnValue = true;
+        } else {
+            $returnValue = false;
+        }
+
+        // Check if 1 from the or filters return true
+        foreach ($this->orFilter as $filter) {
+            if (is_callable($filter)) {
+                if ($filter($property) === true) {
+                    $returnValue = true;
+                    break;
+                }
+                continue;
+            } else {
+                if ($filter->filter($property) === true) {
+                    $returnValue = true;
+                    break;
+                }
+            }
+        }
+
+        // Check if all of the and condition return true
+        foreach ($this->andFilter as $filter) {
+            if (is_callable($filter)) {
+                if ($filter($property) === false) {
+                    return false;
+                }
+                continue;
+            } else {
+                if ($filter->filter($property) === false) {
+                    return false;
+                }
+            }
+        }
+
+        return $returnValue;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterInterface.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+interface FilterInterface
+{
+    /**
+     * Should return true, if the given filter
+     * does not match
+     *
+     * @param string $property The name of the property
+     * @return bool
+     */
+    public function filter($property);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/FilterProviderInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+interface FilterProviderInterface
+{
+    /**
+     * Provides a filter for hydration
+     *
+     * @return FilterInterface
+     */
+    public function getFilter();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/GetFilter.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class GetFilter implements FilterInterface
+{
+    public function filter($property)
+    {
+        $pos = strpos($property, '::');
+        if ($pos !== false) {
+            $pos += 2;
+        } else {
+            $pos = 0;
+        }
+
+        if (substr($property, $pos, 3) === 'get') {
+            return true;
+        }
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class HasFilter implements FilterInterface
+{
+    public function filter($property)
+    {
+        $pos = strpos($property, '::');
+        if ($pos !== false) {
+            $pos += 2;
+        } else {
+            $pos = 0;
+        }
+
+        if (substr($property, $pos, 3) === 'has') {
+            return true;
+        }
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/IsFilter.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class IsFilter implements FilterInterface
+{
+    public function filter($property)
+    {
+        $pos = strpos($property, '::');
+        if ($pos !== false) {
+            $pos += 2;
+        } else {
+            $pos = 0;
+        }
+
+        if (substr($property, $pos, 2) === 'is') {
+            return true;
+        }
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php	(revision 5534)
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+class MethodMatchFilter implements FilterInterface
+{
+    /**
+     * The method to exclude
+     * @var string
+     */
+    protected $method = null;
+
+    /**
+     * Either an exclude or an include
+     * @var bool
+     */
+    protected $exclude = null;
+
+    /**
+     * @param string $method The method to exclude or include
+     * @param bool $exclude If the method should be excluded
+     */
+    public function __construct($method, $exclude = true)
+    {
+        $this->method = $method;
+        $this->exclude = $exclude;
+    }
+
+    public function filter($property)
+    {
+        $pos = strpos($property, '::');
+        if ($pos !== false) {
+            $pos += 2;
+        } else {
+            $pos = 0;
+        }
+        if (substr($property, $pos) === $this->method) {
+            return !$this->exclude;
+        }
+        return $this->exclude;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php	(revision 5534)
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+use ReflectionException;
+use ReflectionMethod;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+class NumberOfParameterFilter implements FilterInterface
+{
+    /**
+     * The number of parameters beeing accepted
+     * @var int
+     */
+    protected $numberOfParameters = null;
+
+    /**
+     * @param int $numberOfParameters Number of accepted parameters
+     */
+    public function __construct($numberOfParameters = 0)
+    {
+        $this->numberOfParameters = (int) $numberOfParameters;
+    }
+
+    /**
+     * @param string $property the name of the property
+     * @return bool
+     * @throws InvalidArgumentException
+     */
+    public function filter($property)
+    {
+        try {
+            $reflectionMethod = new ReflectionMethod($property);
+        } catch (ReflectionException $exception) {
+            throw new InvalidArgumentException(
+                "Method $property doesn't exist"
+            );
+        }
+
+        return $reflectionMethod->getNumberOfParameters() === $this->numberOfParameters;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Filter/OptionalParametersFilter.php	(revision 5534)
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Filter;
+
+use ReflectionException;
+use ReflectionMethod;
+use ReflectionParameter;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+/**
+ * Filter that includes methods which have no parameters or only optional parameters
+ */
+class OptionalParametersFilter implements FilterInterface
+{
+    /**
+     * Map of methods already analyzed
+     * by {@see OptionalParametersFilter::filter()},
+     * cached for performance reasons
+     *
+     * @var bool[]
+     */
+    protected static $propertiesCache = [];
+
+    /**
+     * {@inheritDoc}
+     */
+    public function filter($property)
+    {
+        if (isset(static::$propertiesCache[$property])) {
+            return static::$propertiesCache[$property];
+        }
+
+        try {
+            $reflectionMethod = new ReflectionMethod($property);
+        } catch (ReflectionException $exception) {
+            throw new InvalidArgumentException(sprintf('Method %s doesn\'t exist', $property));
+        }
+
+        $mandatoryParameters = array_filter(
+            $reflectionMethod->getParameters(),
+            function (ReflectionParameter $parameter) {
+                return ! $parameter->isOptional();
+            }
+        );
+
+        return static::$propertiesCache[$property] = empty($mandatoryParameters);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php	(revision 5534)
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface FilterEnabledInterface extends Filter\FilterProviderInterface
+{
+    /**
+     * Add a new filter to take care of what needs to be hydrated.
+     * To exclude e.g. the method getServiceLocator:
+     *
+     * <code>
+     * $composite->addFilter(
+     *     "servicelocator",
+     *     function ($property) {
+     *         list($class, $method) = explode('::', $property);
+     *         if ($method === 'getServiceLocator') {
+     *             return false;
+     *         }
+     *         return true;
+     *     },
+     *     FilterComposite::CONDITION_AND
+     * );
+     * </code>
+     *
+     * @param string $name Index in the composite
+     * @param callable|Filter\FilterInterface $filter
+     * @param int $condition
+     * @return Filter\FilterComposite
+     */
+    public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR);
+
+    /**
+     * Check whether a specific filter exists at key $name or not
+     *
+     * @param string $name Index in the composite
+     * @return bool
+     */
+    public function hasFilter($name);
+
+    /**
+     * Remove a filter from the composition.
+     * To not extract "has" methods, you simply need to unregister it
+     *
+     * <code>
+     * $filterComposite->removeFilter('has');
+     * </code>
+     *
+     * @param $name
+     * @return Filter\FilterComposite
+     */
+    public function removeFilter($name);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydrationInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydrationInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydrationInterface.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface HydrationInterface
+{
+    /**
+     * Hydrate $object with the provided $data.
+     *
+     * @param  array $data
+     * @param  object $object
+     * @return object
+     */
+    public function hydrate(array $data, $object);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorAwareInterface.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface HydratorAwareInterface
+{
+    /**
+     * Set hydrator
+     *
+     * @param  HydratorInterface $hydrator
+     * @return HydratorAwareInterface
+     */
+    public function setHydrator(HydratorInterface $hydrator);
+
+    /**
+     * Retrieve hydrator
+     *
+     * @return HydratorInterface
+     */
+    public function getHydrator();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorAwareTrait.php	(revision 5534)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+trait HydratorAwareTrait
+{
+    /**
+     * Hydrator instance
+     *
+     * @var HydratorInterface
+     * @access protected
+     */
+    protected $hydrator = null;
+
+    /**
+     * Set hydrator
+     *
+     * @param  HydratorInterface $hydrator
+     * @return self
+     * @access public
+     */
+    public function setHydrator(HydratorInterface $hydrator)
+    {
+        $this->hydrator = $hydrator;
+
+        return $this;
+    }
+
+    /**
+     * Retrieve hydrator
+     *
+     * @param void
+     * @return null|HydratorInterface
+     * @access public
+     */
+    public function getHydrator()
+    {
+        return $this->hydrator;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface HydratorInterface extends HydrationInterface, ExtractionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorOptionsInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Traversable;
+
+interface HydratorOptionsInterface
+{
+    /**
+     * @param  array|Traversable $options
+     * @return self
+     */
+    public function setOptions($options);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php	(revision 5534)
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use Zend\ServiceManager\AbstractPluginManager;
+
+/**
+ * Plugin manager implementation for hydrators.
+ *
+ * Enforces that adapters retrieved are instances of HydratorInterface
+ */
+class HydratorPluginManager extends AbstractPluginManager
+{
+    /**
+     * Whether or not to share by default
+     *
+     * @var bool
+     */
+    protected $shareByDefault = false;
+
+    /**
+     * Default aliases
+     *
+     * @var array
+     */
+    protected $aliases = [
+        'delegatinghydrator' => 'Zend\Hydrator\DelegatingHydrator',
+    ];
+
+    /**
+     * Default set of adapters
+     *
+     * @var array
+     */
+    protected $invokableClasses = [
+        'arrayserializable' => 'Zend\Hydrator\ArraySerializable',
+        'classmethods'      => 'Zend\Hydrator\ClassMethods',
+        'objectproperty'    => 'Zend\Hydrator\ObjectProperty',
+        'reflection'        => 'Zend\Hydrator\Reflection'
+    ];
+
+    /**
+     * Default factory-based adapters
+     *
+     * @var array
+     */
+    protected $factories = [
+        'Zend\Hydrator\DelegatingHydrator' => 'Zend\Hydrator\DelegatingHydratorFactory',
+    ];
+
+    /**
+     * {@inheritDoc}
+     */
+    public function validatePlugin($plugin)
+    {
+        if ($plugin instanceof HydratorInterface) {
+            // we're okay
+            return;
+        }
+
+        throw new Exception\RuntimeException(sprintf(
+            'Plugin of type %s is invalid; must implement Zend\Hydrator\HydratorInterface',
+            (is_object($plugin) ? get_class($plugin) : gettype($plugin))
+        ));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingArrayIterator.php	(revision 5534)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Iterator;
+
+use ArrayIterator;
+use Zend\Hydrator\HydratorInterface;
+
+class HydratingArrayIterator extends HydratingIteratorIterator
+{
+    /**
+     * @var HydratorInterface
+     */
+    protected $hydrator;
+
+    /**
+     * @var object
+     */
+    protected $prototype;
+
+    /**
+     * @param HydratorInterface $hydrator
+     * @param array $data
+     * @param string|object $prototype Object, or class name to use for prototype.
+     */
+    public function __construct(HydratorInterface $hydrator, array $data, $prototype)
+    {
+        parent::__construct($hydrator, new ArrayIterator($data), $prototype);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorInterface.php	(revision 5534)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Iterator;
+
+use Iterator;
+use Zend\Hydrator\HydratorInterface;
+
+interface HydratingIteratorInterface extends Iterator
+{
+    /**
+     * This sets the prototype to hydrate.
+     *
+     * This prototype can be the name of the class or the object itself;
+     * iteration will clone the object.
+     *
+     * @param string|object $prototype
+     */
+    public function setPrototype($prototype);
+
+    /**
+     * Sets the hydrator to use during iteration.
+     *
+     * @param HydratorInterface $hydrator
+     */
+    public function setHydrator(HydratorInterface $hydrator);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php	(revision 5534)
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Iterator;
+
+use Iterator;
+use IteratorIterator;
+use Zend\Hydrator\Exception\InvalidArgumentException;
+use Zend\Hydrator\HydratorInterface;
+
+class HydratingIteratorIterator extends IteratorIterator implements HydratingIteratorInterface
+{
+    /**
+     * @var HydratorInterface
+     */
+    protected $hydrator;
+
+    /**
+     * @var object
+     */
+    protected $prototype;
+
+    /**
+     * @param HydratorInterface $hydrator
+     * @param Iterator $data
+     * @param string|object $prototype Object or class name to use for prototype.
+     */
+    public function __construct(HydratorInterface $hydrator, Iterator $data, $prototype)
+    {
+        $this->setHydrator($hydrator);
+        $this->setPrototype($prototype);
+        parent::__construct($data);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function setPrototype($prototype)
+    {
+        if (is_object($prototype)) {
+            $this->prototype = $prototype;
+            return;
+        }
+
+        if (!class_exists($prototype)) {
+            throw new InvalidArgumentException(
+                sprintf('Method %s was passed an invalid class name: %s', __METHOD__, $prototype)
+            );
+        }
+
+        $this->prototype = new $prototype;
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function setHydrator(HydratorInterface $hydrator)
+    {
+        $this->hydrator = $hydrator;
+    }
+
+    /**
+     * @return object Returns hydrated clone of $prototype
+     */
+    public function current()
+    {
+        $currentValue = parent::current();
+        $object       = clone $this->prototype;
+        $this->hydrator->hydrate($currentValue, $object);
+        return $object;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/ArrayMapNamingStrategy.php	(revision 5534)
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+class ArrayMapNamingStrategy implements NamingStrategyInterface
+{
+    /**
+     * @var string[]
+     */
+    private $extractionMap = [];
+
+    /**
+     * @var string[]
+     */
+    private $hydrationMap = [];
+
+    /**
+     * Constructor
+     *
+     * @param array $extractionMap A map of string keys and values for symmetric translation of hydrated
+     *                             and extracted field names
+     */
+    public function __construct(array $extractionMap)
+    {
+        $this->extractionMap = $extractionMap;
+        $this->hydrationMap  = array_flip($extractionMap);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function hydrate($name)
+    {
+        return isset($this->hydrationMap[$name]) ? $this->hydrationMap[$name] : $name;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function extract($name)
+    {
+        return isset($this->extractionMap[$name]) ? $this->extractionMap[$name] : $name;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php	(revision 5534)
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+class CompositeNamingStrategy implements NamingStrategyInterface
+{
+    /**
+     * @var array
+     */
+    private $namingStrategies = [];
+
+    /**
+     * @var NamingStrategyInterface
+     */
+    private $defaultNamingStrategy;
+
+    /**
+     * @param NamingStrategyInterface[]    $strategies            indexed by the name they translate
+     * @param NamingStrategyInterface|null $defaultNamingStrategy
+     */
+    public function __construct(array $strategies, NamingStrategyInterface $defaultNamingStrategy = null)
+    {
+        $this->namingStrategies = array_map(
+            function (NamingStrategyInterface $strategy) {
+                // this callback is here only to ensure type-safety
+                return $strategy;
+            },
+            $strategies
+        );
+
+        $this->defaultNamingStrategy = $defaultNamingStrategy ?: new IdentityNamingStrategy();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function extract($name)
+    {
+        $strategy = isset($this->namingStrategies[$name])
+            ? $this->namingStrategies[$name]
+            : $this->defaultNamingStrategy;
+
+        return $strategy->extract($name);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function hydrate($name)
+    {
+        $strategy = isset($this->namingStrategies[$name])
+            ? $this->namingStrategies[$name]
+            : $this->defaultNamingStrategy;
+
+        return $strategy->hydrate($name);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/IdentityNamingStrategy.php	(revision 5534)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+class IdentityNamingStrategy implements NamingStrategyInterface
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function hydrate($name)
+    {
+        return $name;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function extract($name)
+    {
+        return $name;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php	(revision 5534)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+class MapNamingStrategy implements NamingStrategyInterface
+{
+    /**
+     * Map for hydrate name conversion.
+     *
+     * @var array
+     */
+    protected $mapping = [];
+
+    /**
+     * Reversed map for extract name conversion.
+     *
+     * @var array
+     */
+    protected $reverse = [];
+
+    /**
+     * Initialize.
+     *
+     * @param array $mapping Map for name conversion on hydration
+     * @param array $reverse Reverse map for name conversion on extraction
+     */
+    public function __construct(array $mapping, array $reverse = null)
+    {
+        $this->mapping = $mapping;
+        $this->reverse = $reverse ?: $this->flipMapping($mapping);
+    }
+
+    /**
+     * Safelly flip mapping array.
+     *
+     * @param  array                    $array Array to flip
+     * @return array                    Flipped array
+     * @throws InvalidArgumentException
+     */
+    protected function flipMapping(array $array)
+    {
+        array_walk($array, function ($value) {
+            if (!is_string($value) && !is_int($value)) {
+                throw new InvalidArgumentException('Mapping array can\'t be flipped because of invalid value');
+            }
+        });
+
+        return array_flip($array);
+    }
+
+    /**
+     * Converts the given name so that it can be extracted by the hydrator.
+     *
+     * @param  string $name The original name
+     * @return mixed  The hydrated name
+     */
+    public function hydrate($name)
+    {
+        if (array_key_exists($name, $this->mapping)) {
+            return $this->mapping[$name];
+        }
+
+        return $name;
+    }
+
+    /**
+     * Converts the given name so that it can be hydrated by the hydrator.
+     *
+     * @param  string $name The original name
+     * @return mixed  The extracted name
+     */
+    public function extract($name)
+    {
+        if (array_key_exists($name, $this->reverse)) {
+            return $this->reverse[$name];
+        }
+
+        return $name;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/NamingStrategyInterface.php	(revision 5534)
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+/**
+ * Allow property extraction / hydration for hydrator
+ */
+interface NamingStrategyInterface
+{
+    /**
+     * Converts the given name so that it can be extracted by the hydrator.
+     *
+     * @param string $name   The original name
+     * @param object $object (optional) The original object for context.
+     * @return mixed         The hydrated name
+     */
+    public function hydrate($name);
+
+    /**
+     * Converts the given name so that it can be hydrated by the hydrator.
+     *
+     * @param string $name The original name
+     * @param array  $data (optional) The original data for context.
+     * @return mixed The extracted name
+     */
+    public function extract($name);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php	(revision 5534)
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\NamingStrategy;
+
+use Zend\Filter\FilterChain;
+
+class UnderscoreNamingStrategy implements NamingStrategyInterface
+{
+    /**
+     * @var FilterChain|null
+     */
+    protected static $camelCaseToUnderscoreFilter;
+
+    /**
+     * @var FilterChain|null
+     */
+    protected static $underscoreToStudlyCaseFilter;
+
+    /**
+     * Remove underscores and capitalize letters
+     *
+     * @param  string $name
+     * @return string
+     */
+    public function hydrate($name)
+    {
+        return $this->getUnderscoreToStudlyCaseFilter()->filter($name);
+    }
+
+    /**
+     * Remove capitalized letters and prepend underscores.
+     *
+     * @param  string $name
+     * @return string
+     */
+    public function extract($name)
+    {
+        return $this->getCamelCaseToUnderscoreFilter()->filter($name);
+    }
+
+    /**
+     * @return FilterChain
+     */
+    protected function getUnderscoreToStudlyCaseFilter()
+    {
+        if (static::$underscoreToStudlyCaseFilter instanceof FilterChain) {
+            return static::$underscoreToStudlyCaseFilter;
+        }
+
+        $filter = new FilterChain();
+
+        $filter->attachByName('WordUnderscoreToStudlyCase');
+
+        return static::$underscoreToStudlyCaseFilter = $filter;
+    }
+
+    /**
+     * @return FilterChain
+     */
+    protected function getCamelCaseToUnderscoreFilter()
+    {
+        if (static::$camelCaseToUnderscoreFilter instanceof FilterChain) {
+            return static::$camelCaseToUnderscoreFilter;
+        }
+
+        $filter = new FilterChain();
+
+        $filter->attachByName('WordCamelCaseToUnderscore');
+        $filter->attachByName('StringToLower');
+
+        return static::$camelCaseToUnderscoreFilter = $filter;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/NamingStrategyEnabledInterface.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface NamingStrategyEnabledInterface
+{
+    /**
+     * Adds the given naming strategy
+     *
+     * @param NamingStrategy\NamingStrategyInterface $strategy The naming to register.
+     * @return self
+     */
+    public function setNamingStrategy(NamingStrategy\NamingStrategyInterface $strategy);
+
+    /**
+     * Gets the naming strategy.
+     *
+     * @return NamingStrategy\NamingStrategyInterface
+     */
+    public function getNamingStrategy();
+
+    /**
+     * Checks if a naming strategy exists.
+     *
+     * @return bool
+     */
+    public function hasNamingStrategy();
+
+    /**
+     * Removes the naming with the given name.
+     *
+     * @return self
+     */
+    public function removeNamingStrategy();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ObjectProperty.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ObjectProperty.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/ObjectProperty.php	(revision 5534)
@@ -0,0 +1,109 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use ReflectionClass;
+use ReflectionProperty;
+
+class ObjectProperty extends AbstractHydrator
+{
+    /**
+     * @var array[] indexed by class name and then property name
+     */
+    private static $skippedPropertiesCache = [];
+
+    /**
+     * {@inheritDoc}
+     *
+     * Extracts the accessible non-static properties of the given $object.
+     *
+     * @throws Exception\BadMethodCallException for a non-object $object
+     */
+    public function extract($object)
+    {
+        if (!is_object($object)) {
+            throw new Exception\BadMethodCallException(
+                sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
+            );
+        }
+
+        $data   = get_object_vars($object);
+        $filter = $this->getFilter();
+
+        foreach ($data as $name => $value) {
+            // Filter keys, removing any we don't want
+            if (! $filter->filter($name)) {
+                unset($data[$name]);
+                continue;
+            }
+
+            // Replace name if extracted differ
+            $extracted = $this->extractName($name, $object);
+
+            if ($extracted !== $name) {
+                unset($data[$name]);
+                $name = $extracted;
+            }
+
+            $data[$name] = $this->extractValue($name, $value, $object);
+        }
+
+        return $data;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Hydrate an object by populating public properties
+     *
+     * Hydrates an object by setting public properties of the object.
+     *
+     * @throws Exception\BadMethodCallException for a non-object $object
+     */
+    public function hydrate(array $data, $object)
+    {
+        if (!is_object($object)) {
+            throw new Exception\BadMethodCallException(
+                sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
+            );
+        }
+
+        $properties = & self::$skippedPropertiesCache[get_class($object)];
+
+        if (! isset($properties)) {
+            $reflection = new ReflectionClass($object);
+            $properties = array_fill_keys(
+                array_map(
+                    function (ReflectionProperty $property) {
+                        return $property->getName();
+                    },
+                    $reflection->getProperties(
+                        ReflectionProperty::IS_PRIVATE
+                        + ReflectionProperty::IS_PROTECTED
+                        + ReflectionProperty::IS_STATIC
+                    )
+                ),
+                true
+            );
+        }
+
+        foreach ($data as $name => $value) {
+            $property = $this->hydrateName($name, $data);
+
+            if (isset($properties[$property])) {
+                continue;
+            }
+
+            $object->$property = $this->hydrateValue($property, $value, $data);
+        }
+
+        return $object;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Reflection.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Reflection.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Reflection.php	(revision 5534)
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+use ReflectionClass;
+use ReflectionProperty;
+
+class Reflection extends AbstractHydrator
+{
+    /**
+     * Simple in-memory array cache of ReflectionProperties used.
+     * @var ReflectionProperty[]
+     */
+    protected static $reflProperties = [];
+
+    /**
+     * Extract values from an object
+     *
+     * @param  object $object
+     * @return array
+     */
+    public function extract($object)
+    {
+        $result = [];
+        foreach (self::getReflProperties($object) as $property) {
+            $propertyName = $this->extractName($property->getName(), $object);
+            if (!$this->filterComposite->filter($propertyName)) {
+                continue;
+            }
+
+            $value = $property->getValue($object);
+            $result[$propertyName] = $this->extractValue($propertyName, $value, $object);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Hydrate $object with the provided $data.
+     *
+     * @param  array $data
+     * @param  object $object
+     * @return object
+     */
+    public function hydrate(array $data, $object)
+    {
+        $reflProperties = self::getReflProperties($object);
+        foreach ($data as $key => $value) {
+            $name = $this->hydrateName($key, $data);
+            if (isset($reflProperties[$name])) {
+                $reflProperties[$name]->setValue($object, $this->hydrateValue($name, $value, $data));
+            }
+        }
+        return $object;
+    }
+
+    /**
+     * Get a reflection properties from in-memory cache and lazy-load if
+     * class has not been loaded.
+     *
+     * @param  string|object $input
+     * @throws Exception\InvalidArgumentException
+     * @return ReflectionProperty[]
+     */
+    protected static function getReflProperties($input)
+    {
+        if (is_object($input)) {
+            $input = get_class($input);
+        } elseif (!is_string($input)) {
+            throw new Exception\InvalidArgumentException('Input must be a string or an object.');
+        }
+
+        if (isset(static::$reflProperties[$input])) {
+            return static::$reflProperties[$input];
+        }
+
+        static::$reflProperties[$input] = [];
+        $reflClass                      = new ReflectionClass($input);
+        $reflProperties                 = $reflClass->getProperties();
+
+        foreach ($reflProperties as $property) {
+            $property->setAccessible(true);
+            static::$reflProperties[$input][$property->getName()] = $property;
+        }
+
+        return static::$reflProperties[$input];
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/BooleanStrategy.php	(revision 5534)
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use Zend\Hydrator\Exception\InvalidArgumentException;
+
+/**
+ * This Strategy extracts and hydrates int and string values to Boolean values
+ */
+class BooleanStrategy implements StrategyInterface
+{
+    /**
+     * @var int|string
+     */
+    private $trueValue;
+
+    /**
+     * @var int|string
+     */
+    private $falseValue;
+
+    /**
+     * @param int|string $trueValue
+     * @param int|string $falseValue
+     * @throws InvalidArgumentException
+     */
+    public function __construct($trueValue, $falseValue)
+    {
+        if (!is_int($trueValue) && !is_string($trueValue)) {
+            throw new InvalidArgumentException(sprintf(
+                'Unable to instantiate BooleanStrategy. Expected int or string as $trueValue. %s was given',
+                is_object($trueValue) ? get_class($trueValue) : gettype($trueValue)
+            ));
+        }
+
+        if (!is_int($falseValue) && !is_string($falseValue)) {
+            throw new InvalidArgumentException(sprintf(
+                'Unable to instantiate BooleanStrategy. Expected int or string as $falseValue. %s was given',
+                is_object($falseValue) ? get_class($falseValue) : gettype($falseValue)
+            ));
+        }
+
+        $this->trueValue  = $trueValue;
+        $this->falseValue = $falseValue;
+    }
+
+    /**
+     * Converts the given value so that it can be extracted by the hydrator.
+     *
+     * @param  bool $value The original value.
+     * @throws InvalidArgumentException
+     * @return int|string Returns the value that should be extracted.
+     */
+    public function extract($value)
+    {
+        if (!is_bool($value)) {
+            throw new InvalidArgumentException(sprintf(
+                'Unable to extract. Expected bool. %s was given.',
+                is_object($value) ? get_class($value) : gettype($value)
+            ));
+        }
+
+        return $value === true ? $this->trueValue : $this->falseValue;
+    }
+
+    /**
+     * Converts the given value so that it can be hydrated by the hydrator.
+     *
+     * @param  int|string $value The original value.
+     * @throws InvalidArgumentException
+     * @return bool Returns the value that should be hydrated.
+     */
+    public function hydrate($value)
+    {
+        if (!is_string($value) && !is_int($value)) {
+            throw new InvalidArgumentException(sprintf(
+                'Unable to hydrate. Expected string or int. %s was given.',
+                is_object($value) ? get_class($value) : gettype($value)
+            ));
+        }
+
+        if ($value === $this->trueValue) {
+            return true;
+        }
+
+        if ($value === $this->falseValue) {
+            return false;
+        }
+
+        throw new InvalidArgumentException(sprintf(
+            'Unexpected value %s can\'t be hydrated. Expect %s or %s as Value.',
+            $value,
+            $this->trueValue,
+            $this->falseValue
+        ));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/ClosureStrategy.php	(revision 5534)
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+class ClosureStrategy implements StrategyInterface
+{
+    /**
+     * Function, used in extract method, default:
+     *
+     * <code>
+     * function ($value) {
+     *     return $value;
+     * };
+     * </code>
+     *
+     * @var callable
+     */
+    protected $extractFunc = null;
+
+    /**
+     * Function, used in hydrate method, default:
+     *
+     * <code>
+     * function ($value) {
+     *     return $value;
+     * };
+     * </code>
+     *
+     * @var callable
+     */
+    protected $hydrateFunc = null;
+
+    /**
+     * You can describe how your values will extract and hydrate, like this:
+     *
+     * <code>
+     * $hydrator->addStrategy('category', new ClosureStrategy(
+     *     function (Category $value) {
+     *         return (int) $value->id;
+     *     },
+     *     function ($value) {
+     *         return new Category((int) $value);
+     *     }
+     * ));
+     * </code>
+     *
+     * @param callable $extractFunc - anonymous function, that extract values
+     *     from object
+     * @param callable $hydrateFunc - anonymous function, that hydrate values
+     *     into object
+     */
+    public function __construct($extractFunc = null, $hydrateFunc = null)
+    {
+        if (isset($extractFunc)) {
+            if (!is_callable($extractFunc)) {
+                throw new \Exception('$extractFunc must be callable');
+            }
+
+            $this->extractFunc = $extractFunc;
+        } else {
+            $this->extractFunc = function ($value) {
+                return $value;
+            };
+        }
+
+        if (isset($hydrateFunc)) {
+            if (!is_callable($hydrateFunc)) {
+                throw new \Exception('$hydrateFunc must be callable');
+            }
+
+            $this->hydrateFunc = $hydrateFunc;
+        } else {
+            $this->hydrateFunc = function ($value) {
+                return $value;
+            };
+        }
+    }
+
+    /**
+     * Converts the given value so that it can be extracted by the hydrator.
+     *
+     * @param  mixed $value  The original value.
+     * @param  array $object The object is optionally provided as context.
+     * @return mixed Returns the value that should be extracted.
+     */
+    public function extract($value, $object = null)
+    {
+        $func = $this->extractFunc;
+
+        return $func($value, $object);
+    }
+
+    /**
+     * Converts the given value so that it can be hydrated by the hydrator.
+     *
+     * @param  mixed $value The original value.
+     * @param  array $data  The whole data is optionally provided as context.
+     * @return mixed Returns the value that should be hydrated.
+     */
+    public function hydrate($value, $data = null)
+    {
+        $func = $this->hydrateFunc;
+
+        return $func($value, $data);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/DateTimeFormatterStrategy.php	(revision 5534)
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use DateTime;
+use DateTimeZone;
+
+class DateTimeFormatterStrategy implements StrategyInterface
+{
+    /**
+     * @var string
+     */
+    private $format;
+
+    /**
+     * @var DateTimeZone|null
+     */
+    private $timezone;
+
+    /**
+     * Constructor
+     *
+     * @param string            $format
+     * @param DateTimeZone|null $timezone
+     */
+    public function __construct($format = DateTime::RFC3339, DateTimeZone $timezone = null)
+    {
+        $this->format   = (string) $format;
+        $this->timezone = $timezone;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Converts to date time string
+     *
+     * @param mixed|DateTime $value
+     *
+     * @return mixed|string
+     */
+    public function extract($value)
+    {
+        if ($value instanceof DateTime) {
+            return $value->format($this->format);
+        }
+
+        return $value;
+    }
+
+    /**
+     * Converts date time string to DateTime instance for injecting to object
+     *
+     * {@inheritDoc}
+     *
+     * @param mixed|string $value
+     *
+     * @return mixed|DateTime
+     */
+    public function hydrate($value)
+    {
+        if ($value === '' || $value === null) {
+            return;
+        }
+
+        if ($this->timezone) {
+            $hydrated = DateTime::createFromFormat($this->format, $value, $this->timezone);
+        } else {
+            $hydrated = DateTime::createFromFormat($this->format, $value);
+        }
+
+        return $hydrated ?: $value;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/DefaultStrategy.php	(revision 5534)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+class DefaultStrategy implements StrategyInterface
+{
+    /**
+     * Converts the given value so that it can be extracted by the hydrator.
+     *
+     * @param mixed $value The original value.
+     * @return mixed Returns the value that should be extracted.
+     */
+    public function extract($value)
+    {
+        return $value;
+    }
+
+    /**
+     * Converts the given value so that it can be hydrated by the hydrator.
+     *
+     * @param mixed $value The original value.
+     * @return mixed Returns the value that should be hydrated.
+     */
+    public function hydrate($value)
+    {
+        return $value;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy\Exception;
+
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy\Exception;
+
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php	(revision 5534)
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+class ExplodeStrategy implements StrategyInterface
+{
+    /**
+     * @var string
+     */
+    private $valueDelimiter;
+
+    /**
+     * @var int|null
+     */
+    private $explodeLimit;
+
+    /**
+     * Constructor
+     *
+     * @param string   $delimiter    String that the values will be split upon
+     * @param int|null $explodeLimit Explode limit
+     */
+    public function __construct($delimiter = ',', $explodeLimit = null)
+    {
+        $this->setValueDelimiter($delimiter);
+
+        $this->explodeLimit = ($explodeLimit === null) ? null : (int) $explodeLimit;
+    }
+
+    /**
+     * Sets the delimiter string that the values will be split upon
+     *
+     * @param  string $delimiter
+     * @return self
+     */
+    private function setValueDelimiter($delimiter)
+    {
+        if (!is_string($delimiter)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects Delimiter to be string, %s provided instead',
+                __METHOD__,
+                is_object($delimiter) ? get_class($delimiter) : gettype($delimiter)
+            ));
+        }
+
+        if (empty($delimiter)) {
+            throw new Exception\InvalidArgumentException('Delimiter cannot be empty.');
+        }
+
+        $this->valueDelimiter = $delimiter;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Split a string by delimiter
+     *
+     * @param string|null $value
+     *
+     * @return string[]
+     *
+     * @throws Exception\InvalidArgumentException
+     */
+    public function hydrate($value)
+    {
+        if (null === $value) {
+            return [];
+        }
+
+        if (!(is_string($value) || is_numeric($value))) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects argument 1 to be string, %s provided instead',
+                __METHOD__,
+                is_object($value) ? get_class($value) : gettype($value)
+            ));
+        }
+
+        if ($this->explodeLimit !== null) {
+            return explode($this->valueDelimiter, $value, $this->explodeLimit);
+        }
+
+        return explode($this->valueDelimiter, $value);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Join array elements with delimiter
+     *
+     * @param string[] $value The original value.
+     *
+     * @return string|null
+     */
+    public function extract($value)
+    {
+        if (!is_array($value)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects argument 1 to be array, %s provided instead',
+                __METHOD__,
+                is_object($value) ? get_class($value) : gettype($value)
+            ));
+        }
+
+        return empty($value) ? null : implode($this->valueDelimiter, $value);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/SerializableStrategy.php	(revision 5534)
@@ -0,0 +1,123 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use Zend\Hydrator\Exception\InvalidArgumentException;
+use Zend\Serializer\Adapter\AdapterInterface as SerializerAdapter;
+use Zend\Serializer\Serializer as SerializerFactory;
+
+class SerializableStrategy implements StrategyInterface
+{
+    /**
+     * @var string|SerializerAdapter
+     */
+    protected $serializer;
+
+    /**
+     * @var array
+     */
+    protected $serializerOptions = [];
+
+    /**
+     *
+     * @param mixed $serializer string or SerializerAdapter
+     * @param mixed $serializerOptions
+     */
+    public function __construct($serializer, $serializerOptions = null)
+    {
+        $this->setSerializer($serializer);
+        if ($serializerOptions) {
+            $this->setSerializerOptions($serializerOptions);
+        }
+    }
+
+    /**
+     * Serialize the given value so that it can be extracted by the hydrator.
+     *
+     * @param mixed $value The original value.
+     * @return mixed Returns the value that should be extracted.
+     */
+    public function extract($value)
+    {
+        $serializer = $this->getSerializer();
+        return $serializer->serialize($value);
+    }
+
+    /**
+     * Unserialize the given value so that it can be hydrated by the hydrator.
+     *
+     * @param mixed $value The original value.
+     * @return mixed Returns the value that should be hydrated.
+     */
+    public function hydrate($value)
+    {
+        $serializer = $this->getSerializer();
+        return $serializer->unserialize($value);
+    }
+
+    /**
+     * Set serializer
+     *
+     * @param  string|SerializerAdapter $serializer
+     * @return SerializableStrategy
+     */
+    public function setSerializer($serializer)
+    {
+        if (!is_string($serializer) && !$serializer instanceof SerializerAdapter) {
+            throw new InvalidArgumentException(sprintf(
+                '%s expects either a string serializer name or Zend\Serializer\Adapter\AdapterInterface instance; '
+                . 'received "%s"',
+                __METHOD__,
+                (is_object($serializer) ? get_class($serializer) : gettype($serializer))
+            ));
+        }
+        $this->serializer = $serializer;
+        return $this;
+    }
+
+    /**
+     * Get serializer
+     *
+     * @return SerializerAdapter
+     */
+    public function getSerializer()
+    {
+        if (is_string($this->serializer)) {
+            $options = $this->getSerializerOptions();
+            $this->setSerializer(SerializerFactory::factory($this->serializer, $options));
+        } elseif (null === $this->serializer) {
+            $this->setSerializer(SerializerFactory::getDefaultAdapter());
+        }
+
+        return $this->serializer;
+    }
+
+    /**
+     * Set configuration options for instantiating a serializer adapter
+     *
+     * @param  mixed $serializerOptions
+     * @return SerializableStrategy
+     */
+    public function setSerializerOptions($serializerOptions)
+    {
+        $this->serializerOptions = $serializerOptions;
+        return $this;
+    }
+
+    /**
+     * Get configuration options for instantiating a serializer adapter
+     *
+     * @return mixed
+     */
+    public function getSerializerOptions()
+    {
+        return $this->serializerOptions;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php	(revision 5534)
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+
+class StrategyChain implements StrategyInterface
+{
+    /**
+     * Strategy chain for extraction
+     *
+     * @var StrategyInterface[]
+     */
+    private $extractionStrategies;
+
+    /**
+     * Strategy chain for hydration
+     *
+     * @var StrategyInterface[]
+     */
+    private $hydrationStrategies;
+
+    /**
+     * Constructor
+     *
+     * @param array|Traversable $extractionStrategies
+     */
+    public function __construct($extractionStrategies)
+    {
+        $extractionStrategies = ArrayUtils::iteratorToArray($extractionStrategies);
+        $this->extractionStrategies = array_map(
+            function (StrategyInterface $strategy) {
+                // this callback is here only to ensure type-safety
+                return $strategy;
+            },
+            $extractionStrategies
+        );
+
+        $this->hydrationStrategies = array_reverse($extractionStrategies);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function extract($value)
+    {
+        foreach ($this->extractionStrategies as $strategy) {
+            $value = $strategy->extract($value);
+        }
+
+        return $value;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function hydrate($value)
+    {
+        foreach ($this->hydrationStrategies as $strategy) {
+            $value = $strategy->hydrate($value);
+        }
+
+        return $value;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php	(revision 5534)
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator\Strategy;
+
+/**
+ * @todo v3.0, add optional object/data to extract/hydrate.
+ */
+interface StrategyInterface
+{
+    /**
+     * Converts the given value so that it can be extracted by the hydrator.
+     *
+     * @param mixed   $value The original value.
+     * @param object $object (optional) The original object for context.
+     * @return mixed Returns the value that should be extracted.
+     */
+    public function extract($value);
+
+    /**
+     * Converts the given value so that it can be hydrated by the hydrator.
+     *
+     * @param mixed $value The original value.
+     * @param array  $data (optional) The original data for context.
+     * @return mixed Returns the value that should be hydrated.
+     */
+    public function hydrate($value);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-hydrator/src/StrategyEnabledInterface.php	(revision 5534)
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Hydrator;
+
+interface StrategyEnabledInterface
+{
+    /**
+     * Adds the given strategy under the given name.
+     *
+     * @param string $name The name of the strategy to register.
+     * @param Strategy\StrategyInterface $strategy The strategy to register.
+     * @return self
+     */
+    public function addStrategy($name, Strategy\StrategyInterface $strategy);
+
+    /**
+     * Gets the strategy with the given name.
+     *
+     * @param string $name The name of the strategy to get.
+     * @return Strategy\StrategyInterface
+     */
+    public function getStrategy($name);
+
+    /**
+     * Checks if the strategy with the given name exists.
+     *
+     * @param string $name The name of the strategy to check for.
+     * @return bool
+     */
+    public function hasStrategy($name);
+
+    /**
+     * Removes the strategy with the given name.
+     *
+     * @param string $name The name of the strategy to remove.
+     * @return self
+     */
+    public function removeStrategy($name);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,62 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 2.6.1 - 2016-02-04
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#18](https://github.com/zendframework/zend-json/pull/18) updates dependencies
+  to allow usage on PHP 7, as well as with zend-stdlib v3.
+
+## 2.6.0 - 2015-11-18
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- [#5](https://github.com/zendframework/zend-json/pull/5) removes
+  zendframework/zend-stdlib as a required dependency, marking it instead
+  optional, as it is only used for the `Server` subcomponent.
+
+### Fixed
+
+- Nothing.
+
+## 2.5.2 - 2015-08-05
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#3](https://github.com/zendframework/zend-json/pull/3) fixes an array key
+  name from `intent` to `indent` to  ensure indentation works correctly during
+  pretty printing.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-json/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-json.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
+standards checks, and provides configuration for our selected checks.
+`php-cs-fixer` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
+```
+
+To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
+flag:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
+```
+
+If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-json)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-json.git
+   $ cd zend-json
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-json.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-json.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/README.md	(revision 5534)
@@ -0,0 +1,12 @@
+# zend-json
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-json.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-json)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-json/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-json?branch=master)
+
+`Zend\Json` provides convenience methods for serializing native PHP to JSON and
+decoding JSON to native PHP. For more information on JSON, visit the JSON
+[project site](http://www.json.org/).
+
+
+- File issues at https://github.com/zendframework/zend-json/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-json
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/composer.json	(revision 5534)
@@ -0,0 +1,43 @@
+{
+    "name": "zendframework/zend-json",
+    "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "json"
+    ],
+    "homepage": "https://github.com/zendframework/zend-json",
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.6-dev",
+            "dev-develop": "2.7-dev"
+        }
+    },
+    "require": {
+        "php": "^5.5 || ^7.0"
+    },
+    "require-dev": {
+        "zendframework/zend-http": "^2.5.4",
+        "zendframework/zend-server": "^2.6.1",
+        "zendframework/zend-stdlib": "^2.5 || ^3.0",
+        "zendframework/zendxml": "^1.0.2",
+        "fabpot/php-cs-fixer": "1.7.*",
+        "phpunit/PHPUnit": "~4.0"
+    },
+    "suggest": {
+        "zendframework/zend-http": "Zend\\Http component, required to use Zend\\Json\\Server",
+        "zendframework/zend-server": "Zend\\Server component, required to use Zend\\Json\\Server",
+        "zendframework/zend-stdlib": "Zend\\Stdlib component, for use with caching Zend\\Json\\Server responses",
+        "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage"
+    },
+    "autoload": {
+        "psr-4": {
+            "Zend\\Json\\": "src/"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\Json\\": "test/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.basics.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.basics.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.basics.md	(revision 5534)
@@ -0,0 +1,29 @@
+# Basic Usage
+
+Usage of `Zend\Json` involves using the two public static methods available:
+`Zend\Json\Json::encode()` and `Zend\Json\Json::decode()`.
+
+```php
+// Retrieve a value:
+$phpNative = Zend\Json\Json::decode($encodedValue);
+
+// Encode it to return to the client:
+$json = Zend\Json\Json::encode($phpNative);
+```
+
+## Pretty-printing JSON
+
+Sometimes, it may be hard to explore *JSON* data generated by `Zend\Json\Json::encode()`, since it
+has no spacing or indentation. In order to make it easier, `Zend\Json\Json` allows you to
+pretty-print *JSON* data in the human-readable format with `Zend\Json\Json::prettyPrint()`.
+
+```php
+// Encode it to return to the client:
+$json = Zend\Json\Json::encode($phpNative);
+if ($debug) {
+    echo Zend\Json\Json::prettyPrint($json, array("indent" => " "));
+}
+```
+
+Second optional argument of `Zend\Json\Json::prettyPrint()` is an option array. Option `indent`
+allows to set indentation string - by default it's a single tab character.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.introduction.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.introduction.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.introduction.md	(revision 5534)
@@ -0,0 +1,16 @@
+# Introduction
+
+`Zend\Json` provides convenience methods for serializing native *PHP* to *JSON* and decoding *JSON*
+to native *PHP*. For more information on *JSON*, [visit the JSON project
+site](http://www.json.org/).
+
+*JSON*, JavaScript Object Notation, can be used for data interchange between JavaScript and other
+languages. Since *JSON* can be directly evaluated by JavaScript, it is a more efficient and
+lightweight format than *XML* for exchanging data with JavaScript clients.
+
+In addition, `Zend\Json` provides a useful way to convert any arbitrary *XML* formatted string into
+a *JSON* formatted string. This built-in feature will enable *PHP* developers to transform the
+enterprise data encoded in *XML* format into *JSON* format before sending it to browser-based Ajax
+client applications. It provides an easy way to do dynamic data conversion on the server-side code
+thereby avoiding unnecessary *XML* parsing in the browser-side applications. It offers a nice
+utility function that results in easier application-specific data processing techniques.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.objects.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.objects.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.objects.md	(revision 5534)
@@ -0,0 +1,101 @@
+# Advanced Usage
+
+## JSON Objects
+
+When encoding *PHP* objects as *JSON*, all public properties of that object will be encoded in a
+*JSON* object.
+
+*JSON* does not allow object references, so care should be taken not to encode objects with
+recursive references. If you have issues with recursion, `Zend\Json\Json::encode()` and
+`Zend\Json\Encoder::encode()` allow an optional second parameter to check for recursion; if an
+object is serialized twice, an exception will be thrown.
+
+Decoding *JSON* objects poses an additional difficulty, however, since JavaScript objects correspond
+most closely to *PHP*'s associative array. Some suggest that a class identifier should be passed,
+and an object instance of that class should be created and populated with the key/value pairs of the
+*JSON* object; others feel this could pose a substantial security risk.
+
+By default, `Zend\Json\Json` will decode *JSON* objects as `stdClass` objects. However, if you
+desire an associative array returned, you can specify this:
+
+```php
+// Decode JSON objects as PHP array
+$phpNative = Zend\Json\Json::decode($encodedValue, Zend\Json\Json::TYPE_ARRAY);
+```
+
+Any objects thus decoded are returned as associative arrays with keys and values corresponding to
+the key/value pairs in the *JSON* notation.
+
+The recommendation of Zend Framework is that the individual developer should decide how to decode
+*JSON* objects. If an object of a specified type should be created, it can be created in the
+developer code and populated with the values decoded using `Zend\Json`.
+
+## Encoding PHP objects
+
+If you are encoding *PHP* objects by default the encoding mechanism can only access public
+properties of these objects. When a method `toJson()` is implemented on an object to encode,
+`Zend\Json\Json` calls this method and expects the object to return a *JSON* representation of its
+internal state.
+
+`Zend\Json\Json` can encode PHP objects recursively but does not do so by default. This can be
+enabled by passing `true` as a second argument to `Zend\Json\Json::encode()`.
+
+```php
+// Encode PHP object recursively
+$jsonObject = Zend\Json\Json::encode($data, true);
+```
+
+When doing recursive encoding of objects, as JSON does not support cycles, an
+`Zend\Json\Exception\RecursionException` will be thrown. If you wish, you can silence these
+exceptions by passing the `silenceCyclicalExceptions` option:
+
+```php
+$jsonObject = Zend\Json\Json::encode(
+    $data,
+    true,
+    array('silenceCyclicalExceptions' => true)
+);
+```
+
+## Internal Encoder/Decoder
+
+`Zend\Json` has two different modes depending if ext/json is enabled in your *PHP* installation or
+not. If ext/json is installed by default `json_encode()` and `json_decode()` functions are used for
+encoding and decoding *JSON*. If ext/json is not installed a Zend Framework implementation in *PHP*
+code is used for en-/decoding. This is considerably slower than using the *PHP* extension, but
+behaves exactly the same.
+
+Still sometimes you might want to use the internal encoder/decoder even if you have ext/json
+installed. You can achieve this by calling:
+
+```php
+Zend\Json\Json::$useBuiltinEncoderDecoder = true;
+```
+
+## JSON Expressions
+
+JavaScript makes heavy use of anonymous function callbacks, which can be saved within *JSON* object
+variables. Still they only work if not returned inside double quotes, which `Zend\Json` naturally
+does. With the Expression support for `Zend\Json` support you can encode *JSON* objects with valid
+JavaScript callbacks. This works for both `json_encode()` or the internal encoder.
+
+A JavaScript callback is represented using the `Zend\Json\Expr` object. It implements the value
+object pattern and is immutable. You can set the JavaScript expression as the first constructor
+argument. By default `Zend\Json\Json::encode` does not encode JavaScript callbacks, you have to pass
+the option `enableJsonExprFinder` and set it to `TRUE` into the `encode` function. If enabled the
+expression support works for all nested expressions in large object structures. A usage example
+would look like:
+
+```php
+$data = array(
+    'onClick' => new Zend\Json\Expr('function() {'
+              . 'alert("I am a valid JavaScript callback '
+              . 'created by Zend\Json"); }'),
+    'other' => 'no expression',
+);
+$jsonObjectWithExpression = Zend\Json\Json::encode(
+    $data,
+    false,
+    array('enableJsonExprFinder' => true)
+);
+```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.server.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.server.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.server.md	(revision 5534)
@@ -0,0 +1,368 @@
+# Zend\\Json\\Server - JSON-RPC server
+
+## Introduction
+
+`Zend\Json\Server` is a [JSON-RPC](http://groups.google.com/group/json-rpc/) server implementation.
+It supports both the [JSON-RPC version 1 specification](http://json-rpc.org/wiki/specification) as
+well as the [version 2 specification](http://www.jsonrpc.org/specification); additionally, it
+provides a *PHP* implementation of the [Service Mapping Description (SMD)
+specification](http://www.jsonrpc.org/specification) for providing service metadata to service
+consumers.
+
+JSON-RPC is a lightweight Remote Procedure Call protocol that utilizes *JSON* for its messaging
+envelopes. This JSON-RPC implementation follows *PHP*'s
+[SoapServer](http://www.php.net/manual/en/class.soapserver.php) *API*. This means, in a typical
+situation, you will simply:
+
+- Instantiate the server object
+- Attach one or more functions and/or classes/objects to the server object
+- handle() the request
+
+`Zend\Json\Server` utilizes \[Zend\\Server\\Reflection\](zend.server.reflection) to perform
+reflection on any attached classes or functions, and uses that information to build both the SMD and
+enforce method call signatures. As such, it is imperative that any attached functions and/or class
+methods have full *PHP* docblocks documenting, minimally:
+
+- All parameters and their expected variable types
+- The return value variable type
+
+`Zend\Json\Server` listens for POST requests only at this time; fortunately, most JSON-RPC client
+implementations in the wild at the time of this writing will only POST requests as it is. This makes
+it simple to utilize the same server end point to both handle requests as well as to deliver the
+service SMD, as is shown in the next example.
+
+## Basic Usage
+
+First, let's define a class we wish to expose via the JSON-RPC server. We'll call the class
+'Calculator', and define methods for 'add', 'subtract', 'multiply', and 'divide':
+
+```php
+/**
+ * Calculator - sample class to expose via JSON-RPC
+ */
+class Calculator
+{
+    /**
+     * Return sum of two variables
+     *
+     * @param  int $x
+     * @param  int $y
+     * @return int
+     */
+    public function add($x, $y)
+    {
+        return $x + $y;
+    }
+
+    /**
+     * Return difference of two variables
+     *
+     * @param  int $x
+     * @param  int $y
+     * @return int
+     */
+    public function subtract($x, $y)
+    {
+        return $x - $y;
+    }
+
+    /**
+     * Return product of two variables
+     *
+     * @param  int $x
+     * @param  int $y
+     * @return int
+     */
+    public function multiply($x, $y)
+    {
+        return $x * $y;
+    }
+
+    /**
+     * Return the division of two variables
+     *
+     * @param  int $x
+     * @param  int $y
+     * @return float
+     */
+    public function divide($x, $y)
+    {
+        return $x / $y;
+    }
+}
+```
+
+Note that each method has a docblock with entries indicating each parameter and its type, as well as
+an entry for the return value. This is **absolutely critical** when utilizing `Zend\Json\Server` or
+any other server component in Zend Framework, for that matter.
+
+Now we'll create a script to handle the requests:
+
+```php
+$server = new Zend\Json\Server\Server();
+
+// Indicate what functionality is available:
+$server->setClass('Calculator');
+
+// Handle the request:
+$server->handle();
+```
+
+However, this will not address the issue of returning an SMD so that the JSON-RPC client can
+autodiscover methods. That can be accomplished by determining the *HTTP* request method, and then
+specifying some server metadata:
+
+```php
+$server = new Zend\Json\Server\Server();
+$server->setClass('Calculator');
+
+if ('GET' == $_SERVER['REQUEST_METHOD']) {
+    // Indicate the URL endpoint, and the JSON-RPC version used:
+    $server->setTarget('/json-rpc.php')
+           ->setEnvelope(Zend\Json\Server\Smd::ENV_JSONRPC_2);
+
+    // Grab the SMD
+    $smd = $server->getServiceMap();
+
+    // Return the SMD to the client
+    header('Content-Type: application/json');
+    echo $smd;
+    return;
+}
+
+$server->handle();
+```
+
+If utilizing the JSON-RPC server with Dojo toolkit, you will also need to set a special
+compatibility flag to ensure that the two interoperate properly:
+
+```php
+$server = new Zend\Json\Server\Server();
+$server->setClass('Calculator');
+
+if ('GET' == $_SERVER['REQUEST_METHOD']) {
+    $server->setTarget('/json-rpc.php')
+           ->setEnvelope(Zend\Json\Server\Smd::ENV_JSONRPC_2);
+    $smd = $server->getServiceMap();
+
+    // Set Dojo compatibility:
+    $smd->setDojoCompatible(true);
+
+    header('Content-Type: application/json');
+    echo $smd;
+    return;
+}
+
+$server->handle();
+```
+
+## Advanced Details
+
+While most functionality for `Zend\Json\Server` is spelled out in \[this
+section\](zend.json.server.usage), more advanced functionality is available.
+
+### Zend\\Json\\Server\\Server
+
+`Zend\Json\Server\Server` is the core class in the JSON-RPC offering; it handles all requests and
+returns the response payload. It has the following methods:
+
+- `addFunction($function)`: Specify a userland function to attach to the server.
+- `setClass($class)`: Specify a class or object to attach to the server; all public methods of that
+item will be exposed as JSON-RPC methods.
+- `fault($fault = null, $code = 404, $data = null)`: Create and return a `Zend\Json\Server\Error`
+object.
+- `handle($request = false)`: Handle a JSON-RPC request; optionally, pass a
+`Zend\Json\Server\Request` object to utilize (creates one by default).
+- `getFunctions()`: Return a list of all attached methods.
+- `setRequest(Zend\Json\Server\Request $request)`: Specify a request object for the server to
+utilize.
+- `getRequest()`: Retrieve the request object used by the server.
+- `setResponse(Zend\Json\Server\Response $response)`: Set the response object for the server to
+utilize.
+- `getResponse()`: Retrieve the response object used by the server.
+- `setAutoEmitResponse($flag)`: Indicate whether the server should automatically emit the response
+and all headers; by default, this is `TRUE`.
+- `autoEmitResponse()`: Determine if auto-emission of the response is enabled.
+- `getServiceMap()`: Retrieve the service map description in the form of a `Zend\Json\Server\Smd`
+object
+
+### Zend\\Json\\Server\\Request
+
+The JSON-RPC request environment is encapsulated in the `Zend\Json\Server\Request` object. This
+object allows you to set necessary portions of the JSON-RPC request, including the request ID,
+parameters, and JSON-RPC specification version. It has the ability to load itself via *JSON* or a
+set of options, and can render itself as *JSON* via the `toJson()` method.
+
+The request object has the following methods available:
+
+- `setOptions(array $options)`: Specify object configuration. `$options` may contain keys matching
+any 'set' method: `setParams()`, `setMethod()`, `setId()`, and `setVersion()`.
+- `addParam($value, $key = null)`: Add a parameter to use with the method call. Parameters can be
+just the values, or can optionally include the parameter name.
+- `addParams(array $params)`: Add multiple parameters at once; proxies to `addParam()`
+- `setParams(array $params)`: Set all parameters at once; overwrites any existing parameters.
+- `getParam($index)`: Retrieve a parameter by position or name.
+- `getParams()`: Retrieve all parameters at once.
+- `setMethod($name)`: Set the method to call.
+- `getMethod()`: Retrieve the method that will be called.
+- `isMethodError()`: Determine whether or not the request is malformed and would result in an error.
+- `setId($name)`: Set the request identifier (used by the client to match requests to responses).
+- `getId()`: Retrieve the request identifier.
+- `setVersion($version)`: Set the JSON-RPC specification version the request conforms to. May be
+either '1.0' or '2.0'.
+- `getVersion()`: Retrieve the JSON-RPC specification version used by the request.
+- `loadJson($json)`: Load the request object from a *JSON* string.
+- `toJson()`: Render the request as a *JSON* string.
+
+An *HTTP* specific version is available via `Zend\Json\Server\Request\Http`. This class will
+retrieve the request via `php://input`, and allows access to the raw *JSON* via the `getRawJson()`
+method.
+
+### Zend\\Json\\Server\\Response
+
+The JSON-RPC response payload is encapsulated in the `Zend\Json\Server\Response` object. This object
+allows you to set the return value of the request, whether or not the response is an error, the
+request identifier, the JSON-RPC specification version the response conforms to, and optionally the
+service map.
+
+The response object has the following methods available:
+
+- `setResult($value)`: Set the response result.
+- `getResult()`: Retrieve the response result.
+- `setError(Zend\Json\Server\Error $error)`: Set an error object. If set, this will be used as the
+response when serializing to *JSON*.
+- `getError()`: Retrieve the error object, if any.
+- `isError()`: Whether or not the response is an error response.
+- `setId($name)`: Set the request identifier (so the client may match the response with the original
+request).
+- `getId()`: Retrieve the request identifier.
+- `setVersion($version)`: Set the JSON-RPC version the response conforms to.
+- `getVersion()`: Retrieve the JSON-RPC version the response conforms to.
+- `toJson()`: Serialize the response to *JSON*. If the response is an error response, serializes the
+error object.
+- `setServiceMap($serviceMap)`: Set the service map object for the response.
+- `getServiceMap()`: Retrieve the service map object, if any.
+
+An *HTTP* specific version is available via `Zend\Json\Server\Response\Http`. This class will send
+the appropriate *HTTP* headers as well as serialize the response as *JSON*.
+
+### Zend\\Json\\Server\\Error
+
+JSON-RPC has a special format for reporting error conditions. All errors need to provide, minimally,
+an error message and error code; optionally, they can provide additional data, such as a backtrace.
+
+Error codes are derived from those recommended by [the XML-RPC EPI
+project](http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php). `Zend\Json\Server`
+appropriately assigns the code based on the error condition. For application exceptions, the code
+'-32000' is used.
+
+`Zend\Json\Server\Error` exposes the following methods:
+
+- `setCode($code)`: Set the error code; if the code is not in the accepted XML-RPC error code range,
+-32000 will be assigned.
+- `getCode()`: Retrieve the current error code.
+- `setMessage($message)`: Set the error message.
+- `getMessage()`: Retrieve the current error message.
+- `setData($data)`: Set auxiliary data further qualifying the error, such as a backtrace.
+- `getData()`: Retrieve any current auxiliary error data.
+- `toArray()`: Cast the error to an array. The array will contain the keys 'code', 'message', and
+'data'.
+- `toJson()`: Cast the error to a JSON-RPC error representation.
+
+### Zend\\Json\\Server\\Smd
+
+SMD stands for Service Mapping Description, a *JSON* schema that defines how a client can interact
+with a particular web service. At the time of this writing, the
+[specification](http://www.jsonrpc.org/specification) has not yet been formally ratified, but it is
+in use already within Dojo toolkit as well as other JSON-RPC consumer clients.
+
+At its most basic, a Service Mapping Description indicates the method of transport (POST, `GET`,
+*TCP*/IP, etc), the request envelope type (usually based on the protocol of the server), the target
+*URL* of the service provider, and a map of services available. In the case of JSON-RPC, the service
+map is a list of available methods, which each method documenting the available parameters and their
+types, as well as the expected return value type.
+
+`Zend\Json\Server\Smd` provides an object-oriented way to build service maps. At its most basic, you
+pass it metadata describing the service using mutators, and specify services (methods and
+functions).
+
+The service descriptions themselves are typically instances of `Zend\Json\Server\Smd\Service`; you
+can also pass all information as an array to the various service mutators in `Zend\Json\Server\Smd`,
+and it will instantiate a service for you. The service objects contain information such as the name
+of the service (typically the function or method name), the parameters (names, types, and position),
+and the return value type. Optionally, each service can have its own target and envelope, though
+this functionality is rarely used.
+
+`Zend\Json\Server\Server` actually does all of this behind the scenes for you, by using reflection
+on the attached classes and functions; you should create your own service maps only if you need to
+provide custom functionality that class and function introspection cannot offer.
+
+Methods available in `Zend\Json\Server\Smd` include:
+
+- `setOptions(array $options)`: Setup an SMD object from an array of options. All mutators (methods
+beginning with 'set') can be used as keys.
+- `setTransport($transport)`: Set the transport used to access the service; only POST is currently
+supported.
+- `getTransport()`: Get the current service transport.
+- `setEnvelope($envelopeType)`: Set the request envelope that should be used to access the service.
+Currently, supports the constants `Zend\Json\Server\Smd::ENV_JSONRPC_1` and
+`Zend\Json\Server\Smd::ENV_JSONRPC_2`.
+- `getEnvelope()`: Get the current request envelope.
+- `setContentType($type)`: Set the content type requests should use (by default, this is
+'application/json').
+- `getContentType()`: Get the current content type for requests to the service.
+- `setTarget($target)`: Set the *URL* endpoint for the service.
+- `getTarget()`: Get the *URL* endpoint for the service.
+- `setId($id)`: Typically, this is the *URL* endpoint of the service (same as the target).
+- `getId()`: Retrieve the service ID (typically the *URL* endpoint of the service).
+- `setDescription($description)`: Set a service description (typically narrative information
+describing the purpose of the service).
+- `getDescription()`: Get the service description.
+- `setDojoCompatible($flag)`: Set a flag indicating whether or not the SMD is compatible with Dojo
+toolkit. When `TRUE`, the generated *JSON* SMD will be formatted to comply with the format that
+Dojo's JSON-RPC client expects.
+- `isDojoCompatible()`: Returns the value of the Dojo compatibility flag (`FALSE`, by default).
+- `addService($service)`: Add a service to the map. May be an array of information to pass to the
+constructor of `Zend\Json\Server\Smd\Service`, or an instance of that class.
+- `addServices(array $services)`: Add multiple services at once.
+- `setServices(array $services)`: Add multiple services at once, overwriting any previously set
+services.
+- `getService($name)`: Get a service by its name.
+- `getServices()`: Get all attached services.
+- `removeService($name)`: Remove a service from the map.
+- `toArray()`: Cast the service map to an array.
+- `toDojoArray()`: Cast the service map to an array compatible with Dojo Toolkit.
+- `toJson()`: Cast the service map to a *JSON* representation.
+
+`Zend\Json\Server\Smd\Service` has the following methods:
+
+- `setOptions(array $options)`: Set object state from an array. Any mutator (methods beginning with
+'set') may be used as a key and set via this method.
+- `setName($name)`: Set the service name (typically, the function or method name).
+- `getName()`: Retrieve the service name.
+- `setTransport($transport)`: Set the service transport (currently, only transports supported by
+`Zend\Json\Server\Smd` are allowed).
+- `getTransport()`: Retrieve the current transport.
+- `setTarget($target)`: Set the *URL* endpoint of the service (typically, this will be the same as
+the overall SMD to which the service is attached).
+- `getTarget()`: Get the *URL* endpoint of the service.
+- `setEnvelope($envelopeType)`: Set the service envelope (currently, only envelopes supported by
+`Zend\Json\Server\Smd` are allowed).
+- `getEnvelope()`: Retrieve the service envelope type.
+- `addParam($type, array $options = array(), $order = null)`: Add a parameter to the service. By
+default, only the parameter type is necessary. However, you may also specify the order, as well as
+options such as:
+- **name**: the parameter name
+- **optional**: whether or not the parameter is optional
+- **default**: a default value for the parameter
+- **description**: text describing the parameter
+- `addParams(array $params)`: Add several parameters at once; each param should be an assoc array
+containing minimally the key 'type' describing the parameter type, and optionally the key 'order';
+any other keys will be passed as `$options` to `addOption()`.
+- `setParams(array $params)`: Set many parameters at once, overwriting any existing parameters.
+- `getParams()`: Retrieve all currently set parameters.
+- `setReturn($type)`: Set the return value type of the service.
+- `getReturn()`: Get the return value type of the service.
+- `toArray()`: Cast the service to an array.
+- `toJson()`: Cast the service to a *JSON* representation.
+
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.xml2json.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.xml2json.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/book/zend.json.xml2json.md	(revision 5534)
@@ -0,0 +1,98 @@
+# XML to JSON conversion
+
+`Zend\Json` provides a convenience method for transforming *XML* formatted data into *JSON* format.
+This feature was inspired from an [IBM developerWorks
+article](http://www.ibm.com/developerworks/xml/library/x-xml2jsonphp/).
+
+`Zend\Json` includes a static function called `Zend\Json\Json::fromXml()`. This function will
+generate *JSON* from a given *XML* input. This function takes any arbitrary *XML* string as an input
+parameter. It also takes an optional boolean input parameter to instruct the conversion logic to
+ignore or not ignore the *XML* attributes during the conversion process. If this optional input
+parameter is not given, then the default behavior is to ignore the *XML* attributes. This function
+call is made as shown below:
+
+```php
+// fromXml function simply takes a String containing XML contents
+// as input.
+$jsonContents = Zend\Json\Json::fromXml($xmlStringContents, true);
+```
+
+`Zend\Json\Json::fromXml()` function does the conversion of the *XML* formatted string input
+parameter and returns the equivalent *JSON* formatted string output. In case of any *XML* input
+format error or conversion logic error, this function will throw an exception. The conversion logic
+also uses recursive techniques to traverse the *XML* tree. It supports recursion upto 25 levels
+deep. Beyond that depth, it will throw a `Zend\Json\Exception`. There are several *XML* files with
+varying degree of complexity provided in the tests directory of Zend Framework. They can be used to
+test the functionality of the xml2json feature.
+
+## Example
+
+The following is a simple example that shows both the *XML* input string passed to and the *JSON*
+output string returned as a result from the `Zend\Json\Json::fromXml()` function. This example used
+the optional function parameter as not to ignore the *XML* attributes during the conversion. Hence,
+you can notice that the resulting *JSON* string includes a representation of the *XML* attributes
+present in the *XML* input string.
+
+*XML* input string passed to `Zend\Json\Json::fromXml()` function:
+
+```php
+<?xml version="1.0" encoding="UTF-8"?>
+<books>
+    <book id="1">
+        <title>Code Generation in Action</title>
+        <author><first>Jack</first><last>Herrington</last></author>
+        <publisher>Manning</publisher>
+    </book>
+
+    <book id="2">
+        <title>PHP Hacks</title>
+        <author><first>Jack</first><last>Herrington</last></author>
+        <publisher>O'Reilly</publisher>
+    </book>
+
+    <book id="3">
+        <title>Podcasting Hacks</title>
+        <author><first>Jack</first><last>Herrington</last></author>
+        <publisher>O'Reilly</publisher>
+    </book>
+</books>
+```
+
+*JSON* output string returned from `Zend\Json\Json::fromXml()` function:
+
+```php
+{
+   "books" : {
+      "book" : [ {
+         "@attributes" : {
+            "id" : "1"
+         },
+         "title" : "Code Generation in Action",
+         "author" : {
+            "first" : "Jack", "last" : "Herrington"
+         },
+         "publisher" : "Manning"
+      }, {
+         "@attributes" : {
+            "id" : "2"
+         },
+         "title" : "PHP Hacks", "author" : {
+            "first" : "Jack", "last" : "Herrington"
+         },
+         "publisher" : "O'Reilly"
+      }, {
+         "@attributes" : {
+            "id" : "3"
+         },
+         "title" : "Podcasting Hacks", "author" : {
+            "first" : "Jack", "last" : "Herrington"
+         },
+         "publisher" : "O'Reilly"
+      }
+   ]}
+}
+```
+
+More details about this xml2json feature can be found in the original proposal itself. Take a look
+at the [Zend\_xml2json
+proposal](http://framework.zend.com/wiki/display/ZFPROP/Zend_xml2json+-+Senthil+Nathan).
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/bookdown.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/bookdown.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/doc/bookdown.json	(revision 5534)
@@ -0,0 +1,11 @@
+{
+    "title": "Zend\\Json",
+    "target": "html/",
+    "content": [
+        "book/zend.json.introduction.md",
+        "book/zend.json.basics.md",
+        "book/zend.json.objects.md",
+        "book/zend.json.xml2json.md",
+        "book/zend.json.server.md"
+    ]
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Decoder.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Decoder.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Decoder.php	(revision 5534)
@@ -0,0 +1,542 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json;
+
+use stdClass;
+use Zend\Json\Exception\InvalidArgumentException;
+use Zend\Json\Exception\RuntimeException;
+
+/**
+ * Decode JSON encoded string to PHP variable constructs
+ */
+class Decoder
+{
+    /**
+     * Parse tokens used to decode the JSON object. These are not
+     * for public consumption, they are just used internally to the
+     * class.
+     */
+    const EOF       = 0;
+    const DATUM     = 1;
+    const LBRACE    = 2;
+    const LBRACKET  = 3;
+    const RBRACE    = 4;
+    const RBRACKET  = 5;
+    const COMMA     = 6;
+    const COLON     = 7;
+
+    /**
+     * Use to maintain a "pointer" to the source being decoded
+     *
+     * @var string
+     */
+    protected $source;
+
+    /**
+     * Caches the source length
+     *
+     * @var int
+     */
+    protected $sourceLength;
+
+    /**
+     * The offset within the source being decoded
+     *
+     * @var int
+     *
+     */
+    protected $offset;
+
+    /**
+     * The current token being considered in the parser cycle
+     *
+     * @var int
+     */
+    protected $token;
+
+    /**
+     * Flag indicating how objects should be decoded
+     *
+     * @var int
+     * @access protected
+     */
+    protected $decodeType;
+
+    /**
+     * @var $_tokenValue
+     */
+    protected $tokenValue;
+
+    /**
+     * Decode Unicode Characters from \u0000 ASCII syntax.
+     *
+     * This algorithm was originally developed for the
+     * Solar Framework by Paul M. Jones
+     *
+     * @link   http://solarphp.com/
+     * @link   https://github.com/solarphp/core/blob/master/Solar/Json.php
+     * @param  string $chrs
+     * @return string
+     */
+    public static function decodeUnicodeString($chrs)
+    {
+        $chrs       = (string) $chrs;
+        $utf8       = '';
+        $strlenChrs = strlen($chrs);
+
+        for ($i = 0; $i < $strlenChrs; $i++) {
+            $ordChrsC = ord($chrs[$i]);
+
+            switch (true) {
+                case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $i, 6)):
+                    // single, escaped unicode character
+                    $utf16 = chr(hexdec(substr($chrs, ($i + 2), 2)))
+                           . chr(hexdec(substr($chrs, ($i + 4), 2)));
+                    $utf8char = self::_utf162utf8($utf16);
+                    $search  = ['\\', "\n", "\t", "\r", chr(0x08), chr(0x0C), '"', '\'', '/'];
+                    if (in_array($utf8char, $search)) {
+                        $replace = ['\\\\', '\\n', '\\t', '\\r', '\\b', '\\f', '\\"', '\\\'', '\\/'];
+                        $utf8char  = str_replace($search, $replace, $utf8char);
+                    }
+                    $utf8 .= $utf8char;
+                    $i += 5;
+                    break;
+                case ($ordChrsC >= 0x20) && ($ordChrsC <= 0x7F):
+                    $utf8 .= $chrs{$i};
+                    break;
+                case ($ordChrsC & 0xE0) == 0xC0:
+                    // characters U-00000080 - U-000007FF, mask 110XXXXX
+                    //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $utf8 .= substr($chrs, $i, 2);
+                    ++$i;
+                    break;
+                case ($ordChrsC & 0xF0) == 0xE0:
+                    // characters U-00000800 - U-0000FFFF, mask 1110XXXX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $utf8 .= substr($chrs, $i, 3);
+                    $i += 2;
+                    break;
+                case ($ordChrsC & 0xF8) == 0xF0:
+                    // characters U-00010000 - U-001FFFFF, mask 11110XXX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $utf8 .= substr($chrs, $i, 4);
+                    $i += 3;
+                    break;
+                case ($ordChrsC & 0xFC) == 0xF8:
+                    // characters U-00200000 - U-03FFFFFF, mask 111110XX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $utf8 .= substr($chrs, $i, 5);
+                    $i += 4;
+                    break;
+                case ($ordChrsC & 0xFE) == 0xFC:
+                    // characters U-04000000 - U-7FFFFFFF, mask 1111110X
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $utf8 .= substr($chrs, $i, 6);
+                    $i += 5;
+                    break;
+            }
+        }
+
+        return $utf8;
+    }
+
+    /**
+     * Constructor
+     *
+     * @param string $source     String source to decode
+     * @param int    $decodeType How objects should be decoded -- see
+     * {@link Zend\Json\Json::TYPE_ARRAY} and {@link Zend\Json\Json::TYPE_OBJECT} for
+     * valid values
+     * @throws InvalidArgumentException
+     */
+    protected function __construct($source, $decodeType)
+    {
+        // Set defaults
+        $this->source       = self::decodeUnicodeString($source);
+        $this->sourceLength = strlen($this->source);
+        $this->token        = self::EOF;
+        $this->offset       = 0;
+
+        switch ($decodeType) {
+            case Json::TYPE_ARRAY:
+            case Json::TYPE_OBJECT:
+                $this->decodeType = $decodeType;
+                break;
+            default:
+                throw new InvalidArgumentException("Unknown decode type '{$decodeType}', please use one of the constants Json::TYPE_*");
+        }
+
+        // Set pointer at first token
+        $this->_getNextToken();
+    }
+
+    /**
+     * Decode a JSON source string
+     *
+     * Decodes a JSON encoded string. The value returned will be one of the
+     * following:
+     *        - integer
+     *        - float
+     *        - boolean
+     *        - null
+     *      - stdClass
+     *      - array
+     *         - array of one or more of the above types
+     *
+     * By default, decoded objects will be returned as associative arrays; to
+     * return a stdClass object instead, pass {@link Zend\Json\Json::TYPE_OBJECT} to
+     * the $objectDecodeType parameter.
+     *
+     * @static
+     * @access public
+     * @param string $source String to be decoded
+     * @param int $objectDecodeType How objects should be decoded; should be
+     * either or {@link Zend\Json\Json::TYPE_ARRAY} or
+     * {@link Zend\Json\Json::TYPE_OBJECT}; defaults to TYPE_ARRAY
+     * @return mixed
+     */
+    public static function decode($source, $objectDecodeType = Json::TYPE_OBJECT)
+    {
+        $decoder = new static($source, $objectDecodeType);
+        return $decoder->_decodeValue();
+    }
+
+    /**
+     * Recursive driving routine for supported toplevel tops
+     *
+     * @return mixed
+     */
+    protected function _decodeValue()
+    {
+        switch ($this->token) {
+            case self::DATUM:
+                $result  = $this->tokenValue;
+                $this->_getNextToken();
+                return($result);
+            case self::LBRACE:
+                return($this->_decodeObject());
+            case self::LBRACKET:
+                return($this->_decodeArray());
+            default:
+                return;
+        }
+    }
+
+    /**
+     * Decodes an object of the form:
+     *  { "attribute: value, "attribute2" : value,...}
+     *
+     * If Zend\Json\Encoder was used to encode the original object then
+     * a special attribute called __className which specifies a class
+     * name that should wrap the data contained within the encoded source.
+     *
+     * Decodes to either an array or stdClass object, based on the value of
+     * {@link $decodeType}. If invalid $decodeType present, returns as an
+     * array.
+     *
+     * @return array|stdClass
+     * @throws RuntimeException
+     */
+    protected function _decodeObject()
+    {
+        $members = [];
+        $tok = $this->_getNextToken();
+
+        while ($tok && $tok != self::RBRACE) {
+            if ($tok != self::DATUM || ! is_string($this->tokenValue)) {
+                throw new RuntimeException('Missing key in object encoding: ' . $this->source);
+            }
+
+            $key = $this->tokenValue;
+            $tok = $this->_getNextToken();
+
+            if ($tok != self::COLON) {
+                throw new RuntimeException('Missing ":" in object encoding: ' . $this->source);
+            }
+
+            $this->_getNextToken();
+            $members[$key] = $this->_decodeValue();
+            $tok = $this->token;
+
+            if ($tok == self::RBRACE) {
+                break;
+            }
+
+            if ($tok != self::COMMA) {
+                throw new RuntimeException('Missing "," in object encoding: ' . $this->source);
+            }
+
+            $tok = $this->_getNextToken();
+        }
+
+        switch ($this->decodeType) {
+            case Json::TYPE_OBJECT:
+                // Create new stdClass and populate with $members
+                $result = new stdClass();
+                foreach ($members as $key => $value) {
+                    if ($key === '') {
+                        $key = '_empty_';
+                    }
+                    $result->$key = $value;
+                }
+                break;
+            case Json::TYPE_ARRAY:
+            default:
+                $result = $members;
+                break;
+        }
+
+        $this->_getNextToken();
+        return $result;
+    }
+
+    /**
+     * Decodes a JSON array format:
+     *    [element, element2,...,elementN]
+     *
+     * @return array
+     * @throws RuntimeException
+     */
+    protected function _decodeArray()
+    {
+        $result = [];
+        $tok = $this->_getNextToken(); // Move past the '['
+        $index  = 0;
+
+        while ($tok && $tok != self::RBRACKET) {
+            $result[$index++] = $this->_decodeValue();
+
+            $tok = $this->token;
+
+            if ($tok == self::RBRACKET || !$tok) {
+                break;
+            }
+
+            if ($tok != self::COMMA) {
+                throw new RuntimeException('Missing "," in array encoding: ' . $this->source);
+            }
+
+            $tok = $this->_getNextToken();
+        }
+
+        $this->_getNextToken();
+        return $result;
+    }
+
+    /**
+     * Removes whitespace characters from the source input
+     */
+    protected function _eatWhitespace()
+    {
+        if (preg_match('/([\t\b\f\n\r ])*/s', $this->source, $matches, PREG_OFFSET_CAPTURE, $this->offset)
+            && $matches[0][1] == $this->offset) {
+            $this->offset += strlen($matches[0][0]);
+        }
+    }
+
+    /**
+     * Retrieves the next token from the source stream
+     *
+     * @return int Token constant value specified in class definition
+     * @throws RuntimeException
+     */
+    protected function _getNextToken()
+    {
+        $this->token      = self::EOF;
+        $this->tokenValue = null;
+        $this->_eatWhitespace();
+
+        if ($this->offset >= $this->sourceLength) {
+            return(self::EOF);
+        }
+
+        $str       = $this->source;
+        $strLength = $this->sourceLength;
+        $i         = $this->offset;
+        $start     = $i;
+
+        switch ($str{$i}) {
+            case '{':
+                $this->token = self::LBRACE;
+                break;
+            case '}':
+                $this->token = self::RBRACE;
+                break;
+            case '[':
+                $this->token = self::LBRACKET;
+                break;
+            case ']':
+                $this->token = self::RBRACKET;
+                break;
+            case ',':
+                $this->token = self::COMMA;
+                break;
+            case ':':
+                $this->token = self::COLON;
+                break;
+            case '"':
+                $result = '';
+                do {
+                    $i++;
+                    if ($i >= $strLength) {
+                        break;
+                    }
+
+                    $chr = $str{$i};
+
+                    if ($chr == '\\') {
+                        $i++;
+                        if ($i >= $strLength) {
+                            break;
+                        }
+                        $chr = $str{$i};
+                        switch ($chr) {
+                            case '"':
+                                $result .= '"';
+                                break;
+                            case '\\':
+                                $result .= '\\';
+                                break;
+                            case '/':
+                                $result .= '/';
+                                break;
+                            case 'b':
+                                $result .= "\x08";
+                                break;
+                            case 'f':
+                                $result .= "\x0c";
+                                break;
+                            case 'n':
+                                $result .= "\x0a";
+                                break;
+                            case 'r':
+                                $result .= "\x0d";
+                                break;
+                            case 't':
+                                $result .= "\x09";
+                                break;
+                            case '\'':
+                                $result .= '\'';
+                                break;
+                            default:
+                                throw new RuntimeException("Illegal escape sequence '{$chr}'");
+                        }
+                    } elseif ($chr == '"') {
+                        break;
+                    } else {
+                        $result .= $chr;
+                    }
+                } while ($i < $strLength);
+
+                $this->token = self::DATUM;
+                //$this->tokenValue = substr($str, $start + 1, $i - $start - 1);
+                $this->tokenValue = $result;
+                break;
+            case 't':
+                if (($i+ 3) < $strLength && substr($str, $start, 4) == "true") {
+                    $this->token = self::DATUM;
+                }
+                $this->tokenValue = true;
+                $i += 3;
+                break;
+            case 'f':
+                if (($i+ 4) < $strLength && substr($str, $start, 5) == "false") {
+                    $this->token = self::DATUM;
+                }
+                $this->tokenValue = false;
+                $i += 4;
+                break;
+            case 'n':
+                if (($i+ 3) < $strLength && substr($str, $start, 4) == "null") {
+                    $this->token = self::DATUM;
+                }
+                $this->tokenValue = null;
+                $i += 3;
+                break;
+        }
+
+        if ($this->token != self::EOF) {
+            $this->offset = $i + 1; // Consume the last token character
+            return($this->token);
+        }
+
+        $chr = $str{$i};
+        if ($chr == '-' || $chr == '.' || ($chr >= '0' && $chr <= '9')) {
+            if (preg_match('/-?([0-9])*(\.[0-9]*)?((e|E)((-|\+)?)[0-9]+)?/s', $str, $matches, PREG_OFFSET_CAPTURE, $start) && $matches[0][1] == $start) {
+                $datum = $matches[0][0];
+
+                if (is_numeric($datum)) {
+                    if (preg_match('/^0\d+$/', $datum)) {
+                        throw new RuntimeException("Octal notation not supported by JSON (value: {$datum})");
+                    } else {
+                        $val  = intval($datum);
+                        $fVal = floatval($datum);
+                        $this->tokenValue = ($val == $fVal ? $val : $fVal);
+                    }
+                } else {
+                    throw new RuntimeException("Illegal number format: {$datum}");
+                }
+
+                $this->token = self::DATUM;
+                $this->offset = $start + strlen($datum);
+            }
+        } else {
+            throw new RuntimeException('Illegal Token');
+        }
+
+        return $this->token;
+    }
+
+    /**
+     * Convert a string from one UTF-16 char to one UTF-8 char.
+     *
+     * Normally should be handled by mb_convert_encoding, but
+     * provides a slower PHP-only method for installations
+     * that lack the multibyte string extension.
+     *
+     * This method is from the Solar Framework by Paul M. Jones
+     *
+     * @link   http://solarphp.com
+     * @param  string $utf16 UTF-16 character
+     * @return string UTF-8 character
+     */
+    protected static function _utf162utf8($utf16)
+    {
+        // Check for mb extension otherwise do by hand.
+        if (function_exists('mb_convert_encoding')) {
+            return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
+        }
+
+        $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
+
+        switch (true) {
+            case ((0x7F & $bytes) == $bytes):
+                // this case should never be reached, because we are in ASCII range
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0x7F & $bytes);
+
+            case (0x07FF & $bytes) == $bytes:
+                // return a 2-byte UTF-8 character
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0xC0 | (($bytes >> 6) & 0x1F))
+                     . chr(0x80 | ($bytes & 0x3F));
+
+            case (0xFFFF & $bytes) == $bytes:
+                // return a 3-byte UTF-8 character
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0xE0 | (($bytes >> 12) & 0x0F))
+                     . chr(0x80 | (($bytes >> 6) & 0x3F))
+                     . chr(0x80 | ($bytes & 0x3F));
+        }
+
+        // ignoring UTF-32 for now, sorry
+        return '';
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Encoder.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Encoder.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Encoder.php	(revision 5534)
@@ -0,0 +1,568 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json;
+
+use Iterator;
+use IteratorAggregate;
+use JsonSerializable;
+use ReflectionClass;
+use Zend\Json\Exception\InvalidArgumentException;
+use Zend\Json\Exception\RecursionException;
+
+/**
+ * Encode PHP constructs to JSON
+ */
+class Encoder
+{
+    /**
+     * Whether or not to check for possible cycling
+     *
+     * @var bool
+     */
+    protected $cycleCheck;
+
+    /**
+     * Additional options used during encoding
+     *
+     * @var array
+     */
+    protected $options = [];
+
+    /**
+     * Array of visited objects; used to prevent cycling.
+     *
+     * @var array
+     */
+    protected $visited = [];
+
+    /**
+     * Constructor
+     *
+     * @param  bool $cycleCheck Whether or not to check for recursion when encoding
+     * @param array $options Additional options used during encoding
+     * @return Encoder
+     */
+    protected function __construct($cycleCheck = false, $options = [])
+    {
+        $this->cycleCheck = $cycleCheck;
+        $this->options = $options;
+    }
+
+    /**
+     * Use the JSON encoding scheme for the value specified
+     *
+     * @param mixed $value The value to be encoded
+     * @param  bool $cycleCheck Whether or not to check for possible object recursion when encoding
+     * @param array $options Additional options used during encoding
+     * @return string  The encoded value
+     */
+    public static function encode($value, $cycleCheck = false, $options = [])
+    {
+        $encoder = new static($cycleCheck, $options);
+
+        if ($value instanceof JsonSerializable) {
+            $value = $value->jsonSerialize();
+        }
+
+        return $encoder->_encodeValue($value);
+    }
+
+    /**
+     * Recursive driver which determines the type of value to be encoded
+     * and then dispatches to the appropriate method. $values are either
+     *    - objects (returns from {@link _encodeObject()})
+     *    - arrays (returns from {@link _encodeArray()})
+     *    - basic datums (e.g. numbers or strings) (returns from {@link _encodeDatum()})
+     *
+     * @param $value mixed The value to be encoded
+     * @return string Encoded value
+     */
+    protected function _encodeValue(&$value)
+    {
+        if (is_object($value)) {
+            return $this->_encodeObject($value);
+        } elseif (is_array($value)) {
+            return $this->_encodeArray($value);
+        }
+
+        return $this->_encodeDatum($value);
+    }
+
+    /**
+     * Encode an object to JSON by encoding each of the public properties
+     *
+     * A special property is added to the JSON object called '__className'
+     * that contains the name of the class of $value. This is used to decode
+     * the object on the client into a specific class.
+     *
+     * @param $value object
+     * @return string
+     * @throws RecursionException If recursive checks are enabled and the
+     *                            object has been serialized previously
+     */
+    protected function _encodeObject(&$value)
+    {
+        if ($this->cycleCheck) {
+            if ($this->_wasVisited($value)) {
+                if (isset($this->options['silenceCyclicalExceptions'])
+                    && $this->options['silenceCyclicalExceptions']===true) {
+                    return '"* RECURSION (' . str_replace('\\', '\\\\', get_class($value)) . ') *"';
+                } else {
+                    throw new RecursionException(
+                        'Cycles not supported in JSON encoding, cycle introduced by '
+                        . 'class "' . get_class($value) . '"'
+                    );
+                }
+            }
+
+            $this->visited[] = $value;
+        }
+
+        $props = '';
+
+        if (method_exists($value, 'toJson')) {
+            $props = ',' . preg_replace("/^\{(.*)\}$/", "\\1", $value->toJson());
+        } else {
+            if ($value instanceof IteratorAggregate) {
+                $propCollection = $value->getIterator();
+            } elseif ($value instanceof Iterator) {
+                $propCollection = $value;
+            } else {
+                $propCollection = get_object_vars($value);
+            }
+
+            foreach ($propCollection as $name => $propValue) {
+                if (isset($propValue)) {
+                    $props .= ','
+                            . $this->_encodeValue($name)
+                            . ':'
+                            . $this->_encodeValue($propValue);
+                }
+            }
+        }
+
+        $className = get_class($value);
+        return '{"__className":'
+            . $this->_encodeString($className)
+            . $props . '}';
+    }
+
+    /**
+     * Determine if an object has been serialized already
+     *
+     * @param mixed $value
+     * @return bool
+     */
+    protected function _wasVisited(&$value)
+    {
+        if (in_array($value, $this->visited, true)) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * JSON encode an array value
+     *
+     * Recursively encodes each value of an array and returns a JSON encoded
+     * array string.
+     *
+     * Arrays are defined as integer-indexed arrays starting at index 0, where
+     * the last index is (count($array) -1); any deviation from that is
+     * considered an associative array, and will be encoded as such.
+     *
+     * @param $array array
+     * @return string
+     */
+    protected function _encodeArray(&$array)
+    {
+        $tmpArray = [];
+
+        // Check for associative array
+        if (!empty($array) && (array_keys($array) !== range(0, count($array) - 1))) {
+            // Associative array
+            $result = '{';
+            foreach ($array as $key => $value) {
+                $key = (string) $key;
+                $tmpArray[] = $this->_encodeString($key)
+                            . ':'
+                            . $this->_encodeValue($value);
+            }
+            $result .= implode(',', $tmpArray);
+            $result .= '}';
+        } else {
+            // Indexed array
+            $result = '[';
+            $length = count($array);
+            for ($i = 0; $i < $length; $i++) {
+                $tmpArray[] = $this->_encodeValue($array[$i]);
+            }
+            $result .= implode(',', $tmpArray);
+            $result .= ']';
+        }
+
+        return $result;
+    }
+
+    /**
+     * JSON encode a basic data type (string, number, boolean, null)
+     *
+     * If value type is not a string, number, boolean, or null, the string
+     * 'null' is returned.
+     *
+     * @param  mixed $value
+     * @return string
+     */
+    protected function _encodeDatum(&$value)
+    {
+        $result = 'null';
+
+        if (is_int($value) || is_float($value)) {
+            $result = (string) $value;
+            $result = str_replace(',', '.', $result);
+        } elseif (is_string($value)) {
+            $result = $this->_encodeString($value);
+        } elseif (is_bool($value)) {
+            $result = $value ? 'true' : 'false';
+        }
+
+        return $result;
+    }
+
+    /**
+     * JSON encode a string value by escaping characters as necessary
+     *
+     * @param string $string
+     * @return string
+     */
+    protected function _encodeString(&$string)
+    {
+        // Escape these characters with a backslash or unicode escape:
+        // " \ / \n \r \t \b \f
+        $search  = ['\\', "\n", "\t", "\r", "\b", "\f", '"', '\'', '&', '<', '>', '/'];
+        $replace = ['\\\\', '\\n', '\\t', '\\r', '\\b', '\\f', '\\u0022', '\\u0027', '\\u0026',  '\\u003C', '\\u003E', '\\/'];
+        $string  = str_replace($search, $replace, $string);
+
+        // Escape certain ASCII characters:
+        // 0x08 => \b
+        // 0x0c => \f
+        $string = str_replace([chr(0x08), chr(0x0C)], ['\b', '\f'], $string);
+        $string = self::encodeUnicodeString($string);
+
+        return '"' . $string . '"';
+    }
+
+    /**
+     * Encode the constants associated with the ReflectionClass
+     * parameter. The encoding format is based on the class2 format
+     *
+     * @param ReflectionClass $cls
+     * @return string Encoded constant block in class2 format
+     */
+    private static function _encodeConstants(ReflectionClass $cls)
+    {
+        $result    = "constants : {";
+        $constants = $cls->getConstants();
+
+        $tmpArray = [];
+        if (!empty($constants)) {
+            foreach ($constants as $key => $value) {
+                $tmpArray[] = "$key: " . self::encode($value);
+            }
+
+            $result .= implode(', ', $tmpArray);
+        }
+
+        return $result . "}";
+    }
+
+    /**
+     * Encode the public methods of the ReflectionClass in the
+     * class2 format
+     *
+     * @param ReflectionClass $cls
+     * @return string Encoded method fragment
+     *
+     */
+    private static function _encodeMethods(ReflectionClass $cls)
+    {
+        $methods = $cls->getMethods();
+        $result = 'methods:{';
+
+        $started = false;
+        foreach ($methods as $method) {
+            if (! $method->isPublic() || !$method->isUserDefined()) {
+                continue;
+            }
+
+            if ($started) {
+                $result .= ',';
+            }
+            $started = true;
+
+            $result .= '' . $method->getName(). ':function(';
+
+            if ('__construct' != $method->getName()) {
+                $parameters  = $method->getParameters();
+                $argsStarted = false;
+
+                $argNames = "var argNames=[";
+                foreach ($parameters as $param) {
+                    if ($argsStarted) {
+                        $result .= ',';
+                    }
+
+                    $result .= $param->getName();
+
+                    if ($argsStarted) {
+                        $argNames .= ',';
+                    }
+
+                    $argNames .= '"' . $param->getName() . '"';
+
+                    $argsStarted = true;
+                }
+                $argNames .= "];";
+
+                $result .= "){"
+                         . $argNames
+                         . 'var result = ZAjaxEngine.invokeRemoteMethod('
+                         . "this, '" . $method->getName()
+                         . "',argNames,arguments);"
+                         . 'return(result);}';
+            } else {
+                $result .= "){}";
+            }
+        }
+
+        return $result . "}";
+    }
+
+    /**
+     * Encode the public properties of the ReflectionClass in the class2
+     * format.
+     *
+     * @param ReflectionClass $cls
+     * @return string Encode properties list
+     *
+     */
+    private static function _encodeVariables(ReflectionClass $cls)
+    {
+        $properties = $cls->getProperties();
+        $propValues = get_class_vars($cls->getName());
+        $result = "variables:{";
+
+        $tmpArray = [];
+        foreach ($properties as $prop) {
+            if (! $prop->isPublic()) {
+                continue;
+            }
+
+            $tmpArray[] = $prop->getName()
+                        . ':'
+                        . self::encode($propValues[$prop->getName()]);
+        }
+        $result .= implode(',', $tmpArray);
+
+        return $result . "}";
+    }
+
+    /**
+     * Encodes the given $className into the class2 model of encoding PHP
+     * classes into JavaScript class2 classes.
+     * NOTE: Currently only public methods and variables are proxied onto
+     * the client machine
+     *
+     * @param $className string The name of the class, the class must be
+     * instantiable using a null constructor
+     * @param $package string Optional package name appended to JavaScript
+     * proxy class name
+     * @return string The class2 (JavaScript) encoding of the class
+     * @throws InvalidArgumentException
+     */
+    public static function encodeClass($className, $package = '')
+    {
+        $cls = new \ReflectionClass($className);
+        if (! $cls->isInstantiable()) {
+            throw new InvalidArgumentException("'{$className}' must be instantiable");
+        }
+
+        return "Class.create('$package$className',{"
+                . self::_encodeConstants($cls)    .","
+                . self::_encodeMethods($cls)      .","
+                . self::_encodeVariables($cls)    .'});';
+    }
+
+    /**
+     * Encode several classes at once
+     *
+     * Returns JSON encoded classes, using {@link encodeClass()}.
+     *
+     * @param array $classNames
+     * @param string $package
+     * @return string
+     */
+    public static function encodeClasses(array $classNames, $package = '')
+    {
+        $result = '';
+        foreach ($classNames as $className) {
+            $result .= static::encodeClass($className, $package);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Encode Unicode Characters to \u0000 ASCII syntax.
+     *
+     * This algorithm was originally developed for the
+     * Solar Framework by Paul M. Jones
+     *
+     * @link   http://solarphp.com/
+     * @link   https://github.com/solarphp/core/blob/master/Solar/Json.php
+     * @param  string $value
+     * @return string
+     */
+    public static function encodeUnicodeString($value)
+    {
+        $strlenVar = strlen($value);
+        $ascii = "";
+
+        /**
+         * Iterate over every character in the string,
+         * escaping with a slash or encoding to UTF-8 where necessary
+         */
+        for ($i = 0; $i < $strlenVar; $i++) {
+            $ordVarC = ord($value[$i]);
+
+            switch (true) {
+                case (($ordVarC >= 0x20) && ($ordVarC <= 0x7F)):
+                    // characters U-00000000 - U-0000007F (same as ASCII)
+                    $ascii .= $value[$i];
+                    break;
+
+                case (($ordVarC & 0xE0) == 0xC0):
+                    // characters U-00000080 - U-000007FF, mask 110XXXXX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $char = pack('C*', $ordVarC, ord($value[$i + 1]));
+                    $i += 1;
+                    $utf16 = self::_utf82utf16($char);
+                    $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                    break;
+
+                case (($ordVarC & 0xF0) == 0xE0):
+                    // characters U-00000800 - U-0000FFFF, mask 1110XXXX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $char = pack(
+                        'C*',
+                        $ordVarC,
+                        ord($value[$i + 1]),
+                        ord($value[$i + 2])
+                    );
+                    $i += 2;
+                    $utf16 = self::_utf82utf16($char);
+                    $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                    break;
+
+                case (($ordVarC & 0xF8) == 0xF0):
+                    // characters U-00010000 - U-001FFFFF, mask 11110XXX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $char = pack(
+                        'C*',
+                        $ordVarC,
+                        ord($value[$i + 1]),
+                        ord($value[$i + 2]),
+                        ord($value[$i + 3])
+                    );
+                    $i += 3;
+                    $utf16 = self::_utf82utf16($char);
+                    $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                    break;
+
+                case (($ordVarC & 0xFC) == 0xF8):
+                    // characters U-00200000 - U-03FFFFFF, mask 111110XX
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $char = pack(
+                        'C*',
+                        $ordVarC,
+                        ord($value[$i + 1]),
+                        ord($value[$i + 2]),
+                        ord($value[$i + 3]),
+                        ord($value[$i + 4])
+                    );
+                    $i += 4;
+                    $utf16 = self::_utf82utf16($char);
+                    $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                    break;
+
+                case (($ordVarC & 0xFE) == 0xFC):
+                    // characters U-04000000 - U-7FFFFFFF, mask 1111110X
+                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                    $char = pack(
+                        'C*',
+                        $ordVarC,
+                        ord($value[$i + 1]),
+                        ord($value[$i + 2]),
+                        ord($value[$i + 3]),
+                        ord($value[$i + 4]),
+                        ord($value[$i + 5])
+                    );
+                    $i += 5;
+                    $utf16 = self::_utf82utf16($char);
+                    $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                    break;
+            }
+        }
+
+        return $ascii;
+    }
+
+    /**
+     * Convert a string from one UTF-8 char to one UTF-16 char.
+     *
+     * Normally should be handled by mb_convert_encoding, but
+     * provides a slower PHP-only method for installations
+     * that lack the multibyte string extension.
+     *
+     * This method is from the Solar Framework by Paul M. Jones
+     *
+     * @link   http://solarphp.com
+     * @param string $utf8 UTF-8 character
+     * @return string UTF-16 character
+     */
+    protected static function _utf82utf16($utf8)
+    {
+        // Check for mb extension otherwise do by hand.
+        if (function_exists('mb_convert_encoding')) {
+            return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
+        }
+
+        switch (strlen($utf8)) {
+            case 1:
+                // this case should never be reached, because we are in ASCII range
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return $utf8;
+
+            case 2:
+                // return a UTF-16 character from a 2-byte UTF-8 char
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1})));
+
+            case 3:
+                // return a UTF-16 character from a 3-byte UTF-8 char
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2})));
+        }
+
+        // ignoring UTF-32 for now, sorry
+        return '';
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/BadMethodCallException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/BadMethodCallException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/BadMethodCallException.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Exception;
+
+class BadMethodCallException extends \BadMethodCallException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Exception;
+
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Exception;
+
+class InvalidArgumentException extends \InvalidArgumentException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/RecursionException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/RecursionException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/RecursionException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Exception;
+
+class RecursionException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Exception;
+
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Expr.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Expr.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Expr.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json;
+
+/**
+ * Class for Zend\Json\Json encode method.
+ *
+ * This class simply holds a string with a native Javascript Expression,
+ * so objects | arrays to be encoded with Zend\Json\Json can contain native
+ * Javascript Expressions.
+ *
+ * Example:
+ * <code>
+ * $foo = array(
+ *     'integer'  => 9,
+ *     'string'   => 'test string',
+ *     'function' => Zend\Json\Expr(
+ *         'function () { window.alert("javascript function encoded by Zend\Json\Json") }'
+ *     ),
+ * );
+ *
+ * Zend\Json\Json::encode($foo, false, array('enableJsonExprFinder' => true));
+ * // it will returns json encoded string:
+ * // {"integer":9,"string":"test string","function":function () {window.alert("javascript function encoded by Zend\Json\Json")}}
+ * </code>
+ */
+class Expr
+{
+    /**
+     * Storage for javascript expression.
+     *
+     * @var string
+     */
+    protected $expression;
+
+    /**
+     * Constructor
+     *
+     * @param  string $expression the expression to hold.
+     */
+    public function __construct($expression)
+    {
+        $this->expression = (string) $expression;
+    }
+
+    /**
+     * Cast to string
+     *
+     * @return string holded javascript expression.
+     */
+    public function __toString()
+    {
+        return $this->expression;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Json.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Json.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Json.php	(revision 5534)
@@ -0,0 +1,406 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json;
+
+use SimpleXMLElement;
+use Zend\Json\Exception\RecursionException;
+use Zend\Json\Exception\RuntimeException;
+use ZendXml\Security as XmlSecurity;
+
+/**
+ * Class for encoding to and decoding from JSON.
+ */
+class Json
+{
+    /**
+     * How objects should be encoded -- arrays or as stdClass. TYPE_ARRAY is 1
+     * so that it is a boolean true value, allowing it to be used with
+     * ext/json's functions.
+     */
+    const TYPE_ARRAY  = 1;
+    const TYPE_OBJECT = 0;
+
+     /**
+      * To check the allowed nesting depth of the XML tree during xml2json conversion.
+      *
+      * @var int
+      */
+    public static $maxRecursionDepthAllowed = 25;
+
+    /**
+     * @var bool
+     */
+    public static $useBuiltinEncoderDecoder = false;
+
+    /**
+     * Decodes the given $encodedValue string which is
+     * encoded in the JSON format
+     *
+     * Uses ext/json's json_decode if available.
+     *
+     * @param string $encodedValue Encoded in JSON format
+     * @param int $objectDecodeType Optional; flag indicating how to decode
+     * objects. See {@link Zend\Json\Decoder::decode()} for details.
+     * @return mixed
+     * @throws RuntimeException
+     */
+    public static function decode($encodedValue, $objectDecodeType = self::TYPE_OBJECT)
+    {
+        $encodedValue = (string) $encodedValue;
+        if (function_exists('json_decode') && static::$useBuiltinEncoderDecoder !== true) {
+            $decode = json_decode($encodedValue, $objectDecodeType);
+
+            switch (json_last_error()) {
+                case JSON_ERROR_NONE:
+                    break;
+                case JSON_ERROR_DEPTH:
+                    throw new RuntimeException('Decoding failed: Maximum stack depth exceeded');
+                case JSON_ERROR_CTRL_CHAR:
+                    throw new RuntimeException('Decoding failed: Unexpected control character found');
+                case JSON_ERROR_SYNTAX:
+                    throw new RuntimeException('Decoding failed: Syntax error');
+                default:
+                    throw new RuntimeException('Decoding failed');
+            }
+
+            return $decode;
+        }
+
+        return Decoder::decode($encodedValue, $objectDecodeType);
+    }
+
+    /**
+     * Encode the mixed $valueToEncode into the JSON format
+     *
+     * Encodes using ext/json's json_encode() if available.
+     *
+     * NOTE: Object should not contain cycles; the JSON format
+     * does not allow object reference.
+     *
+     * NOTE: Only public variables will be encoded
+     *
+     * NOTE: Encoding native javascript expressions are possible using Zend\Json\Expr.
+     *       You can enable this by setting $options['enableJsonExprFinder'] = true
+     *
+     * @see Zend\Json\Expr
+     *
+     * @param  mixed $valueToEncode
+     * @param  bool $cycleCheck Optional; whether or not to check for object recursion; off by default
+     * @param  array $options Additional options used during encoding
+     * @return string JSON encoded object
+     */
+    public static function encode($valueToEncode, $cycleCheck = false, $options = [])
+    {
+        if (is_object($valueToEncode)) {
+            if (method_exists($valueToEncode, 'toJson')) {
+                return $valueToEncode->toJson();
+            } elseif (method_exists($valueToEncode, 'toArray')) {
+                return static::encode($valueToEncode->toArray(), $cycleCheck, $options);
+            }
+        }
+
+        // Pre-encoding look for Zend\Json\Expr objects and replacing by tmp ids
+        $javascriptExpressions = [];
+        if (isset($options['enableJsonExprFinder'])
+           && ($options['enableJsonExprFinder'] == true)
+        ) {
+            $valueToEncode = static::_recursiveJsonExprFinder($valueToEncode, $javascriptExpressions);
+        }
+
+        $prettyPrint = (isset($options['prettyPrint']) && ($options['prettyPrint'] == true));
+
+        // Encoding
+        if (function_exists('json_encode') && static::$useBuiltinEncoderDecoder !== true) {
+            $encodeOptions = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP;
+
+            if ($prettyPrint && defined('JSON_PRETTY_PRINT')) {
+                $encodeOptions |= JSON_PRETTY_PRINT;
+                $prettyPrint = false;
+            }
+
+            $encodedResult = json_encode(
+                $valueToEncode,
+                $encodeOptions
+            );
+        } else {
+            $encodedResult = Encoder::encode($valueToEncode, $cycleCheck, $options);
+        }
+
+        if ($prettyPrint) {
+            $encodedResult = self::prettyPrint($encodedResult, ["indent" => "    "]);
+        }
+
+        //only do post-processing to revert back the Zend\Json\Expr if any.
+        if (count($javascriptExpressions) > 0) {
+            $count = count($javascriptExpressions);
+            for ($i = 0; $i < $count; $i++) {
+                $magicKey = $javascriptExpressions[$i]['magicKey'];
+                $value    = $javascriptExpressions[$i]['value'];
+
+                $encodedResult = str_replace(
+                    //instead of replacing "key:magicKey", we replace directly magicKey by value because "key" never changes.
+                    '"' . $magicKey . '"',
+                    $value,
+                    $encodedResult
+                );
+            }
+        }
+
+        return $encodedResult;
+    }
+
+    /**
+     * Check & Replace Zend\Json\Expr for tmp ids in the valueToEncode
+     *
+     * Check if the value is a Zend\Json\Expr, and if replace its value
+     * with a magic key and save the javascript expression in an array.
+     *
+     * NOTE this method is recursive.
+     *
+     * NOTE: This method is used internally by the encode method.
+     *
+     * @see encode
+     * @param mixed $value a string - object property to be encoded
+     * @param array $javascriptExpressions
+     * @param null|string|int $currentKey
+     * @return mixed
+     */
+    protected static function _recursiveJsonExprFinder(
+        &$value,
+        array &$javascriptExpressions,
+        $currentKey = null
+    ) {
+        if ($value instanceof Expr) {
+            // TODO: Optimize with ascii keys, if performance is bad
+            $magicKey = "____" . $currentKey . "_" . (count($javascriptExpressions));
+            $javascriptExpressions[] = [
+
+                //if currentKey is integer, encodeUnicodeString call is not required.
+                "magicKey" => (is_int($currentKey)) ? $magicKey : Encoder::encodeUnicodeString($magicKey),
+                "value"    => $value->__toString(),
+            ];
+            $value = $magicKey;
+        } elseif (is_array($value)) {
+            foreach ($value as $k => $v) {
+                $value[$k] = static::_recursiveJsonExprFinder($value[$k], $javascriptExpressions, $k);
+            }
+        } elseif (is_object($value)) {
+            foreach ($value as $k => $v) {
+                $value->$k = static::_recursiveJsonExprFinder($value->$k, $javascriptExpressions, $k);
+            }
+        }
+        return $value;
+    }
+    /**
+     * Return the value of an XML attribute text or the text between
+     * the XML tags
+     *
+     * In order to allow Zend\Json\Expr from xml, we check if the node
+     * matches the pattern that try to detect if it is a new Zend\Json\Expr
+     * if it matches, we return a new Zend\Json\Expr instead of a text node
+     *
+     * @param SimpleXMLElement $simpleXmlElementObject
+     * @return Expr|string
+     */
+    protected static function _getXmlValue($simpleXmlElementObject)
+    {
+        $pattern   = '/^[\s]*new Zend[_\\]Json[_\\]Expr[\s]*\([\s]*[\"\']{1}(.*)[\"\']{1}[\s]*\)[\s]*$/';
+        $matchings = [];
+        $match     = preg_match($pattern, $simpleXmlElementObject, $matchings);
+        if ($match) {
+            return new Expr($matchings[1]);
+        }
+        return (trim(strval($simpleXmlElementObject)));
+    }
+
+    /**
+     * _processXml - Contains the logic for xml2json
+     *
+     * The logic in this function is a recursive one.
+     *
+     * The main caller of this function (i.e. fromXml) needs to provide
+     * only the first two parameters i.e. the SimpleXMLElement object and
+     * the flag for ignoring or not ignoring XML attributes. The third parameter
+     * will be used internally within this function during the recursive calls.
+     *
+     * This function converts the SimpleXMLElement object into a PHP array by
+     * calling a recursive (protected static) function in this class. Once all
+     * the XML elements are stored in the PHP array, it is returned to the caller.
+     *
+     * @param SimpleXMLElement $simpleXmlElementObject
+     * @param  bool $ignoreXmlAttributes
+     * @param int $recursionDepth
+     * @throws Exception\RecursionException if the XML tree is deeper than the allowed limit.
+     * @return array
+     */
+    protected static function _processXml($simpleXmlElementObject, $ignoreXmlAttributes, $recursionDepth = 0)
+    {
+        // Keep an eye on how deeply we are involved in recursion.
+        if ($recursionDepth > static::$maxRecursionDepthAllowed) {
+            // XML tree is too deep. Exit now by throwing an exception.
+            throw new RecursionException(
+                "Function _processXml exceeded the allowed recursion depth of "
+                .  static::$maxRecursionDepthAllowed
+            );
+        }
+
+        $children   = $simpleXmlElementObject->children();
+        $name       = $simpleXmlElementObject->getName();
+        $value      = static::_getXmlValue($simpleXmlElementObject);
+        $attributes = (array) $simpleXmlElementObject->attributes();
+
+        if (!count($children)) {
+            if (!empty($attributes) && !$ignoreXmlAttributes) {
+                foreach ($attributes['@attributes'] as $k => $v) {
+                    $attributes['@attributes'][$k] = static::_getXmlValue($v);
+                }
+                if (!empty($value)) {
+                    $attributes['@text'] = $value;
+                }
+                return [$name => $attributes];
+            }
+
+            return [$name => $value];
+        }
+
+        $childArray = [];
+        foreach ($children as $child) {
+            $childname = $child->getName();
+            $element   = static::_processXml($child, $ignoreXmlAttributes, $recursionDepth + 1);
+            if (array_key_exists($childname, $childArray)) {
+                if (empty($subChild[$childname])) {
+                    $childArray[$childname] = [$childArray[$childname]];
+                    $subChild[$childname]   = true;
+                }
+                $childArray[$childname][] = $element[$childname];
+            } else {
+                $childArray[$childname] = $element[$childname];
+            }
+        }
+
+        if (!empty($attributes) && !$ignoreXmlAttributes) {
+            foreach ($attributes['@attributes'] as $k => $v) {
+                $attributes['@attributes'][$k] = static::_getXmlValue($v);
+            }
+            $childArray['@attributes'] = $attributes['@attributes'];
+        }
+
+        if (!empty($value)) {
+            $childArray['@text'] = $value;
+        }
+
+        return [$name => $childArray];
+    }
+
+    /**
+     * @deprecated by https://github.com/zendframework/zf2/pull/6778
+     * fromXml - Converts XML to JSON
+     *
+     * Converts a XML formatted string into a JSON formatted string.
+     * The value returned will be a string in JSON format.
+     *
+     * The caller of this function needs to provide only the first parameter,
+     * which is an XML formatted String. The second parameter is optional, which
+     * lets the user to select if the XML attributes in the input XML string
+     * should be included or ignored in xml2json conversion.
+     *
+     * This function converts the XML formatted string into a PHP array by
+     * calling a recursive (protected static) function in this class. Then, it
+     * converts that PHP array into JSON by calling the "encode" static function.
+     *
+     * NOTE: Encoding native javascript expressions via Zend\Json\Expr is not possible.
+     *
+     * @static
+     * @access public
+     * @param string $xmlStringContents XML String to be converted
+     * @param  bool $ignoreXmlAttributes Include or exclude XML attributes in
+     * the xml2json conversion process.
+     * @return mixed - JSON formatted string on success
+     * @throws \Zend\Json\Exception\RuntimeException if the input not a XML formatted string
+     */
+    public static function fromXml($xmlStringContents, $ignoreXmlAttributes = true)
+    {
+        // Load the XML formatted string into a Simple XML Element object.
+        $simpleXmlElementObject = XmlSecurity::scan($xmlStringContents);
+
+        // If it is not a valid XML content, throw an exception.
+        if (!$simpleXmlElementObject) {
+            throw new RuntimeException('Function fromXml was called with an invalid XML formatted string.');
+        } // End of if ($simpleXmlElementObject === null)
+
+        // Call the recursive function to convert the XML into a PHP array.
+        $resultArray = static::_processXml($simpleXmlElementObject, $ignoreXmlAttributes);
+
+        // Convert the PHP array to JSON using Zend\Json\Json encode method.
+        // It is just that simple.
+        $jsonStringOutput = static::encode($resultArray);
+        return($jsonStringOutput);
+    }
+
+    /**
+     * Pretty-print JSON string
+     *
+     * Use 'indent' option to select indentation string - by default it's a tab
+     *
+     * @param string $json Original JSON string
+     * @param array $options Encoding options
+     * @return string
+     */
+    public static function prettyPrint($json, $options = [])
+    {
+        $tokens = preg_split('|([\{\}\]\[,])|', $json, -1, PREG_SPLIT_DELIM_CAPTURE);
+        $result = "";
+        $indent = 0;
+
+        $ind = "    ";
+        if (isset($options['indent'])) {
+            $ind = $options['indent'];
+        }
+
+        $inLiteral = false;
+        foreach ($tokens as $token) {
+            $token = trim($token);
+            if ($token == "") {
+                continue;
+            }
+
+            if (preg_match('/^("(?:.*)"):[ ]?(.*)$/', $token, $matches)) {
+                $token = $matches[1] . ': ' . $matches[2];
+            }
+
+            $prefix = str_repeat($ind, $indent);
+            if (!$inLiteral && ($token == "{" || $token == "[")) {
+                $indent++;
+                if ($result != "" && $result[strlen($result)-1] == "\n") {
+                    $result .= $prefix;
+                }
+                $result .= "$token\n";
+            } elseif (!$inLiteral && ($token == "}" || $token == "]")) {
+                $indent--;
+                $prefix = str_repeat($ind, $indent);
+                $result .= "\n$prefix$token";
+            } elseif (!$inLiteral && $token == ",") {
+                $result .= "$token\n";
+            } else {
+                $result .= ($inLiteral ?  '' : $prefix) . $token;
+
+                //remove escaped backslash sequences causing false positives in next check
+                $token = str_replace('\\', '', $token);
+                // Count # of unescaped double-quotes in token, subtract # of
+                // escaped double-quotes and if the result is odd then we are
+                // inside a string literal
+                if ((substr_count($token, '"')-substr_count($token, '\\"')) % 2 != 0) {
+                    $inLiteral = !$inLiteral;
+                }
+            }
+        }
+        return $result;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Cache.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Cache.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Cache.php	(revision 5534)
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+use Zend\Server\Cache as ServerCache;
+use Zend\Stdlib\ErrorHandler;
+
+/**
+ * Zend\Json\Server\Cache: cache Zend\Json\Server\Server server definition and SMD
+ */
+class Cache extends ServerCache
+{
+    /**
+     * Cache a service map description (SMD) to a file
+     *
+     * Returns true on success, false on failure
+     *
+     * @param  string $filename
+     * @param  \Zend\Json\Server\Server $server
+     * @return bool
+     */
+    public static function saveSmd($filename, Server $server)
+    {
+        if (!is_string($filename) || (!file_exists($filename) && !is_writable(dirname($filename)))) {
+            return false;
+        }
+
+        ErrorHandler::start();
+        $test = file_put_contents($filename, $server->getServiceMap()->toJson());
+        ErrorHandler::stop();
+
+        if (0 === $test) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Retrieve a cached SMD
+     *
+     * On success, returns the cached SMD (a JSON string); a failure, returns
+     * boolean false.
+     *
+     * @param  string $filename
+     * @return string|false
+     */
+    public static function getSmd($filename)
+    {
+        if (!is_string($filename) || !file_exists($filename) || !is_readable($filename)) {
+            return false;
+        }
+
+        ErrorHandler::start();
+        $smd = file_get_contents($filename);
+        ErrorHandler::stop();
+
+        if (false === $smd) {
+            return false;
+        }
+
+        return $smd;
+    }
+
+    /**
+     * Delete a file containing a cached SMD
+     *
+     * @param  string $filename
+     * @return bool
+     */
+    public static function deleteSmd($filename)
+    {
+        if (is_string($filename) && file_exists($filename)) {
+            unlink($filename);
+            return true;
+        }
+
+        return false;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Client.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Client.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Client.php	(revision 5534)
@@ -0,0 +1,193 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+use Zend\Http\Client as HttpClient;
+use Zend\Server\Client as ServerClient;
+
+class Client implements ServerClient
+{
+    /**
+     * Full address of the JSON-RPC service.
+     *
+     * @var string
+     */
+    protected $serverAddress;
+
+    /**
+     * HTTP Client to use for requests.
+     *
+     * @var HttpClient
+     */
+    protected $httpClient;
+
+    /**
+     * Request of the last method call.
+     *
+     * @var Request
+     */
+    protected $lastRequest;
+
+    /**
+     * Response received from the last method call.
+     *
+     * @var Response
+     */
+    protected $lastResponse;
+
+    /**
+     * Request ID counter.
+     *
+     * @var int
+     */
+    protected $id = 0;
+
+    /**
+     * Create a new JSON-RPC client to a remote server.
+     *
+     * @param string $server Full address of the JSON-RPC service.
+     * @param HttpClient $httpClient HTTP Client to use for requests.
+     */
+    public function __construct($server, HttpClient $httpClient = null)
+    {
+        $this->httpClient = $httpClient ?: new HttpClient();
+        $this->serverAddress = $server;
+    }
+
+    /**
+     * Sets the HTTP client object to use for connecting the JSON-RPC server.
+     *
+     * @param  HttpClient $httpClient New HTTP client to use.
+     * @return Client Self instance.
+     */
+    public function setHttpClient(HttpClient $httpClient)
+    {
+        $this->httpClient = $httpClient;
+        return $this;
+    }
+
+    /**
+     * Gets the HTTP client object.
+     *
+     * @return HttpClient HTTP client.
+     */
+    public function getHttpClient()
+    {
+        return $this->httpClient;
+    }
+
+    /**
+     * The request of the last method call.
+     *
+     * @return Request Request instance.
+     */
+    public function getLastRequest()
+    {
+        return $this->lastRequest;
+    }
+
+    /**
+     * The response received from the last method call.
+     *
+     * @return Response Response instance.
+     */
+    public function getLastResponse()
+    {
+        return $this->lastResponse;
+    }
+
+    /**
+     * Perform a JSON-RPC request and return a response.
+     *
+     * @param  Request $request Request.
+     * @return Response Response.
+     * @throws Exception\HttpException When HTTP communication fails.
+     */
+    public function doRequest($request)
+    {
+        $this->lastRequest = $request;
+
+        $httpRequest = $this->httpClient->getRequest();
+        if ($httpRequest->getUriString() === null) {
+            $this->httpClient->setUri($this->serverAddress);
+        }
+
+        $headers = $httpRequest->getHeaders();
+        $headers->addHeaders([
+            'Content-Type' => 'application/json',
+            'Accept'       => 'application/json',
+        ]);
+
+        if (!$headers->get('User-Agent')) {
+            $headers->addHeaderLine('User-Agent', 'Zend_Json_Server_Client');
+        }
+
+        $this->httpClient->setRawBody($request->__toString());
+        $this->httpClient->setMethod('POST');
+        $httpResponse = $this->httpClient->send();
+
+        if (!$httpResponse->isSuccess()) {
+            throw new Exception\HttpException(
+                $httpResponse->getReasonPhrase(),
+                $httpResponse->getStatusCode()
+            );
+        }
+
+        $response = new Response();
+
+        $this->lastResponse = $response;
+
+        // import all response data from JSON HTTP response
+        $response->loadJson($httpResponse->getBody());
+
+        return $response;
+    }
+
+    /**
+     * Send a JSON-RPC request to the service (for a specific method).
+     *
+     * @param  string $method Name of the method we want to call.
+     * @param  array $params Array of parameters for the method.
+     * @return mixed Method call results.
+     * @throws Exception\ErrorException When remote call fails.
+     */
+    public function call($method, $params = [])
+    {
+        $request = $this->createRequest($method, $params);
+
+        $response = $this->doRequest($request);
+
+        if ($response->isError()) {
+            $error = $response->getError();
+            throw new Exception\ErrorException(
+                $error->getMessage(),
+                $error->getCode()
+            );
+        }
+
+        return $response->getResult();
+    }
+
+    /**
+     * Create request object.
+     *
+     * @param  string $method Method to call.
+     * @param  array $params List of arguments.
+     * @return Request Created request.
+     */
+    protected function createRequest($method, array $params)
+    {
+        $request = new Request();
+        $request->setMethod($method)
+            ->setParams($params)
+            ->setId(++$this->id);
+        return $request;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Error.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Error.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Error.php	(revision 5534)
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+class Error
+{
+    const ERROR_PARSE           = -32700;
+    const ERROR_INVALID_REQUEST = -32600;
+    const ERROR_INVALID_METHOD  = -32601;
+    const ERROR_INVALID_PARAMS  = -32602;
+    const ERROR_INTERNAL        = -32603;
+    const ERROR_OTHER           = -32000;
+
+    /**
+     * Current code
+     * @var int
+     */
+    protected $code = self::ERROR_OTHER;
+
+    /**
+     * Error data
+     * @var mixed
+     */
+    protected $data;
+
+    /**
+     * Error message
+     * @var string
+     */
+    protected $message;
+
+    /**
+     * Constructor
+     *
+     * @param  string $message
+     * @param  int $code
+     * @param  mixed $data
+     */
+    public function __construct($message = null, $code = self::ERROR_OTHER, $data = null)
+    {
+        $this->setMessage($message)
+             ->setCode($code)
+             ->setData($data);
+    }
+
+    /**
+     * Set error code.
+     *
+     * If the error code is 0, it will be set to -32000 (ERROR_OTHER).
+     *
+     * @param  int $code
+     * @return \Zend\Json\Server\Error
+     */
+    public function setCode($code)
+    {
+        if (!is_scalar($code) || is_bool($code) || is_float($code)) {
+            return $this;
+        }
+
+        if (is_string($code) && !is_numeric($code)) {
+            return $this;
+        }
+
+        $code = (int) $code;
+
+        if (0 === $code) {
+            $this->code = self::ERROR_OTHER;
+        } else {
+            $this->code = $code;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Get error code
+     *
+     * @return int|null
+     */
+    public function getCode()
+    {
+        return $this->code;
+    }
+
+    /**
+     * Set error message
+     *
+     * @param  string $message
+     * @return \Zend\Json\Server\Error
+     */
+    public function setMessage($message)
+    {
+        if (!is_scalar($message)) {
+            return $this;
+        }
+
+        $this->message = (string) $message;
+        return $this;
+    }
+
+    /**
+     * Get error message
+     *
+     * @return string
+     */
+    public function getMessage()
+    {
+        return $this->message;
+    }
+
+    /**
+     * Set error data
+     *
+     * @param  mixed $data
+     * @return \Zend\Json\Server\Error
+     */
+    public function setData($data)
+    {
+        $this->data = $data;
+        return $this;
+    }
+
+    /**
+     * Get error data
+     *
+     * @return mixed
+     */
+    public function getData()
+    {
+        return $this->data;
+    }
+
+    /**
+     * Cast error to array
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        return [
+            'code'    => $this->getCode(),
+            'message' => $this->getMessage(),
+            'data'    => $this->getData(),
+        ];
+    }
+
+    /**
+     * Cast error to JSON
+     *
+     * @return string
+     */
+    public function toJson()
+    {
+        return \Zend\Json\Json::encode($this->toArray());
+    }
+
+    /**
+     * Cast to string (JSON)
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->toJson();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/ErrorException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/ErrorException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/ErrorException.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Exception;
+
+use Zend\Json\Exception;
+
+/**
+ * Thrown by Zend\Json\Server\Client when a JSON-RPC fault response is returned.
+ */
+class ErrorException extends Exception\BadMethodCallException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Exception;
+
+use Zend\Json\Exception\ExceptionInterface as Exception;
+
+interface ExceptionInterface extends Exception
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/HttpException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/HttpException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/HttpException.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Exception;
+
+/**
+ * Thrown by Zend\Json\Server\Client when an HTTP error occurs during an
+ * JSON-RPC method call.
+ */
+class HttpException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Exception;
+
+use Zend\Json\Exception;
+
+class InvalidArgumentException extends Exception\InvalidArgumentException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Exception;
+
+use Zend\Json\Exception;
+
+class RuntimeException extends Exception\RuntimeException implements
+    ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Request.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Request.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Request.php	(revision 5534)
@@ -0,0 +1,294 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+use Zend\Json;
+
+/**
+ * @todo       Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions?
+ */
+class Request
+{
+    /**
+     * Request ID
+     * @var mixed
+     */
+    protected $id;
+
+    /**
+     * Flag
+     * @var bool
+     */
+    protected $isMethodError = false;
+
+    /**
+     * Flag
+     * @var bool
+     */
+    protected $isParseError = false;
+
+    /**
+     * Requested method
+     * @var string
+     */
+    protected $method;
+
+    /**
+     * Regex for method
+     * @var string
+     */
+    protected $methodRegex = '/^[a-z][a-z0-9\\\\_.]*$/i';
+
+    /**
+     * Request parameters
+     * @var array
+     */
+    protected $params = [];
+
+    /**
+     * JSON-RPC version of request
+     * @var string
+     */
+    protected $version = '1.0';
+
+    /**
+     * Set request state
+     *
+     * @param  array $options
+     * @return \Zend\Json\Server\Request
+     */
+    public function setOptions(array $options)
+    {
+        $methods = get_class_methods($this);
+        foreach ($options as $key => $value) {
+            $method = 'set' . ucfirst($key);
+            if (in_array($method, $methods)) {
+                $this->$method($value);
+            } elseif ($key == 'jsonrpc') {
+                $this->setVersion($value);
+            }
+        }
+        return $this;
+    }
+
+    /**
+     * Add a parameter to the request
+     *
+     * @param  mixed $value
+     * @param  string $key
+     * @return \Zend\Json\Server\Request
+     */
+    public function addParam($value, $key = null)
+    {
+        if ((null === $key) || !is_string($key)) {
+            $index = count($this->params);
+            $this->params[$index] = $value;
+        } else {
+            $this->params[$key] = $value;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Add many params
+     *
+     * @param  array $params
+     * @return \Zend\Json\Server\Request
+     */
+    public function addParams(array $params)
+    {
+        foreach ($params as $key => $value) {
+            $this->addParam($value, $key);
+        }
+        return $this;
+    }
+
+    /**
+     * Overwrite params
+     *
+     * @param  array $params
+     * @return \Zend\Json\Server\Request
+     */
+    public function setParams(array $params)
+    {
+        $this->params = [];
+        return $this->addParams($params);
+    }
+
+    /**
+     * Retrieve param by index or key
+     *
+     * @param  int|string $index
+     * @return mixed|null Null when not found
+     */
+    public function getParam($index)
+    {
+        if (array_key_exists($index, $this->params)) {
+            return $this->params[$index];
+        }
+
+        return;
+    }
+
+    /**
+     * Retrieve parameters
+     *
+     * @return array
+     */
+    public function getParams()
+    {
+        return $this->params;
+    }
+
+    /**
+     * Set request method
+     *
+     * @param  string $name
+     * @return \Zend\Json\Server\Request
+     */
+    public function setMethod($name)
+    {
+        if (!preg_match($this->methodRegex, $name)) {
+            $this->isMethodError = true;
+        } else {
+            $this->method = $name;
+        }
+        return $this;
+    }
+
+    /**
+     * Get request method name
+     *
+     * @return string
+     */
+    public function getMethod()
+    {
+        return $this->method;
+    }
+
+    /**
+     * Was a bad method provided?
+     *
+     * @return bool
+     */
+    public function isMethodError()
+    {
+        return $this->isMethodError;
+    }
+
+    /**
+     * Was a malformed JSON provided?
+     *
+     * @return bool
+     */
+    public function isParseError()
+    {
+        return $this->isParseError;
+    }
+
+    /**
+     * Set request identifier
+     *
+     * @param  mixed $name
+     * @return \Zend\Json\Server\Request
+     */
+    public function setId($name)
+    {
+        $this->id = (string) $name;
+        return $this;
+    }
+
+    /**
+     * Retrieve request identifier
+     *
+     * @return mixed
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * Set JSON-RPC version
+     *
+     * @param  string $version
+     * @return \Zend\Json\Server\Request
+     */
+    public function setVersion($version)
+    {
+        if ('2.0' == $version) {
+            $this->version = '2.0';
+        } else {
+            $this->version = '1.0';
+        }
+        return $this;
+    }
+
+    /**
+     * Retrieve JSON-RPC version
+     *
+     * @return string
+     */
+    public function getVersion()
+    {
+        return $this->version;
+    }
+
+    /**
+     * Set request state based on JSON
+     *
+     * @param  string $json
+     * @return void
+     */
+    public function loadJson($json)
+    {
+        try {
+            $options = Json\Json::decode($json, Json\Json::TYPE_ARRAY);
+            $this->setOptions($options);
+        } catch (\Exception $e) {
+            $this->isParseError = true;
+        }
+    }
+
+    /**
+     * Cast request to JSON
+     *
+     * @return string
+     */
+    public function toJson()
+    {
+        $jsonArray = [
+            'method' => $this->getMethod()
+        ];
+        if (null !== ($id = $this->getId())) {
+            $jsonArray['id'] = $id;
+        }
+        $params = $this->getParams();
+        if (!empty($params)) {
+            $jsonArray['params'] = $params;
+        }
+        if ('2.0' == $this->getVersion()) {
+            $jsonArray['jsonrpc'] = '2.0';
+        }
+
+        return Json\Json::encode($jsonArray);
+    }
+
+    /**
+     * Cast request to string (JSON)
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->toJson();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Request/Http.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Request/Http.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Request/Http.php	(revision 5534)
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Request;
+
+use Zend\Json\Server\Request as JsonRequest;
+
+class Http extends JsonRequest
+{
+    /**
+     * Raw JSON pulled from POST body
+     * @var string
+     */
+    protected $rawJson;
+
+    /**
+     * Constructor
+     *
+     * Pull JSON request from raw POST body and use to populate request.
+     *
+     */
+    public function __construct()
+    {
+        $json = file_get_contents('php://input');
+        $this->rawJson = $json;
+        if (!empty($json)) {
+            $this->loadJson($json);
+        }
+    }
+
+    /**
+     * Get JSON from raw POST body
+     *
+     * @return string
+     */
+    public function getRawJson()
+    {
+        return $this->rawJson;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Response.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Response.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Response.php	(revision 5534)
@@ -0,0 +1,279 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+use Zend\Json\Json;
+
+class Response
+{
+    /**
+     * Response error
+     * @var null|Error
+     */
+    protected $error;
+
+    /**
+     * Request ID
+     * @var mixed
+     */
+    protected $id;
+
+    /**
+     * Result
+     * @var mixed
+     */
+    protected $result;
+
+    /**
+     * Service map
+     * @var Smd
+     */
+    protected $serviceMap;
+
+    /**
+     * JSON-RPC version
+     * @var string
+     */
+    protected $version;
+
+    /**
+     * @var $args
+     */
+    protected $args;
+
+    /**
+     * Set response state
+     *
+     * @param  array $options
+     * @return Response
+     */
+    public function setOptions(array $options)
+    {
+        // re-produce error state
+        if (isset($options['error']) && is_array($options['error'])) {
+            $error = $options['error'];
+            $options['error'] = new Error($error['message'], $error['code'], $error['data']);
+        }
+
+        $methods = get_class_methods($this);
+        foreach ($options as $key => $value) {
+            $method = 'set' . ucfirst($key);
+            if (in_array($method, $methods)) {
+                $this->$method($value);
+            } elseif ($key == 'jsonrpc') {
+                $this->setVersion($value);
+            }
+        }
+        return $this;
+    }
+
+    /**
+     * Set response state based on JSON
+     *
+     * @param  string $json
+     * @return void
+     * @throws Exception\RuntimeException
+     */
+    public function loadJson($json)
+    {
+        $options = Json::decode($json, Json::TYPE_ARRAY);
+
+        if (!is_array($options)) {
+            throw new Exception\RuntimeException('json is not a valid response; array expected');
+        }
+
+        $this->setOptions($options);
+    }
+
+    /**
+     * Set result
+     *
+     * @param  mixed $value
+     * @return Response
+     */
+    public function setResult($value)
+    {
+        $this->result = $value;
+        return $this;
+    }
+
+    /**
+     * Get result
+     *
+     * @return mixed
+     */
+    public function getResult()
+    {
+        return $this->result;
+    }
+
+    // RPC error, if response results in fault
+    /**
+     * Set result error
+     *
+     * @param  mixed $error
+     * @return Response
+     */
+    public function setError(Error $error = null)
+    {
+        $this->error = $error;
+        return $this;
+    }
+
+    /**
+     * Get response error
+     *
+     * @return null|Error
+     */
+    public function getError()
+    {
+        return $this->error;
+    }
+
+    /**
+     * Is the response an error?
+     *
+     * @return bool
+     */
+    public function isError()
+    {
+        return $this->getError() instanceof Error;
+    }
+
+    /**
+     * Set request ID
+     *
+     * @param  mixed $name
+     * @return Response
+     */
+    public function setId($name)
+    {
+        $this->id = $name;
+        return $this;
+    }
+
+    /**
+     * Get request ID
+     *
+     * @return mixed
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * Set JSON-RPC version
+     *
+     * @param  string $version
+     * @return Response
+     */
+    public function setVersion($version)
+    {
+        $version = (string) $version;
+        if ('2.0' == $version) {
+            $this->version = '2.0';
+        } else {
+            $this->version = null;
+        }
+
+        return $this;
+    }
+
+    /**
+     * Retrieve JSON-RPC version
+     *
+     * @return string
+     */
+    public function getVersion()
+    {
+        return $this->version;
+    }
+
+    /**
+     * Cast to JSON
+     *
+     * @return string
+     */
+    public function toJson()
+    {
+        if ($this->isError()) {
+            $response = [
+                'error'  => $this->getError()->toArray(),
+                'id'     => $this->getId(),
+            ];
+        } else {
+            $response = [
+                'result' => $this->getResult(),
+                'id'     => $this->getId(),
+            ];
+        }
+
+        if (null !== ($version = $this->getVersion())) {
+            $response['jsonrpc'] = $version;
+        }
+
+        return \Zend\Json\Json::encode($response);
+    }
+
+    /**
+     * Retrieve args
+     *
+     * @return mixed
+     */
+    public function getArgs()
+    {
+        return $this->args;
+    }
+
+    /**
+     * Set args
+     *
+     * @param mixed $args
+     * @return self
+     */
+    public function setArgs($args)
+    {
+        $this->args = $args;
+        return $this;
+    }
+
+    /**
+     * Set service map object
+     *
+     * @param  Smd $serviceMap
+     * @return Response
+     */
+    public function setServiceMap($serviceMap)
+    {
+        $this->serviceMap = $serviceMap;
+        return $this;
+    }
+
+    /**
+     * Retrieve service map
+     *
+     * @return Smd|null
+     */
+    public function getServiceMap()
+    {
+        return $this->serviceMap;
+    }
+
+    /**
+     * Cast to string (JSON)
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->toJson();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Response/Http.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Response/Http.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Response/Http.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Response;
+
+use Zend\Json\Server\Response as JsonResponse;
+
+class Http extends JsonResponse
+{
+    /**
+     * Emit JSON
+     *
+     * Send appropriate HTTP headers. If no Id, then return an empty string.
+     *
+     * @return string
+     */
+    public function toJson()
+    {
+        $this->sendHeaders();
+        if (!$this->isError() && null === $this->getId()) {
+            return '';
+        }
+
+        return parent::toJson();
+    }
+
+    /**
+     * Send headers
+     *
+     * If headers are already sent, do nothing. If null ID, send HTTP 204
+     * header. Otherwise, send content type header based on content type of
+     * service map.
+     *
+     * @return void
+     */
+    public function sendHeaders()
+    {
+        if (headers_sent()) {
+            return;
+        }
+
+        if (!$this->isError() && (null === $this->getId())) {
+            header('HTTP/1.1 204 No Content');
+            return;
+        }
+
+        if (null === ($smd = $this->getServiceMap())) {
+            return;
+        }
+
+        $contentType = $smd->getContentType();
+        if (!empty($contentType)) {
+            header('Content-Type: ' . $contentType);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Server.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Server.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Server.php	(revision 5534)
@@ -0,0 +1,564 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+use ReflectionFunction;
+use ReflectionMethod;
+use Zend\Server\AbstractServer;
+use Zend\Server\Definition;
+use Zend\Server\Method;
+use Zend\Server\Reflection;
+
+class Server extends AbstractServer
+{
+    /**#@+
+     * Version Constants
+     */
+    const VERSION_1 = '1.0';
+    const VERSION_2 = '2.0';
+    /**#@-*/
+
+    /**
+     * Flag: whether or not to auto-emit the response
+     * @var bool
+     */
+    protected $returnResponse = false;
+
+    /**
+     * Inherited from Zend\Server\AbstractServer
+     *
+     * @var bool Flag; allow overwriting existing methods when creating server definition
+     */
+    protected $overwriteExistingMethods = true;
+
+    /**
+     * Request object
+     * @var Request
+     */
+    protected $request;
+
+    /**
+     * Response object
+     * @var Response
+     */
+    protected $response;
+
+    /**
+     * SMD object
+     * @var Smd
+     */
+    protected $serviceMap;
+
+    /**
+     * SMD class accessors
+     * @var array
+     */
+    protected $smdMethods;
+
+    /**
+     * Attach a function or callback to the server
+     *
+     * @param  string|array|callable $function   Valid PHP callback
+     * @param  string                $namespace  Ignored
+     * @throws Exception\InvalidArgumentException if function invalid or not callable
+     * @return Server
+     */
+    public function addFunction($function, $namespace = '')
+    {
+        if (!is_string($function) && (!is_array($function) || (2 > count($function)))) {
+            throw new Exception\InvalidArgumentException('Unable to attach function; invalid');
+        }
+
+        if (!is_callable($function)) {
+            throw new Exception\InvalidArgumentException('Unable to attach function; does not exist');
+        }
+
+        $argv = null;
+        if (2 < func_num_args()) {
+            $argv = func_get_args();
+            $argv = array_slice($argv, 2);
+        }
+
+        $class = null;
+        if (is_string($function)) {
+            $method = Reflection::reflectFunction($function, $argv, $namespace);
+        } else {
+            $class  = array_shift($function);
+            $action = array_shift($function);
+            $reflection = Reflection::reflectClass($class, $argv, $namespace);
+            $methods = $reflection->getMethods();
+            $found   = false;
+            foreach ($methods as $method) {
+                if ($action == $method->getName()) {
+                    $found = true;
+                    break;
+                }
+            }
+            if (!$found) {
+                $this->fault('Method not found', Error::ERROR_INVALID_METHOD);
+                return $this;
+            }
+        }
+
+        $definition = $this->_buildSignature($method, $class);
+        $this->_addMethodServiceMap($definition);
+
+        return $this;
+    }
+
+    /**
+     * Register a class with the server
+     *
+     * @param  string $class
+     * @param  string $namespace Ignored
+     * @param  mixed $argv Ignored
+     * @return Server
+     */
+    public function setClass($class, $namespace = '', $argv = null)
+    {
+        if (2 < func_num_args()) {
+            $argv = func_get_args();
+            $argv = array_slice($argv, 2);
+        }
+
+        $reflection = Reflection::reflectClass($class, $argv, $namespace);
+
+        foreach ($reflection->getMethods() as $method) {
+            $definition = $this->_buildSignature($method, $class);
+            $this->_addMethodServiceMap($definition);
+        }
+        return $this;
+    }
+
+    /**
+     * Indicate fault response
+     *
+     * @param  string $fault
+     * @param  int $code
+     * @param  mixed $data
+     * @return Error
+     */
+    public function fault($fault = null, $code = 404, $data = null)
+    {
+        $error = new Error($fault, $code, $data);
+        $this->getResponse()->setError($error);
+        return $error;
+    }
+
+    /**
+     * Handle request
+     *
+     * @param  Request $request
+     * @return null|Response
+     * @throws Exception\InvalidArgumentException
+     */
+    public function handle($request = false)
+    {
+        if ((false !== $request) && (!$request instanceof Request)) {
+            throw new Exception\InvalidArgumentException('Invalid request type provided; cannot handle');
+        } elseif ($request) {
+            $this->setRequest($request);
+        }
+
+        // Handle request
+        $this->_handle();
+
+        // Get response
+        $response = $this->_getReadyResponse();
+
+        // Emit response?
+        if (!$this->returnResponse) {
+            echo $response;
+            return;
+        }
+
+        // or return it?
+        return $response;
+    }
+
+    /**
+     * Load function definitions
+     *
+     * @param  array|Definition $definition
+     * @throws Exception\InvalidArgumentException
+     * @return void
+     */
+    public function loadFunctions($definition)
+    {
+        if (!is_array($definition) && (!$definition instanceof Definition)) {
+            throw new Exception\InvalidArgumentException('Invalid definition provided to loadFunctions()');
+        }
+
+        foreach ($definition as $key => $method) {
+            $this->table->addMethod($method, $key);
+            $this->_addMethodServiceMap($method);
+        }
+    }
+
+    public function setPersistence($mode)
+    {
+    }
+
+    /**
+     * Set request object
+     *
+     * @param  Request $request
+     * @return Server
+     */
+    public function setRequest(Request $request)
+    {
+        $this->request = $request;
+        return $this;
+    }
+
+    /**
+     * Get JSON-RPC request object
+     *
+     * @return Request
+     */
+    public function getRequest()
+    {
+        if (null === ($request = $this->request)) {
+            $this->setRequest(new Request\Http());
+        }
+        return $this->request;
+    }
+
+    /**
+     * Set response object
+     *
+     * @param  Response $response
+     * @return Server
+     */
+    public function setResponse(Response $response)
+    {
+        $this->response = $response;
+        return $this;
+    }
+
+    /**
+     * Get response object
+     *
+     * @return Response
+     */
+    public function getResponse()
+    {
+        if (null === ($response = $this->response)) {
+            $this->setResponse(new Response\Http());
+        }
+        return $this->response;
+    }
+
+    /**
+     * Set return response flag
+     *
+     * If true, {@link handle()} will return the response instead of
+     * automatically sending it back to the requesting client.
+     *
+     * The response is always available via {@link getResponse()}.
+     *
+     * @param  bool $flag
+     * @return Server
+     */
+    public function setReturnResponse($flag = true)
+    {
+        $this->returnResponse = (bool) $flag;
+        return $this;
+    }
+
+    /**
+     * Retrieve return response flag
+     *
+     * @return bool
+     */
+    public function getReturnResponse()
+    {
+        return $this->returnResponse;
+    }
+
+    // overloading for SMD metadata
+    /**
+     * Overload to accessors of SMD object
+     *
+     * @param  string $method
+     * @param  array $args
+     * @return mixed
+     */
+    public function __call($method, $args)
+    {
+        if (preg_match('/^(set|get)/', $method, $matches)) {
+            if (in_array($method, $this->_getSmdMethods())) {
+                if ('set' == $matches[1]) {
+                    $value = array_shift($args);
+                    $this->getServiceMap()->$method($value);
+                    return $this;
+                } else {
+                    return $this->getServiceMap()->$method();
+                }
+            }
+        }
+        return;
+    }
+
+    /**
+     * Retrieve SMD object
+     *
+     * @return Smd
+     */
+    public function getServiceMap()
+    {
+        if (null === $this->serviceMap) {
+            $this->serviceMap = new Smd();
+        }
+        return $this->serviceMap;
+    }
+
+    /**
+     * Add service method to service map
+     *
+     * @param  Method\Definition $method
+     * @return void
+     */
+    protected function _addMethodServiceMap(Method\Definition $method)
+    {
+        $serviceInfo = [
+            'name'   => $method->getName(),
+            'return' => $this->_getReturnType($method),
+        ];
+        $params = $this->_getParams($method);
+        $serviceInfo['params'] = $params;
+        $serviceMap = $this->getServiceMap();
+        if (false !== $serviceMap->getService($serviceInfo['name'])) {
+            $serviceMap->removeService($serviceInfo['name']);
+        }
+        $serviceMap->addService($serviceInfo);
+    }
+
+    /**
+     * Translate PHP type to JSON type
+     *
+     * @param  string $type
+     * @return string
+     */
+    protected function _fixType($type)
+    {
+        return $type;
+    }
+
+    /**
+     * Get default params from signature
+     *
+     * @param  array $args
+     * @param  array $params
+     * @return array
+     */
+    protected function _getDefaultParams(array $args, array $params)
+    {
+        if (false === $this->isAssociative($args)) {
+            $params = array_slice($params, count($args));
+        }
+
+        foreach ($params as $param) {
+            if (isset($args[$param['name']]) || !array_key_exists('default', $param)) {
+                continue;
+            }
+
+            $args[$param['name']] = $param['default'];
+        }
+
+        return $args;
+    }
+
+    /**
+     * check whether array is associative or not
+     *
+     * @param array $array
+     * @return bool
+     */
+    private function isAssociative(array $array)
+    {
+        $keys = array_keys($array);
+
+        return ($keys != array_keys($keys));
+    }
+
+    /**
+     * Get method param type
+     *
+     * @param  Method\Definition $method
+     * @return string|array
+     */
+    protected function _getParams(Method\Definition $method)
+    {
+        $params = [];
+        foreach ($method->getPrototypes() as $prototype) {
+            foreach ($prototype->getParameterObjects() as $key => $parameter) {
+                if (!isset($params[$key])) {
+                    $params[$key] = [
+                        'type'     => $parameter->getType(),
+                        'name'     => $parameter->getName(),
+                        'optional' => $parameter->isOptional(),
+                    ];
+                    if (null !== ($default = $parameter->getDefaultValue())) {
+                        $params[$key]['default'] = $default;
+                    }
+                    $description = $parameter->getDescription();
+                    if (!empty($description)) {
+                        $params[$key]['description'] = $description;
+                    }
+                    continue;
+                }
+                $newType = $parameter->getType();
+                if (!is_array($params[$key]['type'])) {
+                    if ($params[$key]['type'] == $newType) {
+                        continue;
+                    }
+                    $params[$key]['type'] = (array) $params[$key]['type'];
+                } elseif (in_array($newType, $params[$key]['type'])) {
+                    continue;
+                }
+                array_push($params[$key]['type'], $parameter->getType());
+            }
+        }
+        return $params;
+    }
+
+    /**
+     * Set response state
+     *
+     * @return Response
+     */
+    protected function _getReadyResponse()
+    {
+        $request  = $this->getRequest();
+        $response = $this->getResponse();
+
+        $response->setServiceMap($this->getServiceMap());
+        if (null !== ($id = $request->getId())) {
+            $response->setId($id);
+        }
+        if (null !== ($version = $request->getVersion())) {
+            $response->setVersion($version);
+        }
+
+        return $response;
+    }
+
+    /**
+     * Get method return type
+     *
+     * @param  Method\Definition $method
+     * @return string|array
+     */
+    protected function _getReturnType(Method\Definition $method)
+    {
+        $return = [];
+        foreach ($method->getPrototypes() as $prototype) {
+            $return[] = $prototype->getReturnType();
+        }
+        if (1 == count($return)) {
+            return $return[0];
+        }
+        return $return;
+    }
+
+    /**
+     * Retrieve list of allowed SMD methods for proxying
+     *
+     * @return array
+     */
+    protected function _getSmdMethods()
+    {
+        if (null === $this->smdMethods) {
+            $this->smdMethods = [];
+            $methods = get_class_methods('Zend\\Json\\Server\\Smd');
+            foreach ($methods as $method) {
+                if (!preg_match('/^(set|get)/', $method)) {
+                    continue;
+                }
+                if (strstr($method, 'Service')) {
+                    continue;
+                }
+                $this->smdMethods[] = $method;
+            }
+        }
+        return $this->smdMethods;
+    }
+
+    /**
+     * Internal method for handling request
+     *
+     * @return void
+     */
+    protected function _handle()
+    {
+        $request = $this->getRequest();
+
+        if ($request->isParseError()) {
+            return $this->fault('Parse error', Error::ERROR_PARSE);
+        }
+
+        if (!$request->isMethodError() && (null === $request->getMethod())) {
+            return $this->fault('Invalid Request', Error::ERROR_INVALID_REQUEST);
+        }
+
+        if ($request->isMethodError()) {
+            return $this->fault('Invalid Request', Error::ERROR_INVALID_REQUEST);
+        }
+
+        $method = $request->getMethod();
+        if (!$this->table->hasMethod($method)) {
+            return $this->fault('Method not found', Error::ERROR_INVALID_METHOD);
+        }
+
+        $params        = $request->getParams();
+        $invokable     = $this->table->getMethod($method);
+        $serviceMap    = $this->getServiceMap();
+        $service       = $serviceMap->getService($method);
+        $serviceParams = $service->getParams();
+
+        if (count($params) < count($serviceParams)) {
+            $params = $this->_getDefaultParams($params, $serviceParams);
+        }
+
+        //Make sure named parameters are passed in correct order
+        if (is_string(key($params))) {
+            $callback = $invokable->getCallback();
+            if ('function' == $callback->getType()) {
+                $reflection = new ReflectionFunction($callback->getFunction());
+            } else {
+                $reflection = new ReflectionMethod(
+                    $callback->getClass(),
+                    $callback->getMethod()
+                );
+            }
+
+            $orderedParams = [];
+            foreach ($reflection->getParameters() as $refParam) {
+                if (array_key_exists($refParam->getName(), $params)) {
+                    $orderedParams[$refParam->getName()] = $params[$refParam->getName()];
+                } elseif ($refParam->isOptional()) {
+                    $orderedParams[$refParam->getName()] = null;
+                } else {
+                    return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS);
+                }
+            }
+            $params = $orderedParams;
+        }
+
+        try {
+            $result = $this->_dispatch($invokable, $params);
+        } catch (\Exception $e) {
+            return $this->fault($e->getMessage(), $e->getCode(), $e);
+        }
+
+        $this->getResponse()->setResult($result);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Smd.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Smd.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Smd.php	(revision 5534)
@@ -0,0 +1,461 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server;
+
+use Zend\Json\Server\Exception\InvalidArgumentException;
+use Zend\Json\Server\Exception\RuntimeException;
+
+class Smd
+{
+    const ENV_JSONRPC_1 = 'JSON-RPC-1.0';
+    const ENV_JSONRPC_2 = 'JSON-RPC-2.0';
+    const SMD_VERSION   = '2.0';
+
+    /**
+     * Content type
+     * @var string
+     */
+    protected $contentType = 'application/json';
+
+    /**
+     * Content type regex
+     * @var string
+     */
+    protected $contentTypeRegex = '#[a-z]+/[a-z][a-z-]+#i';
+
+    /**
+     * Service description
+     * @var string
+     */
+    protected $description;
+
+    /**
+     * Generate Dojo-compatible SMD
+     * @var bool
+     */
+    protected $dojoCompatible = false;
+
+    /**
+     * Current envelope
+     * @var string
+     */
+    protected $envelope = self::ENV_JSONRPC_1;
+
+    /**
+     * Allowed envelope types
+     * @var array
+     */
+    protected $envelopeTypes = [
+        self::ENV_JSONRPC_1,
+        self::ENV_JSONRPC_2,
+    ];
+
+    /**
+     * Service id
+     * @var string
+     */
+    protected $id;
+
+    /**
+     * Services offered
+     * @var array
+     */
+    protected $services = [];
+
+    /**
+     * Service target
+     * @var string
+     */
+    protected $target;
+
+    /**
+     * Global transport
+     * @var string
+     */
+    protected $transport = 'POST';
+
+    /**
+     * Allowed transport types
+     * @var array
+     */
+    protected $transportTypes = ['POST'];
+
+    /**
+     * Set object state via options
+     *
+     * @param  array $options
+     * @return Smd
+     */
+    public function setOptions(array $options)
+    {
+        foreach ($options as $key => $value) {
+            $method = 'set' . ucfirst($key);
+            if (method_exists($this, $method)) {
+                $this->$method($value);
+            }
+        }
+        return $this;
+    }
+
+    /**
+     * Set transport
+     *
+     * @param  string $transport
+     * @throws Exception\InvalidArgumentException
+     * @return \Zend\Json\Server\Smd
+     */
+    public function setTransport($transport)
+    {
+        if (!in_array($transport, $this->transportTypes)) {
+            throw new InvalidArgumentException("Invalid transport '{$transport}' specified");
+        }
+        $this->transport = $transport;
+        return $this;
+    }
+
+    /**
+     * Get transport
+     *
+     * @return string
+     */
+    public function getTransport()
+    {
+        return $this->transport;
+    }
+
+    /**
+     * Set envelope
+     *
+     * @param  string $envelopeType
+     * @throws Exception\InvalidArgumentException
+     * @return Smd
+     */
+    public function setEnvelope($envelopeType)
+    {
+        if (!in_array($envelopeType, $this->envelopeTypes)) {
+            throw new InvalidArgumentException("Invalid envelope type '{$envelopeType}'");
+        }
+        $this->envelope = $envelopeType;
+        return $this;
+    }
+
+    /**
+     * Retrieve envelope
+     *
+     * @return string
+     */
+    public function getEnvelope()
+    {
+        return $this->envelope;
+    }
+
+    // Content-Type of response; default to application/json
+    /**
+     * Set content type
+     *
+     * @param  string $type
+     * @throws Exception\InvalidArgumentException
+     * @return \Zend\Json\Server\Smd
+     */
+    public function setContentType($type)
+    {
+        if (!preg_match($this->contentTypeRegex, $type)) {
+            throw new InvalidArgumentException("Invalid content type '{$type}' specified");
+        }
+        $this->contentType = $type;
+        return $this;
+    }
+
+    /**
+     * Retrieve content type
+     *
+     * @return string
+     */
+    public function getContentType()
+    {
+        return $this->contentType;
+    }
+
+    /**
+     * Set service target
+     *
+     * @param  string $target
+     * @return Smd
+     */
+    public function setTarget($target)
+    {
+        $this->target = (string) $target;
+        return $this;
+    }
+
+    /**
+     * Retrieve service target
+     *
+     * @return string
+     */
+    public function getTarget()
+    {
+        return $this->target;
+    }
+
+    /**
+     * Set service ID
+     *
+     * @param  string $id
+     * @return Smd
+     */
+    public function setId($id)
+    {
+        $this->id = (string) $id;
+        return $this->id;
+    }
+
+    /**
+     * Get service id
+     *
+     * @return string
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * Set service description
+     *
+     * @param  string $description
+     * @return Smd
+     */
+    public function setDescription($description)
+    {
+        $this->description = (string) $description;
+        return $this->description;
+    }
+
+    /**
+     * Get service description
+     *
+     * @return string
+     */
+    public function getDescription()
+    {
+        return $this->description;
+    }
+
+    /**
+     * Indicate whether or not to generate Dojo-compatible SMD
+     *
+     * @param  bool $flag
+     * @return Smd
+     */
+    public function setDojoCompatible($flag)
+    {
+        $this->dojoCompatible = (bool) $flag;
+        return $this;
+    }
+
+    /**
+     * Is this a Dojo compatible SMD?
+     *
+     * @return bool
+     */
+    public function isDojoCompatible()
+    {
+        return $this->dojoCompatible;
+    }
+
+    /**
+     * Add Service
+     *
+     * @param Smd\Service|array $service
+     * @throws Exception\RuntimeException
+     * @throws Exception\InvalidArgumentException
+     * @return Smd
+     */
+    public function addService($service)
+    {
+        if ($service instanceof Smd\Service) {
+            $name = $service->getName();
+        } elseif (is_array($service)) {
+            $service = new Smd\Service($service);
+            $name = $service->getName();
+        } else {
+            throw new InvalidArgumentException('Invalid service passed to addService()');
+        }
+
+        if (array_key_exists($name, $this->services)) {
+            throw new RuntimeException('Attempt to register a service already registered detected');
+        }
+        $this->services[$name] = $service;
+        return $this;
+    }
+
+    /**
+     * Add many services
+     *
+     * @param  array $services
+     * @return Smd
+     */
+    public function addServices(array $services)
+    {
+        foreach ($services as $service) {
+            $this->addService($service);
+        }
+        return $this;
+    }
+
+    /**
+     * Overwrite existing services with new ones
+     *
+     * @param  array $services
+     * @return Smd
+     */
+    public function setServices(array $services)
+    {
+        $this->services = [];
+        return $this->addServices($services);
+    }
+
+    /**
+     * Get service object
+     *
+     * @param  string $name
+     * @return bool|Smd\Service
+     */
+    public function getService($name)
+    {
+        if (array_key_exists($name, $this->services)) {
+            return $this->services[$name];
+        }
+        return false;
+    }
+
+    /**
+     * Return services
+     *
+     * @return array
+     */
+    public function getServices()
+    {
+        return $this->services;
+    }
+
+    /**
+     * Remove service
+     *
+     * @param  string $name
+     * @return bool
+     */
+    public function removeService($name)
+    {
+        if (array_key_exists($name, $this->services)) {
+            unset($this->services[$name]);
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Cast to array
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        if ($this->isDojoCompatible()) {
+            return $this->toDojoArray();
+        }
+
+        $description = $this->getDescription();
+        $transport   = $this->getTransport();
+        $envelope    = $this->getEnvelope();
+        $contentType = $this->getContentType();
+        $SMDVersion  = static::SMD_VERSION;
+        $service = compact('transport', 'envelope', 'contentType', 'SMDVersion', 'description');
+
+        if (null !== ($target = $this->getTarget())) {
+            $service['target']     = $target;
+        }
+        if (null !== ($id = $this->getId())) {
+            $service['id'] = $id;
+        }
+
+        $services = $this->getServices();
+        if (!empty($services)) {
+            $service['services'] = [];
+            foreach ($services as $name => $svc) {
+                $svc->setEnvelope($envelope);
+                $service['services'][$name] = $svc->toArray();
+            }
+            $service['methods'] = $service['services'];
+        }
+
+        return $service;
+    }
+
+    /**
+     * Export to DOJO-compatible SMD array
+     *
+     * @return array
+     */
+    public function toDojoArray()
+    {
+        $SMDVersion  = '.1';
+        $serviceType = 'JSON-RPC';
+        $service = compact('SMDVersion', 'serviceType');
+
+        $target = $this->getTarget();
+
+        $services = $this->getServices();
+        if (!empty($services)) {
+            $service['methods'] = [];
+            foreach ($services as $name => $svc) {
+                $method = [
+                    'name'       => $name,
+                    'serviceURL' => $target,
+                ];
+                $params = [];
+                foreach ($svc->getParams() as $param) {
+                    $paramName = array_key_exists('name', $param) ? $param['name'] : $param['type'];
+                    $params[] = [
+                        'name' => $paramName,
+                        'type' => $param['type'],
+                    ];
+                }
+                if (!empty($params)) {
+                    $method['parameters'] = $params;
+                }
+                $service['methods'][] = $method;
+            }
+        }
+
+        return $service;
+    }
+
+    /**
+     * Cast to JSON
+     *
+     * @return string
+     */
+    public function toJson()
+    {
+        return \Zend\Json\Json::encode($this->toArray());
+    }
+
+    /**
+     * Cast to string (JSON)
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->toJson();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Smd/Service.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Smd/Service.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-json/src/Server/Smd/Service.php	(revision 5534)
@@ -0,0 +1,465 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Json\Server\Smd;
+
+use Zend\Json\Server\Exception\InvalidArgumentException;
+use Zend\Json\Server\Smd;
+
+/**
+ * Create Service Mapping Description for a method
+ *
+ * @todo       Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions?
+ */
+class Service
+{
+    /**#@+
+     * Service metadata
+     * @var string
+     */
+    protected $envelope  = Smd::ENV_JSONRPC_1;
+    protected $name;
+    protected $return;
+    protected $target;
+    protected $transport = 'POST';
+    /**#@-*/
+
+    /**
+     * Allowed envelope types
+     * @var array
+     */
+    protected $envelopeTypes = [
+        Smd::ENV_JSONRPC_1,
+        Smd::ENV_JSONRPC_2,
+    ];
+
+    /**
+     * Regex for names
+     * @var string
+     *
+     * @link http://php.net/manual/en/language.oop5.basic.php
+     * @link http://www.jsonrpc.org/specification#request_object
+     */
+    protected $nameRegex = '/^(?!^rpc\.)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff\.\\\]*$/';
+
+    /**
+     * Parameter option types
+     * @var array
+     */
+    protected $paramOptionTypes = [
+        'name'        => 'is_string',
+        'optional'    => 'is_bool',
+        'default'     => null,
+        'description' => 'is_string',
+    ];
+
+    /**
+     * Service params
+     * @var array
+     */
+    protected $params = [];
+
+    /**
+     * Mapping of parameter types to JSON-RPC types
+     * @var array
+     */
+    protected $paramMap = [
+        'any'     => 'any',
+        'arr'     => 'array',
+        'array'   => 'array',
+        'assoc'   => 'object',
+        'bool'    => 'boolean',
+        'boolean' => 'boolean',
+        'dbl'     => 'float',
+        'double'  => 'float',
+        'false'   => 'boolean',
+        'float'   => 'float',
+        'hash'    => 'object',
+        'integer' => 'integer',
+        'int'     => 'integer',
+        'mixed'   => 'any',
+        'nil'     => 'null',
+        'null'    => 'null',
+        'object'  => 'object',
+        'string'  => 'string',
+        'str'     => 'string',
+        'struct'  => 'object',
+        'true'    => 'boolean',
+        'void'    => 'null',
+    ];
+
+    /**
+     * Allowed transport types
+     * @var array
+     */
+    protected $transportTypes = [
+        'POST',
+    ];
+
+    /**
+     * Constructor
+     *
+     * @param  string|array             $spec
+     * @throws InvalidArgumentException if no name provided
+     */
+    public function __construct($spec)
+    {
+        if (is_string($spec)) {
+            $this->setName($spec);
+        } elseif (is_array($spec)) {
+            $this->setOptions($spec);
+        }
+
+        if (null == $this->getName()) {
+            throw new InvalidArgumentException('SMD service description requires a name; none provided');
+        }
+    }
+
+    /**
+     * Set object state
+     *
+     * @param  array   $options
+     * @return Service
+     */
+    public function setOptions(array $options)
+    {
+        $methods = get_class_methods($this);
+        foreach ($options as $key => $value) {
+            if ('options' == strtolower($key)) {
+                continue;
+            }
+            $method = 'set' . ucfirst($key);
+            if (in_array($method, $methods)) {
+                $this->$method($value);
+            }
+        }
+
+        return $this;
+    }
+
+    /**
+     * Set service name
+     *
+     * @param  string                   $name
+     * @return Service
+     * @throws InvalidArgumentException
+     */
+    public function setName($name)
+    {
+        $name = (string) $name;
+        if (!preg_match($this->nameRegex, $name)) {
+            throw new InvalidArgumentException("Invalid name '{$name} provided for service; must follow PHP method naming conventions");
+        }
+        $this->name = $name;
+
+        return $this;
+    }
+
+    /**
+     * Retrieve name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    /**
+     * Set Transport
+     *
+     * Currently limited to POST
+     *
+     * @param  string                   $transport
+     * @throws InvalidArgumentException
+     * @return Service
+     */
+    public function setTransport($transport)
+    {
+        if (!in_array($transport, $this->transportTypes)) {
+            throw new InvalidArgumentException("Invalid transport '{$transport}'; please select one of (" . implode(', ', $this->transportTypes) . ')');
+        }
+
+        $this->transport = $transport;
+
+        return $this;
+    }
+
+    /**
+     * Get transport
+     *
+     * @return string
+     */
+    public function getTransport()
+    {
+        return $this->transport;
+    }
+
+    /**
+     * Set service target
+     *
+     * @param  string  $target
+     * @return Service
+     */
+    public function setTarget($target)
+    {
+        $this->target = (string) $target;
+
+        return $this;
+    }
+
+    /**
+     * Get service target
+     *
+     * @return string
+     */
+    public function getTarget()
+    {
+        return $this->target;
+    }
+
+    /**
+     * Set envelope type
+     *
+     * @param  string                   $envelopeType
+     * @throws InvalidArgumentException
+     * @return Service
+     */
+    public function setEnvelope($envelopeType)
+    {
+        if (!in_array($envelopeType, $this->envelopeTypes)) {
+            throw new InvalidArgumentException("Invalid envelope type '{$envelopeType}'; please specify one of (" . implode(', ', $this->envelopeTypes) . ')');
+        }
+
+        $this->envelope = $envelopeType;
+
+        return $this;
+    }
+
+    /**
+     * Get envelope type
+     *
+     * @return string
+     */
+    public function getEnvelope()
+    {
+        return $this->envelope;
+    }
+
+    /**
+     * Add a parameter to the service
+     *
+     * @param  string|array             $type
+     * @param  array                    $options
+     * @param  int|null                 $order
+     * @throws InvalidArgumentException
+     * @return Service
+     */
+    public function addParam($type, array $options = [], $order = null)
+    {
+        if (is_string($type)) {
+            $type = $this->_validateParamType($type);
+        } elseif (is_array($type)) {
+            foreach ($type as $key => $paramType) {
+                $type[$key] = $this->_validateParamType($paramType);
+            }
+        } else {
+            throw new InvalidArgumentException('Invalid param type provided');
+        }
+
+        $paramOptions = [
+            'type' => $type,
+        ];
+        foreach ($options as $key => $value) {
+            if (in_array($key, array_keys($this->paramOptionTypes))) {
+                if (null !== ($callback = $this->paramOptionTypes[$key])) {
+                    if (!$callback($value)) {
+                        continue;
+                    }
+                }
+                $paramOptions[$key] = $value;
+            }
+        }
+
+        $this->params[] = [
+            'param' => $paramOptions,
+            'order' => $order,
+        ];
+
+        return $this;
+    }
+
+    /**
+     * Add params
+     *
+     * Each param should be an array, and should include the key 'type'.
+     *
+     * @param  array   $params
+     * @return Service
+     */
+    public function addParams(array $params)
+    {
+        ksort($params);
+        foreach ($params as $options) {
+            if (!is_array($options)) {
+                continue;
+            }
+            if (!array_key_exists('type', $options)) {
+                continue;
+            }
+            $type  = $options['type'];
+            $order = (array_key_exists('order', $options)) ? $options['order'] : null;
+            $this->addParam($type, $options, $order);
+        }
+
+        return $this;
+    }
+
+    /**
+     * Overwrite all parameters
+     *
+     * @param  array   $params
+     * @return Service
+     */
+    public function setParams(array $params)
+    {
+        $this->params = [];
+
+        return $this->addParams($params);
+    }
+
+    /**
+     * Get all parameters
+     *
+     * Returns all params in specified order.
+     *
+     * @return array
+     */
+    public function getParams()
+    {
+        $params = [];
+        $index  = 0;
+        foreach ($this->params as $param) {
+            if (null === $param['order']) {
+                if (array_search($index, array_keys($params), true)) {
+                    ++$index;
+                }
+                $params[$index] = $param['param'];
+                ++$index;
+            } else {
+                $params[$param['order']] = $param['param'];
+            }
+        }
+        ksort($params);
+
+        return $params;
+    }
+
+    /**
+     * Set return type
+     *
+     * @param  string|array             $type
+     * @throws InvalidArgumentException
+     * @return Service
+     */
+    public function setReturn($type)
+    {
+        if (is_string($type)) {
+            $type = $this->_validateParamType($type, true);
+        } elseif (is_array($type)) {
+            foreach ($type as $key => $returnType) {
+                $type[$key] = $this->_validateParamType($returnType, true);
+            }
+        } else {
+            throw new InvalidArgumentException("Invalid param type provided ('" . gettype($type) . "')");
+        }
+        $this->return = $type;
+
+        return $this;
+    }
+
+    /**
+     * Get return type
+     *
+     * @return string|array
+     */
+    public function getReturn()
+    {
+        return $this->return;
+    }
+
+    /**
+     * Cast service description to array
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $envelope   = $this->getEnvelope();
+        $target     = $this->getTarget();
+        $transport  = $this->getTransport();
+        $parameters = $this->getParams();
+        $returns    = $this->getReturn();
+        $name       = $this->getName();
+
+        if (empty($target)) {
+            return compact('envelope', 'transport', 'name', 'parameters', 'returns');
+        }
+
+        return compact('envelope', 'target', 'transport', 'name', 'parameters', 'returns');
+    }
+
+    /**
+     * Return JSON encoding of service
+     *
+     * @return string
+     */
+    public function toJson()
+    {
+        $service = [$this->getName() => $this->toArray()];
+
+        return \Zend\Json\Json::encode($service);
+    }
+
+    /**
+     * Cast to string
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->toJson();
+    }
+
+    /**
+     * Validate parameter type
+     *
+     * @param  string                   $type
+     * @param  bool                     $isReturn
+     * @return string
+     * @throws InvalidArgumentException
+     */
+    protected function _validateParamType($type, $isReturn = false)
+    {
+        if (!is_string($type)) {
+            throw new InvalidArgumentException("Invalid param type provided ('{$type}')");
+        }
+
+        if (!array_key_exists($type, $this->paramMap)) {
+            $type = 'object';
+        }
+
+        $paramType = $this->paramMap[$type];
+        if (!$isReturn && ('null' == $paramType)) {
+            throw new InvalidArgumentException("Invalid param type provided ('{$type}')");
+        }
+
+        return $paramType;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,163 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 2.7.5 - 2016-02-02
+
+### Added
+
+- [#81](https://github.com/zendframework/zend-servicemanager/pull/81) adds a
+  test covering forwards-compatibility features for plugin manager
+  implementations.
+- [#96](https://github.com/zendframework/zend-servicemanager/pull/96) adds
+  `Zend\ServiceManager\Test\CommonPluginManagerTrait`, which allows you to test
+  that your plugin manager is forwards compatible with v3.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#91](https://github.com/zendframework/zend-servicemanager/pull/91) updates
+  the `InvokableFactory` to add the `setCreationOptions()` method, allowing
+  the `InvokableFactory` to accept `$options` when triggered.
+
+## 2.7.4 - 2015-01-19
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#71](https://github.com/zendframework/zend-servicemanager/pull/71) fixes an edge case
+  with alias usage, whereby an alias of an alias was not being resolved to the
+  final service name.
+
+## 2.7.3 - 2016-01-13
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#69](https://github.com/zendframework/zend-servicemanager/pull/69) fixes the
+  way aliases are resolved to ensure that the original alias target, without
+  canonicalization is passed to factories and abstract factories, ensuring that
+  features such as the `InvokableFactory` implementation can work.
+
+## 2.7.2 - 2016-01-11
+
+### Added
+
+- [#63](https://github.com/zendframework/zend-servicemanager/pull/63) adds a
+  constructor to `InvokableFactory`. In v2, this allows plugin managers to pass
+  construction options to the factory to use during instantiation of the
+  requested service class, emulating the behavior of `build()` in v3.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
+## 2.7.1 - 2016-01-11
+
+### Added
+
+- [#61](https://github.com/zendframework/zend-servicemanager/pull/61) adds
+  `Zend\ServiceManager\Exception\InvalidServiceException` for forwards
+  compatibility with v3.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#61](https://github.com/zendframework/zend-servicemanager/pull/61) updates
+  the `InvokableFactory` to throw `InvalidServiceException` instead of
+  `InvalidServiceNameException`, for forwards compatibility with v3.
+- [#61](https://github.com/zendframework/zend-servicemanager/pull/61) fixes
+  the behavior of `InvokableFactory` when invoked after resolving an alias.
+
+## 2.7.0 - 2016-01-11
+
+### Added
+
+- [#60](https://github.com/zendframework/zend-servicemanager/pull/60) adds
+  forward compatibility features for `AbstractPluingManager` and introduces
+  `InvokableFactory` to help forward migration to version 3.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#46](https://github.com/zendframework/zend-servicemanager/pull/46) updates
+  the exception hierarchy to inherit from the container-interop exceptions.
+  This ensures that all exceptions thrown by the component follow the
+  recommendations of that project.
+- [#52](https://github.com/zendframework/zend-servicemanager/pull/52) fixes
+  the exception message thrown by `ServiceManager::setFactory()` to remove
+  references to abstract factories.
+
+## 2.6.0 - 2015-07-23
+
+### Added
+
+- [#4](https://github.com/zendframework/zend-servicemanager/pull/4) updates the
+    `ServiceManager` to [implement the container-interop interface](https://github.com/container-interop/container-interop),
+    allowing interoperability with applications that consume that interface.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#3](https://github.com/zendframework/zend-servicemanager/pull/3) properly updates the
+  codebase to PHP 5.5, by taking advantage of the default closure binding
+  (`$this` in a closure is the invoking object when created within a method). It
+  also removes several `@requires PHP 5.4.0` annotations.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,229 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-servicemanager/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-servicemanager.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
+standards checks, and provides configuration for our selected checks.
+`php-cs-fixer` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
+```
+
+To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
+flag:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
+```
+
+If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-servicemanager)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-servicemanager.git
+   $ cd zend-servicemanager
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-servicemanager.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-servicemanager.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/README.md	(revision 5534)
@@ -0,0 +1,12 @@
+# zend-servicemanager
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-servicemanager.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-servicemanager)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-servicemanager/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-servicemanager?branch=master)
+
+The Service Locator design pattern is implemented by the `Zend\ServiceManager`
+component. The Service Locator is a service/object locator, tasked with
+retrieving other objects.
+
+
+- File issues at https://github.com/zendframework/zend-servicemanager/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-servicemanager
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/AbstractFactoryFoo.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/AbstractFactoryFoo.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/AbstractFactoryFoo.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+namespace ZendBench\ServiceManager\BenchAsset;
+
+use Zend\ServiceManager\AbstractFactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class AbstractFactoryFoo implements AbstractFactoryInterface
+{
+  public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
+  {
+      if ($name != 'foo') {
+          return false;
+      }
+      return true;
+  }
+
+    public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
+    {
+        return new Foo();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/FactoryFoo.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/FactoryFoo.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/FactoryFoo.php	(revision 5534)
@@ -0,0 +1,13 @@
+<?php
+namespace ZendBench\ServiceManager\BenchAsset;
+
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class FactoryFoo implements FactoryInterface
+{
+    public function createService(ServiceLocatorInterface $serviceLocator)
+    {
+        return new Foo();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/Foo.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/Foo.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/BenchAsset/Foo.php	(revision 5534)
@@ -0,0 +1,12 @@
+<?php
+namespace ZendBench\ServiceManager\BenchAsset;
+
+class Foo
+{
+    protected $options;
+
+    public function __construct($options = null)
+    {
+        $this->options = $options;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/FetchServices.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/FetchServices.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/benchmarks/FetchServices.php	(revision 5534)
@@ -0,0 +1,85 @@
+<?php
+
+namespace ZendBench\ServiceManager;
+
+use Athletic\AthleticEvent;
+use Zend\ServiceManager\ServiceManager;
+use Zend\ServiceManager\Config;
+
+class FetchServices extends AthleticEvent
+{
+    const NUM_SERVICES = 1000;
+
+    /**
+     * @var ServiceManager
+     */
+    protected $sm;
+
+    protected function getConfig()
+    {
+        $config = [];
+        for ($i = 0; $i <= self::NUM_SERVICES; $i++) {
+            $config['factories']["factory_$i"]    = BenchAsset\FactoryFoo::class;
+            $config['invokables']["invokable_$i"] = BenchAsset\Foo::class;
+            $config['services']["service_$i"]     = $this;
+            $config['aliases']["alias_$i"]        = "service_$i";
+        }
+        $config['abstract_factories'] = [ BenchAsset\AbstractFactoryFoo::class ];
+        return $config;
+    }
+
+    public function classSetUp()
+    {
+        $this->sm = new ServiceManager(new Config($this->getConfig()));
+    }
+
+    /**
+     * Fetch the factory services
+     *
+     * @iterations 5000
+     */
+    public function fetchFactoryService()
+    {
+        $result = $this->sm->get('factory_' . rand(0, self::NUM_SERVICES));
+    }
+
+    /**
+     * Fetch the invokable services
+     *
+     * @iterations 5000
+     */
+    public function fetchInvokableService()
+    {
+        $result = $this->sm->get('invokable_' . rand(0, self::NUM_SERVICES));
+    }
+
+    /**
+     * Fetch the services
+     *
+     * @iterations 5000
+     */
+    public function fetchService()
+    {
+        $result = $this->sm->get('service_' . rand(0, self::NUM_SERVICES));
+    }
+
+    /**
+     * Fetch the alias services
+     *
+     * @iterations 5000
+     */
+    public function fetchAliasService()
+    {
+        $result = $this->sm->get('alias_' . rand(0, self::NUM_SERVICES));
+    }
+
+    /**
+     * Fetch the abstract factory services
+     *
+     * @iterations 5000
+     */
+    public function fetchAbstractFactoryService()
+    {
+        $result = $this->sm->get('foo');
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/composer.json	(revision 5534)
@@ -0,0 +1,44 @@
+{
+    "name": "zendframework/zend-servicemanager",
+    "description": " ",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "servicemanager"
+    ],
+    "homepage": "https://github.com/zendframework/zend-servicemanager",
+    "autoload": {
+        "psr-4": {
+            "Zend\\ServiceManager\\": "src/"
+        }
+    },
+    "require": {
+        "php": "^5.5 || ^7.0",
+        "container-interop/container-interop": "~1.0"
+    },
+    "require-dev": {
+        "zendframework/zend-di": "~2.5",
+        "zendframework/zend-mvc": "~2.5",
+        "fabpot/php-cs-fixer": "1.7.*",
+        "phpunit/PHPUnit": "~4.0",
+        "athletic/athletic": "dev-master"
+    },
+    "suggest": {
+        "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services",
+        "zendframework/zend-di": "Zend\\Di component"
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.7-dev",
+            "dev-develop": "3.0-dev"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\ServiceManager\\": "test/",
+            "ZendBench\\ServiceManager\\": "benchmarks/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/AbstractFactoryInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/AbstractFactoryInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/AbstractFactoryInterface.php	(revision 5534)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface AbstractFactoryInterface
+{
+    /**
+     * Determine if we can create a service with name
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @param $name
+     * @param $requestedName
+     * @return bool
+     */
+    public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName);
+
+    /**
+     * Create service with name
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @param $name
+     * @param $requestedName
+     * @return mixed
+     */
+    public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php	(revision 5534)
@@ -0,0 +1,363 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+use Interop\Container\ContainerInterface;
+use Exception as BaseException;
+
+/**
+ * ServiceManager implementation for managing plugins
+ *
+ * Automatically registers an initializer which should be used to verify that
+ * a plugin instance is of a valid type. Additionally, allows plugins to accept
+ * an array of options for the constructor, which can be used to configure
+ * the plugin when retrieved. Finally, enables the allowOverride property by
+ * default to allow registering factories, aliases, and invokables to take
+ * the place of those provided by the implementing class.
+ */
+abstract class AbstractPluginManager extends ServiceManager implements ServiceLocatorAwareInterface
+{
+    /**
+     * Allow overriding by default
+     *
+     * @var bool
+     */
+    protected $allowOverride = true;
+
+    /**
+     * Whether or not to auto-add a class as an invokable class if it exists
+     *
+     * @var bool
+     */
+    protected $autoAddInvokableClass = true;
+
+    /**
+     * Options to use when creating an instance
+     *
+     * @var mixed
+     */
+    protected $creationOptions = null;
+
+    /**
+     * The main service locator
+     *
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator;
+
+    /**
+     * Constructor
+     *
+     * Add a default initializer to ensure the plugin is valid after instance
+     * creation.
+     *
+     * Additionally, the constructor provides forwards compatibility with v3 by
+     * overloading the initial argument. v2 usage expects either null or a
+     * ConfigInterface instance, and will ignore any other arguments. v3 expects
+     * a ContainerInterface instance, and will use an array of configuration to
+     * seed the current instance with services. In most cases, you can ignore the
+     * constructor unless you are writing a specialized factory for your plugin
+     * manager or overriding it.
+     *
+     * @param null|ConfigInterface|ContainerInterface $configOrContainerInstance
+     * @param array $v3config If $configOrContainerInstance is a container, this
+     *     value will be passed to the parent constructor.
+     * @throws Exception\InvalidArgumentException if $configOrContainerInstance
+     *     is neither null, nor a ConfigInterface, nor a ContainerInterface.
+     */
+    public function __construct($configOrContainerInstance = null, array $v3config = [])
+    {
+        if (null !== $configOrContainerInstance
+            && ! $configOrContainerInstance instanceof ConfigInterface
+            && ! $configOrContainerInstance instanceof ContainerInterface
+        ) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                '%s expects a ConfigInterface instance or ContainerInterface instance; received %s',
+                get_class($this),
+                (is_object($configOrContainerInstance)
+                    ? get_class($configOrContainerInstance)
+                    : gettype($configOrContainerInstance)
+                )
+            ));
+        }
+
+        if ($configOrContainerInstance instanceof ContainerInterface) {
+            if (property_exists($this, 'serviceLocator')) {
+                if (! empty($v3config)) {
+                    parent::__construct(new Config($v3config));
+                }
+                $this->serviceLocator = $configOrContainerInstance;
+            }
+
+            if (property_exists($this, 'creationContext')) {
+                if (! empty($v3config)) {
+                    parent::__construct($v3config);
+                }
+                $this->creationContext = $configOrContainerInstance;
+            }
+        }
+
+        if ($configOrContainerInstance instanceof ConfigInterface) {
+            parent::__construct($configOrContainerInstance);
+        }
+
+        $this->addInitializer(function ($instance) {
+            if ($instance instanceof ServiceLocatorAwareInterface) {
+                $instance->setServiceLocator($this);
+            }
+        });
+    }
+
+    /**
+     * Validate the plugin
+     *
+     * Checks that the filter loaded is either a valid callback or an instance
+     * of FilterInterface.
+     *
+     * @param  mixed                      $plugin
+     * @return void
+     * @throws Exception\RuntimeException if invalid
+     */
+    abstract public function validatePlugin($plugin);
+
+    /**
+     * Retrieve a service from the manager by name
+     *
+     * Allows passing an array of options to use when creating the instance.
+     * createFromInvokable() will use these and pass them to the instance
+     * constructor if not null and a non-empty array.
+     *
+     * @param  string $name
+     * @param  array  $options
+     * @param  bool   $usePeeringServiceManagers
+     *
+     * @return object
+     *
+     * @throws Exception\ServiceNotFoundException
+     * @throws Exception\ServiceNotCreatedException
+     * @throws Exception\RuntimeException
+     */
+    public function get($name, $options = [], $usePeeringServiceManagers = true)
+    {
+        $isAutoInvokable = false;
+
+        // Allow specifying a class name directly; registers as an invokable class
+        if (!$this->has($name) && $this->autoAddInvokableClass && class_exists($name)) {
+            $isAutoInvokable = true;
+
+            $this->setInvokableClass($name, $name);
+        }
+
+        $this->creationOptions = $options;
+
+        try {
+            $instance = parent::get($name, $usePeeringServiceManagers);
+        } catch (Exception\ServiceNotFoundException $exception) {
+            $this->tryThrowingServiceLocatorUsageException($name, $isAutoInvokable, $exception);
+        } catch (Exception\ServiceNotCreatedException $exception) {
+            $this->tryThrowingServiceLocatorUsageException($name, $isAutoInvokable, $exception);
+        }
+
+        $this->creationOptions = null;
+
+        try {
+            $this->validatePlugin($instance);
+        } catch (Exception\RuntimeException $exception) {
+            $this->tryThrowingServiceLocatorUsageException($name, $isAutoInvokable, $exception);
+        }
+
+        return $instance;
+    }
+
+    /**
+     * Register a service with the locator.
+     *
+     * Validates that the service object via validatePlugin() prior to
+     * attempting to register it.
+     *
+     * @param  string                                $name
+     * @param  mixed                                 $service
+     * @param  bool                                  $shared
+     * @return AbstractPluginManager
+     * @throws Exception\InvalidServiceNameException
+     */
+    public function setService($name, $service, $shared = true)
+    {
+        if ($service) {
+            $this->validatePlugin($service);
+        }
+        parent::setService($name, $service, $shared);
+
+        return $this;
+    }
+
+    /**
+     * Set the main service locator so factories can have access to it to pull deps
+     *
+     * @param  ServiceLocatorInterface $serviceLocator
+     * @return AbstractPluginManager
+     */
+    public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
+    {
+        $this->serviceLocator = $serviceLocator;
+
+        return $this;
+    }
+
+    /**
+     * Get the main plugin manager. Useful for fetching dependencies from within factories.
+     *
+     * @return ServiceLocatorInterface
+     */
+    public function getServiceLocator()
+    {
+        return $this->serviceLocator;
+    }
+
+    /**
+     * Attempt to create an instance via an invokable class
+     *
+     * Overrides parent implementation by passing $creationOptions to the
+     * constructor, if non-null.
+     *
+     * @param  string                               $canonicalName
+     * @param  string                               $requestedName
+     * @return null|\stdClass
+     * @throws Exception\ServiceNotCreatedException If resolved class does not exist
+     */
+    protected function createFromInvokable($canonicalName, $requestedName)
+    {
+        $invokable = $this->invokableClasses[$canonicalName];
+
+        if (!class_exists($invokable)) {
+            throw new Exception\ServiceNotFoundException(sprintf(
+                '%s: failed retrieving "%s%s" via invokable class "%s"; class does not exist',
+                get_class($this) . '::' . __FUNCTION__,
+                $canonicalName,
+                ($requestedName ? '(alias: ' . $requestedName . ')' : ''),
+                $invokable
+            ));
+        }
+
+        if (null === $this->creationOptions
+            || (is_array($this->creationOptions) && empty($this->creationOptions))
+        ) {
+            $instance = new $invokable();
+        } else {
+            $instance = new $invokable($this->creationOptions);
+        }
+
+        return $instance;
+    }
+
+    /**
+     * Attempt to create an instance via a factory class
+     *
+     * Overrides parent implementation by passing $creationOptions to the
+     * constructor, if non-null.
+     *
+     * @param  string                               $canonicalName
+     * @param  string                               $requestedName
+     * @return mixed
+     * @throws Exception\ServiceNotCreatedException If factory is not callable
+     */
+    protected function createFromFactory($canonicalName, $requestedName)
+    {
+        $factory            = $this->factories[$canonicalName];
+        $hasCreationOptions = !(null === $this->creationOptions || (is_array($this->creationOptions) && empty($this->creationOptions)));
+
+        if (is_string($factory) && class_exists($factory, true)) {
+            if (!$hasCreationOptions) {
+                $factory = new $factory();
+            } else {
+                $factory = new $factory($this->creationOptions);
+            }
+
+            $this->factories[$canonicalName] = $factory;
+        }
+
+        if ($factory instanceof FactoryInterface) {
+            $instance = $this->createServiceViaCallback([$factory, 'createService'], $canonicalName, $requestedName);
+        } elseif (is_callable($factory)) {
+            $instance = $this->createServiceViaCallback($factory, $canonicalName, $requestedName);
+        } else {
+            throw new Exception\ServiceNotCreatedException(sprintf(
+                'While attempting to create %s%s an invalid factory was registered for this instance type.',
+                $canonicalName,
+                ($requestedName ? '(alias: ' . $requestedName . ')' : '')
+            ));
+        }
+
+        return $instance;
+    }
+
+    /**
+     * Create service via callback
+     *
+     * @param  callable                                   $callable
+     * @param  string                                     $cName
+     * @param  string                                     $rName
+     * @throws Exception\ServiceNotCreatedException
+     * @throws Exception\ServiceNotFoundException
+     * @throws Exception\CircularDependencyFoundException
+     * @return object
+     */
+    protected function createServiceViaCallback($callable, $cName, $rName)
+    {
+        if (is_object($callable)) {
+            $factory = $callable;
+        } elseif (is_array($callable)) {
+            // reset both rewinds and returns the value of the first array element
+            $factory = reset($callable);
+        }
+
+        // duck-type MutableCreationOptionsInterface for forward compatibility
+        if (isset($factory)
+            && method_exists($factory, 'setCreationOptions')
+            && is_array($this->creationOptions)
+            && !empty($this->creationOptions)
+        ) {
+            $factory->setCreationOptions($this->creationOptions);
+        }
+
+        return parent::createServiceViaCallback($callable, $cName, $rName);
+    }
+
+    /**
+     * @param string        $serviceName
+     * @param bool          $isAutoInvokable
+     * @param BaseException $exception
+     *
+     * @throws BaseException
+     * @throws Exception\ServiceLocatorUsageException
+     */
+    private function tryThrowingServiceLocatorUsageException(
+        $serviceName,
+        $isAutoInvokable,
+        BaseException $exception
+    ) {
+        if ($isAutoInvokable) {
+            $this->unregisterService($this->canonicalizeName($serviceName));
+        }
+
+        $serviceLocator = $this->getServiceLocator();
+
+        if ($serviceLocator && $serviceLocator->has($serviceName)) {
+            throw Exception\ServiceLocatorUsageException::fromInvalidPluginManagerRequestedServiceName(
+                $this,
+                $serviceLocator,
+                $serviceName,
+                $exception
+            );
+        }
+
+        throw $exception;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Config.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Config.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Config.php	(revision 5534)
@@ -0,0 +1,166 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+class Config implements ConfigInterface
+{
+    /**
+     * @var array
+     */
+    protected $config = [];
+
+    /**
+     * Constructor
+     *
+     * @param array $config
+     */
+    public function __construct($config = [])
+    {
+        $this->config = $config;
+    }
+
+    /**
+     * Get allow override
+     *
+     * @return null|bool
+     */
+    public function getAllowOverride()
+    {
+        return (isset($this->config['allow_override'])) ? $this->config['allow_override'] : null;
+    }
+
+    /**
+     * Get factories
+     *
+     * @return array
+     */
+    public function getFactories()
+    {
+        return (isset($this->config['factories'])) ? $this->config['factories'] : [];
+    }
+
+    /**
+     * Get abstract factories
+     *
+     * @return array
+     */
+    public function getAbstractFactories()
+    {
+        return (isset($this->config['abstract_factories'])) ? $this->config['abstract_factories'] : [];
+    }
+
+    /**
+     * Get invokables
+     *
+     * @return array
+     */
+    public function getInvokables()
+    {
+        return (isset($this->config['invokables'])) ? $this->config['invokables'] : [];
+    }
+
+    /**
+     * Get services
+     *
+     * @return array
+     */
+    public function getServices()
+    {
+        return (isset($this->config['services'])) ? $this->config['services'] : [];
+    }
+
+    /**
+     * Get aliases
+     *
+     * @return array
+     */
+    public function getAliases()
+    {
+        return (isset($this->config['aliases'])) ? $this->config['aliases'] : [];
+    }
+
+    /**
+     * Get initializers
+     *
+     * @return array
+     */
+    public function getInitializers()
+    {
+        return (isset($this->config['initializers'])) ? $this->config['initializers'] : [];
+    }
+
+    /**
+     * Get shared
+     *
+     * @return array
+     */
+    public function getShared()
+    {
+        return (isset($this->config['shared'])) ? $this->config['shared'] : [];
+    }
+
+    /**
+     * Get the delegator services map, with keys being the services acting as delegates,
+     * and values being the delegator factories names
+     *
+     * @return array
+     */
+    public function getDelegators()
+    {
+        return (isset($this->config['delegators'])) ? $this->config['delegators'] : [];
+    }
+
+    /**
+     * Configure service manager
+     *
+     * @param ServiceManager $serviceManager
+     * @return void
+     */
+    public function configureServiceManager(ServiceManager $serviceManager)
+    {
+        if (($allowOverride = $this->getAllowOverride()) !== null) {
+            $serviceManager->setAllowOverride($allowOverride);
+        }
+
+        foreach ($this->getFactories() as $name => $factory) {
+            $serviceManager->setFactory($name, $factory);
+        }
+
+        foreach ($this->getAbstractFactories() as $factory) {
+            $serviceManager->addAbstractFactory($factory);
+        }
+
+        foreach ($this->getInvokables() as $name => $invokable) {
+            $serviceManager->setInvokableClass($name, $invokable);
+        }
+
+        foreach ($this->getServices() as $name => $service) {
+            $serviceManager->setService($name, $service);
+        }
+
+        foreach ($this->getAliases() as $alias => $nameOrAlias) {
+            $serviceManager->setAlias($alias, $nameOrAlias);
+        }
+
+        foreach ($this->getInitializers() as $initializer) {
+            $serviceManager->addInitializer($initializer);
+        }
+
+        foreach ($this->getShared() as $name => $isShared) {
+            $serviceManager->setShared($name, $isShared);
+        }
+
+        foreach ($this->getDelegators() as $originalServiceName => $delegators) {
+            foreach ($delegators as $delegator) {
+                $serviceManager->addDelegator($originalServiceName, $delegator);
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ConfigInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ConfigInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ConfigInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface ConfigInterface
+{
+    /**
+     * Configure service manager
+     *
+     * @param ServiceManager $serviceManager
+     * @return void
+     */
+    public function configureServiceManager(ServiceManager $serviceManager);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/DelegatorFactoryInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/DelegatorFactoryInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/DelegatorFactoryInterface.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+/**
+ * Interface for factories that can create delegates for services
+ */
+interface DelegatorFactoryInterface
+{
+    /**
+     * A factory that creates delegates of a given service
+     *
+     * @param ServiceLocatorInterface $serviceLocator the service locator which requested the service
+     * @param string                  $name           the normalized service name
+     * @param string                  $requestedName  the requested service name
+     * @param callable                $callback       the callback that is responsible for creating the service
+     *
+     * @return mixed
+     */
+    public function createDelegatorWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName, $callback);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiAbstractServiceFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiAbstractServiceFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiAbstractServiceFactory.php	(revision 5534)
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Di;
+
+use Zend\Di\Di;
+use Zend\ServiceManager\AbstractFactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DiAbstractServiceFactory extends DiServiceFactory implements AbstractFactoryInterface
+{
+    /**
+     * Constructor
+     *
+     * @param \Zend\Di\Di $di
+     * @param null|string|\Zend\Di\InstanceManager $useServiceLocator
+     */
+    public function __construct(Di $di, $useServiceLocator = self::USE_SL_NONE)
+    {
+        $this->di = $di;
+        if (in_array($useServiceLocator, [self::USE_SL_BEFORE_DI, self::USE_SL_AFTER_DI, self::USE_SL_NONE])) {
+            $this->useServiceLocator = $useServiceLocator;
+        }
+
+        // since we are using this in a proxy-fashion, localize state
+        $this->definitions = $this->di->definitions;
+        $this->instanceManager = $this->di->instanceManager;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
+    {
+        $this->serviceLocator = $serviceLocator;
+        if ($requestedName) {
+            return $this->get($requestedName, []);
+        }
+
+        return $this->get($name, []);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
+    {
+        if ($this->instanceManager->hasSharedInstance($requestedName)
+            || $this->instanceManager->hasAlias($requestedName)
+            || $this->instanceManager->hasConfig($requestedName)
+            || $this->instanceManager->hasTypePreferences($requestedName)
+        ) {
+            return true;
+        }
+
+        if (! $this->definitions->hasClass($requestedName) || interface_exists($requestedName)) {
+            return false;
+        }
+
+        return true;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiInstanceManagerProxy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiInstanceManagerProxy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiInstanceManagerProxy.php	(revision 5534)
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Di;
+
+use Zend\Di\InstanceManager as DiInstanceManager;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DiInstanceManagerProxy extends DiInstanceManager
+{
+    /**
+     * @var DiInstanceManager
+     */
+    protected $diInstanceManager = null;
+
+    /**
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator = null;
+
+    /**
+     * Constructor
+     *
+     * @param DiInstanceManager $diInstanceManager
+     * @param ServiceLocatorInterface $serviceLocator
+     */
+    public function __construct(DiInstanceManager $diInstanceManager, ServiceLocatorInterface $serviceLocator)
+    {
+        $this->diInstanceManager = $diInstanceManager;
+        $this->serviceLocator = $serviceLocator;
+
+        // localize state
+        $this->aliases = &$diInstanceManager->aliases;
+        $this->sharedInstances = &$diInstanceManager->sharedInstances;
+        $this->sharedInstancesWithParams = &$diInstanceManager->sharedInstancesWithParams;
+        $this->configurations = &$diInstanceManager->configurations;
+        $this->typePreferences = &$diInstanceManager->typePreferences;
+    }
+
+    /**
+     * Determine if we have a shared instance by class or alias
+     *
+     * @param $classOrAlias
+     * @return bool
+     */
+    public function hasSharedInstance($classOrAlias)
+    {
+        return ($this->serviceLocator->has($classOrAlias) || $this->diInstanceManager->hasSharedInstance($classOrAlias));
+    }
+
+    /**
+     * Get shared instance
+     *
+     * @param $classOrAlias
+     * @return mixed
+     */
+    public function getSharedInstance($classOrAlias)
+    {
+        if ($this->serviceLocator->has($classOrAlias)) {
+            return $this->serviceLocator->get($classOrAlias);
+        }
+
+        return $this->diInstanceManager->getSharedInstance($classOrAlias);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiServiceFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiServiceFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiServiceFactory.php	(revision 5534)
@@ -0,0 +1,118 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Di;
+
+use Zend\Di\Di;
+use Zend\Di\Exception\ClassNotFoundException as DiClassNotFoundException;
+use Zend\ServiceManager\Exception;
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DiServiceFactory extends Di implements FactoryInterface
+{
+    /**@#+
+     * constants
+     */
+    const USE_SL_BEFORE_DI = 'before';
+    const USE_SL_AFTER_DI  = 'after';
+    const USE_SL_NONE      = 'none';
+    /**@#-*/
+
+    /**
+     * @var \Zend\Di\Di
+     */
+    protected $di = null;
+
+    /**
+     * @var \Zend\Di\InstanceManager
+     */
+    protected $name = null;
+
+    /**
+     * @var array
+     */
+    protected $parameters = [];
+
+    /**
+     * @var string
+     */
+    protected $useServiceLocator = self::USE_SL_AFTER_DI;
+
+    /**
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator = null;
+
+    /**
+     * Constructor
+     *
+     * @param \Zend\Di\Di $di
+     * @param null|\Zend\Di\InstanceManager $name
+     * @param array $parameters
+     * @param string $useServiceLocator
+     */
+    public function __construct(Di $di, $name, array $parameters = [], $useServiceLocator = self::USE_SL_NONE)
+    {
+        $this->di = $di;
+        $this->name = $name;
+        $this->parameters = $parameters;
+        if (in_array($useServiceLocator, [self::USE_SL_BEFORE_DI, self::USE_SL_AFTER_DI, self::USE_SL_NONE])) {
+            $this->useServiceLocator = $useServiceLocator;
+        }
+
+        // since we are using this in a proxy-fashion, localize state
+        $this->definitions = $this->di->definitions;
+        $this->instanceManager = $this->di->instanceManager;
+    }
+
+    /**
+     * Create service
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @return object
+     */
+    public function createService(ServiceLocatorInterface $serviceLocator)
+    {
+        $this->serviceLocator = $serviceLocator;
+        return $this->get($this->name, $this->parameters);
+    }
+
+    /**
+     * Override, as we want it to use the functionality defined in the proxy
+     *
+     * @param string $name
+     * @param array $params
+     * @return object
+     * @throws Exception\ServiceNotFoundException
+     */
+    public function get($name, array $params = [])
+    {
+        // allow this di service to get dependencies from the service locator BEFORE trying di
+        if ($this->useServiceLocator == self::USE_SL_BEFORE_DI && $this->serviceLocator->has($name)) {
+            return $this->serviceLocator->get($name);
+        }
+
+        try {
+            $service = parent::get($name, $params);
+            return $service;
+        } catch (DiClassNotFoundException $e) {
+            // allow this di service to get dependencies from the service locator AFTER trying di
+            if ($this->useServiceLocator == self::USE_SL_AFTER_DI && $this->serviceLocator->has($name)) {
+                return $this->serviceLocator->get($name);
+            } else {
+                throw new Exception\ServiceNotFoundException(
+                    sprintf('Service %s was not found in this DI instance', $name),
+                    null,
+                    $e
+                );
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiServiceInitializer.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiServiceInitializer.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Di/DiServiceInitializer.php	(revision 5534)
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Di;
+
+use Zend\Di\Di;
+use Zend\ServiceManager\InitializerInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class DiServiceInitializer extends Di implements InitializerInterface
+{
+    /**
+     * @var Di
+     */
+    protected $di = null;
+
+    /**
+     * @var DiInstanceManagerProxy
+     */
+    protected $diInstanceManagerProxy = null;
+
+    /**
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator = null;
+
+    /**
+     * Constructor
+     *
+     * @param \Zend\Di\Di $di
+     * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
+     * @param null|DiInstanceManagerProxy $diImProxy
+     */
+    public function __construct(Di $di, ServiceLocatorInterface $serviceLocator, DiInstanceManagerProxy $diImProxy = null)
+    {
+        $this->di = $di;
+        $this->serviceLocator = $serviceLocator;
+        $this->diInstanceManagerProxy = ($diImProxy) ?: new DiInstanceManagerProxy($di->instanceManager(), $serviceLocator);
+    }
+
+    /**
+     * Initialize
+     *
+     * @param $instance
+     * @param ServiceLocatorInterface $serviceLocator
+     * @throws \Exception
+     */
+    public function initialize($instance, ServiceLocatorInterface $serviceLocator)
+    {
+        $instanceManager = $this->di->instanceManager;
+        $this->di->instanceManager = $this->diInstanceManagerProxy;
+        try {
+            $this->di->injectDependencies($instance);
+            $this->di->instanceManager = $instanceManager;
+        } catch (\Exception $e) {
+            $this->di->instanceManager = $instanceManager;
+            throw $e;
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/CircularDependencyFoundException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/CircularDependencyFoundException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/CircularDependencyFoundException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class CircularDependencyFoundException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/CircularReferenceException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/CircularReferenceException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/CircularReferenceException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class CircularReferenceException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+use Interop\Container\Exception\ContainerException;
+
+interface ExceptionInterface extends ContainerException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidServiceException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidServiceException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidServiceException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class InvalidServiceException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidServiceNameException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidServiceNameException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/InvalidServiceNameException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class InvalidServiceNameException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceLocatorUsageException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceLocatorUsageException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceLocatorUsageException.php	(revision 5534)
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+use Exception as BaseException;
+use Zend\ServiceManager\AbstractPluginManager;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+class ServiceLocatorUsageException extends ServiceNotFoundException
+{
+    /**
+     * Static constructor
+     *
+     * @param AbstractPluginManager   $pluginManager
+     * @param ServiceLocatorInterface $parentLocator
+     * @param string                  $serviceName
+     * @param BaseException           $previousException
+     *
+     * @return self
+     */
+    public static function fromInvalidPluginManagerRequestedServiceName(
+        AbstractPluginManager $pluginManager,
+        ServiceLocatorInterface $parentLocator,
+        $serviceName,
+        BaseException $previousException
+    ) {
+        return new self(
+            sprintf(
+                "Service \"%s\" has been requested to plugin manager of type \"%s\", but couldn't be retrieved.\n"
+                . "A previous exception of type \"%s\" has been raised in the process.\n"
+                . "By the way, a service with the name \"%s\" has been found in the parent service locator \"%s\": "
+                . 'did you forget to use $parentLocator = $serviceLocator->getServiceLocator() in your factory code?',
+                $serviceName,
+                get_class($pluginManager),
+                get_class($previousException),
+                $serviceName,
+                get_class($parentLocator)
+            ),
+            0,
+            $previousException
+        );
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceNotCreatedException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceNotCreatedException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceNotCreatedException.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+class ServiceNotCreatedException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceNotFoundException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceNotFoundException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Exception/ServiceNotFoundException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Exception;
+
+use Interop\Container\Exception\NotFoundException;
+
+class ServiceNotFoundException extends InvalidArgumentException implements
+    NotFoundException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php	(revision 5534)
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Factory;
+
+use Interop\Container\ContainerInterface;
+use Zend\ServiceManager\Exception\InvalidServiceException;
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+/**
+ * Factory for instantiating classes with no dependencies or which accept a single array.
+ *
+ * The InvokableFactory can be used for any class that:
+ *
+ * - has no constructor arguments;
+ * - accepts a single array of arguments via the constructor.
+ *
+ * It replaces the "invokables" and "invokable class" functionality of the v2
+ * service manager, and can also be used in v2 code for forwards compatibility
+ * with v3.
+ */
+final class InvokableFactory implements FactoryInterface
+{
+    /**
+     * Options to pass to the constructor (when used in v2), if any.
+     *
+     * @param null|array
+     */
+    private $creationOptions;
+
+    /**
+     * @param null|array|Traversable $creationOptions
+     * @throws InvalidServiceException if $creationOptions cannot be coerced to
+     *     an array.
+     */
+    public function __construct($creationOptions = null)
+    {
+        if (null === $creationOptions) {
+            return;
+        }
+
+        $this->setCreationOptions($creationOptions);
+    }
+
+    /**
+     * Create an instance of the requested class name.
+     *
+     * @param ContainerInterface $container
+     * @param string $requestedName
+     * @param null|array $options
+     * @return object
+     */
+    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
+    {
+        return (null === $options) ? new $requestedName : new $requestedName($options);
+    }
+
+    /**
+     * Create an instance of the named service.
+     *
+     * First, it checks if `$canonicalName` resolves to a class, and, if so, uses
+     * that value to proxy to `__invoke()`.
+     *
+     * Next, if `$requestedName` is non-empty and resolves to a class, this
+     * method uses that value to proxy to `__invoke()`.
+     *
+     * Finally, if the above each fail, it raises an exception.
+     *
+     * The approach above is performed as version 2 has two distinct behaviors
+     * under which factories are invoked:
+     *
+     * - If an alias was used, $canonicalName is the resolved name, and
+     *   $requestedName is the service name requested, in which case $canonicalName
+     *   is likely the qualified class name;
+     * - Otherwise, $canonicalName is the normalized name, and $requestedName
+     *   is the original service name requested (typically the qualified class name).
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @param null|string $canonicalName
+     * @param null|string $requestedName
+     * @return object
+     * @throws InvalidServiceException
+     */
+    public function createService(ServiceLocatorInterface $serviceLocator, $canonicalName = null, $requestedName = null)
+    {
+        if (class_exists($canonicalName)) {
+            return $this($serviceLocator, $canonicalName, $this->creationOptions);
+        }
+
+        if (is_string($requestedName) && class_exists($requestedName)) {
+            return $this($serviceLocator, $requestedName, $this->creationOptions);
+        }
+
+        throw new InvalidServiceException(sprintf(
+            '%s requires that the requested name is provided on invocation; please update your tests or consuming container',
+            __CLASS__
+        ));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setCreationOptions(array $creationOptions)
+    {
+        $this->creationOptions = $creationOptions;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/FactoryInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/FactoryInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/FactoryInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface FactoryInterface
+{
+    /**
+     * Create service
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @return mixed
+     */
+    public function createService(ServiceLocatorInterface $serviceLocator);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/InitializerInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/InitializerInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/InitializerInterface.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface InitializerInterface
+{
+    /**
+     * Initialize
+     *
+     * @param $instance
+     * @param ServiceLocatorInterface $serviceLocator
+     * @return mixed
+     */
+    public function initialize($instance, ServiceLocatorInterface $serviceLocator);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/MutableCreationOptionsInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/MutableCreationOptionsInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/MutableCreationOptionsInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface MutableCreationOptionsInterface
+{
+    /**
+     * Set creation options
+     *
+     * @param  array $options
+     * @return void
+     */
+    public function setCreationOptions(array $options);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/MutableCreationOptionsTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/MutableCreationOptionsTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/MutableCreationOptionsTrait.php	(revision 5534)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+/**
+ * Trait for MutableCreationOptions Factories
+ */
+trait MutableCreationOptionsTrait
+{
+    /**
+     * @var array
+     */
+    protected $creationOptions = [];
+
+    /**
+     * Set creation options
+     *
+     * @param array $creationOptions
+     * @return void
+     */
+    public function setCreationOptions(array $creationOptions)
+    {
+        $this->creationOptions = $creationOptions;
+    }
+
+    /**
+     * Get creation options
+     *
+     * @return array
+     */
+    public function getCreationOptions()
+    {
+        return $this->creationOptions;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactory.php	(revision 5534)
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Proxy;
+
+use ProxyManager\Factory\LazyLoadingValueHolderFactory;
+use ProxyManager\Proxy\LazyLoadingInterface;
+use Zend\ServiceManager\DelegatorFactoryInterface;
+use Zend\ServiceManager\Exception;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
+/**
+ * Delegator factory responsible of instantiating lazy loading value holder proxies of
+ * given services at runtime
+ *
+ * @link https://github.com/Ocramius/ProxyManager/blob/master/docs/lazy-loading-value-holder.md
+ */
+class LazyServiceFactory implements DelegatorFactoryInterface
+{
+    /**
+     * @var \ProxyManager\Factory\LazyLoadingValueHolderFactory
+     */
+    protected $proxyFactory;
+
+    /**
+     * @var string[] map of service names to class names
+     */
+    protected $servicesMap;
+
+    /**
+     * @param LazyLoadingValueHolderFactory $proxyFactory
+     * @param string[]                      $servicesMap  a map of service names to class names of their
+     *                                                    respective classes
+     */
+    public function __construct(LazyLoadingValueHolderFactory $proxyFactory, array $servicesMap)
+    {
+        $this->proxyFactory = $proxyFactory;
+        $this->servicesMap  = $servicesMap;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @return object|\ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface
+     */
+    public function createDelegatorWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName, $callback)
+    {
+        $initializer = function (& $wrappedInstance, LazyLoadingInterface $proxy) use ($callback) {
+            $proxy->setProxyInitializer(null);
+
+            $wrappedInstance = call_user_func($callback);
+
+            return true;
+        };
+
+        if (isset($this->servicesMap[$requestedName])) {
+            return $this->proxyFactory->createProxy($this->servicesMap[$requestedName], $initializer);
+        } elseif (isset($this->servicesMap[$name])) {
+            return $this->proxyFactory->createProxy($this->servicesMap[$name], $initializer);
+        }
+
+        throw new Exception\InvalidServiceNameException(
+            sprintf('The requested service "%s" was not found in the provided services map', $requestedName)
+        );
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactoryFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactoryFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Proxy/LazyServiceFactoryFactory.php	(revision 5534)
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Proxy;
+
+use ProxyManager\Configuration;
+use ProxyManager\Factory\LazyLoadingValueHolderFactory;
+use ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy;
+use Zend\ServiceManager\FactoryInterface;
+use Zend\ServiceManager\ServiceLocatorInterface;
+use Zend\ServiceManager\Exception;
+
+/**
+ * Service factory responsible of instantiating {@see \Zend\ServiceManager\Proxy\LazyServiceFactory}
+ * and configuring it starting from application configuration
+ */
+class LazyServiceFactoryFactory implements FactoryInterface
+{
+    /**
+     * {@inheritDoc}
+     *
+     * @return \Zend\ServiceManager\Proxy\LazyServiceFactory
+     */
+    public function createService(ServiceLocatorInterface $serviceLocator)
+    {
+        $config = $serviceLocator->get('Config');
+
+        if (!isset($config['lazy_services'])) {
+            throw new Exception\InvalidArgumentException('Missing "lazy_services" config key');
+        }
+
+        $lazyServices = $config['lazy_services'];
+
+        if (!isset($lazyServices['class_map'])) {
+            throw new Exception\InvalidArgumentException('Missing "class_map" config key in "lazy_services"');
+        }
+
+        $factoryConfig = new Configuration();
+
+        if (isset($lazyServices['proxies_namespace'])) {
+            $factoryConfig->setProxiesNamespace($lazyServices['proxies_namespace']);
+        }
+
+        if (isset($lazyServices['proxies_target_dir'])) {
+            $factoryConfig->setProxiesTargetDir($lazyServices['proxies_target_dir']);
+        }
+
+        if (!isset($lazyServices['write_proxy_files']) || ! $lazyServices['write_proxy_files']) {
+            $factoryConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());
+        }
+
+        spl_autoload_register($factoryConfig->getProxyAutoloader());
+
+        return new LazyServiceFactory(new LazyLoadingValueHolderFactory($factoryConfig), $lazyServices['class_map']);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorAwareInterface.php	(revision 5534)
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface ServiceLocatorAwareInterface
+{
+    /**
+     * Set service locator
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     */
+    public function setServiceLocator(ServiceLocatorInterface $serviceLocator);
+
+    /**
+     * Get service locator
+     *
+     * @return ServiceLocatorInterface
+     */
+    public function getServiceLocator();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorAwareTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorAwareTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorAwareTrait.php	(revision 5534)
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+trait ServiceLocatorAwareTrait
+{
+    /**
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator = null;
+
+    /**
+     * Set service locator
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @return mixed
+     */
+    public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
+    {
+        $this->serviceLocator = $serviceLocator;
+
+        return $this;
+    }
+
+    /**
+     * Get service locator
+     *
+     * @return ServiceLocatorInterface
+     */
+    public function getServiceLocator()
+    {
+        return $this->serviceLocator;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceLocatorInterface.php	(revision 5534)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+/**
+ * Service locator interface
+ */
+interface ServiceLocatorInterface
+{
+    /**
+     * Retrieve a registered instance
+     *
+     * @param  string  $name
+     * @throws Exception\ServiceNotFoundException
+     * @return object|array
+     */
+    public function get($name);
+
+    /**
+     * Check for a registered instance
+     *
+     * @param  string|array  $name
+     * @return bool
+     */
+    public function has($name);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceManager.php	(revision 5534)
@@ -0,0 +1,1269 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+use Interop\Container\ContainerInterface;
+
+class ServiceManager implements ServiceLocatorInterface, ContainerInterface
+{
+    /**@#+
+     * Constants
+     */
+    const SCOPE_PARENT = 'parent';
+    const SCOPE_CHILD = 'child';
+    /**@#-*/
+
+    /**
+     * Lookup for canonicalized names.
+     *
+     * @var array
+     */
+    protected $canonicalNames = [];
+
+    /**
+     * @var bool
+     */
+    protected $allowOverride = false;
+
+    /**
+     * @var array
+     */
+    protected $invokableClasses = [];
+
+    /**
+     * @var string|callable|\Closure|FactoryInterface[]
+     */
+    protected $factories = [];
+
+    /**
+     * @var AbstractFactoryInterface[]
+     */
+    protected $abstractFactories = [];
+
+    /**
+     * @var array[]
+     */
+    protected $delegators = [];
+
+    /**
+     * @var array
+     */
+    protected $pendingAbstractFactoryRequests = [];
+
+    /**
+     * @var integer
+     */
+    protected $nestedContextCounter = -1;
+
+    /**
+     * @var array
+     */
+    protected $nestedContext = [];
+
+    /**
+     * @var array
+     */
+    protected $shared = [];
+
+    /**
+     * Registered services and cached values
+     *
+     * @var array
+     */
+    protected $instances = [];
+
+    /**
+     * @var array
+     */
+    protected $aliases = [];
+
+    /**
+     * @var array
+     */
+    protected $initializers = [];
+
+    /**
+     * @var ServiceManager[]
+     */
+    protected $peeringServiceManagers = [];
+
+    /**
+     * Whether or not to share by default
+     *
+     * @var bool
+     */
+    protected $shareByDefault = true;
+
+    /**
+     * @var bool
+     */
+    protected $retrieveFromPeeringManagerFirst = false;
+
+    /**
+     * @var bool Track whether not to throw exceptions during create()
+     */
+    protected $throwExceptionInCreate = true;
+
+    /**
+     * @var array map of characters to be replaced through strtr
+     */
+    protected $canonicalNamesReplacements = ['-' => '', '_' => '', ' ' => '', '\\' => '', '/' => ''];
+
+    /**
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceManagerCaller;
+
+    /**
+     * Constructor
+     *
+     * @param ConfigInterface $config
+     */
+    public function __construct(ConfigInterface $config = null)
+    {
+        if ($config) {
+            $config->configureServiceManager($this);
+        }
+    }
+
+    /**
+     * Set allow override
+     *
+     * @param $allowOverride
+     * @return ServiceManager
+     */
+    public function setAllowOverride($allowOverride)
+    {
+        $this->allowOverride = (bool) $allowOverride;
+        return $this;
+    }
+
+    /**
+     * Get allow override
+     *
+     * @return bool
+     */
+    public function getAllowOverride()
+    {
+        return $this->allowOverride;
+    }
+
+    /**
+     * Set flag indicating whether services are shared by default
+     *
+     * @param  bool $shareByDefault
+     * @return ServiceManager
+     * @throws Exception\RuntimeException if allowOverride is false
+     */
+    public function setShareByDefault($shareByDefault)
+    {
+        if ($this->allowOverride === false) {
+            throw new Exception\RuntimeException(sprintf(
+                '%s: cannot alter default shared service setting; container is marked immutable (allow_override is false)',
+                get_class($this) . '::' . __FUNCTION__
+            ));
+        }
+        $this->shareByDefault = (bool) $shareByDefault;
+        return $this;
+    }
+
+    /**
+     * Are services shared by default?
+     *
+     * @return bool
+     */
+    public function shareByDefault()
+    {
+        return $this->shareByDefault;
+    }
+
+    /**
+     * Set throw exceptions in create
+     *
+     * @param  bool $throwExceptionInCreate
+     * @return ServiceManager
+     */
+    public function setThrowExceptionInCreate($throwExceptionInCreate)
+    {
+        $this->throwExceptionInCreate = $throwExceptionInCreate;
+        return $this;
+    }
+
+    /**
+     * Get throw exceptions in create
+     *
+     * @return bool
+     */
+    public function getThrowExceptionInCreate()
+    {
+        return $this->throwExceptionInCreate;
+    }
+
+    /**
+     * Set flag indicating whether to pull from peering manager before attempting creation
+     *
+     * @param  bool $retrieveFromPeeringManagerFirst
+     * @return ServiceManager
+     */
+    public function setRetrieveFromPeeringManagerFirst($retrieveFromPeeringManagerFirst = true)
+    {
+        $this->retrieveFromPeeringManagerFirst = (bool) $retrieveFromPeeringManagerFirst;
+        return $this;
+    }
+
+    /**
+     * Should we retrieve from the peering manager prior to attempting to create a service?
+     *
+     * @return bool
+     */
+    public function retrieveFromPeeringManagerFirst()
+    {
+        return $this->retrieveFromPeeringManagerFirst;
+    }
+
+    /**
+     * Set invokable class
+     *
+     * @param  string  $name
+     * @param  string  $invokableClass
+     * @param  bool $shared
+     * @return ServiceManager
+     * @throws Exception\InvalidServiceNameException
+     */
+    public function setInvokableClass($name, $invokableClass, $shared = null)
+    {
+        $cName = $this->canonicalizeName($name);
+
+        if ($this->has([$cName, $name], false)) {
+            if ($this->allowOverride === false) {
+                throw new Exception\InvalidServiceNameException(sprintf(
+                    'A service by the name or alias "%s" already exists and cannot be overridden; please use an alternate name',
+                    $name
+                ));
+            }
+            $this->unregisterService($cName);
+        }
+
+        if ($shared === null) {
+            $shared = $this->shareByDefault;
+        }
+
+        $this->invokableClasses[$cName] = $invokableClass;
+        $this->shared[$cName]           = (bool) $shared;
+
+        return $this;
+    }
+
+    /**
+     * Set factory
+     *
+     * @param  string                           $name
+     * @param  string|FactoryInterface|callable $factory
+     * @param  bool                             $shared
+     * @return ServiceManager
+     * @throws Exception\InvalidArgumentException
+     * @throws Exception\InvalidServiceNameException
+     */
+    public function setFactory($name, $factory, $shared = null)
+    {
+        $cName = $this->canonicalizeName($name);
+
+        if (!($factory instanceof FactoryInterface || is_string($factory) || is_callable($factory))) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                'Provided factory must be the class name of a factory, callable or an instance of "%s".',
+                FactoryInterface::class
+            ));
+        }
+
+        if ($this->has([$cName, $name], false)) {
+            if ($this->allowOverride === false) {
+                throw new Exception\InvalidServiceNameException(sprintf(
+                    'A service by the name or alias "%s" already exists and cannot be overridden, please use an alternate name',
+                    $name
+                ));
+            }
+            $this->unregisterService($cName);
+        }
+
+        if ($shared === null) {
+            $shared = $this->shareByDefault;
+        }
+
+        $this->factories[$cName] = $factory;
+        $this->shared[$cName]    = (bool) $shared;
+
+        return $this;
+    }
+
+    /**
+     * Add abstract factory
+     *
+     * @param  AbstractFactoryInterface|string $factory
+     * @param  bool                            $topOfStack
+     * @return ServiceManager
+     * @throws Exception\InvalidArgumentException if the abstract factory is invalid
+     */
+    public function addAbstractFactory($factory, $topOfStack = true)
+    {
+        if (!$factory instanceof AbstractFactoryInterface && is_string($factory)) {
+            $factory = new $factory();
+        }
+
+        if (!$factory instanceof AbstractFactoryInterface) {
+            throw new Exception\InvalidArgumentException(
+                'Provided abstract factory must be the class name of an abstract'
+                . ' factory or an instance of an AbstractFactoryInterface.'
+            );
+        }
+
+        if ($topOfStack) {
+            array_unshift($this->abstractFactories, $factory);
+        } else {
+            array_push($this->abstractFactories, $factory);
+        }
+        return $this;
+    }
+
+    /**
+     * Sets the given service name as to be handled by a delegator factory
+     *
+     * @param  string $serviceName          name of the service being the delegate
+     * @param  string $delegatorFactoryName name of the service being the delegator factory
+     *
+     * @return ServiceManager
+     */
+    public function addDelegator($serviceName, $delegatorFactoryName)
+    {
+        $cName = $this->canonicalizeName($serviceName);
+
+        if (!isset($this->delegators[$cName])) {
+            $this->delegators[$cName] = [];
+        }
+
+        $this->delegators[$cName][] = $delegatorFactoryName;
+
+        return $this;
+    }
+
+    /**
+     * Add initializer
+     *
+     * @param  callable|InitializerInterface $initializer
+     * @param  bool                          $topOfStack
+     * @return ServiceManager
+     * @throws Exception\InvalidArgumentException
+     */
+    public function addInitializer($initializer, $topOfStack = true)
+    {
+        if (!($initializer instanceof InitializerInterface || is_callable($initializer))) {
+            if (is_string($initializer)) {
+                $initializer = new $initializer;
+            }
+
+            if (!($initializer instanceof InitializerInterface || is_callable($initializer))) {
+                throw new Exception\InvalidArgumentException('$initializer should be callable.');
+            }
+        }
+
+        if ($topOfStack) {
+            array_unshift($this->initializers, $initializer);
+        } else {
+            array_push($this->initializers, $initializer);
+        }
+        return $this;
+    }
+
+    /**
+     * Register a service with the locator
+     *
+     * @param  string  $name
+     * @param  mixed   $service
+     * @return ServiceManager
+     * @throws Exception\InvalidServiceNameException
+     */
+    public function setService($name, $service)
+    {
+        $cName = $this->canonicalizeName($name);
+
+        if ($this->has($cName, false)) {
+            if ($this->allowOverride === false) {
+                throw new Exception\InvalidServiceNameException(sprintf(
+                    '%s: A service by the name "%s" or alias already exists and cannot be overridden, please use an alternate name.',
+                    get_class($this) . '::' . __FUNCTION__,
+                    $name
+                ));
+            }
+            $this->unregisterService($cName);
+        }
+
+        $this->instances[$cName] = $service;
+
+        return $this;
+    }
+
+    /**
+     * @param  string $name
+     * @param  bool   $isShared
+     * @return ServiceManager
+     * @throws Exception\ServiceNotFoundException
+     */
+    public function setShared($name, $isShared)
+    {
+        $cName = $this->canonicalizeName($name);
+
+        if (!isset($this->invokableClasses[$cName])
+            && !isset($this->factories[$cName])
+            && !$this->canCreateFromAbstractFactory($cName, $name)
+        ) {
+            throw new Exception\ServiceNotFoundException(sprintf(
+                '%s: A service by the name "%s" was not found and could not be marked as shared',
+                get_class($this) . '::' . __FUNCTION__,
+                $name
+            ));
+        }
+
+        $this->shared[$cName] = (bool) $isShared;
+        return $this;
+    }
+
+    /**
+     * @param  string $name
+     * @return bool
+     * @throws Exception\ServiceNotFoundException
+     */
+    public function isShared($name)
+    {
+        $cName = $this->canonicalizeName($name);
+
+        if (!$this->has($name)) {
+            throw new Exception\ServiceNotFoundException(sprintf(
+                '%s: A service by the name "%s" was not found',
+                get_class($this) . '::' . __FUNCTION__,
+                $name
+            ));
+        }
+
+        if (!isset($this->shared[$cName])) {
+            return $this->shareByDefault();
+        }
+
+        return $this->shared[$cName];
+    }
+
+    /**
+     * Resolve the alias for the given canonical name
+     *
+     * @param  string $cName The canonical name to resolve
+     * @return string The resolved canonical name
+     */
+    protected function resolveAlias($cName)
+    {
+        $stack = [];
+
+        while ($this->hasAlias($cName)) {
+            if (isset($stack[$cName])) {
+                throw new Exception\CircularReferenceException(sprintf(
+                    'Circular alias reference: %s -> %s',
+                    implode(' -> ', $stack),
+                    $cName
+                ));
+            }
+
+            $stack[$cName] = $cName;
+            $cName = $this->aliases[$this->canonicalizeName($cName)];
+        }
+
+        return $cName;
+    }
+
+    /**
+     * Retrieve a registered instance
+     *
+     * @param  string  $name
+     * @param  bool    $usePeeringServiceManagers
+     * @throws Exception\ServiceNotFoundException
+     * @return object|array
+     */
+    public function get($name, $usePeeringServiceManagers = true)
+    {
+        // inlined code from ServiceManager::canonicalizeName for performance
+        if (isset($this->canonicalNames[$name])) {
+            $cName = $this->canonicalNames[$name];
+        } else {
+            $cName = $this->canonicalizeName($name);
+        }
+
+        $isAlias = false;
+
+        if ($this->hasAlias($cName)) {
+            $isAlias = true;
+            $name = $this->resolveAlias($cName);
+            $cName = $this->canonicalizeName($name);
+        }
+
+        $instance = null;
+
+        if ($usePeeringServiceManagers && $this->retrieveFromPeeringManagerFirst) {
+            $instance = $this->retrieveFromPeeringManager($name);
+
+            if (null !== $instance) {
+                return $instance;
+            }
+        }
+
+        if (isset($this->instances[$cName])) {
+            return $this->instances[$cName];
+        }
+
+        if (!$instance) {
+            $this->checkNestedContextStart($cName);
+            if (isset($this->invokableClasses[$cName])
+                || isset($this->factories[$cName])
+                || isset($this->aliases[$cName])
+                || $this->canCreateFromAbstractFactory($cName, $name)
+            ) {
+                $instance = $this->create([$cName, $name]);
+            } elseif ($isAlias && $this->canCreateFromAbstractFactory($name, $cName)) {
+                /*
+                 * case of an alias leading to an abstract factory :
+                 * 'my-alias' => 'my-abstract-defined-service'
+                 *     $name = 'my-alias'
+                 *     $cName = 'my-abstract-defined-service'
+                 */
+                $instance = $this->create([$name, $cName]);
+            } elseif ($usePeeringServiceManagers && !$this->retrieveFromPeeringManagerFirst) {
+                $instance = $this->retrieveFromPeeringManager($name);
+            }
+            $this->checkNestedContextStop();
+        }
+
+        // Still no instance? raise an exception
+        if ($instance === null) {
+            $this->checkNestedContextStop(true);
+            if ($isAlias) {
+                throw new Exception\ServiceNotFoundException(sprintf(
+                    'An alias "%s" was requested but no service could be found.',
+                    $name
+                ));
+            }
+
+            throw new Exception\ServiceNotFoundException(sprintf(
+                '%s was unable to fetch or create an instance for %s',
+                get_class($this) . '::' . __FUNCTION__,
+                $name
+            ));
+        }
+
+        if (($this->shareByDefault && !isset($this->shared[$cName]))
+            || (isset($this->shared[$cName]) && $this->shared[$cName] === true)
+        ) {
+            $this->instances[$cName] = $instance;
+        }
+
+        return $instance;
+    }
+
+    /**
+     * Create an instance of the requested service
+     *
+     * @param  string|array $name
+     *
+     * @return bool|object
+     */
+    public function create($name)
+    {
+        if (is_array($name)) {
+            list($cName, $rName) = $name;
+        } else {
+            $rName = $name;
+
+            // inlined code from ServiceManager::canonicalizeName for performance
+            if (isset($this->canonicalNames[$rName])) {
+                $cName = $this->canonicalNames[$name];
+            } else {
+                $cName = $this->canonicalizeName($name);
+            }
+        }
+
+        if (isset($this->delegators[$cName])) {
+            return $this->createDelegatorFromFactory($cName, $rName);
+        }
+
+        return $this->doCreate($rName, $cName);
+    }
+
+    /**
+     * Creates a callback that uses a delegator to create a service
+     *
+     * @param DelegatorFactoryInterface|callable $delegatorFactory the delegator factory
+     * @param string                             $rName            requested service name
+     * @param string                             $cName            canonical service name
+     * @param callable                           $creationCallback callback for instantiating the real service
+     *
+     * @return callable
+     */
+    private function createDelegatorCallback($delegatorFactory, $rName, $cName, $creationCallback)
+    {
+        return function () use ($delegatorFactory, $rName, $cName, $creationCallback) {
+            return $delegatorFactory instanceof DelegatorFactoryInterface
+                ? $delegatorFactory->createDelegatorWithName($this, $cName, $rName, $creationCallback)
+                : $delegatorFactory($this, $cName, $rName, $creationCallback);
+        };
+    }
+
+    /**
+     * Actually creates the service
+     *
+     * @param string $rName real service name
+     * @param string $cName canonicalized service name
+     *
+     * @return bool|mixed|null|object
+     * @throws Exception\ServiceNotFoundException
+     *
+     */
+    protected function doCreate($rName, $cName)
+    {
+        $instance = null;
+
+        if (isset($this->factories[$cName])) {
+            $instance = $this->createFromFactory($cName, $rName);
+        }
+
+        if ($instance === null && isset($this->invokableClasses[$cName])) {
+            $instance = $this->createFromInvokable($cName, $rName);
+        }
+        $this->checkNestedContextStart($cName);
+        if ($instance === null && $this->canCreateFromAbstractFactory($cName, $rName)) {
+            $instance = $this->createFromAbstractFactory($cName, $rName);
+        }
+        $this->checkNestedContextStop();
+
+        if ($instance === null && $this->throwExceptionInCreate) {
+            $this->checkNestedContextStop(true);
+            throw new Exception\ServiceNotFoundException(sprintf(
+                'No valid instance was found for %s%s',
+                $cName,
+                ($rName ? '(alias: ' . $rName . ')' : '')
+            ));
+        }
+
+        // Do not call initializers if we do not have an instance
+        if ($instance === null) {
+            return $instance;
+        }
+
+        foreach ($this->initializers as $initializer) {
+            if ($initializer instanceof InitializerInterface) {
+                $initializer->initialize($instance, $this);
+            } else {
+                call_user_func($initializer, $instance, $this);
+            }
+        }
+
+        return $instance;
+    }
+
+    /**
+     * Determine if we can create an instance.
+     * Proxies to has()
+     *
+     * @param  string|array $name
+     * @param  bool         $checkAbstractFactories
+     * @return bool
+     * @deprecated this method is being deprecated as of zendframework 2.3, and may be removed in future major versions
+     */
+    public function canCreate($name, $checkAbstractFactories = true)
+    {
+        trigger_error(sprintf('%s is deprecated; please use %s::has', __METHOD__, __CLASS__), E_USER_DEPRECATED);
+        return $this->has($name, $checkAbstractFactories, false);
+    }
+
+    /**
+     * Determine if an instance exists.
+     *
+     * @param  string|array  $name  An array argument accepts exactly two values.
+     *                              Example: array('canonicalName', 'requestName')
+     * @param  bool          $checkAbstractFactories
+     * @param  bool          $usePeeringServiceManagers
+     * @return bool
+     */
+    public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = true)
+    {
+        if (is_string($name)) {
+            $rName = $name;
+
+            // inlined code from ServiceManager::canonicalizeName for performance
+            if (isset($this->canonicalNames[$rName])) {
+                $cName = $this->canonicalNames[$rName];
+            } else {
+                $cName = $this->canonicalizeName($name);
+            }
+        } elseif (is_array($name) && count($name) >= 2) {
+            list($cName, $rName) = $name;
+        } else {
+            return false;
+        }
+
+        if (isset($this->invokableClasses[$cName])
+            || isset($this->factories[$cName])
+            || isset($this->aliases[$cName])
+            || isset($this->instances[$cName])
+            || ($checkAbstractFactories && $this->canCreateFromAbstractFactory($cName, $rName))
+        ) {
+            return true;
+        }
+
+        if ($usePeeringServiceManagers) {
+            $caller = $this->serviceManagerCaller;
+            foreach ($this->peeringServiceManagers as $peeringServiceManager) {
+                // ignore peering service manager if they are the same instance
+                if ($caller === $peeringServiceManager) {
+                    continue;
+                }
+
+                $peeringServiceManager->serviceManagerCaller = $this;
+
+                if ($peeringServiceManager->has($name)) {
+                    $peeringServiceManager->serviceManagerCaller = null;
+                    return true;
+                }
+
+                $peeringServiceManager->serviceManagerCaller = null;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Determine if we can create an instance from an abstract factory.
+     *
+     * @param  string $cName
+     * @param  string $rName
+     * @return bool
+     */
+    public function canCreateFromAbstractFactory($cName, $rName)
+    {
+        if (array_key_exists($cName, $this->nestedContext)) {
+            $context = $this->nestedContext[$cName];
+            if ($context === false) {
+                return false;
+            } elseif (is_object($context)) {
+                return !isset($this->pendingAbstractFactoryRequests[get_class($context).$cName]);
+            }
+        }
+        $this->checkNestedContextStart($cName);
+        // check abstract factories
+        $result = false;
+        $this->nestedContext[$cName] = false;
+        foreach ($this->abstractFactories as $abstractFactory) {
+            $pendingKey = get_class($abstractFactory).$cName;
+            if (isset($this->pendingAbstractFactoryRequests[$pendingKey])) {
+                $result = false;
+                break;
+            }
+
+            if ($abstractFactory->canCreateServiceWithName($this, $cName, $rName)) {
+                $this->nestedContext[$cName] = $abstractFactory;
+                $result = true;
+                break;
+            }
+        }
+        $this->checkNestedContextStop();
+        return $result;
+    }
+
+    /**
+     * Ensure the alias definition will not result in a circular reference
+     *
+     * @param  string $alias
+     * @param  string $nameOrAlias
+     * @throws Exception\CircularReferenceException
+     * @return self
+     */
+    protected function checkForCircularAliasReference($alias, $nameOrAlias)
+    {
+        $aliases = $this->aliases;
+        $aliases[$alias] = $this->canonicalizeName($nameOrAlias);
+        $stack = [];
+
+        while (isset($aliases[$alias])) {
+            if (isset($stack[$alias])) {
+                throw new Exception\CircularReferenceException(sprintf(
+                    'The alias definition "%s" : "%s" results in a circular reference: "%s" -> "%s"',
+                    $alias,
+                    $nameOrAlias,
+                    implode('" -> "', $stack),
+                    $alias
+                ));
+            }
+
+            $stack[$alias] = $alias;
+            $alias = $this->canonicalizeName($aliases[$alias]);
+        }
+
+        return $this;
+    }
+
+    /**
+     * @param  string $alias
+     * @param  string $nameOrAlias
+     * @return ServiceManager
+     * @throws Exception\ServiceNotFoundException
+     * @throws Exception\InvalidServiceNameException
+     */
+    public function setAlias($alias, $nameOrAlias)
+    {
+        if (!is_string($alias) || !is_string($nameOrAlias)) {
+            throw new Exception\InvalidServiceNameException('Service or alias names must be strings.');
+        }
+
+        $cAlias = $this->canonicalizeName($alias);
+
+        if ($alias == '' || $nameOrAlias == '') {
+            throw new Exception\InvalidServiceNameException('Invalid service name alias');
+        }
+
+        if ($this->allowOverride === false && $this->has([$cAlias, $alias], false)) {
+            throw new Exception\InvalidServiceNameException(sprintf(
+                'An alias by the name "%s" or "%s" already exists',
+                $cAlias,
+                $alias
+            ));
+        }
+
+        if ($this->hasAlias($alias)) {
+            $this->checkForCircularAliasReference($cAlias, $nameOrAlias);
+        }
+
+        $this->aliases[$cAlias] = $nameOrAlias;
+        return $this;
+    }
+
+    /**
+     * Determine if we have an alias
+     *
+     * @param  string $alias
+     * @return bool
+     */
+    public function hasAlias($alias)
+    {
+        return isset($this->aliases[$this->canonicalizeName($alias)]);
+    }
+
+    /**
+     * Create scoped service manager
+     *
+     * @param  string $peering
+     * @return ServiceManager
+     */
+    public function createScopedServiceManager($peering = self::SCOPE_PARENT)
+    {
+        $scopedServiceManager = new ServiceManager();
+        if ($peering == self::SCOPE_PARENT) {
+            $scopedServiceManager->peeringServiceManagers[] = $this;
+        }
+        if ($peering == self::SCOPE_CHILD) {
+            $this->peeringServiceManagers[] = $scopedServiceManager;
+        }
+        return $scopedServiceManager;
+    }
+
+    /**
+     * Add a peering relationship
+     *
+     * @param  ServiceManager $manager
+     * @param  string         $peering
+     * @return ServiceManager
+     */
+    public function addPeeringServiceManager(ServiceManager $manager, $peering = self::SCOPE_PARENT)
+    {
+        if ($peering == self::SCOPE_PARENT) {
+            $this->peeringServiceManagers[] = $manager;
+        }
+        if ($peering == self::SCOPE_CHILD) {
+            $manager->peeringServiceManagers[] = $this;
+        }
+        return $this;
+    }
+
+    /**
+     * Canonicalize name
+     *
+     * @param  string $name
+     * @return string
+     */
+    protected function canonicalizeName($name)
+    {
+        if (isset($this->canonicalNames[$name])) {
+            return $this->canonicalNames[$name];
+        }
+
+        // this is just for performance instead of using str_replace
+        return $this->canonicalNames[$name] = strtolower(strtr($name, $this->canonicalNamesReplacements));
+    }
+
+    /**
+     * Create service via callback
+     *
+     * @param  callable $callable
+     * @param  string   $cName
+     * @param  string   $rName
+     * @throws Exception\ServiceNotCreatedException
+     * @throws Exception\ServiceNotFoundException
+     * @throws Exception\CircularDependencyFoundException
+     * @return object
+     */
+    protected function createServiceViaCallback($callable, $cName, $rName)
+    {
+        static $circularDependencyResolver = [];
+        $depKey = spl_object_hash($this) . '-' . $cName;
+
+        if (isset($circularDependencyResolver[$depKey])) {
+            $circularDependencyResolver = [];
+            throw new Exception\CircularDependencyFoundException('Circular dependency for LazyServiceLoader was found for instance ' . $rName);
+        }
+
+        try {
+            $circularDependencyResolver[$depKey] = true;
+            $instance = call_user_func($callable, $this, $cName, $rName);
+            unset($circularDependencyResolver[$depKey]);
+        } catch (Exception\ServiceNotFoundException $e) {
+            unset($circularDependencyResolver[$depKey]);
+            throw $e;
+        } catch (\Exception $e) {
+            unset($circularDependencyResolver[$depKey]);
+            throw new Exception\ServiceNotCreatedException(
+                sprintf('An exception was raised while creating "%s"; no instance returned', $rName),
+                $e->getCode(),
+                $e
+            );
+        }
+        if ($instance === null) {
+            throw new Exception\ServiceNotCreatedException('The factory was called but did not return an instance.');
+        }
+
+        return $instance;
+    }
+
+    /**
+     * Retrieve a keyed list of all registered services. Handy for debugging!
+     *
+     * @return array
+     */
+    public function getRegisteredServices()
+    {
+        return [
+            'invokableClasses' => array_keys($this->invokableClasses),
+            'factories' => array_keys($this->factories),
+            'aliases' => array_keys($this->aliases),
+            'instances' => array_keys($this->instances),
+        ];
+    }
+
+    /**
+     * Retrieve a keyed list of all canonical names. Handy for debugging!
+     *
+     * @return array
+     */
+    public function getCanonicalNames()
+    {
+        return $this->canonicalNames;
+    }
+
+    /**
+     * Allows to override the canonical names lookup map with predefined
+     * values.
+     *
+     * @param array $canonicalNames
+     * @return ServiceManager
+     */
+    public function setCanonicalNames($canonicalNames)
+    {
+        $this->canonicalNames = $canonicalNames;
+
+        return $this;
+    }
+
+    /**
+     * Attempt to retrieve an instance via a peering manager
+     *
+     * @param  string $name
+     * @return mixed
+     */
+    protected function retrieveFromPeeringManager($name)
+    {
+        if (null !== ($service = $this->loopPeeringServiceManagers($name))) {
+            return $service;
+        }
+
+        $name = $this->canonicalizeName($name);
+
+        if ($this->hasAlias($name)) {
+            do {
+                $name = $this->aliases[$name];
+            } while ($this->hasAlias($name));
+        }
+
+        if (null !== ($service = $this->loopPeeringServiceManagers($name))) {
+            return $service;
+        }
+
+        return;
+    }
+
+    /**
+     * Loop over peering service managers.
+     *
+     * @param string $name
+     * @return mixed
+     */
+    protected function loopPeeringServiceManagers($name)
+    {
+        $caller = $this->serviceManagerCaller;
+
+        foreach ($this->peeringServiceManagers as $peeringServiceManager) {
+            // ignore peering service manager if they are the same instance
+            if ($caller === $peeringServiceManager) {
+                continue;
+            }
+
+            // pass this instance to peering service manager
+            $peeringServiceManager->serviceManagerCaller = $this;
+
+            if ($peeringServiceManager->has($name)) {
+                $this->shared[$name] = $peeringServiceManager->isShared($name);
+                $instance = $peeringServiceManager->get($name);
+                $peeringServiceManager->serviceManagerCaller = null;
+                return $instance;
+            }
+
+            $peeringServiceManager->serviceManagerCaller = null;
+        }
+
+        return;
+    }
+
+    /**
+     * Attempt to create an instance via an invokable class
+     *
+     * @param  string $canonicalName
+     * @param  string $requestedName
+     * @return null|\stdClass
+     * @throws Exception\ServiceNotFoundException If resolved class does not exist
+     */
+    protected function createFromInvokable($canonicalName, $requestedName)
+    {
+        $invokable = $this->invokableClasses[$canonicalName];
+        if (!class_exists($invokable)) {
+            throw new Exception\ServiceNotFoundException(sprintf(
+                '%s: failed retrieving "%s%s" via invokable class "%s"; class does not exist',
+                get_class($this) . '::' . __FUNCTION__,
+                $canonicalName,
+                ($requestedName ? '(alias: ' . $requestedName . ')' : ''),
+                $invokable
+            ));
+        }
+        $instance = new $invokable;
+        return $instance;
+    }
+
+    /**
+     * Attempt to create an instance via a factory
+     *
+     * @param  string $canonicalName
+     * @param  string $requestedName
+     * @return mixed
+     * @throws Exception\ServiceNotCreatedException If factory is not callable
+     */
+    protected function createFromFactory($canonicalName, $requestedName)
+    {
+        $factory = $this->factories[$canonicalName];
+        if (is_string($factory) && class_exists($factory, true)) {
+            $factory = new $factory;
+            $this->factories[$canonicalName] = $factory;
+        }
+        if ($factory instanceof FactoryInterface) {
+            $instance = $this->createServiceViaCallback([$factory, 'createService'], $canonicalName, $requestedName);
+        } elseif (is_callable($factory)) {
+            $instance = $this->createServiceViaCallback($factory, $canonicalName, $requestedName);
+        } else {
+            throw new Exception\ServiceNotCreatedException(sprintf(
+                'While attempting to create %s%s an invalid factory was registered for this instance type.',
+                $canonicalName,
+                ($requestedName ? '(alias: ' . $requestedName . ')' : '')
+            ));
+        }
+        return $instance;
+    }
+
+    /**
+     * Attempt to create an instance via an abstract factory
+     *
+     * @param  string $canonicalName
+     * @param  string $requestedName
+     * @return object|null
+     * @throws Exception\ServiceNotCreatedException If abstract factory is not callable
+     */
+    protected function createFromAbstractFactory($canonicalName, $requestedName)
+    {
+        if (isset($this->nestedContext[$canonicalName])) {
+            $abstractFactory = $this->nestedContext[$canonicalName];
+            $pendingKey = get_class($abstractFactory).$canonicalName;
+            try {
+                $this->pendingAbstractFactoryRequests[$pendingKey] = true;
+                $instance = $this->createServiceViaCallback(
+                    [$abstractFactory, 'createServiceWithName'],
+                    $canonicalName,
+                    $requestedName
+                );
+                unset($this->pendingAbstractFactoryRequests[$pendingKey]);
+                return $instance;
+            } catch (\Exception $e) {
+                unset($this->pendingAbstractFactoryRequests[$pendingKey]);
+                $this->checkNestedContextStop(true);
+                throw new Exception\ServiceNotCreatedException(
+                    sprintf(
+                        'An abstract factory could not create an instance of %s%s.',
+                        $canonicalName,
+                        ($requestedName ? '(alias: ' . $requestedName . ')' : '')
+                    ),
+                    $e->getCode(),
+                    $e
+                );
+            }
+        }
+        return;
+    }
+
+    /**
+     *
+     * @param string $cName
+     * @return self
+     */
+    protected function checkNestedContextStart($cName)
+    {
+        if ($this->nestedContextCounter === -1 || !isset($this->nestedContext[$cName])) {
+            $this->nestedContext[$cName] = null;
+        }
+        $this->nestedContextCounter++;
+        return $this;
+    }
+
+    /**
+     *
+     * @param bool $force
+     * @return self
+     */
+    protected function checkNestedContextStop($force = false)
+    {
+        if ($force) {
+            $this->nestedContextCounter = -1;
+            $this->nestedContext = [];
+            return $this;
+        }
+
+        $this->nestedContextCounter--;
+        if ($this->nestedContextCounter === -1) {
+            $this->nestedContext = [];
+        }
+        return $this;
+    }
+
+    /**
+     * @param $canonicalName
+     * @param $requestedName
+     * @return mixed
+     * @throws Exception\ServiceNotCreatedException
+     */
+    protected function createDelegatorFromFactory($canonicalName, $requestedName)
+    {
+        $delegatorsCount    = count($this->delegators[$canonicalName]);
+        $creationCallback   = function () use ($requestedName, $canonicalName) {
+            return $this->doCreate($requestedName, $canonicalName);
+        };
+
+        for ($i = 0; $i < $delegatorsCount; $i += 1) {
+            $delegatorFactory = $this->delegators[$canonicalName][$i];
+
+            if (is_string($delegatorFactory)) {
+                $delegatorFactory = !$this->has($delegatorFactory) && class_exists($delegatorFactory, true) ?
+                    new $delegatorFactory
+                    : $this->get($delegatorFactory);
+                $this->delegators[$canonicalName][$i] = $delegatorFactory;
+            }
+
+            if (!$delegatorFactory instanceof DelegatorFactoryInterface && !is_callable($delegatorFactory)) {
+                throw new Exception\ServiceNotCreatedException(sprintf(
+                    'While attempting to create %s%s an invalid factory was registered for this instance type.',
+                    $canonicalName,
+                    ($requestedName ? '(alias: ' . $requestedName . ')' : '')
+                ));
+            }
+
+            $creationCallback = $this->createDelegatorCallback(
+                $delegatorFactory,
+                $requestedName,
+                $canonicalName,
+                $creationCallback
+            );
+        }
+
+        return $creationCallback($this, $canonicalName, $requestedName, $creationCallback);
+    }
+
+    /**
+     * Checks if the object has this class as one of its parents
+     *
+     * @see https://bugs.php.net/bug.php?id=53727
+     * @see https://github.com/zendframework/zf2/pull/1807
+     *
+     * @deprecated since zf 2.3 requires PHP >= 5.3.23
+     *
+     * @param string $className
+     * @param string $type
+     * @return bool
+     *
+     * @deprecated this method is being deprecated as of zendframework 2.2, and may be removed in future major versions
+     */
+    protected static function isSubclassOf($className, $type)
+    {
+        return is_subclass_of($className, $type);
+    }
+
+    /**
+     * Unregister a service
+     *
+     * Called when $allowOverride is true and we detect that a service being
+     * added to the instance already exists. This will remove the duplicate
+     * entry, and also any shared flags previously registered.
+     *
+     * @param  string $canonical
+     * @return void
+     */
+    protected function unregisterService($canonical)
+    {
+        $types = ['invokableClasses', 'factories', 'aliases'];
+        foreach ($types as $type) {
+            if (isset($this->{$type}[$canonical])) {
+                unset($this->{$type}[$canonical]);
+                break;
+            }
+        }
+
+        if (isset($this->instances[$canonical])) {
+            unset($this->instances[$canonical]);
+        }
+
+        if (isset($this->shared[$canonical])) {
+            unset($this->shared[$canonical]);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceManagerAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceManagerAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/ServiceManagerAwareInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager;
+
+interface ServiceManagerAwareInterface
+{
+    /**
+     * Set service manager
+     *
+     * @param ServiceManager $serviceManager
+     */
+    public function setServiceManager(ServiceManager $serviceManager);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Test/CommonPluginManagerTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Test/CommonPluginManagerTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-servicemanager/src/Test/CommonPluginManagerTrait.php	(revision 5534)
@@ -0,0 +1,116 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\ServiceManager\Test;
+
+use ReflectionClass;
+use ReflectionProperty;
+use Zend\ServiceManager\Exception\InvalidServiceException;
+
+/**
+ * Trait for testing plugin managers for v2-v3 compatibility
+ *
+ * To use this trait:
+ *   * implement the `getPluginManager()` method to return your plugin manager
+ *   * implement the `getV2InvalidPluginException()` method to return the class `validatePlugin()` throws under v2
+ */
+trait CommonPluginManagerTrait
+{
+    public function testInstanceOfMatches()
+    {
+        $manager = $this->getPluginManager();
+        $reflection = new ReflectionProperty($manager, 'instanceOf');
+        $reflection->setAccessible(true);
+        $this->assertEquals($this->getInstanceOf(), $reflection->getValue($manager), 'instanceOf does not match');
+    }
+
+    public function testShareByDefaultAndSharedByDefault()
+    {
+        $manager = $this->getPluginManager();
+        $reflection = new ReflectionClass($manager);
+        $shareByDefault = $sharedByDefault = true;
+
+        foreach ($reflection->getProperties() as $prop) {
+            if ($prop->getName() == 'shareByDefault') {
+                $prop->setAccessible(true);
+                $shareByDefault = $prop->getValue($manager);
+            }
+            if ($prop->getName() == 'sharedByDefault') {
+                $prop->setAccessible(true);
+                $sharedByDefault = $prop->getValue($manager);
+            }
+        }
+
+        $this->assertTrue(
+            $shareByDefault == $sharedByDefault,
+            'Values of shareByDefault and sharedByDefault do not match'
+        );
+    }
+
+    public function testRegisteringInvalidElementRaisesException()
+    {
+        $this->setExpectedException($this->getServiceNotFoundException());
+        $this->getPluginManager()->setService('test', $this);
+    }
+
+    public function testLoadingInvalidElementRaisesException()
+    {
+        $manager = $this->getPluginManager();
+        $manager->setInvokableClass('test', get_class($this));
+        $this->setExpectedException($this->getServiceNotFoundException());
+        $manager->get('test');
+    }
+
+    /**
+     * @dataProvider aliasProvider
+     */
+    public function testPluginAliasesResolve($alias, $expected)
+    {
+        $this->assertInstanceOf($expected, $this->getPluginManager()->get($alias), "Alias '$alias' does not resolve'");
+    }
+
+    public function aliasProvider()
+    {
+        $manager = $this->getPluginManager();
+        $reflection = new ReflectionProperty($manager, 'aliases');
+        $reflection->setAccessible(true);
+        $data = [];
+        foreach ($reflection->getValue($manager) as $alias => $expected) {
+            $data[] = [$alias, $expected];
+        }
+        return $data;
+    }
+
+    protected function getServiceNotFoundException()
+    {
+        $manager = $this->getPluginManager();
+        if (method_exists($manager, 'configure')) {
+            return InvalidServiceException::class;
+        }
+        return $this->getV2InvalidPluginException();
+    }
+
+    /**
+     * Returns the plugin manager to test
+     * @return \Zend\ServiceManager\AbstractPluginManager
+     */
+    abstract protected function getPluginManager();
+
+    /**
+     * Returns the FQCN of the exception thrown under v2 by `validatePlugin()`
+     * @return mixed
+     */
+    abstract protected function getV2InvalidPluginException();
+
+    /**
+     * Returns the value the instanceOf property has been set to
+     * @return string
+     */
+    abstract protected function getInstanceOf();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/CHANGELOG.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/CHANGELOG.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/CHANGELOG.md	(revision 5534)
@@ -0,0 +1,223 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 2.7.4 - 2015-10-15
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- [#35](https://github.com/zendframework/zend-stdlib/pull/35) deprecates
+  `Zend\Stdlib\CallbackHandler`, as the one component that used it,
+  zend-eventmanager, will no longer depend on it starting in v3.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
+## 2.7.3 - 2015-09-24
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#27](https://github.com/zendframework/zend-stdlib/pull/27) fixes a race
+  condition in the `FastPriorityQueue::remove()` logic that occurs when removing
+  items iteratively from the same priority of a queue.
+
+## 2.7.2 - 2015-09-23
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#26](https://github.com/zendframework/zend-stdlib/pull/26) fixes a subtle
+  inheritance issue with deprecation in the hydrators, and updates the
+  `HydratorInterface` to also extend the zend-hydrator `HydratorInterface` to
+  ensure LSP is preserved.
+
+## 2.7.1 - 2015-09-22
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#24](https://github.com/zendframework/zend-stdlib/pull/24) fixes an import in
+  `FastPriorityQueue` to alias `SplPriorityQueue` in order to disambiguate with
+  the local override present in the component.
+
+## 2.7.0 - 2015-09-22
+
+### Added
+
+- [#19](https://github.com/zendframework/zend-stdlib/pull/19) adds a new
+  `FastPriorityQueue` implementation. It follows the same signature as
+  `SplPriorityQueue`, but uses a performance-optimized algorithm:
+
+  - inserts are 2x faster than `SplPriorityQueue` and 3x faster than the
+    `Zend\Stdlib\PriorityQueue` implementation.
+  - extracts are 4x faster than `SplPriorityQueue` and 4-5x faster than the
+    `Zend\Stdlib\PriorityQueue` implementation.
+
+  The intention is to use this as a drop-in replacement in the
+  `zend-eventmanager` component to provide performance benefits.
+
+### Deprecated
+
+- [#20](https://github.com/zendframework/zend-stdlib/pull/20) deprecates *all
+  hydrator* classes, in favor of the new [zend-hydrator](https://github.com/zendframework/zend-hydrator)
+  component. All classes were updated to extend their zend-hydrator equivalents,
+  and marked as `@deprecated`, indicating the equivalent class from the other
+  repository.
+
+  Users *should* immediately start changing their code to use the zend-hydrator
+  equivalents; in most cases, this can be as easy as removing the `Stdlib`
+  namespace from import statements or hydrator configuration. Hydrators will be
+  removed entirely from zend-stdlib in v3.0, and all future updates to hydrators
+  will occur in the zend-hydrator library.
+
+  Changes with backwards compatibility implications:
+
+  - Users implementing `Zend\Stdlib\Hydrator\HydratorAwareInterface` will need to
+    update their `setHydrator()` implementation to typehint on
+    `Zend\Hydrator\HydratorInterface`. This can be done by changing the import
+    statement for that interface as follows:
+
+    ```php
+    // Replace this:
+    use Zend\Stdlib\Hydrator\HydratorInterface;
+    // with this:
+    use Zend\Hydrator\HydratorInterface;
+    ```
+
+    If you are not using imports, change the typehint within the signature itself:
+
+    ```php
+    // Replace this:
+    public function setHydrator(\Zend\Stdlib\Hydrator\HydratorInterface $hydrator)
+    // with this:
+    public function setHydrator(\Zend\Hydrator\HydratorInterface $hydrator)
+    ```
+
+    If you are using `Zend\Stdlib\Hydrator\HydratorAwareTrait`, no changes are
+    necessary, unless you override that method.
+
+  - If you were catching hydrator-generated exceptions, these were previously in
+    the `Zend\Stdlib\Exception` namespace. You will need to update your code to
+    catch exceptions in the `Zend\Hydrator\Exception` namespace.
+
+  - Users who *do* migrate to zend-hydrator may end up in a situation where
+    their code will not work with existing libraries that are still type-hinting
+    on the zend-stdlib interfaces. We will be attempting to address that ASAP,
+    but the deprecation within zend-stdlib is necessary as a first step.
+
+    In the meantime, you can write hydrators targeting zend-stdlib still in
+    order to guarantee compatibility.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
+## 2.6.0 - 2015-07-21
+
+### Added
+
+- [#13](https://github.com/zendframework/zend-stdlib/pull/13) adds
+  `Zend\Stdlib\Hydrator\Iterator`, which provides mechanisms for hydrating
+  objects when iterating a traversable. This allows creating generic collection
+  resultsets; the original idea was pulled from
+  [PhlyMongo](https://github.com/phly/PhlyMongo), where it was used to hydrate
+  collections retrieved from MongoDB.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Nothing.
+
+## 2.5.2 - 2015-07-21
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#9](https://github.com/zendframework/zend-stdlib/pull/9) fixes an issue with
+  count incrementation during insert in PriorityList, ensuring that incrementation only
+  occurs when the item inserted was not previously present in the list.
+
+## 2.4.4 - 2015-07-21
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- [#9](https://github.com/zendframework/zend-stdlib/pull/9) fixes an issue with
+  count incrementation during insert in PriorityList, ensuring that incrementation only
+  occurs when the item inserted was not previously present in the list.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/CONTRIBUTING.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/CONTRIBUTING.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/CONTRIBUTING.md	(revision 5534)
@@ -0,0 +1,239 @@
+# CONTRIBUTING
+
+## RESOURCES
+
+If you wish to contribute to Zend Framework, please be sure to
+read/subscribe to the following resources:
+
+ -  [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
+ -  [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
+ -  ZF Contributor's mailing list:
+    Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
+    Subscribe: zf-contributors-subscribe@lists.zend.com
+ -  ZF Contributor's IRC channel:
+    #zftalk.dev on Freenode.net
+
+If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-stdlib/issues/new).
+
+## Reporting Potential Security Issues
+
+If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
+issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
+We will work with you to verify the vulnerability and patch it as soon as possible.
+
+When reporting issues, please provide the following information:
+
+- Component(s) affected
+- A description indicating how to reproduce the issue
+- A summary of the security vulnerability and impact
+
+We request that you contact us via the email address above and give the project
+contributors a chance to resolve the vulnerability and issue a new release prior
+to any public exposure; this helps protect users and provides them with a chance
+to upgrade and/or update in order to protect their applications.
+
+For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
+
+## RUNNING TESTS
+
+> ### Note: testing versions prior to 2.4
+>
+> This component originates with Zend Framework 2. During the lifetime of ZF2,
+> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
+> changes were necessary. However, due to the migration, tests may not run on
+> versions < 2.4. As such, you may need to change the PHPUnit dependency if
+> attempting a fix on such a version.
+
+To run tests:
+
+- Clone the repository:
+
+  ```console
+  $ git clone git@github.com:zendframework/zend-stdlib.git
+  $ cd
+  ```
+
+- Install dependencies via composer:
+
+  ```console
+  $ curl -sS https://getcomposer.org/installer | php --
+  $ ./composer.phar install
+  ```
+
+  If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
+
+- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
+
+  ```console
+  $ ./vendor/bin/phpunit
+  ```
+
+You can turn on conditional tests with the phpunit.xml file.
+To do so:
+
+ -  Copy `phpunit.xml.dist` file to `phpunit.xml`
+ -  Edit `phpunit.xml` to enable any specific functionality you
+    want to test, as well as to provide test values to utilize.
+
+## Running Coding Standards Checks
+
+This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
+standards checks, and provides configuration for our selected checks.
+`php-cs-fixer` is installed by default via Composer.
+
+To run checks only:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
+```
+
+To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
+flag:
+
+```console
+$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
+```
+
+If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
+they pass, and make sure you add and commit the changes after verification.
+
+## Benchmarks
+
+We provide benchmark tests for zend-stdlib under the directory [benchmark/](benchmark/),
+using.  [athletic](https://github.com/polyfractal/athletic).  You can execute
+the benchmarks running the following command:
+
+```bash
+$ ./vendor/bin/athletic -p benchmark
+```
+
+## Recommended Workflow for Contributions
+
+Your first step is to establish a public repository from which we can
+pull your work into the master repository. We recommend using
+[GitHub](https://github.com), as that is where the component is already hosted.
+
+1. Setup a [GitHub account](http://github.com/), if you haven't yet
+2. Fork the repository (http://github.com/zendframework/zend-stdlib)
+3. Clone the canonical repository locally and enter it.
+
+   ```console
+   $ git clone git://github.com:zendframework/zend-stdlib.git
+   $ cd zend-stdlib
+   ```
+
+4. Add a remote to your fork; substitute your GitHub username in the command
+   below.
+
+   ```console
+   $ git remote add {username} git@github.com:{username}/zend-stdlib.git
+   $ git fetch {username}
+   ```
+
+### Keeping Up-to-Date
+
+Periodically, you should update your fork or personal repository to
+match the canonical ZF repository. Assuming you have setup your local repository
+per the instructions above, you can do the following:
+
+
+```console
+$ git checkout master
+$ git fetch origin
+$ git rebase origin/master
+# OPTIONALLY, to keep your remote up-to-date -
+$ git push {username} master:master
+```
+
+If you're tracking other branches -- for example, the "develop" branch, where
+new feature development occurs -- you'll want to do the same operations for that
+branch; simply substitute  "develop" for "master".
+
+### Working on a patch
+
+We recommend you do each new feature or bugfix in a new branch. This simplifies
+the task of code review as well as the task of merging your changes into the
+canonical repository.
+
+A typical workflow will then consist of the following:
+
+1. Create a new local branch based off either your master or develop branch.
+2. Switch to your new local branch. (This step can be combined with the
+   previous step with the use of `git checkout -b`.)
+3. Do some work, commit, repeat as necessary.
+4. Push the local branch to your remote repository.
+5. Send a pull request.
+
+The mechanics of this process are actually quite trivial. Below, we will
+create a branch for fixing an issue in the tracker.
+
+```console
+$ git checkout -b hotfix/9295
+Switched to a new branch 'hotfix/9295'
+```
+
+... do some work ...
+
+
+```console
+$ git commit
+```
+
+... write your log message ...
+
+
+```console
+$ git push {username} hotfix/9295:hotfix/9295
+Counting objects: 38, done.
+Delta compression using up to 2 threads.
+Compression objects: 100% (18/18), done.
+Writing objects: 100% (20/20), 8.19KiB, done.
+Total 20 (delta 12), reused 0 (delta 0)
+To ssh://git@github.com/{username}/zend-stdlib.git
+   b5583aa..4f51698  HEAD -> master
+```
+
+To send a pull request, you have two options.
+
+If using GitHub, you can do the pull request from there. Navigate to
+your repository, select the branch you just created, and then select the
+"Pull Request" button in the upper right. Select the user/organization
+"zendframework" as the recipient.
+
+If using your own repository - or even if using GitHub - you can use `git
+format-patch` to create a patchset for us to apply; in fact, this is
+**recommended** for security-related patches. If you use `format-patch`, please
+send the patches as attachments to:
+
+-  zf-devteam@zend.com for patches without security implications
+-  zf-security@zend.com for security patches
+
+#### What branch to issue the pull request against?
+
+Which branch should you issue a pull request against?
+
+- For fixes against the stable release, issue the pull request against the
+  "master" branch.
+- For new features, or fixes that introduce new elements to the public API (such
+  as new public methods or properties), issue the pull request against the
+  "develop" branch.
+
+### Branch Cleanup
+
+As you might imagine, if you are a frequent contributor, you'll start to
+get a ton of branches both locally and on your remote.
+
+Once you know that your changes have been accepted to the master
+repository, we suggest doing some cleanup of these branches.
+
+-  Local branch cleanup
+
+   ```console
+   $ git branch -d <branchname>
+   ```
+
+-  Remote branch removal
+
+   ```console
+   $ git push {username} :<branchname>
+   ```
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/LICENSE.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/LICENSE.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/LICENSE.md	(revision 5534)
@@ -0,0 +1,28 @@
+Copyright (c) 2005-2015, Zend Technologies USA, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of Zend Technologies USA, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/README.md
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/README.md	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/README.md	(revision 5534)
@@ -0,0 +1,19 @@
+# zend-stdlib
+
+[![Build Status](https://secure.travis-ci.org/zendframework/zend-stdlib.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-stdlib)
+[![Coverage Status](https://coveralls.io/repos/zendframework/zend-stdlib/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-stdlib?branch=master)
+
+`Zend\Stdlib` is a set of components that implements general purpose utility
+class for different scopes like:
+
+- array utilities functions;
+- hydrators;
+- json serializable interfaces;
+- general messaging systems;
+- string wrappers;
+- etc.
+
+---
+
+- File issues at https://github.com/zendframework/zend-stdlib/issues
+- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-stdlib
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/ExtractPriorityQueue.php	(revision 5534)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace ZendBench\Stdlib;
+
+use Athletic\AthleticEvent;
+use Zend\Stdlib\FastPriorityQueue;
+use Zend\Stdlib\PriorityQueue;
+use Zend\Stdlib\SplPriorityQueue;
+
+class ExtractPriorityQueue extends AthleticEvent
+{
+    public function classSetUp()
+    {
+        $this->splPriorityQueue  = new SplPriorityQueue();
+        $this->fastPriorityQueue = new FastPriorityQueue();
+        $this->priorityQueue     = new PriorityQueue();
+
+        for ($i = 0; $i < 5000; $i += 1) {
+            $priority = rand(1, 100);
+            $this->splPriorityQueue->insert('foo', $priority);
+            $this->fastPriorityQueue->insert('foo', $priority);
+            $this->priorityQueue->insert('foo', $priority);
+        }
+    }
+
+    /**
+     * @iterations 5000
+     */
+    public function extractSplPriorityQueue()
+    {
+        $this->splPriorityQueue->extract();
+    }
+
+    /**
+     * @iterations 5000
+     */
+    public function extractPriorityQueue()
+    {
+        $this->priorityQueue->extract();
+    }
+
+    /**
+     * @iterations 5000
+     */
+    public function extractFastPriorityQueue()
+    {
+        $this->fastPriorityQueue->extract();
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/InsertPriorityQueue.php	(revision 5534)
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace ZendBench\Stdlib;
+
+use Athletic\AthleticEvent;
+use Zend\Stdlib\FastPriorityQueue;
+use Zend\Stdlib\PriorityQueue;
+use Zend\Stdlib\SplPriorityQueue;
+
+class InsertPriorityQueue extends AthleticEvent
+{
+    public function classSetUp()
+    {
+        $this->splPriorityQueue  = new SplPriorityQueue();
+        $this->fastPriorityQueue = new FastPriorityQueue();
+        $this->priorityQueue     = new PriorityQueue();
+    }
+
+    /**
+     * @iterations 5000
+     */
+    public function insertSplPriorityQueue()
+    {
+        $this->splPriorityQueue->insert('foo', rand(1, 100));
+    }
+
+    /**
+     * @iterations 5000
+     */
+    public function insertPriorityQueue()
+    {
+        $this->priorityQueue->insert('foo', rand(1, 100));
+    }
+
+    /**
+     * @iterations 5000
+     */
+    public function insertFastPriorityQueue()
+    {
+        $this->fastPriorityQueue->insert('foo', rand(1, 100));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php	(revision 5534)
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace ZendBench\Stdlib;
+
+use Athletic\AthleticEvent;
+use Zend\Stdlib\FastPriorityQueue;
+use Zend\Stdlib\PriorityQueue;
+
+class RemovePriorityQueue extends AthleticEvent
+{
+    public function classSetUp()
+    {
+        $this->fastPriorityQueue = new FastPriorityQueue();
+        $this->priorityQueue     = new PriorityQueue();
+
+        for ($i = 0; $i < 1000; $i += 1) {
+            $priority = rand(1, 100);
+            $this->fastPriorityQueue->insert('foo', $priority);
+            $this->priorityQueue->insert('foo', $priority);
+        }
+    }
+
+    /**
+     * @iterations 1000
+     */
+    public function removePriorityQueue()
+    {
+        $this->priorityQueue->remove('foo');
+    }
+
+    /**
+     * @iterations 1000
+     */
+    public function removeFastPriorityQueue()
+    {
+        $this->fastPriorityQueue->remove('foo');
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/composer.json
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/composer.json	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/composer.json	(revision 5534)
@@ -0,0 +1,50 @@
+{
+    "name": "zendframework/zend-stdlib",
+    "description": " ",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "zf2",
+        "stdlib"
+    ],
+    "homepage": "https://github.com/zendframework/zend-stdlib",
+    "autoload": {
+        "psr-4": {
+            "Zend\\Stdlib\\": "src/"
+        }
+    },
+    "require": {
+        "php": ">=5.5",
+        "zendframework/zend-hydrator": "~1.0"
+    },
+    "require-dev": {
+        "zendframework/zend-config": "~2.5",
+        "zendframework/zend-eventmanager": "~2.5",
+        "zendframework/zend-inputfilter": "~2.5",
+        "zendframework/zend-serializer": "~2.5",
+        "zendframework/zend-servicemanager": "~2.5",
+        "zendframework/zend-filter": "~2.5",
+        "fabpot/php-cs-fixer": "1.7.*",
+        "phpunit/PHPUnit": "~4.0",
+        "athletic/athletic": "~0.1"
+    },
+    "suggest": {
+        "zendframework/zend-eventmanager": "To support aggregate hydrator usage",
+        "zendframework/zend-serializer": "Zend\\Serializer component",
+        "zendframework/zend-servicemanager": "To support hydrator plugin manager usage",
+        "zendframework/zend-filter": "To support naming strategy hydrator usage"
+    },
+    "minimum-stability": "dev",
+    "prefer-stable": true,
+    "extra": {
+        "branch-alias": {
+            "dev-master": "2.7-dev",
+            "dev-develop": "2.8-dev"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "ZendTest\\Stdlib\\": "test/",
+            "ZendBench\\Stdlib\\": "benchmark/"
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/AbstractOptions.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/AbstractOptions.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/AbstractOptions.php	(revision 5534)
@@ -0,0 +1,176 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Traversable;
+
+abstract class AbstractOptions implements ParameterObjectInterface
+{
+    /**
+     * We use the __ prefix to avoid collisions with properties in
+     * user-implementations.
+     *
+     * @var bool
+     */
+    protected $__strictMode__ = true;
+
+    /**
+     * Constructor
+     *
+     * @param  array|Traversable|null $options
+     */
+    public function __construct($options = null)
+    {
+        if (null !== $options) {
+            $this->setFromArray($options);
+        }
+    }
+
+    /**
+     * Set one or more configuration properties
+     *
+     * @param  array|Traversable|AbstractOptions $options
+     * @throws Exception\InvalidArgumentException
+     * @return AbstractOptions Provides fluent interface
+     */
+    public function setFromArray($options)
+    {
+        if ($options instanceof self) {
+            $options = $options->toArray();
+        }
+
+        if (!is_array($options) && !$options instanceof Traversable) {
+            throw new Exception\InvalidArgumentException(
+                sprintf(
+                    'Parameter provided to %s must be an %s, %s or %s',
+                    __METHOD__,
+                    'array',
+                    'Traversable',
+                    'Zend\Stdlib\AbstractOptions'
+                )
+            );
+        }
+
+        foreach ($options as $key => $value) {
+            $this->__set($key, $value);
+        }
+
+        return $this;
+    }
+
+    /**
+     * Cast to array
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $array = [];
+        $transform = function ($letters) {
+            $letter = array_shift($letters);
+            return '_' . strtolower($letter);
+        };
+        foreach ($this as $key => $value) {
+            if ($key === '__strictMode__') {
+                continue;
+            }
+            $normalizedKey = preg_replace_callback('/([A-Z])/', $transform, $key);
+            $array[$normalizedKey] = $value;
+        }
+        return $array;
+    }
+
+    /**
+     * Set a configuration property
+     *
+     * @see ParameterObject::__set()
+     * @param string $key
+     * @param mixed $value
+     * @throws Exception\BadMethodCallException
+     * @return void
+     */
+    public function __set($key, $value)
+    {
+        $setter = 'set' . str_replace('_', '', $key);
+
+        if (is_callable([$this, $setter])) {
+            $this->{$setter}($value);
+
+            return;
+        }
+
+        if ($this->__strictMode__) {
+            throw new Exception\BadMethodCallException(sprintf(
+                'The option "%s" does not have a callable "%s" ("%s") setter method which must be defined',
+                $key,
+                'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))),
+                $setter
+            ));
+        }
+    }
+
+    /**
+     * Get a configuration property
+     *
+     * @see ParameterObject::__get()
+     * @param string $key
+     * @throws Exception\BadMethodCallException
+     * @return mixed
+     */
+    public function __get($key)
+    {
+        $getter = 'get' . str_replace('_', '', $key);
+
+        if (is_callable([$this, $getter])) {
+            return $this->{$getter}();
+        }
+
+        throw new Exception\BadMethodCallException(sprintf(
+            'The option "%s" does not have a callable "%s" getter method which must be defined',
+            $key,
+            'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)))
+        ));
+    }
+
+    /**
+     * Test if a configuration property is null
+     * @see ParameterObject::__isset()
+     * @param string $key
+     * @return bool
+     */
+    public function __isset($key)
+    {
+        $getter = 'get' . str_replace('_', '', $key);
+
+        return method_exists($this, $getter) && null !== $this->__get($key);
+    }
+
+    /**
+     * Set a configuration property to NULL
+     *
+     * @see ParameterObject::__unset()
+     * @param string $key
+     * @throws Exception\InvalidArgumentException
+     * @return void
+     */
+    public function __unset($key)
+    {
+        try {
+            $this->__set($key, null);
+        } catch (Exception\BadMethodCallException $e) {
+            throw new Exception\InvalidArgumentException(
+                'The class property $' . $key . ' cannot be unset as'
+                . ' NULL is an invalid value for it',
+                0,
+                $e
+            );
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayObject.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayObject.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayObject.php	(revision 5534)
@@ -0,0 +1,432 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use ArrayAccess;
+use Countable;
+use IteratorAggregate;
+use Serializable;
+
+/**
+ * Custom framework ArrayObject implementation
+ *
+ * Extends version-specific "abstract" implementation.
+ */
+class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable
+{
+    /**
+     * Properties of the object have their normal functionality
+     * when accessed as list (var_dump, foreach, etc.).
+     */
+    const STD_PROP_LIST = 1;
+
+    /**
+     * Entries can be accessed as properties (read and write).
+     */
+    const ARRAY_AS_PROPS = 2;
+
+    /**
+     * @var array
+     */
+    protected $storage;
+
+    /**
+     * @var int
+     */
+    protected $flag;
+
+    /**
+     * @var string
+     */
+    protected $iteratorClass;
+
+    /**
+     * @var array
+     */
+    protected $protectedProperties;
+
+    /**
+     * Constructor
+     *
+     * @param array  $input
+     * @param int    $flags
+     * @param string $iteratorClass
+     */
+    public function __construct($input = [], $flags = self::STD_PROP_LIST, $iteratorClass = 'ArrayIterator')
+    {
+        $this->setFlags($flags);
+        $this->storage = $input;
+        $this->setIteratorClass($iteratorClass);
+        $this->protectedProperties = array_keys(get_object_vars($this));
+    }
+
+    /**
+     * Returns whether the requested key exists
+     *
+     * @param  mixed $key
+     * @return bool
+     */
+    public function __isset($key)
+    {
+        if ($this->flag == self::ARRAY_AS_PROPS) {
+            return $this->offsetExists($key);
+        }
+        if (in_array($key, $this->protectedProperties)) {
+            throw new Exception\InvalidArgumentException('$key is a protected property, use a different key');
+        }
+
+        return isset($this->$key);
+    }
+
+    /**
+     * Sets the value at the specified key to value
+     *
+     * @param  mixed $key
+     * @param  mixed $value
+     * @return void
+     */
+    public function __set($key, $value)
+    {
+        if ($this->flag == self::ARRAY_AS_PROPS) {
+            return $this->offsetSet($key, $value);
+        }
+        if (in_array($key, $this->protectedProperties)) {
+            throw new Exception\InvalidArgumentException('$key is a protected property, use a different key');
+        }
+        $this->$key = $value;
+    }
+
+    /**
+     * Unsets the value at the specified key
+     *
+     * @param  mixed $key
+     * @return void
+     */
+    public function __unset($key)
+    {
+        if ($this->flag == self::ARRAY_AS_PROPS) {
+            return $this->offsetUnset($key);
+        }
+        if (in_array($key, $this->protectedProperties)) {
+            throw new Exception\InvalidArgumentException('$key is a protected property, use a different key');
+        }
+        unset($this->$key);
+    }
+
+    /**
+     * Returns the value at the specified key by reference
+     *
+     * @param  mixed $key
+     * @return mixed
+     */
+    public function &__get($key)
+    {
+        $ret = null;
+        if ($this->flag == self::ARRAY_AS_PROPS) {
+            $ret =& $this->offsetGet($key);
+
+            return $ret;
+        }
+        if (in_array($key, $this->protectedProperties)) {
+            throw new Exception\InvalidArgumentException('$key is a protected property, use a different key');
+        }
+
+        return $this->$key;
+    }
+
+    /**
+     * Appends the value
+     *
+     * @param  mixed $value
+     * @return void
+     */
+    public function append($value)
+    {
+        $this->storage[] = $value;
+    }
+
+    /**
+     * Sort the entries by value
+     *
+     * @return void
+     */
+    public function asort()
+    {
+        asort($this->storage);
+    }
+
+    /**
+     * Get the number of public properties in the ArrayObject
+     *
+     * @return int
+     */
+    public function count()
+    {
+        return count($this->storage);
+    }
+
+    /**
+     * Exchange the array for another one.
+     *
+     * @param  array|ArrayObject $data
+     * @return array
+     */
+    public function exchangeArray($data)
+    {
+        if (!is_array($data) && !is_object($data)) {
+            throw new Exception\InvalidArgumentException('Passed variable is not an array or object, using empty array instead');
+        }
+
+        if (is_object($data) && ($data instanceof self || $data instanceof \ArrayObject)) {
+            $data = $data->getArrayCopy();
+        }
+        if (!is_array($data)) {
+            $data = (array) $data;
+        }
+
+        $storage = $this->storage;
+
+        $this->storage = $data;
+
+        return $storage;
+    }
+
+    /**
+     * Creates a copy of the ArrayObject.
+     *
+     * @return array
+     */
+    public function getArrayCopy()
+    {
+        return $this->storage;
+    }
+
+    /**
+     * Gets the behavior flags.
+     *
+     * @return int
+     */
+    public function getFlags()
+    {
+        return $this->flag;
+    }
+
+    /**
+     * Create a new iterator from an ArrayObject instance
+     *
+     * @return \Iterator
+     */
+    public function getIterator()
+    {
+        $class = $this->iteratorClass;
+
+        return new $class($this->storage);
+    }
+
+    /**
+     * Gets the iterator classname for the ArrayObject.
+     *
+     * @return string
+     */
+    public function getIteratorClass()
+    {
+        return $this->iteratorClass;
+    }
+
+    /**
+     * Sort the entries by key
+     *
+     * @return void
+     */
+    public function ksort()
+    {
+        ksort($this->storage);
+    }
+
+    /**
+     * Sort an array using a case insensitive "natural order" algorithm
+     *
+     * @return void
+     */
+    public function natcasesort()
+    {
+        natcasesort($this->storage);
+    }
+
+    /**
+     * Sort entries using a "natural order" algorithm
+     *
+     * @return void
+     */
+    public function natsort()
+    {
+        natsort($this->storage);
+    }
+
+    /**
+     * Returns whether the requested key exists
+     *
+     * @param  mixed $key
+     * @return bool
+     */
+    public function offsetExists($key)
+    {
+        return isset($this->storage[$key]);
+    }
+
+    /**
+     * Returns the value at the specified key
+     *
+     * @param  mixed $key
+     * @return mixed
+     */
+    public function &offsetGet($key)
+    {
+        $ret = null;
+        if (!$this->offsetExists($key)) {
+            return $ret;
+        }
+        $ret =& $this->storage[$key];
+
+        return $ret;
+    }
+
+    /**
+     * Sets the value at the specified key to value
+     *
+     * @param  mixed $key
+     * @param  mixed $value
+     * @return void
+     */
+    public function offsetSet($key, $value)
+    {
+        $this->storage[$key] = $value;
+    }
+
+    /**
+     * Unsets the value at the specified key
+     *
+     * @param  mixed $key
+     * @return void
+     */
+    public function offsetUnset($key)
+    {
+        if ($this->offsetExists($key)) {
+            unset($this->storage[$key]);
+        }
+    }
+
+    /**
+     * Serialize an ArrayObject
+     *
+     * @return string
+     */
+    public function serialize()
+    {
+        return serialize(get_object_vars($this));
+    }
+
+    /**
+     * Sets the behavior flags
+     *
+     * @param  int  $flags
+     * @return void
+     */
+    public function setFlags($flags)
+    {
+        $this->flag = $flags;
+    }
+
+    /**
+     * Sets the iterator classname for the ArrayObject
+     *
+     * @param  string $class
+     * @return void
+     */
+    public function setIteratorClass($class)
+    {
+        if (class_exists($class)) {
+            $this->iteratorClass = $class;
+
+            return ;
+        }
+
+        if (strpos($class, '\\') === 0) {
+            $class = '\\' . $class;
+            if (class_exists($class)) {
+                $this->iteratorClass = $class;
+
+                return ;
+            }
+        }
+
+        throw new Exception\InvalidArgumentException('The iterator class does not exist');
+    }
+
+    /**
+     * Sort the entries with a user-defined comparison function and maintain key association
+     *
+     * @param  callable $function
+     * @return void
+     */
+    public function uasort($function)
+    {
+        if (is_callable($function)) {
+            uasort($this->storage, $function);
+        }
+    }
+
+    /**
+     * Sort the entries by keys using a user-defined comparison function
+     *
+     * @param  callable $function
+     * @return void
+     */
+    public function uksort($function)
+    {
+        if (is_callable($function)) {
+            uksort($this->storage, $function);
+        }
+    }
+
+    /**
+     * Unserialize an ArrayObject
+     *
+     * @param  string $data
+     * @return void
+     */
+    public function unserialize($data)
+    {
+        $ar                        = unserialize($data);
+        $this->protectedProperties = array_keys(get_object_vars($this));
+
+        $this->setFlags($ar['flag']);
+        $this->exchangeArray($ar['storage']);
+        $this->setIteratorClass($ar['iteratorClass']);
+
+        foreach ($ar as $k => $v) {
+            switch ($k) {
+                case 'flag':
+                    $this->setFlags($v);
+                    break;
+                case 'storage':
+                    $this->exchangeArray($v);
+                    break;
+                case 'iteratorClass':
+                    $this->setIteratorClass($v);
+                    break;
+                case 'protectedProperties':
+                    continue;
+                default:
+                    $this->__set($k, $v);
+            }
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArraySerializableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArraySerializableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArraySerializableInterface.php	(revision 5534)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface ArraySerializableInterface
+{
+    /**
+     * Exchange internal values from provided array
+     *
+     * @param  array $array
+     * @return void
+     */
+    public function exchangeArray(array $array);
+
+    /**
+     * Return an array representation of the object
+     *
+     * @return array
+     */
+    public function getArrayCopy();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayStack.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayStack.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayStack.php	(revision 5534)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use ArrayIterator;
+use ArrayObject as PhpArrayObject;
+
+/**
+ * ArrayObject that acts as a stack with regards to iteration
+ */
+class ArrayStack extends PhpArrayObject
+{
+    /**
+     * Retrieve iterator
+     *
+     * Retrieve an array copy of the object, reverse its order, and return an
+     * ArrayIterator with that reversed array.
+     *
+     * @return ArrayIterator
+     */
+    public function getIterator()
+    {
+        $array = $this->getArrayCopy();
+        return new ArrayIterator(array_reverse($array));
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils.php	(revision 5534)
@@ -0,0 +1,335 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Traversable;
+use Zend\Stdlib\ArrayUtils\MergeRemoveKey;
+use Zend\Stdlib\ArrayUtils\MergeReplaceKeyInterface;
+
+/**
+ * Utility class for testing and manipulation of PHP arrays.
+ *
+ * Declared abstract, as we have no need for instantiation.
+ */
+abstract class ArrayUtils
+{
+    /**
+     * Compatibility Flag for ArrayUtils::filter
+     */
+    const ARRAY_FILTER_USE_BOTH = 1;
+
+    /**
+     * Compatibility Flag for ArrayUtils::filter
+     */
+    const ARRAY_FILTER_USE_KEY  = 2;
+
+    /**
+     * Test whether an array contains one or more string keys
+     *
+     * @param  mixed $value
+     * @param  bool  $allowEmpty    Should an empty array() return true
+     * @return bool
+     */
+    public static function hasStringKeys($value, $allowEmpty = false)
+    {
+        if (!is_array($value)) {
+            return false;
+        }
+
+        if (!$value) {
+            return $allowEmpty;
+        }
+
+        return count(array_filter(array_keys($value), 'is_string')) > 0;
+    }
+
+    /**
+     * Test whether an array contains one or more integer keys
+     *
+     * @param  mixed $value
+     * @param  bool  $allowEmpty    Should an empty array() return true
+     * @return bool
+     */
+    public static function hasIntegerKeys($value, $allowEmpty = false)
+    {
+        if (!is_array($value)) {
+            return false;
+        }
+
+        if (!$value) {
+            return $allowEmpty;
+        }
+
+        return count(array_filter(array_keys($value), 'is_int')) > 0;
+    }
+
+    /**
+     * Test whether an array contains one or more numeric keys.
+     *
+     * A numeric key can be one of the following:
+     * - an integer 1,
+     * - a string with a number '20'
+     * - a string with negative number: '-1000'
+     * - a float: 2.2120, -78.150999
+     * - a string with float:  '4000.99999', '-10.10'
+     *
+     * @param  mixed $value
+     * @param  bool  $allowEmpty    Should an empty array() return true
+     * @return bool
+     */
+    public static function hasNumericKeys($value, $allowEmpty = false)
+    {
+        if (!is_array($value)) {
+            return false;
+        }
+
+        if (!$value) {
+            return $allowEmpty;
+        }
+
+        return count(array_filter(array_keys($value), 'is_numeric')) > 0;
+    }
+
+    /**
+     * Test whether an array is a list
+     *
+     * A list is a collection of values assigned to continuous integer keys
+     * starting at 0 and ending at count() - 1.
+     *
+     * For example:
+     * <code>
+     * $list = array('a', 'b', 'c', 'd');
+     * $list = array(
+     *     0 => 'foo',
+     *     1 => 'bar',
+     *     2 => array('foo' => 'baz'),
+     * );
+     * </code>
+     *
+     * @param  mixed $value
+     * @param  bool  $allowEmpty    Is an empty list a valid list?
+     * @return bool
+     */
+    public static function isList($value, $allowEmpty = false)
+    {
+        if (!is_array($value)) {
+            return false;
+        }
+
+        if (!$value) {
+            return $allowEmpty;
+        }
+
+        return (array_values($value) === $value);
+    }
+
+    /**
+     * Test whether an array is a hash table.
+     *
+     * An array is a hash table if:
+     *
+     * 1. Contains one or more non-integer keys, or
+     * 2. Integer keys are non-continuous or misaligned (not starting with 0)
+     *
+     * For example:
+     * <code>
+     * $hash = array(
+     *     'foo' => 15,
+     *     'bar' => false,
+     * );
+     * $hash = array(
+     *     1995  => 'Birth of PHP',
+     *     2009  => 'PHP 5.3.0',
+     *     2012  => 'PHP 5.4.0',
+     * );
+     * $hash = array(
+     *     'formElement,
+     *     'options' => array( 'debug' => true ),
+     * );
+     * </code>
+     *
+     * @param  mixed $value
+     * @param  bool  $allowEmpty    Is an empty array() a valid hash table?
+     * @return bool
+     */
+    public static function isHashTable($value, $allowEmpty = false)
+    {
+        if (!is_array($value)) {
+            return false;
+        }
+
+        if (!$value) {
+            return $allowEmpty;
+        }
+
+        return (array_values($value) !== $value);
+    }
+
+    /**
+     * Checks if a value exists in an array.
+     *
+     * Due to "foo" == 0 === TRUE with in_array when strict = false, an option
+     * has been added to prevent this. When $strict = 0/false, the most secure
+     * non-strict check is implemented. if $strict = -1, the default in_array
+     * non-strict behaviour is used.
+     *
+     * @param mixed $needle
+     * @param array $haystack
+     * @param int|bool $strict
+     * @return bool
+     */
+    public static function inArray($needle, array $haystack, $strict = false)
+    {
+        if (!$strict) {
+            if (is_int($needle) || is_float($needle)) {
+                $needle = (string) $needle;
+            }
+            if (is_string($needle)) {
+                foreach ($haystack as &$h) {
+                    if (is_int($h) || is_float($h)) {
+                        $h = (string) $h;
+                    }
+                }
+            }
+        }
+        return in_array($needle, $haystack, $strict);
+    }
+
+    /**
+     * Convert an iterator to an array.
+     *
+     * Converts an iterator to an array. The $recursive flag, on by default,
+     * hints whether or not you want to do so recursively.
+     *
+     * @param  array|Traversable  $iterator     The array or Traversable object to convert
+     * @param  bool               $recursive    Recursively check all nested structures
+     * @throws Exception\InvalidArgumentException if $iterator is not an array or a Traversable object
+     * @return array
+     */
+    public static function iteratorToArray($iterator, $recursive = true)
+    {
+        if (!is_array($iterator) && !$iterator instanceof Traversable) {
+            throw new Exception\InvalidArgumentException(__METHOD__ . ' expects an array or Traversable object');
+        }
+
+        if (!$recursive) {
+            if (is_array($iterator)) {
+                return $iterator;
+            }
+
+            return iterator_to_array($iterator);
+        }
+
+        if (method_exists($iterator, 'toArray')) {
+            return $iterator->toArray();
+        }
+
+        $array = [];
+        foreach ($iterator as $key => $value) {
+            if (is_scalar($value)) {
+                $array[$key] = $value;
+                continue;
+            }
+
+            if ($value instanceof Traversable) {
+                $array[$key] = static::iteratorToArray($value, $recursive);
+                continue;
+            }
+
+            if (is_array($value)) {
+                $array[$key] = static::iteratorToArray($value, $recursive);
+                continue;
+            }
+
+            $array[$key] = $value;
+        }
+
+        return $array;
+    }
+
+    /**
+     * Merge two arrays together.
+     *
+     * If an integer key exists in both arrays and preserveNumericKeys is false, the value
+     * from the second array will be appended to the first array. If both values are arrays, they
+     * are merged together, else the value of the second array overwrites the one of the first array.
+     *
+     * @param  array $a
+     * @param  array $b
+     * @param  bool  $preserveNumericKeys
+     * @return array
+     */
+    public static function merge(array $a, array $b, $preserveNumericKeys = false)
+    {
+        foreach ($b as $key => $value) {
+            if ($value instanceof MergeReplaceKeyInterface) {
+                $a[$key] = $value->getData();
+            } elseif (isset($a[$key]) || array_key_exists($key, $a)) {
+                if ($value instanceof MergeRemoveKey) {
+                    unset($a[$key]);
+                } elseif (!$preserveNumericKeys && is_int($key)) {
+                    $a[] = $value;
+                } elseif (is_array($value) && is_array($a[$key])) {
+                    $a[$key] = static::merge($a[$key], $value, $preserveNumericKeys);
+                } else {
+                    $a[$key] = $value;
+                }
+            } else {
+                if (!$value instanceof MergeRemoveKey) {
+                    $a[$key] = $value;
+                }
+            }
+        }
+
+        return $a;
+    }
+
+    /**
+     * Compatibility Method for array_filter on <5.6 systems
+     *
+     * @param array $data
+     * @param callable $callback
+     * @param null|int $flag
+     * @return array
+     */
+    public static function filter(array $data, $callback, $flag = null)
+    {
+        if (! is_callable($callback)) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                'Second parameter of %s must be callable',
+                __METHOD__
+            ));
+        }
+
+        if (version_compare(PHP_VERSION, '5.6.0') >= 0) {
+            return array_filter($data, $callback, $flag);
+        }
+
+        $output = [];
+        foreach ($data as $key => $value) {
+            $params = [$value];
+
+            if ($flag === static::ARRAY_FILTER_USE_BOTH) {
+                $params[] = $key;
+            }
+
+            if ($flag === static::ARRAY_FILTER_USE_KEY) {
+                $params = [$key];
+            }
+
+            $response = call_user_func_array($callback, $params);
+            if ($response) {
+                $output[$key] = $value;
+            }
+        }
+
+        return $output;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeRemoveKey.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeRemoveKey.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeRemoveKey.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\ArrayUtils;
+
+final class MergeRemoveKey
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKey.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKey.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKey.php	(revision 5534)
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\ArrayUtils;
+
+final class MergeReplaceKey implements MergeReplaceKeyInterface
+{
+    /**
+     * @var mixed
+     */
+    protected $data;
+
+    /**
+     * @param mixed $data
+     */
+    public function __construct($data)
+    {
+        $this->data = $data;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getData()
+    {
+        return $this->data;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\ArrayUtils;
+
+/**
+ * Marker interface: can be used to replace keys completely in {@see ArrayUtils::merge()} operations
+ */
+interface MergeReplaceKeyInterface
+{
+    /**
+     * @return mixed
+     */
+    public function getData();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/CallbackHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/CallbackHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/CallbackHandler.php	(revision 5534)
@@ -0,0 +1,197 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use ReflectionClass;
+
+/**
+ * CallbackHandler
+ *
+ * A handler for an event, event, filterchain, etc. Abstracts PHP callbacks,
+ * primarily to allow for lazy-loading and ensuring availability of default
+ * arguments (currying).
+ *
+ * This was primarily used in zend-eventmanager for managing listeners; as that
+ * component removes its usage of this class for v3, it is deprecated.
+ *
+ * @deprecated as of v2.7.4.
+ */
+class CallbackHandler
+{
+    /**
+     * @var string|array|callable PHP callback to invoke
+     */
+    protected $callback;
+
+    /**
+     * Callback metadata, if any
+     * @var array
+     */
+    protected $metadata;
+
+    /**
+     * Constructor
+     *
+     * @param  string|array|object|callable $callback PHP callback
+     * @param  array                        $metadata  Callback metadata
+     */
+    public function __construct($callback, array $metadata = [])
+    {
+        $this->metadata  = $metadata;
+        $this->registerCallback($callback);
+    }
+
+    /**
+     * Registers the callback provided in the constructor
+     *
+     * @param  callable $callback
+     * @throws Exception\InvalidCallbackException
+     * @return void
+     */
+    protected function registerCallback($callback)
+    {
+        if (!is_callable($callback)) {
+            throw new Exception\InvalidCallbackException('Invalid callback provided; not callable');
+        }
+
+        $this->callback = $callback;
+    }
+
+    /**
+     * Retrieve registered callback
+     *
+     * @return callable
+     */
+    public function getCallback()
+    {
+        return $this->callback;
+    }
+
+    /**
+     * Invoke handler
+     *
+     * @param  array $args Arguments to pass to callback
+     * @return mixed
+     */
+    public function call(array $args = [])
+    {
+        $callback = $this->getCallback();
+        $argCount = count($args);
+
+        if (is_string($callback)) {
+            $result = $this->validateStringCallbackFor54($callback);
+
+            if ($result !== true && $argCount <= 3) {
+                $callback       = $result;
+                // Minor performance tweak, if the callback gets called more
+                // than once
+                $this->callback = $result;
+            }
+        }
+
+        // Minor performance tweak; use call_user_func() until > 3 arguments
+        // reached
+        switch ($argCount) {
+            case 0:
+                return $callback();
+            case 1:
+                return $callback(array_shift($args));
+            case 2:
+                $arg1 = array_shift($args);
+                $arg2 = array_shift($args);
+                return $callback($arg1, $arg2);
+            case 3:
+                $arg1 = array_shift($args);
+                $arg2 = array_shift($args);
+                $arg3 = array_shift($args);
+                return $callback($arg1, $arg2, $arg3);
+            default:
+                return call_user_func_array($callback, $args);
+        }
+    }
+
+    /**
+     * Invoke as functor
+     *
+     * @return mixed
+     */
+    public function __invoke()
+    {
+        return $this->call(func_get_args());
+    }
+
+    /**
+     * Get all callback metadata
+     *
+     * @return array
+     */
+    public function getMetadata()
+    {
+        return $this->metadata;
+    }
+
+    /**
+     * Retrieve a single metadatum
+     *
+     * @param  string $name
+     * @return mixed
+     */
+    public function getMetadatum($name)
+    {
+        if (array_key_exists($name, $this->metadata)) {
+            return $this->metadata[$name];
+        }
+        return;
+    }
+
+    /**
+     * Validate a static method call
+     *
+     *
+     * @param  string $callback
+     * @return true|array
+     * @throws Exception\InvalidCallbackException if invalid
+     */
+    protected function validateStringCallbackFor54($callback)
+    {
+        if (!strstr($callback, '::')) {
+            return true;
+        }
+
+        list($class, $method) = explode('::', $callback, 2);
+
+        if (!class_exists($class)) {
+            throw new Exception\InvalidCallbackException(sprintf(
+                'Static method call "%s" refers to a class that does not exist',
+                $callback
+            ));
+        }
+
+        $r = new ReflectionClass($class);
+        if (!$r->hasMethod($method)) {
+            throw new Exception\InvalidCallbackException(sprintf(
+                'Static method call "%s" refers to a method that does not exist',
+                $callback
+            ));
+        }
+        $m = $r->getMethod($method);
+        if (!$m->isStatic()) {
+            throw new Exception\InvalidCallbackException(sprintf(
+                'Static method call "%s" refers to a method that is not static',
+                $callback
+            ));
+        }
+
+        // returning a non boolean value may not be nice for a validate method,
+        // but that allows the usage of a static string callback without using
+        // the call_user_func function.
+        return [$class, $method];
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/DateTime.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/DateTime.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/DateTime.php	(revision 5534)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use DateTimeZone;
+
+trigger_error('DateTime extension deprecated as of ZF 2.1.4; use the \DateTime constructor to parse extended ISO8601 dates instead', E_USER_DEPRECATED);
+
+/**
+ * DateTime
+ *
+ * An extension of the \DateTime object.
+ *
+ * @deprecated
+ */
+class DateTime extends \DateTime
+{
+    /**
+     * The DateTime::ISO8601 constant used by php's native DateTime object does
+     * not allow for fractions of a second. This function better handles ISO8601
+     * formatted date strings.
+     *
+     * @param  string       $time
+     * @param  DateTimeZone $timezone
+     * @return mixed
+     */
+    public static function createFromISO8601($time, DateTimeZone $timezone = null)
+    {
+        $format = self::ISO8601;
+        if (isset($time[19]) && $time[19] === '.') {
+            $format = 'Y-m-d\TH:i:s.uO';
+        }
+
+        if ($timezone !== null) {
+            return self::createFromFormat($format, $time, $timezone);
+        }
+
+        return self::createFromFormat($format, $time);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/DispatchableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/DispatchableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/DispatchableInterface.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface DispatchableInterface
+{
+    /**
+     * Dispatch a request
+     *
+     * @param RequestInterface $request
+     * @param null|ResponseInterface $response
+     * @return Response|mixed
+     */
+    public function dispatch(RequestInterface $request, ResponseInterface $response = null);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ErrorHandler.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ErrorHandler.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ErrorHandler.php	(revision 5534)
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use ErrorException;
+
+/**
+ * ErrorHandler that can be used to catch internal PHP errors
+ * and convert to an ErrorException instance.
+ */
+abstract class ErrorHandler
+{
+    /**
+     * Active stack
+     *
+     * @var array
+     */
+    protected static $stack = [];
+
+    /**
+     * Check if this error handler is active
+     *
+     * @return bool
+     */
+    public static function started()
+    {
+        return (bool) static::getNestedLevel();
+    }
+
+    /**
+     * Get the current nested level
+     *
+     * @return int
+     */
+    public static function getNestedLevel()
+    {
+        return count(static::$stack);
+    }
+
+    /**
+     * Starting the error handler
+     *
+     * @param int $errorLevel
+     */
+    public static function start($errorLevel = \E_WARNING)
+    {
+        if (!static::$stack) {
+            set_error_handler([get_called_class(), 'addError'], $errorLevel);
+        }
+
+        static::$stack[] = null;
+    }
+
+    /**
+     * Stopping the error handler
+     *
+     * @param  bool $throw Throw the ErrorException if any
+     * @return null|ErrorException
+     * @throws ErrorException If an error has been catched and $throw is true
+     */
+    public static function stop($throw = false)
+    {
+        $errorException = null;
+
+        if (static::$stack) {
+            $errorException = array_pop(static::$stack);
+
+            if (!static::$stack) {
+                restore_error_handler();
+            }
+
+            if ($errorException && $throw) {
+                throw $errorException;
+            }
+        }
+
+        return $errorException;
+    }
+
+    /**
+     * Stop all active handler
+     *
+     * @return void
+     */
+    public static function clean()
+    {
+        if (static::$stack) {
+            restore_error_handler();
+        }
+
+        static::$stack = [];
+    }
+
+    /**
+     * Add an error to the stack
+     *
+     * @param int    $errno
+     * @param string $errstr
+     * @param string $errfile
+     * @param int    $errline
+     * @return void
+     */
+    public static function addError($errno, $errstr = '', $errfile = '', $errline = 0)
+    {
+        $stack = & static::$stack[count(static::$stack) - 1];
+        $stack = new ErrorException($errstr, 0, $errno, $errfile, $errline, $stack);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/BadMethodCallException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/BadMethodCallException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/BadMethodCallException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Bad method call exception
+ */
+class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/DomainException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/DomainException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/DomainException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Domain exception
+ */
+class DomainException extends \DomainException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Exception marker interface
+ */
+interface ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/ExtensionNotLoadedException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/ExtensionNotLoadedException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/ExtensionNotLoadedException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Extension not loaded exception
+ */
+class ExtensionNotLoadedException extends RuntimeException
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Invalid Argument Exception
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/InvalidCallbackException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/InvalidCallbackException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/InvalidCallbackException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Invalid callback exception
+ */
+class InvalidCallbackException extends DomainException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/LogicException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/LogicException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/LogicException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Logic exception
+ */
+class LogicException extends \LogicException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/RuntimeException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/RuntimeException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Exception/RuntimeException.php	(revision 5534)
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Exception;
+
+/**
+ * Runtime exception
+ */
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Extractor/ExtractionInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Extractor;
+
+use Zend\Hydrator\ExtractionInterface as BaseExtractionInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\ExtractionInterface from zendframework/zend-hydrator instead.
+ */
+interface ExtractionInterface extends BaseExtractionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php	(revision 5534)
@@ -0,0 +1,343 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Iterator;
+use Countable;
+use Serializable;
+use SplPriorityQueue as PhpSplPriorityQueue;
+
+/**
+ * This is an efficient implementation of an integer priority queue in PHP
+ *
+ * This class acts like a queue with insert() and extract(), removing the
+ * elements from the queue and it also acts like an Iterator without removing
+ * the elements. This behaviour can be used in mixed scenarios with high
+ * performance boost.
+ */
+class FastPriorityQueue implements Iterator, Countable, Serializable
+{
+    const EXTR_DATA     = PhpSplPriorityQueue::EXTR_DATA;
+    const EXTR_PRIORITY = PhpSplPriorityQueue::EXTR_PRIORITY;
+    const EXTR_BOTH     = PhpSplPriorityQueue::EXTR_BOTH;
+
+    /**
+     * @var integer
+     */
+    protected $extractFlag = self::EXTR_DATA;
+
+    /**
+     * Elements of the queue, divided by priorities
+     *
+     * @var array
+     */
+    protected $values = [];
+
+    /**
+     * Array of priorities
+     *
+     * @var array
+     */
+    protected $priorities = [];
+
+    /**
+     * Array of priorities used for the iteration
+     *
+     * @var array
+     */
+    protected $subPriorities = [];
+
+    /**
+     * Max priority
+     *
+     * @var integer
+     */
+    protected $maxPriority = 0;
+
+    /**
+     * Total number of elements in the queue
+     *
+     * @var integer
+     */
+    protected $count = 0;
+
+    /**
+     * Index of the current element in the queue
+     *
+     * @var integer
+     */
+    protected $index = 0;
+
+    /**
+     * Sub index of the current element in the same priority level
+     *
+     * @var integer
+     */
+    protected $subIndex = 0;
+
+    /**
+     * Insert an element in the queue with a specified priority
+     *
+     * @param mixed $value
+     * @param integer $priority a positive integer
+     */
+    public function insert($value, $priority)
+    {
+        if (! is_int($priority)) {
+            throw new Exception\InvalidArgumentException('The priority must be an integer');
+        }
+        $this->values[$priority][] = $value;
+        if (! isset($this->priorities[$priority])) {
+            $this->priorities[$priority] = $priority;
+            $this->maxPriority           = max($priority, $this->maxPriority);
+        }
+        ++$this->count;
+    }
+
+    /**
+     * Extract an element in the queue according to the priority and the
+     * order of insertion
+     *
+     * @return mixed
+     */
+    public function extract()
+    {
+        if (! $this->valid()) {
+            return false;
+        }
+        $value = $this->current();
+        $this->nextAndRemove();
+        return $value;
+    }
+
+    /**
+     * Remove an item from the queue
+     *
+     * This is different than {@link extract()}; its purpose is to dequeue an
+     * item.
+     *
+     * Note: this removes the first item matching the provided item found. If
+     * the same item has been added multiple times, it will not remove other
+     * instances.
+     *
+     * @param  mixed $datum
+     * @return bool False if the item was not found, true otherwise.
+     */
+    public function remove($datum)
+    {
+        $this->rewind();
+        while ($this->valid()) {
+            if (current($this->values[$this->maxPriority]) === $datum) {
+                $index = key($this->values[$this->maxPriority]);
+                unset($this->values[$this->maxPriority][$index]);
+                --$this->count;
+                return true;
+            }
+            $this->next();
+        }
+        return false;
+    }
+
+    /**
+     * Get the total number of elements in the queue
+     *
+     * @return integer
+     */
+    public function count()
+    {
+        return $this->count;
+    }
+
+    /**
+     * Get the current element in the queue
+     *
+     * @return mixed
+     */
+    public function current()
+    {
+        switch ($this->extractFlag) {
+            case self::EXTR_DATA:
+                return current($this->values[$this->maxPriority]);
+            case self::EXTR_PRIORITY:
+                return $this->maxPriority;
+            case self::EXTR_BOTH:
+                return [
+                    'data'     => current($this->values[$this->maxPriority]),
+                    'priority' => $this->maxPriority
+                ];
+        }
+    }
+
+    /**
+     * Get the index of the current element in the queue
+     *
+     * @return integer
+     */
+    public function key()
+    {
+        return $this->index;
+    }
+
+    /**
+     * Set the iterator pointer to the next element in the queue
+     * removing the previous element
+     */
+    protected function nextAndRemove()
+    {
+        if (false === next($this->values[$this->maxPriority])) {
+            unset($this->priorities[$this->maxPriority]);
+            unset($this->values[$this->maxPriority]);
+            $this->maxPriority = empty($this->priorities) ? 0 : max($this->priorities);
+            $this->subIndex    = -1;
+        }
+        ++$this->index;
+        ++$this->subIndex;
+        --$this->count;
+    }
+
+    /**
+     * Set the iterator pointer to the next element in the queue
+     * without removing the previous element
+     */
+    public function next()
+    {
+        if (false === next($this->values[$this->maxPriority])) {
+            unset($this->subPriorities[$this->maxPriority]);
+            reset($this->values[$this->maxPriority]);
+            $this->maxPriority = empty($this->subPriorities) ? 0 : max($this->subPriorities);
+            $this->subIndex    = -1;
+        }
+        ++$this->index;
+        ++$this->subIndex;
+    }
+
+    /**
+     * Check if the current iterator is valid
+     *
+     * @return boolean
+     */
+    public function valid()
+    {
+        return isset($this->values[$this->maxPriority]);
+    }
+
+    /**
+     * Rewind the current iterator
+     */
+    public function rewind()
+    {
+        $this->subPriorities = $this->priorities;
+        $this->maxPriority   = empty($this->priorities) ? 0 : max($this->priorities);
+        $this->index         = 0;
+        $this->subIndex      = 0;
+    }
+
+    /**
+     * Serialize to an array
+     *
+     * Array will be priority => data pairs
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $array = [];
+        foreach (clone $this as $item) {
+            $array[] = $item;
+        }
+        return $array;
+    }
+
+    /**
+     * Serialize
+     *
+     * @return string
+     */
+    public function serialize()
+    {
+        $clone = clone $this;
+        $clone->setExtractFlags(self::EXTR_BOTH);
+
+        $data = [];
+        foreach ($clone as $item) {
+            $data[] = $item;
+        }
+
+        return serialize($data);
+    }
+
+    /**
+     * Deserialize
+     *
+     * @param  string $data
+     * @return void
+     */
+    public function unserialize($data)
+    {
+        foreach (unserialize($data) as $item) {
+            $this->insert($item['data'], $item['priority']);
+        }
+    }
+
+    /**
+     * Set the extract flag
+     *
+     * @param integer $flag
+     */
+    public function setExtractFlags($flag)
+    {
+        switch ($flag) {
+            case self::EXTR_DATA:
+            case self::EXTR_PRIORITY:
+            case self::EXTR_BOTH:
+                $this->extractFlag = $flag;
+                break;
+            default:
+                throw new Exception\InvalidArgumentException("The extract flag specified is not valid");
+        }
+    }
+
+    /**
+     * Check if the queue is empty
+     *
+     * @return boolean
+     */
+    public function isEmpty()
+    {
+        return empty($this->values);
+    }
+
+    /**
+     * Does the queue contain the given datum?
+     *
+     * @param  mixed $datum
+     * @return bool
+     */
+    public function contains($datum)
+    {
+        foreach ($this->values as $values) {
+            if (in_array($datum, $values)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Does the queue have an item with the given priority?
+     *
+     * @param  int $priority
+     * @return bool
+     */
+    public function hasPriority($priority)
+    {
+        return isset($this->values[$priority]);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Glob.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Glob.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Glob.php	(revision 5534)
@@ -0,0 +1,202 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+/**
+ * Wrapper for glob with fallback if GLOB_BRACE is not available.
+ */
+abstract class Glob
+{
+    /**#@+
+     * Glob constants.
+     */
+    const GLOB_MARK     = 0x01;
+    const GLOB_NOSORT   = 0x02;
+    const GLOB_NOCHECK  = 0x04;
+    const GLOB_NOESCAPE = 0x08;
+    const GLOB_BRACE    = 0x10;
+    const GLOB_ONLYDIR  = 0x20;
+    const GLOB_ERR      = 0x40;
+    /**#@-*/
+
+    /**
+     * Find pathnames matching a pattern.
+     *
+     * @see    http://docs.php.net/glob
+     * @param  string  $pattern
+     * @param  int $flags
+     * @param  bool $forceFallback
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    public static function glob($pattern, $flags = 0, $forceFallback = false)
+    {
+        if (!defined('GLOB_BRACE') || $forceFallback) {
+            return static::fallbackGlob($pattern, $flags);
+        }
+
+        return static::systemGlob($pattern, $flags);
+    }
+
+    /**
+     * Use the glob function provided by the system.
+     *
+     * @param  string  $pattern
+     * @param  int     $flags
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    protected static function systemGlob($pattern, $flags)
+    {
+        if ($flags) {
+            $flagMap = [
+                self::GLOB_MARK     => GLOB_MARK,
+                self::GLOB_NOSORT   => GLOB_NOSORT,
+                self::GLOB_NOCHECK  => GLOB_NOCHECK,
+                self::GLOB_NOESCAPE => GLOB_NOESCAPE,
+                self::GLOB_BRACE    => GLOB_BRACE,
+                self::GLOB_ONLYDIR  => GLOB_ONLYDIR,
+                self::GLOB_ERR      => GLOB_ERR,
+            ];
+
+            $globFlags = 0;
+
+            foreach ($flagMap as $internalFlag => $globFlag) {
+                if ($flags & $internalFlag) {
+                    $globFlags |= $globFlag;
+                }
+            }
+        } else {
+            $globFlags = 0;
+        }
+
+        ErrorHandler::start();
+        $res = glob($pattern, $globFlags);
+        $err = ErrorHandler::stop();
+        if ($res === false) {
+            throw new Exception\RuntimeException("glob('{$pattern}', {$globFlags}) failed", 0, $err);
+        }
+        return $res;
+    }
+
+    /**
+     * Expand braces manually, then use the system glob.
+     *
+     * @param  string  $pattern
+     * @param  int     $flags
+     * @return array
+     * @throws Exception\RuntimeException
+     */
+    protected static function fallbackGlob($pattern, $flags)
+    {
+        if (!$flags & self::GLOB_BRACE) {
+            return static::systemGlob($pattern, $flags);
+        }
+
+        $flags &= ~self::GLOB_BRACE;
+        $length = strlen($pattern);
+        $paths  = [];
+
+        if ($flags & self::GLOB_NOESCAPE) {
+            $begin = strpos($pattern, '{');
+        } else {
+            $begin = 0;
+
+            while (true) {
+                if ($begin === $length) {
+                    $begin = false;
+                    break;
+                } elseif ($pattern[$begin] === '\\' && ($begin + 1) < $length) {
+                    $begin++;
+                } elseif ($pattern[$begin] === '{') {
+                    break;
+                }
+
+                $begin++;
+            }
+        }
+
+        if ($begin === false) {
+            return static::systemGlob($pattern, $flags);
+        }
+
+        $next = static::nextBraceSub($pattern, $begin + 1, $flags);
+
+        if ($next === null) {
+            return static::systemGlob($pattern, $flags);
+        }
+
+        $rest = $next;
+
+        while ($pattern[$rest] !== '}') {
+            $rest = static::nextBraceSub($pattern, $rest + 1, $flags);
+
+            if ($rest === null) {
+                return static::systemGlob($pattern, $flags);
+            }
+        }
+
+        $p = $begin + 1;
+
+        while (true) {
+            $subPattern = substr($pattern, 0, $begin)
+                        . substr($pattern, $p, $next - $p)
+                        . substr($pattern, $rest + 1);
+
+            $result = static::fallbackGlob($subPattern, $flags | self::GLOB_BRACE);
+
+            if ($result) {
+                $paths = array_merge($paths, $result);
+            }
+
+            if ($pattern[$next] === '}') {
+                break;
+            }
+
+            $p    = $next + 1;
+            $next = static::nextBraceSub($pattern, $p, $flags);
+        }
+
+        return array_unique($paths);
+    }
+
+    /**
+     * Find the end of the sub-pattern in a brace expression.
+     *
+     * @param  string  $pattern
+     * @param  int $begin
+     * @param  int $flags
+     * @return int|null
+     */
+    protected static function nextBraceSub($pattern, $begin, $flags)
+    {
+        $length  = strlen($pattern);
+        $depth   = 0;
+        $current = $begin;
+
+        while ($current < $length) {
+            if (!$flags & self::GLOB_NOESCAPE && $pattern[$current] === '\\') {
+                if (++$current === $length) {
+                    break;
+                }
+
+                $current++;
+            } else {
+                if (($pattern[$current] === '}' && $depth-- === 0) || ($pattern[$current] === ',' && $depth === 0)) {
+                    break;
+                } elseif ($pattern[$current++] === '{') {
+                    $depth++;
+                }
+            }
+        }
+
+        return ($current < $length ? $current : null);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/AllGuardsTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/AllGuardsTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/AllGuardsTrait.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Guard;
+
+/**
+ * An aggregate for all guard traits
+ */
+trait AllGuardsTrait
+{
+    use ArrayOrTraversableGuardTrait;
+    use EmptyGuardTrait;
+    use NullGuardTrait;
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php	(revision 5534)
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Guard;
+
+use Traversable;
+
+/**
+ * Provide a guard method for array or Traversable data
+ */
+trait ArrayOrTraversableGuardTrait
+{
+    /**
+     * Verifies that the data is an array or Traversable
+     *
+     * @param  mixed  $data           the data to verify
+     * @param  string $dataName       the data name
+     * @param  string $exceptionClass FQCN for the exception
+     * @throws \Exception
+     */
+    protected function guardForArrayOrTraversable(
+        $data,
+        $dataName = 'Argument',
+        $exceptionClass = 'Zend\Stdlib\Exception\InvalidArgumentException'
+    ) {
+        if (!is_array($data) && !($data instanceof Traversable)) {
+            $message = sprintf(
+                "%s must be an array or Traversable, [%s] given",
+                $dataName,
+                is_object($data) ? get_class($data) : gettype($data)
+            );
+            throw new $exceptionClass($message);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/EmptyGuardTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/EmptyGuardTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/EmptyGuardTrait.php	(revision 5534)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Guard;
+
+/**
+ * Provide a guard method against empty data
+ */
+trait EmptyGuardTrait
+{
+    /**
+     * Verify that the data is not empty
+     *
+     * @param  mixed  $data           the data to verify
+     * @param  string $dataName       the data name
+     * @param  string $exceptionClass FQCN for the exception
+     * @throws \Exception
+     */
+    protected function guardAgainstEmpty(
+        $data,
+        $dataName = 'Argument',
+        $exceptionClass = 'Zend\Stdlib\Exception\InvalidArgumentException'
+    ) {
+        if (empty($data)) {
+            $message = sprintf('%s cannot be empty', $dataName);
+            throw new $exceptionClass($message);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/GuardUtils.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/GuardUtils.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/GuardUtils.php	(revision 5534)
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Guard;
+
+use Traversable;
+
+/**
+ * Static guard helper class
+ *
+ * Bridges the gap for allowing refactoring until traits can be used by default.
+ *
+ * @deprecated
+ */
+abstract class GuardUtils
+{
+    const DEFAULT_EXCEPTION_CLASS = 'Zend\Stdlib\Exception\InvalidArgumentException';
+
+    /**
+     * Verifies that the data is an array or Traversable
+     *
+     * @param  mixed  $data           the data to verify
+     * @param  string $dataName       the data name
+     * @param  string $exceptionClass FQCN for the exception
+     * @throws \Exception
+     */
+    public static function guardForArrayOrTraversable(
+        $data,
+        $dataName = 'Argument',
+        $exceptionClass = self::DEFAULT_EXCEPTION_CLASS
+    ) {
+        if (!is_array($data) && !($data instanceof Traversable)) {
+            $message = sprintf(
+                '%s must be an array or Traversable, [%s] given',
+                $dataName,
+                is_object($data) ? get_class($data) : gettype($data)
+            );
+            throw new $exceptionClass($message);
+        }
+    }
+
+    /**
+     * Verify that the data is not empty
+     *
+     * @param  mixed  $data           the data to verify
+     * @param  string $dataName       the data name
+     * @param  string $exceptionClass FQCN for the exception
+     * @throws \Exception
+     */
+    public static function guardAgainstEmpty(
+        $data,
+        $dataName = 'Argument',
+        $exceptionClass = self::DEFAULT_EXCEPTION_CLASS
+    ) {
+        if (empty($data)) {
+            $message = sprintf('%s cannot be empty', $dataName);
+            throw new $exceptionClass($message);
+        }
+    }
+
+    /**
+     * Verify that the data is not null
+     *
+     * @param  mixed  $data           the data to verify
+     * @param  string $dataName       the data name
+     * @param  string $exceptionClass FQCN for the exception
+     * @throws \Exception
+     */
+    public static function guardAgainstNull(
+        $data,
+        $dataName = 'Argument',
+        $exceptionClass = self::DEFAULT_EXCEPTION_CLASS
+    ) {
+        if (null === $data) {
+            $message = sprintf('%s cannot be null', $dataName);
+            throw new $exceptionClass($message);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/NullGuardTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/NullGuardTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Guard/NullGuardTrait.php	(revision 5534)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Guard;
+
+/**
+ * Provide a guard method against null data
+ */
+trait NullGuardTrait
+{
+    /**
+     * Verify that the data is not null
+     *
+     * @param  mixed  $data           the data to verify
+     * @param  string $dataName       the data name
+     * @param  string $exceptionClass FQCN for the exception
+     * @throws \Exception
+     */
+    protected function guardAgainstNull(
+        $data,
+        $dataName = 'Argument',
+        $exceptionClass = 'Zend\Stdlib\Exception\InvalidArgumentException'
+    ) {
+        if (null === $data) {
+            $message = sprintf('%s cannot be null', $dataName);
+            throw new $exceptionClass($message);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/AbstractHydrator.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\AbstractHydrator as BaseAbstractHydrator;
+
+/**
+ * @deprecated Use Zend\Hydrator\AbstractHydrator from zendframework/zend-hydrator instead.
+ */
+abstract class AbstractHydrator extends BaseAbstractHydrator implements HydratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Aggregate;
+
+use Zend\Hydrator\Aggregate\AggregateHydrator as BaseAggregateHydrator;
+use Zend\Stdlib\Hydrator\HydratorInterface;
+
+/**
+ * Aggregate hydrator that composes multiple hydrators via events
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\AggregateHydrator from zendframework/zend-hydrator instead.
+ */
+class AggregateHydrator extends BaseAggregateHydrator implements HydratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/ExtractEvent.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Aggregate;
+
+use Zend\Hydrator\Aggregate\ExtractEvent as BaseExtractEvent;
+
+/**
+ * Event triggered when the {@see \Zend\Stdlib\Hydrator\Aggregate\AggregateHydrator} extracts
+ * data from an object
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\ExtractEvent from zendframework/zend-hydrator instead.
+ */
+class ExtractEvent extends BaseExtractEvent
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydrateEvent.php	(revision 5534)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Aggregate;
+
+use Zend\Hydrator\Aggregate\HydrateEvent as BaseHydrateEvent;
+
+/**
+ * Event triggered when the {@see \Zend\Stdlib\Hydrator\Aggregate\AggregateHydrator} hydrates
+ * data into an object
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\HydrateEvent from zendframework/zend-hydrator instead.
+ */
+class HydrateEvent extends BaseHydrateEvent
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/HydratorListener.php	(revision 5534)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Aggregate;
+
+use Zend\Hydrator\Aggregate\HydratorListener as BaseHydratorListener;
+
+/**
+ * Aggregate listener wrapping around a hydrator. Listens
+ * to {@see \Zend\Stdlib\Hydrator\Aggregate::EVENT_HYDRATE} and
+ * {@see \Zend\Stdlib\Hydrator\Aggregate::EVENT_EXTRACT}
+ *
+ * @deprecated Use Zend\Hydrator\Aggregate\HydratorListener from zendframework/zend-hydrator instead.
+ */
+class HydratorListener extends BaseHydratorListener
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ArraySerializable.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\ArraySerializable as BaseArraySerializable;
+
+/**
+ * @deprecated Use Zend\Hydrator\ArraySerializable from zendframework/zend-hydrator instead.
+ */
+class ArraySerializable extends BaseArraySerializable implements HydratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ClassMethods.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\ClassMethods as BaseClassMethods;
+
+/**
+ * @deprecated Use Zend\Hydrator\ClassMethods from zendframework/zend-hydrator instead.
+ */
+class ClassMethods extends BaseClassMethods implements HydratorInterface, HydratorOptionsInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydrator.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\DelegatingHydrator as BaseDelegatingHydrator;
+
+/**
+ * @deprecated Use Zend\Hydrator\DelegatingHydrator from zendframework/zend-hydrator instead.
+ */
+class DelegatingHydrator extends BaseDelegatingHydrator implements HydratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/DelegatingHydratorFactory.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\DelegatingHydratorFactory as BaseDelegatingHydratorFactory;
+
+/**
+ * @deprecated Use Zend\Hydrator\DelegatingHydratorFactory from zendframework/zend-hydrator instead.
+ */
+class DelegatingHydratorFactory extends BaseDelegatingHydratorFactory
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterComposite.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\FilterComposite as BaseFilterComposite;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\FilterComposite from zendframework/zend-hydrator instead.
+ */
+class FilterComposite extends BaseFilterComposite implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterInterface.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\FilterInterface as BaseFilterInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\FilterInterface from zendframework/zend-hydrator instead.
+ */
+interface FilterInterface extends BaseFilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterProviderInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterProviderInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/FilterProviderInterface.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\FilterProviderInterface as BaseFilterProviderInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\FilterProviderInterface from zendframework/zend-hydrator instead.
+ */
+interface FilterProviderInterface extends BaseFilterProviderInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/GetFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/GetFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/GetFilter.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\GetFilter as BaseGetFilter;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\GetFilter from zendframework/zend-hydrator instead.
+ */
+class GetFilter extends BaseGetFilter implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/HasFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/HasFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/HasFilter.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\HasFilter as BaseHasFilter;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\HasFilter from zendframework/zend-hydrator instead.
+ */
+class HasFilter extends BaseHasFilter implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/IsFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/IsFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/IsFilter.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\IsFilter as BaseIsFilter;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\IsFilter from zendframework/zend-hydrator instead.
+ */
+class IsFilter extends BaseIsFilter implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/MethodMatchFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/MethodMatchFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/MethodMatchFilter.php	(revision 5534)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\MethodMatchFilter as BaseMethodMatchFilter;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\MethodMatchFilter from zendframework/zend-hydrator instead.
+ */
+class MethodMatchFilter extends BaseMethodMatchFilter implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/NumberOfParameterFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/NumberOfParameterFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/NumberOfParameterFilter.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\NumberOfParameterFilter as BaseNumberOfParameterFilter;
+
+/**
+ * @deprecated Use Zend\Hydrator\Filter\NumberOfParameterFilter from zendframework/zend-hydrator instead.
+ */
+class NumberOfParameterFilter extends BaseNumberOfParameterFilter implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/OptionalParametersFilter.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/OptionalParametersFilter.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Filter/OptionalParametersFilter.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link           http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright      Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license        http://framework.zend.com/license/new-bsd New BSD License
+ */
+namespace Zend\Stdlib\Hydrator\Filter;
+
+use Zend\Hydrator\Filter\OptionalParametersFilter as BaseOptionalParametersFilter;
+
+/**
+ * Filter that includes methods which have no parameters or only optional parameters
+ *
+ * @deprecated Use Zend\Hydrator\Filter\OptionalParametersFilter from zendframework/zend-hydrator instead.
+ */
+class OptionalParametersFilter extends BaseOptionalParametersFilter implements FilterInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/FilterEnabledInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/FilterEnabledInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/FilterEnabledInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\FilterEnabledInterface as BaseFilterEnabledInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\FilterEnabledInterface from zendframework/zend-hydrator instead.
+ */
+interface FilterEnabledInterface extends BaseFilterEnabledInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydrationInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydrationInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydrationInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\HydrationInterface as BaseHydrationInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\HydrationInterface from zendframework/zend-hydrator instead.
+ */
+interface HydrationInterface extends BaseHydrationInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\HydratorAwareInterface as BaseHydratorAwareInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\HydratorAwareInterface from zendframework/zend-hydrator instead.
+ */
+interface HydratorAwareInterface extends BaseHydratorAwareInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareTrait.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareTrait.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorAwareTrait.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\HydratorAwareTrait as BaseHydratorAwareTrait;
+
+/**
+ * @deprecated Use Zend\Hydrator\HydratorAwareTrait from zendframework/zend-hydrator instead.
+ */
+trait HydratorAwareTrait
+{
+    use BaseHydratorAwareTrait;
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorInterface.php	(revision 5534)
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Stdlib\Extractor\ExtractionInterface;
+use Zend\Hydrator\HydratorInterface as BaseHydratorInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\HydratorInterface from zendframework/zend-hydrator instead.
+ */
+interface HydratorInterface extends BaseHydratorInterface, HydrationInterface, ExtractionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorOptionsInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorOptionsInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorOptionsInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\HydratorOptionsInterface as BaseHydratorOptionsInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\HydratorOptionsInterface from zendframework/zend-hydrator instead.
+ */
+interface HydratorOptionsInterface extends BaseHydratorOptionsInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorPluginManager.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorPluginManager.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/HydratorPluginManager.php	(revision 5534)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\HydratorPluginManager as BaseHydratorPluginManager;
+
+/**
+ * Plugin manager implementation for hydrators.
+ *
+ * Enforces that adapters retrieved are instances of HydratorInterface
+ *
+ * @deprecated Use Zend\Hydrator\HydratorPluginManager from zendframework/zend-hydrator instead.
+ */
+class HydratorPluginManager extends BaseHydratorPluginManager
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingArrayIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingArrayIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingArrayIterator.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Iterator;
+
+use Zend\Hydrator\Iterator\HydratingArrayIterator as BaseHydratingArrayIterator;
+
+/**
+ * @deprecated Use Zend\Hydrator\Iterator\HydratingArrayIterator from zendframework/zend-hydrator instead.
+ */
+class HydratingArrayIterator extends BaseHydratingArrayIterator implements HydratingIteratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Iterator;
+
+use Zend\Hydrator\Iterator\HydratingIteratorInterface as BaseHydratingIteratorInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\Iterator\HydratingIteratorInterface from zendframework/zend-hydrator instead.
+ */
+interface HydratingIteratorInterface extends BaseHydratingIteratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorIterator.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorIterator.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Iterator/HydratingIteratorIterator.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Iterator;
+
+use Zend\Hydrator\Iterator\HydratingIteratorIterator as BaseHydratingIteratorIterator;
+
+/**
+ * @deprecated Use Zend\Hydrator\Iterator\HydratingIteratorIterator from zendframework/zend-hydrator instead.
+ */
+class HydratingIteratorIterator extends BaseHydratingIteratorIterator implements HydratingIteratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/ArrayMapNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/ArrayMapNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/ArrayMapNamingStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\NamingStrategy\ArrayMapNamingStrategy as BaseArrayMapNamingStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\NamingStrategy\ArrayMapNamingStrategy from zendframework/zend-hydrator instead.
+ */
+class ArrayMapNamingStrategy extends BaseArrayMapNamingStrategy implements NamingStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/CompositeNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/CompositeNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/CompositeNamingStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\NamingStrategy\CompositeNamingStrategy as BaseCompositeNamingStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\NamingStrategy\CompositeNamingStrategy from zendframework/zend-hydrator instead.
+ */
+class CompositeNamingStrategy extends BaseCompositeNamingStrategy implements NamingStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/IdentityNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/IdentityNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/IdentityNamingStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\NamingStrategy\IdentityNamingStrategy as BaseIdentityNamingStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\NamingStrategy\IdentityNamingStrategy from zendframework/zend-hydrator instead.
+ */
+class IdentityNamingStrategy extends BaseIdentityNamingStrategy implements NamingStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/MapNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/MapNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/MapNamingStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\NamingStrategy\MapNamingStrategy as BaseMapNamingStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\NamingStrategy\MapNamingStrategy from zendframework/zend-hydrator instead.
+ */
+class MapNamingStrategy extends BaseMapNamingStrategy implements NamingStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/NamingStrategyInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/NamingStrategyInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/NamingStrategyInterface.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\NamingStrategy\NamingStrategyInterface as BaseNamingStrategyInterface;
+
+/**
+ * Allow property extraction / hydration for hydrator
+ *
+ * @deprecated Use Zend\Hydrator\NamingStrategy\NamingStrategyInterface from zendframework/zend-hydrator instead.
+ */
+interface NamingStrategyInterface extends BaseNamingStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\NamingStrategy;
+
+use Zend\Hydrator\NamingStrategy\UnderscoreNamingStrategy as BaseUnderscoreNamingStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\NamingStrategy\UnderscoreNamingStrategy from zendframework/zend-hydrator instead.
+ */
+class UnderscoreNamingStrategy extends BaseUnderscoreNamingStrategy implements NamingStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategyEnabledInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategyEnabledInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/NamingStrategyEnabledInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\NamingStrategyEnabledInterface as BaseNamingStrategyEnabledInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\NamingStrategy\NamingStrategyEnabledInterface from zendframework/zend-hydrator instead.
+ */
+interface NamingStrategyEnabledInterface extends BaseNamingStrategyEnabledInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ObjectProperty.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ObjectProperty.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/ObjectProperty.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\ObjectProperty as BaseObjectProperty;
+
+/**
+ * @deprecated Use Zend\Hydrator\ObjectProperty from zendframework/zend-hydrator instead.
+ */
+class ObjectProperty extends BaseObjectProperty implements HydratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Reflection.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Reflection.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Reflection.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\Reflection as BaseReflection;
+
+/**
+ * @deprecated Use Zend\Hydrator\Reflection from zendframework/zend-hydrator instead.
+ */
+class Reflection extends BaseReflection implements HydratorInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/BooleanStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/BooleanStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/BooleanStrategy.php	(revision 5534)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\BooleanStrategy as BaseBooleanStrategy;
+
+/**
+ * This Strategy extracts and hydrates int and string values to Boolean values
+ *
+ * @deprecated Use Zend\Hydrator\Strategy\BooleanStrategy from zendframework/zend-hydrator instead.
+ */
+class BooleanStrategy extends BaseBooleanStrategy implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ClosureStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ClosureStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ClosureStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\ClosureStrategy as BaseClosureStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\ClosureStrategy from zendframework/zend-hydrator instead.
+ */
+class ClosureStrategy extends BaseClosureStrategy implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DateTimeFormatterStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DateTimeFormatterStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DateTimeFormatterStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\DateTimeFormatterStrategy as BaseDateTimeFormatterStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\DateTimeFormatterStrategy from zendframework/zend-hydrator instead.
+ */
+class DateTimeFormatterStrategy extends BaseDateTimeFormatterStrategy implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DefaultStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DefaultStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/DefaultStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\DefaultStrategy as BaseDefaultStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\DefaultStrategy from zendframework/zend-hydrator instead.
+ */
+class DefaultStrategy extends BaseDefaultStrategy implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/ExceptionInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/ExceptionInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/ExceptionInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy\Exception;
+
+use Zend\Hydrator\Strategy\Exception;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\Exception\ExceptionInterface from zendframework/zend-hydrator instead.
+ */
+interface ExceptionInterface extends Exception\ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/InvalidArgumentException.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/InvalidArgumentException.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/InvalidArgumentException.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy\Exception;
+
+use Zend\Hydrator\Strategy\Exception\InvalidArgumentException as BaseInvalidArgumentException;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\Exception\InvalidArgumentException from zendframework/zend-hydrator instead.
+ */
+class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ExplodeStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ExplodeStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/ExplodeStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\ExplodeStrategy as BaseExplodeStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\ExplodeStrategy from zendframework/zend-hydrator instead.
+ */
+class ExplodeStrategy extends BaseExplodeStrategy implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/SerializableStrategy.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/SerializableStrategy.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/SerializableStrategy.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\SerializableStrategy as BaseSerializableStrategy;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\SerializableStrategy from zendframework/zend-hydrator instead.
+ */
+class SerializableStrategy extends BaseSerializableStrategy implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyChain.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyChain.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyChain.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\StrategyChain as BaseStrategyChain;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\StrategyChain from zendframework/zend-hydrator instead.
+ */
+class StrategyChain extends BaseStrategyChain implements StrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator\Strategy;
+
+use Zend\Hydrator\Strategy\StrategyInterface as BaseStrategyInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\StrategyInterface from zendframework/zend-hydrator instead.
+ */
+interface StrategyInterface extends BaseStrategyInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/StrategyEnabledInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/StrategyEnabledInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Hydrator/StrategyEnabledInterface.php	(revision 5534)
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\Hydrator;
+
+use Zend\Hydrator\StrategyEnabledInterface as BaseStrategyEnabledInterface;
+
+/**
+ * @deprecated Use Zend\Hydrator\Strategy\StrategyEnabledInterface from zendframework/zend-hydrator instead.
+ */
+interface StrategyEnabledInterface extends BaseStrategyEnabledInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/InitializableInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/InitializableInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/InitializableInterface.php	(revision 5534)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+/**
+ * Interface to allow objects to have initialization logic
+ */
+interface InitializableInterface
+{
+    /**
+     * Init an object
+     *
+     * @return void
+     */
+    public function init();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/JsonSerializable.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/JsonSerializable.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/JsonSerializable.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface JsonSerializable extends \JsonSerializable
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Message.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Message.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Message.php	(revision 5534)
@@ -0,0 +1,118 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Traversable;
+
+class Message implements MessageInterface
+{
+    /**
+     * @var array
+     */
+    protected $metadata = [];
+
+    /**
+     * @var string
+     */
+    protected $content = '';
+
+    /**
+     * Set message metadata
+     *
+     * Non-destructive setting of message metadata; always adds to the metadata, never overwrites
+     * the entire metadata container.
+     *
+     * @param  string|int|array|Traversable $spec
+     * @param  mixed $value
+     * @throws Exception\InvalidArgumentException
+     * @return Message
+     */
+    public function setMetadata($spec, $value = null)
+    {
+        if (is_scalar($spec)) {
+            $this->metadata[$spec] = $value;
+            return $this;
+        }
+        if (!is_array($spec) && !$spec instanceof Traversable) {
+            throw new Exception\InvalidArgumentException(sprintf(
+                'Expected a string, array, or Traversable argument in first position; received "%s"',
+                (is_object($spec) ? get_class($spec) : gettype($spec))
+            ));
+        }
+        foreach ($spec as $key => $value) {
+            $this->metadata[$key] = $value;
+        }
+        return $this;
+    }
+
+    /**
+     * Retrieve all metadata or a single metadatum as specified by key
+     *
+     * @param  null|string|int $key
+     * @param  null|mixed $default
+     * @throws Exception\InvalidArgumentException
+     * @return mixed
+     */
+    public function getMetadata($key = null, $default = null)
+    {
+        if (null === $key) {
+            return $this->metadata;
+        }
+
+        if (!is_scalar($key)) {
+            throw new Exception\InvalidArgumentException('Non-scalar argument provided for key');
+        }
+
+        if (array_key_exists($key, $this->metadata)) {
+            return $this->metadata[$key];
+        }
+
+        return $default;
+    }
+
+    /**
+     * Set message content
+     *
+     * @param  mixed $value
+     * @return Message
+     */
+    public function setContent($value)
+    {
+        $this->content = $value;
+        return $this;
+    }
+
+    /**
+     * Get message content
+     *
+     * @return mixed
+     */
+    public function getContent()
+    {
+        return $this->content;
+    }
+
+    /**
+     * @return string
+     */
+    public function toString()
+    {
+        $request = '';
+        foreach ($this->getMetadata() as $key => $value) {
+            $request .= sprintf(
+                "%s: %s\r\n",
+                (string) $key,
+                (string) $value
+            );
+        }
+        $request .= "\r\n" . $this->getContent();
+        return $request;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/MessageInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/MessageInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/MessageInterface.php	(revision 5534)
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface MessageInterface
+{
+    /**
+     * Set metadata
+     *
+     * @param  string|int|array|\Traversable $spec
+     * @param  mixed $value
+     */
+    public function setMetadata($spec, $value = null);
+
+    /**
+     * Get metadata
+     *
+     * @param  null|string|int $key
+     * @return mixed
+     */
+    public function getMetadata($key = null);
+
+    /**
+     * Set content
+     *
+     * @param  mixed $content
+     * @return mixed
+     */
+    public function setContent($content);
+
+    /**
+     * Get content
+     *
+     * @return mixed
+     */
+    public function getContent();
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ParameterObjectInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ParameterObjectInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ParameterObjectInterface.php	(revision 5534)
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface ParameterObjectInterface
+{
+    /**
+     * @param string $key
+     * @param mixed $value
+     * @return void
+     */
+    public function __set($key, $value);
+
+    /**
+     * @param string $key
+     * @return mixed
+     */
+    public function __get($key);
+
+    /**
+     * @param string $key
+     * @return bool
+     */
+    public function __isset($key);
+
+    /**
+     * @param string $key
+     * @return void
+     */
+    public function __unset($key);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Parameters.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Parameters.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Parameters.php	(revision 5534)
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use ArrayObject as PhpArrayObject;
+
+class Parameters extends PhpArrayObject implements ParametersInterface
+{
+    /**
+     * Constructor
+     *
+     * Enforces that we have an array, and enforces parameter access to array
+     * elements.
+     *
+     * @param  array $values
+     */
+    public function __construct(array $values = null)
+    {
+        if (null === $values) {
+            $values = [];
+        }
+        parent::__construct($values, ArrayObject::ARRAY_AS_PROPS);
+    }
+
+    /**
+     * Populate from native PHP array
+     *
+     * @param  array $values
+     * @return void
+     */
+    public function fromArray(array $values)
+    {
+        $this->exchangeArray($values);
+    }
+
+    /**
+     * Populate from query string
+     *
+     * @param  string $string
+     * @return void
+     */
+    public function fromString($string)
+    {
+        $array = [];
+        parse_str($string, $array);
+        $this->fromArray($array);
+    }
+
+    /**
+     * Serialize to native PHP array
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        return $this->getArrayCopy();
+    }
+
+    /**
+     * Serialize to query string
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return http_build_query($this);
+    }
+
+    /**
+     * Retrieve by key
+     *
+     * Returns null if the key does not exist.
+     *
+     * @param  string $name
+     * @return mixed
+     */
+    public function offsetGet($name)
+    {
+        if ($this->offsetExists($name)) {
+            return parent::offsetGet($name);
+        }
+        return;
+    }
+
+    /**
+     * @param string $name
+     * @param mixed $default optional default value
+     * @return mixed
+     */
+    public function get($name, $default = null)
+    {
+        if ($this->offsetExists($name)) {
+            return parent::offsetGet($name);
+        }
+        return $default;
+    }
+
+    /**
+     * @param string $name
+     * @param mixed $value
+     * @return Parameters
+     */
+    public function set($name, $value)
+    {
+        $this[$name] = $value;
+        return $this;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ParametersInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ParametersInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ParametersInterface.php	(revision 5534)
@@ -0,0 +1,86 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use ArrayAccess;
+use Countable;
+use Serializable;
+use Traversable;
+
+/*
+ * Basically, an ArrayObject. You could simply define something like:
+ *     class QueryParams extends ArrayObject implements Parameters {}
+ * and have 90% of the functionality
+ */
+interface ParametersInterface extends ArrayAccess, Countable, Serializable, Traversable
+{
+    /**
+     * Constructor
+     *
+     * @param array $values
+     */
+    public function __construct(array $values = null);
+
+    /**
+     * From array
+     *
+     * Allow deserialization from standard array
+     *
+     * @param array $values
+     * @return mixed
+     */
+    public function fromArray(array $values);
+
+    /**
+     * From string
+     *
+     * Allow deserialization from raw body; e.g., for PUT requests
+     *
+     * @param $string
+     * @return mixed
+     */
+    public function fromString($string);
+
+    /**
+     * To array
+     *
+     * Allow serialization back to standard array
+     *
+     * @return mixed
+     */
+    public function toArray();
+
+    /**
+     * To string
+     *
+     * Allow serialization to query format; e.g., for PUT or POST requests
+     *
+     * @return mixed
+     */
+    public function toString();
+
+    /**
+     * Get
+     *
+     * @param string $name
+     * @param mixed|null $default
+     * @return mixed
+     */
+    public function get($name, $default = null);
+
+    /**
+     * Set
+     *
+     * @param string $name
+     * @param mixed $value
+     * @return ParametersInterface
+     */
+    public function set($name, $value);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/PriorityList.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/PriorityList.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/PriorityList.php	(revision 5534)
@@ -0,0 +1,274 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Countable;
+use Iterator;
+
+class PriorityList implements Iterator, Countable
+{
+    const EXTR_DATA     = 0x00000001;
+    const EXTR_PRIORITY = 0x00000002;
+    const EXTR_BOTH     = 0x00000003;
+    /**
+     * Internal list of all items.
+     *
+     * @var array[]
+     */
+    protected $items = [];
+
+    /**
+     * Serial assigned to items to preserve LIFO.
+     *
+     * @var int
+     */
+    protected $serial = 0;
+
+    /**
+     * Serial order mode
+     * @var integer
+     */
+    protected $isLIFO = 1;
+
+    /**
+     * Internal counter to avoid usage of count().
+     *
+     * @var int
+     */
+    protected $count = 0;
+
+    /**
+     * Whether the list was already sorted.
+     *
+     * @var bool
+     */
+    protected $sorted = false;
+
+    /**
+     * Insert a new item.
+     *
+     * @param  string  $name
+     * @param  mixed   $value
+     * @param  int     $priority
+     *
+     * @return void
+     */
+    public function insert($name, $value, $priority = 0)
+    {
+        if (!isset($this->items[$name])) {
+            $this->count++;
+        }
+
+        $this->sorted = false;
+
+        $this->items[$name] = [
+            'data'     => $value,
+            'priority' => (int) $priority,
+            'serial'   => $this->serial++,
+        ];
+    }
+
+    /**
+     * @param string $name
+     * @param int    $priority
+     *
+     * @return $this
+     *
+     * @throws \Exception
+     */
+    public function setPriority($name, $priority)
+    {
+        if (!isset($this->items[$name])) {
+            throw new \Exception("item $name not found");
+        }
+
+        $this->items[$name]['priority'] = (int) $priority;
+        $this->sorted                   = false;
+
+        return $this;
+    }
+
+    /**
+     * Remove a item.
+     *
+     * @param  string $name
+     * @return void
+     */
+    public function remove($name)
+    {
+        if (isset($this->items[$name])) {
+            $this->count--;
+        }
+
+        unset($this->items[$name]);
+    }
+
+    /**
+     * Remove all items.
+     *
+     * @return void
+     */
+    public function clear()
+    {
+        $this->items  = [];
+        $this->serial = 0;
+        $this->count  = 0;
+        $this->sorted = false;
+    }
+
+    /**
+     * Get a item.
+     *
+     * @param  string $name
+     * @return mixed
+     */
+    public function get($name)
+    {
+        if (!isset($this->items[$name])) {
+            return;
+        }
+
+        return $this->items[$name]['data'];
+    }
+
+    /**
+     * Sort all items.
+     *
+     * @return void
+     */
+    protected function sort()
+    {
+        if (!$this->sorted) {
+            uasort($this->items, [$this, 'compare']);
+            $this->sorted = true;
+        }
+    }
+
+    /**
+     * Compare the priority of two items.
+     *
+     * @param  array $item1,
+     * @param  array $item2
+     * @return int
+     */
+    protected function compare(array $item1, array $item2)
+    {
+        return ($item1['priority'] === $item2['priority'])
+            ? ($item1['serial']   > $item2['serial']   ? -1 : 1) * $this->isLIFO
+            : ($item1['priority'] > $item2['priority'] ? -1 : 1);
+    }
+
+    /**
+     * Get/Set serial order mode
+     *
+     * @param bool|null $flag
+     *
+     * @return bool
+     */
+    public function isLIFO($flag = null)
+    {
+        if ($flag !== null) {
+            $isLifo = $flag === true ? 1 : -1;
+
+            if ($isLifo !== $this->isLIFO) {
+                $this->isLIFO = $isLifo;
+                $this->sorted = false;
+            }
+        }
+
+        return 1 === $this->isLIFO;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function rewind()
+    {
+        $this->sort();
+        reset($this->items);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function current()
+    {
+        $this->sorted || $this->sort();
+        $node = current($this->items);
+
+        return $node ? $node['data'] : false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function key()
+    {
+        $this->sorted || $this->sort();
+        return key($this->items);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function next()
+    {
+        $node = next($this->items);
+
+        return $node ? $node['data'] : false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function valid()
+    {
+        return current($this->items) !== false;
+    }
+
+    /**
+     * @return self
+     */
+    public function getIterator()
+    {
+        return clone $this;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function count()
+    {
+        return $this->count;
+    }
+
+    /**
+     * Return list as array
+     *
+     * @param int $flag
+     *
+     * @return array
+     */
+    public function toArray($flag = self::EXTR_DATA)
+    {
+        $this->sort();
+
+        if ($flag == self::EXTR_BOTH) {
+            return $this->items;
+        }
+
+        return array_map(
+            function ($item) use ($flag) {
+                return ($flag == PriorityList::EXTR_PRIORITY) ? $item['priority'] : $item['data'];
+            },
+            $this->items
+        );
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/PriorityQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/PriorityQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/PriorityQueue.php	(revision 5534)
@@ -0,0 +1,301 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Countable;
+use IteratorAggregate;
+use Serializable;
+
+/**
+ * Re-usable, serializable priority queue implementation
+ *
+ * SplPriorityQueue acts as a heap; on iteration, each item is removed from the
+ * queue. If you wish to re-use such a queue, you need to clone it first. This
+ * makes for some interesting issues if you wish to delete items from the queue,
+ * or, as already stated, iterate over it multiple times.
+ *
+ * This class aggregates items for the queue itself, but also composes an
+ * "inner" iterator in the form of an SplPriorityQueue object for performing
+ * the actual iteration.
+ */
+class PriorityQueue implements Countable, IteratorAggregate, Serializable
+{
+    const EXTR_DATA     = 0x00000001;
+    const EXTR_PRIORITY = 0x00000002;
+    const EXTR_BOTH     = 0x00000003;
+
+    /**
+     * Inner queue class to use for iteration
+     * @var string
+     */
+    protected $queueClass = 'Zend\Stdlib\SplPriorityQueue';
+
+    /**
+     * Actual items aggregated in the priority queue. Each item is an array
+     * with keys "data" and "priority".
+     * @var array
+     */
+    protected $items      = [];
+
+    /**
+     * Inner queue object
+     * @var SplPriorityQueue
+     */
+    protected $queue;
+
+    /**
+     * Insert an item into the queue
+     *
+     * Priority defaults to 1 (low priority) if none provided.
+     *
+     * @param  mixed $data
+     * @param  int $priority
+     * @return PriorityQueue
+     */
+    public function insert($data, $priority = 1)
+    {
+        $priority = (int) $priority;
+        $this->items[] = [
+            'data'     => $data,
+            'priority' => $priority,
+        ];
+        $this->getQueue()->insert($data, $priority);
+        return $this;
+    }
+
+    /**
+     * Remove an item from the queue
+     *
+     * This is different than {@link extract()}; its purpose is to dequeue an
+     * item.
+     *
+     * This operation is potentially expensive, as it requires
+     * re-initialization and re-population of the inner queue.
+     *
+     * Note: this removes the first item matching the provided item found. If
+     * the same item has been added multiple times, it will not remove other
+     * instances.
+     *
+     * @param  mixed $datum
+     * @return bool False if the item was not found, true otherwise.
+     */
+    public function remove($datum)
+    {
+        $found = false;
+        foreach ($this->items as $key => $item) {
+            if ($item['data'] === $datum) {
+                $found = true;
+                break;
+            }
+        }
+        if ($found) {
+            unset($this->items[$key]);
+            $this->queue = null;
+
+            if (!$this->isEmpty()) {
+                $queue = $this->getQueue();
+                foreach ($this->items as $item) {
+                    $queue->insert($item['data'], $item['priority']);
+                }
+            }
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Is the queue empty?
+     *
+     * @return bool
+     */
+    public function isEmpty()
+    {
+        return (0 === $this->count());
+    }
+
+    /**
+     * How many items are in the queue?
+     *
+     * @return int
+     */
+    public function count()
+    {
+        return count($this->items);
+    }
+
+    /**
+     * Peek at the top node in the queue, based on priority.
+     *
+     * @return mixed
+     */
+    public function top()
+    {
+        return $this->getIterator()->top();
+    }
+
+    /**
+     * Extract a node from the inner queue and sift up
+     *
+     * @return mixed
+     */
+    public function extract()
+    {
+        return $this->getQueue()->extract();
+    }
+
+    /**
+     * Retrieve the inner iterator
+     *
+     * SplPriorityQueue acts as a heap, which typically implies that as items
+     * are iterated, they are also removed. This does not work for situations
+     * where the queue may be iterated multiple times. As such, this class
+     * aggregates the values, and also injects an SplPriorityQueue. This method
+     * retrieves the inner queue object, and clones it for purposes of
+     * iteration.
+     *
+     * @return SplPriorityQueue
+     */
+    public function getIterator()
+    {
+        $queue = $this->getQueue();
+        return clone $queue;
+    }
+
+    /**
+     * Serialize the data structure
+     *
+     * @return string
+     */
+    public function serialize()
+    {
+        return serialize($this->items);
+    }
+
+    /**
+     * Unserialize a string into a PriorityQueue object
+     *
+     * Serialization format is compatible with {@link Zend\Stdlib\SplPriorityQueue}
+     *
+     * @param  string $data
+     * @return void
+     */
+    public function unserialize($data)
+    {
+        foreach (unserialize($data) as $item) {
+            $this->insert($item['data'], $item['priority']);
+        }
+    }
+
+    /**
+     * Serialize to an array
+     *
+     * By default, returns only the item data, and in the order registered (not
+     * sorted). You may provide one of the EXTR_* flags as an argument, allowing
+     * the ability to return priorities or both data and priority.
+     *
+     * @param  int $flag
+     * @return array
+     */
+    public function toArray($flag = self::EXTR_DATA)
+    {
+        switch ($flag) {
+            case self::EXTR_BOTH:
+                return $this->items;
+            case self::EXTR_PRIORITY:
+                return array_map(function ($item) {
+                    return $item['priority'];
+                }, $this->items);
+            case self::EXTR_DATA:
+            default:
+                return array_map(function ($item) {
+                    return $item['data'];
+                }, $this->items);
+        }
+    }
+
+    /**
+     * Specify the internal queue class
+     *
+     * Please see {@link getIterator()} for details on the necessity of an
+     * internal queue class. The class provided should extend SplPriorityQueue.
+     *
+     * @param  string $class
+     * @return PriorityQueue
+     */
+    public function setInternalQueueClass($class)
+    {
+        $this->queueClass = (string) $class;
+        return $this;
+    }
+
+    /**
+     * Does the queue contain the given datum?
+     *
+     * @param  mixed $datum
+     * @return bool
+     */
+    public function contains($datum)
+    {
+        foreach ($this->items as $item) {
+            if ($item['data'] === $datum) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Does the queue have an item with the given priority?
+     *
+     * @param  int $priority
+     * @return bool
+     */
+    public function hasPriority($priority)
+    {
+        foreach ($this->items as $item) {
+            if ($item['priority'] === $priority) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Get the inner priority queue instance
+     *
+     * @throws Exception\DomainException
+     * @return SplPriorityQueue
+     */
+    protected function getQueue()
+    {
+        if (null === $this->queue) {
+            $this->queue = new $this->queueClass();
+            if (!$this->queue instanceof \SplPriorityQueue) {
+                throw new Exception\DomainException(sprintf(
+                    'PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"',
+                    get_class($this->queue)
+                ));
+            }
+        }
+        return $this->queue;
+    }
+
+    /**
+     * Add support for deep cloning
+     *
+     * @return void
+     */
+    public function __clone()
+    {
+        if (null !== $this->queue) {
+            $this->queue = clone $this->queue;
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Request.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Request.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Request.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+class Request extends Message implements RequestInterface
+{
+    // generic request implementation
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/RequestInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/RequestInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/RequestInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface RequestInterface extends MessageInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Response.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Response.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/Response.php	(revision 5534)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+class Response extends Message implements ResponseInterface
+{
+    // generic response implementation
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ResponseInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ResponseInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/ResponseInterface.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+interface ResponseInterface extends MessageInterface
+{
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplPriorityQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplPriorityQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplPriorityQueue.php	(revision 5534)
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Serializable;
+
+/**
+ * Serializable version of SplPriorityQueue
+ *
+ * Also, provides predictable heap order for datums added with the same priority
+ * (i.e., they will be emitted in the same order they are enqueued).
+ */
+class SplPriorityQueue extends \SplPriorityQueue implements Serializable
+{
+    /**
+     * @var int Seed used to ensure queue order for items of the same priority
+     */
+    protected $serial = PHP_INT_MAX;
+
+    /**
+     * Insert a value with a given priority
+     *
+     * Utilizes {@var $serial} to ensure that values of equal priority are
+     * emitted in the same order in which they are inserted.
+     *
+     * @param  mixed $datum
+     * @param  mixed $priority
+     * @return void
+     */
+    public function insert($datum, $priority)
+    {
+        if (!is_array($priority)) {
+            $priority = [$priority, $this->serial--];
+        }
+        parent::insert($datum, $priority);
+    }
+
+    /**
+     * Serialize to an array
+     *
+     * Array will be priority => data pairs
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $array = [];
+        foreach (clone $this as $item) {
+            $array[] = $item;
+        }
+        return $array;
+    }
+
+    /**
+     * Serialize
+     *
+     * @return string
+     */
+    public function serialize()
+    {
+        $clone = clone $this;
+        $clone->setExtractFlags(self::EXTR_BOTH);
+
+        $data = [];
+        foreach ($clone as $item) {
+            $data[] = $item;
+        }
+
+        return serialize($data);
+    }
+
+    /**
+     * Deserialize
+     *
+     * @param  string $data
+     * @return void
+     */
+    public function unserialize($data)
+    {
+        foreach (unserialize($data) as $item) {
+            $this->insert($item['data'], $item['priority']);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplQueue.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplQueue.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplQueue.php	(revision 5534)
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Serializable;
+
+/**
+ * Serializable version of SplQueue
+ */
+class SplQueue extends \SplQueue implements Serializable
+{
+    /**
+     * Return an array representing the queue
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $array = [];
+        foreach ($this as $item) {
+            $array[] = $item;
+        }
+        return $array;
+    }
+
+    /**
+     * Serialize
+     *
+     * @return string
+     */
+    public function serialize()
+    {
+        return serialize($this->toArray());
+    }
+
+    /**
+     * Unserialize
+     *
+     * @param  string $data
+     * @return void
+     */
+    public function unserialize($data)
+    {
+        foreach (unserialize($data) as $item) {
+            $this->push($item);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplStack.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplStack.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/SplStack.php	(revision 5534)
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Serializable;
+
+/**
+ * Serializable version of SplStack
+ */
+class SplStack extends \SplStack implements Serializable
+{
+    /**
+     * Serialize to an array representing the stack
+     *
+     * @return array
+     */
+    public function toArray()
+    {
+        $array = [];
+        foreach ($this as $item) {
+            $array[] = $item;
+        }
+        return $array;
+    }
+
+    /**
+     * Serialize
+     *
+     * @return string
+     */
+    public function serialize()
+    {
+        return serialize($this->toArray());
+    }
+
+    /**
+     * Unserialize
+     *
+     * @param  string $data
+     * @return void
+     */
+    public function unserialize($data)
+    {
+        foreach (unserialize($data) as $item) {
+            $this->unshift($item);
+        }
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringUtils.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringUtils.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringUtils.php	(revision 5534)
@@ -0,0 +1,187 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib;
+
+use Zend\Stdlib\StringWrapper\StringWrapperInterface;
+
+/**
+ * Utility class for handling strings of different character encodings
+ * using available PHP extensions.
+ *
+ * Declared abstract, as we have no need for instantiation.
+ */
+abstract class StringUtils
+{
+    /**
+     * Ordered list of registered string wrapper instances
+     *
+     * @var StringWrapperInterface[]
+     */
+    protected static $wrapperRegistry = null;
+
+    /**
+     * A list of known single-byte character encodings (upper-case)
+     *
+     * @var string[]
+     */
+    protected static $singleByteEncodings = [
+        'ASCII', '7BIT', '8BIT',
+        'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4', 'ISO-8859-5',
+        'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9', 'ISO-8859-10',
+        'ISO-8859-11', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16',
+        'CP-1251', 'CP-1252',
+        // TODO
+    ];
+
+    /**
+     * Is PCRE compiled with Unicode support?
+     *
+     * @var bool
+     **/
+    protected static $hasPcreUnicodeSupport = null;
+
+    /**
+     * Get registered wrapper classes
+     *
+     * @return string[]
+     */
+    public static function getRegisteredWrappers()
+    {
+        if (static::$wrapperRegistry === null) {
+            static::$wrapperRegistry = [];
+
+            if (extension_loaded('intl')) {
+                static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Intl';
+            }
+
+            if (extension_loaded('mbstring')) {
+                static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\MbString';
+            }
+
+            if (extension_loaded('iconv')) {
+                static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Iconv';
+            }
+
+            static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Native';
+        }
+
+        return static::$wrapperRegistry;
+    }
+
+    /**
+     * Register a string wrapper class
+     *
+     * @param string $wrapper
+     * @return void
+     */
+    public static function registerWrapper($wrapper)
+    {
+        $wrapper = (string) $wrapper;
+        if (!in_array($wrapper, static::$wrapperRegistry, true)) {
+            static::$wrapperRegistry[] = $wrapper;
+        }
+    }
+
+    /**
+     * Unregister a string wrapper class
+     *
+     * @param string $wrapper
+     * @return void
+     */
+    public static function unregisterWrapper($wrapper)
+    {
+        $index = array_search((string) $wrapper, static::$wrapperRegistry, true);
+        if ($index !== false) {
+            unset(static::$wrapperRegistry[$index]);
+        }
+    }
+
+    /**
+     * Reset all registered wrappers so the default wrappers will be used
+     *
+     * @return void
+     */
+    public static function resetRegisteredWrappers()
+    {
+        static::$wrapperRegistry = null;
+    }
+
+    /**
+     * Get the first string wrapper supporting the given character encoding
+     * and supports to convert into the given convert encoding.
+     *
+     * @param string      $encoding        Character encoding to support
+     * @param string|null $convertEncoding OPTIONAL character encoding to convert in
+     * @return StringWrapperInterface
+     * @throws Exception\RuntimeException If no wrapper supports given character encodings
+     */
+    public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null)
+    {
+        foreach (static::getRegisteredWrappers() as $wrapperClass) {
+            if ($wrapperClass::isSupported($encoding, $convertEncoding)) {
+                $wrapper = new $wrapperClass($encoding, $convertEncoding);
+                $wrapper->setEncoding($encoding, $convertEncoding);
+                return $wrapper;
+            }
+        }
+
+        throw new Exception\RuntimeException(
+            'No wrapper found supporting "' . $encoding . '"'
+            . (($convertEncoding !== null) ? ' and "' . $convertEncoding . '"' : '')
+        );
+    }
+
+    /**
+     * Get a list of all known single-byte character encodings
+     *
+     * @return string[]
+     */
+    public static function getSingleByteEncodings()
+    {
+        return static::$singleByteEncodings;
+    }
+
+    /**
+     * Check if a given encoding is a known single-byte character encoding
+     *
+     * @param string $encoding
+     * @return bool
+     */
+    public static function isSingleByteEncoding($encoding)
+    {
+        return in_array(strtoupper($encoding), static::$singleByteEncodings);
+    }
+
+    /**
+     * Check if a given string is valid UTF-8 encoded
+     *
+     * @param string $str
+     * @return bool
+     */
+    public static function isValidUtf8($str)
+    {
+        return is_string($str) && ($str === '' || preg_match('/^./su', $str) == 1);
+    }
+
+    /**
+     * Is PCRE compiled with Unicode support?
+     *
+     * @return bool
+     */
+    public static function hasPcreUnicodeSupport()
+    {
+        if (static::$hasPcreUnicodeSupport === null) {
+            ErrorHandler::start();
+            static::$hasPcreUnicodeSupport = defined('PREG_BAD_UTF8_OFFSET_ERROR') && preg_match('/\pL/u', 'a') == 1;
+            ErrorHandler::stop();
+        }
+        return static::$hasPcreUnicodeSupport;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.php	(revision 5534)
@@ -0,0 +1,269 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\StringWrapper;
+
+use Zend\Stdlib\Exception;
+use Zend\Stdlib\StringUtils;
+
+abstract class AbstractStringWrapper implements StringWrapperInterface
+{
+    /**
+     * The character encoding working on
+     * @var string|null
+     */
+    protected $encoding = 'UTF-8';
+
+    /**
+     * An optionally character encoding to convert to
+     * @var string|null
+     */
+    protected $convertEncoding;
+
+    /**
+     * Check if the given character encoding is supported by this wrapper
+     * and the character encoding to convert to is also supported.
+     *
+     * @param  string      $encoding
+     * @param  string|null $convertEncoding
+     * @return bool
+     */
+    public static function isSupported($encoding, $convertEncoding = null)
+    {
+        $supportedEncodings = static::getSupportedEncodings();
+
+        if (!in_array(strtoupper($encoding), $supportedEncodings)) {
+            return false;
+        }
+
+        if ($convertEncoding !== null && !in_array(strtoupper($convertEncoding), $supportedEncodings)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Set character encoding working with and convert to
+     *
+     * @param string      $encoding         The character encoding to work with
+     * @param string|null $convertEncoding  The character encoding to convert to
+     * @return StringWrapperInterface
+     */
+    public function setEncoding($encoding, $convertEncoding = null)
+    {
+        $supportedEncodings = static::getSupportedEncodings();
+
+        $encodingUpper = strtoupper($encoding);
+        if (!in_array($encodingUpper, $supportedEncodings)) {
+            throw new Exception\InvalidArgumentException(
+                'Wrapper doesn\'t support character encoding "' . $encoding . '"'
+            );
+        }
+
+        if ($convertEncoding !== null) {
+            $convertEncodingUpper = strtoupper($convertEncoding);
+            if (!in_array($convertEncodingUpper, $supportedEncodings)) {
+                throw new Exception\InvalidArgumentException(
+                    'Wrapper doesn\'t support character encoding "' . $convertEncoding . '"'
+                );
+            }
+
+            $this->convertEncoding = $convertEncodingUpper;
+        } else {
+            $this->convertEncoding = null;
+        }
+        $this->encoding = $encodingUpper;
+
+        return $this;
+    }
+
+    /**
+     * Get the defined character encoding to work with
+     *
+     * @return string
+     * @throws Exception\LogicException If no encoding was defined
+     */
+    public function getEncoding()
+    {
+        return $this->encoding;
+    }
+
+    /**
+     * Get the defined character encoding to convert to
+     *
+     * @return string|null
+    */
+    public function getConvertEncoding()
+    {
+        return $this->convertEncoding;
+    }
+
+    /**
+     * Convert a string from defined character encoding to the defined convert encoding
+     *
+     * @param string  $str
+     * @param bool $reverse
+     * @return string|false
+     */
+    public function convert($str, $reverse = false)
+    {
+        $encoding        = $this->getEncoding();
+        $convertEncoding = $this->getConvertEncoding();
+        if ($convertEncoding === null) {
+            throw new Exception\LogicException(
+                'No convert encoding defined'
+            );
+        }
+
+        if ($encoding === $convertEncoding) {
+            return $str;
+        }
+
+        $from = $reverse ? $convertEncoding : $encoding;
+        $to   = $reverse ? $encoding : $convertEncoding;
+        throw new Exception\RuntimeException(sprintf(
+            'Converting from "%s" to "%s" isn\'t supported by this string wrapper',
+            $from,
+            $to
+        ));
+    }
+
+    /**
+     * Wraps a string to a given number of characters
+     *
+     * @param  string  $string
+     * @param  int $width
+     * @param  string  $break
+     * @param  bool $cut
+     * @return string|false
+     */
+    public function wordWrap($string, $width = 75, $break = "\n", $cut = false)
+    {
+        $string = (string) $string;
+        if ($string === '') {
+            return '';
+        }
+
+        $break = (string) $break;
+        if ($break === '') {
+            throw new Exception\InvalidArgumentException('Break string cannot be empty');
+        }
+
+        $width = (int) $width;
+        if ($width === 0 && $cut) {
+            throw new Exception\InvalidArgumentException('Cannot force cut when width is zero');
+        }
+
+        if (StringUtils::isSingleByteEncoding($this->getEncoding())) {
+            return wordwrap($string, $width, $break, $cut);
+        }
+
+        $stringWidth = $this->strlen($string);
+        $breakWidth  = $this->strlen($break);
+
+        $result    = '';
+        $lastStart = $lastSpace = 0;
+
+        for ($current = 0; $current < $stringWidth; $current++) {
+            $char = $this->substr($string, $current, 1);
+
+            $possibleBreak = $char;
+            if ($breakWidth !== 1) {
+                $possibleBreak = $this->substr($string, $current, $breakWidth);
+            }
+
+            if ($possibleBreak === $break) {
+                $result    .= $this->substr($string, $lastStart, $current - $lastStart + $breakWidth);
+                $current   += $breakWidth - 1;
+                $lastStart  = $lastSpace = $current + 1;
+                continue;
+            }
+
+            if ($char === ' ') {
+                if ($current - $lastStart >= $width) {
+                    $result    .= $this->substr($string, $lastStart, $current - $lastStart) . $break;
+                    $lastStart  = $current + 1;
+                }
+
+                $lastSpace = $current;
+                continue;
+            }
+
+            if ($current - $lastStart >= $width && $cut && $lastStart >= $lastSpace) {
+                $result    .= $this->substr($string, $lastStart, $current - $lastStart) . $break;
+                $lastStart  = $lastSpace = $current;
+                continue;
+            }
+
+            if ($current - $lastStart >= $width && $lastStart < $lastSpace) {
+                $result    .= $this->substr($string, $lastStart, $lastSpace - $lastStart) . $break;
+                $lastStart  = $lastSpace = $lastSpace + 1;
+                continue;
+            }
+        }
+
+        if ($lastStart !== $current) {
+            $result .= $this->substr($string, $lastStart, $current - $lastStart);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Pad a string to a certain length with another string
+     *
+     * @param  string  $input
+     * @param  int $padLength
+     * @param  string  $padString
+     * @param  int $padType
+     * @return string
+     */
+    public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT)
+    {
+        if (StringUtils::isSingleByteEncoding($this->getEncoding())) {
+            return str_pad($input, $padLength, $padString, $padType);
+        }
+
+        $lengthOfPadding = $padLength - $this->strlen($input);
+        if ($lengthOfPadding <= 0) {
+            return $input;
+        }
+
+        $padStringLength = $this->strlen($padString);
+        if ($padStringLength === 0) {
+            return $input;
+        }
+
+        $repeatCount = floor($lengthOfPadding / $padStringLength);
+
+        if ($padType === STR_PAD_BOTH) {
+            $repeatCountLeft = $repeatCountRight = ($repeatCount - $repeatCount % 2) / 2;
+
+            $lastStringLength       = $lengthOfPadding - 2 * $repeatCountLeft * $padStringLength;
+            $lastStringLeftLength   = $lastStringRightLength = floor($lastStringLength / 2);
+            $lastStringRightLength += $lastStringLength % 2;
+
+            $lastStringLeft  = $this->substr($padString, 0, $lastStringLeftLength);
+            $lastStringRight = $this->substr($padString, 0, $lastStringRightLength);
+
+            return str_repeat($padString, $repeatCountLeft) . $lastStringLeft
+                . $input
+                . str_repeat($padString, $repeatCountRight) . $lastStringRight;
+        }
+
+        $lastString = $this->substr($padString, 0, $lengthOfPadding % $padStringLength);
+
+        if ($padType === STR_PAD_LEFT) {
+            return str_repeat($padString, $repeatCount) . $lastString . $input;
+        }
+
+        return $input . str_repeat($padString, $repeatCount) . $lastString;
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Iconv.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Iconv.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Iconv.php	(revision 5534)
@@ -0,0 +1,289 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\StringWrapper;
+
+use Zend\Stdlib\Exception;
+
+class Iconv extends AbstractStringWrapper
+{
+    /**
+     * List of supported character sets (upper case)
+     *
+     * @var string[]
+     * @link http://www.gnu.org/software/libiconv/
+     */
+    protected static $encodings = [
+        // European languages
+        'ASCII',
+        'ISO-8859-1',
+        'ISO-8859-2',
+        'ISO-8859-3',
+        'ISO-8859-4',
+        'ISO-8859-5',
+        'ISO-8859-7',
+        'ISO-8859-9',
+        'ISO-8859-10',
+        'ISO-8859-13',
+        'ISO-8859-14',
+        'ISO-8859-15',
+        'ISO-8859-16',
+        'KOI8-R',
+        'KOI8-U',
+        'KOI8-RU',
+        'CP1250',
+        'CP1251',
+        'CP1252',
+        'CP1253',
+        'CP1254',
+        'CP1257',
+        'CP850',
+        'CP866',
+        'CP1131',
+        'MACROMAN',
+        'MACCENTRALEUROPE',
+        'MACICELAND',
+        'MACCROATIAN',
+        'MACROMANIA',
+        'MACCYRILLIC',
+        'MACUKRAINE',
+        'MACGREEK',
+        'MACTURKISH',
+        'MACINTOSH',
+
+        // Semitic languages
+        'ISO-8859-6',
+        'ISO-8859-8',
+        'CP1255',
+        'CP1256',
+        'CP862',
+        'MACHEBREW',
+        'MACARABIC',
+
+        // Japanese
+        'EUC-JP',
+        'SHIFT_JIS',
+        'CP932',
+        'ISO-2022-JP',
+        'ISO-2022-JP-2',
+        'ISO-2022-JP-1',
+
+        // Chinese
+        'EUC-CN',
+        'HZ',
+        'GBK',
+        'CP936',
+        'GB18030',
+        'EUC-TW',
+        'BIG5',
+        'CP950',
+        'BIG5-HKSCS',
+        'BIG5-HKSCS:2004',
+        'BIG5-HKSCS:2001',
+        'BIG5-HKSCS:1999',
+        'ISO-2022-CN',
+        'ISO-2022-CN-EXT',
+
+        // Korean
+        'EUC-KR',
+        'CP949',
+        'ISO-2022-KR',
+        'JOHAB',
+
+        // Armenian
+        'ARMSCII-8',
+
+        // Georgian
+        'GEORGIAN-ACADEMY',
+        'GEORGIAN-PS',
+
+        // Tajik
+        'KOI8-T',
+
+        // Kazakh
+        'PT154',
+        'RK1048',
+
+        // Thai
+        'ISO-8859-11',
+        'TIS-620',
+        'CP874',
+        'MACTHAI',
+
+        // Laotian
+        'MULELAO-1',
+        'CP1133',
+
+        // Vietnamese
+        'VISCII',
+        'TCVN',
+        'CP1258',
+
+        // Platform specifics
+        'HP-ROMAN8',
+        'NEXTSTEP',
+
+        // Full Unicode
+        'UTF-8',
+        'UCS-2',
+        'UCS-2BE',
+        'UCS-2LE',
+        'UCS-4',
+        'UCS-4BE',
+        'UCS-4LE',
+        'UTF-16',
+        'UTF-16BE',
+        'UTF-16LE',
+        'UTF-32',
+        'UTF-32BE',
+        'UTF-32LE',
+        'UTF-7',
+        'C99',
+        'JAVA',
+
+        /* Commented out because that's internal encodings not existing in real world
+        // Full Unicode, in terms of uint16_t or uint32_t (with machine dependent endianness and alignment)
+        'UCS-2-INTERNAL',
+        'UCS-4-INTERNAL',
+
+        // Locale dependent, in terms of `char' or `wchar_t' (with machine dependent endianness and alignment,
+        // and with OS and locale dependent semantics)
+        'char',
+        'wchar_t',
+        '', // The empty encoding name is equivalent to "char": it denotes the locale dependent character encoding.
+        */
+
+        // When configured with the option --enable-extra-encodings,
+        // it also provides support for a few extra encodings:
+
+        // European languages
+        'CP437',
+        'CP737',
+        'CP775',
+        'CP852',
+        'CP853',
+        'CP855',
+        'CP857',
+        'CP858',
+        'CP860',
+        'CP861',
+        'CP863',
+        'CP865',
+        'CP869',
+        'CP1125',
+
+        // Semitic languages
+        'CP864',
+
+        // Japanese
+        'EUC-JISX0213',
+        'Shift_JISX0213',
+        'ISO-2022-JP-3',
+
+        // Chinese
+        'BIG5-2003', // (experimental)
+
+        // Turkmen
+        'TDS565',
+
+        // Platform specifics
+        'ATARIST',
+        'RISCOS-LATIN1',
+    ];
+
+    /**
+     * Get a list of supported character encodings
+     *
+     * @return string[]
+     */
+    public static function getSupportedEncodings()
+    {
+        return static::$encodings;
+    }
+
+    /**
+     * Constructor
+     *
+     * @throws Exception\ExtensionNotLoadedException
+     */
+    public function __construct()
+    {
+        if (!extension_loaded('iconv')) {
+            throw new Exception\ExtensionNotLoadedException(
+                'PHP extension "iconv" is required for this wrapper'
+            );
+        }
+    }
+
+    /**
+     * Returns the length of the given string
+     *
+     * @param string $str
+     * @return int|false
+     */
+    public function strlen($str)
+    {
+        return iconv_strlen($str, $this->getEncoding());
+    }
+
+    /**
+     * Returns the portion of string specified by the start and length parameters
+     *
+     * @param string   $str
+     * @param int      $offset
+     * @param int|null $length
+     * @return string|false
+     */
+    public function substr($str, $offset = 0, $length = null)
+    {
+        return iconv_substr($str, $offset, $length, $this->getEncoding());
+    }
+
+    /**
+     * Find the position of the first occurrence of a substring in a string
+     *
+     * @param string $haystack
+     * @param string $needle
+     * @param int    $offset
+     * @return int|false
+     */
+    public function strpos($haystack, $needle, $offset = 0)
+    {
+        return iconv_strpos($haystack, $needle, $offset, $this->getEncoding());
+    }
+
+    /**
+     * Convert a string from defined encoding to the defined convert encoding
+     *
+     * @param string  $str
+     * @param bool $reverse
+     * @return string|false
+     */
+    public function convert($str, $reverse = false)
+    {
+        $encoding        = $this->getEncoding();
+        $convertEncoding = $this->getConvertEncoding();
+        if ($convertEncoding === null) {
+            throw new Exception\LogicException(
+                'No convert encoding defined'
+            );
+        }
+
+        if ($encoding === $convertEncoding) {
+            return $str;
+        }
+
+        $fromEncoding = $reverse ? $convertEncoding : $encoding;
+        $toEncoding   = $reverse ? $encoding : $convertEncoding;
+
+        // automatically add "//IGNORE" to not stop converting on invalid characters
+        // invalid characters triggers a notice anyway
+        return iconv($fromEncoding, $toEncoding . '//IGNORE', $str);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Intl.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Intl.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Intl.php	(revision 5534)
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\StringWrapper;
+
+use Zend\Stdlib\Exception;
+
+class Intl extends AbstractStringWrapper
+{
+    /**
+     * List of supported character sets (upper case)
+     *
+     * @var string[]
+     */
+    protected static $encodings = ['UTF-8'];
+
+    /**
+     * Get a list of supported character encodings
+     *
+     * @return string[]
+     */
+    public static function getSupportedEncodings()
+    {
+        return static::$encodings;
+    }
+
+    /**
+     * Constructor
+     *
+     * @throws Exception\ExtensionNotLoadedException
+     */
+    public function __construct()
+    {
+        if (!extension_loaded('intl')) {
+            throw new Exception\ExtensionNotLoadedException(
+                'PHP extension "intl" is required for this wrapper'
+            );
+        }
+    }
+
+    /**
+     * Returns the length of the given string
+     *
+     * @param string $str
+     * @return int|false
+     */
+    public function strlen($str)
+    {
+        return grapheme_strlen($str);
+    }
+
+    /**
+     * Returns the portion of string specified by the start and length parameters
+     *
+     * @param string   $str
+     * @param int      $offset
+     * @param int|null $length
+     * @return string|false
+     */
+    public function substr($str, $offset = 0, $length = null)
+    {
+        // Due fix of PHP #62759 The third argument returns an empty string if is 0 or null.
+        if ($length !== null) {
+            return grapheme_substr($str, $offset, $length);
+        }
+
+        return grapheme_substr($str, $offset);
+    }
+
+    /**
+     * Find the position of the first occurrence of a substring in a string
+     *
+     * @param string $haystack
+     * @param string $needle
+     * @param int    $offset
+     * @return int|false
+     */
+    public function strpos($haystack, $needle, $offset = 0)
+    {
+        return grapheme_strpos($haystack, $needle, $offset);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/MbString.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/MbString.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/MbString.php	(revision 5534)
@@ -0,0 +1,121 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\StringWrapper;
+
+use Zend\Stdlib\Exception;
+
+class MbString extends AbstractStringWrapper
+{
+    /**
+     * List of supported character sets (upper case)
+     *
+     * @var null|string[]
+     * @link http://php.net/manual/mbstring.supported-encodings.php
+     */
+    protected static $encodings = null;
+
+    /**
+     * Get a list of supported character encodings
+     *
+     * @return string[]
+     */
+    public static function getSupportedEncodings()
+    {
+        if (static::$encodings === null) {
+            static::$encodings = array_map('strtoupper', mb_list_encodings());
+
+            // FIXME: Converting â¬ (UTF-8) to ISO-8859-16 gives a wrong result
+            $indexIso885916 = array_search('ISO-8859-16', static::$encodings, true);
+            if ($indexIso885916 !== false) {
+                unset(static::$encodings[$indexIso885916]);
+            }
+        }
+
+        return static::$encodings;
+    }
+
+    /**
+     * Constructor
+     *
+     * @throws Exception\ExtensionNotLoadedException
+     */
+    public function __construct()
+    {
+        if (!extension_loaded('mbstring')) {
+            throw new Exception\ExtensionNotLoadedException(
+                'PHP extension "mbstring" is required for this wrapper'
+            );
+        }
+    }
+
+    /**
+     * Returns the length of the given string
+     *
+     * @param string $str
+     * @return int|false
+     */
+    public function strlen($str)
+    {
+        return mb_strlen($str, $this->getEncoding());
+    }
+
+    /**
+     * Returns the portion of string specified by the start and length parameters
+     *
+     * @param string   $str
+     * @param int      $offset
+     * @param int|null $length
+     * @return string|false
+     */
+    public function substr($str, $offset = 0, $length = null)
+    {
+        return mb_substr($str, $offset, $length, $this->getEncoding());
+    }
+
+    /**
+     * Find the position of the first occurrence of a substring in a string
+     *
+     * @param string $haystack
+     * @param string $needle
+     * @param int    $offset
+     * @return int|false
+     */
+    public function strpos($haystack, $needle, $offset = 0)
+    {
+        return mb_strpos($haystack, $needle, $offset, $this->getEncoding());
+    }
+
+    /**
+     * Convert a string from defined encoding to the defined convert encoding
+     *
+     * @param string  $str
+     * @param bool $reverse
+     * @return string|false
+     */
+    public function convert($str, $reverse = false)
+    {
+        $encoding        = $this->getEncoding();
+        $convertEncoding = $this->getConvertEncoding();
+
+        if ($convertEncoding === null) {
+            throw new Exception\LogicException(
+                'No convert encoding defined'
+            );
+        }
+
+        if ($encoding === $convertEncoding) {
+            return $str;
+        }
+
+        $fromEncoding = $reverse ? $convertEncoding : $encoding;
+        $toEncoding   = $reverse ? $encoding : $convertEncoding;
+        return mb_convert_encoding($str, $toEncoding, $fromEncoding);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Native.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Native.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/Native.php	(revision 5534)
@@ -0,0 +1,134 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\StringWrapper;
+
+use Zend\Stdlib\Exception;
+use Zend\Stdlib\StringUtils;
+
+class Native extends AbstractStringWrapper
+{
+    /**
+     * The character encoding working on
+     * (overwritten to change defaut encoding)
+     *
+     * @var string
+     */
+    protected $encoding = 'ASCII';
+
+    /**
+     * Check if the given character encoding is supported by this wrapper
+     * and the character encoding to convert to is also supported.
+     *
+     * @param  string      $encoding
+     * @param  string|null $convertEncoding
+     * @return bool
+     */
+    public static function isSupported($encoding, $convertEncoding = null)
+    {
+        $encodingUpper      = strtoupper($encoding);
+        $supportedEncodings = static::getSupportedEncodings();
+
+        if (!in_array($encodingUpper, $supportedEncodings)) {
+            return false;
+        }
+
+        // This adapter doesn't support to convert between encodings
+        if ($convertEncoding !== null && $encodingUpper !== strtoupper($convertEncoding)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Get a list of supported character encodings
+     *
+     * @return string[]
+     */
+    public static function getSupportedEncodings()
+    {
+        return StringUtils::getSingleByteEncodings();
+    }
+
+    /**
+     * Set character encoding working with and convert to
+     *
+     * @param string      $encoding         The character encoding to work with
+     * @param string|null $convertEncoding  The character encoding to convert to
+     * @return StringWrapperInterface
+     */
+    public function setEncoding($encoding, $convertEncoding = null)
+    {
+        $supportedEncodings = static::getSupportedEncodings();
+
+        $encodingUpper = strtoupper($encoding);
+        if (!in_array($encodingUpper, $supportedEncodings)) {
+            throw new Exception\InvalidArgumentException(
+                'Wrapper doesn\'t support character encoding "' . $encoding . '"'
+            );
+        }
+
+        if ($encodingUpper !== strtoupper($convertEncoding)) {
+            $this->convertEncoding = $encodingUpper;
+        }
+
+        if ($convertEncoding !== null) {
+            if ($encodingUpper !== strtoupper($convertEncoding)) {
+                throw new Exception\InvalidArgumentException(
+                    'Wrapper doesn\'t support to convert between character encodings'
+                );
+            }
+
+            $this->convertEncoding = $encodingUpper;
+        } else {
+            $this->convertEncoding = null;
+        }
+        $this->encoding = $encodingUpper;
+
+        return $this;
+    }
+
+    /**
+     * Returns the length of the given string
+     *
+     * @param string $str
+     * @return int|false
+     */
+    public function strlen($str)
+    {
+        return strlen($str);
+    }
+
+    /**
+     * Returns the portion of string specified by the start and length parameters
+     *
+     * @param string   $str
+     * @param int      $offset
+     * @param int|null $length
+     * @return string|false
+     */
+    public function substr($str, $offset = 0, $length = null)
+    {
+        return substr($str, $offset, $length);
+    }
+
+    /**
+     * Find the position of the first occurrence of a substring in a string
+     *
+     * @param string $haystack
+     * @param string $needle
+     * @param int    $offset
+     * @return int|false
+     */
+    public function strpos($haystack, $needle, $offset = 0)
+    {
+        return strpos($haystack, $needle, $offset);
+    }
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/StringWrapperInterface.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/StringWrapperInterface.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/StringWrapper/StringWrapperInterface.php	(revision 5534)
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Stdlib\StringWrapper;
+
+interface StringWrapperInterface
+{
+    /**
+     * Check if the given character encoding is supported by this wrapper
+     * and the character encoding to convert to is also supported.
+     *
+     * @param string      $encoding
+     * @param string|null $convertEncoding
+     */
+    public static function isSupported($encoding, $convertEncoding = null);
+
+    /**
+     * Get a list of supported character encodings
+     *
+     * @return string[]
+     */
+    public static function getSupportedEncodings();
+
+    /**
+     * Set character encoding working with and convert to
+     *
+     * @param string      $encoding         The character encoding to work with
+     * @param string|null $convertEncoding  The character encoding to convert to
+     * @return StringWrapperInterface
+     */
+    public function setEncoding($encoding, $convertEncoding = null);
+
+    /**
+     * Get the defined character encoding to work with (upper case)
+     *
+     * @return string
+     */
+    public function getEncoding();
+
+    /**
+     * Get the defined character encoding to convert to (upper case)
+     *
+     * @return string|null
+     */
+    public function getConvertEncoding();
+
+    /**
+     * Returns the length of the given string
+     *
+     * @param string $str
+     * @return int|false
+     */
+    public function strlen($str);
+
+    /**
+     * Returns the portion of string specified by the start and length parameters
+     *
+     * @param string   $str
+     * @param int      $offset
+     * @param int|null $length
+     * @return string|false
+     */
+    public function substr($str, $offset = 0, $length = null);
+
+    /**
+     * Find the position of the first occurrence of a substring in a string
+     *
+     * @param string $haystack
+     * @param string $needle
+     * @param int    $offset
+     * @return int|false
+     */
+    public function strpos($haystack, $needle, $offset = 0);
+
+    /**
+     * Convert a string from defined encoding to the defined convert encoding
+     *
+     * @param string  $str
+     * @param bool $reverse
+     * @return string|false
+     */
+    public function convert($str, $reverse = false);
+
+    /**
+     * Wraps a string to a given number of characters
+     *
+     * @param  string  $str
+     * @param  int $width
+     * @param  string  $break
+     * @param  bool $cut
+     * @return string
+     */
+    public function wordWrap($str, $width = 75, $break = "\n", $cut = false);
+
+    /**
+     * Pad a string to a certain length with another string
+     *
+     * @param  string  $input
+     * @param  int $padLength
+     * @param  string  $padString
+     * @param  int $padType
+     * @return string
+     */
+    public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT);
+}
Index: /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/compatibility/autoload.php
===================================================================
--- /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/compatibility/autoload.php	(revision 5534)
+++ /lib/shariff-backend-php-master/vendor/zendframework/zend-stdlib/src/compatibility/autoload.php	(revision 5534)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link      http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ * @deprecated
+ */
+
+/**
+ * Legacy purposes only, to prevent code that references it from breaking.
+ */
+trigger_error('Polyfill autoload support (file library/Zend/Stdlib/compatibility/autoload.php) is no longer necessary; please remove your require statement referencing this file', E_USER_DEPRECATED);
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 5532)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 5534)
@@ -42,9 +42,10 @@
 						$this->shop->get_option('wpsg_mod_produktartikel_google') == '1' ||
 						$this->shop->get_option('wpsg_mod_produktartikel_twitter') == '1') &&
-					$this->shop->get_option('wpsg_mod_produktartikel_noJS') != '1')
-			{
-					
-				wp_enqueue_script('wpsg_mod_produktartikel_social', WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/lib/socialshareprivacy/jquery.socialshareprivacy.js');
-						
+						$this->shop->get_option('wpsg_mod_produktartikel_noJS') != '1')
+			{
+
+				wp_enqueue_script('wpsg_mod_produktartikel_shariff', $this->shop->getRessourceURL('js/shariff/shariff.min.js'));
+				wp_enqueue_style ('wpsg_mod_produktartikel_shariff', $this->shop->getRessourceURL('js/shariff/shariff.min.css'));
+
 			}
 			
@@ -858,5 +859,5 @@
 		public function socialIntegration($produkt_id)
 		{
-			
+            
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktartikel/produkt.phtml');
 			
Index: /views/js/shariff/shariff.complete.css
===================================================================
--- /views/js/shariff/shariff.complete.css	(revision 5534)
+++ /views/js/shariff/shariff.complete.css	(revision 5534)
@@ -0,0 +1,6 @@
+/*!
+ * shariff - v1.23.2 - 09.05.2016
+ * https://github.com/heiseonline/shariff
+ * Copyright (c) 2016 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
+ * Licensed under the MIT license
+ */@font-face{font-family:FontAwesome;src:url(https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.eot?v=4.5.0);src:url(https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(https://netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.shariff::after,.shariff::before{content:" ";display:table}.shariff::after{clear:both}.shariff ul{padding:0;margin:0;list-style:none}.shariff li{height:35px;box-sizing:border-box;overflow:hidden}.shariff li a{color:#fff;position:relative;display:block;height:35px;text-decoration:none;box-sizing:border-box}.shariff li .share_count,.shariff li .share_text{font-family:Arial,Helvetica,sans-serif;font-size:12px;vertical-align:middle;line-height:35px}.shariff li .fa{width:35px;line-height:35px;text-align:center;vertical-align:middle}.shariff li .share_count{padding:0 8px;height:33px;position:absolute;top:1px;right:1px}.shariff .orientation-horizontal{display:-webkit-box}.shariff .orientation-horizontal li{-webkit-box-flex:1}.shariff .orientation-horizontal .info{-webkit-box-flex:0}.shariff .orientation-horizontal{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.shariff .orientation-horizontal li{float:left;-webkit-flex:none;-ms-flex:none;flex:none;width:35px;margin-right:3%;margin-bottom:10px}.shariff .orientation-horizontal li:last-child{margin-right:0}.shariff .orientation-horizontal li .share_text{display:block;text-indent:-9999px;padding-left:3px}.shariff .orientation-horizontal li .share_count{display:none}.shariff .theme-grey .shariff-button a{background-color:#b0b0b0}.shariff .theme-grey .shariff-button .share_count{background-color:#ccc;color:#333}.shariff .theme-white .shariff-button{border:1px solid #ddd}.shariff .theme-white .shariff-button a{background-color:#fff}.shariff .theme-white .shariff-button a:hover{background-color:#eee}.shariff .theme-white .shariff-button .share_count{background-color:#fff;color:#999}.shariff .orientation-vertical{min-width:110px}.shariff .orientation-vertical li{display:block;width:100%;margin:5px 0}.shariff .orientation-vertical li .share_count{width:24px;text-align:right}@media only screen and (min-width:360px){.shariff .orientation-horizontal li{margin-right:1.8%;min-width:80px;width:auto;-webkit-flex:1;-ms-flex:1;flex:1}.shariff .orientation-horizontal li .share_count{display:block}.shariff .orientation-horizontal.col-1 li,.shariff .orientation-horizontal.col-2 li{min-width:110px;max-width:160px}.shariff .orientation-horizontal.col-1 li .share_text,.shariff .orientation-horizontal.col-2 li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-5 li,.shariff .orientation-horizontal.col-6 li{-webkit-flex:none;-ms-flex:none;flex:none}}@media only screen and (min-width:640px){.shariff .orientation-horizontal.col-3 li{min-width:110px;max-width:160px}.shariff .orientation-horizontal.col-3 li .share_text{text-indent:0;display:inline}}@media only screen and (min-width:768px){.shariff .orientation-horizontal li{min-width:110px;max-width:160px}.shariff .orientation-horizontal li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-5 li,.shariff .orientation-horizontal.col-6 li{-webkit-flex:1;-ms-flex:1;flex:1}}@media only screen and (min-width:1024px){.shariff li{height:30px}.shariff li a{height:30px}.shariff li .fa{width:30px;line-height:30px}.shariff li .share_count,.shariff li .share_text{line-height:30px}.shariff li .share_count{height:28px}}.shariff .addthis a{background-color:#f8694d}.shariff .addthis a:hover{background-color:#f75b44}.shariff .addthis .fa-plus{font-size:14px}.shariff .addthis .share_count{color:#f8694d;background-color:#f1b8b0}.shariff .theme-white .addthis a{color:#f8694d}@media only screen and (min-width:600px){.shariff .addthis .fa-plus{font-size:14px;position:relative;top:1px}}.shariff .diaspora a{background-color:#999}.shariff .diaspora a:hover{background-color:#b3b3b3}.shariff .diaspora .fa-times-circle{font-size:17px}.shariff .theme-white .diaspora a{color:#999}@media only screen and (min-width:600px){.shariff .diaspora .fa-times-circle{font-size:16px}}.shariff .facebook a{background-color:#3b5998}.shariff .facebook a:hover{background-color:#4273c8}.shariff .facebook .fa-facebook{font-size:22px}.shariff .facebook .share_count{color:#183a75;background-color:#99adcf}.shariff .theme-white .facebook a{color:#3b5998}@media only screen and (min-width:600px){.shariff .facebook .fa-facebook{font-size:19px}}.shariff .flattr a{background-color:#7ea352}.shariff .flattr a:hover{background-color:#F67C1A}.shariff .flattr a:hover .share_count{color:#d56308;background-color:#fab47c}.shariff .flattr .fa-money{font-size:22px}.shariff .flattr .share_count{color:#648141;background-color:#b0c893}.shariff .theme-white .flattr a{color:#F67C1A}@media only screen and (min-width:600px){.shariff .flattr .fa-money{font-size:19px}}.shariff .googleplus a{background-color:#d34836}.shariff .googleplus a:hover{background-color:#f75b44}.shariff .googleplus .fa-google-plus{font-size:22px}.shariff .googleplus .share_count{color:#a31601;background-color:#eda79d}.shariff .theme-white .googleplus a{color:#d34836}@media only screen and (min-width:600px){.shariff .googleplus .fa-google-plus{font-size:19px}}.shariff .info{border:1px solid #ccc}.shariff .info a{color:#666;background-color:#fff}.shariff .info a:hover{background-color:#efefef}.shariff .info .fa-info{font-size:20px;width:33px}.shariff .info .share_text{display:block!important;text-indent:-9999px!important}.shariff .theme-grey .info a{background-color:#fff}.shariff .theme-grey .info a:hover{background-color:#efefef}.shariff .orientation-vertical .info{width:35px;float:right}@media only screen and (min-width:360px){.shariff .orientation-horizontal .info{-webkit-flex:none!important;-ms-flex:none!important;flex:none!important;width:35px;min-width:35px!important}}@media only screen and (min-width:1024px){.shariff .info .fa-info{font-size:16px;width:23px}.shariff .orientation-horizontal .info{width:25px;min-width:25px!important}.shariff .orientation-vertical .info{width:25px}}.shariff .linkedin a{background-color:#0077b5}.shariff .linkedin a:hover{background-color:#0369a0}.shariff .linkedin .fa-linkedin{font-size:22px}.shariff .linkedin .share_count{color:#004785;background-color:#33AAE8}.shariff .theme-white .linkedin a{color:#0077b5}@media only screen and (min-width:600px){.shariff .linkedin .fa-linkedin{font-size:19px}}.shariff .mail a{background-color:#999}.shariff .mail a:hover{background-color:#a8a8a8}.shariff .mail .fa-envelope{font-size:21px}.shariff .theme-white .mail a{color:#999}@media only screen and (min-width:600px){.shariff .mail .fa-envelope{font-size:18px}}.shariff .pinterest a{background-color:#bd081c}.shariff .pinterest a:hover{background-color:#d50920}.shariff .pinterest .fa-pinterest-p{font-size:22px}.shariff .pinterest .share_count{color:#a31601;background-color:#eda79d}.shariff .theme-white .pinterest a{color:#bd081c}@media only screen and (min-width:600px){.shariff .pinterest .fa-pinterest-p{font-size:19px;position:relative;top:1px}}.shariff .reddit a{background-color:#ff4500}.shariff .reddit a:hover{background-color:#ff6a33}.shariff .reddit .fa-reddit{font-size:17px}.shariff .theme-white .reddit a{color:#ff4500}@media only screen and (min-width:600px){.shariff .reddit .fa-reddit{font-size:16px}}.shariff .stumbleupon a{background-color:#eb4924}.shariff .stumbleupon a:hover{background-color:#ef7053}.shariff .stumbleupon .fa-stumbleupon{font-size:17px}.shariff .theme-white .stumbleupon a{color:#eb4924}@media only screen and (min-width:600px){.shariff .stumbleupon .fa-stumbleupon{font-size:16px}}.shariff .twitter a{background-color:#55acee}.shariff .twitter a:hover{background-color:#32bbf5}.shariff .twitter .fa-twitter{font-size:28px}.shariff .twitter .share_count{color:#0174a4;background-color:#96D4EE}.shariff .theme-white .twitter a{color:#55acee}@media only screen and (min-width:600px){.shariff .twitter .fa-twitter{font-size:24px}}.shariff .whatsapp a{background-color:#5cbe4a}.shariff .whatsapp a:hover{background-color:#34af23}.shariff .whatsapp .fa-whatsapp{font-size:28px}.shariff .theme-white .whatsapp a{color:#5cbe4a}@media only screen and (min-width:600px){.shariff .whatsapp .fa-whatsapp{font-size:22px}}.shariff .xing a{background-color:#126567}.shariff .xing a:hover{background-color:#29888a}.shariff .xing .fa-xing{font-size:22px}.shariff .xing .share_count{color:#15686a;background-color:#4fa5a7}.shariff .theme-white .xing a{color:#126567}@media only screen and (min-width:600px){.shariff .xing .fa-xing{font-size:19px}}.shariff .tumblr a{background-color:#36465D}.shariff .tumblr a:hover{background-color:#44546B}.shariff .tumblr .fa-tumblr{font-size:28px}.shariff .theme-white .tumblr a{color:#5cbe4a}@media only screen and (min-width:600px){.shariff .tumblr .fa-tumblr{font-size:22px}}.shariff .threema a{background-color:#333}.shariff .threema a:hover{background-color:#1f1f1f}.shariff .threema .fa-lock{font-size:28px}.shariff .theme-white .threema a{color:#333}@media only screen and (min-width:600px){.shariff .threema .fa-lock{font-size:22px}}
Index: /views/js/shariff/shariff.complete.js
===================================================================
--- /views/js/shariff/shariff.complete.js	(revision 5534)
+++ /views/js/shariff/shariff.complete.js	(revision 5534)
@@ -0,0 +1,99 @@
+
+/*!
+ * shariff - v1.23.2 - 09.05.2016
+ * https://github.com/heiseonline/shariff
+ * Copyright (c) 2016 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
+ * Licensed under the MIT license
+ */
+
+
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"===n||pe.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Me,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),("object"==typeof t||"function"==typeof t)&&(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function d(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Fe.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function g(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,u,l,c,d,f=e.length,v=p(t),y=[],x=0;f>x;x++)if(a=e[x],a||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ue.test(a)){for(u=u||v.appendChild(t.createElement("div")),l=(We.exec(a)||["",""])[1].toLowerCase(),d=Xe[l]||Xe._default,u.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)u=u.lastChild;if(!de.leadingWhitespace&&$e.test(a)&&y.push(t.createTextNode($e.exec(a)[0])),!de.tbody)for(a="table"!==l||Ve.test(a)?"<table>"!==d[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=v.lastChild}else y.push(t.createTextNode(a));for(u&&v.removeChild(u),de.appendChecked||pe.grep(h(y,"input"),g),x=0;a=y[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(v.appendChild(a),"script"),s&&m(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,v}function y(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)pe.event.add(t,n,s[n][r])}a.data&&(a.data=pe.extend({},a.data))}}function k(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){i=pe._data(t);for(r in i.events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(C(t).text=e.text,E(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function S(e,t,n,r){t=oe.apply([],t);var i,o,a,s,u,l,c=0,d=e.length,f=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(d&&(l=v(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;d>c;c++)o=l,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,pe.map(s,E),c=0;a>c;c++)o=s[c],Ie.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(u,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));l=i=null}return e}function A(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(h(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&m(h(r,"script")),r.parentNode.removeChild(r));return e}function D(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function L(e){var t=re,n=lt[e];return n||(n=D(e,t),"none"!==n&&n||(ut=(ut||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function j(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=pe._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Re(r)&&(o[a]=pe._data(r,"olddisplay",L(r.nodeName)))):(i=Re(r),(n&&"none"!==n||!i)&&pe._data(r,"olddisplay",i?n:pe.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function M(e,t,n){var r=bt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function _(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=pe.css(e,n+Oe[o],!0,i)),r?("content"===n&&(a-=pe.css(e,"padding"+Oe[o],!0,i)),"margin"!==n&&(a-=pe.css(e,"border"+Oe[o]+"Width",!0,i))):(a+=pe.css(e,"padding"+Oe[o],!0,i),"padding"!==n&&(a+=pe.css(e,"border"+Oe[o]+"Width",!0,i)));return a}function F(t,n,r){var i=!0,o="width"===n?t.offsetWidth:t.offsetHeight,a=ht(t),s=de.boxSizing&&"border-box"===pe.css(t,"boxSizing",!1,a);if(re.msFullscreenElement&&e.top!==e&&t.getClientRects().length&&(o=Math.round(100*t.getBoundingClientRect()[n])),0>=o||null==o){if(o=mt(t,n,a),(0>o||null==o)&&(o=t.style[n]),dt.test(o))return o;i=s&&(de.boxSizingReliable()||o===t.style[n]),o=parseFloat(o)||0}return o+_(t,n,r||(s?"border":"content"),i,a)+"px"}function O(e,t,n,r,i){return new O.prototype.init(e,t,n,r,i)}function R(){return e.setTimeout(function(){Nt=void 0}),Nt=pe.now()}function P(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Oe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e,t,n){for(var r,i=($.tweeners[t]||[]).concat($.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function W(e,t,n){var r,i,o,a,s,u,l,c,d=this,f={},p=e.style,h=e.nodeType&&Re(e),m=pe._data(e,"fxshow");n.queue||(s=pe._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,pe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=pe.css(e,"display"),c="none"===l?pe._data(e,"olddisplay")||L(e.nodeName):l,"inline"===c&&"none"===pe.css(e,"float")&&(de.inlineBlockNeedsLayout&&"inline"!==L(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",de.shrinkWrapBlocks()||d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],St.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;h=!0}f[r]=m&&m[r]||pe.style(e,r)}else l=void 0;if(pe.isEmptyObject(f))"inline"===("none"===l?L(e.nodeName):l)&&(p.display=l);else{m?"hidden"in m&&(h=m.hidden):m=pe._data(e,"fxshow",{}),o&&(m.hidden=!h),h?pe(e).show():d.done(function(){pe(e).hide()}),d.done(function(){var t;pe._removeData(e,"fxshow");for(t in f)pe.style(e,t,f[t])});for(r in f)a=B(h?m[r]:0,r,d),r in m||(m[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function I(e,t){var n,r,i,o,a;for(n in e)if(r=pe.camelCase(n),i=t[r],o=e[n],pe.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=pe.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function $(e,t,n){var r,i,o=0,a=$.prefilters.length,s=pe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Nt||R(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:Nt||R(),duration:n.duration,tweens:[],createTween:function(t,n){var r=pe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(I(c,l.opts.specialEasing);a>o;o++)if(r=$.prefilters[o].call(l,e,c,l.opts))return pe.isFunction(r.stop)&&(pe._queueHooks(l.elem,l.opts.queue).stop=pe.proxy(r.stop,r)),r;return pe.map(c,B,l),pe.isFunction(l.opts.start)&&l.opts.start.call(e,l),pe.fx.timer(pe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function z(e){return pe.attr(e,"class")||""}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(De)||[];if(pe.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function i(s){var u;return o[s]=!0,pe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Qt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function V(e,t){var n,r,i=pe.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&pe.extend(!0,e,n),e}function Y(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function J(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function G(e){return e.style&&e.style.display||pe.css(e,"display")}function Q(e){for(;e&&1===e.nodeType;){if("none"===G(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function K(e,t,n,r){var i;if(pe.isArray(t))pe.each(t,function(t,i){n||nn.test(e)?r(e,i):K(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==pe.type(t))r(e,t);else for(i in t)K(e+"["+i+"]",t[i],n,r)}function Z(){try{return new e.XMLHttpRequest}catch(t){}}function ee(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function te(e){return pe.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var ne=[],re=e.document,ie=ne.slice,oe=ne.concat,ae=ne.push,se=ne.indexOf,ue={},le=ue.toString,ce=ue.hasOwnProperty,de={},fe="1.12.0",pe=function(e,t){return new pe.fn.init(e,t)},he=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,me=/^-ms-/,ge=/-([\da-z])/gi,ve=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:fe,constructor:pe,selector:"",length:0,toArray:function(){return ie.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:ie.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:ne.sort,splice:ne.splice},pe.extend=pe.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||pe.isFunction(a)||(a={}),s===u&&(a=this,s--);u>s;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],n=i[r],a!==n&&(l&&n&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,o=e&&pe.isArray(e)?e:[]):o=e&&pe.isPlainObject(e)?e:{},a[r]=pe.extend(l,o,n)):void 0!==n&&(a[r]=n));return a},pe.extend({expando:"jQuery"+(fe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!de.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(me,"ms-").replace(ge,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;r>i&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(he,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?pe.merge(r,"string"==typeof e?[e]:e):ae.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(se)return se.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;)e[i++]=t[r++];if(n!==n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,r){var i,o,a=0,s=[];if(n(e))for(i=e.length;i>a;a++)o=t(e[a],a,r),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,r),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(i=e[t],t=e,e=i),pe.isFunction(e)?(n=ie.call(arguments,2),r=function(){return e.apply(t||this,n.concat(ie.call(arguments)))},r.guid=e.guid=e.guid||pe.guid++,r):void 0},now:function(){return+new Date},support:de}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ne[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ue["[object "+t+"]"]=t.toLowerCase()});var ye=function(e){function t(e,t,n,r){var i,o,a,s,u,l,d,p,h=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&((t?t.ownerDocument||t:B)!==H&&j(t),t=t||H,M)){if(11!==m&&(l=ve.exec(e)))if(i=l[1]){if(9===m){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(h&&(a=h.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return K.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&w.getElementsByClassName&&t.getElementsByClassName)return K.apply(n,t.getElementsByClassName(i)),n}if(w.qsa&&!X[e+" "]&&(!_||!_.test(e))){if(1!==m)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,"\\$&"):t.setAttribute("id",s=P),d=N(e),o=d.length,u=fe.test(s)?"#"+s:"[id='"+s+"']";o--;)d[o]=u+" "+f(d[o]);p=d.join(","),h=ye.test(e)&&c(t.parentNode)||t}if(p)try{return K.apply(n,h.querySelectorAll(p)),n}catch(g){}finally{s===P&&t.removeAttribute("id")}}}return S(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[P]||(t[P]={}),u=l[t.uniqueID]||(l[t.uniqueID]={}),(s=u[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(u[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function v(e,t,n,i,o,a){return i&&!i[P]&&(i=v(i)),o&&!o[P]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,d,f=[],p=[],h=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,u),x=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(d=l[c])&&(x[p[c]]=!(y[p[c]]=d));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(d=x[c])&&l.push(y[c]=d);o(null,x=[],l,u)}for(c=x.length;c--;)(d=x[c])&&(l=o?ee(r,d):f[c])>-1&&(r[l]=!(a[l]=d))}}else x=g(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):K.apply(a,x)})}function y(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];i>s;s++)if(n=T.relative[e[s].type])c=[p(h(c),n)];else{if(n=T.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!T.relative[e[r].type];r++);return v(s>1&&h(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}c.push(n)}return h(c)}function x(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,d,f,p=0,h="0",m=r&&[],v=[],y=A,x=r||o&&T.find.TAG("*",l),b=W+=null==y?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(d=0,a||c.ownerDocument===H||(j(c),s=!M);f=e[d++];)if(f(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!f&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=G.call(u));v=g(v)}K.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=y),m};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,L,j,H,q,M,_,F,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(L=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,Q=J.push,K=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),fe=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){j()};try{K.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){K={apply:J.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,M=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ge.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&M?t.getElementsByClassName(e):void 0},F=[],_=[],(w.qsa=ge.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+P+"'></a><select id='"+P+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||_.push("~="),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||_.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")})),(w.matchesSelector=ge.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),F.push("!=",oe)}),_=_.length&&new RegExp(_.join("|")),F=F.length&&new RegExp(F.join("|")),t=ge.test(q.compareDocumentPosition),R=t||ge.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return L=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return L=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&j(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&M&&!X[n+" "]&&(!F||!F.test(n))&&(!_||!_.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&j(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&j(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==r?r:w.attributes||!M?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(L=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),L){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(g){if(o){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(f=g,d=f[P]||(f[P]={}),
+c=d[f.uniqueID]||(d[f.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(x=p=0)||h.pop();)if(1===f.nodeType&&++x&&f===t){c[e]=[W,p,x];break}}else if(y&&(f=t,d=f[P]||(f[P]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(f=++p&&f&&f[m]||(x=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++x||(y&&(d=f[P]||(f[P]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),c[e]=[W,x]),f!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},T.pseudos.nth=T.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[b]=s(b);for(b in{submit:!0,reset:!0})T.pseudos[b]=u(b);return d.prototype=T.filters=T.pseudos,T.setFilters=new d,N=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=T.preFilter;s;){(!r||(i=ue.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=le.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in T.filter)!(i=pe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):z(e,u).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=N(e)),n=t.length;n--;)o=y(t[n]),o[P]?r.push(o):i.push(o);o=X(e,x(i,r)),o.selector=e}return o},S=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,d=!r&&N(e=l.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&M&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ye.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return K.apply(n,r),n;break}}return(l||k(e,d))(r,t,!M,n,!t||ye.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!L,j(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ye,pe.expr=ye.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ye.uniqueSort,pe.text=ye.getText,pe.isXMLDoc=ye.isXML,pe.contains=ye.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;i>t;t++)if(pe.contains(r[t],this))return!0}));for(t=0;i>t;t++)pe.find(e,r[t],n);return n=this.pushStack(i>1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=we.test(e)||"string"!=typeof e?pe(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)a[u].apply(n[0],n[1])===!1&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function r(t){pe.each(t,function(t,n){pe.isFunction(n)?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==pe.type(n)&&r(n)})}(arguments),n&&!t&&l()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,a,n))>-1;)a.splice(n,1),u>=n&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&pe.isFunction(o[i].promise)?o[i].promise().progress(l(i,n,t)).done(l(i,r,o)).fail(u.reject):--s;return s||u.resolveWith(r,o),u.promise()}});var Le;pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(e===!0?--pe.readyWait:pe.isReady)||(pe.isReady=!0,e!==!0&&--pe.readyWait>0||(Le.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!Le)if(Le=pe.Deferred(),"complete"===re.readyState)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return Le.promise(t)},pe.ready.promise();var je;for(je in pe(de))break;de.ownFirst="0"===je,de.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",de.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");de.deleteExpando=!0;try{delete e.test}catch(t){de.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Me=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=pe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=pe._data(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),function(){var e;de.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,r;return n=re.getElementsByTagName("body")[0],n&&n.style?(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(re.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(r),e):void 0}}();var _e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Fe=new RegExp("^(?:([+-])=|)("+_e+")([a-z%]*)$","i"),Oe=["Top","Right","Bottom","Left"],Re=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},Pe=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===pe.type(n)){i=!0;for(s in n)Pe(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,pe.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(pe(e),n)})),t))for(;u>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},Be=/^(?:checkbox|radio)$/i,We=/<([\w:-]+)/,Ie=/^$|\/(?:java|ecma)script/i,$e=/^\s+/,ze="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var e=re.createElement("div"),t=re.createDocumentFragment(),n=re.createElement("input");e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",de.leadingWhitespace=3===e.firstChild.nodeType,de.tbody=!e.getElementsByTagName("tbody").length,de.htmlSerialize=!!e.getElementsByTagName("link").length,de.html5Clone="<:nav></:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),de.appendChecked=n.checked,e.innerHTML="<textarea>x</textarea>",de.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),de.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,de.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,de.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:de.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/<tbody/i;!function(){var t,n,r=re.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(de[t]=n in e)||(r.setAttribute(n,"t"),de[t]=r.attributes[n].expando===!1);r=null}();var Ye=/^(?:input|select|textarea)$/i,Je=/^key/,Ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qe=/^(?:focusinfocus|focusoutblur)$/,Ke=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,m,g=pe._data(e);if(g){for(n.handler&&(u=n,n=u.handler,i=u.selector),n.guid||(n.guid=pe.guid++),(a=g.events)||(a=g.events={}),(c=g.handle)||(c=g.handle=function(e){return"undefined"==typeof pe||e&&pe.event.triggered===e.type?void 0:pe.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(De)||[""],s=t.length;s--;)o=Ke.exec(t[s])||[],p=m=o[1],h=(o[2]||"").split(".").sort(),p&&(l=pe.event.special[p]||{},p=(i?l.delegateType:l.bindType)||p,l=pe.event.special[p]||{},d=pe.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&pe.expr.match.needsContext.test(i),namespace:h.join(".")},u),(f=a[p])||(f=a[p]=[],f.delegateCount=0,l.setup&&l.setup.call(e,r,h,c)!==!1||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),l.add&&(l.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),pe.event.global[p]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,m,g=pe.hasData(e)&&pe._data(e);if(g&&(c=g.events)){for(t=(t||"").match(De)||[""],l=t.length;l--;)if(s=Ke.exec(t[l])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(d=pe.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;o--;)a=f[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));u&&!f.length&&(d.teardown&&d.teardown.call(e,h,g.handle)!==!1||pe.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)pe.event.remove(e,p+t[l],n,r,!0);pe.isEmptyObject(c)&&(delete g.handle,pe._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,u,l,c,d,f=[r||re],p=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||re,3!==r.nodeType&&8!==r.nodeType&&!Qe.test(p+pe.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Qe.test(u+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(r.ownerDocument||re)&&f.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=f[d++])&&!t.isPropagationStopped();)t.type=d>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(f.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(m){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.rnamespace||e.rnamespace.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;s>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?pe(i,this).index(u)>-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Ge.test(i)?this.mouseHooks:Je.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||re),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=e.target.ownerDocument||re,i=r.documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===b()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=re.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?y:x):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=y,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=y,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=y,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!pe.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),de.submit||(pe.event.special.submit={setup:function(){return pe.nodeName(this,"form")?!1:void pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):void 0;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){return pe.nodeName(this,"form")?!1:void pe.event.remove(this,"._submit")}}),de.change||(pe.event.special.change={setup:function(){return Ye.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1):void pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ye.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return pe.event.remove(this,"._change"),!Ye.test(this.nodeName)}}),de.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=pe._data(r,t);i||r.addEventListener(e,n,!0),pe._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=pe._data(r,t)-1;i?pe._data(r,t,i):(r.removeEventListener(e,n,!0),pe._removeData(r,t))}}}),pe.fn.extend({on:function(e,t,n,r){return w(this,e,t,n,r)},one:function(e,t,n,r){return w(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,pe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=x),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?pe.event.trigger(e,t,n,!0):void 0}});var Ze=/ jQuery\d+="(?:null|\d+)"/g,et=new RegExp("<(?:"+ze+")[\\s/>]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/<script|<style|<link/i,rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(de.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(de.noCloneEvent&&de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&m(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=de.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(de.htmlSerialize||!et.test(e))&&(de.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(pe.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return S(this,arguments,function(t){var n=this.parentNode;
+pe.inArray(this,e)<0&&(pe.cleanData(h(this)),n&&n.replaceChild(t,this))},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,r=0,i=[],o=pe(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),pe(o[r])[t](n),ae.apply(i,n.get());return this.pushStack(i)}});var ut,lt={HTML:"block",BODY:"block"},ct=/^margin/,dt=new RegExp("^("+_e+")(?!px)[a-z%]+$","i"),ft=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},pt=re.documentElement;!function(){function t(){var t,c,d=re.documentElement;d.appendChild(u),l.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=i=s=!1,r=a=!0,e.getComputedStyle&&(c=e.getComputedStyle(l),n="1%"!==(c||{}).top,s="2px"===(c||{}).marginLeft,i="4px"===(c||{width:"4px"}).width,l.style.marginRight="50%",r="4px"===(c||{marginRight:"4px"}).marginRight,t=l.appendChild(re.createElement("div")),t.style.cssText=l.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",l.style.width="1px",a=!parseFloat((e.getComputedStyle(t)||{}).marginRight),l.removeChild(t)),l.style.display="none",o=0===l.getClientRects().length,o&&(l.style.display="",l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),d.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",de.opacity="0.5"===l.style.opacity,de.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),de.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(de,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,mt,gt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n.opener||(n=e),n.getComputedStyle(t)},mt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),!de.pixelMarginRight()&&dt.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},mt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),dt.test(a)&&!gt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var vt=/alpha\([^)]*\)/i,yt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+_e+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=mt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":de.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Fe.exec(n))&&i[1]&&(n=f(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),de.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=mt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){return n?xt.test(pe.css(e,"display"))&&0===e.offsetWidth?ft(e,wt,function(){return F(e,t,r)}):F(e,t,r):void 0},set:function(e,n,r){var i=r&&ht(e);return M(e,n,r?_(e,t,r,de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),de.opacity||(pe.cssHooks.opacity={get:function(e,t){return yt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(vt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=vt.test(o)?o.replace(vt,i):o+" "+i)}}),pe.cssHooks.marginRight=j(de.reliableMarginRight,function(e,t){return t?ft(e,{display:"inline-block"},mt,[e,"marginRight"]):void 0}),pe.cssHooks.marginLeft=j(de.reliableMarginLeft,function(e,t){return t?(parseFloat(mt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ft(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px":void 0}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=M)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;i>a;a++)o[t[a]]=pe.css(e,t[a],!1,r);return o}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return f(n.elem,e,Fe.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;i>r;r++)n=e[r],$.tweeners[n]=$.tweeners[n]||[],$.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?$.prefilters.unshift(e):$.prefilters.push(e)}}),pe.speed=function(e,t,n){var r=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return r.duration=pe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in pe.fx.speeds?pe.fx.speeds[r.duration]:pe.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){pe.isFunction(r.old)&&r.old.call(this),r.queue&&pe.dequeue(this,r.queue)},r},pe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Re).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=pe.isEmptyObject(e),o=pe.speed(t,n,r),a=function(){var t=$(this,pe.extend({},e),o);(i||pe._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=pe.timers,a=pe._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&At.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&pe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=pe.timers,a=r?r.length:0;for(n.finish=!0,pe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(P(t,!0),e,r,i)}}),pe.each({slideDown:P("show"),slideUp:P("hide"),slideToggle:P("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Nt=pe.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Nt=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){kt||(kt=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(kt),kt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e,t=re.createElement("input"),n=re.createElement("div"),r=re.createElement("select"),i=r.appendChild(re.createElement("option"));n=re.createElement("div"),n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",de.getSetAttribute="t"!==n.className,de.style=/top/.test(e.getAttribute("style")),de.hrefNormalized="/a"===e.getAttribute("href"),de.checkOn=!!t.value,de.optSelected=i.selected,de.enctype=!!re.createElement("form").enctype,r.disabled=!0,de.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),de.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),de.radioValue="t"===t.value}();var Dt=/\r/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],(n.selected||u===i)&&(de.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=pe.makeArray(t),a=i.length;a--;)if(r=i[a],pe.inArray(pe.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){return pe.isArray(t)?e.checked=pe.inArray(pe(e).val(),t)>-1:void 0}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,jt,Ht=pe.expr.attrHandle,qt=/^(?:checked|selected)$/i,Mt=de.getSetAttribute,_t=de.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?jt:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?_t&&Mt||!qt.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Mt?n:r)}}),jt={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):_t&&Mt||!qt.test(n)?e.setAttribute(!Mt&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ht[t]||pe.find.attr;_t&&Mt||!qt.test(t)?Ht[t]=function(e,t,r){var i,o;return r||(o=Ht[t],Ht[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Ht[t]=o),i}:Ht[t]=function(e,t,n){return n?void 0:e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),_t&&Mt||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Mt||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Ht.id=Ht.name=Ht.coords=function(e,t,n){var r;return n?void 0:(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""===t?!1:t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),de.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ft=/^(?:input|select|textarea|button|object)$/i,Ot=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ft.test(e.nodeName)||Ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),de.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),de.enctype||(pe.propFix.enctype="encoding");var Rt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Rt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Rt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(void 0===e||"boolean"===n)&&(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Rt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Pt=e.location,Bt=pe.now(),Wt=/\?/,It=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace(It,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var $t=/#.*$/,zt=/([?&])_=[^&]*/,Xt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ut=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Vt=/^(?:GET|HEAD)$/,Yt=/^\/\//,Jt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Gt={},Qt={},Kt="*/".concat("*"),Zt=Pt.href,en=Jt.exec(Zt.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Zt,type:"GET",isLocal:Ut.test(en[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Gt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,d,y,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&300>t||304===t,r&&(x=Y(f,T,r)),x=J(f,x,T,o),o?(f.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=x.state,d=x.data,y=x.error,o=!y)):(y=C,(t||!C)&&(C="error",0>t&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?m.resolveWith(p,[d,C,T]):m.rejectWith(p,[T,C,y]),T.statusCode(v),v=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,f,o?d:y]),g.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,f]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,d,f=pe.ajaxSetup({},n),p=f.context||f,h=f.context&&(p.nodeType||p.jquery)?pe(p):pe.event,m=pe.Deferred(),g=pe.Callbacks("once memory"),v=f.statusCode||{},y={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!d)for(d={};t=Xt.exec(s);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(m.promise(T).complete=g.add,T.success=T.done,T.error=T.fail,f.url=((t||f.url||Zt)+"").replace($t,"").replace(Yt,en[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=pe.trim(f.dataType||"*").toLowerCase().match(De)||[""],null==f.crossDomain&&(i=Jt.exec(f.url.toLowerCase()),f.crossDomain=!(!i||i[1]===en[1]&&i[2]===en[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(en[3]||("http:"===en[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=pe.param(f.data,f.traditional)),U(Gt,f,n,T),2===b)return T;l=pe.event&&f.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Vt.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(Wt.test(a)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=zt.test(a)?a.replace(zt,"$1_="+Bt++):a+(Wt.test(a)?"&":"?")+"_="+Bt++)),f.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(f.data&&f.hasContent&&f.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Kt+"; q=0.01":""):f.accepts["*"]);for(o in f.headers)T.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(f.beforeSend.call(p,T,f)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](f[o]);if(c=U(Qt,f,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,f]),2===b)return T;f.async&&f.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},f.timeout));try{b=1,c.send(y,r)}catch(C){if(!(2>b))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return de.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:Q(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var tn=/%20/g,nn=/\[\]$/,rn=/\r?\n/g,on=/^(?:submit|button|image|reset|file)$/i,an=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)K(n,e[n],t,i);return r.join("&").replace(tn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&an.test(this.nodeName)&&!on.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(rn,"\r\n")}}):{name:t.name,value:n.replace(rn,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var sn=0,un={},ln=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in un)un[e](void 0,!0)}),de.cors=!!ln&&"withCredentials"in ln,ln=de.ajax=!!ln,ln&&pe.ajaxTransport(function(t){if(!t.crossDomain||de.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++sn;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete un[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=un[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var cn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=cn.pop()||pe.expando+"_"+Bt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(Wt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,cn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),de.createHTMLDocument=function(){if(!re.implementation.createHTMLDocument)return!1;var e=re.implementation.createHTMLDocument("");return e.body.innerHTML="<form></form><form></form>",2===e.body.childNodes.length}(),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||(de.createHTMLDocument?re.implementation.createHTMLDocument(""):re);var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=v([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var fn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&fn)return fn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("<div>").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(a,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),d=pe(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=d.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):d.css(f)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),
+t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0)-e.scrollTop(),n.left+=pe.css(e[0],"borderLeftWidth",!0)-e.scrollLeft()),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=j(de.pixelPosition,function(e,n){return n?(n=mt(e,t),dt.test(n)?pe(e).position()[t]+"px":n):void 0})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var pn=e.jQuery,hn=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=hn),t&&e.jQuery===pe&&(e.jQuery=pn),pe},t||(e.jQuery=e.$=pe),pe});
+
+},{}],2:[function(require,module,exports){
+(function (global){
+!function(e){function o(e){throw new RangeError(T[e])}function n(e,o){for(var n=e.length,r=[];n--;)r[n]=o(e[n]);return r}function r(e,o){var r=e.split("@"),t="";r.length>1&&(t=r[0]+"@",e=r[1]),e=e.replace(S,".");var u=e.split("."),i=n(u,o).join(".");return t+i}function t(e){for(var o,n,r=[],t=0,u=e.length;u>t;)o=e.charCodeAt(t++),o>=55296&&56319>=o&&u>t?(n=e.charCodeAt(t++),56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)):r.push(o);return r}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function f(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function c(e,o,n){var r=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;r+=b)e=M(e/L);return M(r+(L+1)*e/(e+m))}function l(e){var n,r,t,f,l,s,d,a,p,h,v=[],g=e.length,w=0,m=I,j=A;for(r=e.lastIndexOf(E),0>r&&(r=0),t=0;r>t;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(f=r>0?r+1:0;g>f;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),a=i(e.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&o("overflow"),w+=a*s,p=j>=d?y:d>=j+C?C:d-j,!(p>a);d+=b)h=b-p,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,r,u,i,l,s,d,a,p,h,v,g,w,m,j,F=[];for(e=t(e),g=e.length,n=I,r=0,l=A,s=0;g>s;++s)v=e[s],128>v&&F.push(P(v));for(u=i=F.length,i&&F.push(E);g>u;){for(d=x,s=0;g>s;++s)v=e[s],v>=n&&d>v&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&o("overflow"),r+=(d-n)*w,n=d,s=0;g>s;++s)if(v=e[s],n>v&&++r>x&&o("overflow"),v==n){for(a=r,p=b;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=b)j=a-h,m=b-h,F.push(P(f(h+j%m,0))),a=M(j/m);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(e){return r(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+s(e):e})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;(v.global===v||v.window===v||v.self===v)&&(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.3.2",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else e.punycode=g}(this);
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],3:[function(require,module,exports){
+"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
+
+},{}],4:[function(require,module,exports){
+"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
+
+},{}],5:[function(require,module,exports){
+"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
+
+},{"./decode":3,"./encode":4}],6:[function(require,module,exports){
+function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}function isString(t){return"string"==typeof t}function isObject(t){return"object"==typeof t&&null!==t}function isNull(t){return null===t}function isNullOrUndefined(t){return null==t}var punycode=require("punycode");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n","	"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t;h=h.trim();var r=protocolPattern.exec(h);if(r){r=r[0];var o=r.toLowerCase();this.protocol=o,h=h.substr(r.length)}if(e||r||h.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===h.substr(0,2);!a||r&&hostlessProtocol[r]||(h=h.substr(2),this.slashes=!0)}if(!hostlessProtocol[r]&&(a||r&&!slashedProtocol[r])){for(var n=-1,i=0;i<hostEndingChars.length;i++){var l=h.indexOf(hostEndingChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}var c,u;u=-1===n?h.lastIndexOf("@"):h.lastIndexOf("@",n),-1!==u&&(c=h.slice(0,u),h=h.slice(u+1),this.auth=decodeURIComponent(c)),n=-1;for(var i=0;i<nonHostChars.length;i++){var l=h.indexOf(nonHostChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}-1===n&&(n=h.length),this.host=h.slice(0,n),h=h.slice(n),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),i=0,m=f.length;m>i;i++){var v=f[i];if(v&&!v.match(hostnamePartPattern)){for(var g="",y=0,d=v.length;d>y;y++)g+=v.charCodeAt(y)>127?"x":v[y];if(!g.match(hostnamePartPattern)){var P=f.slice(0,i),b=f.slice(i+1),j=v.match(hostnamePartStart);j&&(P.push(j[1]),b.unshift(j[2])),b.length&&(h="/"+b.join(".")+h),this.hostname=P.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){for(var O=this.hostname.split("."),q=[],i=0;i<O.length;++i){var x=O[i];q.push(x.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(x):x)}this.hostname=q.join(".")}var U=this.port?":"+this.port:"",C=this.hostname||"";this.host=C+U,this.href+=this.host,p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==h[0]&&(h="/"+h))}if(!unsafeProtocol[o])for(var i=0,m=autoEscape.length;m>i;i++){var A=autoEscape[i],E=encodeURIComponent(A);E===A&&(E=escape(A)),h=h.split(A).join(E)}var w=h.indexOf("#");-1!==w&&(this.hash=h.substr(w),h=h.slice(0,w));var R=h.indexOf("?");if(-1!==R?(this.search=h.substr(R),this.query=h.substr(R+1),s&&(this.query=querystring.parse(this.query)),h=h.slice(0,R)):s&&(this.search="",this.query={}),h&&(this.pathname=h),slashedProtocol[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",x=this.search||"";this.path=U+x}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(o=querystring.stringify(this.query));var a=this.search||o&&"?"+o||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),a&&"?"!==a.charAt(0)&&(a="?"+a),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),s+r+e+a+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}var e=new Url;if(Object.keys(this).forEach(function(t){e[t]=this[t]},this),e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(s){"protocol"!==s&&(e[s]=t[s])}),slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e;if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol])return Object.keys(t).forEach(function(s){e[s]=t[s]}),e.href=e.format(),e;if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),e.pathname=h.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var r=e.pathname||"",o=e.search||"";e.path=r+o}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var a=e.pathname&&"/"===e.pathname.charAt(0),n=t.host||t.pathname&&"/"===t.pathname.charAt(0),i=n||a||e.host&&t.pathname,l=i,c=e.pathname&&e.pathname.split("/")||[],h=t.pathname&&t.pathname.split("/")||[],u=e.protocol&&!slashedProtocol[e.protocol];if(u&&(e.hostname="",e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),i=i&&(""===h[0]||""===c[0])),n)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,c=h;else if(h.length)c||(c=[]),c.pop(),c=c.concat(h),e.search=t.search,e.query=t.query;else if(!isNullOrUndefined(t.search)){if(u){e.hostname=e.host=c.shift();var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return e.search=t.search,e.query=t.query,isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!c.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var f=c.slice(-1)[0],m=(e.host||t.host)&&("."===f||".."===f)||""===f,v=0,g=c.length;g>=0;g--)f=c[g],"."==f?c.splice(g,1):".."===f?(c.splice(g,1),v++):v&&(c.splice(g,1),v--);if(!i&&!l)for(;v--;v)c.unshift("..");!i||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),m&&"/"!==c.join("/").substr(-1)&&c.push("");var y=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(u){e.hostname=e.host=y?"":c.length?c.shift():"";var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return i=i||e.host&&c.length,i&&!y&&c.unshift(""),c.length?e.pathname=c.join("/"):(e.pathname=null,e.path=null),isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
+
+},{"punycode":2,"querystring":5}],7:[function(require,module,exports){
+"use strict";module.exports=function(d){var e=encodeURIComponent(d.getURL());return{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"addthis",faName:"fa-plus",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² AddThis",da:"Del pÃ¥ AddThis",de:"Bei AddThis teilen",en:"Share on AddThis",es:"Compartir en AddThis",fi:"Jaa AddThisissÃ€",fr:"Partager sur AddThis",hr:"Podijelite na AddThis",hu:"MegosztÃ¡s AddThisen",it:"Condividi su AddThis",ja:"AddThisäžã§å
+±æ",ko:"AddThisìì ê³µì íêž°",nl:"Delen op AddThis",no:"Del pÃ¥ AddThis",pl:"UdostÄpnij przez AddThis",pt:"Compartilhar no AddThis",ro:"PartajeazÄ pe AddThis",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° AddThis",sk:"ZdieÄŸaÅ¥ na AddThis",sl:"Deli na AddThis",sr:"Podeli na AddThis",sv:"Dela pÃ¥ AddThis",tr:"AddThis'ta paylaÅ",zh:"åšAddThisäžåäº«"},shareUrl:"http://api.addthis.com/oexchange/0.8/offer?url="+e+d.getReferrerTrack()}};
+
+},{}],8:[function(require,module,exports){
+"use strict";var url=require("url");module.exports=function(e){var r=url.parse("https://share.diasporafoundation.org/",!0);return r.query.url=e.getURL(),r.query.title=e.getTitle()||e.getMeta("DC.title"),r.protocol="https",delete r.search,{popup:!0,shareText:{de:"teilen",en:"share"},name:"diaspora",faName:"fa-asterisk",title:{de:"Bei Diaspora teilen",en:"Share on Diaspora"},shareUrl:url.format(r)+e.getReferrerTrack()}};
+
+},{"url":6}],9:[function(require,module,exports){
+"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"facebook",faName:"fa-facebook",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð²ÑÐ² Facebook",da:"Del pÃ¥ Facebook",de:"Bei Facebook teilen",en:"Share on Facebook",es:"Compartir en Facebook",fi:"Jaa Facebookissa",fr:"Partager sur Facebook",hr:"Podijelite na Facebooku",hu:"MegosztÃ¡s Facebookon",it:"Condividi su Facebook",ja:"ãã§ã€ã¹ããã¯äžã§å
+±æ",ko:"íìŽì€ë¶ìì ê³µì íêž°",nl:"Delen op Facebook",no:"Del pÃ¥ Facebook",pl:"UdostÄpnij na Facebooku",pt:"Compartilhar no Facebook",ro:"PartajeazÄ pe Facebook",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Facebook",sk:"ZdieÄŸaÅ¥ na Facebooku",sl:"Deli na Facebooku",sr:"Podeli na Facebook-u",sv:"Dela pÃ¥ Facebook",tr:"Facebook'ta paylaÅ",zh:"åšFacebookäžåäº«"},shareUrl:"https://www.facebook.com/sharer/sharer.php?u="+o+e.getReferrerTrack()}};
+
+},{}],10:[function(require,module,exports){
+"use strict";module.exports=function(t){var e=encodeURIComponent(t.getURL()),o=t.getMeta("DC.title"),r=t.getMeta("DC.creator"),n=t.getMeta("description");return o.length>0&&r.length>0?o+=" - "+r:o=t.getTitle(),{popup:!0,shareText:"Flattr",name:"flattr",faName:"fa-money",title:{de:"Artikel flattrn",en:"Flattr this"},shareUrl:"https://flattr.com/submit/auto?title="+encodeURIComponent(o)+"&description="+encodeURIComponent(n)+"&category="+encodeURIComponent(t.options.flattrCategory||"text")+"&user_id="+encodeURIComponent(t.options.flattrUser)+"&url="+e+t.getReferrerTrack()}};
+
+},{}],11:[function(require,module,exports){
+"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"googleplus",faName:"fa-google-plus",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Google+",da:"Del pÃ¥ Google+",de:"Bei Google+ teilen",en:"Share on Google+",es:"Compartir en Google+",fi:"Jaa Google+:ssa",fr:"Partager sur Goolge+",hr:"Podijelite na Google+",hu:"MegosztÃ¡s Google+on",it:"Condividi su Google+",ja:"Google+äžã§å
+±æ",ko:"Google+ìì ê³µì íêž°",nl:"Delen op Google+",no:"Del pÃ¥ Google+",pl:"UdostÄpnij na Google+",pt:"Compartilhar no Google+",ro:"PartajeazÄ pe Google+",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Google+",sk:"ZdieÄŸaÅ¥ na Google+",sl:"Deli na Google+",sr:"Podeli na Google+",sv:"Dela pÃ¥ Google+",tr:"Google+'da paylaÅ",zh:"åšGoogle+äžåäº«"},shareUrl:"https://plus.google.com/share?url="+o+e.getReferrerTrack()}};
+
+},{}],12:[function(require,module,exports){
+"use strict";module.exports=function(e){return{blank:!0,popup:!1,shareText:"Info",name:"info",faName:"fa-info",title:{de:"weitere Informationen",en:"more information",es:"mÃ¡s informaciones",fr:"plus d'informations",it:"maggiori informazioni",da:"flere oplysninger",nl:"verdere informatie"},shareUrl:e.getInfoUrl()}};
+
+},{}],13:[function(require,module,exports){
+"use strict";module.exports=function(e){var n=encodeURIComponent(e.getURL());return{popup:!0,shareText:{de:"mitteilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"ã·ã§ã¢",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"distribuiÈi",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"linkedin",faName:"fa-linkedin",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² LinkedIn",da:"Del pÃ¥ LinkedIn",de:"Bei LinkedIn teilen",en:"Share on LinkedIn",es:"Compartir en LinkedIn",fi:"Jaa LinkedInissÃ€",fr:"Partager sur LinkedIn",hr:"Podijelite na LinkedIn",hu:"MegosztÃ¡s LinkedInen",it:"Condividi su LinkedIn",ja:"LinkedInäžã§å
+±æ",ko:"LinkedInìì ê³µì íêž°",nl:"Delen op LinkedIn",no:"Del pÃ¥ LinkedIn",pl:"UdostÄpnij przez LinkedIn",pt:"Compartilhar no LinkedIn",ro:"PartajeazÄ pe LinkedIn",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° LinkedIn",sk:"ZdieÄŸaÅ¥ na LinkedIn",sl:"Deli na LinkedIn",sr:"Podeli na LinkedIn-u",sv:"Dela pÃ¥ LinkedIn",tr:"LinkedIn'ta paylaÅ",zh:"åšLinkedInäžåäº«"},shareUrl:"https://www.linkedin.com/cws/share?url="+n+e.getReferrerTrack()}};
+
+},{}],14:[function(require,module,exports){
+"use strict";module.exports=function(e){var i=e.getOption("mailUrl");return 0===i.indexOf("mailto:")&&(i+="?subject="+encodeURIComponent(e.getOption("mailSubject")),i+="&body="+encodeURIComponent(e.getOption("mailBody"))),{blank:0===i.indexOf("http"),popup:!1,shareText:"mail",name:"mail",faName:"fa-envelope",title:{bg:"ÐÐ·Ð¿ÑÐ°ÑÐž Ð¿ÐŸ ÐžÐŒÐµÐ¹Ð»",da:"Sende via e-mail",de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fi:"LÃ€hetÃ€ sÃ€hkÃ¶postitse",fr:"Envoyer par courriel",hr:"PoÅ¡aljite emailom",hu:"ElkÃŒldÃ©s e-mailben",it:"Inviare via email",ja:"é»å­ã¡ãŒã«ã§éä¿¡",ko:"ìŽë©ìŒë¡ ë³ŽëŽêž°",nl:"Sturen via e-mail",no:"Send via epost",pl:"WyÅlij e-mailem",pt:"Enviar por e-mail",ro:"Trimite prin e-mail",ru:"ÐÑÐ¿ÑÐ°Ð²ÐžÑÑ Ð¿ÐŸ ÑÐ». Ð¿ÐŸÑÑÐµ",sk:"PoslaÅ¥ e-mailom",sl:"PoÅ¡lji po elektronski poÅ¡ti",sr:"PoÅ¡alji putem email-a",sv:"Skicka via e-post",tr:"E-posta ile gÃ¶nder",zh:"éè¿çµå­é®ä»¶äŒ é"},shareUrl:i}};
+
+},{}],15:[function(require,module,exports){
+"use strict";var url=require("url");module.exports=function(e){var t=e.getMeta("DC.title")||e.getTitle(),r=e.getMeta("DC.creator");r.length>0&&(t+=" - "+r);var i=e.getOption("mediaUrl");i&&i.length<=0&&(i=e.getMeta("og:image"));var n=url.parse("https://www.pinterest.com/pin/create/link/",!0);return n.query.url=e.getURL(),n.query.media=i,n.query.description=t,delete n.search,{popup:!0,shareText:"pin it",name:"pinterest",faName:"fa-pinterest-p",title:{de:"Bei Pinterest pinnen",en:"Pin it on Pinterest",es:"Compartir en Pinterest",fr:"Partager sur Pinterest",it:"Condividi su Pinterest",da:"Del pÃ¥ Pinterest",nl:"Delen op Pinterest"},shareUrl:url.format(n)+e.getReferrerTrack()}};
+
+},{"url":6}],16:[function(require,module,exports){
+"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{de:"teilen",en:"share"},name:"reddit",faName:"fa-reddit",title:{de:"Bei Reddit teilen",en:"Share on Reddit"},shareUrl:"https://reddit.com/submit?url="+t+r+e.getReferrerTrack()}};
+
+},{}],17:[function(require,module,exports){
+"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),n=encodeURIComponent(e.getTitle());return""!==n&&(n="&title="+n),{popup:!0,shareText:{de:"teilen",en:"share"},name:"stumbleupon",faName:"fa-stumbleupon",title:{de:"Bei Stumbleupon teilen",en:"Share on Stumbleupon"},shareUrl:"https://www.stumbleupon.com/submit?url="+t+n+e.getReferrerTrack()}};
+
+},{}],18:[function(require,module,exports){
+"use strict";module.exports=function(e){var a=encodeURIComponent(e.getURL()),r=e.getMeta("DC.title"),t=e.getMeta("DC.creator");return r.length>0&&t.length>0?r+=" - "+t:r=e.getTitle(),{popup:!1,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"threema",faName:"fa-lock",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Threema",da:"Del pÃ¥ Threema",de:"Bei Threema teilen",en:"Share on Threema",es:"Compartir en Threema",fi:"Jaa ThreemaissÃ€",fr:"Partager sur Threema",hr:"Podijelite na Threema",hu:"MegosztÃ¡s Threemaen",it:"Condividi su Threema",ja:"Threemaäžã§å
+±æ",ko:"Threemaìì ê³µì íêž°",nl:"Delen op Threema",no:"Del pÃ¥ Threema",pl:"UdostÄpnij przez Threema",pt:"Compartilhar no Threema",ro:"PartajeazÄ pe Threema",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Threema",sk:"ZdieÄŸaÅ¥ na Threema",sl:"Deli na Threema",sr:"Podeli na Threema-u",sv:"Dela pÃ¥ Threema",tr:"Threema'ta paylaÅ",zh:"åšThreemaäžåäº«"},shareUrl:"threema://compose?text="+encodeURIComponent(r)+"%20"+a+e.getReferrerTrack()}};
+
+},{}],19:[function(require,module,exports){
+"use strict";module.exports=function(t){var e=encodeURIComponent(t.getURL()),r=t.getMeta("DC.title"),l=t.getMeta("DC.creator");return r.length>0&&l.length>0?r+=" - "+l:r=t.getTitle(),{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"tumblr",faName:"fa-tumblr",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² tumblr",da:"Del pÃ¥ tumblr",de:"Bei tumblr teilen",en:"Share on tumblr",es:"Compartir en tumblr",fi:"Jaa tumblrissÃ€",fr:"Partager sur tumblr",hr:"Podijelite na tumblr",hu:"MegosztÃ¡s tumblren",it:"Condividi su tumblr",ja:"tumblräžã§å
+±æ",ko:"tumblrìì ê³µì íêž°",nl:"Delen op tumblr",no:"Del pÃ¥ tumblr",pl:"UdostÄpnij przez tumblr",pt:"Compartilhar no tumblr",ro:"PartajeazÄ pe tumblr",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° tumblr",sk:"ZdieÄŸaÅ¥ na tumblr",sl:"Deli na tumblr",sr:"Podeli na tumblr-u",sv:"Dela pÃ¥ tumblr",tr:"tumblr'ta paylaÅ",zh:"åštumblräžåäº«"},shareUrl:"http://tumblr.com/widgets/share/tool?canonicalUrl="+e+t.getReferrerTrack()}};
+
+},{}],20:[function(require,module,exports){
+"use strict";var url=require("url"),$=require("jquery"),abbreviateText=function(t,e){var r=$("<div/>").html(t).text();if(r.length<=e)return t;var i=r.substring(0,e-1).lastIndexOf(" ");return r=r.substring(0,i)+"âŠ"};module.exports=function(t){var e=url.parse("https://twitter.com/intent/tweet",!0),r=t.getMeta("DC.title"),i=t.getMeta("DC.creator");return r.length>0&&i.length>0?r+=" - "+i:r=t.getTitle(),e.query.text=abbreviateText(r,120),e.query.url=t.getURL(),null!==t.options.twitterVia&&(e.query.via=t.options.twitterVia),delete e.search,{popup:!0,shareText:"tweet",name:"twitter",faName:"fa-twitter",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Twitter",da:"Del pÃ¥ Twitter",de:"Bei Twitter teilen",en:"Share on Twitter",es:"Compartir en Twitter",fi:"Jaa TwitterissÃ€",fr:"Partager sur Twitter",hr:"Podijelite na Twitteru",hu:"MegosztÃ¡s Twitteren",it:"Condividi su Twitter",ja:"ãã€ãã¿ãŒäžã§å
+±æ",ko:"ížìí°ìì ê³µì íêž°",nl:"Delen op Twitter",no:"Del pÃ¥ Twitter",pl:"UdostÄpnij na Twitterze",pt:"Compartilhar no Twitter",ro:"PartajeazÄ pe Twitter",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Twitter",sk:"ZdieÄŸaÅ¥ na Twitteri",sl:"Deli na Twitterju",sr:"Podeli na Twitter-u",sv:"Dela pÃ¥ Twitter",tr:"Twitter'da paylaÅ",zh:"åšTwitteräžåäº«"},shareUrl:url.format(e)+t.getReferrerTrack()}};
+
+},{"jquery":1,"url":6}],21:[function(require,module,exports){
+"use strict";module.exports=function(a){var p=encodeURIComponent(a.getURL()),e=a.getMeta("DC.title"),t=a.getMeta("DC.creator");return e.length>0&&t.length>0?e+=" - "+t:e=a.getTitle(),{popup:!1,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"whatsapp",faName:"fa-whatsapp",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Whatsapp",da:"Del pÃ¥ Whatsapp",de:"Bei Whatsapp teilen",en:"Share on Whatsapp",es:"Compartir en Whatsapp",fi:"Jaa WhatsAppissÃ€",fr:"Partager sur Whatsapp",hr:"Podijelite na Whatsapp",hu:"MegosztÃ¡s WhatsAppen",it:"Condividi su Whatsapp",ja:"Whatsappäžã§å
+±æ",ko:"Whatsappìì ê³µì íêž°",nl:"Delen op Whatsapp",no:"Del pÃ¥ Whatsapp",pl:"UdostÄpnij przez WhatsApp",pt:"Compartilhar no Whatsapp",ro:"PartajeazÄ pe Whatsapp",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Whatsapp",sk:"ZdieÄŸaÅ¥ na Whatsapp",sl:"Deli na Whatsapp",sr:"Podeli na WhatsApp-u",sv:"Dela pÃ¥ Whatsapp",tr:"Whatsapp'ta paylaÅ",zh:"åšWhatsappäžåäº«"},shareUrl:"whatsapp://send?text="+encodeURIComponent(e)+"%20"+p+a.getReferrerTrack()}};
+
+},{}],22:[function(require,module,exports){
+"use strict";module.exports=function(e){var r=encodeURIComponent(e.getURL());return{popup:!0,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"xing",faName:"fa-xing",title:{de:"Bei XING teilen",en:"Share on XING",es:"Compartir en XING",fr:"Partager sur XING",it:"Condividi su XING",da:"Del pÃ¥ XING",nl:"Delen op XING"},shareUrl:"https://www.xing.com/social_plugins/share?url="+r+e.getReferrerTrack()}};
+
+},{}],23:[function(require,module,exports){
+(function (global){
+"use strict";var $=require("jquery"),url=require("url"),Shariff=function(e,t){var r=this;this.element=e,$(e).empty(),this.options=$.extend({},this.defaults,t,$(e).data());var i=[require("./services/addthis"),require("./services/diaspora"),require("./services/facebook"),require("./services/flattr"),require("./services/googleplus"),require("./services/info"),require("./services/linkedin"),require("./services/mail"),require("./services/pinterest"),require("./services/reddit"),require("./services/stumbleupon"),require("./services/twitter"),require("./services/whatsapp"),require("./services/xing"),require("./services/tumblr"),require("./services/threema")];this.services=$.map(this.options.services,function(e){var t;return i.forEach(function(i){return i=i(r),i.name===e?(t=i,null):void 0}),t}),this._addButtonList(),null!==this.options.backendUrl&&this.getShares().then($.proxy(this._updateCounts,this))};Shariff.prototype={defaults:{theme:"color",backendUrl:null,infoUrl:"http://ct.de/-2467514",lang:"de",langFallback:"en",mailUrl:function(){var e=url.parse(this.getURL(),!0);return e.query.view="mail",delete e.search,url.format(e)},mailSubject:function(){return this.getMeta("DC.title")||this.getTitle()},mailBody:function(){return"<"+this.getURL()+">"},mediaUrl:null,orientation:"horizontal",referrerTrack:null,services:["twitter","facebook","googleplus","info"],title:function(){return $("head title").text()},twitterVia:null,flattrUser:null,flattrCategory:null,url:function(){var e=global.document.location.href,t=$("link[rel=canonical]").attr("href")||this.getMeta("og:url")||"";return t.length>0&&(t.indexOf("http")<0&&(t=global.document.location.protocol+"//"+global.document.location.host+t),e=t),e}},$socialshareElement:function(){return $(this.element)},getLocalized:function(e,t){return"object"==typeof e[t]?"undefined"==typeof e[t][this.options.lang]?e[t][this.options.langFallback]:e[t][this.options.lang]:"string"==typeof e[t]?e[t]:void 0},getMeta:function(e){var t=$('meta[name="'+e+'"],[property="'+e+'"]').attr("content");return t||""},getInfoUrl:function(){return this.options.infoUrl},getURL:function(){return this.getOption("url")},getOption:function(e){var t=this.options[e];return"function"==typeof t?$.proxy(t,this)():t},getTitle:function(){return this.getOption("title")},getReferrerTrack:function(){return this.options.referrerTrack||""},getShares:function(){var e=url.parse(this.options.backendUrl,!0);return e.query.url=this.getURL(),delete e.search,$.getJSON(url.format(e))},_updateCounts:function(e){var t=this;$.each(e,function(e,r){r>=1e3&&(r=Math.round(r/1e3)+"k"),$(t.element).find("."+e+" a").append('&nbsp;<span class="share_count">'+r)})},_addButtonList:function(){var e=this,t=this.$socialshareElement(),r="theme-"+this.options.theme,i="orientation-"+this.options.orientation,n="col-"+this.options.services.length,a=$("<ul>").addClass(r).addClass(i).addClass(n);this.services.forEach(function(t){var r=$('<li class="shariff-button">').addClass(t.name),i='<span class="share_text">'+e.getLocalized(t,"shareText"),n=$("<a>").attr("href",t.shareUrl).append(i);"undefined"!=typeof t.faName&&n.prepend('<span class="fa '+t.faName+'">'),t.popup?n.attr("data-rel","popup"):t.blank&&n.attr("target","_blank"),n.attr("title",e.getLocalized(t,"title")),n.attr("role","button"),n.attr("aria-label",e.getLocalized(t,"title")),r.append(n),a.append(r)}),a.on("click",'[data-rel="popup"]',function(e){e.preventDefault();var t=$(this).attr("href"),r="_blank",i="600",n="460",a="width="+i+",height="+n;global.window.open(t,r,a)}),t.append(a)}},module.exports=Shariff,global.Shariff=Shariff,$(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new Shariff(this))});
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./services/addthis":7,"./services/diaspora":8,"./services/facebook":9,"./services/flattr":10,"./services/googleplus":11,"./services/info":12,"./services/linkedin":13,"./services/mail":14,"./services/pinterest":15,"./services/reddit":16,"./services/stumbleupon":17,"./services/threema":18,"./services/tumblr":19,"./services/twitter":20,"./services/whatsapp":21,"./services/xing":22,"jquery":1,"url":6}]},{},[23]);
Index: /views/js/shariff/shariff.min.css
===================================================================
--- /views/js/shariff/shariff.min.css	(revision 5534)
+++ /views/js/shariff/shariff.min.css	(revision 5534)
@@ -0,0 +1,6 @@
+/*!
+ * shariff - v1.23.2 - 09.05.2016
+ * https://github.com/heiseonline/shariff
+ * Copyright (c) 2016 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
+ * Licensed under the MIT license
+ */.shariff::after,.shariff::before{content:" ";display:table}.shariff::after{clear:both}.shariff ul{padding:0;margin:0;list-style:none}.shariff li{height:35px;box-sizing:border-box;overflow:hidden}.shariff li a{color:#fff;position:relative;display:block;height:35px;text-decoration:none;box-sizing:border-box}.shariff li .share_count,.shariff li .share_text{font-family:Arial,Helvetica,sans-serif;font-size:12px;vertical-align:middle;line-height:35px}.shariff li .fa{width:35px;line-height:35px;text-align:center;vertical-align:middle}.shariff li .share_count{padding:0 8px;height:33px;position:absolute;top:1px;right:1px}.shariff .orientation-horizontal{display:-webkit-box}.shariff .orientation-horizontal li{-webkit-box-flex:1}.shariff .orientation-horizontal .info{-webkit-box-flex:0}.shariff .orientation-horizontal{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.shariff .orientation-horizontal li{float:left;-webkit-flex:none;-ms-flex:none;flex:none;width:35px;margin-right:3%;margin-bottom:10px}.shariff .orientation-horizontal li:last-child{margin-right:0}.shariff .orientation-horizontal li .share_text{display:block;text-indent:-9999px;padding-left:3px}.shariff .orientation-horizontal li .share_count{display:none}.shariff .theme-grey .shariff-button a{background-color:#b0b0b0}.shariff .theme-grey .shariff-button .share_count{background-color:#ccc;color:#333}.shariff .theme-white .shariff-button{border:1px solid #ddd}.shariff .theme-white .shariff-button a{background-color:#fff}.shariff .theme-white .shariff-button a:hover{background-color:#eee}.shariff .theme-white .shariff-button .share_count{background-color:#fff;color:#999}.shariff .orientation-vertical{min-width:110px}.shariff .orientation-vertical li{display:block;width:100%;margin:5px 0}.shariff .orientation-vertical li .share_count{width:24px;text-align:right}@media only screen and (min-width:360px){.shariff .orientation-horizontal li{margin-right:1.8%;min-width:80px;width:auto;-webkit-flex:1;-ms-flex:1;flex:1}.shariff .orientation-horizontal li .share_count{display:block}.shariff .orientation-horizontal.col-1 li,.shariff .orientation-horizontal.col-2 li{min-width:110px;max-width:160px}.shariff .orientation-horizontal.col-1 li .share_text,.shariff .orientation-horizontal.col-2 li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-5 li,.shariff .orientation-horizontal.col-6 li{-webkit-flex:none;-ms-flex:none;flex:none}}@media only screen and (min-width:640px){.shariff .orientation-horizontal.col-3 li{min-width:110px;max-width:160px}.shariff .orientation-horizontal.col-3 li .share_text{text-indent:0;display:inline}}@media only screen and (min-width:768px){.shariff .orientation-horizontal li{min-width:110px;max-width:160px}.shariff .orientation-horizontal li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-5 li,.shariff .orientation-horizontal.col-6 li{-webkit-flex:1;-ms-flex:1;flex:1}}@media only screen and (min-width:1024px){.shariff li{height:30px}.shariff li a{height:30px}.shariff li .fa{width:30px;line-height:30px}.shariff li .share_count,.shariff li .share_text{line-height:30px}.shariff li .share_count{height:28px}}.shariff .addthis a{background-color:#f8694d}.shariff .addthis a:hover{background-color:#f75b44}.shariff .addthis .fa-plus{font-size:14px}.shariff .addthis .share_count{color:#f8694d;background-color:#f1b8b0}.shariff .theme-white .addthis a{color:#f8694d}@media only screen and (min-width:600px){.shariff .addthis .fa-plus{font-size:14px;position:relative;top:1px}}.shariff .diaspora a{background-color:#999}.shariff .diaspora a:hover{background-color:#b3b3b3}.shariff .diaspora .fa-times-circle{font-size:17px}.shariff .theme-white .diaspora a{color:#999}@media only screen and (min-width:600px){.shariff .diaspora .fa-times-circle{font-size:16px}}.shariff .facebook a{background-color:#3b5998}.shariff .facebook a:hover{background-color:#4273c8}.shariff .facebook .fa-facebook{font-size:22px}.shariff .facebook .share_count{color:#183a75;background-color:#99adcf}.shariff .theme-white .facebook a{color:#3b5998}@media only screen and (min-width:600px){.shariff .facebook .fa-facebook{font-size:19px}}.shariff .flattr a{background-color:#7ea352}.shariff .flattr a:hover{background-color:#F67C1A}.shariff .flattr a:hover .share_count{color:#d56308;background-color:#fab47c}.shariff .flattr .fa-money{font-size:22px}.shariff .flattr .share_count{color:#648141;background-color:#b0c893}.shariff .theme-white .flattr a{color:#F67C1A}@media only screen and (min-width:600px){.shariff .flattr .fa-money{font-size:19px}}.shariff .googleplus a{background-color:#d34836}.shariff .googleplus a:hover{background-color:#f75b44}.shariff .googleplus .fa-google-plus{font-size:22px}.shariff .googleplus .share_count{color:#a31601;background-color:#eda79d}.shariff .theme-white .googleplus a{color:#d34836}@media only screen and (min-width:600px){.shariff .googleplus .fa-google-plus{font-size:19px}}.shariff .info{border:1px solid #ccc}.shariff .info a{color:#666;background-color:#fff}.shariff .info a:hover{background-color:#efefef}.shariff .info .fa-info{font-size:20px;width:33px}.shariff .info .share_text{display:block!important;text-indent:-9999px!important}.shariff .theme-grey .info a{background-color:#fff}.shariff .theme-grey .info a:hover{background-color:#efefef}.shariff .orientation-vertical .info{width:35px;float:right}@media only screen and (min-width:360px){.shariff .orientation-horizontal .info{-webkit-flex:none!important;-ms-flex:none!important;flex:none!important;width:35px;min-width:35px!important}}@media only screen and (min-width:1024px){.shariff .info .fa-info{font-size:16px;width:23px}.shariff .orientation-horizontal .info{width:25px;min-width:25px!important}.shariff .orientation-vertical .info{width:25px}}.shariff .linkedin a{background-color:#0077b5}.shariff .linkedin a:hover{background-color:#0369a0}.shariff .linkedin .fa-linkedin{font-size:22px}.shariff .linkedin .share_count{color:#004785;background-color:#33AAE8}.shariff .theme-white .linkedin a{color:#0077b5}@media only screen and (min-width:600px){.shariff .linkedin .fa-linkedin{font-size:19px}}.shariff .mail a{background-color:#999}.shariff .mail a:hover{background-color:#a8a8a8}.shariff .mail .fa-envelope{font-size:21px}.shariff .theme-white .mail a{color:#999}@media only screen and (min-width:600px){.shariff .mail .fa-envelope{font-size:18px}}.shariff .pinterest a{background-color:#bd081c}.shariff .pinterest a:hover{background-color:#d50920}.shariff .pinterest .fa-pinterest-p{font-size:22px}.shariff .pinterest .share_count{color:#a31601;background-color:#eda79d}.shariff .theme-white .pinterest a{color:#bd081c}@media only screen and (min-width:600px){.shariff .pinterest .fa-pinterest-p{font-size:19px;position:relative;top:1px}}.shariff .reddit a{background-color:#ff4500}.shariff .reddit a:hover{background-color:#ff6a33}.shariff .reddit .fa-reddit{font-size:17px}.shariff .theme-white .reddit a{color:#ff4500}@media only screen and (min-width:600px){.shariff .reddit .fa-reddit{font-size:16px}}.shariff .stumbleupon a{background-color:#eb4924}.shariff .stumbleupon a:hover{background-color:#ef7053}.shariff .stumbleupon .fa-stumbleupon{font-size:17px}.shariff .theme-white .stumbleupon a{color:#eb4924}@media only screen and (min-width:600px){.shariff .stumbleupon .fa-stumbleupon{font-size:16px}}.shariff .twitter a{background-color:#55acee}.shariff .twitter a:hover{background-color:#32bbf5}.shariff .twitter .fa-twitter{font-size:28px}.shariff .twitter .share_count{color:#0174a4;background-color:#96D4EE}.shariff .theme-white .twitter a{color:#55acee}@media only screen and (min-width:600px){.shariff .twitter .fa-twitter{font-size:24px}}.shariff .whatsapp a{background-color:#5cbe4a}.shariff .whatsapp a:hover{background-color:#34af23}.shariff .whatsapp .fa-whatsapp{font-size:28px}.shariff .theme-white .whatsapp a{color:#5cbe4a}@media only screen and (min-width:600px){.shariff .whatsapp .fa-whatsapp{font-size:22px}}.shariff .xing a{background-color:#126567}.shariff .xing a:hover{background-color:#29888a}.shariff .xing .fa-xing{font-size:22px}.shariff .xing .share_count{color:#15686a;background-color:#4fa5a7}.shariff .theme-white .xing a{color:#126567}@media only screen and (min-width:600px){.shariff .xing .fa-xing{font-size:19px}}.shariff .tumblr a{background-color:#36465D}.shariff .tumblr a:hover{background-color:#44546B}.shariff .tumblr .fa-tumblr{font-size:28px}.shariff .theme-white .tumblr a{color:#5cbe4a}@media only screen and (min-width:600px){.shariff .tumblr .fa-tumblr{font-size:22px}}.shariff .threema a{background-color:#333}.shariff .threema a:hover{background-color:#1f1f1f}.shariff .threema .fa-lock{font-size:28px}.shariff .theme-white .threema a{color:#333}@media only screen and (min-width:600px){.shariff .threema .fa-lock{font-size:22px}}
Index: /views/js/shariff/shariff.min.js
===================================================================
--- /views/js/shariff/shariff.min.js	(revision 5534)
+++ /views/js/shariff/shariff.min.js	(revision 5534)
@@ -0,0 +1,95 @@
+
+/*!
+ * shariff - v1.23.2 - 09.05.2016
+ * https://github.com/heiseonline/shariff
+ * Copyright (c) 2016 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
+ * Licensed under the MIT license
+ */
+
+
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+(function (global){
+!function(e){function o(e){throw new RangeError(T[e])}function n(e,o){for(var n=e.length,r=[];n--;)r[n]=o(e[n]);return r}function r(e,o){var r=e.split("@"),t="";r.length>1&&(t=r[0]+"@",e=r[1]),e=e.replace(S,".");var u=e.split("."),i=n(u,o).join(".");return t+i}function t(e){for(var o,n,r=[],t=0,u=e.length;u>t;)o=e.charCodeAt(t++),o>=55296&&56319>=o&&u>t?(n=e.charCodeAt(t++),56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)):r.push(o);return r}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function f(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function c(e,o,n){var r=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;r+=b)e=M(e/L);return M(r+(L+1)*e/(e+m))}function l(e){var n,r,t,f,l,s,d,a,p,h,v=[],g=e.length,w=0,m=I,j=A;for(r=e.lastIndexOf(E),0>r&&(r=0),t=0;r>t;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(f=r>0?r+1:0;g>f;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),a=i(e.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&o("overflow"),w+=a*s,p=j>=d?y:d>=j+C?C:d-j,!(p>a);d+=b)h=b-p,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,r,u,i,l,s,d,a,p,h,v,g,w,m,j,F=[];for(e=t(e),g=e.length,n=I,r=0,l=A,s=0;g>s;++s)v=e[s],128>v&&F.push(P(v));for(u=i=F.length,i&&F.push(E);g>u;){for(d=x,s=0;g>s;++s)v=e[s],v>=n&&d>v&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&o("overflow"),r+=(d-n)*w,n=d,s=0;g>s;++s)if(v=e[s],n>v&&++r>x&&o("overflow"),v==n){for(a=r,p=b;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=b)j=a-h,m=b-h,F.push(P(f(h+j%m,0))),a=M(j/m);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(e){return r(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+s(e):e})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;(v.global===v||v.window===v||v.self===v)&&(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.3.2",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else e.punycode=g}(this);
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],2:[function(require,module,exports){
+"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
+
+},{}],3:[function(require,module,exports){
+"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
+
+},{}],4:[function(require,module,exports){
+"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
+
+},{"./decode":2,"./encode":3}],5:[function(require,module,exports){
+function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}function isString(t){return"string"==typeof t}function isObject(t){return"object"==typeof t&&null!==t}function isNull(t){return null===t}function isNullOrUndefined(t){return null==t}var punycode=require("punycode");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n","	"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t;h=h.trim();var r=protocolPattern.exec(h);if(r){r=r[0];var o=r.toLowerCase();this.protocol=o,h=h.substr(r.length)}if(e||r||h.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===h.substr(0,2);!a||r&&hostlessProtocol[r]||(h=h.substr(2),this.slashes=!0)}if(!hostlessProtocol[r]&&(a||r&&!slashedProtocol[r])){for(var n=-1,i=0;i<hostEndingChars.length;i++){var l=h.indexOf(hostEndingChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}var c,u;u=-1===n?h.lastIndexOf("@"):h.lastIndexOf("@",n),-1!==u&&(c=h.slice(0,u),h=h.slice(u+1),this.auth=decodeURIComponent(c)),n=-1;for(var i=0;i<nonHostChars.length;i++){var l=h.indexOf(nonHostChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}-1===n&&(n=h.length),this.host=h.slice(0,n),h=h.slice(n),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),i=0,m=f.length;m>i;i++){var v=f[i];if(v&&!v.match(hostnamePartPattern)){for(var g="",y=0,d=v.length;d>y;y++)g+=v.charCodeAt(y)>127?"x":v[y];if(!g.match(hostnamePartPattern)){var P=f.slice(0,i),b=f.slice(i+1),j=v.match(hostnamePartStart);j&&(P.push(j[1]),b.unshift(j[2])),b.length&&(h="/"+b.join(".")+h),this.hostname=P.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){for(var O=this.hostname.split("."),q=[],i=0;i<O.length;++i){var x=O[i];q.push(x.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(x):x)}this.hostname=q.join(".")}var U=this.port?":"+this.port:"",C=this.hostname||"";this.host=C+U,this.href+=this.host,p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==h[0]&&(h="/"+h))}if(!unsafeProtocol[o])for(var i=0,m=autoEscape.length;m>i;i++){var A=autoEscape[i],E=encodeURIComponent(A);E===A&&(E=escape(A)),h=h.split(A).join(E)}var w=h.indexOf("#");-1!==w&&(this.hash=h.substr(w),h=h.slice(0,w));var R=h.indexOf("?");if(-1!==R?(this.search=h.substr(R),this.query=h.substr(R+1),s&&(this.query=querystring.parse(this.query)),h=h.slice(0,R)):s&&(this.search="",this.query={}),h&&(this.pathname=h),slashedProtocol[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",x=this.search||"";this.path=U+x}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(o=querystring.stringify(this.query));var a=this.search||o&&"?"+o||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),a&&"?"!==a.charAt(0)&&(a="?"+a),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),s+r+e+a+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}var e=new Url;if(Object.keys(this).forEach(function(t){e[t]=this[t]},this),e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(s){"protocol"!==s&&(e[s]=t[s])}),slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e;if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol])return Object.keys(t).forEach(function(s){e[s]=t[s]}),e.href=e.format(),e;if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),e.pathname=h.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var r=e.pathname||"",o=e.search||"";e.path=r+o}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var a=e.pathname&&"/"===e.pathname.charAt(0),n=t.host||t.pathname&&"/"===t.pathname.charAt(0),i=n||a||e.host&&t.pathname,l=i,c=e.pathname&&e.pathname.split("/")||[],h=t.pathname&&t.pathname.split("/")||[],u=e.protocol&&!slashedProtocol[e.protocol];if(u&&(e.hostname="",e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),i=i&&(""===h[0]||""===c[0])),n)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,c=h;else if(h.length)c||(c=[]),c.pop(),c=c.concat(h),e.search=t.search,e.query=t.query;else if(!isNullOrUndefined(t.search)){if(u){e.hostname=e.host=c.shift();var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return e.search=t.search,e.query=t.query,isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!c.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var f=c.slice(-1)[0],m=(e.host||t.host)&&("."===f||".."===f)||""===f,v=0,g=c.length;g>=0;g--)f=c[g],"."==f?c.splice(g,1):".."===f?(c.splice(g,1),v++):v&&(c.splice(g,1),v--);if(!i&&!l)for(;v--;v)c.unshift("..");!i||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),m&&"/"!==c.join("/").substr(-1)&&c.push("");var y=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(u){e.hostname=e.host=y?"":c.length?c.shift():"";var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return i=i||e.host&&c.length,i&&!y&&c.unshift(""),c.length?e.pathname=c.join("/"):(e.pathname=null,e.path=null),isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
+
+},{"punycode":1,"querystring":4}],6:[function(require,module,exports){
+"use strict";module.exports=function(d){var e=encodeURIComponent(d.getURL());return{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"addthis",faName:"fa-plus",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² AddThis",da:"Del pÃ¥ AddThis",de:"Bei AddThis teilen",en:"Share on AddThis",es:"Compartir en AddThis",fi:"Jaa AddThisissÃ€",fr:"Partager sur AddThis",hr:"Podijelite na AddThis",hu:"MegosztÃ¡s AddThisen",it:"Condividi su AddThis",ja:"AddThisäžã§å
+±æ",ko:"AddThisìì ê³µì íêž°",nl:"Delen op AddThis",no:"Del pÃ¥ AddThis",pl:"UdostÄpnij przez AddThis",pt:"Compartilhar no AddThis",ro:"PartajeazÄ pe AddThis",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° AddThis",sk:"ZdieÄŸaÅ¥ na AddThis",sl:"Deli na AddThis",sr:"Podeli na AddThis",sv:"Dela pÃ¥ AddThis",tr:"AddThis'ta paylaÅ",zh:"åšAddThisäžåäº«"},shareUrl:"http://api.addthis.com/oexchange/0.8/offer?url="+e+d.getReferrerTrack()}};
+
+},{}],7:[function(require,module,exports){
+"use strict";var url=require("url");module.exports=function(e){var r=url.parse("https://share.diasporafoundation.org/",!0);return r.query.url=e.getURL(),r.query.title=e.getTitle()||e.getMeta("DC.title"),r.protocol="https",delete r.search,{popup:!0,shareText:{de:"teilen",en:"share"},name:"diaspora",faName:"fa-asterisk",title:{de:"Bei Diaspora teilen",en:"Share on Diaspora"},shareUrl:url.format(r)+e.getReferrerTrack()}};
+
+},{"url":5}],8:[function(require,module,exports){
+"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"facebook",faName:"fa-facebook",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð²ÑÐ² Facebook",da:"Del pÃ¥ Facebook",de:"Bei Facebook teilen",en:"Share on Facebook",es:"Compartir en Facebook",fi:"Jaa Facebookissa",fr:"Partager sur Facebook",hr:"Podijelite na Facebooku",hu:"MegosztÃ¡s Facebookon",it:"Condividi su Facebook",ja:"ãã§ã€ã¹ããã¯äžã§å
+±æ",ko:"íìŽì€ë¶ìì ê³µì íêž°",nl:"Delen op Facebook",no:"Del pÃ¥ Facebook",pl:"UdostÄpnij na Facebooku",pt:"Compartilhar no Facebook",ro:"PartajeazÄ pe Facebook",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Facebook",sk:"ZdieÄŸaÅ¥ na Facebooku",sl:"Deli na Facebooku",sr:"Podeli na Facebook-u",sv:"Dela pÃ¥ Facebook",tr:"Facebook'ta paylaÅ",zh:"åšFacebookäžåäº«"},shareUrl:"https://www.facebook.com/sharer/sharer.php?u="+o+e.getReferrerTrack()}};
+
+},{}],9:[function(require,module,exports){
+"use strict";module.exports=function(t){var e=encodeURIComponent(t.getURL()),o=t.getMeta("DC.title"),r=t.getMeta("DC.creator"),n=t.getMeta("description");return o.length>0&&r.length>0?o+=" - "+r:o=t.getTitle(),{popup:!0,shareText:"Flattr",name:"flattr",faName:"fa-money",title:{de:"Artikel flattrn",en:"Flattr this"},shareUrl:"https://flattr.com/submit/auto?title="+encodeURIComponent(o)+"&description="+encodeURIComponent(n)+"&category="+encodeURIComponent(t.options.flattrCategory||"text")+"&user_id="+encodeURIComponent(t.options.flattrUser)+"&url="+e+t.getReferrerTrack()}};
+
+},{}],10:[function(require,module,exports){
+"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"googleplus",faName:"fa-google-plus",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Google+",da:"Del pÃ¥ Google+",de:"Bei Google+ teilen",en:"Share on Google+",es:"Compartir en Google+",fi:"Jaa Google+:ssa",fr:"Partager sur Goolge+",hr:"Podijelite na Google+",hu:"MegosztÃ¡s Google+on",it:"Condividi su Google+",ja:"Google+äžã§å
+±æ",ko:"Google+ìì ê³µì íêž°",nl:"Delen op Google+",no:"Del pÃ¥ Google+",pl:"UdostÄpnij na Google+",pt:"Compartilhar no Google+",ro:"PartajeazÄ pe Google+",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Google+",sk:"ZdieÄŸaÅ¥ na Google+",sl:"Deli na Google+",sr:"Podeli na Google+",sv:"Dela pÃ¥ Google+",tr:"Google+'da paylaÅ",zh:"åšGoogle+äžåäº«"},shareUrl:"https://plus.google.com/share?url="+o+e.getReferrerTrack()}};
+
+},{}],11:[function(require,module,exports){
+"use strict";module.exports=function(e){return{blank:!0,popup:!1,shareText:"Info",name:"info",faName:"fa-info",title:{de:"weitere Informationen",en:"more information",es:"mÃ¡s informaciones",fr:"plus d'informations",it:"maggiori informazioni",da:"flere oplysninger",nl:"verdere informatie"},shareUrl:e.getInfoUrl()}};
+
+},{}],12:[function(require,module,exports){
+"use strict";module.exports=function(e){var n=encodeURIComponent(e.getURL());return{popup:!0,shareText:{de:"mitteilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"ã·ã§ã¢",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"distribuiÈi",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"linkedin",faName:"fa-linkedin",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² LinkedIn",da:"Del pÃ¥ LinkedIn",de:"Bei LinkedIn teilen",en:"Share on LinkedIn",es:"Compartir en LinkedIn",fi:"Jaa LinkedInissÃ€",fr:"Partager sur LinkedIn",hr:"Podijelite na LinkedIn",hu:"MegosztÃ¡s LinkedInen",it:"Condividi su LinkedIn",ja:"LinkedInäžã§å
+±æ",ko:"LinkedInìì ê³µì íêž°",nl:"Delen op LinkedIn",no:"Del pÃ¥ LinkedIn",pl:"UdostÄpnij przez LinkedIn",pt:"Compartilhar no LinkedIn",ro:"PartajeazÄ pe LinkedIn",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° LinkedIn",sk:"ZdieÄŸaÅ¥ na LinkedIn",sl:"Deli na LinkedIn",sr:"Podeli na LinkedIn-u",sv:"Dela pÃ¥ LinkedIn",tr:"LinkedIn'ta paylaÅ",zh:"åšLinkedInäžåäº«"},shareUrl:"https://www.linkedin.com/cws/share?url="+n+e.getReferrerTrack()}};
+
+},{}],13:[function(require,module,exports){
+"use strict";module.exports=function(e){var i=e.getOption("mailUrl");return 0===i.indexOf("mailto:")&&(i+="?subject="+encodeURIComponent(e.getOption("mailSubject")),i+="&body="+encodeURIComponent(e.getOption("mailBody"))),{blank:0===i.indexOf("http"),popup:!1,shareText:"mail",name:"mail",faName:"fa-envelope",title:{bg:"ÐÐ·Ð¿ÑÐ°ÑÐž Ð¿ÐŸ ÐžÐŒÐµÐ¹Ð»",da:"Sende via e-mail",de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fi:"LÃ€hetÃ€ sÃ€hkÃ¶postitse",fr:"Envoyer par courriel",hr:"PoÅ¡aljite emailom",hu:"ElkÃŒldÃ©s e-mailben",it:"Inviare via email",ja:"é»å­ã¡ãŒã«ã§éä¿¡",ko:"ìŽë©ìŒë¡ ë³ŽëŽêž°",nl:"Sturen via e-mail",no:"Send via epost",pl:"WyÅlij e-mailem",pt:"Enviar por e-mail",ro:"Trimite prin e-mail",ru:"ÐÑÐ¿ÑÐ°Ð²ÐžÑÑ Ð¿ÐŸ ÑÐ». Ð¿ÐŸÑÑÐµ",sk:"PoslaÅ¥ e-mailom",sl:"PoÅ¡lji po elektronski poÅ¡ti",sr:"PoÅ¡alji putem email-a",sv:"Skicka via e-post",tr:"E-posta ile gÃ¶nder",zh:"éè¿çµå­é®ä»¶äŒ é"},shareUrl:i}};
+
+},{}],14:[function(require,module,exports){
+"use strict";var url=require("url");module.exports=function(e){var t=e.getMeta("DC.title")||e.getTitle(),r=e.getMeta("DC.creator");r.length>0&&(t+=" - "+r);var i=e.getOption("mediaUrl");i&&i.length<=0&&(i=e.getMeta("og:image"));var n=url.parse("https://www.pinterest.com/pin/create/link/",!0);return n.query.url=e.getURL(),n.query.media=i,n.query.description=t,delete n.search,{popup:!0,shareText:"pin it",name:"pinterest",faName:"fa-pinterest-p",title:{de:"Bei Pinterest pinnen",en:"Pin it on Pinterest",es:"Compartir en Pinterest",fr:"Partager sur Pinterest",it:"Condividi su Pinterest",da:"Del pÃ¥ Pinterest",nl:"Delen op Pinterest"},shareUrl:url.format(n)+e.getReferrerTrack()}};
+
+},{"url":5}],15:[function(require,module,exports){
+"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{de:"teilen",en:"share"},name:"reddit",faName:"fa-reddit",title:{de:"Bei Reddit teilen",en:"Share on Reddit"},shareUrl:"https://reddit.com/submit?url="+t+r+e.getReferrerTrack()}};
+
+},{}],16:[function(require,module,exports){
+"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),n=encodeURIComponent(e.getTitle());return""!==n&&(n="&title="+n),{popup:!0,shareText:{de:"teilen",en:"share"},name:"stumbleupon",faName:"fa-stumbleupon",title:{de:"Bei Stumbleupon teilen",en:"Share on Stumbleupon"},shareUrl:"https://www.stumbleupon.com/submit?url="+t+n+e.getReferrerTrack()}};
+
+},{}],17:[function(require,module,exports){
+"use strict";module.exports=function(e){var a=encodeURIComponent(e.getURL()),r=e.getMeta("DC.title"),t=e.getMeta("DC.creator");return r.length>0&&t.length>0?r+=" - "+t:r=e.getTitle(),{popup:!1,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"threema",faName:"fa-lock",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Threema",da:"Del pÃ¥ Threema",de:"Bei Threema teilen",en:"Share on Threema",es:"Compartir en Threema",fi:"Jaa ThreemaissÃ€",fr:"Partager sur Threema",hr:"Podijelite na Threema",hu:"MegosztÃ¡s Threemaen",it:"Condividi su Threema",ja:"Threemaäžã§å
+±æ",ko:"Threemaìì ê³µì íêž°",nl:"Delen op Threema",no:"Del pÃ¥ Threema",pl:"UdostÄpnij przez Threema",pt:"Compartilhar no Threema",ro:"PartajeazÄ pe Threema",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Threema",sk:"ZdieÄŸaÅ¥ na Threema",sl:"Deli na Threema",sr:"Podeli na Threema-u",sv:"Dela pÃ¥ Threema",tr:"Threema'ta paylaÅ",zh:"åšThreemaäžåäº«"},shareUrl:"threema://compose?text="+encodeURIComponent(r)+"%20"+a+e.getReferrerTrack()}};
+
+},{}],18:[function(require,module,exports){
+"use strict";module.exports=function(t){var e=encodeURIComponent(t.getURL()),r=t.getMeta("DC.title"),l=t.getMeta("DC.creator");return r.length>0&&l.length>0?r+=" - "+l:r=t.getTitle(),{popup:!0,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"tumblr",faName:"fa-tumblr",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² tumblr",da:"Del pÃ¥ tumblr",de:"Bei tumblr teilen",en:"Share on tumblr",es:"Compartir en tumblr",fi:"Jaa tumblrissÃ€",fr:"Partager sur tumblr",hr:"Podijelite na tumblr",hu:"MegosztÃ¡s tumblren",it:"Condividi su tumblr",ja:"tumblräžã§å
+±æ",ko:"tumblrìì ê³µì íêž°",nl:"Delen op tumblr",no:"Del pÃ¥ tumblr",pl:"UdostÄpnij przez tumblr",pt:"Compartilhar no tumblr",ro:"PartajeazÄ pe tumblr",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° tumblr",sk:"ZdieÄŸaÅ¥ na tumblr",sl:"Deli na tumblr",sr:"Podeli na tumblr-u",sv:"Dela pÃ¥ tumblr",tr:"tumblr'ta paylaÅ",zh:"åštumblräžåäº«"},shareUrl:"http://tumblr.com/widgets/share/tool?canonicalUrl="+e+t.getReferrerTrack()}};
+
+},{}],19:[function(require,module,exports){
+(function (global){
+"use strict";var url=require("url"),$=(typeof window !== "undefined" ? window['jQuery'] : typeof global !== "undefined" ? global['jQuery'] : null),abbreviateText=function(t,e){var r=$("<div/>").html(t).text();if(r.length<=e)return t;var i=r.substring(0,e-1).lastIndexOf(" ");return r=r.substring(0,i)+"âŠ"};module.exports=function(t){var e=url.parse("https://twitter.com/intent/tweet",!0),r=t.getMeta("DC.title"),i=t.getMeta("DC.creator");return r.length>0&&i.length>0?r+=" - "+i:r=t.getTitle(),e.query.text=abbreviateText(r,120),e.query.url=t.getURL(),null!==t.options.twitterVia&&(e.query.via=t.options.twitterVia),delete e.search,{popup:!0,shareText:"tweet",name:"twitter",faName:"fa-twitter",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Twitter",da:"Del pÃ¥ Twitter",de:"Bei Twitter teilen",en:"Share on Twitter",es:"Compartir en Twitter",fi:"Jaa TwitterissÃ€",fr:"Partager sur Twitter",hr:"Podijelite na Twitteru",hu:"MegosztÃ¡s Twitteren",it:"Condividi su Twitter",ja:"ãã€ãã¿ãŒäžã§å
+±æ",ko:"ížìí°ìì ê³µì íêž°",nl:"Delen op Twitter",no:"Del pÃ¥ Twitter",pl:"UdostÄpnij na Twitterze",pt:"Compartilhar no Twitter",ro:"PartajeazÄ pe Twitter",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Twitter",sk:"ZdieÄŸaÅ¥ na Twitteri",sl:"Deli na Twitterju",sr:"Podeli na Twitter-u",sv:"Dela pÃ¥ Twitter",tr:"Twitter'da paylaÅ",zh:"åšTwitteräžåäº«"},shareUrl:url.format(e)+t.getReferrerTrack()}};
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"url":5}],20:[function(require,module,exports){
+"use strict";module.exports=function(a){var p=encodeURIComponent(a.getURL()),e=a.getMeta("DC.title"),t=a.getMeta("DC.creator");return e.length>0&&t.length>0?e+=" - "+t:e=a.getTitle(),{popup:!1,shareText:{bg:"cÐ¿ÐŸÐŽÐµÐ»ÑÐœÐµ",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztÃ¡s",it:"condividi",ja:"å
+±æ",ko:"ê³µì íêž°",nl:"delen",no:"del",pl:"udostÄpnij",pt:"compartilhar",ro:"partajeazÄ",ru:"Ð¿ÐŸÐŽÐµÐ»ÐžÑÑÑÑ",sk:"zdieÄŸaÅ¥",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaÅ",zh:"åäº«"},name:"whatsapp",faName:"fa-whatsapp",title:{bg:"Ð¡Ð¿ÐŸÐŽÐµÐ»Ðž Ð² Whatsapp",da:"Del pÃ¥ Whatsapp",de:"Bei Whatsapp teilen",en:"Share on Whatsapp",es:"Compartir en Whatsapp",fi:"Jaa WhatsAppissÃ€",fr:"Partager sur Whatsapp",hr:"Podijelite na Whatsapp",hu:"MegosztÃ¡s WhatsAppen",it:"Condividi su Whatsapp",ja:"Whatsappäžã§å
+±æ",ko:"Whatsappìì ê³µì íêž°",nl:"Delen op Whatsapp",no:"Del pÃ¥ Whatsapp",pl:"UdostÄpnij przez WhatsApp",pt:"Compartilhar no Whatsapp",ro:"PartajeazÄ pe Whatsapp",ru:"ÐÐŸÐŽÐµÐ»ÐžÑÑÑÑ ÐœÐ° Whatsapp",sk:"ZdieÄŸaÅ¥ na Whatsapp",sl:"Deli na Whatsapp",sr:"Podeli na WhatsApp-u",sv:"Dela pÃ¥ Whatsapp",tr:"Whatsapp'ta paylaÅ",zh:"åšWhatsappäžåäº«"},shareUrl:"whatsapp://send?text="+encodeURIComponent(e)+"%20"+p+a.getReferrerTrack()}};
+
+},{}],21:[function(require,module,exports){
+"use strict";module.exports=function(e){var r=encodeURIComponent(e.getURL());return{popup:!0,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"xing",faName:"fa-xing",title:{de:"Bei XING teilen",en:"Share on XING",es:"Compartir en XING",fr:"Partager sur XING",it:"Condividi su XING",da:"Del pÃ¥ XING",nl:"Delen op XING"},shareUrl:"https://www.xing.com/social_plugins/share?url="+r+e.getReferrerTrack()}};
+
+},{}],22:[function(require,module,exports){
+(function (global){
+"use strict";var $=(typeof window !== "undefined" ? window['jQuery'] : typeof global !== "undefined" ? global['jQuery'] : null),url=require("url"),Shariff=function(e,t){var r=this;this.element=e,$(e).empty(),this.options=$.extend({},this.defaults,t,$(e).data());var i=[require("./services/addthis"),require("./services/diaspora"),require("./services/facebook"),require("./services/flattr"),require("./services/googleplus"),require("./services/info"),require("./services/linkedin"),require("./services/mail"),require("./services/pinterest"),require("./services/reddit"),require("./services/stumbleupon"),require("./services/twitter"),require("./services/whatsapp"),require("./services/xing"),require("./services/tumblr"),require("./services/threema")];this.services=$.map(this.options.services,function(e){var t;return i.forEach(function(i){return i=i(r),i.name===e?(t=i,null):void 0}),t}),this._addButtonList(),null!==this.options.backendUrl&&this.getShares().then($.proxy(this._updateCounts,this))};Shariff.prototype={defaults:{theme:"color",backendUrl:null,infoUrl:"http://ct.de/-2467514",lang:"de",langFallback:"en",mailUrl:function(){var e=url.parse(this.getURL(),!0);return e.query.view="mail",delete e.search,url.format(e)},mailSubject:function(){return this.getMeta("DC.title")||this.getTitle()},mailBody:function(){return"<"+this.getURL()+">"},mediaUrl:null,orientation:"horizontal",referrerTrack:null,services:["twitter","facebook","googleplus","info"],title:function(){return $("head title").text()},twitterVia:null,flattrUser:null,flattrCategory:null,url:function(){var e=global.document.location.href,t=$("link[rel=canonical]").attr("href")||this.getMeta("og:url")||"";return t.length>0&&(t.indexOf("http")<0&&(t=global.document.location.protocol+"//"+global.document.location.host+t),e=t),e}},$socialshareElement:function(){return $(this.element)},getLocalized:function(e,t){return"object"==typeof e[t]?"undefined"==typeof e[t][this.options.lang]?e[t][this.options.langFallback]:e[t][this.options.lang]:"string"==typeof e[t]?e[t]:void 0},getMeta:function(e){var t=$('meta[name="'+e+'"],[property="'+e+'"]').attr("content");return t||""},getInfoUrl:function(){return this.options.infoUrl},getURL:function(){return this.getOption("url")},getOption:function(e){var t=this.options[e];return"function"==typeof t?$.proxy(t,this)():t},getTitle:function(){return this.getOption("title")},getReferrerTrack:function(){return this.options.referrerTrack||""},getShares:function(){var e=url.parse(this.options.backendUrl,!0);return e.query.url=this.getURL(),delete e.search,$.getJSON(url.format(e))},_updateCounts:function(e){var t=this;$.each(e,function(e,r){r>=1e3&&(r=Math.round(r/1e3)+"k"),$(t.element).find("."+e+" a").append('&nbsp;<span class="share_count">'+r)})},_addButtonList:function(){var e=this,t=this.$socialshareElement(),r="theme-"+this.options.theme,i="orientation-"+this.options.orientation,n="col-"+this.options.services.length,a=$("<ul>").addClass(r).addClass(i).addClass(n);this.services.forEach(function(t){var r=$('<li class="shariff-button">').addClass(t.name),i='<span class="share_text">'+e.getLocalized(t,"shareText"),n=$("<a>").attr("href",t.shareUrl).append(i);"undefined"!=typeof t.faName&&n.prepend('<span class="fa '+t.faName+'">'),t.popup?n.attr("data-rel","popup"):t.blank&&n.attr("target","_blank"),n.attr("title",e.getLocalized(t,"title")),n.attr("role","button"),n.attr("aria-label",e.getLocalized(t,"title")),r.append(n),a.append(r)}),a.on("click",'[data-rel="popup"]',function(e){e.preventDefault();var t=$(this).attr("href"),r="_blank",i="600",n="460",a="width="+i+",height="+n;global.window.open(t,r,a)}),t.append(a)}},module.exports=Shariff,global.Shariff=Shariff,$(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new Shariff(this))});
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./services/addthis":6,"./services/diaspora":7,"./services/facebook":8,"./services/flattr":9,"./services/googleplus":10,"./services/info":11,"./services/linkedin":12,"./services/mail":13,"./services/pinterest":14,"./services/reddit":15,"./services/stumbleupon":16,"./services/threema":17,"./services/tumblr":18,"./services/twitter":19,"./services/whatsapp":20,"./services/xing":21,"url":5}]},{},[22]);
Index: /views/mods/mod_produktartikel/produkt.phtml
===================================================================
--- /views/mods/mod_produktartikel/produkt.phtml	(revision 5532)
+++ /views/mods/mod_produktartikel/produkt.phtml	(revision 5534)
@@ -6,5 +6,6 @@
 
 ?>
-<?php if ($this->get_option('wpsg_mod_produktartikel_twitter') == '1' || $this->get_option('wpsg_mod_produktartikel_google') == '1' || $this->get_option('wpsg_mod_produktartikel_facebook') == '1') { ?>
+
+<?php /* if ($this->get_option('wpsg_mod_produktartikel_twitter') == '1' || $this->get_option('wpsg_mod_produktartikel_google') == '1' || $this->get_option('wpsg_mod_produktartikel_facebook') == '1') { ?>
 <div class="socialshareprivacy" id="socialshareprivacy_<?php echo $this->getTemplateIndex(); ?>"></div>
 <script type="text/javascript">
@@ -39,3 +40,17 @@
        
  </script>
-<?php } ?>
+<?php } */?>
+<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/lib/shariff-backend-php-master/'; ?>
+<div class="shariff" data-backend-url="<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/lib/shariff-backend-php-master/'; ?>"></div>
+
+<script type="text/javascript">
+
+	jQuery(document).ready(function() {
+
+		new Shariff(jQuery('.shariff'), {
+			orientation: 'horizontal'
+		} );
+
+	} );
+
+</script>
Index: /views/produkt/addedit_texte.phtml
===================================================================
--- /views/produkt/addedit_texte.phtml	(revision 5532)
+++ /views/produkt/addedit_texte.phtml	(revision 5534)
@@ -33,7 +33,7 @@
 	}
 	
-	//// Damit die qTranslate Interne Editor Ãbersetzung nicht aufgerufen wird
-	remove_filter('the_editor', 'qtrans_modifyRichEditor');
-	
+	// Damit die qTranslate Interne Editor Ãbersetzung nicht aufgerufen wird
+	//remove_filter('the_editor', 'qtrans_modifyRichEditor');
+	 
 	add_filter('tiny_mce_before_init', 'wpsg_formatTinyMCE');
 	add_filter('admin_head', 'wpsg_ShowTinyMCE');
